/* 42LAB — the void laboratory. Deep space, starlight instruments.
   Token names keep their roles: --fog is the world, --ink is what speaks. */

:root {
  --fog: #0b0c0f;
  --paper: #111318;
  --ink: #e9ebef;
  --ink-70: rgba(233, 235, 239, 0.72);
  --ink-45: rgba(233, 235, 239, 0.45);
  --ink-25: rgba(233, 235, 239, 0.22);
  --line: rgba(233, 235, 239, 0.14);
  --line-soft: rgba(233, 235, 239, 0.08);
  --signal: #46b26f; /* used only for live/boarding status */

  --display: "Space Grotesk", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;

  --u: 1.5rem;
  --sp-section: clamp(7rem, 14vh, 12rem);
  --pad: clamp(1.25rem, 4vw, 4rem);

  --t-hero: clamp(3.4rem, 1rem + 11vw, 11rem);
  --t-h2: clamp(1.9rem, 1.2rem + 2.6vw, 3.4rem);
  --t-body: clamp(0.95rem, 0.9rem + 0.25vw, 1.08rem);
  --t-label: 0.66rem;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background: var(--fog);
  color: var(--ink);
  font-family: var(--display);
  font-size: var(--t-body);
  line-height: 1.6;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; background: none; border: 0; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
::selection { background: var(--ink); color: var(--fog); }

.skip { position: fixed; top: -100px; left: var(--pad); z-index: 100; background: var(--ink); color: var(--fog); padding: 0.6rem 1rem; font-family: var(--mono); font-size: 0.75rem; }
.skip:focus { top: 12px; }

/* ---------- the film: grain + vignette over everything ---------- */
body::after {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none; z-index: 90;
  opacity: 0.16;
  mix-blend-mode: screen;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='180' height='180' fill='%23ffffff' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
}

/* ---------- WebGL stage ---------- */
#stage {
  position: fixed; inset: 0; z-index: 0;
  width: 100%; height: 100lvh;
}
.no3d #stage { display: none; }
.no3d body, .no3d { background: radial-gradient(120% 90% at 50% 30%, #14171d, var(--fog) 70%); }

/* ---------- loader ---------- */
#loader {
  position: fixed; inset: 0; z-index: 95;
  display: grid; place-items: center;
  background: var(--fog);
  transition: opacity 0.7s var(--ease), visibility 0.7s;
}
#loader.done { opacity: 0; visibility: hidden; }
#loader .pct { font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.35em; color: var(--ink-70); }
#loader .pct b { font-weight: 500; color: var(--ink); }

/* ---------- HUD chrome (fixed instruments) ---------- */
.hud { position: fixed; z-index: 40; font-family: var(--mono); font-size: var(--t-label); letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-70); pointer-events: none; }
.hud b { font-weight: 500; color: var(--ink); }
.hud--tl { top: 1.1rem; left: var(--pad); pointer-events: auto; }
.hud--tr { top: 1.1rem; right: var(--pad); text-align: right; }
.hud--bl { bottom: 1.1rem; left: var(--pad); }
.hud--br { bottom: 1.1rem; right: var(--pad); text-align: right; pointer-events: auto; }
.hud a { pointer-events: auto; }
.hud .rule { display: block; width: 34px; border-top: 1px solid var(--ink-25); margin: 0.45rem 0; }
@media (max-width: 640px) { .hud--tr, .hud--bl { display: none; } }

/* wordmark top-left */
.mark { font-family: var(--display); font-weight: 700; font-size: 1rem; letter-spacing: 0.08em; color: var(--ink); }
.mark small { font-family: var(--mono); font-weight: 400; font-size: 0.6rem; letter-spacing: 0.3em; color: var(--ink-45); display: block; margin-top: 0.15rem; }

/* scroll cue */
#cue { transition: opacity 0.5s; }
#cue.gone { opacity: 0; }
.cue-bar { display: inline-block; width: 1px; height: 34px; background: var(--ink-25); position: relative; overflow: hidden; vertical-align: middle; margin-right: 0.8rem; }
.cue-bar::after { content: ""; position: absolute; left: 0; top: -50%; width: 100%; height: 50%; background: var(--ink); animation: cue 1.8s var(--ease) infinite; }
@keyframes cue { to { top: 110%; } }
@media (prefers-reduced-motion: reduce) { .cue-bar::after { animation: none; top: 25%; } }

/* ---------- content column ---------- */
main { position: relative; z-index: 10; }
.chapter { min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding: var(--sp-section) var(--pad); position: relative; }

/* experiment label above each chapter */
.exp {
  font-family: var(--mono); font-size: var(--t-label); letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--ink-45); display: flex; align-items: center; gap: 1rem; margin-bottom: calc(var(--u) * 1.4);
}
.exp::after { content: ""; flex: 0 0 52px; border-top: 1px solid var(--ink-25); }
.exp b { color: var(--ink); font-weight: 500; }

/* ---------- hero ---------- */
.hero { align-items: flex-start; justify-content: flex-end; padding-bottom: 16vh; }
.hero h1 {
  font-size: var(--t-hero); font-weight: 700; letter-spacing: -0.035em; line-height: 0.92;
  text-transform: uppercase;
}
.hero h1 .lab { color: transparent; -webkit-text-stroke: 1.5px var(--ink); }
.hero .tag { margin-top: calc(var(--u) * 1.2); max-width: 34ch; font-size: clamp(1.05rem, 1rem + 0.6vw, 1.4rem); line-height: 1.45; color: var(--ink-70); }
.hero .tag b { color: var(--ink); font-weight: 500; }

/* ---------- shared type ---------- */
h2 { font-size: var(--t-h2); font-weight: 600; letter-spacing: -0.02em; line-height: 1.05; max-width: 18ch; }
.sub { margin-top: var(--u); max-width: 52ch; color: var(--ink-70); }

/* ---------- specimen list (what we build) ---------- */
.specs { margin-top: calc(var(--u) * 2.5); border-top: 1px solid var(--line); }
.spec {
  display: grid; grid-template-columns: 72px 1fr; gap: 0 2rem;
  padding: calc(var(--u) * 1.3) 0; border-bottom: 1px solid var(--line);
  transition: padding-left 0.45s var(--ease);
}
.spec:hover { padding-left: 0.8rem; }
.spec .no { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.2em; color: var(--ink-45); padding-top: 0.55rem; }
.spec h3 { font-size: clamp(1.5rem, 1.1rem + 2vw, 2.4rem); font-weight: 600; letter-spacing: -0.015em; }
.spec p { margin-top: 0.5rem; max-width: 56ch; color: var(--ink-70); }
.spec .foot { margin-top: 0.8rem; font-family: var(--mono); font-size: var(--t-label); letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-45); }
@media (max-width: 640px) { .spec { grid-template-columns: 1fr; gap: 0.4rem; } }

/* ---------- evidence ---------- */
.evidence { margin-top: calc(var(--u) * 2.5); display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: clamp(1.2rem, 3vw, 2.5rem); align-items: start; }
.exhibit { border: 1px solid var(--line); background: rgba(17, 19, 24, 0.72); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.exhibit .shot { overflow: hidden; border-bottom: 1px solid var(--line); position: relative; aspect-ratio: 4 / 5; }
.exhibit .shot img { width: 100%; height: 100%; object-fit: cover; object-position: top; filter: grayscale(1) contrast(1.02); transition: filter 0.6s var(--ease), transform 0.8s var(--ease); }
.exhibit:hover .shot img { filter: grayscale(0); transform: scale(1.015); }
.exhibit .body { padding: 1.1rem 1.2rem 1.3rem; }
.exhibit .body .no { font-family: var(--mono); font-size: var(--t-label); letter-spacing: 0.25em; text-transform: uppercase; color: var(--ink-45); }
.exhibit .body h3 { margin-top: 0.35rem; font-size: 1.25rem; font-weight: 600; }
.exhibit .body p { margin-top: 0.35rem; font-size: 0.9rem; color: var(--ink-70); }
.exhibit.text-only .body { padding: 1.6rem 1.4rem 1.7rem; }

/* classified client names */
.redact { display: inline-block; min-width: 11ch; height: 0.95em; background: var(--ink); vertical-align: -0.14em; position: relative; cursor: not-allowed; }
.redact.sm { min-width: 8ch; }
.redact::after { content: "NICE TRY"; position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--mono); font-size: 0.52rem; letter-spacing: 0.34em; color: var(--fog); opacity: 0; transition: opacity 0.25s; }
.redact:hover::after { opacity: 1; }

/* ---------- terminal teaser board ---------- */
.board { margin-top: calc(var(--u) * 2.5); border: 1px solid var(--line); background: rgba(17, 19, 24, 0.72); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.brow {
  display: grid; grid-template-columns: 88px 1fr auto; gap: 1.4rem; align-items: baseline;
  padding: 1.05rem 1.3rem; border-bottom: 1px solid var(--line-soft);
  font-family: var(--mono);
  transition: background 0.3s;
}
.brow:last-child { border-bottom: 0; }
.brow:hover { background: rgba(255, 255, 255, 0.05); }
.brow .code { font-size: 0.8rem; letter-spacing: 0.15em; color: var(--ink-45); }
.brow .dest { font-family: var(--display); font-weight: 600; font-size: clamp(1rem, 0.9rem + 0.8vw, 1.35rem); letter-spacing: 0.01em; }
.brow .dest small { display: block; font-family: var(--mono); font-weight: 400; font-size: 0.72rem; letter-spacing: 0.05em; color: var(--ink-70); margin-top: 0.25rem; text-transform: none; }
.brow .status { font-size: 0.66rem; letter-spacing: 0.25em; text-transform: uppercase; color: var(--signal); white-space: nowrap; }
.brow .status.soon { color: var(--ink-45); }
.brow .status::before { content: "●"; margin-right: 0.5rem; font-size: 0.5rem; vertical-align: 2px; }
@media (max-width: 640px) { .brow { grid-template-columns: 1fr auto; } .brow .code { display: none; } }

/* ---------- CTA + buttons ---------- */
.cta {
  display: inline-block; margin-top: calc(var(--u) * 1.8);
  font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.22em; text-transform: uppercase;
  padding: 1rem 1.6rem; border: 1px solid var(--ink);
  transition: background 0.25s, color 0.25s, letter-spacing 0.35s var(--ease);
}
.cta:hover { background: var(--ink); color: var(--fog); letter-spacing: 0.3em; }
.cta.solid { background: var(--ink); color: var(--fog); }
.cta.solid:hover { background: transparent; color: var(--ink); }

/* ---------- contact ---------- */
.contact { text-align: left; }
.contact h2 { max-width: 24ch; }
.contact .mail { display: block; margin-top: var(--u); font-family: var(--mono); font-size: clamp(0.95rem, 0.8rem + 1vw, 1.35rem); letter-spacing: 0.04em; color: var(--ink-70); }
.contact .mail:hover { color: var(--ink); }

/* ---------- footer ---------- */
footer { position: relative; z-index: 10; padding: 2.2rem var(--pad) 2.6rem; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 1rem 3rem; justify-content: space-between; font-family: var(--mono); font-size: var(--t-label); letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-45); background: var(--fog); }
footer a:hover { color: var(--ink); }

/* ---------- reveals ---------- */
html.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); transition-delay: var(--d, 0ms); }
html.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html.js .reveal { opacity: 1; transform: none; transition: none; }
  .spec, .cta, .exhibit .shot img { transition: none; }
}

/* ---------- the journey (index): captions, annotation, runway ---------- */
.journey { cursor: crosshair; }
.journey a, .journey button { cursor: pointer; }
.scrollspace { height: 1150vh; }
.beatmeter { margin-top: 0.9rem; font-family: var(--mono); font-size: var(--t-label); letter-spacing: 0.22em; color: var(--ink-45); }
.beatmeter b { font-weight: 500; color: var(--ink); }

.caplayer { position: fixed; inset: 0; z-index: 30; pointer-events: none; }
.cap { position: absolute; left: var(--pad); bottom: 18vh; max-width: 44ch; opacity: 0; visibility: hidden; will-change: opacity; }
.cap .cta { pointer-events: auto; }
.cap-kick { font-family: var(--mono); font-size: var(--t-label); letter-spacing: 0.3em; text-transform: uppercase; color: var(--ink-45); margin-bottom: 0.9rem; }
.cap-line { font-size: clamp(1.05rem, 1rem + 0.6vw, 1.4rem); line-height: 1.45; color: var(--ink-70); }
.cap-line b { color: var(--ink); font-weight: 500; }
.cap-big { font-size: clamp(1.9rem, 1.2rem + 2.6vw, 3.2rem); font-weight: 600; letter-spacing: -0.02em; line-height: 1.05; margin-bottom: 0.55rem; }
.cap-note { margin-top: 1rem; font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.26em; color: var(--ink-25); }
.cap--title h1 { font-size: var(--t-hero); font-weight: 700; letter-spacing: -0.035em; line-height: 0.92; text-transform: uppercase; }
.cap--title h1 .lab { color: transparent; -webkit-text-stroke: 1.5px var(--ink); }
.cap--title .cap-line { margin-top: 1.2rem; max-width: 34ch; }
.cap .cta { margin-top: 1.4rem; }

.anno { position: fixed; left: 0; top: 0; z-index: 32; pointer-events: none; display: flex; align-items: flex-start; will-change: transform; }
.anno[hidden] { display: none; }
.anno-dot { width: 7px; height: 7px; border: 1px solid var(--ink); transform: rotate(45deg) translate(-2px, -2px); background: transparent; }
.anno-line { width: 56px; border-top: 1px solid var(--ink-25); margin-top: 3px; }
.anno-tag { font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.2em; color: var(--ink-70); padding-left: 0.6rem; white-space: nowrap; line-height: 1.9; }
.anno-tag em { font-style: normal; color: var(--ink-45); }

/* phones: annotations shrink and wrap — never a mile-long single line */
@media (max-width: 640px) {
  .anno-tag { white-space: normal; max-width: 46vw; font-size: 0.55rem; line-height: 1.7; letter-spacing: 0.16em; padding-left: 0.45rem; }
  .anno-line { width: 20px; }
}

/* clickable annotations invite the file */
.anno[data-dossier] { pointer-events: auto; cursor: pointer; }
.anno[data-dossier]:hover .anno-tag, .anno[data-dossier]:focus-visible .anno-tag { color: var(--ink); }
.anno[data-dossier]:hover .anno-dot { background: var(--ink); }

/* the dossier: a classified file, opened */
#dossier { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: var(--pad); background: rgba(5, 6, 8, 0.72); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
#dossier[hidden] { display: none; }
.dossier-card { position: relative; max-width: 520px; width: 100%; background: var(--paper); border: 1px solid var(--line); padding: 2.1rem 2.3rem 2.3rem; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6); }
.dossier-card .kick { font-family: var(--mono); font-size: var(--t-label); letter-spacing: 0.3em; text-transform: uppercase; color: var(--ink-45); }
.dossier-card h3 { font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.1rem); font-weight: 600; letter-spacing: -0.02em; margin: 0.7rem 0 0.9rem; }
.dossier-card p { color: var(--ink-70); margin-bottom: 0.8rem; font-size: 0.98rem; line-height: 1.6; }
.dossier-card p a { color: var(--ink); border-bottom: 1px solid var(--ink-45); }
.dossier-card .scope { font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.22em; color: var(--ink-45); margin: 1.2rem 0 0; border-top: 1px solid var(--line-soft); padding-top: 1rem; }
#dossier-close { position: absolute; top: 0.9rem; right: 1rem; font-size: 1rem; color: var(--ink-45); padding: 0.5rem; transition: color 0.2s, transform 0.3s var(--ease); }
#dossier-close:hover { color: var(--ink); transform: rotate(90deg); }

/* the social dock: orbit our channels */
.socdock { display: inline-flex; align-items: center; gap: 1.4rem; margin-top: 1.6rem; pointer-events: auto; }
.socdock button { font-size: 1.7rem; line-height: 1; color: var(--ink-45); padding: 0.3rem 0.7rem; border: 1px solid var(--line); transition: color 0.2s, border-color 0.2s; }
.socdock button:hover { color: var(--ink); border-color: var(--ink-45); }
.socdock #soc-name { font-family: var(--mono); font-size: 0.85rem; letter-spacing: 0.34em; min-width: 12ch; text-align: center; color: var(--ink); }
.cap .cta.solid { background: var(--ink); color: var(--fog); }
.cap .cta.solid:hover { background: transparent; color: var(--ink); }

.sr-content { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
html.no3d .sr-content { position: static; width: auto; height: auto; clip-path: none; padding: 20vh var(--pad); max-width: 60ch; }
html.no3d .scrollspace, html.no3d .caplayer, html.no3d #anno { display: none; }

@media (max-width: 640px) {
  .cap { bottom: 14vh; right: var(--pad); }
  .beatmeter { display: none; }
}

/* ---------- terminal42 page specifics ---------- */
.t42 .hero h1 { font-size: clamp(2.6rem, 1rem + 8.5vw, 8.5rem); }
.t42-board .brow { padding: 1.35rem 1.3rem; }
.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: clamp(2rem, 5vw, 5rem); margin-top: calc(var(--u) * 2.5); }
.split .cell h3 { font-size: 1.3rem; font-weight: 600; }
.split .cell p { margin-top: 0.5rem; color: var(--ink-70); max-width: 44ch; }
.split .cell .no { font-family: var(--mono); font-size: var(--t-label); letter-spacing: 0.25em; color: var(--ink-45); display: block; margin-bottom: 0.6rem; }

/* ---------- PAPER WORLD (Terminal 42 · Gallery of Departures) ----------
   One class flips the void to the product's own booklet world: cream paper,
   warm ink, gold hairlines. Every component reads tokens, so this is the theme. */
body.paper {
  --fog: #f3ecd7;
  --paper: #ece3cb;
  --ink: #33302a;
  --ink-70: rgba(51, 48, 42, 0.74);
  --ink-45: rgba(51, 48, 42, 0.5);
  --ink-25: rgba(51, 48, 42, 0.26);
  --line: rgba(140, 108, 58, 0.32);
  --line-soft: rgba(140, 108, 58, 0.16);
  --signal: #ad6a35;
}
body.paper::before { /* paper grain */
  content: ""; position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}
body.paper::after { /* warm vignette */
  content: ""; position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(ellipse 120% 95% at 50% 10%, transparent 55%, rgba(110, 82, 36, 0.10));
}
body.paper #dossier { background: rgba(58, 48, 30, 0.42); }
body.paper .cue-bar { background: var(--signal); }

/* ---------- caption headers: reachable + alive ----------
   Letters are little paper pieces — they lift off the page under the cursor
   (terracotta in the paper world), and a tap ripples the whole line. */
.cap-big, .cap--title h1, .cap-kick, .cap-line { pointer-events: auto; }
.ch { display: inline-block; transition: transform 0.5s var(--ease), color 0.35s; }
.ch.up { transform: translateY(-0.14em) rotate(var(--r, 3deg)); }
body.paper .ch.up { color: var(--signal); }
@media (prefers-reduced-motion: reduce) { .ch { transition: none; } .ch.up { transform: none; color: inherit; } }

/* paper world: caption text must stay readable when plates drift behind it —
   a soft halo of paper melts the backdrop around every glyph */
body.paper .cap-big, body.paper .cap--title h1, body.paper .cap-line, body.paper .cap-kick, body.paper .cap-note {
  text-shadow: 0 0 10px var(--fog), 0 0 22px var(--fog), 0 0 38px var(--fog), 0 0 58px var(--fog);
}
body.paper .cap-kick { color: var(--signal); }
body.paper .cap-line { color: rgba(51, 48, 42, 0.82); }
body.paper .cap--title h1 .lab { -webkit-text-stroke: 2px var(--ink); }
.chw { display: inline-block; white-space: nowrap; }
/* inspect mode: the page recedes, the screen you picked gets the room */
html.inspecting .caplayer, html.inspecting .anno { opacity: 0 !important; pointer-events: none !important; }
.caplayer, .anno { transition: opacity 0.35s ease; }
/* the boarding-pass form — a paper stub with a perforated edge */
.bpass { pointer-events: auto; margin-top: 1.4rem; max-width: 30rem; padding: 1rem 1.1rem 1.15rem; background: var(--fog); border: 1px solid var(--ink-25, rgba(127,127,127,.35)); border-left: 4px solid var(--signal); box-shadow: 0 18px 44px -24px rgba(40,32,16,.5); }
.bp-head { display: flex; justify-content: space-between; gap: 1rem; margin: 0 0 .8rem; padding-bottom: .6rem; border-bottom: 1px dashed var(--ink-45); font-family: var(--mono); font-size: .68rem; letter-spacing: .22em; color: var(--ink-70); }
.bp-head span { color: var(--signal); }
.bp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem .9rem; }
.bpass label { display: block; font-family: var(--mono); font-size: .6rem; letter-spacing: .18em; color: var(--ink-45); }
.bpass input, .bpass textarea { display: block; width: 100%; margin-top: .3rem; padding: .35rem 0; background: transparent; border: 0; border-bottom: 1px solid var(--ink-45); border-radius: 0; font: 500 .92rem/1.3 var(--sans); color: var(--ink); transition: border-color .25s; }
.bpass input:focus, .bpass textarea:focus { outline: 0; border-bottom-color: var(--signal); }
.bpass ::placeholder { color: var(--ink-25, rgba(127,127,127,.4)); }
.bpass textarea { resize: none; }
.bp-msg { margin-top: .7rem; }
.bp-hp { position: absolute !important; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.bpass button.cta { margin-top: 1rem; width: 100%; cursor: pointer; border: 1px solid var(--ink); }
.bpass button.cta:disabled { opacity: .6; cursor: wait; }
.bp-err { margin: .7rem 0 0; font-family: var(--mono); font-size: .74rem; color: var(--signal); }
.bp-err a { color: var(--ink); border-bottom: 1px solid var(--ink-45); }
.bp-done { border-left-color: var(--signal); }
@media (max-width: 640px) { .bp-grid { grid-template-columns: 1fr; } .bpass { padding: .85rem .9rem 1rem; } }
/* once the pass is open, the pitch stands aside — the form is the moment */
.cap.boarding-open .cap-big, .cap.boarding-open > .cap-line:not(:last-child) { display: none; }
#board[hidden], #wo-open[hidden] { display: none; }
body.boarding-open .anno { display: none; }
/* the lab console — type a brief, watch the engine think */
#labdemo { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 1rem; background: color-mix(in srgb, var(--fog) 88%, transparent); backdrop-filter: blur(6px); }
#labdemo[hidden] { display: none; }
.ld-card { position: relative; width: min(46rem, 100%); max-height: 92vh; overflow-y: auto; background: var(--fog); border: 1px solid var(--ink-25, rgba(127,127,127,.35)); border-left: 4px solid var(--signal); box-shadow: 0 30px 80px -30px rgba(40,32,16,.55); padding: 1.6rem clamp(1.1rem, 3vw, 2.2rem) 1.8rem; }
#ld-close { position: absolute; top: .9rem; right: .9rem; background: none; border: 0; color: var(--ink); font-size: 1rem; cursor: pointer; padding: .4rem; opacity: .6; }
#ld-close:hover { opacity: 1; }
.ld-kick { font-family: var(--mono); font-size: .66rem; letter-spacing: .26em; color: var(--signal); margin-bottom: 1rem; }
.ld-lead { font-size: 1.05rem; max-width: 34ch; margin-bottom: 1rem; }
#ld-brief { width: 100%; background: transparent; border: 0; border-bottom: 1px solid var(--ink-45); font: 500 1.05rem/1.5 var(--sans); color: var(--ink); padding: .4rem 0; resize: none; }
#ld-brief:focus { outline: 0; border-bottom-color: var(--signal); }
.ld-chips { display: flex; flex-wrap: wrap; gap: .5rem; margin: .9rem 0 1.2rem; }
.ld-chips button { font-family: var(--mono); font-size: .62rem; letter-spacing: .14em; padding: .45rem .7rem; background: transparent; border: 1px solid var(--ink-25, rgba(127,127,127,.35)); color: var(--ink); cursor: pointer; transition: border-color .25s, color .25s; }
.ld-chips button:hover { border-color: var(--signal); color: var(--signal); }
.ld-echo { font-family: var(--mono); font-size: .78rem; color: var(--ink); opacity: .65; margin-bottom: .9rem; }
.ld-think { font-family: var(--mono); font-size: .78rem; line-height: 1.9; color: var(--signal); min-height: 2rem; margin-bottom: 1.1rem; }
.ld-out .in { opacity: 1 !important; transform: none !important; }
.ld-pkick, .ld-ptitle, .ld-day, .ld-stay, .ld-est, .ld-why, .ld-replay, .ld-foot { opacity: 0; transform: translateY(10px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
.ld-foot.in { opacity: 1; transform: none; }
.ld-replay { font-family: var(--mono); font-size: .62rem; letter-spacing: .18em; color: var(--ink); opacity: .55; margin-bottom: .8rem; }
.ld-pkick { font-family: var(--mono); font-size: .64rem; letter-spacing: .22em; color: var(--ink); opacity: .6; margin-bottom: .3rem; }
.ld-ptitle { font-size: clamp(1.6rem, 4vw, 2.3rem); font-weight: 700; letter-spacing: -.02em; margin-bottom: 1.1rem; }
.ld-day { display: flex; gap: .9rem; padding: .55rem 0; border-top: 1px solid var(--ink-25, rgba(127,127,127,.3)); }
.ld-day b { font-family: var(--mono); font-size: .78rem; color: var(--signal); padding-top: .15rem; }
.ld-day span { font-size: .92rem; line-height: 1.5; }
.ld-day i { display: block; font-style: normal; font-weight: 700; }
.ld-stays { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; margin-top: 1.1rem; }
.ld-stay { border: 1px solid var(--ink-25, rgba(127,127,127,.3)); padding: .7rem .8rem; font-size: .85rem; }
.ld-stay span { display: block; opacity: .7; font-size: .8rem; margin-top: .2rem; }
.ld-est { margin-top: 1.1rem; font-size: 1rem; }
.ld-why { opacity: .8; font-size: .92rem; margin-top: .3rem; }
.ld-foot { margin-top: 1.4rem; padding-top: 1.1rem; border-top: 1px dashed var(--ink-45); display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; }
.ld-note { font-family: var(--mono); font-size: .62rem; letter-spacing: .16em; opacity: .6; width: 100%; }
.ld-foot .cta { margin: 0; cursor: pointer; }
@media (max-width: 640px) { .ld-stays { grid-template-columns: 1fr; } .ld-card { max-height: 94vh; } }
/* division worlds — same void engine, different atmospheres.
   All dark (the starfield needs a night sky); identity lives in the fog tint + accent. */
body.ember {
  --fog: #120c08;
  --paper: #1a120b;
  --ink: #f2e8dc;
  --ink-70: rgba(242, 232, 220, 0.74);
  --ink-45: rgba(242, 232, 220, 0.48);
  --ink-25: rgba(242, 232, 220, 0.24);
  --line: rgba(255, 122, 61, 0.22);
  --line-soft: rgba(255, 122, 61, 0.11);
  --signal: #ff7a3d;
}
body.frost {
  --fog: #0a0e14;
  --paper: #10151d;
  --ink: #eaf1f8;
  --ink-70: rgba(234, 241, 248, 0.74);
  --ink-45: rgba(234, 241, 248, 0.48);
  --ink-25: rgba(234, 241, 248, 0.24);
  --line: rgba(108, 156, 255, 0.24);
  --line-soft: rgba(108, 156, 255, 0.12);
  --signal: #6c9cff;
}
body.violet {
  --fog: #0e0817;
  --paper: #150d20;
  --ink: #f0e9f6;
  --ink-70: rgba(240, 233, 246, 0.74);
  --ink-45: rgba(240, 233, 246, 0.48);
  --ink-25: rgba(240, 233, 246, 0.24);
  --line: rgba(232, 91, 164, 0.26);
  --line-soft: rgba(232, 91, 164, 0.13);
  --signal: #e85ba4;
}
body.phosphor {
  --fog: #060d0b;
  --paper: #0b1512;
  --ink: #e4f5ec;
  --ink-70: rgba(228, 245, 236, 0.74);
  --ink-45: rgba(228, 245, 236, 0.48);
  --ink-25: rgba(228, 245, 236, 0.24);
  --line: rgba(46, 230, 168, 0.22);
  --line-soft: rgba(46, 230, 168, 0.11);
  --signal: #2ee6a8;
}
/* per-world starlight + accents (the kick rule mirrors body.paper's) */
body.ember { --star: #ffc9a3; }
body.frost { --star: #c7dbff; }
body.violet { --star: #e9c6f2; }
body.phosphor { --star: #b7f5d6; }
body.ember .cap-kick, body.frost .cap-kick, body.violet .cap-kick, body.phosphor .cap-kick { color: var(--signal); }
/* floor runner — the forge's playable proof */
#forgerun { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 1rem; background: color-mix(in srgb, var(--fog) 88%, transparent); backdrop-filter: blur(6px); }
#forgerun[hidden] { display: none; }
.fr-card { width: min(48rem, 100%); }
#fr-close { position: absolute; top: .9rem; right: .9rem; background: none; border: 0; color: var(--ink); font-size: 1rem; cursor: pointer; padding: .4rem; opacity: .6; }
#fr-close:hover { opacity: 1; }
.fr-hud { display: flex; justify-content: space-between; font-family: var(--mono); font-size: .74rem; letter-spacing: .18em; color: var(--ink-70); margin-bottom: .6rem; }
.fr-hud b { color: var(--signal); }
#fr-canvas { display: block; width: 100%; height: auto; border: 1px solid var(--ink-25, rgba(127,127,127,.3)); background: #160d08; touch-action: none; cursor: pointer; }
.fr-msg { font-family: var(--mono); font-size: .78rem; letter-spacing: .12em; color: var(--signal); margin-top: .8rem; }
.vg-card { width: min(30rem, 100%); }
#vaultgame { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 1rem; background: color-mix(in srgb, var(--fog) 88%, transparent); backdrop-filter: blur(6px); }
#vaultgame[hidden] { display: none; }
#vg-close { position: absolute; top: .9rem; right: .9rem; background: none; border: 0; color: var(--ink); font-size: 1rem; cursor: pointer; padding: .4rem; opacity: .6; }
#vg-close:hover { opacity: 1; }
#vg-canvas { display: block; width: 100%; max-width: 420px; margin: 0 auto; height: auto; cursor: pointer; touch-action: none; }
#so-chip { font-family: var(--mono); font-size: .68rem; letter-spacing: .18em; color: var(--ink-45); }
