/* 4XCiv marketing site (static mock).
   Tokens lifted from 4xciv/site/src/css/custom.css, index.module.css and the
   engine HUD (4xciv-engine/src/styles/base.css, hud.css, menu.css, atlas.css,
   server/auth.ts). No decorative gradients: the only gradients here are
   transparency scrims over media. */

:root {
  --color-cyan: #00C2F2;
  --color-cyan-dark: #00A8D4;
  --color-cyan-light: #4DD7F7;
  --color-orange: #F57D06;
  --color-gold: #FAB217;

  --bg-void: #060912;
  --bg-near-black: #0a0e1a;
  --bg-surface: #0f1521;
  --bg-alt: #08101e;

  --text-primary: #e0e8f0;
  --text-secondary: #a0aec0;
  --text-muted: #94a3b8;
  --text-faint: #64748b;

  --font-heading: 'Cinzel', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Menlo, monospace;
  --font-mark: 'DIN Condensed', 'DIN Alternate', 'Inter', sans-serif;

  --hud-bg: rgba(6, 14, 26, 0.62);
  --hud-border: rgba(120, 220, 255, 0.42);
  --hud-glow: rgba(80, 200, 255, 0.55);
  --hud-text: #cde;
  --hud-dim: #69a;
  --hud-bright: #aff;
  --hud-accent: #7df;

  --wn-feature: #7ee0a0;
  --wn-art: #9ec2ff;
  --wn-fix: #ffd070;

  --gate-gold: #d4af37;
  --gate-border: rgba(212, 175, 55, 0.35);
  --gate-text: #e8e4d8;

  --line: rgba(0, 194, 242, 0.15);
  --line-soft: rgba(0, 194, 242, 0.08);

  --wrap: 1240px;
  --nav-h: 64px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }
body {
  margin: 0;
  background: var(--bg-void);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img, video { display: block; max-width: 100%; }
a { color: var(--color-cyan); text-decoration: none; }
a:hover { color: var(--color-cyan-light); }
p { margin: 0 0 1rem; }
code, kbd, .mono { font-family: var(--font-mono); }
code {
  font-size: 0.88em;
  color: var(--color-cyan-light);
  background: rgba(0, 194, 242, 0.08);
  border: 1px solid rgba(0, 194, 242, 0.2);
  padding: 0.08rem 0.38rem;
  border-radius: 3px;
}
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1.5rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Type ---------- */
h1, h2, h3 { font-family: var(--font-heading); font-weight: 600; letter-spacing: 0.03em; margin: 0; }
h1 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); line-height: 1.12; color: var(--text-primary); }
h2 { font-size: clamp(1.7rem, 3vw, 2.5rem); line-height: 1.2; color: var(--text-primary); }
h3 { font-size: 1.2rem; line-height: 1.3; color: var(--text-primary); }
h4 { font-family: var(--font-body); font-size: 1rem; font-weight: 600; margin: 0 0 0.4rem; }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(0, 194, 242, 0.8);
  margin: 0 0 0.9rem;
}
.lead { font-size: clamp(1.02rem, 1.4vw, 1.15rem); color: var(--text-muted); max-width: 46rem; }
.muted { color: var(--text-muted); }
.faint { color: var(--text-faint); }
.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* ---------- Nav ---------- */
.nav.open { background: var(--bg-void); backdrop-filter: none; -webkit-backdrop-filter: none; }
.nav {
  position: sticky; top: 0; z-index: 50;
  height: var(--nav-h);
  background: rgba(6, 9, 18, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav .wrap { height: 100%; display: flex; align-items: center; gap: 1.5rem; }
.brand { display: flex; align-items: center; gap: 0.7rem; color: var(--text-primary); flex-shrink: 0; }
.brand img { width: 40px; height: 40px; }
.brand-word {
  font-family: var(--font-mark);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: 0.3em;
  line-height: 1;
  padding-top: 3px;
  color: #ebe4d4;
}
.brand:hover { color: var(--text-primary); }
.nav-links { display: flex; align-items: center; gap: 0.15rem; margin-left: auto; list-style: none; padding: 0; margin-top: 0; margin-bottom: 0; }
.nav-links a {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-secondary);
  padding: 0.5rem 0.7rem;
  border-bottom: 1px solid transparent;
}
.nav-links a:hover { color: var(--text-primary); }
.nav-links a[aria-current="page"] { color: var(--color-cyan-light); border-bottom-color: var(--color-cyan); }
.nav-links .crew-link {
  margin-left: 0.6rem;
  color: var(--gate-gold);
  border: 1px solid var(--gate-border);
  padding: 0.36rem 0.75rem;
}
.nav-links .crew-link:hover { color: var(--gate-text); border-color: rgba(212, 175, 55, 0.7); }
.nav-toggle {
  display: none;
  margin-left: auto;
  background: none;
  border: 1px solid var(--line);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  padding: 0.45rem 0.7rem;
  cursor: pointer;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.9rem 1.45rem;
  border-radius: 3px;
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
  cursor: pointer;
  line-height: 1.2;
}
.btn-primary { background: var(--color-cyan); color: var(--bg-void); }
.btn-primary:hover { background: var(--color-cyan-light); color: var(--bg-void); box-shadow: 0 6px 24px rgba(0, 194, 242, 0.35); }
.btn-gate { background: var(--gate-gold); color: #0a0e20; }
.btn-gate:hover { background: #e6c352; color: #0a0e20; }
.btn-ghost { background: transparent; color: var(--text-secondary); border-color: rgba(148, 163, 184, 0.35); }
.btn-ghost:hover { color: var(--text-primary); border-color: rgba(0, 194, 242, 0.55); }
.btn-gate-ghost { background: transparent; color: var(--gate-gold); border-color: rgba(212, 175, 55, 0.5); }
.btn-gate-ghost:hover { color: var(--gate-text); border-color: var(--gate-gold); background: rgba(212, 175, 55, 0.08); }
.btn small { font-weight: 400; opacity: 0.75; letter-spacing: 0.04em; text-transform: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.8rem; align-items: center; }

/* ---------- HUD panel (engine .panel, hard-edged) ---------- */
.panel {
  background: var(--hud-bg);
  box-shadow:
    inset 0 0 0 1px var(--hud-border),
    inset 0 0 16px rgba(80, 200, 255, 0.12),
    0 0 10px rgba(80, 200, 255, 0.14);
  padding: 1.1rem 1.25rem;
}
.panel-solid { background: rgba(6, 12, 22, 0.86); }
.panel-title {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--hud-bright);
  text-shadow: 0 0 6px var(--hud-glow);
  margin: 0 0 0.75rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid rgba(120, 220, 255, 0.2);
  display: flex; justify-content: space-between; align-items: center; gap: 0.75rem;
}
.panel-title .meta { color: var(--hud-dim); text-shadow: none; letter-spacing: 0.18em; font-weight: 400; }
.panel.gold {
  box-shadow:
    inset 0 0 0 1px rgba(212, 175, 55, 0.55),
    inset 0 0 16px rgba(212, 175, 55, 0.12),
    0 0 10px rgba(212, 175, 55, 0.12);
}
.panel.gold .panel-title { color: var(--gate-gold); text-shadow: none; border-bottom-color: var(--gate-border); }

/* Atlas key/value rows (atlas.css .atlas-card-row) */
.kv { display: flex; flex-direction: column; gap: 0.32rem; font-family: var(--font-mono); font-size: 0.82rem; }
.kv-row {
  display: grid;
  grid-template-columns: var(--kv-label, 150px) 1fr;
  column-gap: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--hud-text);
}
.kv-row > span:first-child {
  color: var(--hud-dim);
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding-top: 0.18rem;
}
.kv-hint {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px dashed rgba(120, 220, 255, 0.18);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-style: italic;
  color: var(--hud-dim);
}

/* ---------- Chips & pills ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 0.22rem 0.55rem;
  border: 1px solid rgba(120, 220, 255, 0.3);
  color: var(--hud-accent);
  line-height: 1.4;
  white-space: nowrap;
}
.chip-public { color: var(--color-cyan-light); border-color: rgba(0, 194, 242, 0.5); }
.chip-crew { color: var(--gate-gold); border-color: rgba(212, 175, 55, 0.55); }
.chip-planned { color: var(--color-orange); border-color: rgba(245, 125, 6, 0.6); }
.chip-concept { color: var(--color-gold); border-color: rgba(250, 178, 23, 0.5); }
.chip-dim { color: var(--hud-dim); border-color: rgba(120, 220, 255, 0.2); font-weight: 400; }
.chip-dot::before { content: ''; width: 6px; height: 6px; background: currentColor; display: inline-block; }

/* menu.css .wn-kind */
.wn-kind {
  display: inline-block;
  min-width: 62px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 0.18rem 0.4rem;
  border-radius: 2px;
  color: #081018;
  flex-shrink: 0;
}
.wn-kind-feature { background: var(--wn-feature); }
.wn-kind-art { background: var(--wn-art); }
.wn-kind-fix { background: var(--wn-fix); }

.tag {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.tag::before { content: '#'; opacity: 0.6; }
.tag-explore { color: var(--color-cyan-light); }
.tag-play { color: var(--color-orange); }
.tag-canon { color: var(--color-gold); }
.tag-devlog { color: var(--text-secondary); }

/* ---------- Sections ---------- */
.section { padding: 5.5rem 0; border-bottom: 1px solid rgba(0, 194, 242, 0.06); }
.section.alt { background: var(--bg-alt); }
.section-head { margin-bottom: 2.6rem; max-width: 52rem; }
.section-head.split { max-width: none; display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; flex-wrap: wrap; }
.section-head h2 + .lead { margin-top: 1rem; }
.link-more {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* ---------- Media frames ---------- */
.media { position: relative; overflow: hidden; background: #000; aspect-ratio: 16 / 9; }
.media img, .media video { width: 100%; height: 100%; object-fit: cover; }
.media.wide { aspect-ratio: 21 / 9; }
.media.square { aspect-ratio: 1 / 1; }
.media.tall { aspect-ratio: 4 / 5; }
.media.contain img { object-fit: contain; }
.media-label {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 2.4rem 1rem 0.8rem;
  background: linear-gradient(0deg, rgba(6, 9, 18, 0.92) 0%, rgba(6, 9, 18, 0.55) 55%, rgba(6, 9, 18, 0) 100%);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--hud-text);
  display: flex; justify-content: space-between; gap: 1rem; align-items: flex-end;
}
.media-label b { color: var(--hud-bright); font-weight: 700; }
.media .chip { position: absolute; top: 0.7rem; left: 0.7rem; background: rgba(6, 9, 18, 0.8); }
figure { margin: 0; }
figcaption {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  padding-top: 0.6rem;
  line-height: 1.55;
}
figcaption b { color: var(--text-muted); font-weight: 500; }
.framed-wrap { position: relative; }
.framed-wrap::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(120, 220, 255, 0.28);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: min(88vh, 860px);
  display: flex; align-items: flex-end;
  overflow: hidden;
  border-bottom: 1px solid rgba(0, 194, 242, 0.18);
  background: #000;
}
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 70% 50%; }
.hero-scrim {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(6, 9, 18, 0.9) 0%, rgba(6, 9, 18, 0.62) 38%, rgba(6, 9, 18, 0) 70%),
    linear-gradient(0deg, rgba(6, 9, 18, 1) 0%, rgba(6, 9, 18, 0) 34%);
}
.hero-inner { position: relative; z-index: 1; width: 100%; padding-top: 7rem; padding-bottom: 4.5rem; }
.hero-copy { max-width: 40rem; }
.hero h1 { font-size: clamp(2.1rem, 4.2vw, 3.4rem); margin-bottom: 1.3rem; text-shadow: 0 2px 24px rgba(0, 0, 0, 0.6); }
.hero .lead { color: #cbd5e1; margin-bottom: 2rem; }
.hero-meta {
  margin-top: 2.6rem;
  display: flex; flex-wrap: wrap; gap: 0.6rem 1.8rem;
  font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--text-muted);
}
.hero-meta span b { color: var(--hud-bright); font-weight: 500; }
.hero-caption {
  position: absolute; right: 1.5rem; bottom: 1.3rem; z-index: 1;
  font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: rgba(205, 221, 238, 0.6);
}

/* Interior page hero (lane pages) */
.page-hero { position: relative; overflow: hidden; border-bottom: 1px solid rgba(0, 194, 242, 0.18); background: #000; }
.page-hero .bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.page-hero .hero-scrim { background:
    linear-gradient(90deg, rgba(6, 9, 18, 0.94) 0%, rgba(6, 9, 18, 0.7) 42%, rgba(6, 9, 18, 0.1) 80%),
    linear-gradient(0deg, rgba(6, 9, 18, 1) 0%, rgba(6, 9, 18, 0) 40%); }
.page-hero .hero-inner { padding-top: 6.5rem; padding-bottom: 4rem; }
.page-hero.plain { background: var(--bg-void); }
.page-hero.plain .hero-inner { padding-top: 5rem; padding-bottom: 3.2rem; }
.lane-host {
  display: inline-flex; gap: 0.8rem; align-items: center; flex-wrap: wrap;
  margin-bottom: 1.2rem;
}
.lane-host .host { font-family: var(--font-mono); font-size: 0.78rem; color: var(--text-muted); letter-spacing: 0.06em; }

/* ---------- Lane cards ---------- */
.lanes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.4rem; }
.lane { display: flex; flex-direction: column; padding: 0; color: inherit; transition: box-shadow 0.18s; }
.lane:hover {
  color: inherit;
  box-shadow:
    inset 0 0 0 1px var(--hud-bright),
    inset 0 0 16px rgba(120, 220, 255, 0.22),
    0 0 14px rgba(120, 220, 255, 0.3);
}
.lane .media { aspect-ratio: 16 / 8; }
.lane-body { padding: 1.2rem 1.35rem 1.4rem; display: flex; flex-direction: column; gap: 0.55rem; flex: 1; }
.lane-top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.lane-num { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.3em; color: var(--hud-dim); }
.lane h3 { font-size: 1.45rem; }
.lane p { color: var(--text-muted); font-size: 0.95rem; margin: 0; }
.lane-foot {
  margin-top: auto; padding-top: 0.9rem;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.1em;
  border-top: 1px solid rgba(120, 220, 255, 0.14);
}
.lane-foot .host { color: var(--text-faint); }
.lane-foot .go { color: var(--color-cyan); text-transform: uppercase; letter-spacing: 0.16em; }
.lane-foot .go.gold { color: var(--gate-gold); }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(6, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.stat { padding: 1.5rem 1.1rem 1.4rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 0.5rem; }
.stat-fig {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: clamp(1.7rem, 2.6vw, 2.3rem);
  font-weight: 500;
  color: var(--color-gold);
  line-height: 1;
  letter-spacing: -0.01em;
}
.stat-label { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-primary); }
.stat-src { font-size: 0.8rem; color: var(--text-faint); line-height: 1.5; }
.stats-foot { margin-top: 1.2rem; font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.06em; color: var(--text-faint); }

/* ---------- What's New ---------- */
.wn-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.wn-item {
  display: grid;
  grid-template-columns: 92px 74px 1fr;
  gap: 0.9rem;
  align-items: baseline;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(120, 220, 255, 0.1);
  font-size: 0.95rem;
}
.wn-item:last-child { border-bottom: none; }
.wn-date { font-family: var(--font-mono); font-size: 0.72rem; color: var(--hud-dim); letter-spacing: 0.08em; font-variant-numeric: tabular-nums; }
.wn-item b { color: var(--text-primary); font-weight: 600; }
.wn-item span.txt { color: var(--text-secondary); }
.wn-day { margin-bottom: 2.4rem; }
.wn-day-head {
  display: flex; align-items: baseline; gap: 1rem;
  padding-bottom: 0.6rem; margin-bottom: 0.4rem;
  border-bottom: 1px solid rgba(120, 220, 255, 0.2);
}
.wn-day-head h3 { font-size: 1.25rem; }
.wn-day-head .num { color: var(--hud-dim); font-size: 0.75rem; letter-spacing: 0.1em; }
.wn-day .wn-item { grid-template-columns: 74px 1fr; }
.wn-legend { display: flex; gap: 1.2rem; flex-wrap: wrap; align-items: center; font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-muted); }
.wn-legend span { display: inline-flex; gap: 0.5rem; align-items: center; }

/* ---------- Devlog cards ---------- */
.posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.post { display: flex; flex-direction: column; padding: 0; color: inherit; }
.post:hover { color: inherit; }
.post:hover h3 { color: var(--color-cyan-light); }
.post .media { aspect-ratio: 16 / 9; }
.post-body { padding: 1.05rem 1.2rem 1.25rem; display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }
.post-meta { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.1em; color: var(--hud-dim); text-transform: uppercase; display: flex; gap: 0.5rem 1rem; flex-wrap: wrap; }
.post h3 { font-size: 1.12rem; transition: color 0.15s; }
.post .summary {
  color: var(--text-muted); font-size: 0.92rem; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.post-tags { margin-top: auto; padding-top: 0.6rem; display: flex; gap: 0.9rem; flex-wrap: wrap; }
.post.feature { grid-column: span 2; flex-direction: row; }
.post.feature .media { flex: 1.35; aspect-ratio: auto; min-height: 340px; }
.post.feature .post-body { flex: 1; padding: 1.6rem 1.6rem 1.5rem; gap: 0.75rem; }
.post.feature h3 { font-size: 1.55rem; }
.post.feature .summary { -webkit-line-clamp: 4; font-size: 1rem; }
.provenance {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.1em;
  color: var(--text-muted);
  border: 1px dashed rgba(120, 220, 255, 0.3);
  padding: 0.35rem 0.7rem;
}
.provenance::before { content: ''; width: 6px; height: 6px; background: var(--wn-feature); }
.filters { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 2rem; }
.filters button {
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase;
  background: transparent; color: var(--text-secondary);
  border: 1px solid rgba(120, 220, 255, 0.22); padding: 0.45rem 0.85rem; cursor: pointer;
}
.filters button[aria-pressed="true"] { color: var(--hud-bright); border-color: var(--hud-border); background: rgba(80, 200, 255, 0.08); }

/* ---------- Grids ---------- */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.4rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.1rem; }
.split { display: grid; grid-template-columns: 1.15fr 1fr; gap: 3rem; align-items: center; }
.split.rev > :first-child { order: 2; }
.split.top { align-items: start; }
.feature-list { list-style: none; padding: 0; margin: 1.4rem 0 0; display: flex; flex-direction: column; gap: 0.9rem; }
.feature-list li { display: grid; grid-template-columns: 22px 1fr; gap: 0.6rem; color: var(--text-secondary); font-size: 0.97rem; }
.feature-list li::before { content: ''; width: 8px; height: 8px; margin-top: 0.55rem; box-shadow: inset 0 0 0 1px var(--hud-accent); }
.feature-list b { color: var(--text-primary); font-weight: 600; }

/* Body gallery */
.bodies { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.body-card .media { aspect-ratio: 4 / 3; }
.body-card .media-label { padding-top: 2rem; }
.bodies .body-card.big { grid-column: span 2; grid-row: span 2; }
.bodies .body-card.big .media { aspect-ratio: auto; height: 100%; min-height: 100%; }

/* ---------- Quote / canon ---------- */
.quote {
  font-family: var(--font-heading);
  font-size: clamp(1.1rem, 1.8vw, 1.35rem);
  line-height: 1.55;
  color: var(--text-primary);
  margin: 0;
  padding: 0.2rem 0 0.2rem 1.6rem;
  border-left: 2px solid var(--color-orange);
}
.quote em { color: var(--color-gold); font-style: normal; }
.quote-src { margin-top: 1rem; padding-left: 1.6rem; font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.08em; color: var(--text-faint); }
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.pillar { padding: 1.4rem 1.3rem 1.5rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.pillar-num { font-family: var(--font-heading); font-size: 1.6rem; color: rgba(0, 194, 242, 0.55); line-height: 1; margin-bottom: 0.7rem; }
.pillar h3 { font-size: 1.05rem; margin-bottom: 0.45rem; }
.pillar p { font-size: 0.9rem; color: var(--text-muted); margin: 0; }
.pillar .src { display: block; margin-top: 0.7rem; font-family: var(--font-mono); font-size: 0.66rem; color: var(--text-faint); letter-spacing: 0.06em; }
.pillar.locked .pillar-num { color: var(--color-gold); }

.tiers { display: flex; flex-direction: column; gap: 0; }
.tier { display: grid; grid-template-columns: 90px 1fr; gap: 1rem; padding: 0.85rem 0; border-bottom: 1px solid rgba(120, 220, 255, 0.1); }
.tier:last-child { border-bottom: none; }
.tier .t { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.18em; color: var(--hud-accent); padding-top: 0.2rem; }
.tier b { color: var(--text-primary); }
.tier span { color: var(--text-secondary); font-size: 0.94rem; }

table.data { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
table.data th {
  text-align: left; font-family: var(--font-mono); font-weight: 500; font-size: 0.66rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--color-cyan-light); padding: 0.6rem 0.8rem; border-bottom: 1px solid var(--color-cyan);
  background: rgba(0, 194, 242, 0.06);
}
table.data td { padding: 0.6rem 0.8rem; border-bottom: 1px solid rgba(0, 194, 242, 0.12); color: var(--text-secondary); }
table.data td.num { color: var(--text-primary); white-space: nowrap; }

/* Search mock */
.search-box {
  display: flex; align-items: center; gap: 0.8rem;
  background: rgba(8, 18, 30, 0.9);
  border: 1px solid rgba(120, 220, 255, 0.3);
  padding: 0.8rem 1rem;
  font-family: var(--font-mono); font-size: 0.88rem; color: var(--hud-bright);
}
.search-box .k { white-space: nowrap; margin-left: auto; color: var(--hud-dim); font-size: 0.7rem; border: 1px solid rgba(120, 220, 255, 0.25); padding: 0.05rem 0.4rem; }
.modes { display: flex; gap: 0; margin-bottom: 0.9rem; }
.modes span {
  font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.16em; text-transform: uppercase;
  padding: 0.4rem 0.8rem; color: var(--hud-dim); border: 1px solid rgba(120, 220, 255, 0.18); margin-right: -1px;
}
.modes span.on { color: var(--bg-void); background: var(--hud-accent); border-color: var(--hud-accent); font-weight: 700; }
.answer { margin-top: 1rem; font-size: 0.93rem; color: var(--text-secondary); }
.answer sup { font-family: var(--font-mono); color: var(--color-cyan); font-size: 0.7em; }
.answer-src { margin-top: 0.8rem; display: flex; flex-direction: column; gap: 0.25rem; font-family: var(--font-mono); font-size: 0.7rem; color: var(--hud-dim); }

/* Code blocks */
pre.code {
  margin: 0;
  background: var(--bg-void);
  border: 1px solid rgba(0, 194, 242, 0.2);
  padding: 1rem 1.15rem;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.65;
  color: var(--hud-text);
}
pre.code .c { color: var(--text-faint); }
pre.code .f { color: var(--color-cyan-light); }
pre.code .s { color: var(--wn-feature); }
pre.code .n { color: var(--color-gold); }
pre.code .k { color: var(--hud-dim); }
.code-head {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--hud-dim);
  padding: 0.5rem 0.9rem; border: 1px solid rgba(0, 194, 242, 0.2); border-bottom: none;
  background: rgba(0, 194, 242, 0.04);
}

/* Planned surface cards */
.surface-card h3 { font-family: var(--font-mono); font-size: 1rem; letter-spacing: 0.04em; color: var(--hud-bright); }
.surface-card p { color: var(--text-muted); font-size: 0.92rem; margin: 0.5rem 0 0; }
.surface-card .top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 0.6rem; }

/* Notice banner */
.notice {
  display: flex; gap: 1rem; align-items: flex-start;
  border: 1px solid rgba(245, 125, 6, 0.45);
  background: rgba(245, 125, 6, 0.06);
  padding: 1rem 1.2rem;
  font-size: 0.93rem; color: var(--text-secondary);
}
.notice b { color: var(--text-primary); }

/* Gate CTA band */
.gate-band { padding: 4.5rem 0; background: var(--bg-near-black); border-bottom: 1px solid var(--gate-border); }
.gate-card {
  display: grid; grid-template-columns: 1fr auto; gap: 2rem; align-items: center;
  border: 1px solid var(--gate-border);
  background: rgba(10, 14, 32, 0.82);
  padding: 2rem 2.2rem;
}
.gate-card h2 { color: var(--gate-text); font-size: clamp(1.4rem, 2.4vw, 1.9rem); }
.gate-card p { color: #8a90a8; margin: 0.6rem 0 0; }
.gate-card .gate-eyebrow { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.22em; color: var(--gate-gold); margin-bottom: 0.6rem; }
.public-band { padding: 4.5rem 0; background: var(--bg-near-black); border-bottom: 1px solid var(--line); }
.public-card { display: grid; grid-template-columns: 1fr auto; gap: 2rem; align-items: center; }

/* ---------- Post (article) ---------- */
.article { max-width: 760px; margin: 0 auto; }
.article-wide { max-width: 1040px; margin: 2.4rem auto; }
.article h2 { font-size: 1.6rem; margin: 3rem 0 1rem; color: var(--color-cyan-light); }
.article p, .article li { color: #cbd5e1; font-size: 1.05rem; line-height: 1.8; }
.article blockquote {
  margin: 1.6rem 0; padding: 0.9rem 1.4rem;
  border-left: 3px solid var(--color-orange);
  background: rgba(245, 125, 6, 0.06);
  color: #f0e4d0; font-style: italic;
}
.article blockquote cite { display: block; margin-top: 0.4rem; font-style: normal; font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.08em; color: var(--text-faint); }
.article figure { margin: 2rem 0; }
.byline { display: flex; flex-wrap: wrap; gap: 0.6rem 1.4rem; align-items: center; font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.08em; color: var(--text-muted); margin-top: 1.4rem; }
.byline b { color: var(--text-primary); font-weight: 500; }
.voice-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.6rem; margin: 1.4rem 0; }
.voice { padding: 0.7rem 0.6rem; text-align: center; font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); box-shadow: inset 0 0 0 1px rgba(120, 220, 255, 0.2); }
.voice.picked { color: var(--hud-bright); box-shadow: inset 0 0 0 1px var(--hud-border), 0 0 10px rgba(80, 200, 255, 0.14); }
.voice small { display: block; margin-top: 0.2rem; font-size: 0.6rem; color: var(--hud-dim); letter-spacing: 0.1em; }
.directions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.8rem; margin: 1.4rem 0; }
.direction { text-align: center; font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); }
.direction .box { padding: 0.9rem 0.5rem; box-shadow: inset 0 0 0 1px rgba(120, 220, 255, 0.18); }
.direction.won .box { box-shadow: inset 0 0 0 1px rgba(212, 175, 55, 0.6); color: var(--gate-gold); }
.post-provenance {
  margin-top: 3.5rem; padding: 1.2rem 1.3rem;
  font-family: var(--font-mono); font-size: 0.74rem; line-height: 1.8; color: var(--text-muted);
  border: 1px dashed rgba(120, 220, 255, 0.3);
}
.post-provenance b { color: var(--hud-bright); font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; font-size: 0.68rem; }
.post-nav { display: flex; justify-content: space-between; gap: 1rem; margin-top: 2.4rem; font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.08em; }

/* ---------- Footer ---------- */
.footer { background: var(--bg-void); border-top: 1px solid var(--line); padding: 4rem 0 2.2rem; }
.footer-top { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 2.5rem; }
.footer-brand { display: flex; gap: 1.3rem; align-items: flex-start; }
.footer-brand img { width: 112px; height: 112px; flex-shrink: 0; }
.footer-brand p { color: var(--text-muted); font-size: 0.9rem; margin: 0.6rem 0 0; }
.footer-brand .brand-word { font-size: 1.7rem; }
.footer h4 { font-family: var(--font-mono); font-size: 0.7rem; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; color: var(--color-cyan-light); margin-bottom: 0.9rem; }
.footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.45rem; }
.footer ul a { color: var(--text-secondary); font-size: 0.9rem; }
.footer ul a:hover { color: var(--text-primary); }
.footer ul .host { font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-faint); margin-left: 0.4rem; }
.footer-bottom {
  margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid rgba(0, 194, 242, 0.08);
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: baseline;
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.08em; color: var(--text-faint);
}
.motto { font-family: var(--font-heading); font-style: italic; font-size: 1rem; letter-spacing: 0.06em; color: var(--color-gold); }

/* ---------- Crew door dialog (server/auth.ts loginPage, gradient removed) ---------- */
.door-backdrop {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(2, 2, 8, 0.82);
  display: none; place-items: center; padding: 1rem;
}
.door-backdrop.open { display: grid; }
.door {
  width: min(400px, 92vw); padding: 2.5rem 2.25rem;
  background: rgba(10, 14, 32, 0.96); border: 1px solid var(--gate-border);
  border-radius: 10px;
  box-shadow: 0 0 60px rgba(212, 175, 55, 0.08), 0 30px 80px rgba(0, 0, 0, 0.6);
  color: var(--gate-text); font-family: var(--font-body);
  position: relative;
}
.door h2 { font-family: var(--font-mark); font-size: 1.6rem; letter-spacing: 0.3em; font-weight: 700; color: var(--gate-gold); display: flex; align-items: center; gap: 0.8rem; }
.door h2 img { width: 44px; height: 44px; }
.door .sub { margin-top: 0.5rem; font-size: 0.78rem; letter-spacing: 0.06em; color: #8a90a8; }
.door .b4m-btn {
  display: block; margin-top: 1.8rem; padding: 0.75rem; text-align: center;
  font-size: 0.85rem; letter-spacing: 0.08em; color: var(--gate-text);
  background: rgba(212, 175, 55, 0.12); border: 1px solid rgba(212, 175, 55, 0.5); border-radius: 6px;
}
.door .b4m-btn + .b4m-btn { margin-top: 0.8rem; }
.door .b4m-btn:hover { background: rgba(212, 175, 55, 0.22); color: var(--gate-text); }
.door .motto-small { margin-top: 1.6rem; font-size: 0.7rem; letter-spacing: 0.1em; color: #565d78; font-style: italic; }
.door .close { position: absolute; top: 0.8rem; right: 0.9rem; background: none; border: none; color: #565d78; font-size: 1.3rem; cursor: pointer; }
.door .request { margin-top: 1rem; font-size: 0.78rem; color: #8a90a8; }
.door .request a { color: var(--gate-gold); }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .nav-links a { padding: 0.5rem 0.5rem; letter-spacing: 0.1em; }
  .stats { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 1020px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute; top: var(--nav-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch;
    background: var(--bg-void); border-bottom: 1px solid var(--line);
    padding: 0.6rem 1.5rem 1.2rem;
    height: calc(100vh - var(--nav-h)); overflow-y: auto; justify-content: flex-start;
  }
  .nav.open .nav-links { display: flex; }
  .nav-links a { padding: 0.8rem 0; border-bottom: 1px solid rgba(0, 194, 242, 0.08); font-size: 0.8rem; }
  .nav-links a[aria-current="page"] { border-bottom-color: rgba(0, 194, 242, 0.08); }
  .nav-links .crew-link { margin: 0.9rem 0 0; text-align: center; padding: 0.7rem; }
  .posts { grid-template-columns: repeat(2, 1fr); }
  .post.feature { grid-column: span 2; }
  .split, .split.rev { grid-template-columns: 1fr; gap: 2rem; }
  .split.rev > :first-child { order: 0; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: span 2; }
  .bodies { grid-template-columns: repeat(2, 1fr); }
  .pillars { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .section { padding: 3.8rem 0; }
  .wrap { padding: 0 1.15rem; }
  .lanes, .grid-2, .grid-3, .posts, .pillars { grid-template-columns: 1fr; }
  .post.feature { grid-column: auto; flex-direction: column; }
  .post.feature .media { min-height: 0; aspect-ratio: 16 / 9; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .hero { min-height: 0; }
  .hero-video { object-position: 78% 50%; }
  .hero-scrim { background:
      linear-gradient(0deg, rgba(6, 9, 18, 1) 0%, rgba(6, 9, 18, 0.82) 55%, rgba(6, 9, 18, 0.35) 100%); }
  .page-hero .hero-scrim { background: linear-gradient(0deg, rgba(6, 9, 18, 1) 0%, rgba(6, 9, 18, 0.82) 60%, rgba(6, 9, 18, 0.45) 100%); }
  .hero-inner { padding-top: 12rem; padding-bottom: 3rem; }
  .page-hero .hero-inner { padding-top: 9rem; }
  .btn-row .btn { width: 100%; justify-content: center; }
  .hero-caption { display: none; }
  .wn-item { grid-template-columns: 74px 1fr; }
  .wn-item .wn-date { grid-column: span 2; }
  .gate-card, .public-card { grid-template-columns: 1fr; padding: 1.6rem; }
  .footer-top { grid-template-columns: 1fr; }
  .footer-brand { grid-column: auto; }
  .footer-brand img { width: 84px; height: 84px; }
  .voice-row { grid-template-columns: repeat(3, 1fr); }
  .directions { grid-template-columns: repeat(2, 1fr); }
  .kv-row { --kv-label: 112px; }
  .bodies .body-card.big { grid-column: span 2; grid-row: auto; }
  .bodies .body-card.big .media { aspect-ratio: 4 / 3; height: auto; }
}

/* Split ratios (declared before nothing else; media queries below re-stack them) */
.split > *, .grid-2 > *, .grid-3 > *, .grid-4 > *, .lanes > *, .posts > * { min-width: 0; }
@media (min-width: 1021px) {
  .split.r13 { grid-template-columns: 1.3fr 1fr; }
  .split.r14 { grid-template-columns: 1.4fr 1fr; }
  .split.r19 { grid-template-columns: 1.9fr 1fr; gap: 1.6rem; }
  .split.r22 { grid-template-columns: 2.2fr 1fr; }
  .bodies.three { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 1020px) {
  .whats-aside { position: static !important; }
}
.page-hero h1 { margin-bottom: 1.1rem; text-shadow: 0 2px 24px rgba(0, 0, 0, 0.6); }

/* What's New media from the content pipeline (pnpm ingest) */
.wn-thumb { display: block; max-width: 420px; margin-top: 0.7rem; }
.wn-audio { display: block; margin-top: 0.7rem; }
.wn-audio audio { width: 100%; max-width: 420px; }
