/* Hallmark · shape: app screen · genre: editorial · theme: Brutal (deal 1/3, seed bold-daily-news-magazine-23e3·9c29ee8a·2026-11-28·r1)
 * nav: ruled top bar of boxed cells, bottom tab bar under 48rem · signature: the story of the day as a boxed poster cell (photo, capitals, the twist in yellow, the big number in its own cell), and "Call it", the forecast you place against the AI · states: loading, empty, error, full, signed out, called, settled
 * axes: light/grotesk-heavy/chromatic-yellow · posture: committed · contrast: pass · v2.0.0 */
/* Hallmark · pre-emit critique: P4 H4 E4 S5 R4 V4 · weakest: H, a news day has no fixed hero; the lead story is chosen by the editor each morning and set as the poster cell, so the first screen always carries the day's one jaw-dropper */
/* answered F-dark: the reader asked for a dark mode; it inverts paper and ink and keeps the one yellow fill */
/* waive 39b: the odds are tap cells in a 5-up grid and the lead "Read the story" cell fills its row; both are cells, not buttons in a row */
/* waive 49b: headlines are links and wrap by design; the wordmark is set in two lines on purpose */
/* waive 72: details.leftout is measured while closed */
@import url("./tokens.css");
@import url("./base.css");

:root {
  --text-body: 1.0625rem;
  --text-poster: clamp(2rem, 4.6vw, 3.6rem);
  --text-figure: clamp(2.6rem, 6vw, 4.6rem);
  --color-up: oklch(45% 0.13 150);
  --color-down: oklch(50% 0.19 29);
  --measure: 66ch;
  --bar-h: 60px;
  --tabbar-h: 0px;
  --app-max: 1280px;
  --pad: 40px;
  --rule: var(--rule-bar) solid var(--color-rule);
  --hair: var(--rule-hair) solid var(--color-rule);
}
:root[data-size="large"] { --text-body: 1.1875rem; }
:root[data-theme="dark"] {
  color-scheme: dark;
  --color-paper: oklch(14% 0.006 95); --color-paper-2: oklch(19% 0.007 95); --color-paper-3: oklch(25% 0.008 95);
  --color-ink: oklch(95% 0.006 95); --color-ink-2: oklch(88% 0.006 95); --color-muted: oklch(72% 0.008 95);
  --color-rule: oklch(90% 0.006 95);
  --color-accent: oklch(90% 0.19 105); --color-accent-ink: oklch(10% 0.006 95); --color-focus: oklch(88% 0.17 105);
  --color-up: oklch(76% 0.14 150); --color-down: oklch(72% 0.16 29);
  --color-error: oklch(72% 0.16 29); --color-success: oklch(76% 0.14 150);
}

body { font-size: var(--text-body); line-height: 1.5; padding-bottom: var(--tabbar-h); }
main { outline: none; }
.wrap { width: 100%; max-width: var(--app-max); margin-inline: auto; padding-inline: var(--pad); }
.skip { position: absolute; left: var(--space-sm); top: -100px; z-index: var(--z-modal); background: var(--color-ink); color: var(--color-paper); padding: var(--space-xs) var(--space-sm); }
.skip:focus-visible { top: var(--space-sm); }
h1, h2, .caps { font-family: var(--font-display); font-weight: var(--display-weight); text-transform: uppercase; letter-spacing: var(--tracking-display); line-height: 1; }
h3 { font-family: var(--font-display); font-weight: 700; letter-spacing: 0; text-transform: none; }
mark { background: var(--color-accent); color: var(--color-accent-ink); padding: 0 0.15em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
a:hover { background: var(--color-accent); color: var(--color-accent-ink); }
::selection { background: var(--color-accent); color: var(--color-accent-ink); }

/* ---------- top bar: boxed cells ---------- */
.topbar { position: sticky; top: 0; z-index: var(--z-sticky-nav); display: flex; align-items: stretch; height: var(--bar-h); background: var(--color-paper); border-bottom: var(--rule); }
.wordmark { display: flex; align-items: center; padding-inline: var(--pad) var(--space-lg); font: var(--display-weight) var(--text-md)/0.9 var(--font-display); text-transform: uppercase; letter-spacing: -0.02em; text-decoration: none; color: var(--color-ink); border-right: var(--rule); }
.nav { display: flex; }
.nav a, .nav-cell { display: flex; align-items: center; gap: var(--space-xs); padding-inline: var(--space-lg); border-right: var(--rule); font-weight: 700; font-size: var(--text-sm); text-decoration: none; color: var(--color-ink); }
.nav-cell { border-right: 0; border-left: var(--rule); }
.nav a:hover, .nav-cell:hover { background: var(--color-accent); color: var(--color-accent-ink); }
.nav a[aria-current="page"], .nav-cell[aria-current="page"] { background: var(--color-ink); color: var(--color-paper); }
.nav__n { background: var(--color-accent); color: var(--color-accent-ink); font-weight: 900; padding: 0 var(--space-2xs); font-variant-numeric: tabular-nums; }
.search { margin-left: auto; display: flex; align-items: center; padding-inline: var(--space-md); }
.search input { width: 240px; height: 40px; border: var(--rule); background: var(--color-paper); color: var(--color-ink); padding: 0 var(--space-sm); border-radius: 0; }
.search input::placeholder, .input::placeholder, textarea::placeholder { color: var(--color-muted); }
.search input:focus-visible, .input:focus-visible, textarea:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 0; }

.tabbar { display: none; }
@media (max-width: 48rem) {
  :root { --pad: 16px; --bar-h: 52px; --tabbar-h: calc(62px + env(safe-area-inset-bottom)); }
  .nav, .search { display: none; }
  .wordmark { border-right: 0; padding-left: var(--pad); }
  .nav-cell { margin-left: auto; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; inset: auto 0 0 0; z-index: var(--z-sticky-nav); height: var(--tabbar-h); padding-bottom: env(safe-area-inset-bottom); background: var(--color-paper); border-top: var(--rule); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-3xs); color: var(--color-ink); text-decoration: none; font-size: var(--text-xs); font-weight: 700; }
  .tabbar a + a { border-left: var(--hair); }
  .tabbar a:hover { background: var(--color-accent); color: var(--color-accent-ink); }
  .tabbar a[aria-current="page"] { background: var(--color-ink); color: var(--color-paper); }
  .tabbar svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: miter; }
}

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-xs); min-height: 48px; padding: 0 var(--space-lg); border: var(--rule); border-radius: 0; background: var(--color-paper); color: var(--color-ink); font-weight: 700; font-size: var(--text-sm); text-decoration: none; cursor: pointer; transition: none; }
.btn:hover { background: var(--color-ink); color: var(--color-paper); }
.btn:active { background: var(--color-accent); color: var(--color-accent-ink); }
.btn--ink { background: var(--color-ink); color: var(--color-paper); }
.btn--ink:hover { background: var(--color-paper); color: var(--color-ink); }
.btn:disabled { border-color: var(--color-muted); color: var(--color-muted); background: var(--color-paper); cursor: not-allowed; }
.btn[aria-busy="true"] { cursor: progress; }
.btn svg { width: 18px; height: 18px; fill: currentColor; }
.link { background: none; border: 0; padding: 0; color: var(--color-ink); text-decoration: underline 2px; text-underline-offset: 0.2em; font-weight: 700; cursor: pointer; min-height: 32px; }
.link:hover { background: var(--color-accent); color: var(--color-accent-ink); }

.acts { display: flex; flex-wrap: wrap; border: var(--rule); }
.act { display: inline-flex; align-items: center; gap: var(--space-xs); min-height: 48px; padding: 0 var(--space-md); border: 0; border-right: var(--rule); background: var(--color-paper); color: var(--color-ink); font-weight: 700; font-size: var(--text-sm); cursor: pointer; transition: none; margin: 0 0 0 0; }
.act:last-child { border-right: 0; }
.act svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
.act:hover { background: var(--color-accent); color: var(--color-accent-ink); }
.act[aria-pressed="true"] { background: var(--color-ink); color: var(--color-paper); }
.act[aria-pressed="true"] svg.fillable { fill: currentColor; }
.act:disabled { color: var(--color-muted); cursor: not-allowed; }

/* ---------- masthead ---------- */
.mast { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-lg) var(--space-2xl); align-items: end; padding-block: var(--space-xl) var(--space-lg); }
.mast h1 { font-size: var(--text-poster); max-width: none; }
.mast p { margin-top: var(--space-md); max-width: 62ch; font-size: var(--text-lg); }
.mast__actions { display: flex; flex-wrap: wrap; gap: var(--space-sm); }
.mast__meta { display: flex; flex-wrap: wrap; gap: var(--space-2xs) var(--space-lg); margin-top: var(--space-sm); font-size: var(--text-sm); color: var(--color-muted); }
.mast__meta a { color: var(--color-ink); font-weight: 700; }

/* ---------- cells ---------- */
.cells { display: grid; border: var(--rule); }
.cells > * { min-width: 0; }
.label { font-size: var(--text-sm); color: var(--color-muted); font-weight: 400; }
.ink .label { color: var(--color-paper-3); }
.ink { background: var(--color-ink); color: var(--color-paper); }

/* ---------- story of the day ---------- */
.sotd { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); margin-bottom: var(--space-xl); }
.sotd__text { padding: var(--space-xl); display: grid; align-content: space-between; gap: var(--space-lg); }
.sotd__text h2 { font-size: clamp(1.8rem, 3.3vw, 2.9rem); max-width: 22ch; }
.sotd__text h2 a { text-decoration: none; color: inherit; }
.sotd__text h2 a:hover { background: var(--color-accent); color: var(--color-accent-ink); }
.sotd__hook { font-size: var(--text-lg); max-width: 46ch; }
.sotd__hook mark { font-weight: 700; }
.sotd__photo { border-left: var(--rule); min-height: 380px; }
.sotd__foot { grid-column: 1 / -1; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; border-top: var(--rule); }
.sotd__foot > * + * { border-left: var(--rule); }
.figure-cell { padding: var(--space-md) var(--space-lg); display: grid; align-content: center; }
.figure-cell strong { font: var(--display-weight) var(--text-figure)/0.95 var(--font-display); letter-spacing: var(--tracking-display); font-variant-numeric: tabular-nums; }
.sotd__twist { padding: var(--space-md) var(--space-lg); display: grid; align-content: center; gap: var(--space-2xs); }
.sotd__go { display: flex; align-items: stretch; }
.sotd__go .btn { border: 0; min-height: 100%; padding-inline: var(--space-xl); }

/* ---------- ticker ---------- */
.ticker { display: flex; overflow-x: auto; scrollbar-width: none; border: var(--rule); margin-bottom: var(--space-xl); }
.ticker > div { flex: 1 0 auto; display: grid; padding: var(--space-sm) var(--space-md); font-size: var(--text-sm); font-variant-numeric: tabular-nums; }
.ticker > div + div { border-left: var(--hair); }
.ticker strong { font-weight: 900; font-size: var(--text-md); }
.ticker .up { color: var(--color-up); font-weight: 700; }
.ticker .down { color: var(--color-down); font-weight: 700; }
.ticker__note { flex: none !important; color: var(--color-muted); align-content: center; max-width: 160px; }

/* ---------- section heads ---------- */
.sec { margin-bottom: var(--space-2xl); }
.sec__head { display: flex; align-items: end; justify-content: space-between; gap: var(--space-md); flex-wrap: wrap; border-bottom: var(--rule); padding-bottom: var(--space-sm); margin-bottom: var(--space-lg); }
.sec__head h2 { font-size: var(--text-2xl); }
.sec__head p { color: var(--color-muted); font-size: var(--text-sm); max-width: 48ch; }

/* filters */
.chips { display: flex; flex-wrap: wrap; border: var(--rule); width: fit-content; max-width: 100%; }
.chip { min-height: 44px; padding: 0 var(--space-md); border: 0; border-right: var(--hair); background: var(--color-paper); color: var(--color-ink); font-weight: 700; font-size: var(--text-sm); cursor: pointer; white-space: nowrap; transition: none; }
.chip:last-child { border-right: 0; }
.chip:hover { background: var(--color-paper-2); }
.chip[aria-pressed="true"] { background: var(--color-accent); color: var(--color-accent-ink); }
.chip span { font-weight: 400; margin-left: var(--space-2xs); font-variant-numeric: tabular-nums; }
.filters { display: flex; flex-wrap: wrap; gap: var(--space-sm) var(--space-lg); align-items: center; margin-bottom: var(--space-lg); }
.toggle { display: inline-flex; align-items: center; gap: var(--space-xs); font-size: var(--text-sm); font-weight: 700; cursor: pointer; min-height: 44px; }
.toggle input { width: 20px; height: 20px; accent-color: var(--color-ink); margin: 0; }

/* ---------- story cards (bento) ---------- */
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: var(--rule); border-left: var(--rule); list-style: none; margin: 0; padding: 0; }
.card { border-right: var(--rule); border-bottom: var(--rule); display: grid; grid-template-rows: auto 1fr; min-width: 0; position: relative; }
.card--wide { grid-column: span 2; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: 1fr; }
.card--wide .card__photo { border-bottom: 0; border-right: var(--rule); aspect-ratio: auto; min-height: 280px; }
.card__photo { aspect-ratio: 16 / 10; border-bottom: var(--rule); }
.card__body { padding: var(--space-lg); display: grid; align-content: start; gap: var(--space-sm); }
.card h3 { font-size: var(--text-xl); line-height: 1.2; }
.card--wide h3 { font-size: var(--text-2xl); }
.card h3 a { color: inherit; text-decoration: none; }
.card h3 a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.card h3 a:hover { background: none; }
.card:hover { background: var(--color-accent); color: var(--color-accent-ink); }
.card:hover .meta, .card:hover .label { color: var(--color-accent-ink); }
.card:focus-within { outline: 3px solid var(--color-focus); outline-offset: -3px; }
.card__hook { color: var(--color-ink-2); }
.card:hover .card__hook { color: var(--color-accent-ink); }
.card__fig { font: var(--display-weight) var(--text-2xl)/1 var(--font-display); letter-spacing: var(--tracking-display); font-variant-numeric: tabular-nums; }
.card__fig small { display: block; font: 400 var(--text-sm)/1.4 var(--font-body); letter-spacing: 0; color: var(--color-muted); margin-top: var(--space-2xs); }
.card.is-read h3 { color: var(--color-muted); }
.card.is-read .card__photo img { opacity: 0.5; }

.meta { display: flex; flex-wrap: wrap; gap: var(--space-2xs) var(--space-md); font-size: var(--text-sm); color: var(--color-muted); }
.meta b { color: var(--color-ink); font-weight: 700; }
.card:hover .meta b { color: var(--color-accent-ink); }
.meta .warn { color: var(--color-down); font-weight: 700; }
.meta .ok { color: var(--color-up); font-weight: 700; }
.wild { display: inline-flex; gap: var(--space-3xs); align-items: center; }
.wild i { width: 8px; height: 12px; background: var(--color-paper-3); display: inline-block; }
.wild i.on { background: var(--color-ink); }
.card:hover .wild i.on { background: var(--color-accent-ink); }

/* photos: hard duotone in the ink, flush in a ruled cell */
.photo { position: relative; overflow: hidden; background: var(--color-paper-2); }
.photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.24); }

/* ---------- call it ---------- */
.callit { grid-template-columns: minmax(0, 1fr); margin-bottom: var(--space-2xl); }
.callq { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
.callq + .callq { border-top: var(--rule); }
.callq__q { padding: var(--space-lg); display: grid; gap: var(--space-xs); align-content: start; }
.callq__q h3 { font-size: var(--text-xl); line-height: 1.15; }
.callq__q a { color: var(--color-muted); font-size: var(--text-sm); }
.callq__pick { border-left: var(--rule); display: grid; grid-template-rows: 1fr auto; }
.odds { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.odd { min-height: 72px; border: 0; border-right: var(--hair); background: var(--color-paper); color: var(--color-ink); cursor: pointer; display: grid; place-content: center; gap: var(--space-3xs); padding: var(--space-xs) var(--space-2xs); transition: none; }
.odd:last-child { border-right: 0; }
.odd strong { font: var(--display-weight) var(--text-xl)/1 var(--font-display); font-variant-numeric: tabular-nums; }
.odd span { font-size: var(--text-xs); color: var(--color-muted); }
.odd:hover { background: var(--color-paper-2); }
.odd[aria-pressed="true"] { background: var(--color-accent); color: var(--color-accent-ink); }
.odd[aria-pressed="true"] span { color: var(--color-accent-ink); }
.odd:disabled { cursor: not-allowed; }
.odd:disabled:not([aria-pressed="true"]) { color: var(--color-muted); }
.vs { border-top: var(--rule); display: grid; grid-template-columns: 1fr 1fr; font-size: var(--text-sm); }
.vs > div { padding: var(--space-sm) var(--space-md); }
.vs > div + div { border-left: var(--hair); }
.vs strong { display: block; font: var(--display-weight) var(--text-lg)/1.1 var(--font-display); font-variant-numeric: tabular-nums; }
.vs .ai-hidden { color: var(--color-muted); }

.score { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: var(--space-2xl); }
.score > div { padding: var(--space-lg); display: grid; gap: var(--space-2xs); align-content: end; min-height: 160px; }
.score > div + div { border-left: var(--rule); }
.score strong { font: var(--display-weight) var(--text-figure)/0.95 var(--font-display); letter-spacing: var(--tracking-display); font-variant-numeric: tabular-nums; }
.settled { list-style: none; margin: 0; padding: 0; border: var(--rule); }
.settled li { display: grid; grid-template-columns: 90px minmax(0, 1fr) auto; gap: var(--space-lg); padding: var(--space-md) var(--space-lg); align-items: center; }
.settled li + li { border-top: var(--hair); }
.verdict { font: var(--display-weight) var(--text-lg)/1 var(--font-display); text-transform: uppercase; }
.settled .who { font-size: var(--text-sm); text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.settled .win { background: var(--color-accent); color: var(--color-accent-ink); padding: 0 var(--space-2xs); font-weight: 700; }
.calib { width: 100%; border-collapse: collapse; border: var(--rule); font-variant-numeric: tabular-nums; }
.calib th { text-align: left; font-weight: 400; color: var(--color-muted); font-size: var(--text-sm); padding: var(--space-sm) var(--space-md); border-bottom: var(--rule); }
.calib td { padding: var(--space-sm) var(--space-md); border-top: var(--hair); font-weight: 700; }

/* ---------- quiz ---------- */
.quiz { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.qz { padding: var(--space-lg); display: grid; gap: var(--space-md); align-content: start; }
.qz:nth-child(even) { border-left: var(--rule); }
.qz:nth-child(n+3) { border-top: var(--rule); }
.qz h3 { font-size: var(--text-lg); line-height: 1.25; }
.qz__opts { display: grid; border: var(--rule); }
.qz__opt { text-align: left; min-height: 48px; padding: var(--space-xs) var(--space-md); border: 0; background: var(--color-paper); color: var(--color-ink); font-size: var(--text-sm); font-weight: 700; cursor: pointer; transition: none; }
.qz__opt + .qz__opt { border-top: var(--hair); }
.qz__opt:hover { background: var(--color-paper-2); }
.qz__opt.is-right { background: var(--color-accent); color: var(--color-accent-ink); }
.qz__opt.is-wrong { background: var(--color-ink); color: var(--color-paper); text-decoration: line-through 2px; }
.qz__opt:disabled { cursor: default; }
.qz__explain { font-size: var(--text-sm); color: var(--color-ink-2); }
.quiz-score { font: var(--display-weight) var(--text-2xl)/1 var(--font-display); }

/* ---------- story page ---------- */
.story { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: var(--space-2xl); padding-block: var(--space-lg) var(--space-3xl); }
.story__main { min-width: 0; display: grid; gap: var(--space-lg); align-content: start; }
.crumbs { display: flex; justify-content: space-between; gap: var(--space-md); font-size: var(--text-sm); font-weight: 700; flex-wrap: wrap; }
.crumbs a { color: var(--color-ink); min-height: 32px; display: inline-flex; align-items: center; }
.story h1 { font-size: var(--text-poster); max-width: 20ch; }
.story__hook { font-size: var(--text-xl); line-height: 1.35; max-width: 40ch; }
.story__hook mark { font-weight: 700; }
.story__photo { aspect-ratio: 16 / 8; border: var(--rule); }
.story__simple { font-size: var(--text-lg); line-height: 1.6; max-width: var(--measure); }
.block { border: var(--rule); }
.block > h2 { font-size: var(--text-md); padding: var(--space-sm) var(--space-lg); border-bottom: var(--rule); }
.block > .in { padding: var(--space-lg); }
.block ul { margin: 0; padding-left: 1.1em; display: grid; gap: var(--space-sm); }
.block li { line-height: 1.55; }
.block.ink { border-color: var(--color-ink); }
.block.ink > h2 { border-color: var(--color-paper-3); }
.block.ink ul { list-style: square; }
.facts { list-style: none; padding: 0 !important; }
.facts li { display: grid; gap: var(--space-2xs); }
.facts li + li { border-top: var(--hair); padding-top: var(--space-sm); }
.cite { display: flex; flex-wrap: wrap; gap: var(--space-2xs) var(--space-sm); font-size: var(--text-sm); }
.cite a { color: var(--color-muted); }
.pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.pair > .block + .block { border-left: 0; }
.words { margin: 0; display: grid; gap: var(--space-xs); }
.words dt { font-weight: 700; }
.words dd { margin: 0 0 var(--space-2xs); color: var(--color-ink-2); }
.sources { list-style: none; padding: 0 !important; gap: 0 !important; }
.sources li { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: var(--space-md); font-size: var(--text-sm); padding-block: var(--space-xs); }
.sources li + li { border-top: var(--hair); }
.sources b { font-weight: 700; }
.sources small { display: block; color: var(--color-up); font-weight: 700; }
.sources a { color: var(--color-ink); }
.story__side { display: grid; gap: var(--space-lg); align-content: start; position: sticky; top: calc(var(--bar-h) + var(--space-lg)); }
.story__side .figure-cell { border: var(--rule); padding: var(--space-lg); gap: var(--space-2xs); }
.note textarea, .textarea { width: 100%; min-height: 110px; resize: vertical; border: var(--rule); background: var(--color-paper); color: var(--color-ink); padding: var(--space-sm); border-radius: 0; line-height: 1.5; }
.note__row { display: flex; gap: var(--space-md); align-items: center; margin-top: var(--space-sm); font-size: var(--text-sm); color: var(--color-muted); }
.pager { display: grid; grid-template-columns: 1fr 1fr; border: var(--rule); }
.pager a { padding: var(--space-md) var(--space-lg); text-decoration: none; color: var(--color-ink); display: grid; gap: var(--space-2xs); min-width: 0; }
.pager a + a { border-left: var(--rule); text-align: right; }
.pager b { font-weight: 700; overflow-wrap: break-word; }
.pager span { font-size: var(--text-sm); color: var(--color-muted); }

/* ---------- quick read (story mode) ---------- */
.play { position: fixed; inset: 0; z-index: var(--z-modal); background: var(--color-paper); display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; }
.play__bar { display: flex; gap: var(--space-2xs); padding: var(--space-sm) var(--pad) 0; }
.play__seg { flex: 1; height: 6px; background: var(--color-paper-3); }
.play__seg.done { background: var(--color-ink); }
.play__seg.now { background: var(--color-accent); outline: 2px solid var(--color-ink); outline-offset: -2px; }
.play__top { display: flex; justify-content: space-between; align-items: center; padding: var(--space-xs) var(--pad); font-size: var(--text-sm); font-weight: 700; }
.play__stage { overflow-y: auto; padding: 0 var(--pad) var(--space-lg); display: grid; justify-items: center; }
.play__card { width: 100%; max-width: 760px; border: var(--rule); display: grid; align-content: start; animation: card-in var(--dur-short) var(--ease-out); }
.play__card .photo { aspect-ratio: 16 / 9; border-bottom: var(--rule); }
.play__body { padding: var(--space-lg); display: grid; gap: var(--space-md); }
.play__body h2 { font-size: clamp(1.6rem, 5.4vw, 2.6rem); }
.play__body p { font-size: var(--text-lg); line-height: 1.55; }
.play__nav { display: grid; grid-template-columns: 1fr auto 1fr; border-top: var(--rule); padding-bottom: env(safe-area-inset-bottom); }
.play__nav button, .play__nav a { min-height: 60px; border: 0; background: var(--color-paper); color: var(--color-ink); font-weight: 700; font-size: var(--text-sm); cursor: pointer; display: flex; align-items: center; justify-content: center; text-decoration: none; padding-inline: var(--space-md); transition: none; }
.play__nav > * + * { border-left: var(--rule); }
.play__nav button:hover, .play__nav a:hover { background: var(--color-accent); color: var(--color-accent-ink); }
.play__nav button:disabled { color: var(--color-muted); cursor: not-allowed; background: var(--color-paper); }
.play__end { max-width: 760px; width: 100%; border: var(--rule); padding: var(--space-2xl) var(--space-xl); display: grid; gap: var(--space-lg); }
.play__end h2 { font-size: var(--text-poster); }
@keyframes card-in { from { opacity: 0; transform: translateX(24px); } }

/* ---------- lists: archive, saved, search ---------- */
.page-head { padding-block: var(--space-xl) var(--space-lg); display: grid; gap: var(--space-sm); }
.page-head h1 { font-size: var(--text-poster); }
.page-head p { color: var(--color-ink-2); max-width: 60ch; }
.listtools { display: flex; gap: var(--space-md); flex-wrap: wrap; align-items: center; margin-bottom: var(--space-lg); }
.input { height: 48px; border: var(--rule); background: var(--color-paper); color: var(--color-ink); padding: 0 var(--space-sm); border-radius: 0; width: min(100%, 360px); }
.rows { list-style: none; margin: 0 0 var(--space-3xl); padding: 0; border: var(--rule); }
.rows > li + li { border-top: var(--hair); }
.row { display: grid; grid-template-columns: 130px minmax(0, 1fr) auto; gap: var(--space-lg); padding: var(--space-md) var(--space-lg); align-items: center; text-decoration: none; color: var(--color-ink); }
a.row:hover { background: var(--color-accent); color: var(--color-accent-ink); }
.row__date { font: var(--display-weight) var(--text-lg)/1.05 var(--font-display); text-transform: uppercase; letter-spacing: var(--tracking-display); }
.row__date small { display: block; font: 400 var(--text-sm)/1.4 var(--font-body); text-transform: none; letter-spacing: 0; color: var(--color-muted); }
.row__main { display: grid; gap: var(--space-2xs); min-width: 0; }
.row__main b { font-weight: 700; }
.row__main span { color: var(--color-ink-2); font-size: var(--text-sm); }
.row__side { font-size: var(--text-sm); color: var(--color-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.row__note { grid-column: 2 / -1; font-size: var(--text-sm); background: var(--color-paper-2); padding: var(--space-xs) var(--space-sm); }
.month { font-size: var(--text-lg); margin: var(--space-lg) 0 var(--space-sm); }

/* ---------- settings ---------- */
.settings { display: grid; gap: var(--space-xl); max-width: 760px; padding-bottom: var(--space-3xl); }
.setting { border: var(--rule); padding: var(--space-lg); display: grid; gap: var(--space-sm); }
.setting h2 { font-size: var(--text-xl); }
.setting p { color: var(--color-ink-2); }
.hstack { display: flex; gap: var(--space-md); align-items: center; flex-wrap: wrap; }
.runs { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.runs th { text-align: left; font-weight: 400; color: var(--color-muted); padding: var(--space-xs) var(--space-sm) var(--space-xs) 0; border-bottom: var(--rule); }
.runs td { padding: var(--space-xs) var(--space-sm) var(--space-xs) 0; border-top: var(--hair); vertical-align: top; font-variant-numeric: tabular-nums; }
.status-ok { color: var(--color-up); font-weight: 700; }
.status-error { color: var(--color-error); font-weight: 700; }
.status-running { font-weight: 700; }
.stat { display: flex; gap: var(--space-2xl); flex-wrap: wrap; }
.stat div { display: grid; }
.stat strong { font: var(--display-weight) var(--text-2xl)/1.05 var(--font-display); font-variant-numeric: tabular-nums; }
.stat span { color: var(--color-muted); font-size: var(--text-sm); }

/* ---------- states ---------- */
.state { border: var(--rule); padding: var(--space-xl); max-width: 640px; display: grid; gap: var(--space-md); justify-items: start; margin-block: var(--space-xl); }
.state h2 { font-size: var(--text-xl); }
.state p { color: var(--color-ink-2); }
.state--error h2 { color: var(--color-error); }
.skel { display: grid; gap: var(--space-lg); padding-block: var(--space-xl); }
.skel__line { height: 16px; background: var(--color-paper-2); animation: pulse 1.4s var(--ease-in-out) infinite; }
.skel__line--head { height: 48px; width: 60%; }
.skel__line--short { width: 40%; }
@keyframes pulse { 50% { opacity: 0.45; } }
.leftout { border: var(--rule); padding: var(--space-md) var(--space-lg); margin-bottom: var(--space-lg); }
.leftout summary { cursor: pointer; font-weight: 700; min-height: 32px; display: flex; align-items: center; }
.leftout summary:hover { background: var(--color-accent); color: var(--color-accent-ink); }
.leftout ul { margin: var(--space-md) 0 0; padding-left: 1.1em; display: grid; gap: var(--space-sm); font-size: var(--text-sm); }
.leftout li span { display: block; color: var(--color-muted); }
.colophon { font-size: var(--text-sm); color: var(--color-muted); max-width: var(--measure); padding-bottom: var(--space-3xl); }

/* ---------- sign in ---------- */
.signin { min-height: calc(100dvh - var(--bar-h) - var(--tabbar-h)); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.signin__form { padding: var(--space-3xl) var(--pad); display: grid; align-content: center; gap: var(--space-lg); max-width: 520px; }
.signin__form h1 { font-size: var(--text-poster); }
.signin__ink { padding: var(--space-3xl) var(--space-2xl); display: grid; align-content: end; }
.signin__ink p { font: var(--display-weight) var(--text-poster)/1 var(--font-display); text-transform: uppercase; letter-spacing: var(--tracking-display); max-width: 28ch; }
.field-label { font-size: var(--text-sm); font-weight: 700; display: block; margin-bottom: var(--space-2xs); }
.error-text { color: var(--color-error); font-size: var(--text-sm); min-height: 1.4em; font-weight: 700; }

/* ---------- toast + dialog ---------- */
.toast { position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + var(--space-lg)); transform: translateX(-50%); z-index: var(--z-toast); background: var(--color-ink); color: var(--color-paper); padding: var(--space-sm) var(--space-md); display: flex; gap: var(--space-md); align-items: center; font-size: var(--text-sm); font-weight: 700; max-width: calc(100vw - 32px); }
.toast button { background: var(--color-accent); border: 0; color: var(--color-accent-ink); cursor: pointer; font-weight: 700; min-height: 32px; padding: 0 var(--space-sm); }
.toast button:focus-visible { outline: 2px solid var(--color-paper); }
.dialog { border: var(--rule); padding: var(--space-xl); background: var(--color-paper); color: var(--color-ink); max-width: 440px; width: calc(100% - 32px); }
.dialog::backdrop { background: color-mix(in oklab, var(--color-ink) 50%, transparent); }
.dialog h2 { font-size: var(--text-xl); margin-bottom: var(--space-md); }
.keys { display: grid; grid-template-columns: auto 1fr; gap: var(--space-xs) var(--space-lg); margin: 0 0 var(--space-lg); }
.keys dd { margin: 0; color: var(--color-ink-2); }
kbd { font-family: var(--font-body); font-size: var(--text-sm); border: var(--hair); padding: 0 var(--space-2xs); font-weight: 700; }

/* ---------- responsive ---------- */
@media (max-width: 70rem) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .story { grid-template-columns: minmax(0, 1fr); }
  .story__side { position: static; }
  .score { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .score > div:nth-child(3) { border-left: 0; }
  .score > div:nth-child(n+3) { border-top: var(--rule); }
}
@media (max-width: 48rem) {
  .mast { grid-template-columns: minmax(0, 1fr); padding-top: var(--space-lg); }
  .mast p { font-size: var(--text-md); }
  .sotd { grid-template-columns: minmax(0, 1fr); }
  .sotd__photo { border-left: 0; border-bottom: var(--rule); min-height: 220px; order: -1; }
  .sotd__text { padding: var(--space-lg); }
  .sotd__foot { grid-template-columns: minmax(0, 1fr); }
  .sotd__foot > * + * { border-left: 0; border-top: var(--rule); }
  .sotd__go .btn { width: 100%; min-height: 56px; }
  .grid { grid-template-columns: minmax(0, 1fr); }
  .card--wide { grid-column: auto; grid-template-columns: minmax(0, 1fr); }
  .card--wide .card__photo { border-right: 0; border-bottom: var(--rule); min-height: 0; aspect-ratio: 16 / 10; }
  .card--wide h3 { font-size: var(--text-xl); }
  .callq { grid-template-columns: minmax(0, 1fr); }
  .callq__pick { border-left: 0; border-top: var(--rule); }
  .quiz { grid-template-columns: minmax(0, 1fr); }
  .qz:nth-child(even) { border-left: 0; }
  .qz + .qz { border-top: var(--rule); }
  .pair { grid-template-columns: minmax(0, 1fr); }
  .pair > .block + .block { border-left: var(--rule); border-top: 0; }
  .sources li { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .row { grid-template-columns: minmax(0, 1fr); gap: var(--space-2xs); }
  .row__note { grid-column: auto; }
  .settled li { grid-template-columns: minmax(0, 1fr); gap: var(--space-2xs); }
  .settled .who { text-align: left; }
  .signin { grid-template-columns: minmax(0, 1fr); }
  .signin__ink { display: none; }
  .acts .act { flex: 1 1 auto; justify-content: center; }
  .act { border-bottom: var(--hair); }
  .play__nav button, .play__nav a { min-height: 56px; }
}

@media print {
  .topbar, .tabbar, .acts, .toast, .story__side .note { display: none !important; }
}
.story__side .acts { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.story__side .act { border-right: 0; border-bottom: var(--hair); }
.story__side .act:nth-child(odd) { border-right: var(--hair); }
.story__side .act:last-child:nth-child(odd) { grid-column: 1 / -1; border-right: 0; }
.story__side .act:nth-last-child(-n+2):not(:nth-child(even):last-child ~ *) { border-bottom: 0; }
