/* ---------- Tokens ---------- */
:root {
  --bg: #0B0D10;
  --surface: #12151B;
  --text: #E7E9ED;
  --text-2: #B4BAC4;
  --muted: #8F97A3;
  --hair: rgba(255,255,255,.14);
  --hair-strong: rgba(255,255,255,.42);
  --amber: #E0AC45;
  --red: #F0665B;
  --focus: #8AB4F8;
  --strip-bg: rgba(240,102,91,.07);
  --measure: 680px;
  --gutter: 16px;
  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #F7F7F4;
    --surface: #FFFFFF;
    --text: #15181D;
    --text-2: #3C434D;
    --muted: #5F6773;
    --hair: rgba(0,0,0,.12);
    --hair-strong: rgba(0,0,0,.5);
    --amber: #865C00;
    --red: #B3261E;
    --focus: #1A5FD0;
    --strip-bg: rgba(179,38,30,.05);
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #F7F7F4;
  --surface: #FFFFFF;
  --text: #15181D;
  --text-2: #3C434D;
  --muted: #5F6773;
  --hair: rgba(0,0,0,.12);
  --hair-strong: rgba(0,0,0,.5);
  --amber: #865C00;
  --red: #B3261E;
  --focus: #1A5FD0;
  --strip-bg: rgba(179,38,30,.05);
  color-scheme: light;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  font-feature-settings: "cv11", "ss01";
  overflow-wrap: anywhere;
  transition: background-color .25s ease, color .25s ease;
}
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
a { color: inherit; text-decoration: underline; text-decoration-color: var(--hair-strong); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: currentColor; }
p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }
ol, ul { margin: 0; padding: 0; }

.wrap { max-width: var(--measure); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }

.skip {
  position: absolute; left: var(--gutter); top: -100px;
  background: var(--text); color: var(--bg); padding: 8px 12px; font-size: 14px; z-index: 10;
  text-decoration: none;
}
.skip:focus { top: 12px; }

/* ---------- Type ---------- */
h1, h2, h3 { font-family: var(--serif); font-weight: 400; margin: 0; letter-spacing: -.005em; font-feature-settings: normal; }
h1 { font-size: clamp(2rem, 6vw, 3.25rem); line-height: 1.08; }
h2 { font-size: 1.5rem; line-height: 1.25; }
h3 { font-size: 1.25rem; line-height: 1.3; }
.label {
  font-family: var(--mono); font-size: 12px; line-height: 1.4;
  text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 400;
}
.lead { font-size: 1.125rem; color: var(--text-2); max-width: 36em; }
.wordmark {
  font-family: var(--serif); font-variant-caps: small-caps; letter-spacing: .14em;
  font-size: 1.05rem; font-weight: 500; text-decoration: none; color: var(--text);
}
.wordmark:hover { text-decoration: none; }

/* ---------- Header ---------- */
.site-header { border-bottom: 1px solid var(--hair); }
.site-header .row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 18px; padding-bottom: 18px; }
.tagline { font-size: 14px; color: var(--text-2); margin: -4px 0 2px; }
.promise { font-size: 14px; color: var(--muted); padding-bottom: 18px; margin-top: 0; }
.toggle {
  appearance: none; -webkit-appearance: none;
  background: transparent; color: var(--text); border: 1px solid var(--hair);
  font: inherit; font-size: 14px; line-height: 1; padding: 9px 14px; border-radius: 999px; cursor: pointer;
  white-space: nowrap;
}
.toggle:hover { border-color: var(--hair-strong); }

/* ---------- Hero ---------- */
.hero { padding-top: 72px; padding-bottom: 56px; }
.hero h1 { margin-bottom: 20px; }
.hero .lead { margin-bottom: 40px; }
.emergency { border: 1px solid var(--red); background: var(--strip-bg); padding: 18px 20px; }
.emergency p { font-size: 1.0625rem; line-height: 1.5; }
.emergency strong { font-weight: 600; }
.emergency a { text-decoration-color: var(--red); font-weight: 600; white-space: nowrap; }

/* ---------- Claim ---------- */
.rule::before { content: ""; display: block; height: 1px; background: var(--hair); margin-bottom: 56px; }
.claim { padding-bottom: 24px; }
.claim-head { margin-bottom: 48px; }
.claim-head .label { margin-bottom: 14px; display: block; }
.claim-head h1, .claim-head h2 { font-size: clamp(1.625rem, 4.4vw, 2.125rem); }

.part { padding: 40px 0; border-top: 1px solid var(--hair); }
.part > .label { display: block; margin-bottom: 20px; }
.part h2, .part h3 { font-size: 1.25rem; line-height: 1.3; margin-bottom: 20px; }
.part h3 + .label { margin-top: -14px; }

blockquote {
  margin: 0 0 20px; padding: 0 0 0 20px; border-left: 1px solid var(--hair-strong);
  font-family: var(--serif); font-size: 1.25rem; line-height: 1.5; color: var(--text);
}
blockquote p { margin: 0; }
.attrib { font-size: 15px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: baseline; }

/* chips */
.chip {
  display: inline-block; font-family: var(--mono); font-size: 12px; line-height: 1;
  letter-spacing: .12em; text-transform: uppercase; padding: 7px 10px 6px; border-radius: 3px;
  border: 1px solid var(--hair); color: var(--text-2); vertical-align: middle; white-space: nowrap;
}
.chip-established { border-color: var(--hair-strong); color: var(--text); }
.chip-supported { border-color: var(--hair); color: var(--text-2); }
.chip-exaggerated { border-color: var(--amber); color: var(--amber); }
.chip-unsupported { border-style: dashed; color: var(--muted); }
.chip-dangerous { border-color: var(--red); color: var(--red); }

/* verdict */
.verdict { display: grid; gap: 28px; }
.verdict-item { display: grid; gap: 14px; }
.verdict-item .chip { justify-self: start; }
.verdict-main p { font-family: var(--serif); font-size: clamp(1.375rem, 3.6vw, 1.75rem); line-height: 1.35; }
.verdict-sub p { color: var(--text-2); }
.verdict-sub .on { display: block; font-size: 15px; color: var(--muted); margin-bottom: 4px; }

/* evidence */
.evidence { display: grid; gap: 28px; }
.ev { display: grid; gap: 10px; }
.ev .chip { justify-self: start; }
.src { font-family: var(--mono); font-size: 12px; letter-spacing: .04em; color: var(--muted); text-decoration: none; margin-left: 2px; }
.src:hover { color: var(--text); }
.note {
  border-left: 1px solid var(--hair-strong); padding: 2px 0 2px 20px; color: var(--muted); margin-top: 8px;
}
.note .label { display: block; margin-bottom: 8px; }

/* actions */
.actions { list-style: none; counter-reset: step; display: grid; gap: 18px; }
.actions li { display: grid; grid-template-columns: 2.25rem 1fr; gap: 4px; align-items: baseline; }
.actions li::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  font-family: var(--mono); font-size: 12px; letter-spacing: .12em; color: var(--muted); line-height: 1.6;
}
.actions li.first { border: 1px solid var(--red); background: var(--strip-bg); padding: 16px 18px 16px 14px; }
.actions li.first::before { color: var(--red); }
.actions li.first strong { font-weight: 600; }
.actions a[href^="tel"] { font-weight: 600; white-space: nowrap; }

/* share card */
.card-wrap { display: grid; gap: 20px; grid-template-columns: minmax(0, 340px); }
.share-card { width: 100%; height: auto; display: block; border: 1px solid var(--hair); border-radius: 4px; }
.copy-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.btn {
  appearance: none; -webkit-appearance: none;
  background: var(--text); color: var(--bg); border: 1px solid var(--text);
  font: inherit; font-size: 15px; font-weight: 500; line-height: 1; padding: 12px 18px; border-radius: 999px; cursor: pointer;
}
.btn:hover { opacity: .92; }
.copy-status { font-size: 14px; color: var(--muted); min-height: 1.4em; }

/* sources */
.sources { list-style: none; display: grid; gap: 18px; font-size: 15px; color: var(--text-2); }
.sources li { display: grid; grid-template-columns: 2.75rem 1fr; gap: 4px; }
.sources .sid { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; color: var(--muted); padding-top: 4px; }
.sources .tier { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; color: var(--muted); }
.sources .meta { color: var(--muted); }
.sources a { word-break: break-all; }
.sources .cite { display: block; margin-bottom: 4px; color: var(--text); }

/* review + corrections */
.corrections { color: var(--text-2); }
.tier-rule { margin-top: 20px; }
.pending { border: 1px solid var(--hair); padding: 20px; color: var(--text-2); }
.pending .label { display: block; margin-bottom: 10px; }

/* how */
.how { padding-bottom: 56px; }
.how h2 { margin-bottom: 28px; }
.how h3 { font-family: var(--sans); font-size: 15px; font-weight: 600; margin: 32px 0 14px; }
.how p { color: var(--text-2); }
table { width: 100%; border-collapse: collapse; font-size: 15px; color: var(--text-2); }
th, td { text-align: left; vertical-align: top; padding: 12px 0; border-top: 1px solid var(--hair); }
tr:last-child td { border-bottom: 1px solid var(--hair); }
th { font-weight: 500; color: var(--text); width: 9.5rem; padding-right: 16px; }
.tiers th { width: 2.25rem; font-family: var(--mono); font-size: 12px; letter-spacing: .1em; color: var(--muted); font-weight: 400; padding-top: 15px; }

/* footer */
.site-footer { border-top: 1px solid var(--hair); padding: 40px 0 56px; font-size: 14px; color: var(--muted); }
.site-footer p { max-width: 42em; }
.site-footer .wordmark { font-size: .95rem; display: inline-block; margin-bottom: 18px; color: var(--text-2); }

@media (max-width: 420px) {
  .site-header .row { flex-wrap: wrap; }
  .hero { padding-top: 56px; }
  .attrib { display: block; }
  .attrib .chip { margin-top: 10px; }
}

/* ---------- Additions for the multi-page build (same tokens and sizes) ---------- */
/* crumb + pager */
.crumb { padding-top: 24px; font-size: 14px; color: var(--muted); }
.emergency-short { margin-top: 20px; }
.claim-page { padding-top: 48px; }
.pager { border-top: 1px solid var(--hair); padding-top: 32px; padding-bottom: 56px; display: grid; grid-template-columns: 1fr 1fr; gap: 24px; font-size: 15px; }
.pager a { display: grid; gap: 6px; text-decoration: none; color: var(--text-2); }
.pager a:hover span:last-child { text-decoration: underline; text-decoration-color: var(--hair-strong); text-underline-offset: .18em; }
.pager-next { text-align: right; justify-self: end; }

/* hub grid */
.forwards { padding-bottom: 56px; }
.forwards h2 { margin-bottom: 28px; }
.grid { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.card { display: grid; gap: 12px; align-content: start; height: 100%; border: 1px solid var(--hair); padding: 20px; text-decoration: none; color: var(--text); }
.card:hover { border-color: var(--hair-strong); text-decoration: none; }
.card .chip { justify-self: start; }
.card p { font-size: 15px; color: var(--text-2); }
.draft-note { font-size: 14px; color: var(--muted); margin-top: 20px; }

/* safety note (giloy) */
.safety { border: 1px solid var(--amber); padding: 18px 20px; color: var(--text); }
.safety .label { display: block; margin-bottom: 10px; color: var(--amber); }
.safety-title { font-family: var(--serif); font-size: 1.25rem; line-height: 1.3; margin-bottom: 12px; }
.safety p { color: var(--text-2); }
.safety p.safety-title { color: var(--text); }

/* about / privacy */
.page { padding-top: 48px; padding-bottom: 56px; }
.page .claim-head { margin-bottom: 32px; }
.page .lead { margin-bottom: 8px; }
.sources-note { font-size: 14px; color: var(--muted); }

/* footer nav */
.footer-nav { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 18px; }

@media (max-width: 420px) {
  .pager { grid-template-columns: 1fr; }
  .pager-next { text-align: left; justify-self: start; }
}

/* ---------- Illustrations (art.js): plates, hero, card marks ---------- */
/* --art is the muted line colour, derived from --muted and --bg; --art-acc is the one accent
   per drawing, set from the verdict. Strokes stay 1.4px (1.25px on marks) at any size. */
:root { --art: var(--muted); }
@supports (color: color-mix(in srgb, red 50%, blue)) {
  :root { --art: color-mix(in srgb, var(--muted) 72%, var(--bg)); }
}
.art { display: block; width: 100%; height: auto; color: var(--art); stroke-width: 1.4px; --art-acc: var(--text-2); }
.art * { vector-effect: non-scaling-stroke; }
.art-v-exaggerated { --art-acc: var(--amber); }
.art-v-dangerous { --art-acc: var(--red); }
.art-v-unsupported { --art-acc: var(--text-2); }
.art-v-hub { --art-acc: var(--text-2); }
.art .acc { color: var(--art-acc); }
.art .grid { stroke: var(--hair); stroke-width: 1px; }
.art .tint { fill: currentColor; fill-opacity: .06; stroke: none; }
.art .dot { fill: currentColor; stroke: none; }
.art .dots { vector-effect: none; stroke-width: 2.2; stroke-dasharray: 0 9; }
.art text { fill: currentColor; stroke: none; font-family: var(--mono); font-size: 13px; text-anchor: middle; }
.art .glow { stroke: none; }
.art .glow-in { stop-color: var(--art-acc); stop-opacity: .10; }
.art .glow-out { stop-color: var(--art-acc); stop-opacity: 0; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .art .glow-in { stop-opacity: .06; } }
:root[data-theme="light"] .art .glow-in { stop-opacity: .06; }

.plate { margin: 0; border: 1px solid var(--hair); background: var(--bg); }
.plate-hero { margin: 0 0 40px; }
.plate-claim { margin: -20px 0 48px; }
.card .mark { width: 56px; height: 56px; stroke-width: 1.25px; margin-bottom: 4px; }
.card .mark .dots { stroke-width: 2; stroke-dasharray: 0 5; }

/* One slow reveal of a claim plate on load; off under reduced motion (see Base). */
@media (prefers-reduced-motion: no-preference) {
  .plate-claim .art { animation: art-draw 1.2s cubic-bezier(.4, 0, .2, 1) .1s both; }
}
@keyframes art-draw { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
