@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,500;0,9..144,600;0,9..144,700;1,9..144,500&family=Barlow+Condensed:wght@500;600;700&family=Caveat:wght@500;600&display=swap');

:root{
  --cream: #FFFFFF;
  --cream-deep: #E7F1EA;
  --forest: #1D3A2A;
  --forest-deep: #12271B;
  --acid: #C6F135;
  --ink: #201D14;
  --rust: #7C3B2E;
  --rule: rgba(29,58,42,0.28);
}

*{box-sizing:border-box;}
html{scroll-behavior:smooth;}
body{
  margin:0;
  background:var(--cream);
  color:var(--ink);
  font-family:'Fraunces', serif;
  font-size:18px;
  line-height:1.55;
}
@media (prefers-reduced-motion: reduce){
  html{scroll-behavior:auto;}
  *{animation-duration:0.001ms !important; transition-duration:0.001ms !important;}
}

a{color:var(--forest);}
a:focus-visible, button:focus-visible{outline:3px solid var(--acid); outline-offset:2px;}

.condensed{
  font-family:'Barlow Condensed', sans-serif;
}

/* ===== Masthead ===== */
.masthead{
  border-bottom:4px solid var(--forest);
  background:var(--cream);
  padding:0.9rem 1.25rem 0;
}
.masthead-row{
  display:flex;
  justify-content:space-between;
  align-items:baseline;
  max-width:1100px;
  margin:0 auto;
  font-family:'Barlow Condensed', sans-serif;
  font-size:0.8rem;
  letter-spacing:0.04em;
  color:var(--forest);
  padding-bottom:0.6rem;
  border-bottom:1px solid var(--rule);
  flex-wrap:wrap;
  gap:0.4rem;
}
.masthead-title{
  max-width:1100px;
  margin:0 auto;
  text-align:center;
  padding:1.1rem 0 1rem;
}
.masthead-title h1{
  font-family:'Fraunces', serif;
  font-optical-sizing:auto;
  font-weight:600;
  font-size:clamp(2.6rem, 8vw, 5.2rem);
  margin:0;
  letter-spacing:-0.01em;
  color:var(--forest-deep);
}
.masthead-title .dek{
  font-family:'Caveat', cursive;
  font-size:1.5rem;
  color:var(--rust);
  display:block;
  margin-top:0.2rem;
}
.masthead nav{
  max-width:1100px;
  margin:0 auto;
  display:flex;
  gap:1.6rem;
  justify-content:center;
  flex-wrap:wrap;
  padding:0.7rem 0 0.9rem;
  font-family:'Barlow Condensed', sans-serif;
  font-weight:600;
  font-size:1.05rem;
}
.masthead nav a{
  text-decoration:none;
  color:var(--forest-deep);
  border-bottom:2px solid transparent;
  padding-bottom:2px;
}
.masthead nav a:hover, .masthead nav a.active{
  border-bottom:2px solid var(--acid);
}

main{max-width:1100px; margin:0 auto; padding:0 1.25rem;}

/* ===== Editorial images ===== */
.lead-image{
  margin:0.4rem 0 0;
  border-top:1px solid var(--rule);
  border-bottom:1px solid var(--rule);
}
.lead-image img{
  width:100%;
  height:clamp(220px, 42vw, 420px);
  object-fit:cover;
  display:block;
}
.page-image{
  margin:1.6rem 0 0;
}
.page-image img{
  width:100%;
  height:clamp(180px, 34vw, 320px);
  object-fit:cover;
  display:block;
}

/* ===== Hero ===== */
.hero{
  display:grid;
  grid-template-columns:1.3fr 1fr;
  gap:2.5rem;
  padding:2.6rem 0 2.2rem;
  border-bottom:1px solid var(--rule);
  align-items:end;
}
@media (max-width:760px){ .hero{grid-template-columns:1fr;} }
.hero h2{
  font-size:clamp(1.9rem, 4vw, 2.8rem);
  line-height:1.08;
  margin:0 0 0.7rem;
  font-weight:600;
  color:var(--forest-deep);
}
.hero p{margin:0 0 1rem; max-width:56ch;}
.hero .tag{
  font-family:'Barlow Condensed', sans-serif;
  font-weight:700;
  color:var(--rust);
  font-size:0.95rem;
  margin-bottom:0.5rem;
  display:block;
}
.hero-note{
  font-family:'Caveat', cursive;
  font-size:1.4rem;
  color:var(--forest);
  border-left:2px solid var(--acid);
  padding-left:1rem;
}

/* ===== Quick Index (bold numbered jump list) ===== */
.quick-index{
  background:var(--forest-deep);
  color:var(--cream);
  padding:1.6rem 1.6rem 1.8rem;
}
.quick-index h3{
  font-family:'Barlow Condensed', sans-serif;
  font-weight:700;
  font-size:1.15rem;
  letter-spacing:0.03em;
  color:var(--acid);
  margin:0 0 1rem;
}
.quick-index ol{
  list-style:none;
  margin:0;
  padding:0;
  display:grid;
  gap:0.1rem;
}
.quick-index li{
  border-bottom:1px solid rgba(242,237,220,0.18);
}
.quick-index li:last-child{ border-bottom:none; }
.quick-index a{
  display:flex;
  align-items:center;
  gap:0.9rem;
  padding:0.75rem 0.1rem;
  text-decoration:none;
  color:var(--cream);
}
.quick-index .num{
  font-family:'Fraunces', serif;
  font-weight:700;
  font-size:1.5rem;
  color:var(--acid);
  min-width:2ch;
}
.quick-index .label{
  font-family:'Fraunces', serif;
  font-size:1.25rem;
  font-weight:600;
}
.quick-index a:hover .label{ text-decoration:underline; text-decoration-color:var(--acid); text-decoration-thickness:3px; }

/* ===== Pull quote ===== */
.pull-quote{
  margin:2.4rem 0;
  padding:1.6rem 0;
  border-top:3px solid var(--forest-deep);
  border-bottom:3px solid var(--forest-deep);
  text-align:center;
}
.pull-quote p{
  font-family:'Fraunces', serif;
  font-style:italic;
  font-weight:500;
  font-size:clamp(1.4rem, 3.2vw, 2rem);
  line-height:1.3;
  color:var(--forest-deep);
  max-width:34ch;
  margin:0 auto;
}

/* ===== Numbered compound entries ===== */
.compound{
  display:grid;
  grid-template-columns:auto 1fr;
  gap:1rem;
  align-items:start;
}
.compound .num-badge{
  font-family:'Fraunces', serif;
  font-weight:700;
  font-size:1.8rem;
  background:var(--acid);
  color:var(--forest-deep);
  width:2.4rem;
  height:2.4rem;
  display:flex;
  align-items:center;
  justify-content:center;
  flex-shrink:0;
  margin-top:0.2rem;
}
.compound .compound-body{ min-width:0; }
@media (max-width:480px){
  .compound{ grid-template-columns:1fr; }
  .compound .num-badge{ width:auto; height:auto; padding:0.15rem 0.6rem; display:inline-flex; }
}

/* ===== 3D scroll reveal ===== */
.reveal{
  opacity:0;
  transform:perspective(900px) rotateX(8deg) translateY(28px);
  transition:opacity 0.7s cubic-bezier(.2,.7,.3,1), transform 0.7s cubic-bezier(.2,.7,.3,1);
  will-change:opacity, transform;
}
.reveal.is-visible{
  opacity:1;
  transform:perspective(900px) rotateX(0) translateY(0);
}
.edit-card, .compound{
  transition:transform 0.25s ease;
}
.lead-image, .page-image{ overflow:hidden; }
.lead-image img, .page-image img{ transition:transform 0.2s ease-out; will-change:transform; }

/* ===== Section labels ===== */
.section-head{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  border-bottom:2px solid var(--forest);
  padding-bottom:0.4rem;
  margin:2.6rem 0 1.4rem;
}
.section-head h3{
  font-family:'Fraunces', serif;
  font-weight:600;
  font-size:1.6rem;
  margin:0;
  color:var(--forest-deep);
}
.section-head span{
  font-family:'Barlow Condensed', sans-serif;
  color:var(--rust);
  font-size:0.95rem;
}

/* ===== Edit grid (six categories) ===== */
.edit-grid{
  display:grid;
  grid-template-columns:repeat(3, 1fr);
  gap:0;
  border-top:1px solid var(--rule);
  border-left:1px solid var(--rule);
}
@media (max-width:760px){ .edit-grid{grid-template-columns:repeat(2,1fr);} }
@media (max-width:480px){ .edit-grid{grid-template-columns:1fr;} }
.edit-card{
  border-right:1px solid var(--rule);
  border-bottom:1px solid var(--rule);
  padding:0;
  text-decoration:none;
  color:var(--ink);
  display:block;
  position:relative;
  transition:background 0.15s ease;
}
.edit-card:hover{ background:var(--cream-deep); }
.edit-card:hover .edit-thumb img{ transform:scale(1.04); }
.edit-thumb{
  overflow:hidden;
  height:150px;
}
.edit-thumb img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  transition:transform 0.4s ease;
}
.edit-card-body{ padding:1.3rem 1.4rem 1.6rem; }
.edit-card .no{
  font-family:'Barlow Condensed', sans-serif;
  color:var(--rust);
  font-size:0.85rem;
  font-weight:600;
}
.edit-card h4{
  font-family:'Fraunces', serif;
  font-size:1.5rem;
  margin:0.3rem 0 0.5rem;
  color:var(--forest-deep);
}
.edit-card p{margin:0; font-size:0.95rem; color:var(--ink);}

/* ===== Article teaser list ===== */
.teaser-list{display:grid; gap:1.6rem;}
.teaser{
  display:grid;
  grid-template-columns:110px 1fr;
  gap:1.2rem;
  padding:0 0 1.4rem 1rem;
  border-bottom:1px solid var(--rule);
  border-left:3px solid var(--forest);
}
@media (max-width:520px){ .teaser{grid-template-columns:1fr;} }
.teaser .kicker{
  font-family:'Barlow Condensed', sans-serif;
  font-weight:700;
  color:var(--forest);
  writing-mode:vertical-rl;
  text-orientation:mixed;
  font-size:0.85rem;
}
@media (max-width:520px){ .teaser .kicker{writing-mode:horizontal-tb;} }
.teaser h4{margin:0 0 0.35rem; font-size:1.35rem; color:var(--forest-deep);}
.teaser h4 a{text-decoration:none; color:inherit;}
.teaser h4 a:hover{text-decoration:underline; text-decoration-color:var(--acid); text-decoration-thickness:3px;}
.teaser p{margin:0; font-size:0.98rem;}

/* ===== Affiliate callout ===== */
.callout{
  background:var(--forest-deep);
  color:var(--cream);
  border-radius:2px;
  padding:2rem 1.8rem;
  margin:3rem 0;
  display:grid;
  gap:1rem;
  grid-template-columns:1.4fr 1fr;
  align-items:center;
}
@media (max-width:700px){ .callout{grid-template-columns:1fr;} }
.callout h3{
  font-family:'Fraunces', serif;
  font-size:1.7rem;
  margin:0 0 0.5rem;
  color:var(--acid);
}
.callout p{margin:0; font-size:0.98rem; color:var(--cream);}
.code-box{
  background:var(--acid);
  color:var(--forest-deep);
  font-family:'Barlow Condensed', sans-serif;
  font-weight:700;
  padding:1.1rem 1.2rem;
  text-align:center;
}
.code-box .label{display:block; font-size:0.85rem; letter-spacing:0.03em; margin-bottom:0.3rem;}
.code-box .code{font-size:1.6rem; font-family:'Fraunces', serif;}
.code-box a{
  display:inline-block;
  margin-top:0.7rem;
  background:var(--forest-deep);
  color:var(--acid);
  text-decoration:none;
  padding:0.55rem 1.1rem;
  font-size:0.95rem;
}
.code-box a:hover{background:var(--ink);}

/* ===== Footer ===== */
footer{
  border-top:4px solid var(--forest);
  margin-top:3rem;
  padding:1.6rem 1.25rem 2.4rem;
  font-family:'Barlow Condensed', sans-serif;
  color:var(--forest);
  font-size:0.9rem;
}
footer .foot-inner{max-width:1100px; margin:0 auto;}
footer .disclosure{max-width:70ch; color:var(--ink); font-family:'Fraunces', serif; font-size:0.85rem; margin-top:0.8rem; line-height:1.5;}

/* ===== Category / article page ===== */
.breadcrumb{
  max-width:1100px;
  margin:0 auto;
  padding:0.7rem 1.25rem 0;
  font-family:'Barlow Condensed', sans-serif;
  font-size:0.85rem;
  color:var(--rust);
}
.breadcrumb a{ color:var(--forest); text-decoration:none; }
.breadcrumb a:hover{ text-decoration:underline; }
.breadcrumb span{ margin:0 0.3rem; color:var(--rule); }

/* ===== FAQ ===== */
.faq{ border-top:1px solid var(--rule); }
.faq-item{ border-bottom:1px solid var(--rule); border-left:3px solid var(--forest); padding:1.2rem 0 1.2rem 1rem; }
.faq-item h4{ font-family:'Fraunces', serif; font-size:1.2rem; margin:0 0 0.4rem; color:var(--forest-deep); }
.faq-item p{ margin:0; font-size:0.95rem; }

.page-head{padding:2.2rem 0 1.4rem; border-bottom:1px solid var(--rule);}
.page-head .tag{font-family:'Barlow Condensed', sans-serif; color:var(--rust); font-weight:700;}
.page-head h2{font-size:clamp(2rem,5vw,3rem); margin:0.3rem 0 0.6rem; color:var(--forest-deep);}
.page-head p{max-width:65ch; margin:0;}

.compound-list{display:grid; gap:0; margin:2rem 0;}
.compound{
  padding:1.6rem 0;
  border-bottom:1px solid var(--rule);
  display:grid;
  grid-template-columns:1fr;
  gap:0.5rem;
}
.compound h3{
  font-family:'Fraunces', serif;
  font-size:1.5rem;
  margin:0;
  color:var(--forest-deep);
}
.compound .aka{font-family:'Barlow Condensed', sans-serif; color:var(--rust); font-size:0.9rem;}
.compound p{margin:0.3rem 0 0; max-width:70ch;}
.compound .learn{
  font-family:'Barlow Condensed', sans-serif;
  font-weight:600;
  color:var(--forest);
  text-decoration:none;
  font-size:0.95rem;
  border-bottom:2px solid var(--acid);
  align-self:start;
  width:fit-content;
}

.disclaimer-box{
  background:var(--cream-deep);
  border-left:3px solid var(--forest);
  padding:1rem 1.2rem;
  font-size:0.9rem;
  margin:2rem 0;
}
