/* =============================================================================
   MCU Order — styles
   Dark by default (the reference look); light theme via [data-theme="light"].
   ========================================================================== */

/* ------------------------------------------------------------------ TOKENS */
:root {
  --bg:        #08090d;
  --bg-2:      #0d0f16;
  --card:      #14161f;
  --card-2:    #1a1d28;
  --line:      #242838;
  --line-soft: #1b1e2a;
  --text:      #eef0f6;
  --text-2:    #b6bccd;
  --muted:     #7f869c;
  --brand:     #e23636;
  --brand-2:   #ff5a4d;
  --gold:      #e0a43b;
  --go:        #2fa84f;

  --radius:    14px;
  --radius-sm: 9px;
  --shadow:    0 18px 44px -18px rgba(0,0,0,.85);
  --shadow-lg: 0 34px 80px -22px rgba(0,0,0,.92);

  --maxw: 1180px;
  --ease: cubic-bezier(.22,.61,.36,1);
}

[data-theme="light"] {
  --bg:        #f6f7fb;
  --bg-2:      #ffffff;
  --card:      #ffffff;
  --card-2:    #f2f4f9;
  --line:      #dfe3ee;
  --line-soft: #e9ecf4;
  --text:      #121522;
  --text-2:    #454c63;
  --muted:     #6d7488;
  --shadow:    0 14px 34px -16px rgba(20,26,50,.28);
  --shadow-lg: 0 30px 64px -20px rgba(20,26,50,.32);
}

/* ------------------------------------------------------------------- RESET */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background .3s var(--ease), color .3s var(--ease);
}

h1, h2, h3 { margin: 0; line-height: 1.15; }
p { margin: 0; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
a { color: var(--brand-2); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  padding: .8rem 1.2rem; background: var(--brand); color: #fff;
  border-radius: 0 0 var(--radius-sm) 0; font-weight: 600; text-decoration: none;
}
.skip-link:focus { left: 0; }

:focus-visible {
  outline: 2px solid var(--brand-2);
  outline-offset: 3px;
  border-radius: 4px;
}

/* -------------------------------------------------------------------- HERO */
.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line-soft);
  background:
    radial-gradient(1100px 460px at 50% -12%, rgba(226,54,54,.20), transparent 62%),
    linear-gradient(180deg, var(--bg-2), var(--bg));
}

.hero__glow {
  position: absolute; inset: 0;
  background:
    radial-gradient(600px 300px at 82% 8%,  rgba(47,168,79,.16),  transparent 65%),
    radial-gradient(520px 280px at 14% 22%, rgba(91,143,214,.14), transparent 65%);
  pointer-events: none;
}

.topbar {
  position: relative;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1.1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand { display: flex; align-items: center; gap: .6rem; }

.brand__mark {
  display: grid; place-items: center;
  width: 32px; height: 32px;
  border-radius: 9px;
  background: linear-gradient(145deg, var(--brand-2), var(--brand));
  color: #fff;
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: 1.35rem;
  padding-top: 2px;
  box-shadow: 0 6px 18px -6px rgba(226,54,54,.75);
}

.brand__name { font-weight: 800; letter-spacing: -.02em; font-size: 1.05rem; }
.brand__name span { color: var(--muted); font-weight: 600; }

.theme-toggle {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--card);
  display: grid; place-items: center;
  font-size: 1.05rem;
  color: var(--text-2);
  transition: transform .2s var(--ease), border-color .2s;
}
.theme-toggle:hover { transform: rotate(-25deg); border-color: var(--brand); }

.hero__inner {
  position: relative;
  max-width: 780px;
  margin: 0 auto;
  padding: 2.4rem 1.25rem 3rem;
  text-align: center;
}

.hero__eyebrow {
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: .7rem;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 1rem;
}

.hero__title {
  font-size: clamp(2.1rem, 6.2vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -.035em;
}
.hero__title em {
  font-style: normal;
  background: linear-gradient(100deg, var(--brand-2), var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__lede {
  margin: 1.15rem auto 0;
  max-width: 60ch;
  color: var(--text-2);
  font-size: 1.03rem;
}
.hero__lede strong { color: var(--text); font-weight: 600; }

/* --------------------------------------------------------------- COUNTDOWN */
.countdown { margin-top: 2rem; }

.countdown__label {
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .16em;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: .7rem;
}

.countdown__units { display: flex; justify-content: center; gap: .55rem; }

.cd-unit {
  min-width: 66px;
  padding: .6rem .4rem .5rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--card) 80%, transparent);
  backdrop-filter: blur(6px);
}

.cd-unit__n {
  display: block;
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: 1.75rem;
  line-height: 1;
  letter-spacing: .02em;
  color: var(--go);
  font-variant-numeric: tabular-nums;
}

.cd-unit__l {
  display: block;
  font-size: .6rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--muted);
  margin-top: .35rem;
}

.countdown.is-released .cd-unit__n { color: var(--brand-2); }

/* ---------------------------------------------------------------- CONTROLS */
.controls {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--line-soft);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
}

.controls__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: .85rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.15rem;
}

.control-group { display: flex; align-items: center; gap: .55rem; min-width: 0; }
.control-group--search { flex: 1 1 190px; justify-content: flex-end; }

.control-group__label {
  font-size: .64rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
}

.segmented {
  display: flex;
  padding: 3px;
  gap: 2px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--card);
}

.seg {
  padding: .38rem .72rem;
  border-radius: 7px;
  font-size: .82rem;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
  transition: background .18s var(--ease), color .18s var(--ease);
}
.seg:hover { color: var(--text); }
.seg.is-active {
  background: linear-gradient(145deg, var(--brand-2), var(--brand));
  color: #fff;
  box-shadow: 0 4px 14px -6px rgba(226,54,54,.85);
}

.chips { display: flex; flex-wrap: wrap; gap: .35rem; }

.chip {
  padding: .34rem .7rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  font-size: .78rem;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
  transition: all .18s var(--ease);
}
.chip:hover { color: var(--text); border-color: var(--muted); }
.chip.is-on {
  background: color-mix(in srgb, var(--brand) 16%, var(--card));
  border-color: color-mix(in srgb, var(--brand) 55%, transparent);
  color: var(--text);
}
.chip.is-on::before { content: "✓ "; color: var(--brand-2); }

.search {
  position: relative;
  display: flex; align-items: center;
  width: 100%; max-width: 230px;
}
.search__icon {
  position: absolute; left: .65rem;
  color: var(--muted); font-size: 1rem; pointer-events: none;
}
.search input {
  width: 100%;
  padding: .45rem .7rem .45rem 1.9rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  font-size: .85rem;
}
.search input::placeholder { color: var(--muted); }
.search input:focus { outline: none; border-color: var(--brand); }

/* ---------------------------------------------------------------- PROGRESS */
.progress {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1.25rem .8rem;
  display: flex;
  align-items: center;
  gap: .9rem;
  flex-wrap: wrap;
}

.progress__bar {
  flex: 1 1 180px;
  height: 5px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}

.progress__fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand), var(--gold), var(--go));
  transition: width .5s var(--ease);
}

.progress__meta {
  display: flex; align-items: center; gap: .5rem;
  font-size: .76rem; color: var(--muted); white-space: nowrap;
}
.progress__meta strong { color: var(--text); }
.progress__sep { opacity: .5; }

.progress__reset {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-size: .76rem;
}
.progress__reset:hover { color: var(--brand-2); }

/* -------------------------------------------------------------- ORDER NOTE */
.order-note {
  max-width: var(--maxw);
  margin: 1.8rem auto .6rem;
  padding: 0 1.25rem;
  font-size: .86rem;
  color: var(--muted);
  text-align: center;
}
.order-note strong { color: var(--text-2); font-weight: 600; }

/* ------------------------------------------------------------------- STAGE */
.stage {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1.4rem 1.25rem 2rem;
}

/* --------------------------------------------------------- GROUP (PHASES) */
.group { margin-bottom: 2.4rem; }

.group__head {
  display: flex; align-items: center; gap: 1rem;
  margin: 0 0 1.5rem;
}
.group__title {
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: 1.5rem;
  letter-spacing: .06em;
  color: var(--text);
  white-space: nowrap;
}
.group__sub {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--muted);
  white-space: nowrap;
}
.group__rule {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--line), transparent);
}

/* ---------------------------------------------------------- PATHWAY VIEW */
.path-row {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin-bottom: 0;
}
.path-row[data-dir="rtl"] { flex-direction: row-reverse; }

.node {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  z-index: 1;
}
.node:hover, .node:focus-within { z-index: 60; }

/* the connector between two cards in the same row */
.link-h {
  flex: 0 0 34px;
  position: relative;
  align-self: center;
  height: 2px;
  background: color-mix(in srgb, var(--gold) 45%, transparent);
}
.link-h::after {
  content: "";
  position: absolute; top: 50%; right: -1px;
  width: 7px; height: 7px;
  border-top: 2px solid color-mix(in srgb, var(--gold) 70%, transparent);
  border-right: 2px solid color-mix(in srgb, var(--gold) 70%, transparent);
  transform: translateY(-50%) rotate(45deg);
}
.path-row[data-dir="rtl"] .link-h::after {
  right: auto; left: -1px;
  transform: translateY(-50%) rotate(-135deg);
}

/* the vertical turn between rows */
.link-turn {
  height: 40px;
  position: relative;
  display: flex;
}
.link-turn::before {
  content: "";
  position: absolute; top: 0; bottom: 8px;
  width: 2px;
  background: color-mix(in srgb, var(--gold) 45%, transparent);
}
.link-turn::after {
  content: "";
  position: absolute; bottom: 2px;
  width: 7px; height: 7px;
  border-bottom: 2px solid color-mix(in srgb, var(--gold) 70%, transparent);
  border-right: 2px solid color-mix(in srgb, var(--gold) 70%, transparent);
  transform: rotate(45deg);
}
.link-turn[data-side="right"]::before { right: 11%; }
.link-turn[data-side="right"]::after  { right: calc(11% - 2.5px); }
.link-turn[data-side="left"]::before  { left: 11%; }
.link-turn[data-side="left"]::after   { left: calc(11% - 2.5px); }
.link-turn[data-side="center"]::before { left: 50%; }
.link-turn[data-side="center"]::after  { left: calc(50% - 2.5px); }

/* ------------------------------------------------------------------- CARD */
.card {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: .8rem;
  width: 100%;
  height: 100%;
  min-height: 108px;
  padding: .95rem 1rem 1rem;
  text-align: left;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background:
    linear-gradient(160deg, color-mix(in srgb, var(--accent) 12%, var(--card)), var(--card) 62%);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform .28s var(--ease), border-color .28s, box-shadow .28s;
}

.card::before {
  content: "";
  position: absolute; inset: 0 auto 0 0;
  width: 3px;
  background: var(--accent);
  opacity: .9;
}

.card:hover, .card:focus-visible {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--accent) 60%, transparent);
  box-shadow: var(--shadow-lg), 0 0 0 1px color-mix(in srgb, var(--accent) 28%, transparent);
}

/* ---- poster thumbnail ---------------------------------------------------
   The slot is always rendered — a placeholder keeps every card in a row the
   same shape whether or not an image has been fetched for that title.        */
.card__poster {
  position: relative;
  flex: 0 0 58px;
  aspect-ratio: 2 / 3;
  border-radius: 6px;
  overflow: hidden;
  background: linear-gradient(155deg,
    color-mix(in srgb, var(--accent) 55%, #000),
    color-mix(in srgb, var(--accent) 18%, #000));
  box-shadow: 0 4px 14px -5px rgba(0,0,0,.7);
}

.card__poster img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity .35s var(--ease);
}
.card__poster.is-loaded img { opacity: 1; }

/* Initials show while the poster loads, and stay if there is no poster.
   They must fade out once the image arrives — ::after paints above the <img>,
   so leaving it visible stamps the letters over the artwork. */
.card__poster::after {
  content: attr(data-initials);
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: 1.15rem;
  letter-spacing: .04em;
  color: rgba(255,255,255,.72);
  pointer-events: none;
  transition: opacity .3s var(--ease);
}
.card__poster.is-loaded::after { opacity: 0; }

.card__body { flex: 1 1 auto; min-width: 0; }

.card__top {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: .6rem; margin-bottom: .5rem;
}

.card__title {
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: 1.28rem;
  line-height: 1.02;
  letter-spacing: .035em;
  color: var(--accent);
  text-shadow: 0 0 22px color-mix(in srgb, var(--accent) 30%, transparent);
}
[data-theme="light"] .card__title {
  color: color-mix(in srgb, var(--accent) 82%, #000);
  text-shadow: none;
}

.card__sub {
  display: block;
  font-family: Inter, sans-serif;
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--text-2);
  margin-top: .22rem;
  text-transform: none;
}

.card__meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .5rem;
  font-size: .69rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.card__meta .dot { opacity: .45; }

.card__flags { display: flex; gap: .3rem; margin-top: .55rem; flex-wrap: wrap; }

.flag {
  font-size: .58rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: .16rem .42rem;
  border-radius: 4px;
  border: 1px solid var(--line);
  color: var(--muted);
}
.flag--essential {
  color: var(--gold);
  border-color: color-mix(in srgb, var(--gold) 45%, transparent);
  background: color-mix(in srgb, var(--gold) 12%, transparent);
}
.flag--approx {
  color: var(--text-2);
  border-style: dashed;
}
.flag--target {
  color: var(--go);
  border-color: color-mix(in srgb, var(--go) 55%, transparent);
  background: color-mix(in srgb, var(--go) 14%, transparent);
}

.inline-flag {
  font-size: .68rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; padding: .1rem .35rem;
  border: 1px dashed var(--line); border-radius: 4px; color: var(--text-2);
}

/* index badge */
.card__index {
  flex: 0 0 auto;
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: .95rem;
  line-height: 1;
  padding: .28rem .42rem .2rem;
  border-radius: 6px;
  background: color-mix(in srgb, var(--text) 8%, transparent);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* watched state */
.node.is-watched .card { opacity: .5; }
.node.is-watched .card::after {
  content: "✓ watched";
  position: absolute; top: .55rem; right: .6rem;
  font-size: .56rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--go);
}
.node.is-watched .card:hover { opacity: .85; }

/* the watched tick button, sits under the card */
.node__check {
  position: absolute;
  bottom: -9px; right: 10px;
  z-index: 3;
  width: 24px; height: 24px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--card-2);
  color: var(--muted);
  font-size: .68rem;
  display: grid; place-items: center;
  transition: all .18s var(--ease);
  opacity: 0;
}
.node:hover .node__check,
.node:focus-within .node__check,
.node.is-watched .node__check { opacity: 1; }
.node__check:hover { border-color: var(--go); color: var(--go); transform: scale(1.12); }
.node.is-watched .node__check {
  background: var(--go); border-color: var(--go); color: #fff;
}

/* ------------------------------------------------------------ HOVER POPOVER */
.node__pop {
  position: absolute;
  left: 0; right: 0;
  top: calc(100% + 12px);
  z-index: 70;
  padding: .85rem .95rem;
  border-radius: var(--radius);
  border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--line));
  background: var(--card-2);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(.97);
  transform-origin: top center;
  transition: opacity .22s var(--ease), transform .22s var(--ease), visibility .22s;
  pointer-events: none;
}
.node:hover .node__pop,
.node:focus-within .node__pop {
  opacity: 1; visibility: visible; transform: translateY(0) scale(1);
}
/* rows near the bottom flip the popover upward */
.node[data-flip="up"] .node__pop {
  top: auto; bottom: calc(100% + 12px);
  transform-origin: bottom center;
}

.node__pop p { font-size: .8rem; color: var(--text-2); line-height: 1.5; }
.node__pop .pop__why {
  margin-top: .55rem;
  padding-top: .55rem;
  border-top: 1px solid var(--line);
  font-size: .74rem;
  color: var(--muted);
}
.node__pop .pop__why b { color: var(--accent); font-weight: 700; }
.node__pop .pop__more {
  margin-top: .5rem; font-size: .68rem; color: var(--muted);
  text-transform: uppercase; letter-spacing: .1em;
}

/* --------------------------------------------------------------- LIST VIEW */
.list { border-top: 1px solid var(--line-soft); }

.list__row {
  display: grid;
  grid-template-columns: 30px 34px 1fr auto auto 30px;
  align-items: center;
  gap: .9rem;
  padding: .8rem .6rem;
  border-bottom: 1px solid var(--line-soft);
  cursor: pointer;
  transition: background .18s var(--ease);
  border-left: 3px solid var(--accent);
}
.list__row:hover { background: var(--card); }
.list__row.is-watched { opacity: .48; }
.list__row.is-watched:hover { opacity: .85; }

.list__n {
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: 1rem; color: var(--muted); text-align: right;
  font-variant-numeric: tabular-nums;
}

.list__poster {
  position: relative;
  width: 34px; aspect-ratio: 2 / 3;
  border-radius: 4px; overflow: hidden;
  background: linear-gradient(155deg,
    color-mix(in srgb, var(--accent) 55%, #000),
    color-mix(in srgb, var(--accent) 18%, #000));
}
.list__poster img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover; display: block;
  opacity: 0; transition: opacity .3s var(--ease);
}
.list__poster.is-loaded img { opacity: 1; }

.list__title { min-width: 0; }
.list__title b {
  display: block; font-size: .95rem; font-weight: 700; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.list__title span {
  display: block; font-size: .74rem; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.list__year {
  font-size: .82rem; color: var(--text-2);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.list__len {
  font-size: .76rem; color: var(--muted);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}

.list__check {
  width: 24px; height: 24px; border-radius: 50%;
  border: 1px solid var(--line); background: transparent;
  color: var(--muted); font-size: .68rem; display: grid; place-items: center;
  transition: all .18s var(--ease);
}
.list__check:hover { border-color: var(--go); color: var(--go); }
.list__row.is-watched .list__check { background: var(--go); border-color: var(--go); color: #fff; }

/* ------------------------------------------------- NO-JS / CRAWLER LIST ----
   Ships in the raw HTML and is replaced by app.js on first render. Kept plain
   and readable — on a slow connection this is what the user sees first.       */
.nojs-list { max-width: 720px; margin: 0 auto; }

.nojs-head {
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: 1.4rem; letter-spacing: .05em;
  margin-bottom: 1rem; color: var(--text);
}
.nojs-list ol { margin: 0; padding: 0; list-style: none; }

.nojs-item {
  padding: .55rem 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: .9rem;
  color: var(--text-2);
}
.nojs-item strong { color: var(--text); font-weight: 600; }
.nojs-n { color: var(--muted); font-variant-numeric: tabular-nums; }
.nojs-meta { color: var(--muted); font-size: .78rem; }

/* ------------------------------------------------------------------- EMPTY */
.empty {
  max-width: 42ch; margin: 3rem auto; padding: 0 1.25rem;
  text-align: center; color: var(--muted); font-size: .92rem;
}

/* ----------------------------------------------------------------- PROSE */
.prose {
  max-width: 760px;
  margin: 4rem auto 0;
  padding: 0 1.25rem;
}

.prose section + section {
  margin-top: 3rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--line-soft);
}

.prose h2 {
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: clamp(1.7rem, 4.2vw, 2.1rem);
  letter-spacing: .045em;
  margin-bottom: .9rem;
}

.prose h3 {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -.01em;
  margin: 1.8rem 0 .5rem;
  color: var(--text);
}
.prose h3::before {
  content: "";
  display: inline-block;
  width: 14px; height: 2px;
  margin-right: .6rem;
  vertical-align: middle;
  background: var(--brand);
  border-radius: 2px;
}

.prose p {
  font-size: .95rem;
  line-height: 1.72;
  color: var(--text-2);
  margin-bottom: .9rem;
}
.prose p strong { color: var(--text); font-weight: 600; }
.prose em { color: var(--text); font-style: italic; }

.t-muted { color: var(--muted); font-size: .8rem; }

/* stats table — wide content scrolls inside its own box, never the page */
.table-wrap {
  overflow-x: auto;
  margin: 1.2rem 0 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: .87rem;
  min-width: 420px;
}
.prose thead th {
  text-align: left;
  font-size: .62rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--muted);
  font-weight: 700;
  padding: .7rem .9rem;
  background: var(--card);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.prose tbody td {
  padding: .72rem .9rem;
  border-bottom: 1px solid var(--line-soft);
  color: var(--text-2);
}
.prose tbody tr:last-child td { border-bottom: 0; }
.prose tbody td:first-child { color: var(--text); font-weight: 500; }
.prose tbody td:nth-child(2),
.prose tbody td:nth-child(3) {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.prose tbody tr:hover td { background: color-mix(in srgb, var(--card) 60%, transparent); }

/* --------------------------------------------------------------------- FAQ */
.faq { max-width: 760px; margin: 4rem auto 3rem; padding: 0 1.25rem; }

.faq__title {
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: 1.9rem; letter-spacing: .05em; margin-bottom: 1.2rem;
}

.faq__item {
  border-bottom: 1px solid var(--line-soft);
  padding: .95rem 0;
}
.faq__item summary {
  cursor: pointer; font-weight: 600; font-size: .96rem;
  list-style: none; display: flex; justify-content: space-between; gap: 1rem;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: "+"; color: var(--muted); font-size: 1.2rem; line-height: 1;
  transition: transform .22s var(--ease);
}
.faq__item[open] summary::after { transform: rotate(45deg); }
.faq__item p {
  margin-top: .7rem; font-size: .89rem; color: var(--text-2); line-height: 1.65;
}

/* ------------------------------------------------------------------ DRAWER */
.drawer-scrim {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(4,5,9,.62);
  backdrop-filter: blur(3px);
  animation: fade .25s var(--ease);
}

.drawer {
  position: fixed; z-index: 100;
  top: 0; right: 0; bottom: 0;
  width: min(430px, 92vw);
  padding: 2.2rem 1.6rem;
  overflow-y: auto;
  background: var(--bg-2);
  border-left: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  animation: slidein .32s var(--ease);
}

.drawer__close {
  position: absolute; top: 1rem; right: 1.1rem;
  width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--card);
  color: var(--muted); display: grid; place-items: center; font-size: .82rem;
}
.drawer__close:hover { color: var(--text); border-color: var(--brand); }

.d-head { display: flex; gap: 1rem; align-items: flex-start; }

.d-poster {
  position: relative;
  flex: 0 0 108px;
  aspect-ratio: 2 / 3;
  border-radius: 9px;
  overflow: hidden;
  background: linear-gradient(155deg,
    color-mix(in srgb, var(--accent) 55%, #000),
    color-mix(in srgb, var(--accent) 18%, #000));
  box-shadow: var(--shadow);
}
.d-poster img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover; display: block;
  opacity: 0; transition: opacity .35s var(--ease);
}
.d-poster.is-loaded img { opacity: 1; }
.d-poster::after {
  content: attr(data-initials);
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: 1.7rem; color: rgba(255,255,255,.72);
  pointer-events: none;
  transition: opacity .3s var(--ease);
}
.d-poster.is-loaded::after { opacity: 0; }

.d-headtext { flex: 1 1 auto; min-width: 0; padding-top: .2rem; }

.d-title {
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: 2.1rem; line-height: .98; letter-spacing: .035em;
  color: var(--accent);
}
.d-sub {
  font-size: .84rem; font-weight: 600; color: var(--text-2); margin-top: .3rem;
}

.d-meta {
  display: flex; flex-wrap: wrap; gap: .35rem;
  margin: 1rem 0 1.3rem;
}

.d-block { margin-bottom: 1.35rem; }
.d-block h4 {
  font-size: .64rem; text-transform: uppercase; letter-spacing: .15em;
  color: var(--muted); margin: 0 0 .45rem; font-weight: 700;
}
.d-block p { font-size: .89rem; color: var(--text-2); line-height: 1.6; }

.d-facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: .7rem; }
.d-fact {
  padding: .65rem .75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--card);
}
.d-fact dt {
  font-size: .6rem; text-transform: uppercase; letter-spacing: .13em;
  color: var(--muted); margin-bottom: .25rem;
}
.d-fact dd { margin: 0; font-size: .88rem; font-weight: 600; color: var(--text); }

.d-links { display: flex; flex-direction: column; gap: .4rem; }
.d-link {
  display: flex; align-items: center; gap: .5rem;
  padding: .55rem .7rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--card);
  font-size: .84rem; font-weight: 600; text-align: left;
  transition: border-color .18s, transform .18s var(--ease);
}
.d-link:hover { border-color: var(--brand); transform: translateX(3px); }
.d-link .arrow { color: var(--muted); }

.d-watch {
  width: 100%; padding: .75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--card);
  font-weight: 700; font-size: .88rem;
  transition: all .2s var(--ease);
}
.d-watch:hover { border-color: var(--go); color: var(--go); }
.d-watch.is-on { background: var(--go); border-color: var(--go); color: #fff; }

@keyframes fade   { from { opacity: 0; } }
@keyframes slidein{ from { transform: translateX(28px); opacity: 0; } }

/* ------------------------------------------------------------------ FOOTER */
.footer {
  max-width: 760px; margin: 0 auto; padding: 2.5rem 1.25rem 3.5rem;
  text-align: center; border-top: 1px solid var(--line-soft);
}
.footer__note { font-size: .75rem; color: var(--muted); line-height: 1.6; }
.footer__meta { margin-top: .8rem; font-size: .72rem; color: var(--muted); }
.footer__meta a { color: var(--muted); }

/* ------------------------------------------------------------ RESPONSIVE */
@media (max-width: 900px) {
  .controls__inner { gap: .85rem 1rem; }
  .control-group--search { flex-basis: 100%; justify-content: stretch; }
  .search { max-width: none; }
}

@media (max-width: 700px) {
  .hero__inner { padding: 1.8rem 1.25rem 2.4rem; }
  .cd-unit { min-width: 58px; }
  .cd-unit__n { font-size: 1.45rem; }

  /* single-column path: cards stack, connectors run straight down */
  .link-h { display: none; }
  .path-row { flex-direction: column; gap: 34px; }
  .path-row[data-dir="rtl"] { flex-direction: column; }
  .path-row .node + .node::before {
    content: "";
    position: absolute; left: 50%; top: -30px;
    width: 2px; height: 26px;
    background: color-mix(in srgb, var(--gold) 45%, transparent);
  }
  .path-row { margin-bottom: 34px; }
  .link-turn { display: none; }

  .list__row { grid-template-columns: 22px 28px 1fr auto 30px; gap: .55rem; }
  .list__len { display: none; }
  .list__poster { width: 28px; }

  /* The controls are 300px+ once they wrap — pinning them would swallow a
     third of the viewport. Let them scroll away on small screens. */
  .controls { position: static; }

  /* No hover on touch, and inlining every summary would triple the scroll
     length. Tapping a card opens the drawer, which shows all of this. */
  .node__pop { display: none; }
  .node__check { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .card:hover { transform: none; }
}
