/* Reasoning Sprint: participant UI. SITE LOOK 3, "The Puzzle Page" (D-44).
   The design guide is the skill .claude/skills/puzzle-page-design (tokens, screens, components, guardrails).
   Research guardrails (SKILL.md §1), unchanged in every look:
   - G1 no correctness feedback during play: the ink ring and the "filed" tick are identical for every answer and skip.
   - G2 conditions identical: nudge and neutral quotes share .banner.quote, the splash and the timing.
   - G3 never block copy or selection (never disable text selection anywhere).
   - G4 never a transform on .qcard (it would trap the phone action bar): fades only.
   - G5 the lobby stays bare (no counter, avatar or accent next to the norm message).
   - G7 nothing changes at question 16. G8 reduced motion respected.
   Fonts are self-hosted OFL files (static/fonts, licences alongside); CSP is 'self' only. */

/* ------------------------------------------------------------------ fonts */
@font-face { font-family: "Fraunces"; src: url("/static/fonts/fraunces.woff2") format("woff2");
  font-weight: 300 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("/static/fonts/fraunces-italic.woff2") format("woff2");
  font-weight: 300 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Bricolage Grotesque"; src: url("/static/fonts/bricolage.woff2") format("woff2");
  font-weight: 200 800; font-style: normal; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/static/fonts/jetbrainsmono.woff2") format("woff2");
  font-weight: 100 800; font-style: normal; font-display: swap; }
/* D-45: Bricolage Grotesque draws "@" as a small, low circled a that reads badly in e-mail addresses. This face covers
   ONLY U+0040 and sits first in the text stack, so every "@" uses JetBrains Mono's clear one and nothing else changes. */
@font-face { font-family: "Sprint At"; src: url("/static/fonts/jetbrainsmono.woff2") format("woff2");
  font-weight: 100 800; font-style: normal; font-display: swap; unicode-range: U+0040; size-adjust: 92%; }

/* ------------------------------------------------------------------ tokens (light = paper; night edition below) */
:root {
  color-scheme: light dark;
  --paper: #F4EFE6;
  --sheet: #FBF8F2;
  --sheet-2: #F1EBDF;
  --ink: #141414;
  --ink-2: #3D3A35;
  --pencil: #6E6A63;
  --rule: rgba(20, 20, 20, .20);
  --rule-strong: rgba(20, 20, 20, .55);
  --tomato: #E4572E;
  --tomato-ink: #B23A17;
  --marigold: #F2B134;
  --focus: #1F4FD8;
  --on-ink: #FBF8F2;
  --grain-opacity: .05;
  --display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --text: "Sprint At", "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --radius: 2px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --t-fast: 120ms;
  --t: 180ms;
  --t-slow: 220ms;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #17140F;
    --sheet: #201C16;
    --sheet-2: #29241D;
    --ink: #EFE8DA;
    --ink-2: #C9C1B2;
    --pencil: #9A9284;
    --rule: rgba(239, 232, 218, .18);
    --rule-strong: rgba(239, 232, 218, .45);
    --tomato: #FF6B45;
    --tomato-ink: #FF8A6B;
    --marigold: #E9A824;
    --focus: #8FB0FF;
    --on-ink: #17140F;
    --grain-opacity: .03;
  }
}

/* ------------------------------------------------------------------ base */
* { box-sizing: border-box; }
html, body { margin: 0; }
html { -webkit-text-size-adjust: 100%; font-size: 100%; }
@media (min-width: 1600px) { html { font-size: 112.5%; } }
@media (min-width: 2200px) { html { font-size: 125%; } }
body {
  min-height: 100vh; display: flex; flex-direction: column; position: relative;
  background: var(--paper); color: var(--ink);
  font: 450 1.0625rem/1.62 var(--text); font-optical-sizing: auto;   /* D-45: a touch larger for readability */
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
/* Paper grain: one fixed noise layer, never on top of interactive surfaces' colours. */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 1 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
.brandbar, main, .site-footer { position: relative; z-index: 1; }
main { width: 100%; max-width: 760px; margin: 0 auto; padding: 8px 16px 80px; flex: 1; }
body[data-stage="phase1"] main, body[data-stage="phase2"] main { max-width: 880px; }

h1, h2, h3 { font-family: var(--display); font-optical-sizing: auto; color: var(--ink); }
h1 { font-size: clamp(2rem, 1.5rem + 2vw, 2.9rem); line-height: 1.05; margin: 0 0 12px; font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.35rem, 1.2rem + .6vw, 1.7rem); line-height: 1.2; margin: 0 0 14px; font-weight: 700; letter-spacing: -0.01em; }
h3 { font-size: 1.1rem; margin: 22px 0 8px; font-weight: 650; }
p { margin: 0 0 12px; }
ul, ol { margin: 0 0 12px; padding-left: 20px; }
li { margin-bottom: 8px; }
a { color: var(--tomato-ink); text-underline-offset: 3px; }
strong { font-weight: 700; }
.muted { color: var(--pencil); }
.center { text-align: center; }
.small { font-size: .875rem; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
h2.sr-only:focus { outline: none; }
::selection { background: color-mix(in srgb, var(--marigold) 55%, transparent); color: var(--ink); }
/* Focus: blue is used for nothing else, so it is unmistakable. */
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* ------------------------------------------------------------------ masthead + footer */
.brandbar {
  width: 100%; max-width: 760px; margin: 0 auto; padding: 22px 16px 0;
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.brandbar::after {     /* the double rule */
  content: ""; flex-basis: 100%; height: 6px; margin-top: 8px;
  border-top: 3px solid var(--ink); border-bottom: 1px solid var(--ink);
}
.brandbar .name { font: 700 1.05rem/1 var(--display); font-variant-caps: all-small-caps; letter-spacing: .08em; }
.brandbar .dateline { font: 500 .78rem/1 var(--mono); color: var(--pencil); letter-spacing: .02em; }
.brandbar + main { padding-top: 22px; }
.site-footer { text-align: center; color: var(--pencil); font: 500 .74rem/1.4 var(--mono); padding: 0 16px 28px; }
body[data-stage="phase1"] .brandbar, body[data-stage="phase2"] .brandbar,
body[data-stage="phase1"] .site-footer, body[data-stage="phase2"] .site-footer,
body[data-stage="splash"] .brandbar, body[data-stage="splash"] .site-footer { display: none; }

/* ------------------------------------------------------------------ sheets */
.card {
  background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: clamp(20px, 3.2vw, 32px); margin-bottom: 16px;
  animation: fade-in var(--t) var(--ease) both;
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.step-label { display: inline-block; font: 700 .82rem/1.4 var(--text); font-variant-caps: all-small-caps; letter-spacing: .08em; color: var(--tomato-ink); margin-bottom: 6px; }
.tile { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius); padding: 14px; }
.tile span { color: var(--ink-2); font-size: .92rem; line-height: 1.45; }
/* Numbered rule lists (How to play, Name your prize): Fraunces numerals in the margin. */
.rules { list-style: none; padding-left: 0; counter-reset: rule; }
.rules li { counter-increment: rule; position: relative; padding-left: 2.4em; color: var(--ink); }
.rules li::before {
  content: counter(rule); position: absolute; left: 0; top: -.05em; width: 1.6em; height: 1.6em; display: grid; place-items: center;
  font: 600 .95rem/1 var(--display); color: var(--tomato-ink); border: 1.5px solid currentColor; border-radius: 50%;
}

/* ------------------------------------------------------------------ forms */
label.field { display: block; margin-bottom: 18px; }
label.field > span { display: block; font-weight: 650; margin-bottom: 6px; }
label.field[hidden] { display: none; }                 /* D-45: "Tell us which" shows only after choosing Other */
.other-field { margin: 10px 0 0; }
label.field > .hint { display: block; margin-top: 6px; font-size: .84rem; line-height: 1.45; color: var(--pencil); }
input[type="text"], input[type="email"], input[type="number"], textarea {
  width: 100%; padding: 11px 13px; font: inherit; color: var(--ink);
  background: var(--paper); border: 1.5px solid var(--rule-strong); border-radius: var(--radius);
  transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
input[type="text"]:focus, input[type="email"]:focus, input[type="number"]:focus, textarea:focus { border-color: var(--ink); background: var(--sheet); outline: none; }
input[type="text"]:focus-visible, input[type="email"]:focus-visible, input[type="number"]:focus-visible, textarea:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
input[name="roll"], input[name="otp"], input[type="number"] { font-family: var(--mono); font-variant-numeric: tabular-nums; }
textarea { min-height: 96px; resize: vertical; }
.check { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 12px; cursor: pointer; }
.check input { margin-top: 5px; flex: none; width: 17px; height: 17px; }
input[type="radio"], input[type="checkbox"], input[type="range"] { accent-color: var(--tomato); }
legend { font-weight: 650; margin-bottom: 10px; padding: 0; }
.legend-head { display: block; font: 700 1.1rem/1.3 var(--display); margin-bottom: 4px; }
fieldset { border: 0; padding: 0; margin: 0 0 24px; min-width: 0; }

/* ------------------------------------------------------------------ buttons */
button {
  font: 650 1rem/1.1 var(--text); cursor: pointer; color: var(--ink);
  background: var(--sheet); border: 1.5px solid var(--ink); border-radius: var(--radius);
  padding: 12px 20px; min-height: 46px;
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
button:hover:not(:disabled) { background: var(--sheet-2); }
/* The ink block: hard tomato shadow, pressed into it on click. */
button.primary { background: var(--ink); color: var(--on-ink); border-color: var(--ink); box-shadow: 3px 3px 0 var(--tomato); }
button.primary:hover:not(:disabled) { background: var(--ink); box-shadow: 4px 4px 0 var(--tomato); transform: translate(-1px, -1px); }
button.primary:active:not(:disabled) { box-shadow: 0 0 0 var(--tomato); transform: translate(3px, 3px); }
button:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
button.primary:disabled { background: var(--pencil); border-color: var(--pencil); opacity: .55; }
/* Link buttons: Back, Skip, Not now. */
button.back, .qactions button:not(.primary), .serious-leave, .linklike {
  background: none; border: 0; box-shadow: none; padding: 12px 6px; min-height: 44px;
  color: var(--pencil); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1.5px;
}
button.back:hover:not(:disabled), .qactions button:not(.primary):hover:not(:disabled), .serious-leave:hover:not(:disabled), .linklike:hover:not(:disabled) { background: none; color: var(--ink); }
.qactions button:not(.primary)::after { content: " \2192"; }
.linklike { padding: 0; min-height: 0; color: var(--tomato-ink); font-weight: 650; }
.actions { display: flex; gap: 14px; justify-content: flex-end; align-items: center; flex-wrap: wrap; margin-top: 20px; }
.error { color: var(--tomato-ink); font-weight: 650; min-height: 1.5em; margin-top: 8px; }

/* ------------------------------------------------------------------ question screen */
.qhead {
  position: sticky; top: 0; z-index: 5; margin: 0 -16px 18px; padding: 14px 16px 12px;
  background: color-mix(in srgb, var(--paper) 94%, transparent); border-bottom: 1px solid var(--rule);
}
.topbar { display: flex; align-items: center; gap: 18px; }
.topbar .qnum { flex: none; font: 600 .82rem/1 var(--mono); color: var(--pencil); font-variant-numeric: tabular-nums; }
.progress { flex: 1; min-width: 0; }
/* The ruler: one tick per question, evenly spaced (nothing marks question 16, G7). */
.ruler { display: grid; grid-template-columns: repeat(var(--n, 30), minmax(0, 1fr)); gap: 3px; align-items: end; height: 16px; }
.ruler i { display: block; justify-self: center; width: 2px; height: 7px; background: var(--rule-strong); }
.ruler i.done { height: 10px; background: var(--ink); }
.ruler i.cur { width: 4px; height: 16px; background: var(--tomato); }
.ruler i.just { animation: filed var(--t-slow) var(--ease) both; }     /* "filed": same for submit and skip (G1) */
@keyframes filed { from { background: var(--tomato); height: 16px; width: 4px; } to { background: var(--ink); height: 10px; width: 2px; } }
/* Clock ticket */
.timer-pill {
  position: relative; flex: none; display: inline-flex; align-items: baseline; gap: 8px;
  padding: 5px 12px; background: var(--sheet); border: 1.5px solid var(--ink); border-radius: var(--radius);
}
.timer { font: 700 1.4rem/1.1 var(--mono); font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.timer-pill .small { font: 650 .78rem/1 var(--text); font-variant-caps: all-small-caps; letter-spacing: .06em; color: var(--pencil); }
.timer-pill.low .timer { background: linear-gradient(transparent 22%, color-mix(in srgb, var(--marigold) 65%, transparent) 22% 88%, transparent 88%); }
/* PAUSED rubber stamp during the quote splash */
.timer-pill .stamp {
  position: absolute; right: -10px; top: -14px; padding: 2px 8px; pointer-events: none;
  font: 800 .72rem/1.3 var(--mono); letter-spacing: .18em; text-transform: uppercase;
  color: var(--tomato-ink); border: 2px solid var(--tomato); border-radius: 3px; background: var(--paper);
  transform: rotate(-8deg); opacity: 0; transition: opacity var(--t-fast) var(--ease);
}
.timer-pill.paused { border-color: var(--tomato); }
.timer-pill.paused .stamp { opacity: 1; animation: stamp-in var(--t-fast) var(--ease) both; }
.timer-pill.paused .small { visibility: hidden; }
@keyframes stamp-in { from { opacity: 0; transform: rotate(-8deg) scale(1.3); } to { opacity: 1; transform: rotate(-8deg) scale(1); } }

/* The sheet: numeral gutter + content. Fade only (G4). */
.qscreen { animation: fade-in 160ms var(--ease) both; }
.qcard {
  display: grid; grid-template-columns: 92px minmax(0, 1fr); column-gap: 22px; align-items: start;
  padding: clamp(22px, 3.2vw, 34px) clamp(20px, 3.2vw, 36px) clamp(22px, 3.2vw, 34px) clamp(14px, 2vw, 22px);
}
.qcard > * { grid-column: 2; }
.qcard > .qnumeral {
  grid-column: 1; grid-row: 1 / span 8; align-self: start; text-align: right;
  font: 300 clamp(3.4rem, 2.6rem + 3vw, 5.4rem)/.85 var(--display); font-variation-settings: "opsz" 144;
  color: var(--pencil); letter-spacing: -0.04em; font-variant-numeric: lining-nums;
}
.qcard.veiled { visibility: hidden; animation: none; }
.stem { font: 500 clamp(1.1rem, 1.02rem + .4vw, 1.3rem)/1.55 var(--text); white-space: pre-line; margin-bottom: 22px; max-width: 60ch; }
.stem .line { display: block; }
.glyphs { font-family: "Segoe UI Symbol", "DejaVu Sans", "Noto Sans Symbols 2", "Apple Symbols", var(--text); font-size: 1.45em; letter-spacing: .25em; line-height: 1.6; }
.number-row { display: flex; align-items: center; gap: 8px; }
.number-row input { width: 7.5em; }
/* Quote bar: a pull quote in the margin, not a box (identical for every arm, G2). */
.banner { margin-bottom: 18px; }
.banner.quote {
  position: relative; padding: 0 0 0 26px; border: 0; background: none;
  font: italic 420 clamp(1.02rem, .95rem + .35vw, 1.18rem)/1.5 var(--display); color: var(--ink-2);
}
.banner.quote::before { content: "\201C"; position: absolute; left: -2px; top: -.18em; font: 700 2.4rem/1 var(--display); color: var(--tomato); }
/* D-45: the quote morphs into the bar (a positioned copy of the bar flies in; see playQuoteSplash). */
.banner.quote.quote-ghost, .quote-ghost { position: fixed; z-index: 4; margin: 0; pointer-events: none; transform-origin: 50% 50%; will-change: transform, opacity; }
.qcard.unveil { animation: fade-in 380ms var(--ease) 560ms both; }   /* opacity only (G4); after the quote has nearly landed */
.qcard.morphing .banner.quote { visibility: hidden; }                    /* the ghost stands in for it */
.quote-splash.leaving::before { transition-duration: 600ms; }
/* Options: rows with a circled letter; the chosen one gets the hand-drawn ink ring. */
.options { display: grid; gap: 10px; }
@media (min-width: 900px) { .options.two-col { grid-template-columns: 1fr 1fr; } }
.option {
  display: flex; gap: 14px; align-items: center; width: 100%; text-align: left;
  padding: 11px 14px 11px 10px; min-height: 56px; background: var(--paper);
  border: 1.5px solid var(--rule-strong); border-radius: var(--radius);
  font: 500 1.05rem/1.4 var(--text); color: var(--ink);
  transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.option:hover:not(:disabled) { border-color: var(--ink); background: var(--sheet); }
.option[aria-pressed="true"] { border-color: var(--ink); background: var(--sheet-2); }
.option .letter {
  position: relative; flex: none; width: 36px; height: 36px; display: grid; place-items: center;
  font: 650 1.05rem/1 var(--display); color: var(--ink);
  border: 1.2px solid var(--rule-strong); border-radius: 50%;
}
.option[aria-pressed="true"] .letter { border-color: transparent; }
.option .ring { position: absolute; inset: -7px; width: calc(100% + 14px); height: calc(100% + 14px); overflow: visible; pointer-events: none; opacity: 0; }
.option[aria-pressed="true"] .ring { opacity: 1; }
.option .ring path { fill: none; stroke: var(--tomato); stroke-width: 2.6; stroke-linecap: round;
  stroke-dasharray: 100; stroke-dashoffset: 100; transition: stroke-dashoffset var(--t) var(--ease); }
.option[aria-pressed="true"] .ring path { stroke-dashoffset: 0; }
.keyhint { font: .78rem/1.6 var(--text); color: var(--pencil); margin: 16px 0 0; text-align: right; }
.keyhint kbd { font: 600 .72rem/1 var(--mono); padding: 2px 6px; border: 1px solid var(--rule-strong); border-bottom-width: 2px; border-radius: 3px; background: var(--paper); color: var(--ink-2); }
@media (hover: none), (pointer: coarse) { .keyhint { display: none; } }
.stem-figure { margin: 14px 0 0; }
.stem-image { display: block; max-width: 100%; max-height: 320px; height: auto; margin: 0 auto; border: 1px solid var(--rule); }
.image-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.option.has-image { justify-content: flex-start; }
.option-image { max-width: 100%; max-height: 200px; height: auto; min-width: 0; margin: 0 auto; }

/* Quote splash: a centred pull quote; the page dims to paper. */
.quote-splash { position: fixed; inset: 0; z-index: 4; display: grid; place-items: center; padding: 100px 16px 48px; pointer-events: none; }
.quote-splash::before { content: ""; position: absolute; inset: 0; background: color-mix(in srgb, var(--paper) 96%, transparent); transition: opacity var(--t-slow) var(--ease); }
.quote-splash.leaving::before { opacity: 0; }
.quote-float {
  position: relative; margin: 0; max-width: min(26ch, 100%); text-align: center; color: var(--ink); text-wrap: balance;
  font: italic 400 clamp(1.5rem, 1.1rem + 2vw, 2.4rem)/1.4 var(--display);
  animation: quote-in var(--t-slow) var(--ease) both; will-change: transform, opacity;
}
.quote-float::before { content: "\201C"; display: block; height: .5em; margin-bottom: .2em; font: 700 3.4rem/1 var(--display); font-style: normal; color: var(--tomato); }
@keyframes quote-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ------------------------------------------------------------------ lobby: the clipping (bare, G5) */
.statcard {
  position: relative; margin: 8px 0 16px; padding: 20px 22px 18px; background: var(--sheet); border: 1px solid var(--rule);
  -webkit-mask: radial-gradient(5px 4px at 6px 0, transparent 98%, #000) -6px 0 / 12px 100% repeat-x;
          mask: radial-gradient(5px 4px at 6px 0, transparent 98%, #000) -6px 0 / 12px 100% repeat-x;
}
.statcard .step-label { color: var(--pencil); }     /* G5: no accent colour next to the norm message */
.message { font: 500 clamp(1.15rem, 1.05rem + .5vw, 1.4rem)/1.5 var(--text); margin: 4px 0 0; color: var(--ink); }
.lobby-tips { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
@media (max-width: 640px) { .lobby-tips { grid-template-columns: 1fr; } }
.meta-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.chip, .splash-chips span {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px dashed var(--rule-strong); border-radius: var(--radius);
  font: 600 .78rem/1 var(--mono); color: var(--ink-2); background: var(--paper);
}

/* ------------------------------------------------------------------ choices and scales */
.likert { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.likert[data-points="11"] { grid-template-columns: repeat(11, minmax(0, 1fr)); }
.likert[data-points="5"] { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.likert label {
  display: grid; place-items: center; min-height: 44px; cursor: pointer; background: var(--paper);
  border: 1.5px solid var(--rule-strong); border-radius: var(--radius);
  font: 600 .88rem/1 var(--mono); font-variant-numeric: tabular-nums; color: var(--ink-2);
  transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.likert label:hover { border-color: var(--ink); }
.likert input { position: absolute; opacity: 0; pointer-events: none; }
.likert label:has(input:checked) { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.likert label:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.likert-ends { display: flex; justify-content: space-between; font-size: .8rem; color: var(--pencil); margin-top: 6px; }
.choices { display: grid; gap: 8px; }
.choices label {
  display: flex; gap: 12px; align-items: flex-start; padding: 10px 14px; cursor: pointer; background: var(--paper);
  border: 1.5px solid var(--rule-strong); border-radius: var(--radius); transition: border-color var(--t-fast) var(--ease);
}
.choices label:hover { border-color: var(--ink); }
.choices label:has(input:checked) { border-color: var(--ink); background: var(--sheet-2); }
.choices input { margin-top: 5px; flex: none; }
.choices.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.choices.chips label { padding: 7px 12px; align-items: center; font-size: .93rem; }
.choices.chips input { margin-top: 0; }
/* Debrief stepper */
.stepper { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; font: 700 .84rem/1 var(--text); font-variant-caps: all-small-caps; letter-spacing: .08em; color: var(--pencil); }
.stepper .bar { flex: 1; height: 3px; background: var(--rule); }
.stepper .bar > div { height: 100%; background: var(--ink); }

/* ------------------------------------------------------------------ splash: the front page */
body[data-stage="splash"] main { max-width: none; padding: 0; }
.splash {
  min-height: 100vh; min-height: 100dvh; padding: clamp(28px, 6vw, 72px) clamp(20px, 6vw, 96px);
  display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, .8fr); gap: clamp(24px, 5vw, 72px); align-items: center;
  max-width: 1200px; margin: 0 auto;
}
.splash-inner { display: grid; justify-items: start; gap: 18px; }
.splash h1 {
  margin: 0; font: 300 clamp(3.4rem, 1.8rem + 6.5vw, 6.6rem)/.92 var(--display); font-variation-settings: "opsz" 144;
  letter-spacing: -0.045em; color: var(--ink);
}
.splash .splash-tagline { margin: 0; font: 450 clamp(1.08rem, 1rem + .4vw, 1.3rem)/1.5 var(--text); color: var(--ink-2); max-width: 40ch; }
.splash-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.splash-start { margin-top: 6px; padding: 15px 38px; font-size: 1.1rem; }
.splash-hint { margin: 0; font: 500 .78rem/1.4 var(--mono); color: var(--pencil); }
.splash .dev-quick { margin-top: -4px; }
/* Halftone teaser: the one ornament of the splash. */
.teaser {
  justify-self: center; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 18px; width: min(260px, 100%);
  background: var(--sheet); border: 1.5px solid var(--ink); box-shadow: 6px 6px 0 var(--tomato); transform: rotate(2deg);
}
.teaser i { aspect-ratio: 1; display: grid; place-items: center; border: 1px solid var(--rule-strong); }
.teaser i.f { background: radial-gradient(circle, var(--ink) 30%, transparent 32%) 0 0 / 6px 6px; }
.teaser i.q::after { content: "?"; font: 700 1.6rem/1 var(--display); color: var(--tomato); }
@media (max-width: 900px) {
  .splash { grid-template-columns: 1fr; text-align: left; }
  .teaser { display: none; }
}

/* ------------------------------------------------------------------ wizard: the entry coupon */
.wizard { position: relative; max-width: 760px; margin-inline: auto; border: 1.5px dashed var(--rule-strong); background: var(--sheet); }
.wizard::before { content: "\2702"; position: absolute; top: -.85em; left: 18px; padding: 0 6px; background: var(--paper); color: var(--pencil); font-size: 1.1rem; }
.wizard h2 { margin-top: 0; }
.wizard h2:focus { outline: none; }
.wizard h2:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
.wstep { animation: fade-in var(--t) var(--ease) both; }
.navrow { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 20px; }
.navrow .primary { min-width: 9rem; }
/* Edition stepper: numerals in rings, the current one in tomato. */
.dots { list-style: none; display: flex; justify-content: center; gap: 8px; padding: 0; margin: 6px 0 18px; }
.dots li { margin: 0; }
.dots li .n { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 1.2px solid var(--rule-strong); font: 600 .85rem/1 var(--display); color: var(--pencil); }
.dots li.done .n { border-color: var(--ink); color: var(--ink); }
.dots li.cur .n { border: 2px solid var(--tomato); color: var(--ink); font-weight: 800; }
.nick-row { display: flex; align-items: flex-end; gap: 14px; }
.nick-row label.field { flex: 1; }
.nick-avatar { margin-bottom: 20px; color: var(--ink); }
@media (max-width: 640px) { .wizard { margin-inline: 0; } .navrow .primary { flex: 1; } }

/* Name your prize: the bid slip */
.prize-inputs { display: flex; align-items: center; gap: 12px; }
.prize-inputs input[type="range"] { flex: 1; height: 30px; }
.prize-inputs input[type="number"] { width: 8.5rem; font: 700 1.25rem/1 var(--mono); text-align: right; padding: 10px 12px; }
.prize-inputs .rupee { font: 650 1.25rem/1 var(--text); color: var(--ink-2); }
.prize-scale { margin: 4px calc(8.5rem + 40px) 0 0; }
.scale-ticks { display: flex; justify-content: space-between; align-items: flex-start; height: 10px; }
.scale-ticks i { width: 1px; height: 5px; background: var(--rule-strong); }
.scale-ticks i.major { height: 10px; background: var(--ink); }
.scale-labels { display: flex; justify-content: space-between; font: 500 .74rem/1.6 var(--mono); color: var(--pencil); }
@media (max-width: 640px) { .prize-scale { margin-right: 0; } }
.prize-line { margin: 18px 0 8px; padding: 10px 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); text-align: left; }
.prize-line p { margin: 0; font: 500 .82rem/1.6 var(--mono); color: var(--ink-2); }

/* Play-for-real: the pledge */
.serious { grid-template-columns: 1fr; justify-items: center; text-align: center; }
.serious .splash-inner { justify-items: center; max-width: 640px; }
.serious .serious-title { margin: 0; font: 700 clamp(2.1rem, 1.4rem + 3.4vw, 3.4rem)/1.05 var(--display); letter-spacing: -0.02em; }
.serious .splash-tagline { max-width: 58ch; text-align: left; }
.serious-actions { display: flex; flex-wrap: wrap; gap: 18px; justify-content: center; align-items: center; margin-top: 8px; }
.serious-actions .splash-start { margin-top: 0; }

/* Policy dialog */
dialog.policy {
  width: min(720px, calc(100vw - 32px)); max-height: min(80vh, 900px); overflow: auto;
  border: 1.5px solid var(--ink); border-radius: var(--radius); padding: clamp(20px, 3vw, 32px);
  background: var(--sheet); color: var(--ink); box-shadow: 6px 6px 0 var(--tomato);
}
dialog.policy::backdrop { background: color-mix(in srgb, var(--paper) 70%, transparent); }
dialog.policy h3 { font-size: 1.05rem; margin-top: 20px; }
dialog.policy p { font-size: .95rem; color: var(--ink-2); }

/* ------------------------------------------------------------------ reveal: an article */
.article > p:first-of-type { display: flow-root; }  /* contains the drop cap, even in a one-line paragraph */
.article > p:first-of-type::first-letter {
  float: left; margin: .06em .08em 0 0; font: 700 3.6em/.8 var(--display); color: var(--tomato-ink);
}
.article > p { max-width: 65ch; }
.edition-box { margin: 18px 0 0; padding: 14px 16px; border: 1px solid var(--rule-strong); background: var(--paper); }
.edition-box p { margin: 0; }

/* ------------------------------------------------------------------ results: standings */
.finish { padding-top: clamp(26px, 5vw, 40px); }
.done-avatar { display: flex; justify-content: center; margin-bottom: 6px; color: var(--ink); }
.score { text-align: center; margin: 4px 0 8px; font: 300 clamp(3.6rem, 2.6rem + 4vw, 5.6rem)/.95 var(--display); font-variation-settings: "opsz" 144; font-variant-numeric: lining-nums tabular-nums; letter-spacing: -0.03em; }
.rank-line { text-align: center; margin: 0 0 6px; font: 650 .95rem/1.4 var(--mono); color: var(--tomato-ink); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); margin: 18px 0; border-top: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); }
.stats div { padding: 12px 6px; text-align: center; font: 650 .85rem/1.3 var(--text); font-variant-caps: all-small-caps; letter-spacing: .06em; color: var(--pencil); }
.stats div + div { border-left: 1px solid var(--rule); }
.stats b { display: block; font: 600 1.6rem/1.2 var(--display); color: var(--ink); letter-spacing: 0; font-variant-caps: normal; }
.tabs { display: flex; justify-content: center; gap: 4px; margin: 20px 0 12px; border-bottom: 1px solid var(--rule); }
.tab { background: none; border: 0; border-bottom: 3px solid transparent; border-radius: 0; box-shadow: none; padding: 10px 16px; min-height: 0; margin-bottom: -1px; font: 700 1.05rem/1 var(--display); color: var(--pencil); }
.tab:hover:not(:disabled) { background: none; color: var(--ink); }
.tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ink); }
.tab-panel { text-align: left; animation: fade-in var(--t) var(--ease); }
.tab-panel > .muted:first-child { text-align: center; margin-bottom: 0; }
.style-card { margin: 20px auto 4px; max-width: 30rem; padding: 16px 20px; text-align: left; border-left: 3px solid var(--tomato); background: var(--paper); }
.style-card p { margin: 6px 0 0; }
.style-tag { display: flex; align-items: center; gap: 10px; margin-top: 2px; font: 700 1.5rem/1.2 var(--display); }
.style-tag::before { content: "\2726"; color: var(--tomato); font-size: 1.1rem; }
.style-emoji { display: none; }
/* League table */
.leaderboard { width: 100%; border-collapse: collapse; margin: 10px 0 8px; text-align: left; font-variant-numeric: tabular-nums; }
.leaderboard th { padding: 8px 10px; border-bottom: 1.5px solid var(--ink); font: 700 .8rem/1 var(--text); font-variant-caps: all-small-caps; letter-spacing: .08em; color: var(--pencil); }
.leaderboard td { padding: 10px; border-bottom: 1px solid var(--rule); }
.leaderboard th.num, .leaderboard td.num { text-align: right; }
.leaderboard td.num { font: 600 .92rem/1.4 var(--mono); }
.leaderboard td.time { color: var(--pencil); }
.leaderboard td:first-child { font: 600 1.05rem/1 var(--display); }
.leaderboard tr.you td { background: linear-gradient(transparent 18%, color-mix(in srgb, var(--marigold) 40%, transparent) 18% 86%, transparent 86%); }
.leaderboard tr.pooled td { color: var(--pencil); font-style: italic; }
.leaderboard td.who .avatar { margin-right: 10px; vertical-align: -7px; color: var(--ink-2); }
.medal { display: inline-grid; place-items: center; min-width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--ink); font: 700 .85rem/1 var(--display); }
.medal.m1 { border-color: var(--tomato); color: var(--tomato-ink); }
.delta { margin-left: 8px; font-size: .75rem; color: var(--pencil); animation: delta-fade 2.4s var(--ease) forwards; }
@keyframes delta-fade { 0%, 70% { opacity: 1; } 100% { opacity: 0; } }

/* ------------------------------------------------------------------ corner widgets */
/* Progress ticket (D-32): perforated left edge. */
.journey-pill {
  position: fixed; right: 16px; bottom: 16px; z-index: 40; display: flex; align-items: center; gap: 10px;
  padding: 8px 14px 8px 18px; background: var(--sheet); border: 1px solid var(--rule-strong);
  font: 600 .76rem/1 var(--mono); color: var(--ink-2);
}
.journey-pill::before { content: ""; position: absolute; left: 5px; top: 4px; bottom: 4px; width: 0; border-left: 2px dotted var(--rule-strong); }
.journey-pill[hidden] { display: none; }
.journey-track { position: relative; width: 80px; height: 4px; background: var(--rule); }
.journey-fill { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--ink); transition: width var(--t-slow) var(--ease); }
body.journey-on main { padding-bottom: 80px; }
/* Live ticker (D-33): one fixed place, bottom-left; never on the lobby or under the quote (G5). */
.live-badge { display: inline-flex; align-items: center; gap: 8px; font: 600 .76rem/1 var(--mono); color: var(--ink-2); }
.live-badge[hidden] { display: none; }
.live-badge.fixed { position: fixed; bottom: 16px; left: 16px; z-index: 44; margin: 0; padding: 9px 12px; background: var(--sheet); border: 1px solid var(--rule-strong); }
body.lobby .live-badge.fixed, body.quote-up .live-badge.fixed { visibility: hidden; }
@media (max-width: 720px) { .live-badge.fixed { bottom: 64px; left: 12px; } }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--tomato); animation: live-blink 2.4s ease-in-out infinite; }
.live-badge[data-kind="total"] .live-dot { background: var(--pencil); animation: none; }
@keyframes live-blink { 50% { opacity: .3; } }
/* Sound toggle (D-36) */
.sound-toggle { position: fixed; top: 14px; right: 14px; z-index: 45; width: 38px; height: 38px; min-height: 0; padding: 0;
  display: grid; place-items: center; font-size: 1rem; background: var(--sheet); border: 1px solid var(--rule-strong); box-shadow: none; }
.avatar { display: inline-block; vertical-align: middle; flex: none; }

/* ------------------------------------------------------------------ small screens */
@media (max-width: 640px) {
  main { padding-bottom: 120px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats div:nth-child(3) { border-left: 0; }
  .likert[data-points="11"] { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .image-options { grid-template-columns: 1fr 1fr; gap: 8px; }
  .option.has-image { flex-direction: column; align-items: stretch; gap: 6px; padding: 10px; }
  .qcard { grid-template-columns: minmax(0, 1fr); padding: 18px 16px; }
  .qcard > * { grid-column: 1; }
  .qcard > .qnumeral { grid-row: auto; text-align: left; font-size: 2.6rem; margin-bottom: 8px; }
  .qactions {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; margin: 0;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: var(--sheet); border-top: 1.5px solid var(--ink);
  }
  .qactions button { flex: 1; }
  .timer-pill .small { display: none; }
  .topbar { gap: 10px; }
  .timer { font-size: 1.15rem; }
  .stem { margin-bottom: 16px; }
  .option { padding: 9px 12px 9px 8px; min-height: 50px; }
  .actions button.primary { flex: 1; }
  .ruler { gap: 2px; }
}
/* Narrow windows: corner widgets step aside during the questions (G9). */
@media (max-width: 720px) {
  body[data-stage="phase1"] .journey-pill, body[data-stage="phase2"] .journey-pill,
  body[data-stage="phase1"] .live-badge.fixed, body[data-stage="phase2"] .live-badge.fixed,
  body[data-stage="phase1"] .sound-toggle, body[data-stage="phase2"] .sound-toggle { display: none; }
}

/* ------------------------------------------------------------------ motion preferences (G8) */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .option .ring path { stroke-dashoffset: 100; }
  .option[aria-pressed="true"] .ring path { stroke-dashoffset: 0; }
}

/* Testing only (D-42): visibly not part of the game. */
.dev-quick { border: 1.5px dashed var(--pencil) !important; background: none !important; box-shadow: none !important; color: var(--pencil) !important; font: 600 .8rem/1 var(--mono) !important; text-decoration: none !important; }
