/* ==========================================================================
   Nattokinase Reference — design tokens from DESIGN.md (SuperMush)
   Warm bone canvas · one electric cobalt action · lime/ember bands · no shadows
   ========================================================================== */

@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --cobalt: #2f59f8;
  --ember: #ff632a;
  --lime: #eaff00;
  --obsidian: #000000;
  --bone: #f5f4f1;
  --paper: #ffffff;
  --concrete: #eeeeee;
  --ash: #6b6c6b;
  --graphite: #171717;
  --mist: #e3e3e3;
  --pebble: #d9d9d9;

  --font: "Inter", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;

  --sp-4: 4px;   --sp-8: 8px;   --sp-12: 12px; --sp-16: 16px;
  --sp-20: 20px; --sp-24: 24px; --sp-28: 28px; --sp-32: 32px;
  --sp-36: 36px; --sp-40: 40px; --sp-48: 48px; --sp-56: 56px;
  --sp-64: 64px; --sp-80: 80px; --sp-120: 120px;

  --r-nav: 4px;
  --r-tag: 4px;
  --r-card: 16px;
  --r-img: 8px;
  --r-pill: 50px;

  --page: 1200px;
  --prose: 720px;
  --nav-h: 64px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 24px);
}

body {
  margin: 0;
  background: var(--bone);
  color: var(--obsidian);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }
picture { display: contents; }

a { color: inherit; }

::selection { background: var(--lime); color: var(--obsidian); }

:focus-visible {
  outline: 2px solid var(--cobalt);
  outline-offset: 3px;
  border-radius: 2px;
}

.wrap {
  width: 100%;
  max-width: var(--page);
  margin: 0 auto;
  padding: 0 24px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--obsidian);
  color: var(--paper);
  padding: 12px 20px;
  border-radius: 0 0 var(--r-tag) 0;
  z-index: 200;
  font-size: 14px;
  font-weight: 500;
}
.skip:focus { left: 0; }

/* ---------- Reading progress ---------- */
.progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0%;
  background: var(--cobalt);
  z-index: 120;
  transition: width .08s linear;
}

/* ---------- Lime announcement bar ---------- */
.limebar {
  background: var(--lime);
  color: var(--obsidian);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .01em;
  text-align: center;
  padding: 10px 24px;
  line-height: 1.3;
}
.limebar span.dot { padding: 0 6px; opacity: .55; }

/* ---------- Header ---------- */
.site-head {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bone);
  border-bottom: 4px solid var(--obsidian);
}
.head-inner {
  display: flex;
  align-items: center;
  gap: var(--sp-16);
  min-height: var(--nav-h);
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -.01em;
  line-height: 1.05;
  padding: 6px 0;
}
.logo .mark {
  width: 30px;
  height: 30px;
  border-radius: var(--r-nav);
  background: var(--obsidian);
  color: var(--lime);
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -.02em;
  flex: none;
}
.logo small {
  display: block;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ash);
  margin-top: 3px;
}

.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav a {
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 9px 14px;
  border-radius: var(--r-nav);
  color: var(--obsidian);
  transition: background .18s ease, color .18s ease;
  white-space: nowrap;
}
.nav a:hover { background: var(--concrete); }
.nav a[aria-current="true"],
.nav a.is-active { color: var(--cobalt); }

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 42px; height: 42px;
  border: 1.5px solid var(--obsidian);
  background: transparent;
  border-radius: var(--r-nav);
  cursor: pointer;
  padding: 0;
  align-items: center;
  justify-content: center;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 18px; height: 1.5px;
  background: var(--obsidian);
  content: "";
  position: relative;
}
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after { position: absolute; top: 6px; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-weight: 700;
  letter-spacing: -.02em;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(32px, 5vw, 48px); line-height: 1.04; }
h2 { font-size: clamp(24px, 3.2vw, 32px); line-height: 1.1; }
h3 { font-size: 20px; line-height: 1.25; font-weight: 700; }
h4 { font-size: 16px; line-height: 1.3; font-weight: 700; }

p { margin: 0 0 18px; }
p:last-child { margin-bottom: 0; }

.eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ash);
  margin: 0 0 14px;
}

.lede {
  font-size: 18px;
  line-height: 1.55;
  color: var(--graphite);
  max-width: 62ch;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 24px;
  border-radius: var(--r-pill);
  font-family: var(--font);
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform .16s ease, background .18s ease, color .18s ease, border-color .18s ease;
  line-height: 1;
}
.btn-primary { background: var(--cobalt); color: #fff; }
.btn-primary:hover { background: #1f45d8; transform: translateY(-1px); }
.btn-ghost { border-color: var(--obsidian); color: var(--obsidian); background: transparent; }
.btn-ghost:hover { background: var(--obsidian); color: var(--paper); }

/* ---------- Hero ---------- */
.hero { padding: var(--sp-48) 0 var(--sp-40); }
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: var(--sp-48);
  align-items: end;
}
.hero h1 { max-width: 20ch; }
.hero .lede { margin-top: var(--sp-20); }
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: var(--sp-32);
}
.hero-figure { position: relative; }
.hero-figure img {
  border-radius: var(--r-card);
  aspect-ratio: 4 / 3;
  object-fit: cover;
  width: 100%;
  animation: heroIn 1.1s cubic-bezier(.2,.7,.2,1) both;
}
@keyframes heroIn {
  from { opacity: 0; transform: scale(1.03); }
  to   { opacity: 1; transform: scale(1); }
}
.hero-figure figcaption {
  font-size: 11px;
  color: var(--ash);
  margin-top: 8px;
  letter-spacing: .02em;
}

/* ---------- Trust strip ---------- */
.trust {
  border-top: 1px solid var(--obsidian);
  border-bottom: 1px solid var(--obsidian);
  padding: 18px 0;
  margin: var(--sp-40) 0 var(--sp-64);
}
.trust ul {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-24);
  list-style: none;
  margin: 0;
  padding: 0;
}
.trust li {
  font-size: 13px;
  line-height: 1.35;
  color: var(--graphite);
}
.trust strong {
  display: block;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ash);
  font-weight: 700;
  margin-bottom: 5px;
}

/* ---------- Sections ---------- */
.section { margin-bottom: var(--sp-64); }
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sp-24);
  margin-bottom: var(--sp-28);
  padding-bottom: 14px;
  border-bottom: 1px solid var(--obsidian);
}
.section-head h2 { max-width: 22ch; }
.section-head p {
  font-size: 14px;
  color: var(--ash);
  max-width: 40ch;
  margin: 0;
}

/* ---------- Page cards ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-16);
}
.cards.three { grid-template-columns: repeat(3, 1fr); }
.card {
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border-radius: var(--r-card);
  padding: var(--sp-24);
  text-decoration: none;
  border: 1px solid transparent;
  transition: border-color .2s ease, transform .2s ease;
}
.card:hover { border-color: var(--obsidian); transform: translateY(-2px); }
.card .kicker {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--ash);
  margin-bottom: 10px;
}
.card h3 { font-size: 18px; line-height: 1.25; margin-bottom: 8px; }
.card p { font-size: 14px; line-height: 1.5; color: var(--ash); margin: 0; }
.card .go {
  margin-top: auto;
  padding-top: 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--cobalt);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.card:hover .go .arrow { transform: translateX(3px); }
.arrow { transition: transform .2s ease; display: inline-block; }

/* ---------- Article layout ---------- */
.article { padding: var(--sp-40) 0 var(--sp-80); }
.article-grid {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: var(--sp-64);
  align-items: start;
}
.toc {
  position: sticky;
  top: calc(var(--nav-h) + 28px);
  font-size: 13px;
  max-height: calc(100vh - var(--nav-h) - 56px);
  overflow: auto;
  padding-right: 8px;
}
.toc-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ash);
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--pebble);
}
.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.toc li { counter-increment: toc; margin: 0; }
.toc a {
  display: block;
  padding: 7px 10px 7px 0;
  color: var(--ash);
  text-decoration: none;
  line-height: 1.35;
  border-left: 2px solid transparent;
  padding-left: 10px;
  transition: color .16s ease, border-color .16s ease;
}
.toc a::before {
  content: counter(toc, decimal-leading-zero) "  ";
  font-variant-numeric: tabular-nums;
  color: var(--ash);
  font-size: 11px;
}
.toc a:hover { color: var(--obsidian); }
.toc a.current { color: var(--cobalt); border-left-color: var(--cobalt); font-weight: 500; }
.toc .toc-cta {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--pebble);
  font-size: 12px;
  color: var(--ash);
  line-height: 1.5;
}
.toc .toc-cta a { color: var(--cobalt); text-decoration: underline; display: inline; padding: 0; border: 0; }

.prose { max-width: var(--prose); }
.prose-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  font-size: 12px;
  color: var(--ash);
  margin-bottom: var(--sp-20);
  letter-spacing: .01em;
}
.prose-meta .sep { width: 3px; height: 3px; border-radius: 50%; background: var(--pebble); }
.prose-meta .reviewed { color: var(--obsidian); font-weight: 500; }
.prose h2 {
  margin: var(--sp-48) 0 var(--sp-16);
  scroll-margin-top: calc(var(--nav-h) + 24px);
}
.prose h3 { margin: var(--sp-32) 0 var(--sp-12); }
.prose p, .prose li { font-size: 17px; line-height: 1.68; }
.prose p { margin: 0 0 20px; }
.prose ul, .prose ol { margin: 0 0 22px; padding-left: 22px; }
.prose li { margin-bottom: 9px; }
.prose li::marker { color: var(--ash); }
.prose strong { font-weight: 700; }
.prose a {
  color: var(--obsidian);
  text-decoration: underline;
  text-decoration-color: var(--cobalt);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  transition: background .15s ease;
}
.prose a:hover { background: var(--lime); }
.prose hr { border: 0; border-top: 1px solid var(--pebble); margin: var(--sp-40) 0; }

.prose blockquote {
  margin: var(--sp-32) 0;
  padding: 0 0 0 24px;
  border-left: 3px solid var(--cobalt);
  font-size: 18px;
  line-height: 1.55;
  color: var(--graphite);
}
.prose blockquote p { font-size: inherit; }

/* Key takeaways */
.takeaways {
  background: var(--paper);
  border-radius: var(--r-card);
  padding: var(--sp-24);
  margin: var(--sp-28) 0 var(--sp-32);
}
.takeaways h2 {
  margin: 0 0 14px;
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ash);
  font-weight: 700;
}
.takeaways ul { margin: 0; padding-left: 20px; }
.takeaways li { font-size: 16px; line-height: 1.55; margin-bottom: 10px; }
.takeaways li:last-child { margin-bottom: 0; }

/* Ember bleeding band */
.warn-band {
  background: var(--ember);
  color: var(--obsidian);
  border-radius: var(--r-card);
  padding: var(--sp-20) var(--sp-24);
  margin: var(--sp-24) 0 var(--sp-32);
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 14px;
}
.warn-band svg { width: 26px; height: 26px; margin-top: 2px; }
.warn-band h2 {
  margin: 0 0 6px;
  font-size: 12px;
  letter-spacing: .13em;
  text-transform: uppercase;
  font-weight: 700;
}
.warn-band p, .warn-band .body {
  font-size: 15px;
  line-height: 1.5;
  margin: 0;
  color: var(--obsidian);
}
.warn-band a {
  color: var(--obsidian);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 2px;
  font-weight: 500;
  display: inline-block;
  margin-top: 8px;
  font-size: 14px;
}

/* Tables */
.table-wrap {
  margin: var(--sp-28) 0;
  overflow-x: auto;
  border-radius: var(--r-card);
  border: 1px solid var(--pebble);
  background: var(--paper);
  -webkit-overflow-scrolling: touch;
}
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--concrete);
  vertical-align: top;
  line-height: 1.45;
}
thead th {
  background: var(--paper);
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ash);
  font-weight: 700;
  border-bottom: 1px solid var(--obsidian);
  white-space: nowrap;
}
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fafaf8; }
td.num, th.num { font-variant-numeric: tabular-nums; }
.tbl-note { font-size: 12px; color: var(--ash); margin-top: 10px; line-height: 1.5; }

/* Callout / note */
.note {
  border: 1px solid var(--obsidian);
  border-radius: var(--r-card);
  padding: var(--sp-20);
  margin: var(--sp-28) 0;
  background: transparent;
}
.note h3 {
  font-size: 12px;
  letter-spacing: .13em;
  text-transform: uppercase;
  margin: 0 0 10px;
}
.note p { font-size: 15px; line-height: 1.55; margin: 0 0 10px; }
.note p:last-child { margin: 0; }

/* Sources */
.sources { margin-top: var(--sp-48); padding-top: var(--sp-28); border-top: 1px solid var(--obsidian); }
.sources h2 { font-size: 20px; margin-bottom: 16px; }
.sources ol { padding-left: 22px; margin: 0; }
.sources li {
  font-size: 13px;
  line-height: 1.55;
  color: var(--graphite);
  margin-bottom: 12px;
}
.sources li a { text-decoration-color: var(--cobalt); }
.sources li span.j { font-style: italic; }

/* FAQ */
.faq { margin: var(--sp-48) 0 0; }
.faq-item {
  border-bottom: 1px solid var(--pebble);
  padding: 0;
}
.faq-item:first-of-type { border-top: 1px solid var(--pebble); }
.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 40px 18px 0;
  font-size: 17px;
  font-weight: 500;
  position: relative;
  line-height: 1.4;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 8px; top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  font-weight: 400;
  color: var(--ash);
  transition: transform .2s ease;
}
.faq-item[open] summary::after { content: "\2013"; }
.faq-item .faq-a { padding: 0 0 20px; }
.faq-item .faq-a p { font-size: 16px; line-height: 1.6; color: var(--graphite); margin: 0 0 12px; }
.faq-item .faq-a p:last-child { margin: 0; }

/* Calculator */
.calc {
  background: var(--paper);
  border-radius: var(--r-card);
  padding: var(--sp-24);
  margin: var(--sp-32) 0;
  border: 1px solid var(--obsidian);
}
.calc h3 { margin: 0 0 6px; font-size: 18px; }
.calc .hint { font-size: 13px; color: var(--ash); margin: 0 0 20px; }
.calc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ash);
  margin-bottom: 7px;
}
.field input, .field select {
  width: 100%;
  height: 50px;
  border: 1.5px solid var(--pebble);
  border-radius: var(--r-pill);
  background: var(--paper);
  padding: 0 18px;
  font-family: var(--font);
  font-size: 16px;
  color: var(--obsidian);
  transition: border-color .16s ease;
  appearance: none;
}
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b6c6b' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 18px center;
  padding-right: 42px;
}
.field input:focus, .field select:focus {
  outline: none;
  border-color: var(--cobalt);
}
.field input::placeholder { color: var(--pebble); }

.calc-out {
  margin-top: 22px;
  border-top: 1px solid var(--pebble);
  padding-top: 20px;
}
.calc-empty { font-size: 14px; color: var(--ash); margin: 0; }
.calc-result { display: none; }
.calc-result.show { display: block; animation: fadeUp .35s ease both; }
.calc-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid var(--concrete);
}
.calc-row:last-child { border-bottom: 0; }
.calc-row .k { font-size: 13px; color: var(--ash); line-height: 1.35; }
.calc-row .v {
  font-size: 20px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  letter-spacing: -.01em;
}
.calc-row .v small { font-size: 12px; font-weight: 500; color: var(--ash); }
.calc-verdict {
  margin-top: 16px;
  border-radius: var(--r-tag);
  padding: 13px 16px;
  font-size: 14px;
  line-height: 1.5;
  background: var(--bone);
}
.calc-verdict.warn { background: #fff0eb; }
.calc-verdict.ok { background: var(--bone); }

/* Study filter */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0 16px;
}
.chip {
  border: 1.5px solid var(--pebble);
  background: transparent;
  border-radius: var(--r-pill);
  padding: 8px 16px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  color: var(--ash);
  transition: all .16s ease;
}
.chip:hover { border-color: var(--obsidian); color: var(--obsidian); }
.chip[aria-pressed="true"] {
  background: var(--obsidian);
  border-color: var(--obsidian);
  color: var(--paper);
}
.count-note { font-size: 12px; color: var(--ash); margin: 0 0 12px; }
.study-hidden { display: none !important; }

/* Legal pages */
.legal .prose p, .legal .prose li { font-size: 16px; }
.legal .prose h2 { margin-top: var(--sp-40); }

/* CTA band */
.cta-band {
  background: var(--obsidian);
  color: var(--paper);
  border-radius: var(--r-card);
  padding: var(--sp-40);
  margin: var(--sp-64) 0 0;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--sp-32);
  align-items: center;
}
.cta-band h2 { color: var(--paper); font-size: 28px; margin-bottom: 10px; }
.cta-band p { font-size: 15px; color: #b9b9b6; margin: 0; max-width: 46ch; }
.cta-band .btn-primary { background: var(--lime); color: var(--obsidian); }
.cta-band .btn-primary:hover { background: #d9ee00; }

/* Footer */
.site-foot {
  border-top: 4px solid var(--obsidian);
  margin-top: var(--sp-80);
  padding: var(--sp-48) 0 var(--sp-40);
  background: var(--bone);
}
.foot-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: var(--sp-32);
}
.foot-brand p {
  font-size: 13px;
  line-height: 1.55;
  color: var(--ash);
  max-width: 34ch;
  margin: 12px 0 0;
}
.foot-col h3 {
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ash);
  margin: 0 0 14px;
  font-weight: 700;
}
.foot-col ul { list-style: none; margin: 0; padding: 0; }
.foot-col li { margin-bottom: 9px; }
.foot-col a {
  font-size: 13px;
  text-decoration: none;
  color: var(--graphite);
  transition: color .16s ease;
}
.foot-col a:hover { color: var(--cobalt); text-decoration: underline; }
.foot-bottom {
  margin-top: var(--sp-40);
  padding-top: 20px;
  border-top: 1px solid var(--pebble);
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  justify-content: space-between;
  font-size: 11px;
  color: var(--ash);
  line-height: 1.5;
}
.foot-bottom p { margin: 0; max-width: 76ch; }

/* ---------- 404 ---------- */
.nf { padding: var(--sp-120) 0; text-align: left; }
.nf h1 { font-size: clamp(56px, 12vw, 120px); line-height: .95; letter-spacing: -.04em; }
.nf p { font-size: 18px; color: var(--ash); margin: 20px 0 32px; max-width: 46ch; }

/* ---------- Motion ---------- */
.reveal {
  opacity: 1;
  transform: none;
}
.js-motion .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .55s cubic-bezier(.2,.7,.2,1), transform .55s cubic-bezier(.2,.7,.2,1);
  will-change: opacity, transform;
}
.js-motion .reveal.in { opacity: 1; transform: none; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .reveal, .js-motion .reveal { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .article-grid { grid-template-columns: 200px minmax(0, 1fr); gap: var(--sp-32); }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .cards.three { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: var(--sp-32); }
  .hero-figure { order: -1; }
  .hero-figure img { aspect-ratio: 16 / 10; }
  .trust ul { grid-template-columns: 1fr 1fr; gap: 16px; }
  .article-grid { grid-template-columns: minmax(0, 1fr); gap: var(--sp-24); }
  .prose { min-width: 0; }
  .prose img, .fig img { max-width: 100%; height: auto; }
  .toc {
    position: static;
    max-height: none;
    border: 1px solid var(--pebble);
    border-radius: var(--r-card);
    padding: 16px;
    background: var(--paper);
    order: -1;
  }
  .nav { display: none; }
  .nav-toggle { display: flex; }
  .site-head.open .nav {
    display: flex;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--bone);
    border-bottom: 4px solid var(--obsidian);
    flex-direction: column;
    align-items: stretch;
    padding: 8px 16px 16px;
    gap: 2px;
  }
  .site-head.open .nav a { padding: 13px 12px; font-size: 15px; }
  .cards, .cards.three { grid-template-columns: 1fr; }
  .calc-grid { grid-template-columns: 1fr; }
  .cta-band { grid-template-columns: 1fr; padding: var(--sp-28); }
  .cta-band h2 { font-size: 24px; }
}

@media (max-width: 560px) {
  .wrap { padding: 0 18px; }
  .hero { padding: var(--sp-32) 0 var(--sp-24); }
  .prose p, .prose li { font-size: 16px; }
  .foot-grid { grid-template-columns: 1fr; gap: 24px; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 10px; }
  .warn-band { grid-template-columns: 1fr; gap: 10px; }
  .prose-meta { font-size: 11px; }
  .calc-row .v { font-size: 18px; }
  .foot-bottom { flex-direction: column; }
}

@media print {
  .site-head, .limebar, .toc, .site-foot, .progress, .cta-band { display: none !important; }
  body { background: #fff; }
  .article-grid { grid-template-columns: 1fr; }
  a { text-decoration: none; }
}

/* ---------- Editorial figures ---------- */
.fig { margin: var(--sp-40) 0; }
.fig img {
  width: 100%;
  height: auto;
  max-height: 620px;
  object-fit: cover;
  border-radius: var(--r-img);
  display: block;
}
.fig figcaption {
  font-size: 11px;
  line-height: 1.5;
  color: var(--ash);
  margin-top: 9px;
  letter-spacing: .02em;
  max-width: 64ch;
}
.fig figcaption a { color: var(--ash); text-decoration: underline; text-underline-offset: 2px; }
.fig-wide { margin-left: calc(-1 * var(--sp-24)); margin-right: calc(-1 * var(--sp-24)); }
@media (min-width: 900px) {
  .fig-wide { margin-left: -56px; margin-right: -56px; }
}
.fig-duo {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-20);
  margin: var(--sp-40) 0;
}
@media (min-width: 720px) { .fig-duo { grid-template-columns: 1fr 1fr; } }
.fig-duo figure { margin: 0; }
.fig-duo img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4/3; border-radius: var(--r-img); }
.fig-duo figcaption { font-size: 11px; color: var(--ash); margin-top: 8px; line-height: 1.5; }

/* Credits table */
.credits-list { list-style: none; padding: 0; margin: var(--sp-24) 0; }
.credits-list li {
  font-size: 13px;
  line-height: 1.6;
  padding: 11px 0;
  border-bottom: 1px solid var(--mist);
  color: var(--graphite);
}
.credits-list li:first-child { border-top: 1px solid var(--mist); }
.credits-list strong { font-weight: 600; }
