/* ==========================================================================
   Sydney Quant — the space layer.
   Loaded after site.css on every page that sits on the WebGL scene.

   The look is deliberate: square edges, hairline rules, a wide aerospace
   display face, mono labels, type-set arrows. No pills, no glass cards, no
   gradient lettering, no glows on buttons. Colour is spent on the scene and
   on one accent per chapter; the interface stays black, white and exact.
   ========================================================================== */

:root {
  --bg: #020309;
  --ink: #eef1f6;
  --ink-2: #aab2c2;
  --ink-3: #6c7486;
  --rule: rgba(255, 255, 255, 0.12);
  --rule-2: rgba(255, 255, 255, 0.24);
  --line: var(--rule);
  --line-2: var(--rule-2);
  --surface: rgba(4, 6, 12, 0.86);
  --surface-2: rgba(10, 13, 22, 0.9);
  --display: "Archivo", "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif;
  --sans: "IBM Plex Sans", ui-sans-serif, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --accent: #5eead4;
  --hud-accent: #5eead4;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

/* Square everything, including what site.css rounds. */
body.space *, body.space *::before, body.space *::after { border-radius: 0 !important; }
body.space .btn, body.space .card, body.space .chip, body.space .tab, body.space .kpi, body.space .inst,
body.space .fundchip, body.space .storebtn, body.space .toggle, body.space .sheet, body.space .kbox { box-shadow: none !important; }

html { scroll-padding-top: 84px; }
body.space { background: var(--bg); overflow-x: clip; font-family: var(--sans); letter-spacing: 0; }
body.space h1, body.space h2, body.space h3, body.space h4 { letter-spacing: 0; }
::selection { background: var(--accent); color: #04060b; }

/* --------------------------------------------------------- the canvas -- */

#space {
  position: fixed; inset: 0; width: 100%; height: 100vh; height: 100lvh;
  z-index: 0; pointer-events: none; opacity: 0; transition: opacity 1.4s ease;
}
.has-space #space, .intro-run #space { opacity: 1; }
.intro-run #space { transition: none; }

.space-fallback {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(1px 1px at 12% 18%, rgba(255,255,255,.7), transparent 60%),
    radial-gradient(1px 1px at 72% 12%, rgba(255,255,255,.55), transparent 60%),
    radial-gradient(1.5px 1.5px at 38% 64%, rgba(190,240,255,.65), transparent 60%),
    radial-gradient(1px 1px at 86% 72%, rgba(255,255,255,.5), transparent 60%),
    radial-gradient(1px 1px at 22% 86%, rgba(255,255,255,.45), transparent 60%),
    radial-gradient(1.5px 1.5px at 58% 34%, rgba(255,255,255,.6), transparent 60%),
    var(--bg);
  background-size: 340px 340px, 420px 420px, 380px 380px, 300px 300px, 460px 460px, 520px 520px, 100% 100%;
  transition: opacity 1.4s ease;
}
.has-space .space-fallback { opacity: 0; }

main, footer { position: relative; z-index: 2; }
main, .ch { overflow-x: clip; }

/* ----------------------------------------------------------- the opening -- */

.intro-veil, .intro-hud, .intro-skip { display: none; }
.intro .intro-veil {
  display: grid; place-items: center; position: fixed; inset: 0; z-index: 95; background: #000;
  font-family: var(--mono); font-size: 10px; letter-spacing: .3em; text-transform: uppercase; color: var(--ink-3);
}
.intro .intro-veil span::after { content: "_"; animation: blink 1s steps(1) infinite; }
.intro-run .intro-veil { opacity: 0; transition: opacity .45s ease; pointer-events: none; }
.intro .hud, .intro .rail, .intro .hud-tele, .intro .hud-ch, .intro main, .intro footer { opacity: 0; pointer-events: none; }

.intro-run .intro-hud {
  display: block; position: fixed; left: 50%; bottom: 9vh; transform: translateX(-50%); z-index: 96;
  width: min(420px, calc(100% - 48px)); text-align: center; pointer-events: none;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .28em; text-transform: uppercase; color: var(--ink-2);
}
.intro-hud p { margin: 0 0 12px; display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 1.4em; }
.intro-hud i { width: 6px; height: 6px; background: #f5a524; animation: blink .5s steps(1) infinite; }
.intro-track { height: 1px; background: rgba(255, 255, 255, .14); }
.intro-track b { display: block; height: 100%; background: var(--ink); transform: scaleX(0); transform-origin: left; }
.intro-run .intro-skip {
  display: block; position: fixed; right: 22px; bottom: 22px; z-index: 96;
  font-family: var(--mono); font-size: 10px; letter-spacing: .22em; text-transform: uppercase;
  padding: 10px 14px; background: transparent; color: var(--ink-2); border: 1px solid var(--rule-2); cursor: pointer;
}
.intro-run .intro-skip:hover { color: #04060b; background: var(--ink); }
@keyframes blink { 50% { opacity: 0; } }

.intro-reveal main, .intro-reveal footer { animation: reveal-in .9s ease both; }
.intro-reveal .hud, .intro-reveal .rail, .intro-reveal .hud-tele, .intro-reveal .hud-ch { animation: reveal-in .8s .45s ease both; }
.intro-reveal .ch-hero .copy > *, .intro-reveal .ch-hero .stats { animation: rise 1s var(--ease-out) both; }
.intro-reveal .ch-hero .copy > :nth-child(2) { animation-delay: .08s; }
.intro-reveal .ch-hero .copy > :nth-child(3) { animation-delay: .18s; }
.intro-reveal .ch-hero .copy > :nth-child(4) { animation-delay: .28s; }
.intro-reveal .ch-hero .stats { animation-delay: .4s; }
@keyframes reveal-in { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(26px); filter: blur(6px); } }

/* ------------------------------------------------------------------ HUD -- */

.hud {
  position: fixed; inset: 0 0 auto 0; height: auto; z-index: 80;
  display: flex; align-items: center; gap: 28px;
  padding: 20px clamp(16px, 3vw, 36px);
  border: 0; background: linear-gradient(180deg, rgba(2, 3, 9, .75), rgba(2, 3, 9, 0));
}
.hud.is-stuck { background: linear-gradient(180deg, rgba(2, 3, 9, .85), rgba(2, 3, 9, 0)); backdrop-filter: none; -webkit-backdrop-filter: none; border: 0; }
.hud::before {
  content: ""; position: absolute; inset: 0 0 -26px 0; z-index: -1;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent); mask-image: linear-gradient(180deg, #000 55%, transparent);
  opacity: 0; transition: opacity .4s ease; pointer-events: none;
}
.hud.is-stuck::before { opacity: 1; }

.hud .brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); }
.hud .brand-mark { width: 26px; height: 26px; }
.brand-name {
  font-family: var(--display); font-stretch: 125%; font-weight: 700; font-size: 13px;
  letter-spacing: .08em; text-transform: uppercase;
}

.hud-nav { display: flex; gap: 2px; margin-left: auto; }
.hud-nav a {
  position: relative; font-family: var(--mono); font-size: 10.5px; font-weight: 500; letter-spacing: .18em;
  text-transform: uppercase; color: var(--ink-2); padding: 8px 12px;
}
.hud-nav a::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 1px; background: var(--hud-accent); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease-out); }
.hud-nav a:hover { color: var(--ink); }
.hud-nav a.is-active { color: var(--ink); background: none; }
.hud-nav a.is-active::after, .hud-nav a:hover::after { transform: scaleX(1); }

.k-trigger {
  display: inline-flex; align-items: center; gap: 10px; padding: 9px 12px; cursor: pointer;
  background: transparent; border: 1px solid var(--rule-2); color: var(--ink-2);
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase;
}
.k-trigger:hover { color: #04060b; background: var(--ink); border-color: var(--ink); }
.k-trigger kbd { background: none; border: 0; padding: 0; color: inherit; font-family: var(--mono); font-size: 10px; opacity: .7; }

.menu-btn {
  display: none; width: 42px; height: 42px; border: 1px solid var(--rule-2); background: transparent; cursor: pointer; place-items: center;
}
.menu-ico { position: relative; width: 16px; height: 9px; display: block; }
.menu-ico i { position: absolute; left: 0; right: 0; height: 1.5px; background: var(--ink); transition: transform .35s var(--ease-out), top .35s var(--ease-out); }
.menu-ico i:first-child { top: 0; }
.menu-ico i:last-child { top: 7.5px; }
.menu-btn[aria-expanded="true"] .menu-ico i:first-child { top: 3.75px; transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] .menu-ico i:last-child { top: 3.75px; transform: rotate(-45deg); }

.menu {
  position: fixed; inset: 0; z-index: 79; display: flex; flex-direction: column; justify-content: center; gap: 0;
  padding: 90px 24px 40px; background: rgba(2, 3, 9, .96);
}
.menu[hidden] { display: none; }
.menu a {
  display: flex; align-items: baseline; gap: 18px; padding: 12px 0; border-bottom: 1px solid var(--rule);
  font-family: var(--display); font-stretch: 125%; font-weight: 700; text-transform: uppercase;
  font-size: clamp(1.15rem, 5.4vw, 1.9rem); letter-spacing: .02em; color: var(--ink);
  animation: menuIn .5s var(--ease-out) both;
}
.menu a b { font-family: var(--mono); font-size: 10px; font-weight: 500; letter-spacing: .14em; color: var(--accent); }
.menu a:nth-child(2) { animation-delay: .03s; } .menu a:nth-child(3) { animation-delay: .06s; }
.menu a:nth-child(4) { animation-delay: .09s; } .menu a:nth-child(5) { animation-delay: .12s; }
.menu a:nth-child(6) { animation-delay: .15s; } .menu a:nth-child(7) { animation-delay: .18s; }
.menu a:nth-child(8) { animation-delay: .21s; }
@keyframes menuIn { from { opacity: 0; transform: translateY(12px); } }

@media (max-width: 1080px) {
  .hud-nav { display: none; }
  .hud .k-trigger { margin-left: auto; }
  .menu-btn { display: grid; }
}
@media (max-width: 560px) {
  .hud { gap: 10px; padding: 14px 16px; }
  .hud .k-trigger kbd { display: none; }
  .hud .k-trigger span { display: inline; }
  .brand-name { font-size: 11px; letter-spacing: .06em; }
}

/* the chapter rail */
.rail { position: fixed; left: clamp(14px, 2vw, 28px); top: 50%; transform: translateY(-50%); z-index: 60; display: flex; flex-direction: column; gap: 4px; }
.rail a { display: flex; align-items: center; gap: 12px; padding: 5px 0; color: var(--ink-3); }
.rail i { width: 14px; height: 1px; background: currentColor; transition: width .35s var(--ease-out); }
.rail span { font-family: var(--mono); font-size: 9.5px; letter-spacing: .18em; text-transform: uppercase; opacity: 0; transform: translateX(-6px); transition: opacity .25s, transform .3s var(--ease-out); white-space: nowrap; }
.rail:hover span, .rail a:focus-visible span { opacity: .9; transform: none; }
.rail a:hover { color: var(--ink); }
.rail a.is-active { color: var(--hud-accent); }
.rail a.is-active i { width: 30px; }

/* corner frame, telemetry, chapter readout */
.hud-frame { position: fixed; inset: 12px; z-index: 55; pointer-events: none; }
.hud-frame i { position: absolute; width: 16px; height: 16px; border-color: rgba(255,255,255,.26); border-style: solid; border-width: 0; }
.hud-frame i:nth-child(1) { left: 0; top: 0; border-left-width: 1px; border-top-width: 1px; }
.hud-frame i:nth-child(2) { right: 0; top: 0; border-right-width: 1px; border-top-width: 1px; }
.hud-frame i:nth-child(3) { left: 0; bottom: 0; border-left-width: 1px; border-bottom-width: 1px; }
.hud-frame i:nth-child(4) { right: 0; bottom: 0; border-right-width: 1px; border-bottom-width: 1px; }

.hud-tele, .hud-ch {
  position: fixed; bottom: 24px; z-index: 60; pointer-events: none;
  font-family: var(--mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3);
}
.hud-tele { left: clamp(20px, 2.6vw, 36px); display: flex; gap: 20px; }
.hud-tele b, .hud-ch b { color: var(--ink-2); font-weight: 500; font-variant-numeric: tabular-nums; }
.hud-ch { right: clamp(20px, 2.6vw, 36px); display: flex; align-items: baseline; gap: 4px; }
.hud-ch b { color: var(--hud-accent); font-size: 12px; }
.hud-ch em { font-style: normal; margin-left: 12px; color: var(--ink); }
.hud-bar { position: absolute; left: 0; right: 0; bottom: -8px; height: 1px; background: rgba(255,255,255,.1); }
.hud-bar b { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--hud-accent); }

body.space::after {
  content: ""; position: fixed; left: 0; right: 0; bottom: 0; height: 76px; z-index: 55; pointer-events: none;
  background: linear-gradient(180deg, rgba(2, 3, 9, 0), rgba(2, 3, 9, .78));
}
@media (max-width: 760px) {
  .rail, .hud-tele, .hud-frame { display: none; }
  .hud-ch { bottom: 16px; right: 16px; }
}
.no-webgl .hud-tele { display: none; }

/* ----------------------------------------------------------- typography -- */

.kick {
  display: flex; align-items: center; gap: 12px; margin: 0 0 22px;
  font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; color: var(--accent);
}
.kick::before { content: ""; width: 8px; height: 8px; background: currentColor; flex: none; }

.h-hero, .ch-title, .cast-name, .lab-hero h1 {
  font-family: var(--display); font-stretch: 125%; font-weight: 700; text-transform: uppercase;
  letter-spacing: -.005em; color: #fff; margin: 0; text-wrap: balance;
}
.h-hero { font-size: clamp(1.9rem, 4.1vw, 3.6rem); line-height: 1.02; margin-bottom: 24px; }
.ch-title { font-size: clamp(2.3rem, 5.4vw, 5rem); line-height: .94; margin-bottom: 24px; }
.ch-lede, .ch-hero .lede {
  font-size: clamp(1rem, 1.25vw, 1.15rem); font-weight: 400; line-height: 1.6; color: var(--ink-2);
  max-width: 34em; margin: 0; text-shadow: 0 1px 18px rgba(2, 3, 9, .9);
}
.fine { font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; color: var(--ink-3); margin: 22px 0 0; line-height: 1.7; }
.fine.links { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.fine.links a { color: var(--ink-2); border-bottom: 1px solid var(--rule-2); }
.fine.links a:hover { color: var(--ink); border-color: var(--ink); }

/* -------------------------------------------------------------- buttons -- */

.cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 34px; }
body.space .btn {
  display: inline-flex; align-items: center; gap: 14px; padding: 14px 18px;
  border: 1px solid var(--rule-2); background: rgba(2, 3, 9, .35); color: var(--ink);
  font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase;
  backdrop-filter: none; -webkit-backdrop-filter: none; transform: none;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
body.space .btn:hover { background: var(--ink); color: #04060b; border-color: var(--ink); transform: none; }
body.space .btn .arr { font-family: var(--sans); font-size: 15px; letter-spacing: 0; line-height: 1; }
body.space .btn-solid, body.space .btn-primary { background: var(--accent); border-color: var(--accent); color: #04060b; }
body.space .btn-solid:hover, body.space .btn-primary:hover { background: #fff; border-color: #fff; color: #04060b; }
body.space .btn svg { width: 14px; height: 14px; }

/* hairline corner brackets around media */
.frame {
  --c: rgba(255, 255, 255, .55); --k: 14px;
  position: relative; display: block; padding: 8px;
  background:
    linear-gradient(var(--c), var(--c)) left top / var(--k) 1px no-repeat,
    linear-gradient(var(--c), var(--c)) left top / 1px var(--k) no-repeat,
    linear-gradient(var(--c), var(--c)) right top / var(--k) 1px no-repeat,
    linear-gradient(var(--c), var(--c)) right top / 1px var(--k) no-repeat,
    linear-gradient(var(--c), var(--c)) left bottom / var(--k) 1px no-repeat,
    linear-gradient(var(--c), var(--c)) left bottom / 1px var(--k) no-repeat,
    linear-gradient(var(--c), var(--c)) right bottom / var(--k) 1px no-repeat,
    linear-gradient(var(--c), var(--c)) right bottom / 1px var(--k) no-repeat;
}

/* -------------------------------------------------------------- chapters -- */

.ch { position: relative; }
.ch-intro, .ch-hero, .ch-contact, .cast {
  min-height: 100vh; min-height: 100svh; display: grid; align-items: center; padding: 120px 0 90px;
}
.copy { max-width: 640px; position: relative; }
.copy::before {
  content: ""; position: absolute; inset: -18% -22%; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(2, 3, 9, .62), rgba(2, 3, 9, .26) 60%, transparent);
}
.ch-intro[data-fig="left"] .copy { margin-left: auto; }

/* hero */
.ch-hero { padding-bottom: 110px; }
.ch-hero .shell { display: grid; gap: 64px; }
.ch-hero .copy { max-width: 760px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: 760px; margin: 0; border-top: 1px solid var(--rule); }
.stats div { display: flex; flex-direction: column-reverse; gap: 8px; padding: 18px 18px 0 0; }
.stats dt { font-family: var(--mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); }
.stats dd { margin: 0; font-family: var(--display); font-stretch: 125%; font-weight: 600; font-size: 1.7rem; color: #fff; }
@media (max-width: 640px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 8px; } }

.scroll-cue {
  position: absolute; left: 50%; bottom: 30px; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  font-family: var(--mono); font-size: 10px; letter-spacing: .24em; text-transform: uppercase; color: var(--ink-3);
}
.scroll-cue:hover { color: var(--ink); }
.scroll-cue i { position: relative; width: 1px; height: 44px; background: rgba(255, 255, 255, .14); overflow: hidden; }
.scroll-cue i::after { content: ""; position: absolute; left: 0; width: 1px; height: 16px; background: var(--ink); animation: cue 2.2s cubic-bezier(.6, 0, .2, 1) infinite; }
@keyframes cue { from { top: -16px; } to { top: 44px; } }

/* contact */
.ch-contact { text-align: center; align-items: end; padding-bottom: 12vh; padding-top: 36vh; }
.ch-contact .copy { margin-inline: auto; max-width: 680px; }
.ch-contact .kick, .ch-contact .cta { justify-content: center; }
.ch-contact .ch-title { margin-inline: auto; }
.ch-contact .ch-lede { margin-inline: auto; }

@media (max-aspect-ratio: 19/20) {
  .ch-intro, .ch-hero, .cast { align-items: end; padding-top: 50vh; padding-top: 50svh; padding-bottom: 72px; }
  .ch-intro[data-fig="left"] .copy { margin-left: 0; }
  .ch-hero .shell { gap: 40px; }
  .ch-contact { padding-top: 52svh; }
  .scroll-cue { display: none; }
}

.ch-body { padding: 4vh 0 26vh; }
.ch-body > * + * { margin-top: clamp(56px, 8vw, 96px); }

/* --------------------------------------------------- auto arena reel -- */

.reel { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: end; }
.reel-media { max-width: 340px; }
#autoarena .aa-phone { padding: 0; border: 0; background: #05070c; box-shadow: none; }
#autoarena .aa-phone::after { display: none; }
#autoarena .aa-screen { aspect-ratio: 9 / 16; }
#autoarena .aa-sound {
  width: auto; height: auto; right: 0; bottom: 0; padding: 8px 10px; display: block;
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink-2); background: rgba(2, 3, 9, .8); border: 0; border-top: 1px solid var(--rule); border-left: 1px solid var(--rule);
  backdrop-filter: none; -webkit-backdrop-filter: none;
}
#autoarena .aa-sound[aria-pressed="true"] { color: #04060b; background: var(--accent); }
.reel-side { padding-bottom: 8px; }
.aa-tabs { display: flex; gap: 0; margin: 0; border: 1px solid var(--rule-2); }
.aa-tabs .aa-tab {
  flex: 1 1 0; padding: 12px 8px; border: 0; border-right: 1px solid var(--rule-2); background: transparent; color: var(--ink-2);
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; justify-content: center;
}
.aa-tabs .aa-tab:last-child { border-right: 0; }
.aa-tabs .aa-tab:hover { color: var(--ink); border-color: var(--rule-2); }
.aa-tabs .aa-tab[aria-pressed="true"] { color: #04060b; background: var(--accent); border-color: var(--rule-2); }
.aa-cap { margin: 16px 0 0; font-size: .9rem; color: var(--ink-2); line-height: 1.6; max-width: 36em; }
.specs { margin: 36px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--rule); }
.specs div { padding: 16px 16px 16px 0; border-bottom: 1px solid var(--rule); }
.specs dt { font-family: var(--mono); font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 6px; }
.specs dd { margin: 0; font-family: var(--display); font-stretch: 112%; font-weight: 600; font-size: 1.05rem; color: #fff; }
@media (max-width: 820px) { .reel { grid-template-columns: 1fr; } .reel-media { max-width: 300px; } }

/* ------------------------------------------------------------ the cast -- */

.cast-copy { max-width: 560px; position: relative; }
.cast-copy::before {
  content: ""; position: absolute; inset: -14% -20%; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(2, 3, 9, .6), rgba(2, 3, 9, .24) 60%, transparent);
}
.cast-name { font-size: clamp(2rem, 4.6vw, 4.2rem); line-height: .95; margin: 0 0 18px; min-height: .95em; }
.cast-meta { display: flex; flex-wrap: wrap; gap: 0; margin: 0 0 14px; font-family: var(--mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; }
.cast-meta span { color: var(--accent); }
.cast-meta span + span { color: var(--ink-2); margin-left: 14px; padding-left: 14px; border-left: 1px solid var(--rule-2); }
.cast-line { font-size: 1.05rem; color: var(--ink-2); line-height: 1.6; margin: 0 0 30px; min-height: 3.2em; max-width: 30em; }
.cast-list { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cast-group { width: 100%; font-family: var(--mono); font-size: 9.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-3); margin: 10px 0 2px; }
.cast-group:first-child { margin-top: 0; }
.cast-list button {
  padding: 8px 11px; cursor: pointer; background: rgba(2, 3, 9, .5); color: var(--ink-2); border: 1px solid var(--rule);
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase;
  transition: color .2s, background .2s, border-color .2s;
}
.cast-list button:hover { color: var(--ink); border-color: var(--rule-2); }
.cast-list button[aria-pressed="true"] { color: #04060b; background: var(--accent); border-color: var(--accent); }
.cast .fine { margin-top: 26px; }

/* -------------------------------------------------------- trading flow -- */

.flow { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border-top: 1px solid var(--rule-2); }
.flow li { position: relative; padding: 26px 18px 0 0; display: flex; flex-direction: column; gap: 8px; }
.flow li::before { content: ""; position: absolute; left: 0; top: -4px; width: 7px; height: 7px; background: var(--accent); }
.flow li span { font-family: var(--mono); font-size: 10px; letter-spacing: .18em; color: var(--ink-3); }
.flow li b { font-family: var(--display); font-stretch: 125%; font-weight: 700; font-size: 1rem; text-transform: uppercase; color: #fff; letter-spacing: .02em; }
.flow li i { font-style: normal; font-size: .86rem; line-height: 1.5; color: var(--ink-2); }
@media (max-width: 1000px) { .flow { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 32px; } }
@media (max-width: 560px) { .flow { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.tenets ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--rule); }
.tenets li {
  padding: 22px 20px 22px 0; border-bottom: 1px solid var(--rule);
  font-family: var(--display); font-stretch: 125%; font-weight: 600; font-size: clamp(1.05rem, 2vw, 1.5rem); text-transform: uppercase; color: #fff; line-height: 1.15;
}
.tenets li:nth-child(odd) { padding-right: 32px; border-right: 1px solid var(--rule); }
.tenets li:nth-child(even) { padding-left: 32px; }
@media (max-width: 640px) { .tenets ul { grid-template-columns: 1fr; } .tenets li:nth-child(n) { padding: 18px 0; border-right: 0; } }

/* -------------------------------------------------------------- lab tiles -- */

.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 22px; }
.tile { display: flex; flex-direction: column; gap: 8px; color: var(--ink); }
.tile-wide { grid-column: span 2; grid-row: span 2; }
.tile-media { overflow: hidden; margin-bottom: 10px; }
.tile-media img, .tile-media video { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: #05070c; transition: transform .8s var(--ease-out), filter .4s; filter: saturate(.9); }
.tile:hover .tile-media img, .tile:hover .tile-media video { transform: scale(1.035); filter: saturate(1.1); }
.tile-k { font-family: var(--mono); font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-3); }
.tile b { font-family: var(--display); font-stretch: 125%; font-weight: 700; font-size: 1rem; text-transform: uppercase; letter-spacing: .02em; }
.tile b::after { content: " →"; font-family: var(--sans); color: var(--accent); opacity: 0; transition: opacity .2s; }
.tile:hover { color: var(--ink); }
.tile:hover b::after { opacity: 1; }
.tile-wide b { font-size: clamp(1.2rem, 2.2vw, 1.8rem); }
@media (max-width: 900px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .tile-wide { grid-column: span 2; grid-row: auto; } }
@media (max-width: 560px) { .tiles { grid-template-columns: 1fr; } .tile-wide { grid-column: auto; } }

/* --------------------------------------------------------- catalogue rows -- */

.filters { display: flex; flex-wrap: wrap; gap: 0; margin-bottom: 26px; border: 1px solid var(--rule-2); width: fit-content; max-width: 100%; }
body.space .chip {
  padding: 11px 14px; border: 0; border-right: 1px solid var(--rule-2); background: rgba(2, 3, 9, .5); color: var(--ink-2);
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; backdrop-filter: none;
}
body.space .chip:last-child { border-right: 0; }
body.space .chip:hover { color: var(--ink); }
body.space .chip[aria-pressed="true"] { background: var(--accent); color: #04060b; font-weight: 500; }
body.space .chip .ct { font-size: 9.5px; opacity: .6; }

body.space .grid { display: block; border-top: 1px solid var(--rule-2); }
body.space .card {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 2fr) minmax(0, .9fr) 128px 24px; gap: 20px; align-items: center;
  padding: 20px 4px; border: 0; border-bottom: 1px solid var(--rule); background: rgba(2, 3, 9, .55);
  backdrop-filter: none; -webkit-backdrop-filter: none; transform: none; text-align: left; width: 100%; cursor: pointer;
  transition: background .2s;
}
body.space .card::before { display: none; }
body.space .card:hover { transform: none; background: rgba(255, 255, 255, .05); border-color: var(--rule); }
.card .r-name { font-family: var(--display); font-stretch: 125%; font-weight: 700; font-size: .95rem; text-transform: uppercase; color: #fff; letter-spacing: .02em; }
.card .r-tag { font-size: .9rem; color: var(--ink-2); line-height: 1.5; }
.card .r-cat { font-family: var(--mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.card .r-go { color: var(--ink-3); font-size: 15px; transition: color .2s, transform .3s var(--ease-out); }
.card:hover .r-name { color: var(--accent); }
.card:hover .r-go { color: var(--ink); transform: translateX(4px); }
.card.is-out { display: none; }
@media (max-width: 820px) {
  body.space .card { grid-template-columns: minmax(0, 1fr) auto; gap: 8px 14px; padding: 18px 4px; }
  .card .r-tag { grid-column: 1 / -1; order: 3; }
  .card .r-cat, .card .r-go { display: none; }
}

body.space .badge { padding: 4px 8px; font-size: 9px; letter-spacing: .14em; background: transparent; justify-self: start; }
body.space .badge::before { width: 5px; height: 5px; }

/* ---------------------------------------------------------------- company -- */

.company { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); align-items: start; }
.facts { margin: 0; border-top: 1px solid var(--rule-2); }
.facts div { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.facts dt { font-family: var(--mono); font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-3); padding-top: 3px; }
.facts dd { margin: 0; color: var(--ink); font-size: .95rem; line-height: 1.5; }
.company .tenets ul { grid-template-columns: 1fr; }
.company .tenets li:nth-child(n) { padding: 16px 0; border-right: 0; font-size: clamp(1rem, 1.6vw, 1.25rem); }
@media (max-width: 820px) { .company { grid-template-columns: 1fr; } }

/* --------------------------------------------------------------- footer -- */

.foot-space { border-top: 1px solid var(--rule); background: linear-gradient(180deg, rgba(2, 3, 9, 0), rgba(2, 3, 9, .9) 40%); }
.foot-space .foot { font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.foot-space .foot-links a { color: var(--ink-2); }
.foot-space .foot-links a:hover { color: var(--ink); }

/* -------------------------------------------------- sheet and palette -- */

body.space .sheet { background: #05070d; border-left: 1px solid var(--rule-2); backdrop-filter: none; -webkit-backdrop-filter: none; }
body.space .scrim { background: rgba(2, 3, 9, .7); }
body.space .sheet-head .t { font-family: var(--mono); }
body.space .sheet-body h2 { font-family: var(--display); font-stretch: 125%; font-weight: 700; text-transform: uppercase; font-size: 1.6rem; }
body.space .sheet-body h4 { font-family: var(--mono); }
body.space .iconbtn { border: 1px solid var(--rule-2); background: transparent; }
body.space .kbox { background: #05070d; border: 1px solid var(--rule-2); }
body.space .kbox-in input { font-family: var(--sans); }
body.space .kitem.sel { background: rgba(255, 255, 255, .06); }
body.space .tag { font-family: var(--mono); }
body.space kbd { font-family: var(--mono); background: transparent; border: 1px solid var(--rule-2); }

/* ---------------------------------------------------------------- reveal -- */

[data-reveal] {
  opacity: 0; transform: translateY(32px); filter: blur(6px);
  transition: opacity 1s var(--ease-out), transform 1.1s var(--ease-out), filter 1s var(--ease-out);
}
[data-reveal].in { opacity: 1; transform: none; filter: none; }
[data-scramble] .scr { white-space: pre-wrap; }

@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; filter: none; }
  .scroll-cue i::after { animation: none; top: 0; }
  .menu a { animation: none; }
}

/* ======================================================= the lab page == */

.lab-page main { padding-top: 60px; }
.lab-page .band { border-top: 0; }
.lab-page .inst, .lab-page .viz-stage, .lab-page .viz-side { background-color: rgba(4, 6, 12, .9); }
.lab-hero { padding: 150px 0 20px; }
.lab-hero h1 { font-size: clamp(2.4rem, 6vw, 5rem); line-height: .94; margin: 0 0 22px; }
.lab-hero .lede { max-width: 40em; color: var(--ink-2); }
.lab-jump { display: flex; flex-wrap: wrap; gap: 0; margin-top: 30px; border: 1px solid var(--rule-2); width: fit-content; max-width: 100%; }
.lab-jump a { font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; padding: 11px 14px; color: var(--ink-2); border-right: 1px solid var(--rule-2); }
.lab-jump a:last-child { border-right: 0; }
.lab-jump a:hover { color: #04060b; background: var(--ink); }
.lab-page .band-head h2 { font-family: var(--display); font-stretch: 125%; font-weight: 700; text-transform: uppercase; }
.lab-page .eyebrow { font-family: var(--mono); }
.lab-page .tab[aria-selected="true"] { background: var(--accent); color: #04060b; }
body.space input[type="range"]::-webkit-slider-thumb { border-radius: 0; }
body.space input[type="range"]::-moz-range-thumb { border-radius: 0; }
