/* ── Continuous replay ─────────────────────────────────────────────────────────────── */
/* The question/answer card sticks inside its own rail. The rail fills the card's grid
   area only (rows beside the EEG), so the card is released before a full-width row
   such as the CHB signal analysis. On phones the rail dissolves into the column. */
.monitor > .decide-rail { grid-area: decide; min-width: 0; }
@media (min-width: 1181px) { .monitor > .decide-rail { align-self: stretch; } }
@media (max-width: 759px) { .monitor > .decide-rail { display: contents; } }
/* Sections receive focus after an in-page jump (nav.js) without drawing a ring around the whole block. */
section[tabindex="-1"]:focus, header[tabindex="-1"]:focus { outline: none; }

/* ── Showcase pass ── */
/* Muted ink reaches AA on both paper tones (was 4.34:1 and 3.97:1). */
:root { --ink-3: #5f666e; }

/* Hero: a launch-page scale for the name and the promise. */
.hero-stage h1 { font-size: clamp(52px, 6.6vw, 104px); }
.hero-replay .lede { font-size: clamp(19px, 1.8vw, 24px); }

/* One display scale for the section heads. */
.console-title h2 { font-size: clamp(28px, 3vw, 40px); }
.paper .abstract h3, .paper .cite-head h2 { font: 500 clamp(28px, 3vw, 40px)/1.05 var(--serif); letter-spacing: -.015em; color: var(--ink); font-variation-settings: "opsz" 40; }

/* Provenance as labels, not prose. Colours repeat the constellation key. */
.stage .stage-note { max-width: none; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; font: 500 11.5px/1.2 var(--mono); letter-spacing: .04em; color: var(--scr-muted); }
.stage-note .tag-rec, .stage-note .tag-out { display: inline-flex; align-items: center; gap: 7px; }
.stage-note .tag-rec::before, .stage-note .tag-out::before { content: ""; width: 8px; height: 8px; border-radius: 50%; }
.stage-note .tag-rec::before { background: var(--scr-text); opacity: .7; }
.stage-note .tag-out::before { background: var(--teal); }
.stage-note a { margin-left: auto; text-underline-offset: 3px; }

/* How ends on a row of next questions, drawn like the dashed cards in the hero. */
.how .vision-row ul { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.how .vision-row li { flex-direction: column; gap: 10px; padding: 14px 16px 16px; border: 1px dashed #c9c2b4; border-radius: 14px; background: rgba(255, 253, 248, .7); font-size: 14px; line-height: 1.45; }
.how .vision-row { border-top: 0; }
@media (max-width: 1180px) { .how .vision-row ul { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .how .vision-row ul { grid-template-columns: 1fr; } }

/* Paper: label under the side head; text and BibTeX share one measure, no empty rail. */
.paper .abstract > p.abs-tag { margin: 10px 0 0; font: 500 11px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--accent-ink); }
@media (min-width: 900px) {
  .paper .abstract > h3 { grid-row: 1; }
  .paper .abstract > .abs-tag { grid-column: 1 / 4; grid-row: 2; align-self: start; }
  .paper .abstract > p:not(.abs-tag) { grid-row: 1 / span 2; }
}
@media (min-width: 1181px) { .paper .abstract > p:not(.abs-tag), .paper .cite > pre { grid-column: 4 / 11; } }
@media (max-width: 899px) { .paper .abstract > p.abs-tag { margin: 6px 0 14px; } }

/* Phones: short section names so all four fit without a sideways scroll. */
.sn-s { display: none; }
@media (max-width: 560px) {
  .sn-l { display: none; } .sn-s { display: inline; }
  .sn-links { mask-image: none; -webkit-mask-image: none; padding-right: 0; justify-content: flex-end; }
}

/* Paper opens on its key figures, quoted from the abstract below (same numbers, same wording). */
.stats { margin: 0 0 clamp(40px, 5vw, 64px); }
.stats-k { margin: 0 0 18px; font: 500 11px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.stats dl { margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--ink); }
.stats dl > div { padding: 18px clamp(12px, 1.6vw, 24px) 4px 0; min-width: 0; }
.stats dl > div + div { padding-left: clamp(12px, 1.6vw, 24px); border-left: 1px solid var(--rule); }
.stats dt { font: 500 12.5px/1.35 var(--sans); color: var(--ink-2); }
.stats dd { margin: 10px 0 0; }
.stats dd b { display: block; font: 400 clamp(36px, 4.2vw, 60px)/1 var(--serif); letter-spacing: -.02em; color: var(--ink); font-variation-settings: "opsz" 60; font-feature-settings: "lnum", "tnum"; white-space: nowrap; }
.stats dd span { display: block; margin-top: 10px; font-size: 13px; line-height: 1.45; color: var(--ink-2); }
@media (max-width: 1180px) { .stats dl { grid-template-columns: repeat(2, minmax(0, 1fr)); } .stats dl > div:nth-child(3) { padding-left: 0; border-left: 0; } .stats dl > div:nth-child(n+3) { border-top: 1px solid var(--rule); margin-top: 14px; } }
@media (max-width: 420px) { .stats dl { grid-template-columns: 1fr; } .stats dl > div, .stats dl > div + div { padding-left: 0; border-left: 0; } .stats dl > div + div { border-top: 1px solid var(--rule); margin-top: 6px; } }
.stats dl { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.45fr) minmax(0, 1fr); }
.stats dd b { font-size: clamp(34px, 3.8vw, 56px); }
@media (max-width: 1180px) { .stats dl { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .stats dl { grid-template-columns: 1fr; } }
@media (min-width: 900px) { .paper .abstract { grid-template-rows: auto 1fr; } }
@media (max-width: 899px) { .paper > .eyebrow-l { margin-bottom: 18px; } }
