/* Layout: one scroll-snapped screen per idea, copy on the left and a replayable figure on the right (same system as the Covert Chess page). */
:root {
  --bg:         #FFFFFF;
  --surface:    #F6F7FA;   /* figure panels */
  --surface-2:  #EDF0F5;
  --paper-hi:   #FFFFFF;   /* cards inside figures */
  --ink:        #17284D;   /* deep blue */
  --ink-2:      #46506A;
  --muted:      #687089;
  --line:       #E3E7EE;
  --line-2:     #CBD2DD;
  --accent:     #2A4BD0;   /* signal blue */
  --accent-2:   #4E6BE0;
  --accent-soft:rgba(42,75,208,0.10);
  --accent-brd: rgba(42,75,208,0.32);
  --confirm:    #087F68;
  --alert:      #C23D59;
  --amber:      #C08A1A;
  --crimson:    #B3143C;   /* highlighted words in titles */

  /* roles in every figure: green = cheap instrument, blue = mid, red = expensive;
     amber = the belief about the label and the path the circuit actually takes */
  --cost-0:     var(--confirm);
  --cost-1:     var(--accent);
  --cost-2:     var(--alert);
  --belief:     var(--amber);
  --belief-ink: #8A6212;
  --wire:       #91A7DE;   /* a wire at rest */
  --wire-live:  #3155EB;   /* the signal moving along it */
  --block-1:    #3155EB;   /* the mid-priced model's block (the accent is a shade darker) */
  --navy:       #17284D;   /* the prediction */

  --font-display: "Manrope", system-ui, sans-serif;
  --font-body:    "Inter", system-ui, sans-serif;
  --font-mono:    "Space Mono", ui-monospace, monospace;

  --wrap: 1120px;
  --radius: 14px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-snap-type: y proximity; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 17px; line-height: 1.65; -webkit-font-smoothing: antialiased; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { animation: none !important; transition: none !important; } }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.12; letter-spacing: -0.02em; margin: 0; color: var(--ink); text-wrap: balance; }
h2 { font-size: clamp(28px, 3.6vw, 42px); }
h3 { font-size: 20px; letter-spacing: -0.01em; }
p { margin: 0 0 18px; color: var(--ink-2); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
em { color: var(--ink); font-style: italic; }
strong { color: var(--ink); font-weight: 600; }
code { font-family: var(--font-mono); font-size: .86em; color: var(--ink); background: var(--surface-2); border-radius: 4px; padding: .06em .32em; white-space: nowrap; }
.m { font-family: var(--font-mono); font-size: .92em; color: var(--ink); }
/* Math: KaTeX (Computer Modern) renders every [data-tex]; the plain text inside stays as the fallback. */
.m .katex, .k .katex { font-size: 1.1em; }
.obj .k .katex { font-size: 1.12em; }
.eqbox .katex-display { margin: 2px 0 10px; }
.eqbox .katex { font-size: 1.08em; }
.hl { color: var(--crimson); }

/* ---------- COVER ---------- */
.cover { position: relative; border-bottom: 1px solid var(--line); text-align: center; min-height: 100vh; min-height: 100svh; display: flex; align-items: center; justify-content: center; scroll-snap-align: start; }
.cover-inner { position: relative; z-index: 1; padding: 72px 0 110px; width: 100%; }
.hook { font-family: var(--font-display); font-weight: 700; font-size: clamp(38px, 6vw, 76px); line-height: 1.04; letter-spacing: -0.035em; max-width: 18ch; margin: 0 auto; }
.hook-sub { font-family: var(--font-display); font-weight: 500; font-size: clamp(17px, 2vw, 23px); color: var(--ink-2); max-width: 44ch; margin: 22px auto 0; line-height: 1.4; letter-spacing: 0; text-wrap: balance; }

.cover-authors { display: flex; align-items: baseline; justify-content: center; gap: 8px 20px; margin-top: 34px; flex-wrap: wrap; }
.cover-authors .ca { font-size: 17px; color: var(--ink); }
.cover-authors .ca a { color: var(--ink); border-bottom: 1px solid transparent; }
.cover-authors .ca a:hover { color: var(--accent); border-bottom-color: var(--accent); text-decoration: none; }
.cover-authors .ca sup { color: var(--muted); font-size: .62em; font-weight: 600; margin-left: 1px; }
.affil { font-size: 14px; color: var(--muted); margin-top: 12px; }
.affil sup { font-size: .78em; }
.affil .dot { margin: 0 8px; color: var(--line-2); }
.cover-cta { justify-content: center; margin-top: 30px; }
.cover-cta .btn svg { width: 16px; height: 16px; }
.cover-colleges { display: flex; align-items: center; justify-content: center; gap: 40px; margin-top: 34px; flex-wrap: wrap; }
.cover-colleges img { height: 46px; width: auto; max-width: 190px; object-fit: contain; opacity: .95; }
@media (max-width: 560px) { .cover-colleges { gap: 24px; } .cover-colleges img { height: 36px; } }
.lab-link, .lab-link:hover { display: inline-block; text-decoration: none; }
.view-note { font-size: 14.5px; font-weight: 600; color: var(--ink-2); margin: 26px 0 0; }

/* animated IT-lab logo (Doto dot-matrix + binary-decode JS) */
.it-logo { display: inline-block; text-align: center; font-family: 'Doto', monospace; font-weight: 700; letter-spacing: 0.14em; font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; line-height: 1.34; }
.it-logo .line { display: block; }
.it-logo .lit { color: var(--accent); }
.it-logo .label { color: var(--ink); }
.it-logo.full { font-size: 1.5rem; margin-top: 34px; }
.it-logo.full .line + .line { margin-top: 3px; }
@media (max-width: 560px) { .it-logo.full { font-size: 1.22rem; } }

/* the cover's own small circuit: wires draw in, nodes light up, in a loop */
.cover-circuit { width: min(600px, 92vw); margin: 30px auto 0; }
.cover-circuit svg { display: block; width: 100%; height: auto; }
.cover-circuit .cw { fill: none; stroke: var(--line-2); stroke-width: 1.6; }
.cover-circuit .cw.alt { stroke-dasharray: 3 4; }
.cover-circuit .cw.live { stroke: var(--accent); stroke-dasharray: 6 8; animation: flow 1.2s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -28; } }
.cover-circuit .cn { fill: var(--surface-2); stroke-width: 2; }
.cover-circuit .cn.c0 { stroke: var(--cost-0); } .cover-circuit .cn.c1 { stroke: var(--cost-1); } .cover-circuit .cn.c2 { stroke: var(--cost-2); }
.cover-circuit .cn.lit { fill: var(--accent-soft); }
.cover-circuit text { font-family: var(--font-mono); font-size: 11px; fill: var(--ink-2); }
.cover-circuit .cbox { fill: var(--paper-hi); stroke: var(--line-2); }

/* ---------- story screens ---------- */
.screen { position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: center; padding: 56px 0 92px; border-bottom: 1px solid var(--line); scroll-snap-align: start; }
.screen > .wrap { width: 100%; }
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 5vw, 64px); align-items: center; }
.split > * { min-width: 0; }
.copy h2 { margin: 0 0 18px; }
.copy p { max-width: 50ch; font-size: 16px; line-height: 1.6; margin-bottom: 14px; }
.copy .lede { font-size: clamp(17.5px, 1.7vw, 19.5px); }
.copy p:last-child { margin-bottom: 0; }
.lede { font-size: clamp(18px, 1.9vw, 20.5px); color: var(--ink); line-height: 1.55; }
.term { color: var(--ink); font-weight: 600; }
.tie { font-size: 15px; color: var(--ink-2); border-left: 2px solid var(--accent-brd); padding-left: 14px; }
.tie b { color: var(--ink); font-weight: 600; }
.obj { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin-top: 16px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; font-size: 14.5px; color: var(--ink-2); max-width: 52ch; }
.obj .row { display: contents; }
.obj .k { font-family: var(--font-mono); font-size: 12.5px; color: var(--accent); padding-top: 2px; white-space: nowrap; }
.obj .v { line-height: 1.5; }
.single { max-width: 820px; }
.single h2 { margin: 0 0 18px; }
.single .lede, .single p { max-width: 64ch; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; gap: 28px; } .screen { padding: 72px 0 88px; } }
@media (min-width: 901px) { .split.fig-wide { grid-template-columns: minmax(0, 8fr) minmax(0, 13fr); } }

/* the three questions */

/* ---------- figures ---------- */
.fig { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px 16px; margin: 0; }
.fig-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 30px; margin-bottom: 6px; font-size: 14px; color: var(--muted); }
.fig-svg svg { display: block; width: 100%; height: auto; }
/* without script: no drawings, so each figure shows what it would have drawn */
.no-js .next, .no-js [data-open] { display: none; }
.no-js [data-fig]::before { content: attr(aria-label); display: block; font-size: 15.5px; line-height: 1.55; color: var(--ink); }
.fig-cap, .fig figcaption { font-size: 14.5px; color: var(--ink-2); margin: 12px 2px 0; line-height: 1.5; }
.mini-btn { display: inline-flex; align-items: center; gap: 6px; font: 500 13px var(--font-body); color: var(--accent); background: var(--accent-soft); border: 1px solid var(--accent-brd); border-radius: 8px; padding: 4px 11px; cursor: pointer; transition: background .15s ease, border-color .15s ease; }
.mini-btn:hover { background: rgba(42,75,208,.17); border-color: var(--accent); }
.mini-btn svg { width: 13px; height: 13px; flex: none; }
.nudge { border-color: var(--accent); animation: ring-out 1.6s ease-out 3; }
.mini-btn.nudge { background: rgba(42,75,208,.17); }
@keyframes ring-out { 0% { box-shadow: 0 0 0 0 rgba(42,75,208,.45); } 75%, 100% { box-shadow: 0 0 0 9px rgba(42,75,208,0); } }

/* shared SVG vocabulary */
.fig text { font-family: var(--font-body); font-size: 15px; fill: var(--ink-2); }
.fig .t-ink { fill: var(--ink); }
.fig .t-mono { font-family: var(--font-mono); }
.fig .t-muted { fill: var(--muted); }
.fig .t-b { font-weight: 600; }
.fig .t-big { font-size: 17px; }
.fig .t-s { font-size: 14px; }
.fig .t-xs { font-size: 14px; }
.fig .t-quote { font-size: 15px; font-style: italic; }
.fig .t-belief { fill: var(--belief-ink); font-weight: 600; }
.fig .t-alert { fill: var(--alert); font-weight: 600; }
.fig .t-ok { fill: var(--confirm); font-weight: 600; }
.fig .mi { font-family: 'KaTeX_Math', 'Times New Roman', serif; font-style: italic; font-size: 1.12em; }
.fig .mr { font-family: 'KaTeX_Main', 'Times New Roman', serif; font-size: 1.08em; }
.fig .t-accent { fill: var(--accent); font-weight: 600; }
.fig .t-c0 { fill: var(--cost-0); font-weight: 600; } .fig .t-c1 { fill: var(--cost-1); font-weight: 600; } .fig .t-c2 { fill: var(--cost-2); font-weight: 600; }
.fig .halo { paint-order: stroke; stroke: var(--surface); stroke-width: 5px; stroke-linejoin: round; }
.fig .bubble { fill: var(--paper-hi); stroke: var(--line-2); stroke-width: 1; }
.fig .card { fill: var(--paper-hi); stroke: var(--line-2); stroke-width: 1; }
.fig .card.on { stroke: var(--accent); stroke-width: 1.6; }
.fig .pbox { fill: var(--paper-hi); stroke: var(--line-2); stroke-width: 1.2; }
.fig .pbox.lit { stroke: var(--accent); stroke-width: 1.8; }
.fig .inst { fill: var(--surface-2); stroke-width: 2; transition: fill .3s ease; }
.fig .inst.c0 { stroke: var(--cost-0); } .fig .inst.c1 { stroke: var(--cost-1); } .fig .inst.c2 { stroke: var(--cost-2); }
.fig .inst.lit { fill: #FFFFFF; }
.fig .inst.dimmed { opacity: .35; }
.fig .wire { stroke: var(--line-2); stroke-width: 1.6; fill: none; transition: stroke .3s ease, opacity .3s ease; }
.fig .wire.alt { stroke-dasharray: 3 4; }
.fig .wire.on { stroke: var(--accent); stroke-width: 2.2; }
.fig .wire.dimmed { opacity: .3; }
.fig .pulse { fill: var(--accent); }
.fig .chip { stroke-width: 1.2; }
.fig .chip.h { fill: rgba(180,71,47,.12); stroke: var(--alert); }
.fig .chip.s { fill: rgba(46,125,87,.12); stroke: var(--confirm); }
.fig .chip.n { fill: var(--surface-2); stroke: var(--line-2); }
.fig .fade { transition: opacity .5s ease; }
.fig.armed .fade { opacity: 0; }
.fig .axis { stroke: var(--line-2); stroke-width: 1; }
.fig .grid { stroke: var(--line); stroke-width: 1; }
.fig .ag { fill: var(--surface-2); stroke: var(--ink-2); stroke-width: 1.6; }
.fig .ag-eye { fill: var(--ink-2); }

/* belief bar (query-or-stop figure, glue figure) */
.fig .belief-bg { fill: var(--line); }
.fig .belief-fill { fill: var(--belief); opacity: .85; }
.fig .marker { fill: var(--belief); stroke: #FFFFFF; stroke-width: 2; }
.fig .marker.ghost { fill: var(--paper-hi); stroke: var(--belief-ink); stroke-width: 1.6; }
.fig .mid { stroke: var(--ink-2); stroke-width: 1; stroke-dasharray: 3 3; }
.fig .bar-bg { fill: var(--line); }
.fig .bar-fill { fill: var(--accent); }
.fig .bar-fill.c0 { fill: var(--cost-0); } .fig .bar-fill.c1 { fill: var(--cost-1); } .fig .bar-fill.c2 { fill: var(--cost-2); }
.fig .emb { fill: var(--accent); stroke: var(--surface); stroke-width: 1; }
.fig .neuron { fill: var(--line-2); } .fig .neuron.lit { fill: var(--accent); }
.fig .syn { stroke: var(--line); stroke-width: .8; } .fig .syn.lit { stroke: var(--accent-brd); }

/* circuit-type switcher */
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 9px; overflow: hidden; }
.seg button { font: 600 13px var(--font-body); color: var(--ink-2); background: var(--surface); border: 0; padding: 6px 12px; cursor: pointer; white-space: nowrap; }
.seg button + button { border-left: 1px solid var(--line-2); }
.seg button[aria-checked="true"] { background: var(--ink); color: #FFFFFF; }
.seg-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 0 0 10px; }
.seg-row .lbl { font-size: 13px; color: var(--muted); }
@media (max-width: 600px) { .seg button { font-size: 13px; padding: 6px 9px; } }

/* dynamic-program figure: price slider, readouts, policy tree */

/* buttons */
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.btn { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-body); font-size: 15px; font-weight: 500; padding: 11px 20px; border-radius: 10px; cursor: pointer; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); transition: transform .12s ease, border-color .12s ease, background .12s ease; }
.btn:hover { text-decoration: none; border-color: var(--accent); transform: translateY(-1px); }
.btn.primary { background: var(--accent); color: #FFFFFF; border-color: var(--accent); font-weight: 600; }
.btn.primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn.small { font-size: 14px; padding: 7px 14px; border-radius: 9px; }
.linkish { font: inherit; font-size: 14px; color: var(--accent); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-decoration-color: var(--accent-brd); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.linkish:hover { text-decoration-color: var(--accent); }

/* three pieces (recipe) */
.pieces { list-style: none; margin: 36px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 900px; column-gap: 52px; row-gap: 26px; }
.pieces li { position: relative; }
.pieces li + li::before { content: "+"; position: absolute; left: -36px; top: 8px; font: 500 30px/1 var(--font-display); color: var(--muted); }
.pieces svg { display: block; width: 46px; height: 46px; margin-bottom: 14px; }
.pieces h3 { font-size: 20px; margin: 0 0 6px; }
.pieces p { font-size: 16px; line-height: 1.55; margin: 0 0 8px; }
.pieces li > a { font-size: 13.5px; }
.pieces-note { margin: 30px 0 0; max-width: 72ch; font-size: 15px; color: var(--ink-2); border-top: 1px solid var(--line); padding-top: 16px; }
.pieces-note .linkish { font-size: 15px; margin-left: 4px; }
@media (max-width: 900px) { .pieces { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pieces li + li::before { display: none; } }
@media (max-width: 520px) { .pieces { grid-template-columns: 1fr; } }
/* one reveal when the panel arrives: the pieces appear in turn and each icon
   replays its earlier figure in miniature. .pieces-anim is only set by script. */
.pieces-anim .pieces li { --d: 0s; opacity: 0; transition: opacity .45s ease var(--d); }
.pieces-anim .pieces li:nth-child(2) { --d: .7s; }
.pieces-anim .pieces li:nth-child(3) { --d: 1.4s; }
.pieces-anim .ic-dial .needle { transform-box: view-box; transform-origin: 23px 27px; transform: rotate(-70deg); transition: transform 1s cubic-bezier(.2,.7,.2,1) calc(var(--d) + .2s); }
.pieces-anim .ic-net .out { transform-box: fill-box; transform-origin: 0 50%; transform: scaleX(0); transition: transform .8s ease calc(var(--d) + .3s); }
.pieces-anim .ic-tree .br { stroke-dasharray: 40; stroke-dashoffset: 40; transition: stroke-dashoffset .7s ease calc(var(--d) + .2s); }
.pieces-anim .ic-tree .br.l2 { transition-delay: calc(var(--d) + .7s); }
.pieces-anim .ic-tree .leaf { opacity: 0; transition: opacity .3s ease calc(var(--d) + 1.3s); }
.pieces-anim.play .pieces li { opacity: 1; }
.pieces-anim.play .ic-dial .needle { transform: rotate(40deg); }
.pieces-anim.play .ic-net .out { transform: scaleX(1); }
.pieces-anim.play .ic-tree .br { stroke-dashoffset: 0; }
.pieces-anim.play .ic-tree .leaf { opacity: 1; }

/* theory cards */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 30px; }
.cardx { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px 22px; }
.cardx .k { font-family: var(--font-mono); font-size: 12.5px; color: var(--accent); }
.cardx h3 { font-size: 19px; margin: 6px 0 10px; }
.cardx p { font-size: 15px; line-height: 1.55; margin: 0; }
.cardx .eq { display: block; font-family: var(--font-mono); font-size: 13px; color: var(--ink); background: var(--paper-hi); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; margin: 0 0 12px; overflow-x: auto; white-space: nowrap; }
@media (max-width: 900px) { .cards { grid-template-columns: 1fr; } }

/* result figure: the paper's Figure 4 (image slot) */
.figure { margin-top: 30px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 22px 24px 18px; width: min(1080px, 94vw); max-width: none; margin-left: 50%; transform: translateX(-50%); }
.figure img { width: 100%; height: auto; display: block; border-radius: 6px; }
.figure .missing { display: none; border: 1.5px dashed var(--line-2); border-radius: 10px; padding: 40px 24px; text-align: center; font-size: 14.5px; color: var(--muted); background: var(--paper-hi); }
.figure .missing code { white-space: normal; }
.figure.no-img img { display: none; }
.figure.no-img .missing { display: block; }
.figcap { font-family: var(--font-mono); font-size: 12.5px; line-height: 1.6; color: var(--ink-2); margin: 14px 2px 0; letter-spacing: 0; }
.figcap b { color: var(--ink); font-weight: 700; }
.figure-note { margin-top: 22px; font-size: 16px; color: var(--ink-2); max-width: 820px; line-height: 1.6; }
.figure-note strong { color: var(--ink); font-weight: 600; }
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 24px; }
.fact { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.fact .n { font-family: var(--font-display); font-weight: 700; font-size: 30px; letter-spacing: -0.02em; color: var(--ink); line-height: 1.1; }
.fact .n small { font-size: 16px; font-weight: 600; color: var(--ink-2); }
.fact .d { font-size: 13.5px; color: var(--ink-2); margin-top: 6px; line-height: 1.45; }
@media (max-width: 900px) { .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .facts { grid-template-columns: 1fr; } }
#results { padding: 60px 0 92px; }
#results .single { max-width: none; }
#results .single .lede { max-width: 64ch; }

/* closing statement: the one dark screen */
.statement { max-width: 900px; }
.statement h2 { font-size: clamp(34px, 5vw, 62px); line-height: 1.06; letter-spacing: -0.03em; margin: 0 0 26px; }
.statement .lede, .statement .aside { font-size: clamp(18px, 1.8vw, 21px); line-height: 1.5; max-width: 52ch; }
.statement .lede { color: var(--ink); margin-bottom: 18px; }
.aside { font-size: 14.5px; color: var(--muted); max-width: 64ch; }
#takeaway { background: var(--ink); border-bottom: 0; }
#takeaway .statement h2 { color: #FFFFFF; }
#takeaway .hl { color: #FF8FA9; }
#takeaway .lede { color: #DCE2F0; }
#takeaway .aside { color: #A9B3CC; }
#takeaway :focus-visible { outline-color: #FFFFFF; }
#takeaway.reveal h2 { opacity: 0; transition: opacity .9s ease; }
#takeaway.reveal .hl { color: #FFFFFF; transition: color 1s ease 1s; }
#takeaway.reveal .lede { opacity: 0; transition: opacity .8s ease 2s; }
#takeaway.reveal .aside { opacity: 0; transition: opacity .8s ease 2.5s; }
#takeaway.reveal.play h2, #takeaway.reveal.play .lede, #takeaway.reveal.play .aside { opacity: 1; }
#takeaway.reveal.play .hl { color: #FF8FA9; }

/* sheets */
dialog.sheet { width: min(1100px, 94vw); max-height: 88vh; border: 1px solid var(--line-2); border-radius: 16px; padding: 0; background: var(--bg); color: var(--ink); box-shadow: 0 24px 60px rgba(23,40,77,.25); }
dialog.sheet::backdrop { background: rgba(23,40,77,.38); }
.sheet-head { position: sticky; top: 0; z-index: 1; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 20px; background: var(--bg); border-bottom: 1px solid var(--line); }
.sheet-head h3 { font-size: 18px; }
.sheet-body { padding: 20px 24px 28px; }
.sheet-body p { font-size: 15.5px; }
.points { display: grid; gap: 16px; margin-top: 24px; max-width: 820px; }
.point { display: flex; gap: 14px; }
.point .n { font-family: var(--font-mono); font-size: 13px; color: var(--accent); font-weight: 700; padding-top: 2px; min-width: 22px; }
.point p { margin: 0; font-size: 15.5px; }
.eqbox { font-family: var(--font-mono); font-size: 14px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; margin: 14px 0 18px; overflow-x: auto; line-height: 1.8; }
.eqbox .c { color: var(--muted); }
pre.bib { font-family: var(--font-mono); font-size: 12.5px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; overflow-x: auto; margin: 0; line-height: 1.55; }
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.res-table { width: 100%; border-collapse: collapse; font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-2); }
.res-table th, .res-table td { padding: 7px 16px; text-align: right; white-space: nowrap; }
.res-table th:first-child, .res-table td:first-child { text-align: left; }
.res-table thead th { font-size: 10.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); font-weight: 700; background: var(--surface-2); border-bottom: 1px solid var(--line-2); }
.res-table tbody td { border-bottom: 1px solid var(--line); }
.res-table td:first-child { color: var(--ink); font-weight: 700; }
.tabcap { font-family: var(--font-mono); font-size: 12.5px; line-height: 1.6; color: var(--ink-2); margin: 14px 2px 0; }
.refs ol { margin: 0; padding-left: 22px; }
.refs li { font-size: 14px; color: var(--ink-2); line-height: 1.55; margin-bottom: 10px; }
.refs li b { color: var(--ink); font-weight: 600; }
.refs li .venue { font-style: italic; color: var(--muted); }

/* authors */
.author-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 34px; }
.author { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.author h3 { font-size: 17px; }
.author .role { font-size: 13.5px; color: var(--muted); font-family: var(--font-mono); margin: 2px 0 10px; }
.author .college-logo { height: 40px; width: auto; max-width: 150px; object-fit: contain; display: block; margin: 10px 0 12px; }
.author .logos { display: flex; align-items: center; flex-wrap: wrap; gap: 0 18px; }
.author .logos .college-logo { max-width: 120px; }
.author p { font-size: 14px; margin: 0; }
.author h3 .eq { color: var(--muted); font-size: .7em; margin-left: 2px; }
@media (max-width: 760px) { .author-grid { grid-template-columns: 1fr; } }

/* contact */
.screen.tight { min-height: 0; padding: 72px 0; }
.contact-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 30px; max-width: 760px; }
.contact-card { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; color: var(--ink); }
.contact-card:hover { border-color: var(--accent); text-decoration: none; }
.contact-card .t { font-family: var(--font-display); font-weight: 600; font-size: 16px; margin-bottom: 4px; }
.contact-card .d { font-size: 13.5px; color: var(--muted); }
@media (max-width: 620px) { .contact-grid { grid-template-columns: 1fr; } }

footer { padding: 40px 0 88px; scroll-snap-align: end; }
footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; color: var(--muted); font-size: 13.5px; font-family: var(--font-mono); }

/* ---------- navigation: next button + progress rail ---------- */
.next { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 40; display: inline-flex; align-items: center; gap: 10px; max-width: calc(100vw - 32px); padding: 5px 16px 5px 5px; border-radius: 999px; background: rgba(255,255,255,.93); border: 1px solid var(--line-2); color: var(--ink); font: 500 14px var(--font-body); box-shadow: 0 6px 18px rgba(23,40,77,.10); cursor: pointer; }
@supports (backdrop-filter: blur(1px)) { .next { backdrop-filter: blur(8px); } }
.next:hover { border-color: var(--accent); }
.next .ic { width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: #FFFFFF; display: grid; place-items: center; flex: none; transition: transform .3s ease; }
.next .ic svg { width: 16px; height: 16px; }
.next.at-start { animation: nudge 2.6s ease-in-out infinite; left: auto; right: 24px; transform: none; padding: 5px; }
.next.at-start .next-text { display: none; }
.next { transition: opacity .2s ease; }
.next.away { opacity: 0; pointer-events: none; }
@keyframes nudge { 0%, 58%, 100% { translate: 0 0; } 66% { translate: 0 7px; } 74% { translate: 0 0; } 82% { translate: 0 4px; } 90% { translate: 0 0; } }
.next.up .ic { transform: rotate(180deg); }
.next .pre { color: var(--muted); }
.next-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 640px) { .next { left: auto; right: 14px; transform: none; padding: 5px; } .next-text { display: none; } }

.rail { position: fixed; right: 14px; top: 50%; transform: translateY(-50%); z-index: 40; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.rail a { position: relative; display: block; padding: 5px; }
.rail a i { display: block; width: 8px; height: 8px; border-radius: 4px; border: 1.5px solid var(--line-2); transition: height .25s ease, background .25s ease, border-color .25s ease; }
.rail a.on i { height: 22px; background: var(--accent); border-color: var(--accent); }
.rail a:hover i { border-color: var(--accent); }
.rail a span { position: absolute; right: 24px; top: 50%; transform: translateY(-50%); white-space: nowrap; font-size: 12.5px; color: var(--ink-2); background: var(--surface); border: 1px solid var(--line); padding: 2px 8px; border-radius: 6px; opacity: 0; pointer-events: none; transition: opacity .15s ease; }
.rail a:hover span, .rail a:focus-visible span { opacity: 1; }
@media (max-width: 1199px) { .rail { display: none; } }

@media (max-width: 600px) {
  .wrap { padding: 0 16px; }
  .fig:not(.figure) { padding: 10px 10px 12px; margin-left: -6px; margin-right: -6px; }
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }


/* ================= revision: shared kit (assets/core.js LC.kit) ================= */
/* model stations: solid blocks in the tier colour, as in the circuit diagrams */
.fig .station .st-body { stroke-width: 2; transition: stroke .3s ease, filter .3s ease; }
.fig .station.t0 .st-body { fill: var(--cost-0); stroke: var(--cost-0); }
.fig .station.t1 .st-body { fill: var(--block-1); stroke: var(--block-1); }
.fig .station.t2 .st-body { fill: var(--cost-2); stroke: var(--cost-2); }
.fig .station .st-name { font-family: var(--font-display); font-size: 16px; font-weight: 800; letter-spacing: -.01em; fill: #FFFFFF; }
.fig .station .st-sub { font-size: 14px; font-weight: 500; fill: #FFFFFF; opacity: .92; }
.fig .station.active .st-body { stroke: var(--navy); stroke-width: 2.5; filter: drop-shadow(0 0 6px rgba(49,85,235,.45)); }
/* a model not asked: a pale tint with its name in the tier colour, still readable */
.fig .station.dim .st-body { fill-opacity: .1; stroke-opacity: .4; }
.fig .station.t0.dim .st-name { fill: var(--cost-0); } .fig .station.t1.dim .st-name { fill: var(--block-1); } .fig .station.t2.dim .st-name { fill: var(--cost-2); }
.fig .station.dim .st-sub { fill: var(--muted); opacity: 1; }
/* wires: quiet at rest, a moving dashed signal when live */
.fig .cw { fill: none; stroke: var(--wire); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; transition: stroke .3s ease, opacity .3s ease; }
.fig .cw.live { stroke: var(--wire-live); stroke-width: 3.5; stroke-dasharray: 8 10; animation: lc-flow 1.2s linear infinite; }
.fig .cw.off { opacity: .35; }
.fig .cw-head { fill: var(--wire-live); }
@keyframes lc-flow { to { stroke-dashoffset: -36; } }
.fig .lc-net line { stroke: var(--wire); stroke-width: 1.2; }
.fig .lc-net circle { fill: var(--wire-live); }
.fig .station { transition: opacity .35s ease; }
.fig .chip-g .chip-t { font-size: 14px; font-weight: 700; letter-spacing: .04em; }
.fig .chip-g.h .chip-t { fill: var(--alert); } .fig .chip-g.s .chip-t { fill: var(--confirm); }
.fig .bbar .bb-track { fill: var(--line); }
.fig .bbar .bb-sure { opacity: .28; } .fig .bbar .bb-sure.s { fill: var(--confirm); } .fig .bbar .bb-sure.h { fill: var(--alert); }
.fig .bbar .bb-mid { stroke: var(--ink-2); stroke-width: 1; stroke-dasharray: 3 3; }
.fig .bbar .bb-end { font-size: 14px; fill: var(--muted); }
.fig .bbar .bb-marker { fill: var(--belief); stroke: #FFFFFF; stroke-width: 2.5; }
.fig .bbar .bb-val { font-family: var(--font-display); font-size: 15px; font-weight: 800; fill: var(--belief-ink); }
.fig .cmeter .cm-lbl { font-size: 14px; fill: var(--muted); }
.fig .cmeter .cm-val { font-family: var(--font-display); font-size: 17px; font-weight: 800; fill: var(--ink); }
.fig .cmeter .cm-unit { font-size: 14px; fill: var(--muted); }
.fig .pcard .pc-body { fill: var(--paper-hi); stroke: var(--line-2); }
.fig .pcard .pc-title { font-size: 14px; fill: var(--muted); }
.fig .pcard .pc-text { font-size: 15.5px; font-style: italic; fill: var(--ink); }
.fig-title { font-size: 14px; color: var(--muted); }

/* ================= revision: new screens ================= */
.hook { max-width: 16ch; }
.cover-fig { width: min(760px, 100%); margin: 34px auto 0; text-align: left; }
.cover-fig .fig-cap { text-align: center; max-width: 60ch; margin: 8px auto 0; }
.cover-fig.fig { background: transparent; border: 0; padding: 0; }

/* uses: LLMs as classifiers */
.closing { font-family: var(--font-display); font-weight: 600; font-size: clamp(22px, 2.4vw, 28px); color: var(--ink); margin: 34px 0 0; letter-spacing: -0.01em; }

/* the question */
#question { background: var(--surface); }
.ask { font-family: var(--font-display); font-weight: 600; font-size: clamp(32px, 4.6vw, 58px); line-height: 1.15; letter-spacing: -0.025em; color: var(--ink); margin: 0; max-width: 22ch; }
.ask span { display: block; text-wrap: balance; }
.ask span + span { margin-top: .35em; }

/* footnote */
.fn { font-size: 14px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 10px; margin-top: 18px; max-width: 50ch; }
sup.fnref { font-size: .62em; color: var(--accent); font-weight: 600; }

/* recap pieces: two plus signs */
.pieces li > a, .pieces-note .linkish { font-size: 14px; }

/* takeaway: two statements */
.statement .rule { text-wrap: balance; font-family: var(--font-display); font-weight: 600; font-size: clamp(24px, 3vw, 36px); line-height: 1.2; letter-spacing: -0.02em; color: #FFFFFF; margin: 34px 0 0; max-width: 30ch; border-top: 1px solid rgba(255,255,255,.18); padding-top: 26px; }
#takeaway.reveal .rule { opacity: 0; transition: opacity .8s ease 2.6s; }
#takeaway.reveal.play .rule { opacity: 1; }

/* results extras */
.results-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.runtime-note { margin-top: 22px; font-size: 16px; color: var(--ink-2); max-width: 70ch; }
details.more { margin-top: 14px; }
details.more summary { cursor: pointer; color: var(--accent); font-size: 15px; }

/* tools/qa.mjs screenshots: no floating controls over the figures */
html[data-qa] .next, html[data-qa] .rail { display: none !important; }
html[data-qa] { scroll-behavior: auto; scroll-snap-type: none; }
