/* Hallmark · macrostructure: Theatre (film first, words and chapters under it) · tone: austere
 * theme: studied-DNA (source: https://clearcutstudios.co, X-Ray pass 1.1 study)
 * paper oklch(11.8% 0.019 275) · accent oklch(69.7% 0.127 271) periwinkle · Fraunces + Archivo
 * nav: N1a (wordmark + one link: the shelf has one destination) · footer: Ft1 one line
 * Hallmark · pre-emit critique: P4 H5 E4 S4 R5 V4
 */
@font-face { font-family: 'Fraunces'; src: url(/fonts/fraunces-v1.woff2) format('woff2'); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: 'Archivo'; src: url(/fonts/archivo-v1.woff2) format('woff2'); font-weight: 100 900; font-style: normal; font-display: swap; }

:root {
  --color-paper: oklch(11.8% 0.019 275);
  --color-surface: oklch(16% 0.02 275);
  --color-line: oklch(26% 0.022 275);
  --color-ink: oklch(95% 0.008 275);
  --color-muted: oklch(74% 0.02 275);
  --color-accent: oklch(69.7% 0.127 271);
  --color-accent-ink: oklch(14% 0.03 271);
  --color-ok: oklch(78% 0.13 160);
  --color-error: oklch(72% 0.16 25);
  --color-black: oklch(0% 0 0);
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Archivo', system-ui, sans-serif;
  --text-xs: 0.75rem; --text-sm: 0.875rem; --text-base: 1rem; --text-lg: 1.125rem;
  --text-title: clamp(2.25rem, 1.6rem + 2.6vw, 3.75rem);
  --space-2xs: 0.25rem; --space-xs: 0.5rem; --space-sm: 0.75rem; --space-md: 1rem; --space-lg: 1.5rem;
  --space-xl: 2rem; --space-2xl: 3rem; --space-3xl: 4.5rem;
  --radius-lg: 14px; --radius-pill: 999px;
  --rule: 1px solid var(--color-line);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-fast: 140ms;
  --gutter: clamp(1rem, 0.6rem + 2vw, 2.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: clip; }
body { margin: 0; background: var(--color-paper); color: var(--color-ink); font-family: var(--font-body); font-size: var(--text-base); line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: var(--color-accent); text-underline-offset: 3px; }
a:hover { color: var(--color-ink); }
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.mast { display: flex; align-items: center; justify-content: space-between; gap: var(--space-md); padding: var(--space-lg) var(--gutter); max-width: 1280px; margin: 0 auto; }
.mast__brand { display: inline-flex; align-items: center; gap: var(--space-sm); color: var(--color-ink); text-decoration: none; font-family: var(--font-display); font-size: var(--text-lg); font-weight: 560; letter-spacing: 0.01em; white-space: nowrap; }
.mast__soft { color: var(--color-muted); font-weight: 400; }
.mast__shelf { color: var(--color-muted); text-decoration: none; font-size: var(--text-xs); letter-spacing: 0.16em; text-transform: uppercase; white-space: nowrap; }
.mast__shelf:hover { color: var(--color-ink); }

.wrap { max-width: 1280px; margin: 0 auto; padding: 0 var(--gutter) var(--space-3xl); }
.stage { border-radius: var(--radius-lg); overflow: hidden; border: var(--rule); background: var(--color-black); }
.player { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; background: var(--color-black); }

.about { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-2xl); margin-top: var(--space-2xl); }
@media (min-width: 900px) { .about { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: var(--space-3xl); } }
.eyebrow { margin: 0 0 var(--space-sm); font-family: var(--font-body); font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--color-accent); }
.title { margin: 0; font-family: var(--font-display); font-style: normal; font-weight: 480; font-size: var(--text-title); line-height: 1.04; letter-spacing: -0.015em; overflow-wrap: anywhere; min-width: 0; }
.lede { margin: var(--space-md) 0 0; max-width: 60ch; color: var(--color-muted); font-size: var(--text-lg); }

.share { margin-top: var(--space-2xl); }
.share__row { display: flex; flex-wrap: wrap; gap: var(--space-sm); }
.share__note { min-height: 1.5em; margin: var(--space-sm) 0 0; font-size: var(--text-sm); color: var(--color-muted); }
.share__note[data-state='ok'] { color: var(--color-ok); }
.share__note[data-state='error'] { color: var(--color-error); }
.share__fallback { width: 100%; margin-top: var(--space-xs); padding: var(--space-sm); background: var(--color-surface); color: var(--color-ink); border: var(--rule); border-radius: var(--radius-lg); font: var(--text-xs) / 1.5 ui-monospace, monospace; resize: vertical; }

.pill { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 var(--space-lg); border-radius: var(--radius-pill); border: 1px solid var(--color-accent); background: var(--color-accent); color: var(--color-accent-ink); font: 600 var(--text-sm) / 1 var(--font-body); letter-spacing: 0.02em; white-space: nowrap; text-decoration: none; cursor: pointer; transition: transform var(--dur-fast) var(--ease-out), background-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out); }
.pill--quiet { background: transparent; color: var(--color-ink); border-color: var(--color-line); }
@media (hover: hover) and (pointer: fine) {
  .pill:hover { background: var(--color-ink); border-color: var(--color-ink); color: var(--color-paper); }
}
.pill:active { transform: translateY(1px); }
.pill:disabled, .pill[aria-disabled='true'] { opacity: 0.45; cursor: not-allowed; transform: none; }
.pill[data-state='busy'] { cursor: progress; opacity: 0.8; }
.pill[data-state='ok'] { background: var(--color-ok); border-color: var(--color-ok); color: var(--color-accent-ink); }
.pill[data-state='error'] { border-color: var(--color-error); color: var(--color-error); background: transparent; }

.chapters ol { list-style: none; margin: 0; padding: 0; border-top: var(--rule); }
.ch { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; border-bottom: var(--rule); }
.ch__jump { display: grid; grid-template-columns: 2rem minmax(0, 1fr) auto; align-items: center; gap: var(--space-sm); min-height: 52px; padding: var(--space-sm) var(--space-xs); background: none; border: 0; color: var(--color-ink); font: inherit; text-align: left; cursor: pointer; border-radius: 8px; transition: background-color var(--dur-fast) var(--ease-out); }
.ch__n { font-family: var(--font-display); color: var(--color-muted); font-size: var(--text-lg); }
.ch__t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch__at { color: var(--color-muted); font-size: var(--text-sm); font-variant-numeric: tabular-nums; }
@media (hover: hover) and (pointer: fine) { .ch__jump:hover { background: var(--color-surface); } }
.ch__jump:active { transform: translateY(1px); }
.ch__jump[aria-current='true'] .ch__n, .ch__jump[aria-current='true'] .ch__t { color: var(--color-accent); }
.ch__own { padding: var(--space-sm); font-size: var(--text-sm); white-space: nowrap; color: var(--color-muted); }
.ch__own:hover { color: var(--color-ink); }

.steps { display: flex; flex-wrap: wrap; gap: var(--space-sm); align-content: start; }

.shelf { list-style: none; margin: var(--space-xl) 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: var(--space-xl); }
.card { display: grid; gap: var(--space-xs); color: var(--color-ink); text-decoration: none; }
.card img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius-lg); border: var(--rule); }
.card__t { font-family: var(--font-display); font-size: var(--text-lg); }
.card__m { color: var(--color-muted); font-size: var(--text-sm); }
.card:hover .card__t { color: var(--color-accent); }

.foot { max-width: 1280px; margin: 0 auto; padding: var(--space-xl) var(--gutter); border-top: var(--rule); display: flex; justify-content: space-between; gap: var(--space-md); color: var(--color-muted); font-size: var(--text-sm); }
.foot p { margin: 0; }
.stamp { font-size: var(--text-xs); letter-spacing: 0.08em; opacity: 0.6; }

body.bare { margin: 0; height: 100vh; background: var(--color-black); display: grid; place-items: center; }
body.bare .player { width: 100%; height: 100%; aspect-ratio: auto; object-fit: contain; }

@media (max-width: 480px) { .foot { flex-direction: column; } }
@media (prefers-reduced-motion: reduce) { * { transition-duration: 1ms !important; } }
