/* Beyond the Label: design tokens from docs/reviews/review-design.md §3 */

:root {
  color-scheme: light;
  --paper: #F5F6F3;
  --surface: #FFFFFF;
  --sunk: #E9ECE7;
  --ink: #18202B;
  --muted: #4B5563;
  --rule: #667080;
  --rule-soft: #C9CEC6;
  --accent: #1F4E8C;
  --on-accent: #FFFFFF;
  --observed: #1D5B57;
  --observed-wash: #E3F0EE;
  --assumed: #8A4A00;
  --assumed-wash: #F7ECDD;
  --unknown: #5A4A8A;
  --unknown-wash: #ECE8F5;
  --focus: #0B5FFF;

  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;
  --math: "STIX Two Text", "Cambria Math", "Noto Sans Math", "STIX Two Math", serif;

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 72px;
  --measure: 38rem;
  --gutter: 16px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #11151B; --surface: #1A2029; --sunk: #0C0F13;
    --ink: #E8EBF0; --muted: #AAB3C0; --rule: #6B7686; --rule-soft: #2A313C;
    --accent: #9DBDF2; --on-accent: #11151B;
    --observed: #7FCFC6; --observed-wash: #14262A;
    --assumed: #F0B36A; --assumed-wash: #2A2216;
    --unknown: #B9A8EE; --unknown-wash: #1F1B30;
    --focus: #FFD27A;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #11151B; --surface: #1A2029; --sunk: #0C0F13;
  --ink: #E8EBF0; --muted: #AAB3C0; --rule: #6B7686; --rule-soft: #2A313C;
  --accent: #9DBDF2; --on-accent: #11151B;
  --observed: #7FCFC6; --observed-wash: #14262A;
  --assumed: #F0B36A; --assumed-wash: #2A2216;
  --unknown: #B9A8EE; --unknown-wash: #1F1B30;
  --focus: #FFD27A;
}

@media (prefers-contrast: more) {
  :root { --rule: var(--ink); }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.6;
  font-optical-sizing: auto;
}
@media (min-width: 480px) { :root { --gutter: 20px; } }

h1, h2, h3 { line-height: 1.2; margin: 0 0 var(--s4); }
h1 { font-size: clamp(1.75rem, 4.5vw, 2.5rem); font-weight: 600; text-wrap: balance; }
h2 { font-size: 1.5rem; font-weight: 600; margin-top: var(--s7); }
h3 { font-family: var(--sans); font-size: 1.125rem; font-weight: 700; margin-top: var(--s6); }
p { margin: 0 0 var(--s4); }
ul, ol { padding-left: 1.4em; margin: 0 0 var(--s4); }
li { margin-bottom: var(--s2); }
a { color: var(--accent); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
em { font-style: italic; }
strong { font-weight: 600; }
hr { border: 0; border-top: 1px solid var(--rule-soft); margin: var(--s6) 0; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
[tabindex="-1"]:focus { outline: none; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: var(--s4); top: -100px; z-index: 100;
  background: var(--surface); color: var(--ink); padding: var(--s3) var(--s4);
  font-family: var(--sans); border: 2px solid var(--ink);
}
.skip-link:focus { top: var(--s4); }

/* ---------- Header / footer ---------- */
.site-header {
  border-bottom: 1px solid var(--rule-soft);
  background: var(--paper);
}
.site-header .inner {
  max-width: 72rem; margin: 0 auto; padding: var(--s3) var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: var(--s4);
  font-family: var(--sans); font-size: 1rem;
}
.wordmark {
  font-family: var(--serif); font-weight: 600; font-size: 1.25rem;
  color: var(--ink); text-decoration: none; letter-spacing: -0.005em;
}
.nav-list { display: flex; gap: var(--s5); list-style: none; margin: 0; padding: 0; align-items: center; }
.nav-list li { margin: 0; }
.nav-list a { color: var(--ink); text-decoration: none; padding: var(--s2) 0; display: inline-block; }
.nav-list a:hover, .nav-list a[aria-current="page"] { text-decoration: underline; text-underline-offset: 0.3em; }
.nav-list .break-link { color: var(--muted); }
.menu { display: none; position: relative; }
.menu summary {
  list-style: none; cursor: pointer; padding: var(--s2) var(--s3);
  border: 1px solid var(--rule); border-radius: 2px; min-height: 44px; display: flex; align-items: center;
}
.menu summary::-webkit-details-marker { display: none; }
.menu ul {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; list-style: none; margin: 0;
  padding: var(--s2) 0; background: var(--surface); border: 1px solid var(--rule); min-width: 13rem;
}
.menu li { margin: 0; }
.menu a { display: block; padding: var(--s3) var(--s4); color: var(--ink); text-decoration: none; }
.menu a:hover { background: var(--sunk); }
@media (max-width: 760px) {
  .nav-list { display: none; }
  .menu { display: block; }
}

.site-footer {
  margin-top: var(--s8); border-top: 1px solid var(--rule-soft);
  font-family: var(--sans); font-size: 0.9375rem; color: var(--muted);
}
.site-footer .inner {
  max-width: 72rem; margin: 0 auto; padding: var(--s6) var(--gutter);
  display: grid; gap: var(--s5);
}
@media (min-width: 720px) { .site-footer .inner { grid-template-columns: 2fr 1fr; } }
.site-footer p { margin-bottom: var(--s2); }
.site-footer a { color: var(--muted); }
.footer-controls { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: center; }
.theme-switch { display: inline-flex; border: 1px solid var(--rule); border-radius: 2px; }
.theme-switch button {
  font: inherit; font-size: 0.875rem; background: none; color: var(--ink); border: 0;
  padding: var(--s2) var(--s3); min-height: 40px; cursor: pointer;
}
.theme-switch button + button { border-left: 1px solid var(--rule); }
.theme-switch button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

/* ---------- Layout ---------- */
main { display: block; }
.page { max-width: 72rem; margin: 0 auto; padding: var(--s7) var(--gutter) 0; }
.reading { max-width: var(--measure); }
.lede { font-size: 1.25rem; line-height: 1.5; color: var(--ink); }
.meta { font-family: var(--sans); font-size: 0.875rem; color: var(--muted); }
.eyebrow { font-family: var(--sans); font-size: 0.9375rem; font-weight: 600; color: var(--muted); margin-bottom: var(--s3); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  font-family: var(--sans); font-size: 1rem; font-weight: 600; line-height: 1.2;
  min-height: 48px; padding: var(--s3) var(--s5); border-radius: 2px; cursor: pointer;
  text-decoration: none; border: 2px solid var(--accent);
}
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-secondary { background: transparent; color: var(--accent); }
.btn-secondary:hover { background: var(--surface); }
.btn-quiet { border-color: var(--rule); color: var(--ink); background: transparent; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--s3); margin: var(--s6) 0 var(--s4); }

/* ---------- Home ---------- */
.hero { padding-top: var(--s5); }
.hero h1 { font-size: clamp(2.5rem, 8vw, 4.5rem); line-height: 1.02; letter-spacing: -0.015em; margin-bottom: var(--s5); }
.hero .subtitle { font-size: clamp(1.25rem, 2.6vw, 1.5rem); line-height: 1.4; max-width: 34rem; margin-bottom: var(--s6); }
.specimen-hero {
  margin: var(--s6) 0 var(--s7); padding: var(--s5) 0; border-top: 1px solid var(--rule-soft);
  border-bottom: 1px solid var(--rule-soft); max-width: 46rem;
}
.specimen-hero blockquote {
  margin: 0; font-size: clamp(1.6rem, 5vw, 2.6rem); line-height: 1.2; font-weight: 500;
}
.specimen-hero figcaption { margin-top: var(--s3); font-family: var(--sans); font-size: 0.9375rem; color: var(--muted); }
.so {
  text-decoration: underline dashed var(--assumed); text-decoration-thickness: 3px;
  text-underline-offset: 0.16em;
}
.hero-note { margin-top: var(--s5); }

/* ---------- Provenance chip ---------- */
.chip {
  display: inline-flex; align-items: center; gap: var(--s2);
  font-family: var(--sans); font-size: 0.875rem; font-weight: 600; color: var(--muted);
  border: 1px solid var(--rule); border-radius: 2px; padding: var(--s1) var(--s3); margin-bottom: var(--s4);
}
.chip svg { flex: none; }

/* ---------- Case index ---------- */
.case-list { list-style: none; padding: 0; margin: var(--s6) 0 0; border-top: 1px solid var(--rule); max-width: 52rem; }
.case-list li { margin: 0; border-bottom: 1px solid var(--rule); }
.case-row {
  display: grid; gap: var(--s2); padding: var(--s5) 0; color: var(--ink); text-decoration: none; min-height: 48px;
}
@media (min-width: 720px) { .case-row { grid-template-columns: 1fr 12rem; align-items: baseline; gap: var(--s5); } }
a.case-row:hover .case-title { text-decoration: underline; text-underline-offset: 0.2em; }
.case-title { font-size: 1.25rem; font-weight: 600; }
.case-claim { font-style: italic; }
.case-focus { font-family: var(--sans); font-size: 0.9375rem; color: var(--muted); }
.case-status { font-family: var(--sans); font-size: 0.9375rem; color: var(--muted); display: flex; gap: var(--s2); align-items: center; }
.case-row.is-draft { color: var(--muted); }

/* ---------- Case layout ---------- */
.case-shell { max-width: 72rem; margin: 0 auto; padding: 0 var(--gutter); }
.case-top {
  position: sticky; top: 0; z-index: 10; background: var(--paper);
  border-bottom: 1px solid var(--rule-soft); margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter);
}
.case-top .bar {
  display: flex; justify-content: space-between; gap: var(--s3); align-items: baseline;
  padding-top: var(--s3); font-family: var(--sans); font-size: 0.9375rem;
}
.case-top .case-name { font-weight: 700; }
.ticks { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin: var(--s2) 0; }
.ticks span { height: 4px; background: transparent; border: 1px solid var(--rule); }
.ticks span.done { background: var(--rule); }
.ticks span.current { background: var(--accent); border-color: var(--accent); height: 6px; margin-top: -1px; }
.specimen {
  padding: var(--s2) 0 var(--s3); font-size: 1.125rem; line-height: 1.4;
}
.specimen summary { cursor: pointer; list-style: none; font-family: var(--sans); font-size: 0.875rem; color: var(--muted); }
.specimen summary::-webkit-details-marker { display: none; }
.specimen .sentence { font-weight: 500; }
.specimen .tag { font-family: var(--sans); font-size: 0.8125rem; color: var(--muted); margin-left: var(--s2); white-space: nowrap; }

.case-body { display: grid; gap: var(--s6); padding-top: var(--s6); }
@media (min-width: 1100px) {
  .case-body { grid-template-columns: 11rem minmax(0, var(--measure)) 16rem; gap: var(--s7); }
  .ticks { display: none; }
}
.rail { display: none; }
@media (min-width: 1100px) {
  .rail { display: block; font-family: var(--sans); font-size: 0.9375rem; }
  .rail ol { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--rule-soft); position: sticky; top: 150px; }
  .rail li { margin: 0; position: relative; }
  .rail a, .rail span.upcoming {
    display: flex; gap: var(--s2); align-items: center; padding: var(--s2) 0 var(--s2) var(--s4);
    color: var(--muted); text-decoration: none; min-height: 40px;
  }
  .rail a:hover { color: var(--ink); text-decoration: underline; }
  .rail [aria-current="step"] { color: var(--ink); font-weight: 700; }
  .rail [aria-current="step"]::before {
    content: ""; position: absolute; left: -3px; top: 6px; bottom: 6px; width: 4px; background: var(--accent);
  }
  .rail .num { font-variant-numeric: tabular-nums; width: 1.2em; }
}
.margin { font-family: var(--sans); font-size: 0.9375rem; line-height: 1.5; color: var(--muted); }
.margin > * + * { margin-top: var(--s5); }
.margin h2 { font-family: var(--sans); font-size: 1rem; font-weight: 700; color: var(--ink); margin: 0 0 var(--s2); }
@media (max-width: 1099px) {
  .margin { border-left: 2px solid var(--rule-soft); padding-left: var(--s4); }
}

.stage h1 { margin-bottom: var(--s5); }
.stage-kicker { font-family: var(--sans); font-size: 0.9375rem; font-weight: 600; color: var(--muted); margin-bottom: var(--s2); }
.stage-nav { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s3); margin-top: var(--s7); padding-top: var(--s5); border-top: 1px solid var(--rule-soft); }
.saved-note { font-family: var(--sans); font-size: 0.8125rem; color: var(--muted); margin-top: var(--s3); }

/* ---------- Panels ---------- */
.panel {
  background: var(--surface); border: 1px solid var(--rule); border-radius: 2px;
  padding: var(--s5); margin: var(--s5) 0;
}
.panel > :last-child { margin-bottom: 0; }
.panel-title { font-family: var(--sans); font-weight: 700; font-size: 1rem; margin: 0 0 var(--s2); }
.key-idea { border-left: 4px solid var(--accent); padding: var(--s1) 0 var(--s1) var(--s4); margin: var(--s5) 0; font-size: 1.1875rem; }
.scenario-text { font-size: 1.25rem; line-height: 1.55; }
.claim-display { font-size: clamp(1.5rem, 4.5vw, 2.1rem); line-height: 1.25; font-weight: 500; margin: var(--s4) 0 var(--s5); }
.claim-label { font-family: var(--sans); font-size: 0.875rem; font-weight: 600; color: var(--muted); }

/* ---------- Form controls ---------- */
fieldset { border: 0; padding: 0; margin: 0 0 var(--s5); min-width: 0; }
legend { font-family: var(--sans); font-weight: 700; font-size: 1rem; margin-bottom: var(--s3); padding: 0; }
.scale { display: flex; flex-wrap: wrap; gap: var(--s2); }
.choice {
  position: relative; display: flex; align-items: center; gap: var(--s2);
  font-family: var(--sans); font-size: 1rem; cursor: pointer;
  border: 1px solid var(--rule); border-radius: 2px; background: var(--surface);
  padding: var(--s3) var(--s4); min-height: 48px;
}
.choice input { width: 1.1rem; height: 1.1rem; margin: 0; accent-color: var(--accent); flex: none; }
.choice:has(input:checked) { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.choice:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.choice-stack { display: grid; gap: var(--s2); }
.choice-stack .choice { align-items: flex-start; }
.choice-stack .choice input { margin-top: 0.2rem; }
.choice-text { font-family: var(--serif); font-size: 1.0625rem; line-height: 1.45; }
.scale-ends { display: flex; justify-content: space-between; font-family: var(--sans); font-size: 0.8125rem; color: var(--muted); margin-top: var(--s2); max-width: 30rem; }
textarea {
  width: 100%; min-height: 8rem; font: inherit; font-size: 1.0625rem; line-height: 1.5; color: var(--ink);
  background: var(--surface); border: 1px solid var(--rule); border-radius: 2px; padding: var(--s3);
}
.field-note { font-family: var(--sans); font-size: 0.875rem; color: var(--muted); margin-top: var(--s2); }

/* ---------- Sorting: stated / assumed / not told ---------- */
.sort-list { list-style: none; padding: 0; margin: 0; counter-reset: sort; }
.sort-item { border-top: 1px solid var(--rule-soft); padding: var(--s5) 0; margin: 0; }
.sort-item:last-child { border-bottom: 1px solid var(--rule-soft); }
.sort-statement { font-size: 1.125rem; margin-bottom: var(--s3); }
.sort-options { display: flex; flex-wrap: wrap; gap: var(--s2); }
.sort-options .choice { padding: var(--s2) var(--s3); min-height: 44px; font-size: 0.9375rem; }
.reading-note {
  margin-top: var(--s3); padding: var(--s3) var(--s4); font-size: 1rem; line-height: 1.5;
  border-left: 2px solid var(--rule); background: var(--surface);
}
.reading-note .cat-label { margin-right: var(--s2); }

.cat { font-family: var(--sans); font-weight: 700; font-size: 0.875rem; display: inline-flex; align-items: center; gap: 6px; }
.cat-stated { color: var(--observed); }
.cat-assumed { color: var(--assumed); }
.cat-unknown { color: var(--unknown); }
.reading-note.is-stated { border-left: 2px solid var(--observed); background: var(--observed-wash); }
.reading-note.is-assumed { border-left: 2px dashed var(--assumed); background: var(--assumed-wash); }
.reading-note.is-unknown { border-left: 2px dotted var(--unknown); background: var(--unknown-wash); }
.legend-row { display: flex; flex-wrap: wrap; gap: var(--s4) var(--s5); margin: var(--s4) 0 var(--s5); }

/* ---------- Proof sheet ---------- */
.proof { list-style: none; padding: 0; margin: var(--s5) 0; font-size: 1.125rem; }
.proof li { display: grid; grid-template-columns: 3rem 1fr; gap: var(--s3); padding: var(--s3) 0; margin: 0; align-items: baseline; }
.proof .lbl { font-family: var(--sans); font-size: 0.875rem; font-weight: 700; color: var(--muted); }
.proof .unstated {
  border-left: 2px dashed var(--assumed); background: var(--assumed-wash); padding-left: var(--s3); padding-right: var(--s3);
  margin-left: -2px;
}
.proof .unstated .lbl { color: var(--assumed); }
.proof .slot-empty { font-family: var(--sans); font-size: 0.9375rem; color: var(--assumed); font-style: normal; }
.proof .conclusion { border-top: 2px solid var(--ink); margin-top: var(--s2); padding-top: var(--s4); font-weight: 500; }
.proof .tag { font-family: var(--sans); font-size: 0.8125rem; color: var(--muted); display: block; }

.feedback-list { list-style: none; padding: 0; margin: var(--s4) 0; }
.feedback-list li { padding: var(--s3) var(--s4); border-left: 2px solid var(--rule-soft); margin-bottom: var(--s3); }
.feedback-list li.is-key { border-left: 4px solid var(--accent); background: var(--surface); }
.feedback-list .opt { font-weight: 500; display: block; margin-bottom: var(--s1); }
.feedback-list .you { font-family: var(--sans); font-size: 0.8125rem; font-weight: 700; color: var(--muted); margin-left: var(--s2); }

/* ---------- Formulas ---------- */
.formula-well { background: var(--sunk); border: 1px solid var(--rule); border-radius: 2px; padding: var(--s4); margin: var(--s4) 0; }
.formula { font-family: var(--math); font-size: 1.375rem; line-height: 1.7; margin: 0; overflow-wrap: anywhere; }
.formula var { font-style: italic; }
.formula .op { padding: 0 0.25em; }
.formula-reading { font-style: italic; color: var(--muted); font-size: 1rem; margin: 0 0 var(--s3); }
.formula-reading:last-child { margin-bottom: 0; }
.symbol-key { font-family: var(--sans); font-size: 0.9375rem; margin: 0 0 var(--s3); }

/* ---------- Disclosures ---------- */
details.more { border-top: 1px solid var(--rule-soft); border-bottom: 1px solid var(--rule-soft); margin: var(--s5) 0; }
details.more + details.more { border-top: 0; margin-top: calc(-1 * var(--s5)); }
details.more > summary {
  cursor: pointer; font-family: var(--sans); font-weight: 600; font-size: 1rem; padding: var(--s4) 0; min-height: 48px;
  list-style: none; display: flex; justify-content: space-between; gap: var(--s3); align-items: center;
}
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::after { content: "+"; font-size: 1.25rem; color: var(--muted); }
details.more[open] > summary::after { content: "–"; }
details.more > .more-body { padding-bottom: var(--s4); }

/* ---------- Beyond truth values notice ---------- */
.beyond {
  position: relative; background: var(--surface); border: 1px solid var(--rule); padding: var(--s4) var(--s4) var(--s4) var(--s4);
  margin: var(--s5) 0; font-family: var(--sans); font-size: 0.9375rem; line-height: 1.5; color: var(--ink);
}
.beyond::before { content: ""; position: absolute; inset: 3px; border: 1px solid var(--rule-soft); pointer-events: none; }
.beyond .beyond-head { display: flex; align-items: center; gap: var(--s2); font-weight: 700; margin-bottom: var(--s2); }
.beyond p { margin-bottom: var(--s2); }
.beyond .not-false { font-weight: 700; margin-bottom: 0; }

/* ---------- Truth table ---------- */
table { border-collapse: collapse; font-family: var(--sans); font-size: 0.9375rem; margin: var(--s4) 0; }
caption { text-align: left; font-weight: 700; margin-bottom: var(--s2); }
th, td { border: 1px solid var(--rule); padding: var(--s2) var(--s3); text-align: center; }
th { background: var(--sunk); }
td.q { font-weight: 700; color: var(--unknown); }

/* ---------- Evidence cards ---------- */
.cards { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s2); }
.cards li { margin: 0; }
.cards .choice { width: 100%; }
.card-why { font-family: var(--serif); font-size: 1rem; margin-top: var(--s2); color: var(--ink); }
.card-why .cat { margin-right: var(--s2); }

/* ---------- Fuller picture ---------- */
.mechanisms { list-style: none; padding: 0; margin: var(--s4) 0; }
.mechanisms li { padding: var(--s4) 0; border-top: 1px solid var(--rule-soft); margin: 0; }
.mechanisms .m-name { font-family: var(--sans); font-weight: 700; font-size: 1rem; display: block; }
.mechanisms .m-system { font-family: var(--sans); font-size: 0.875rem; color: var(--muted); display: block; margin-bottom: var(--s1); }
.lenses { display: grid; gap: var(--s3); margin: var(--s4) 0; }
.lens { border: 1px solid var(--rule-soft); padding: var(--s4); background: var(--surface); }
.lens h3 { margin: 0 0 var(--s1); font-size: 1rem; }
.lens .src { font-family: var(--sans); font-size: 0.8125rem; color: var(--muted); margin-bottom: var(--s2); }
.lens p:last-child { margin-bottom: 0; }

.placeholder {
  border: 2px dashed var(--rule); padding: var(--s4); font-family: var(--sans); font-size: 0.9375rem; color: var(--muted);
  background: transparent; margin: var(--s4) 0;
}
.placeholder strong { color: var(--ink); }
.verify { font-family: var(--sans); font-size: 0.75rem; font-weight: 700; color: var(--assumed); border: 1px solid var(--assumed); padding: 0 var(--s1); border-radius: 2px; white-space: nowrap; }

/* ---------- Reframe ---------- */
.compare { display: grid; gap: var(--s4); margin: var(--s5) 0; }
@media (min-width: 640px) { .compare { grid-template-columns: 1fr 1fr; } }
.compare > div { padding: var(--s4); border: 1px solid var(--rule-soft); background: var(--surface); }
.compare .before p { text-decoration: line-through; text-decoration-color: var(--muted); text-decoration-thickness: 1px; }
.compare .label { font-family: var(--sans); font-size: 0.875rem; font-weight: 700; color: var(--muted); display: block; margin-bottom: var(--s2); }
.cta { border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); padding: var(--s5) 0; margin: var(--s7) 0 var(--s5); }
.cta h2 { margin-top: 0; }
.cta ol { font-size: 1.1875rem; }
.cta li strong { font-weight: 600; }
.shift { font-family: var(--sans); font-size: 1rem; }

/* ---------- Final screen ---------- */
.final h1 { text-align: center; font-size: clamp(2.5rem, 8vw, 4.25rem); margin: var(--s7) 0 var(--s5); }
.final .sub { text-align: center; font-size: 1.375rem; margin-bottom: var(--s7); }
.final ol { font-size: 1.375rem; line-height: 1.45; }
.final li { margin-bottom: var(--s4); }

/* ---------- Sources ---------- */
.source-group { margin-bottom: var(--s6); }
.source-list { list-style: none; padding: 0; }
.source-list li { padding: var(--s3) 0 var(--s3) 2em; text-indent: -2em; border-bottom: 1px solid var(--rule-soft); margin: 0; }
.source-list .note { display: block; text-indent: 0; font-family: var(--sans); font-size: 0.875rem; color: var(--muted); margin-top: var(--s1); }
.source-list li:target { background: var(--surface); outline: 2px solid var(--accent); }

/* ---------- Motion ---------- */
.reveal { animation: fade 180ms ease-out; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Print ---------- */
@media print {
  :root { --paper: #fff; --surface: #fff; --ink: #000; --muted: #333; }
  .site-header, .site-footer, .stage-nav, .case-top, .rail, .btn-row, .skip-link { display: none !important; }
  body { font-size: 12pt; }
  a { color: #000; }
}

/* ---------- Forced colors ---------- */
@media (forced-colors: active) {
  .ticks span.current, .ticks span.done { background: CanvasText; }
  .proof .conclusion { border-top-color: CanvasText; }
}

.btn-link {
  font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer;
  text-decoration: underline; text-underline-offset: 0.18em;
}
.cite { font-size: 0.9em; white-space: nowrap; }
/* On phones the full sentence strip is too tall to keep pinned. */
@media (max-width: 719px) { .case-top { position: static; } }

/* ---------- Showcase (gallery table) and handout ---------- */
.showcase { font-size: 1.25rem; }
.showcase .reading { max-width: 44rem; }
.showcase .scenario-text { font-size: 1.375rem; }
.showcase .claim-display { font-size: clamp(1.75rem, 4.5vw, 2.5rem); }
.qr-card { display: flex; gap: var(--s5); align-items: center; border: 1px solid var(--rule); padding: var(--s4); margin: var(--s6) 0; background: var(--surface); }
.qr-box {
  flex: none; width: 112px; height: 112px; border: 2px dashed var(--rule); display: grid; place-items: center;
  font-family: var(--sans); font-weight: 700; color: var(--muted);
}
.placeholder-inline { font-family: var(--sans); font-size: 0.875rem; color: var(--muted); }
@media print {
  .no-print { display: none !important; }
  .handout { padding-top: 0; }
  .handout h1 { font-size: 28pt; }
  .handout h2 { margin-top: 14pt; font-size: 14pt; }
}
.qr-img { flex: none; width: 132px; height: 132px; background: #fff; padding: 4px; border: 1px solid var(--rule); }
.qr-url { font-family: var(--sans); font-weight: 600; font-size: 1.0625rem; overflow-wrap: anywhere; }

.nudge { border-left: 4px solid var(--accent); background: var(--surface); padding: var(--s4); margin: var(--s5) 0; }
.nudge p { margin-bottom: var(--s2); }
.nudge .btn-row { margin: 0; }
.reset-row { margin-top: var(--s4); font-family: var(--sans); font-size: 0.9375rem; }
