/* Dink Digest — viewer v2. Paper, ink, court blue, and one optic-yellow ball. */
:root {
  --paper: #f5f2ea;
  --paper-2: #ece6d8;
  --card: #fbf9f4;
  --ink: #14171c;
  --ink-2: #2b3038;
  --muted: #5c636e;
  --rule: #d9d1c1;
  --rule-strong: #b9ae99;
  --court: #24578a;
  --ny: #24578a;
  --la: #b4462a;
  --clay: #a8452e;
  --ball: #d6f03a;
  --ball-ink: #1b2306;
  --accent: var(--ink);
  --inv-bg: #14171c;
  --inv-fg: #f5f2ea;
  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --gutter: clamp(16px, 4vw, 40px);
  --measure: 40rem;
  --bar-h: 56px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0f1216; --paper-2: #161b21; --card: #151a20; --ink: #ece7dc; --ink-2: #cfcabf; --muted: #9aa3ad;
    --rule: #262d35; --rule-strong: #3a434d; --court: #86b6e6; --ny: #86b6e6; --la: #f2916f; --clay: #ee9576;
    --inv-bg: #1d232b; --inv-fg: #ece7dc;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0f1216; --paper-2: #161b21; --card: #151a20; --ink: #ece7dc; --ink-2: #cfcabf; --muted: #9aa3ad;
  --rule: #262d35; --rule-strong: #3a434d; --court: #86b6e6; --ny: #86b6e6; --la: #f2916f; --clay: #ee9576;
  --inv-bg: #1d232b; --inv-fg: #ece7dc;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--bar-h) + 16px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 18px/1.62 var(--serif); font-optical-sizing: auto;
  text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
html { overflow-x: clip; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--court); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--ink); color: var(--paper); padding: 8px 12px; }
.skip:focus { left: 8px; }
.eyebrow { font: 500 11px/1.4 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 0 14px; }

[data-accent="ny"] { --accent: var(--ny); }
[data-accent="la"] { --accent: var(--la); }
[data-accent="court"] { --accent: var(--court); }
[data-accent="clay"] { --accent: var(--clay); }
[data-accent="ink"] { --accent: var(--ink); }

/* ── Top bar ─────────────────────────────────────────── */
.bar {
  position: fixed; inset: 0 0 auto; z-index: 40; height: var(--bar-h);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px;
  padding: 0 var(--gutter); padding-top: env(safe-area-inset-top);
  height: calc(var(--bar-h) + env(safe-area-inset-top));
  color: #fff; transition: background .3s var(--ease), color .3s var(--ease), border-color .3s;
  border-bottom: 1px solid transparent;
}
.bar.is-solid { background: color-mix(in srgb, var(--paper) 88%, transparent); color: var(--ink); border-bottom-color: var(--rule); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); }
.bar-back { display: inline-flex; align-items: center; gap: 10px; font: 500 12px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; text-decoration: none; justify-self: start; padding: 10px 0; opacity: .7; transition: opacity .2s; }
.bar-back:hover, .bar-back:focus-visible { opacity: 1; }
.bar-back img { width: 26px; height: 26px; border-radius: 6px; }
.bar-brand { font: italic 500 22px/1 var(--serif); text-decoration: none; letter-spacing: -.01em; white-space: nowrap; }
.bar-brand span { font: 500 10px/1 var(--mono); font-style: normal; letter-spacing: .14em; margin-left: 6px; vertical-align: 3px; opacity: .75; }
.bar-actions { justify-self: end; display: flex; align-items: center; gap: 6px; }
.bar-progress-label { font: 500 11px/1 var(--mono); letter-spacing: .06em; opacity: .7; min-width: 3.5ch; text-align: right; margin-right: 4px; font-variant-numeric: tabular-nums; }
.bar-btn { 
  display: inline-flex; align-items: center; gap: 8px; height: 36px; min-width: 36px; justify-content: center; 
  padding: 0 10px; border-radius: 999px; border: 1px solid currentColor; 
  border-color: color-mix(in srgb, currentColor 28%, transparent); background: transparent; cursor: pointer; 
  font: 500 12px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase;
  transition: background .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease), transform .15s var(--ease);
}
.bar-btn:hover { border-color: currentColor; background: color-mix(in srgb, currentColor 8%, transparent); }
.bar-btn:active { transform: scale(0.96); }
.bar-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.bar-track { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; }
.bar-track i { display: block; height: 100%; width: 100%; transform-origin: left; transform: scaleX(0); background: var(--court); }
.bar:not(.is-solid) .bar-track i { background: var(--ball); }

.story, .chapter, .cover, .story-anchor, [id^="page-"], [id^="chapter-"] {
  scroll-margin-top: calc(var(--bar-h) + 20px);
}

/* ── Cover ───────────────────────────────────────────── */
.cover { position: relative; min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end; color: #fff; overflow: hidden; background: #0b0f14; isolation: isolate; }
.cover-photo { position: absolute; inset: 0; z-index: -1; }
.cover-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 38%; transform: scale(1.04); animation: settle 1.8s var(--ease) forwards; }
@keyframes settle { to { transform: scale(1); } }
.cover-photo::after { content: ""; position: absolute; inset: 0; background:
  linear-gradient(180deg, rgba(8,11,15,.55) 0%, rgba(8,11,15,0) 22%),
  linear-gradient(0deg, rgba(8,11,15,.95) 0%, rgba(8,11,15,.8) 38%, rgba(8,11,15,.35) 62%, rgba(8,11,15,.05) 80%); }
.cover-inner { width: 100%; max-width: 1280px; margin: 0 auto; padding: 120px var(--gutter) 28px; }
.cover-issue { text-shadow: 0 1px 12px rgba(0,0,0,.6); display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0 0 18px; font: 500 11px/1.4 var(--mono); letter-spacing: .16em; text-transform: uppercase; }
.cover-issue span:first-child { color: var(--ball); }
.cover-issue span + span::before { content: "/"; margin-right: 18px; opacity: .45; }
.cover-mast { margin: 0; font: 500 clamp(64px, 15.5vw, 212px)/.84 var(--serif); letter-spacing: -.045em; font-variation-settings: "opsz" 72; }
.cover-line { margin: clamp(14px, 2.4vw, 26px) 0 0; font: italic 400 clamp(26px, 4.2vw, 50px)/1.05 var(--serif); letter-spacing: -.015em; max-width: 18ch; }
.cover-line::before { content: ""; display: inline-block; width: .52em; height: .52em; border-radius: 50%; background: var(--ball); margin-right: .32em; vertical-align: .06em; box-shadow: inset -.08em -.08em 0 rgba(0,0,0,.12); }
.cover-dek { margin: 14px 0 0; max-width: 34rem; font-size: clamp(17px, 1.6vw, 19px); line-height: 1.5; color: rgba(255,255,255,.82); }
.cover-teasers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: clamp(28px, 5vw, 56px); border-top: 1px solid rgba(255,255,255,.28); }
.cover-teasers a { display: block; padding: 16px 20px 6px 0; text-decoration: none; font: 400 17px/1.3 var(--serif); color: #fff; }
.cover-teasers a + a { padding-left: 20px; border-left: 1px solid rgba(255,255,255,.18); }
.cover-teasers a span { display: block; margin-bottom: 6px; font: 500 10px/1.4 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.62); }
.cover-teasers a:hover { color: var(--ball); }
.cover-credit { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 var(--gutter) 18px; text-align: right; font: 400 10px/1.5 var(--mono); letter-spacing: .02em; color: rgba(255,255,255,.62); }
.cover-credit a { color: inherit; }

/* ── Welcome + chapter cards ─────────────────────────── */
.welcome { max-width: 1280px; margin: 0 auto; padding: clamp(48px, 8vw, 96px) var(--gutter) clamp(24px, 4vw, 40px); display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.welcome-body p { margin: 0 0 14px; font-size: clamp(20px, 2vw, 24px); line-height: 1.42; letter-spacing: -.005em; }
.welcome-body p:first-child::first-letter { float: left; font-size: 3.3em; line-height: .82; padding: .06em .08em 0 0; font-weight: 500; }
.glance--inline { margin-top: 18px; }
.chapter-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--rule); border: 1px solid var(--rule); border-radius: 14px; overflow: hidden; }
.chapter-card { position: relative; display: flex; flex-direction: column; gap: 6px; min-height: 176px; padding: 18px; background: var(--card); text-decoration: none; transition: background .25s var(--ease); isolation: isolate; overflow: hidden; }
.chapter-card:hover { background: var(--paper-2); }
.chapter-card-no { font: 500 11px/1 var(--mono); letter-spacing: .1em; color: var(--accent); }
.chapter-card strong { font: 500 24px/1.05 var(--serif); letter-spacing: -.015em; margin-top: auto; }
.chapter-card em { font: italic 400 14px/1.35 var(--serif); color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.chapter-card-count { font: 400 10px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.chapter-card--photo { color: #fff; }
.chapter-card--photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .6s var(--ease); }
.chapter-card--photo::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(8,11,15,.9), rgba(8,11,15,.25) 70%); }
.chapter-card--photo:hover img { transform: scale(1.04); }
.chapter-card--photo em, .chapter-card--photo .chapter-card-count { color: rgba(255,255,255,.78); }
.chapter-card--photo .chapter-card-no { color: var(--ball); }

/* ── Chapters ────────────────────────────────────────── */
.chapter { max-width: 1280px; margin: 0 auto; padding: 0 var(--gutter); }
.chapter-open { position: relative; margin: clamp(48px, 8vw, 104px) 0 0; padding: clamp(28px, 5vw, 56px) 0 clamp(24px, 4vw, 40px); border-top: 3px solid var(--ink); display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 32px; overflow: hidden; }
.chapter-no { grid-column: 1 / -1; margin: 0 0 10px; font: 500 11px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.chapter-title { margin: 0; font: 500 clamp(48px, 9vw, 120px)/.9 var(--serif); letter-spacing: -.04em; }
.chapter-blurb { grid-column: 1; margin: 16px 0 0; max-width: 34rem; font: italic 400 clamp(18px, 1.8vw, 21px)/1.4 var(--serif); color: var(--muted); }
.chapter-count { grid-column: 2; grid-row: 2 / span 2; align-self: end; margin: 0; font: 500 11px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.court-lines { position: absolute; right: 0; top: clamp(28px, 5vw, 56px); width: min(34vw, 340px); height: auto; fill: none; stroke: var(--accent); stroke-width: 1.2; opacity: .22; pointer-events: none; -webkit-mask-image: linear-gradient(90deg, transparent, #000 40%); mask-image: linear-gradient(90deg, transparent, #000 40%); }
.court-lines .net { stroke-width: 3; stroke-dasharray: 2 3; }
.court-lines circle { fill: var(--ball); stroke: none; }
.chapter-count { position: relative; z-index: 1; }

/* ── Stories ─────────────────────────────────────────── */
.story { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, var(--measure)) minmax(0, 1fr); column-gap: clamp(20px, 3vw, 48px); padding: clamp(40px, 6vw, 72px) 0; border-top: 1px solid var(--rule); }
.chapter-open + .story { border-top: 0; }
.story > * { grid-column: 2; min-width: 0; }
.story-head { margin-bottom: 22px; }
.story-meta { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 14px; margin: 0 0 16px; font: 500 11px/1.4 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.story-no { color: var(--ink); font-variant-numeric: tabular-nums; }
.story-no::before { content: "p."; opacity: .5; margin-right: 1px; letter-spacing: 0; }
.story-kicker { color: var(--accent); }
.story-meta time { margin-left: auto; letter-spacing: .06em; }
.story h2 { margin: 0; font: 500 clamp(30px, 4.4vw, 50px)/1.04 var(--serif); letter-spacing: -.024em; text-wrap: balance; font-variation-settings: "opsz" 60; }
.story-dek { margin: 16px 0 0; font: italic 400 clamp(19px, 1.9vw, 22px)/1.4 var(--serif); color: var(--ink-2); text-wrap: pretty; }
.story-body p { margin: 0 0 1.05em; text-wrap: pretty; hyphens: auto; }
.story-body > p:first-of-type::first-letter { font-weight: 600; }
.story-body h3 { margin: 1.8em 0 .55em; font: 500 22px/1.12 var(--serif); letter-spacing: -.012em; color: var(--ink); }
.story-body h3:first-child { margin-top: 0; }
.story-body a { color: var(--court); }

/* Photo stories break out of the text measure. */
.story--photo .photo { grid-column: 1 / -1; margin: 6px 0 30px; }
.story--photo .photo--inset { grid-column: 2; }
/* Never upscale: an image is at most its native width; portrait/small frames stay in the text column. */
.photo img { width: min(100%, var(--w, 100%)); margin-inline: auto; height: auto; max-height: 78vh; object-fit: cover; border-radius: 4px; background: var(--paper-2); }
.photo figcaption { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 16px; align-items: baseline; padding-top: 10px; font: 400 12px/1.5 var(--mono); color: var(--muted); }
.photo-place { color: var(--ink); font-weight: 500; letter-spacing: .06em; text-transform: uppercase; font-size: 10.5px; }
.photo--inset img { width: auto; max-width: min(100%, var(--w, 100%)); max-height: 72vh; }
.photo--inset figcaption { grid-template-columns: 1fr; gap: 4px; }
.photo--inset .photo-credit { text-align: left; white-space: normal; }
.photo--source .photo-place { color: var(--court); }
.photo--reference .photo-place { background: var(--ball); color: var(--ball-ink); padding: 1px 7px; border-radius: 3px; }
.photo-caption { font-family: var(--serif); font-style: italic; font-size: 14px; color: var(--ink-2); }
.photo-credit { text-align: right; white-space: nowrap; }
.photo-credit a { color: inherit; }

/* Desk note (stakeholder bar) */
.desk-note { margin: 4px 0 22px; padding: 14px 16px; border-left: 3px solid var(--accent); background: var(--paper-2); border-radius: 0 8px 8px 0; font: 400 13px/1.55 var(--mono); color: var(--ink-2); }
.desk-note > strong:first-child { display: block; margin-bottom: 6px; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }

/* At a glance */
.glance { margin: 8px 0 0; padding: 16px 0 0; border-top: 1px solid var(--rule-strong); }
.glance-label { margin: 0 0 10px; font: 500 10.5px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.glance ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px 20px; }
.glance li { position: relative; padding-left: 18px; font: 400 15px/1.4 var(--sans); color: var(--ink-2); }
.glance li::before { content: ""; position: absolute; left: 0; top: .42em; width: 8px; height: 8px; border-radius: 50%; background: var(--ball); box-shadow: 0 0 0 1px color-mix(in srgb, var(--ink) 30%, transparent); }

/* Owned independent-story route */
.owned-cta { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; margin-top: 24px; padding-top: 14px; border-top: 1px solid var(--rule-strong); }
.owned-cta span { font: 500 10.5px/1.2 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.owned-cta a { color: var(--court); font: 500 14px/1.3 var(--sans); text-decoration-color: color-mix(in srgb, var(--court) 42%, transparent); text-underline-offset: 4px; }
.owned-cta a span { color: inherit; font: inherit; letter-spacing: 0; text-transform: none; }
.owned-cta a:hover { color: var(--ink); }

/* Sources */
.sources { margin-top: 18px; border-radius: 10px; }
.sources summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 10px; padding: 8px 0; font: 500 11px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.sources summary::-webkit-details-marker { display: none; }
.sources summary::after { content: "+"; font-size: 15px; transition: transform .2s var(--ease); }
.sources[open] summary::after { transform: rotate(45deg); }
.sources summary span { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--paper-2); color: var(--ink); letter-spacing: 0; }
.sources summary:hover { color: var(--ink); }
.sources ol { margin: 6px 0 0; padding: 0 0 0 1.4em; font: 400 13.5px/1.5 var(--sans); }
.sources li { padding: 4px 0; color: var(--muted); }
.sources li a { color: var(--ink-2); text-decoration-color: var(--rule-strong); }
.sources li a:hover { color: var(--court); }
.sources .sources-full { list-style: none; margin: 6px 0 0 -1.4em; }
.sources .sources-full a { font-weight: 600; color: var(--court); text-decoration: none; }

/* Data graphics (ported markup) */
.data-graphic { margin: 24px 0; padding: 20px; border: 1px solid var(--rule); border-radius: 12px; background: var(--card); }
.chart-kicker { margin: 0 0 6px; font: 500 10.5px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.data-graphic h3 { margin: 0; font: 500 22px/1.15 var(--serif); letter-spacing: -.01em; }
.chart-subtitle { margin: 4px 0 16px; font: italic 400 14px/1.4 var(--serif); color: var(--muted); }
.data-rows { display: grid; gap: 10px; }
.data-row { display: grid; grid-template-columns: minmax(96px, 9rem) 1fr 2.5rem; align-items: center; gap: 12px; font: 400 14px/1.3 var(--sans); }
.data-track { height: 10px; background: var(--paper-2); border-radius: 999px; overflow: hidden; }
.data-fill { display: block; height: 100%; background: var(--rule-strong); border-radius: inherit; }
.data-fill--accent { background: var(--court); }
.data-value { font: 500 13px/1 var(--mono); text-align: right; }
.data-note, .data-source { margin: 14px 0 0; font: 400 12px/1.5 var(--mono); color: var(--muted); }
.data-source { margin-top: 6px; }
.timeline-ribbon, .route-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 12px; }
.timeline-step, .route-step { position: relative; display: grid; gap: 3px; padding: 12px; border-radius: 8px; background: var(--paper-2); font: 400 13px/1.35 var(--sans); }
.timeline-step strong, .route-step span { font: 500 11px/1 var(--mono); letter-spacing: .06em; color: var(--muted); }
.timeline-step b, .route-step strong { font: 500 16px/1.2 var(--serif); }
.timeline-step small, .route-step small { color: var(--muted); }
.timeline-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--rule-strong); }
.timeline-dot--accent { background: var(--ball); box-shadow: 0 0 0 1px var(--ink); }
.route-arrow { display: none; }
.media-card { margin: 20px 0; padding: 16px; border: 1px solid var(--rule); border-radius: 12px; background: var(--card); font: 400 14px/1.45 var(--sans); }
.media-card__topline, .media-card__source-label { font: 500 10.5px/1.3 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.media-card__stage { margin: 10px 0; padding: 18px; border-radius: 8px; background: var(--paper-2); }
.media-card__play { display: none; }
.story-media { margin-top: 8px; }

/* ── Finale ──────────────────────────────────────────── */
.finale { position: relative; margin: clamp(56px, 9vw, 120px) auto 0; padding: clamp(56px, 9vw, 112px) var(--gutter) calc(clamp(56px, 8vw, 96px) + 72px + env(safe-area-inset-bottom)); text-align: center; background: var(--inv-bg); color: var(--inv-fg); overflow: hidden; }
.finale { --paper: var(--inv-fg); }
.finale .eyebrow { color: color-mix(in srgb, var(--paper) 60%, transparent); }
.finale-ball { width: 56px; height: 56px; margin: 0 auto 22px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #f1ff9b, var(--ball) 45%, #a9c21d); box-shadow: 0 18px 40px -12px rgba(214,240,58,.5); animation: bounce 2.6s var(--ease) infinite; }
.finale-ball { background-image: radial-gradient(circle, rgba(0,0,0,.18) 2.5px, transparent 3px), radial-gradient(circle at 35% 30%, #f1ff9b, var(--ball) 45%, #a9c21d); background-size: 14px 14px, 100% 100%; background-position: 3px 3px, 0 0; }
@keyframes bounce { 0%, 100% { transform: translateY(0); } 45% { transform: translateY(-16px); } 55% { transform: translateY(-16px); } }
.finale h2 { margin: 0; font: italic 500 clamp(48px, 9vw, 112px)/.95 var(--serif); letter-spacing: -.035em; }
.finale-dek { max-width: 34rem; margin: 18px auto 0; font-size: clamp(18px, 1.8vw, 21px); line-height: 1.45; color: color-mix(in srgb, var(--paper) 80%, transparent); }
.finale-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: 44rem; margin: 40px auto 0; border-top: 1px solid color-mix(in srgb, var(--paper) 20%, transparent); border-bottom: 1px solid color-mix(in srgb, var(--paper) 20%, transparent); }
.finale-stats div { padding: 18px 8px; }
.finale-stats div + div { border-left: 1px solid color-mix(in srgb, var(--paper) 14%, transparent); }
.finale-stats dt { font: 500 10px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: color-mix(in srgb, var(--paper) 60%, transparent); }
.finale-stats dd { margin: 8px 0 0; font: 500 34px/1 var(--serif); font-variant-numeric: tabular-nums; }
.finale-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 36px; }
.btn { 
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; 
  border-radius: 999px; border: 1px solid color-mix(in srgb, var(--paper) 35%, transparent); 
  background: transparent; color: var(--paper); text-decoration: none; cursor: pointer; 
  font: 500 12px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; 
  transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), transform .15s var(--ease), box-shadow .2s var(--ease); 
}
.btn:hover { border-color: var(--paper); transform: translateY(-1px); }
.btn:active { transform: scale(0.97) translateY(0); }
.btn--primary { background: var(--ball); color: var(--ball-ink); border-color: var(--ball); box-shadow: 0 4px 16px -4px rgba(214,240,58,.4); }
.btn--primary:hover { background: #e6ff63; border-color: #e6ff63; box-shadow: 0 6px 20px -4px rgba(214,240,58,.6); }
.finale-fine { max-width: 36rem; margin: 36px auto 0; font: 400 11.5px/1.6 var(--mono); color: color-mix(in srgb, var(--paper) 52%, transparent); }

/* ── Dock (mobile-first story nav) ───────────────────── */
.dock { position: fixed; z-index: 35; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom)); transform: translate(-50%, calc(100% + 40px)); display: flex; align-items: center; gap: 4px; padding: 5px; border-radius: 999px; background: color-mix(in srgb, var(--inv-bg) 94%, transparent); color: var(--inv-fg); border: 1px solid color-mix(in srgb, var(--inv-fg) 12%, transparent); box-shadow: 0 12px 32px -10px rgba(0,0,0,.45); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); transition: transform .35s var(--ease); }
.dock.is-visible { transform: translate(-50%, 0); }
.dock-btn { 
  width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; cursor: pointer; 
  display: grid; place-items: center; 
  transition: background .2s var(--ease), transform .15s var(--ease);
}
.dock-btn:hover:not(:disabled) { background: color-mix(in srgb, var(--inv-fg) 14%, transparent); }
.dock-btn:active:not(:disabled) { transform: scale(0.92); }
.dock-btn:disabled { opacity: .3; cursor: default; }
.dock-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dock-now { 
  display: grid; gap: 2px; min-width: 150px; padding: 4px 14px; border: 0; border-radius: 999px;
  background: transparent; cursor: pointer; text-align: center; 
  transition: background .2s var(--ease), transform .15s var(--ease);
}
.dock-now:hover { background: color-mix(in srgb, var(--inv-fg) 10%, transparent); }
.dock-now:active { transform: scale(0.97); }
.dock-now span { font: 500 9.5px/1.2 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ball); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px; }
.dock-now strong { font: 500 14px/1.2 var(--mono); font-variant-numeric: tabular-nums; }

/* ── Contents sheet ──────────────────────────────────── */
.toc { position: fixed; inset: 0; z-index: 60; }
.toc[hidden] { display: none; }
.toc-scrim { position: absolute; inset: 0; background: rgba(6,8,11,.5); opacity: 0; transition: opacity .3s var(--ease); }
.toc.is-open .toc-scrim { opacity: 1; }
.toc-sheet { position: absolute; top: 0; right: 0; bottom: 0; width: min(460px, 100%); display: flex; flex-direction: column; background: var(--paper); color: var(--ink); box-shadow: -20px 0 60px -20px rgba(0,0,0,.4); transform: translateX(100%); transition: transform .35s var(--ease); padding-top: env(safe-area-inset-top); }
.toc.is-open .toc-sheet { transform: none; }
.toc-top { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px 8px; }
.toc-top h2 { margin: 0; font: italic 500 30px/1 var(--serif); letter-spacing: -.02em; }
.toc-search { display: flex; align-items: center; gap: 10px; margin: 8px 20px 0; padding: 0 14px; height: 46px; border: 1px solid var(--rule-strong); border-radius: 12px; background: var(--card); }
.toc-search:focus-within { border-color: var(--court); box-shadow: 0 0 0 3px color-mix(in srgb, var(--court) 20%, transparent); }
.toc-search svg { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; }
.toc-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font: 400 16px/1 var(--sans); }
.toc-result { margin: 10px 20px 4px; font: 500 10.5px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.toc-list { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 4px 20px calc(24px + env(safe-area-inset-bottom)); }
.toc-group { padding: 14px 0 6px; border-bottom: 1px solid var(--rule); }
.toc-group[hidden] { display: none; }
.toc-chapter { display: flex; justify-content: space-between; margin: 0 0 6px; font: 500 11px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.toc-chapter a { text-decoration: none; }
.toc-chapter span { color: var(--muted); }
.toc-group ol { list-style: none; margin: 0; padding: 0; }
.toc-group li[hidden] { display: none; }
.toc-group li a { display: grid; grid-template-columns: 2.4em 1fr; gap: 8px; padding: 8px 8px; margin: 0 -8px; border-radius: 8px; text-decoration: none; font: 400 16px/1.3 var(--serif); }
.toc-group li a span { font: 400 11px/1.9 var(--mono); color: var(--muted); font-variant-numeric: tabular-nums; }
.toc-group li a:hover { background: var(--paper-2); }
.toc-group li a[aria-current="true"] { background: var(--ink); color: var(--paper); }
.toc-group li a[aria-current="true"] span { color: var(--ball); }
body.toc-lock { overflow: hidden; }

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 1020px) {
  .welcome { grid-template-columns: 1fr; }
  .chapter-cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  body { font-size: 18px; line-height: 1.6; }
  :root { --bar-h: 52px; }
  .bar { grid-template-columns: auto 1fr auto; }
  .bar-back span, .bar-btn--label span, .bar-progress-label { display: none; }
  .bar-brand { justify-self: center; font-size: 20px; }
  .bar-brand span { display: none; }
  .bar-btn--label { padding: 0; width: 36px; }
  .cover { min-height: 92svh; }
  .cover-photo img { object-position: 38% 30%; }
  .cover-inner { padding-top: 96px; padding-bottom: 20px; }
  .cover-issue span:nth-child(3) { display: none; }
  .cover-issue { gap: 4px 12px; font-size: 10px; letter-spacing: .14em; }
  .cover-issue span + span::before { margin-right: 12px; }
  .cover-teasers { grid-template-columns: 1fr; }
  .cover-teasers a, .cover-teasers a + a { padding: 12px 0; border-left: 0; border-bottom: 1px solid rgba(255,255,255,.14); font-size: 16px; }
  .cover-teasers a:last-child { border-bottom: 0; }
  .cover-credit { text-align: left; padding-bottom: 14px; }
  .chapter-cards { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 10px; background: none; border: 0; border-radius: 0; margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter) 6px; scrollbar-width: none; }
  .chapter-cards::-webkit-scrollbar { display: none; }
  .chapter-card { flex: 0 0 72%; min-height: 188px; scroll-snap-align: start; border: 1px solid var(--rule); border-radius: 14px; }
  .chapter-open { grid-template-columns: 1fr; }
  .chapter-count { grid-column: 1; grid-row: auto; margin-top: 14px; }
  .court-lines { width: 58vw; right: 0; top: 14px; }
  .story { display: block; padding: 40px 0; }
  .story-meta time { margin-left: 0; }
  .story--photo .photo { margin: 4px calc(var(--gutter) * -1) 26px; }
  .photo img { border-radius: 0; max-height: 64vh; }
  .story--photo .photo--inset { margin-inline: 0; }
  .photo--inset img { border-radius: 4px; max-height: 60vh; }
  .photo--inset figcaption { padding-inline: 0; }
  .photo figcaption { grid-template-columns: 1fr; gap: 4px; padding: 10px var(--gutter) 0; }
  .photo-place { justify-self: start; }
  .photo-credit { text-align: left; white-space: normal; }
  .data-graphic { margin-left: calc(var(--gutter) * -.5); margin-right: calc(var(--gutter) * -.5); padding: 16px; }
  .data-row { grid-template-columns: 7.5rem 1fr 2rem; gap: 8px; font-size: 13px; }
  .finale-stats { grid-template-columns: repeat(2, 1fr); }
  .finale-stats div:nth-child(3) { border-left: 0; }
  .finale-stats div:nth-child(n+3) { border-top: 1px solid color-mix(in srgb, var(--paper) 14%, transparent); }
  .finale-actions { flex-direction: column; align-items: stretch; max-width: 22rem; margin-left: auto; margin-right: auto; }
  .toc-sheet { top: auto; width: 100%; height: 88svh; border-radius: 20px 20px 0 0; transform: translateY(100%); box-shadow: 0 -20px 60px -20px rgba(0,0,0,.4); }
  .toc-sheet::before { content: ""; width: 40px; height: 4px; border-radius: 2px; background: var(--rule-strong); margin: 8px auto 0; flex: none; }
}
@media (min-width: 761px) {
  .dock { left: auto; right: var(--gutter); transform: translateY(calc(100% + 40px)); }
  .dock.is-visible { transform: none; }
}

/* ── Page turn ───────────────────────────────────────── */
::view-transition-old(root) { animation: turn-old .34s cubic-bezier(.4,0,.2,1) both; }
::view-transition-new(root) { animation: turn-new .52s cubic-bezier(.2,.7,.2,1) both; }
::view-transition-group(bar), ::view-transition-group(dock) { animation: none; }
.bar { view-transition-name: bar; }
.dock { view-transition-name: dock; }
@keyframes turn-old { to { opacity: 0; transform: translateY(-4vh) scale(.985); } }
@keyframes turn-new { from { opacity: 0; transform: translateY(7vh); } }
body.turn-out main { opacity: 0; transform: translateY(-2vh); transition: opacity .18s, transform .18s; }
.turn-in { animation: turn-new .5s cubic-bezier(.2,.7,.2,1) both; }
/* Cross-document: magazine ⇄ story pages slide like pages. */
@view-transition { navigation: auto; }
@media (prefers-reduced-motion: reduce) { ::view-transition-old(root), ::view-transition-new(root), .turn-in { animation: none; } }
