/* Lost Collisions — night on the Island: black jungle, bone-white type, phosphor green from the Swan terminal,
   ultraviolet from the blast-door map. */

@font-face { font-family: "Jost"; src: url("../fonts/jost-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Spectral"; src: url("../fonts/spectral-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Spectral"; src: url("../fonts/spectral-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Spectral"; src: url("../fonts/spectral-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("../fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("../fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }

:root {
  --bg: #050706;
  --bg-2: #0a0e0c;
  --panel: #0e1311;
  --panel-2: #131a17;
  --line: rgba(233, 229, 217, 0.1);
  --line-2: rgba(233, 229, 217, 0.2);
  --text: #e9e5d9;
  --soft: #c2c0b4;
  --muted: #92948a;
  --dim: #63665e;
  --phosphor: #7dffa8;
  --phosphor-dim: rgba(125, 255, 168, 0.14);
  --amber: #f0b35a;
  --uv: #b79aff;
  --danger: #ff6b5e;
  --display: "Jost", "Century Gothic", "Avenir Next", "Futura", system-ui, sans-serif;
  --body: "Spectral", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --mono: "Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --bar: 58px;
  --wrap: 1240px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --c: var(--text);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--bg); color-scheme: dark; -webkit-text-size-adjust: 100%; scrollbar-gutter: stable; scrollbar-color: #2a2f2b var(--bg); }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--text);
  font-family: var(--body); font-size: 17px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
/* film grain + vignette */
body::before {
  content: ""; position: fixed; inset: -50%; z-index: 1; pointer-events: none; opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.1s steps(5) infinite;
}
body::after {
  content: ""; position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(120% 90% at 50% 40%, transparent 55%, rgba(0, 0, 0, 0.55) 100%);
}
@keyframes grain { 0% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); } 40% { transform: translate(2%, -3%); } 60% { transform: translate(-2%, -2%); } 80% { transform: translate(3%, 3%); } 100% { transform: translate(0, 0); } }

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 300; margin: 0; line-height: 1.1; text-wrap: balance; }
p { margin: 0 0 1em; }
kbd { font-family: var(--mono); font-size: 0.72em; border: 1px solid var(--line-2); border-radius: 4px; padding: 1px 5px; color: var(--muted); }
::selection { background: var(--phosphor); color: #04130a; }
:focus-visible { outline: 2px solid var(--phosphor); outline-offset: 3px; border-radius: 3px; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 100; background: var(--text); color: var(--bg); padding: 8px 14px; font-family: var(--display); }
.skip:focus { top: 12px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ───────── top bar ───────── */
.topbar {
  position: fixed; inset: 0 0 auto 0; height: var(--bar); z-index: 40;
  display: flex; align-items: center; gap: 22px; padding: 0 22px;
  background: linear-gradient(rgba(5, 7, 6, 0.92), rgba(5, 7, 6, 0.72));
  backdrop-filter: blur(14px) saturate(120%); -webkit-backdrop-filter: blur(14px) saturate(120%);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; flex: none; }
.brand-mark { width: 26px; height: 26px; fill: none; stroke: var(--text); stroke-width: 3; }
.brand-mark .x { stroke: var(--phosphor); stroke-width: 4; stroke-linecap: round; }
.brand-word { font-family: var(--display); font-weight: 400; letter-spacing: 0.34em; font-size: 13px; white-space: nowrap; }
.brand-word em { font-style: normal; color: var(--muted); font-weight: 300; }
.nav { display: flex; gap: 2px; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a {
  font-family: var(--display); font-size: 12.5px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--muted); padding: 8px 12px; border-radius: 999px; white-space: nowrap; transition: color 0.2s, background 0.2s;
}
.nav a:hover { color: var(--text); }
.nav a.on { color: var(--text); background: rgba(233, 229, 217, 0.08); }
.nav a.nav-hot { color: var(--phosphor); }
.nav a.nav-hot.on { background: var(--phosphor-dim); }
.topbar-tools { display: flex; align-items: center; gap: 10px; flex: none; }
.tool { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 999px; font-family: var(--display); font-size: 12.5px; letter-spacing: 0.12em; color: var(--muted); transition: color 0.2s, border-color 0.2s; }
.tool:hover { color: var(--text); border-color: var(--muted); }
.tool svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.timer { font-family: var(--mono); font-size: 13px; font-weight: 500; letter-spacing: 0.08em; padding: 5px 9px; border-radius: 4px; background: #0d0f0d; border: 1px solid var(--line-2); color: var(--text); min-width: 74px; text-align: center; transition: color 0.3s, border-color 0.3s, box-shadow 0.3s; }
.timer:hover { border-color: var(--phosphor); }
.timer.warn { color: var(--amber); border-color: var(--amber); }
.timer.alarm { color: var(--danger); border-color: var(--danger); box-shadow: 0 0 18px rgba(255, 107, 94, 0.45); animation: pulse 0.9s infinite; }
.timer.glyphs { font-family: var(--body); letter-spacing: 0.12em; }
@keyframes pulse { 50% { opacity: 0.55; } }

main { position: relative; z-index: 2; padding-top: var(--bar); min-height: calc(100vh - 120px); }
#view:focus, #view:focus-visible { outline: none; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 28px; }
.view-in { animation: viewIn 0.55s var(--ease) both; }
@keyframes viewIn { from { opacity: 0; filter: blur(6px); transform: translateY(10px); } to { opacity: 1; filter: none; transform: none; } }
.flash { position: fixed; inset: 0; z-index: 60; pointer-events: none; background: #fff; opacity: 0; }
.flash.go { animation: flash 0.5s ease-out; }
@keyframes flash { 0% { opacity: 0.0; } 12% { opacity: 0.5; } 100% { opacity: 0; } }

/* ───────── shared type ───────── */
.eyebrow { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); }
.eyebrow b { color: var(--phosphor); font-weight: 500; }
.lede { font-size: 20px; color: var(--soft); max-width: 62ch; line-height: 1.55; }
.page-head { padding: 64px 0 34px; border-bottom: 1px solid var(--line); margin-bottom: 34px; position: relative; }
.page-head h1 { font-size: clamp(38px, 6vw, 76px); letter-spacing: 0.02em; margin: 14px 0 18px; font-weight: 200; }
.page-head .lede { margin: 0; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.crumbs a { color: var(--muted); border-bottom: 1px solid transparent; }
.crumbs a:hover { color: var(--text); border-color: var(--line-2); }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 56px 0 22px; }
.section-title h2 { font-size: 26px; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 300; }
.section-title a { font-family: var(--mono); font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--phosphor); }
.section-title a:hover { text-decoration: underline; text-underline-offset: 4px; }
.meta-row { display: flex; flex-wrap: wrap; gap: 8px 26px; margin-top: 22px; font-family: var(--mono); font-size: 12.5px; color: var(--muted); letter-spacing: 0.04em; }
.meta-row b { color: var(--soft); font-weight: 400; }
.meta-row span > i { font-style: normal; color: var(--dim); text-transform: uppercase; letter-spacing: 0.16em; font-size: 10.5px; margin-right: 8px; }

/* ───────── chips & badges ───────── */
.chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px 4px 9px; border-radius: 999px;
  border: 1px solid var(--line-2); font-family: var(--display); font-size: 12.5px; letter-spacing: 0.06em; color: var(--soft);
  white-space: nowrap; transition: border-color 0.2s, color 0.2s, background 0.2s; cursor: pointer; line-height: 1.5;
}
.chip:hover { border-color: var(--c, var(--text)); color: var(--text); }
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--c, var(--muted)); flex: none; box-shadow: 0 0 8px var(--c, transparent); }
.chip.thread .dot { border-radius: 1px; transform: rotate(45deg); background: none; border: 1.5px solid var(--uv); box-shadow: none; }
.chip.char .dot { background: none; border: 1.5px solid var(--amber); box-shadow: none; }
.chip.on { background: color-mix(in srgb, var(--c, var(--text)) 16%, transparent); border-color: var(--c, var(--text)); color: var(--text); }
.chip small { color: var(--dim); font-family: var(--mono); font-size: 10.5px; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.badge { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.ev-on-screen { color: var(--phosphor); }
.badge.ev-confirmed { color: var(--amber); }
.badge.ev-fan-theory { color: var(--uv); }
.oct { --s: 34px; width: var(--s); height: var(--s); flex: none; display: grid; place-items: center; color: var(--c); font-family: var(--mono); font-size: calc(var(--s) * 0.36); font-weight: 500;
  background: color-mix(in srgb, var(--c) 13%, transparent);
  clip-path: polygon(30% 0, 70% 0, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0 70%, 0 30%); }
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 12px 22px; border: 1px solid var(--line-2); border-radius: 999px; font-family: var(--display); font-size: 13px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--text); transition: 0.25s var(--ease); }
.btn:hover { border-color: var(--text); background: rgba(233, 229, 217, 0.06); }
.btn.primary { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn.primary:hover { background: #fff; }
.btn.glow { color: var(--phosphor); border-color: rgba(125, 255, 168, 0.4); }
.btn.glow:hover { background: var(--phosphor-dim); border-color: var(--phosphor); box-shadow: 0 0 30px rgba(125, 255, 168, 0.18); }
.btn.small { padding: 7px 14px; font-size: 11.5px; letter-spacing: 0.16em; }

/* ───────── home ───────── */
.hero { position: relative; min-height: calc(100vh - var(--bar)); display: grid; align-items: center; overflow: hidden; }
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero::after { content: ""; position: absolute; inset: auto 0 0 0; height: 30%; background: linear-gradient(transparent, var(--bg)); pointer-events: none; }
.hero .hero-inner { position: relative; z-index: 2; width: 100%; padding: 70px 28px 110px; }
.hero h1 { font-weight: 200; font-size: clamp(62px, 13.5vw, 200px); letter-spacing: 0.1em; line-height: 0.86; margin: 20px 0 0 -0.04em; }
.hero h1 span { display: block; font-size: 0.3em; letter-spacing: 0.62em; color: var(--phosphor); font-weight: 300; margin-top: 0.5em; padding-left: 0.14em; }
.hero .lede { margin: 36px 0 36px; font-size: clamp(18px, 2vw, 23px); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.stats { display: flex; flex-wrap: wrap; gap: 14px 46px; margin-top: 58px; }
.stat b { display: block; font-family: var(--display); font-weight: 200; font-size: 46px; line-height: 1; letter-spacing: 0.02em; font-variant-numeric: tabular-nums; }
.stat span { font-family: var(--mono); font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); }
.doors { display: grid; grid-template-columns: repeat(12, 1fr); gap: 14px; }
.door { grid-column: span 4; position: relative; padding: 26px 26px 24px; border: 1px solid var(--line); border-radius: 6px; background: linear-gradient(160deg, var(--panel), var(--bg-2)); min-height: 190px; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; transition: border-color 0.3s, transform 0.4s var(--ease); }
.door:hover { border-color: var(--line-2); transform: translateY(-3px); }
.door.wide { grid-column: span 6; min-height: 250px; }
.door .eyebrow { margin-bottom: auto; }
.door h3 { font-size: 30px; letter-spacing: 0.06em; margin: 18px 0 8px; }
.door p { margin: 0; color: var(--muted); font-size: 16px; max-width: 46ch; }
.door.hot h3 { color: var(--phosphor); }
.door.uv h3 { color: var(--uv); }
.door::before { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 80% at 100% 0, color-mix(in srgb, var(--c, var(--text)) 12%, transparent), transparent 70%); opacity: 0.8; pointer-events: none; }
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: min(380px, 84vw); gap: 14px; overflow-x: auto; padding: 4px 28px 18px; margin: 0 -28px; scroll-snap-type: x mandatory; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.rail > * { scroll-snap-align: start; }
.season-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; }
.season-tile { border: 1px solid var(--line); border-radius: 6px; padding: 18px 16px; background: var(--bg-2); transition: 0.3s var(--ease); }
.season-tile:hover { border-color: var(--line-2); background: var(--panel); }
.season-tile b { display: block; font-family: var(--display); font-weight: 200; font-size: 44px; line-height: 1; }
.season-tile span { display: block; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); margin-top: 10px; }
.season-tile i { font-style: normal; color: var(--phosphor); }

/* ───────── egg cards ───────── */
.egg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.egg {
  position: relative; display: flex; flex-direction: column; gap: 10px; text-align: left; width: 100%;
  padding: 18px 20px 16px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg-2);
  transition: border-color 0.25s, background 0.25s, transform 0.35s var(--ease); cursor: pointer; overflow: hidden;
}
.egg::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--c); opacity: 0.75; }
.egg:hover { border-color: color-mix(in srgb, var(--c) 55%, transparent); background: var(--panel); transform: translateY(-2px); }
.egg-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.egg-top .ty { color: var(--c); display: inline-flex; align-items: center; gap: 7px; min-width: 0; }
.egg-top .ty span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.egg-top .ep { white-space: nowrap; }
.egg h3 { font-size: 20.5px; font-weight: 400; letter-spacing: 0.01em; line-height: 1.22; }
.egg p { margin: 0; color: var(--soft); font-size: 15.5px; line-height: 1.5; }
.egg-foot { display: flex; align-items: center; gap: 12px; margin-top: auto; padding-top: 6px; flex-wrap: wrap; }
.egg-foot .tags { font-family: var(--display); font-size: 12px; color: var(--dim); letter-spacing: 0.04em; margin-left: auto; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60%; }
.egg .star { color: var(--amber); letter-spacing: 0.1em; }
.egg-list { display: flex; flex-direction: column; gap: 10px; }
.egg-list .egg { flex-direction: row; align-items: flex-start; gap: 16px; padding: 16px 18px; }
.egg-list .egg .egg-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.group-head { display: flex; align-items: baseline; gap: 14px; margin: 34px 0 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.group-head:first-child { margin-top: 0; }
.group-head h3 { font-size: 21px; letter-spacing: 0.04em; }
.group-head h3 a:hover { color: var(--phosphor); }
.group-head .eyebrow { margin-left: auto; white-space: nowrap; }
.more-row { display: flex; justify-content: center; padding: 26px 0 0; }
.empty { padding: 40px 0; color: var(--muted); font-style: italic; }

/* filter bar */
.filters { display: flex; flex-direction: column; gap: 12px; margin: 0 0 22px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 6px; background: rgba(14, 19, 17, 0.6); }
.filters-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.filters-row > .eyebrow { width: 74px; flex: none; font-size: 10.5px; }
.filters .count { margin-left: auto; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 999px; padding: 2px; }
.seg button { font-family: var(--display); font-size: 12px; letter-spacing: 0.1em; padding: 4px 12px; border-radius: 999px; color: var(--muted); }
.seg button.on { background: var(--text); color: var(--bg); }

/* ───────── episode index ───────── */
.tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 26px; }
.tab { font-family: var(--display); font-size: 13px; letter-spacing: 0.2em; text-transform: uppercase; padding: 9px 16px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); transition: 0.2s; }
.tab:hover { color: var(--text); border-color: var(--line-2); }
.tab.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.ep-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
.ep-card { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 18px 20px; min-height: 150px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg-2); transition: 0.3s var(--ease); }
.ep-card:hover { border-color: var(--line-2); background: var(--panel); transform: translateY(-2px); }
.ep-card .num { font-family: var(--mono); font-size: 11px; letter-spacing: 0.2em; color: var(--muted); display: flex; justify-content: space-between; }
.ep-card h3 { font-size: 23px; letter-spacing: 0.02em; font-weight: 300; }
.ep-card .who { font-size: 14.5px; color: var(--muted); font-style: italic; }
.ep-card .bar { display: flex; height: 3px; gap: 2px; margin-top: auto; border-radius: 2px; overflow: hidden; }
.ep-card .bar i { display: block; height: 100%; background: var(--c); opacity: 0.85; }
.ep-card .cnt { font-family: var(--mono); font-size: 11.5px; color: var(--soft); letter-spacing: 0.06em; }
.ep-card.empty-ep { opacity: 0.45; }

/* episode page */
.split { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 44px; align-items: start; }
.side { position: sticky; top: calc(var(--bar) + 22px); display: flex; flex-direction: column; gap: 26px; max-height: calc(100vh - var(--bar) - 44px); overflow-y: auto; padding-right: 6px; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.side h4 { font-family: var(--mono); font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); font-weight: 400; margin-bottom: 12px; }
.linklist { display: flex; flex-direction: column; }
.linklist a { display: block; padding: 10px 0; border-top: 1px solid var(--line); transition: 0.2s; }
.linklist a:hover { padding-left: 6px; }
.linklist a:hover b { color: var(--phosphor); }
.linklist b { display: block; font-family: var(--display); font-weight: 400; font-size: 15.5px; letter-spacing: 0.02em; }
.linklist span { display: block; font-size: 14px; color: var(--muted); line-height: 1.4; }
.linklist em { font-style: normal; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.14em; color: var(--dim); text-transform: uppercase; }
.pager { display: flex; justify-content: space-between; gap: 14px; margin: 56px 0 0; padding-top: 24px; border-top: 1px solid var(--line); }
.pager a { display: flex; flex-direction: column; gap: 4px; max-width: 46%; }
.pager a:last-child { text-align: right; margin-left: auto; }
.pager a span { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }
.pager a b { font-family: var(--display); font-weight: 300; font-size: 22px; }
.pager a:hover b { color: var(--phosphor); }

/* appearance strip: one tick per episode, in broadcast order */
.strip { display: flex; align-items: flex-end; gap: 1px; height: 46px; margin: 22px 0 6px; }
.strip a { flex: 1; min-width: 2px; height: 100%; display: flex; align-items: flex-end; position: relative; }
.strip a i { display: block; width: 100%; height: 4px; background: var(--line-2); border-radius: 1px; transition: background 0.2s; }
.strip a.hit i { background: var(--c, var(--phosphor)); box-shadow: 0 0 8px color-mix(in srgb, var(--c, var(--phosphor)) 60%, transparent); }
.strip a:hover i { background: #fff; }
.strip a.gap { margin-left: 6px; }
.strip-legend { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 10px; letter-spacing: 0.18em; color: var(--dim); text-transform: uppercase; }

/* ───────── tiles (characters, types, threads) ───────── */
.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.tile { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; min-height: 128px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg-2); transition: 0.3s var(--ease); position: relative; overflow: hidden; }
.tile:hover { border-color: color-mix(in srgb, var(--c, var(--text)) 50%, transparent); background: var(--panel); transform: translateY(-2px); }
.tile h3 { font-size: 22px; font-weight: 300; letter-spacing: 0.02em; }
.tile p { margin: 0; font-size: 14.5px; color: var(--muted); line-height: 1.45; }
.tile .n { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.1em; color: var(--c, var(--soft)); margin-top: auto; padding-top: 10px; }
.tile.big { min-height: 190px; padding: 22px; }
.tile.big h3 { font-size: 26px; }
.tile .oct { --s: 40px; margin-bottom: 10px; }
.tile .spark { display: flex; align-items: flex-end; gap: 3px; height: 22px; margin-top: 8px; }
.tile .spark i { flex: 1; background: var(--c, var(--uv)); opacity: 0.75; border-radius: 1px; min-height: 1px; }
.group-label { font-family: var(--mono); font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); margin: 34px 0 14px; display: flex; align-items: center; gap: 14px; }
.group-label::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.about-text { max-width: 70ch; color: var(--soft); font-size: 18.5px; }
.about-text p + p { margin-top: 0.4em; }
.payoff { border-left: 2px solid var(--amber); padding: 2px 0 2px 16px; margin-top: 18px; color: var(--text); font-style: italic; max-width: 66ch; }

/* ───────── drawer ───────── */
.scrim { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); animation: fadeIn 0.3s both; }
@keyframes fadeIn { from { opacity: 0; } }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 55; width: min(640px, 100vw);
  background: linear-gradient(180deg, #0f1512, #080b0a); border-left: 1px solid var(--line-2);
  overflow-y: auto; overscroll-behavior: contain; padding: 0 0 60px; animation: drawerIn 0.45s var(--ease) both;
  scrollbar-width: thin; scrollbar-color: var(--line-2) transparent;
}
@keyframes drawerIn { from { transform: translateX(40px); opacity: 0; } }
.drawer-bar { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 22px; background: rgba(13, 18, 16, 0.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.drawer-bar .eyebrow a:hover { color: var(--text); }
.icon-btn { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line-2); display: grid; place-items: center; color: var(--muted); transition: 0.2s; flex: none; }
.icon-btn:hover { color: var(--text); border-color: var(--text); }
.icon-btn svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; }
.drawer-body { padding: 30px 32px 0; }
.drawer-type { display: flex; align-items: center; gap: 12px; color: var(--c); font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.2em; text-transform: uppercase; margin-bottom: 18px; flex-wrap: wrap; }
.drawer h2 { font-size: clamp(28px, 4vw, 38px); font-weight: 300; line-height: 1.12; margin-bottom: 16px; }
.drawer .hook { font-size: 20px; color: var(--text); font-style: italic; line-height: 1.5; margin-bottom: 20px; }
.drawer .detail { color: var(--soft); font-size: 17.5px; line-height: 1.68; }
.drawer .facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; margin: 26px 0; }
.drawer .fact { background: #0c110f; padding: 12px 14px; }
.drawer .fact i { display: block; font-style: normal; font-family: var(--mono); font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--dim); margin-bottom: 4px; }
.drawer .fact b { font-family: var(--display); font-weight: 400; font-size: 15px; letter-spacing: 0.02em; }
.drawer h4 { font-family: var(--mono); font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); font-weight: 400; margin: 28px 0 12px; display: flex; align-items: center; gap: 12px; }
.drawer h4::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.drawer .src { font-family: var(--mono); font-size: 12px; color: var(--dim); line-height: 1.6; margin-top: 26px; }
.collide { display: flex; flex-direction: column; gap: 8px; }
.collide a { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 6px; transition: 0.2s; align-items: center; }
.collide a:hover { border-color: color-mix(in srgb, var(--c) 55%, transparent); background: rgba(255, 255, 255, 0.02); }
.collide .oct { --s: 30px; grid-row: span 2; }
.collide b { font-family: var(--display); font-weight: 400; font-size: 16px; line-height: 1.25; }
.collide span { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.08em; color: var(--muted); }
.collide span em { font-style: normal; color: var(--uv); }

/* ───────── canvas stages ───────── */
.stage { position: relative; height: calc(100vh - var(--bar)); min-height: 560px; overflow: hidden; background: radial-gradient(90% 70% at 50% 45%, #0b100e, var(--bg) 75%); }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
.stage canvas.grabbing { cursor: grabbing; }
.stage canvas.pointing { cursor: pointer; }
.hud { position: absolute; z-index: 3; pointer-events: none; }
.hud > * { pointer-events: auto; }
.hud.tl { left: 22px; top: 20px; max-width: min(430px, calc(100vw - 44px)); }
.hud.tl.wide { max-width: none; right: 22px; }
.stage.has-side .hud.tl.wide { right: 430px; }
.hud-row { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 12px 30px; margin-bottom: 10px; }
.hud.wide h1 { margin: 6px 0 0; }
.hud.wide .lede { max-width: 96ch; margin: 0 0 10px; font-size: 15px; }
.hud.bl { left: 22px; bottom: 18px; }
.hud.br { right: 22px; bottom: 18px; }
.hud h1 { font-size: 30px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 300; margin: 8px 0 8px; }
.hud .lede { font-size: 15.5px; color: var(--muted); margin: 0 0 14px; line-height: 1.5; }
.panel { background: rgba(10, 14, 12, 0.88); border: 1px solid var(--line-2); border-radius: 8px; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.stage-side { position: absolute; z-index: 4; right: 18px; top: 18px; bottom: 18px; width: min(390px, calc(100vw - 36px)); display: flex; flex-direction: column; overflow: hidden; animation: drawerIn 0.4s var(--ease) both; }
.stage-side-head { padding: 16px 18px 14px; border-bottom: 1px solid var(--line); display: flex; gap: 12px; align-items: flex-start; }
.stage-side-head h2 { font-size: 23px; font-weight: 300; line-height: 1.15; margin-top: 4px; }
.stage-side-head .icon-btn { margin-left: auto; }
.stage-side-body { padding: 14px 18px 20px; overflow-y: auto; flex: 1; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.stage-side-body p { color: var(--soft); font-size: 15.5px; line-height: 1.5; }
.stage-side h4 { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); font-weight: 400; margin: 18px 0 8px; }
.mini { display: flex; flex-direction: column; }
.mini button, .mini a { display: flex; gap: 10px; align-items: baseline; text-align: left; padding: 8px 0; border-top: 1px solid var(--line); width: 100%; }
.mini button:hover b, .mini a:hover b { color: var(--phosphor); }
.mini b { font-family: var(--display); font-weight: 400; font-size: 15px; line-height: 1.3; flex: 1; }
.mini em { font-style: normal; font-family: var(--mono); font-size: 10.5px; color: var(--dim); letter-spacing: 0.08em; white-space: nowrap; }
.mini .d { width: 7px; height: 7px; border-radius: 50%; background: var(--c, var(--muted)); flex: none; transform: translateY(-1px); }
.controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.picker { position: relative; }
.picker input { width: 250px; max-width: 70vw; height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(5, 7, 6, 0.8); color: var(--text); font-family: var(--display); font-size: 14px; letter-spacing: 0.04em; outline: none; }
.picker input:focus { border-color: var(--phosphor); }
.picker input::placeholder { color: var(--dim); }
.picker-list { position: absolute; left: 0; top: 42px; width: 300px; max-width: 80vw; max-height: 320px; overflow-y: auto; z-index: 10; padding: 6px; }
.picker-list button { display: flex; width: 100%; gap: 10px; align-items: center; text-align: left; padding: 7px 10px; border-radius: 5px; font-family: var(--display); font-size: 14.5px; }
.picker-list button:hover, .picker-list button.sel { background: rgba(233, 229, 217, 0.08); }
.picker-list em { font-style: normal; margin-left: auto; font-family: var(--mono); font-size: 10px; color: var(--dim); letter-spacing: 0.12em; text-transform: uppercase; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 10px 14px; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.1em; color: var(--muted); max-width: calc(100vw - 44px); }
.stage.has-side .legend { max-width: calc(100vw - 460px); }
.legend span { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.legend span:hover { color: var(--text); }
.legend span.off { opacity: 0.35; }
.legend i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.chain { display: flex; flex-direction: column; gap: 0; }
.chain .node { font-family: var(--display); font-size: 17px; letter-spacing: 0.04em; padding: 8px 12px; border: 1px solid var(--line-2); border-radius: 6px; display: flex; align-items: center; gap: 10px; }
.chain .node.t { border-color: color-mix(in srgb, var(--uv) 50%, transparent); }
.chain .node.c { border-color: color-mix(in srgb, var(--amber) 50%, transparent); }
.chain .via { margin: 0 0 0 18px; padding: 10px 0 10px 16px; border-left: 1px dashed var(--line-2); text-align: left; display: block; width: calc(100% - 18px); }
.chain .via b { display: block; font-family: var(--display); font-weight: 400; font-size: 14.5px; line-height: 1.3; }
.chain .via:hover b { color: var(--phosphor); }
.chain .via em { font-style: normal; font-family: var(--mono); font-size: 10px; color: var(--dim); letter-spacing: 0.12em; text-transform: uppercase; }

/* ───────── search ───────── */
.search { position: fixed; inset: 0; z-index: 70; background: rgba(2, 3, 3, 0.82); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); display: flex; justify-content: center; padding: 10vh 18px 0; animation: fadeIn 0.2s both; }
.search-box { width: min(720px, 100%); max-height: 78vh; display: flex; flex-direction: column; background: #0c110f; border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; box-shadow: 0 40px 120px rgba(0, 0, 0, 0.7); align-self: flex-start; }
.search-field { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.search-field svg { width: 19px; height: 19px; stroke: var(--muted); fill: none; stroke-width: 2; stroke-linecap: round; flex: none; }
.search-field input { flex: 1; background: none; border: 0; outline: 0; color: var(--text); font-family: var(--display); font-size: 21px; font-weight: 300; letter-spacing: 0.02em; min-width: 0; }
.search-field input::placeholder { color: var(--dim); }
.search-results { overflow-y: auto; padding: 8px; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.search-results a { display: grid; grid-template-columns: auto 1fr auto; gap: 2px 12px; align-items: center; padding: 10px 12px; border-radius: 6px; }
.search-results a.sel, .search-results a:hover { background: rgba(233, 229, 217, 0.07); }
.search-results .oct { --s: 30px; grid-column: 1; grid-row: 1 / span 2; }
.search-results b { grid-column: 2; grid-row: 1; font-family: var(--display); font-weight: 400; font-size: 16.5px; line-height: 1.25; }
.search-results a > span:not(.oct) { grid-column: 2; grid-row: 2; font-size: 13.5px; color: var(--muted); line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.search-results em { grid-row: 1 / span 2; grid-column: 3; font-style: normal; font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--dim); white-space: nowrap; }
input[type="search"]::-webkit-search-cancel-button, input[type="search"]::-webkit-search-decoration { -webkit-appearance: none; appearance: none; }
.search-results mark { background: none; color: var(--phosphor); }
.search-results .none { padding: 26px 14px; color: var(--muted); font-style: italic; }
.search-hint { margin: 0; padding: 10px 20px; border-top: 1px solid var(--line); font-family: var(--mono); font-size: 11px; color: var(--dim); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }

/* ───────── tooltip ───────── */
.tip { position: fixed; z-index: 80; max-width: 320px; padding: 10px 13px; pointer-events: none; background: rgba(8, 11, 10, 0.96); border: 1px solid var(--line-2); border-radius: 6px; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6); font-size: 14px; line-height: 1.4; color: var(--soft); }
.tip b { display: block; font-family: var(--display); font-weight: 400; font-size: 15.5px; color: var(--text); line-height: 1.25; margin-bottom: 3px; }
.tip i { display: block; font-style: normal; font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--c, var(--muted)); margin-bottom: 5px; }

/* ───────── intro ───────── */
.intro { position: fixed; inset: 0; z-index: 100; background: #000; display: grid; place-items: center; overflow: hidden; cursor: pointer; }
.intro.out { animation: introOut 1.1s ease forwards; }
@keyframes introOut { to { opacity: 0; visibility: hidden; } }
.intro-stage { perspective: 900px; text-align: center; }
.intro-title { font-family: var(--display); font-weight: 300; color: #fff; font-size: clamp(70px, 19vw, 280px); letter-spacing: 0.16em; padding-left: 0.16em; line-height: 1; transform-style: preserve-3d; animation: drift 6.2s cubic-bezier(0.3, 0, 0.5, 1) both; will-change: transform, filter, opacity; }
@keyframes drift {
  0% { transform: translateZ(-1500px) rotateY(-38deg) rotateX(10deg) rotateZ(-6deg); filter: blur(16px); opacity: 0; }
  14% { opacity: 0.9; }
  62% { transform: translateZ(0) rotateY(0deg) rotateX(0) rotateZ(0); filter: blur(0); opacity: 1; }
  100% { transform: translateZ(300px) rotateY(12deg) rotateX(-3deg) rotateZ(2deg); filter: blur(5px); opacity: 0.0; }
}
.intro-sub { position: absolute; left: 0; right: 0; top: 50%; font-family: var(--display); font-weight: 300; font-size: clamp(15px, 2.6vw, 30px); letter-spacing: 0.9em; padding-left: 0.9em; color: var(--phosphor); opacity: 0; animation: subIn 3.2s 3.6s ease both; text-shadow: 0 0 30px rgba(125, 255, 168, 0.5); }
@keyframes subIn { 0% { opacity: 0; letter-spacing: 1.6em; filter: blur(8px); } 45% { opacity: 1; filter: blur(0); } 80% { opacity: 1; } 100% { opacity: 0; letter-spacing: 0.9em; } }
.intro-warn { position: absolute; bottom: 9vh; left: 0; right: 0; text-align: center; margin: 0; font-family: var(--mono); font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase; color: #6f716a; animation: fadeIn 2s 1s both; }
.intro-skip { position: absolute; right: 24px; bottom: 22px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase; color: #6f716a; padding: 10px; }
.intro-skip:hover { color: #fff; }
body.booting .topbar, body.booting main, body.booting .foot { visibility: hidden; }

/* ───────── terminal (the Swan) ───────── */
.terminal { position: fixed; inset: 0; z-index: 90; background: rgba(0, 0, 0, 0.9); display: grid; place-items: center; padding: 18px; animation: fadeIn 0.25s both; }
.crt { width: min(680px, 100%); background: #020a05; border: 1px solid #1c3a26; border-radius: 12px; padding: 28px 30px 24px; font-family: var(--mono); color: var(--phosphor); font-size: 16px; line-height: 1.7; text-shadow: 0 0 9px rgba(125, 255, 168, 0.55); box-shadow: 0 0 80px rgba(125, 255, 168, 0.1), inset 0 0 90px rgba(0, 0, 0, 0.9); position: relative; overflow: hidden; }
.crt::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(rgba(0, 0, 0, 0) 0 2px, rgba(0, 0, 0, 0.28) 2px 3px); }
.crt-lines { min-height: 190px; white-space: pre-wrap; word-break: break-word; }
.crt-lines .dim { opacity: 0.55; }
.crt-lines .hot { color: #fff; }
.crt-lines .bad { color: var(--danger); text-shadow: 0 0 9px rgba(255, 107, 94, 0.6); }
.crt-in { display: flex; gap: 10px; align-items: center; margin-top: 8px; }
.crt-in input { flex: 1; background: none; border: 0; outline: 0; color: inherit; font: inherit; text-shadow: inherit; caret-color: var(--phosphor); min-width: 0; }
.crt-foot { display: flex; justify-content: space-between; gap: 12px; margin-top: 18px; font-size: 11px; letter-spacing: 0.16em; opacity: 0.6; text-transform: uppercase; flex-wrap: wrap; }
.crt-foot button { text-transform: uppercase; letter-spacing: 0.16em; text-shadow: inherit; }
.crt-foot button:hover { color: #fff; }
body.failure { animation: quake 0.5s linear infinite; }
@keyframes quake { 0%, 100% { transform: translate(0, 0); } 25% { transform: translate(-3px, 2px); } 50% { transform: translate(3px, -2px); } 75% { transform: translate(-2px, -3px); } }
.sky { position: fixed; inset: 0; z-index: 95; pointer-events: none; background: #f4e9ff; opacity: 0; }
.sky.go { animation: sky 4.5s ease-in-out forwards; }
@keyframes sky { 0% { opacity: 0; } 45% { opacity: 1; } 70% { opacity: 1; } 100% { opacity: 0; } }

/* ───────── footer & about ───────── */
.foot { position: relative; z-index: 2; margin-top: 90px; padding: 34px 28px 46px; border-top: 1px solid var(--line); color: var(--dim); font-size: 14px; max-width: var(--wrap); margin-left: auto; margin-right: auto; line-height: 1.55; }
.foot p { margin: 0 0 8px; max-width: 96ch; }
.foot a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-2); }
.foot a:hover { color: var(--text); }
.foot strong { color: var(--muted); font-family: var(--display); font-weight: 400; letter-spacing: 0.14em; text-transform: uppercase; font-size: 12.5px; }
body.staged .foot { display: none; }
.prose { max-width: 70ch; color: var(--soft); font-size: 18.5px; }
.prose h2 { font-size: 24px; letter-spacing: 0.1em; text-transform: uppercase; margin: 44px 0 14px; color: var(--text); }
.prose a { color: var(--phosphor); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(125, 255, 168, 0.35); }
.prose ul { padding-left: 1.1em; }
.prose li { margin-bottom: 0.5em; }
.prose li::marker { color: var(--phosphor); }

/* ───────── responsive ───────── */
@media (max-width: 1080px) {
  .split { grid-template-columns: 1fr; }
  .side { position: static; max-height: none; overflow: visible; }
  .door, .door.wide { grid-column: span 6; }
  .season-strip { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 860px) {
  :root { --bar: 96px; }
  .topbar { flex-wrap: wrap; height: var(--bar); padding: 0 14px; gap: 0 12px; align-content: center; }
  .brand { order: 1; height: 50px; }
  .topbar-tools { order: 2; margin-left: auto; }
  .nav { order: 3; width: 100%; margin: 0 -14px; padding: 0 8px; width: calc(100% + 28px); height: 42px; align-items: center; border-top: 1px solid var(--line); }
  .nav a.nav-hot { order: -1; }
  .tool span, .tool kbd { display: none; }
  .tool { padding: 0 10px; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .rail { padding: 4px 16px 18px; margin: 0 -16px; }
  .page-head { padding: 40px 0 26px; }
  .hero .hero-inner { padding: 34px 16px 80px; }
  .hero .lede { margin: 26px 0; }
  .stats { margin-top: 40px; }
  .door, .door.wide { grid-column: span 12; min-height: 150px; }
  .season-strip { grid-template-columns: repeat(2, 1fr); }
  .egg-grid, .ep-grid, .tile-grid { grid-template-columns: 1fr; }
  .egg-list .egg { flex-direction: column; gap: 10px; }
  .drawer-body { padding: 24px 20px 0; }
  .drawer .facts { grid-template-columns: 1fr 1fr; }
  .filters-row > .eyebrow { width: 100%; }
  .hud.tl { left: 14px; top: 12px; }
  .hud h1 { font-size: 22px; }
  .hud .lede, .hud [data-try] { display: none; }
  .stage.has-side .hud.tl.wide { right: 14px; }
  .hud.tl.wide { right: 14px; }
  .hud-row { gap: 8px 14px; }
  .stage-side { left: 10px; right: 10px; top: auto; bottom: 10px; width: auto; max-height: 56%; }
  .hud.bl, .hud.br { left: 10px; right: 10px; bottom: 10px; }
  .legend { display: none; }
  .brand-word { font-size: 11.5px; letter-spacing: 0.26em; }
  .stats { gap: 14px 30px; }
  .stat b { font-size: 36px; }
  .foot { padding: 28px 16px 40px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  body::before { animation: none; }
}
