/*
  site.css
  BlastVector Website

  Created by HELM Coders LLC on 2026-10-27 (Central).
  Purpose: The single stylesheet for BlastVector.com. A cinematic, tactical franchise look: hard edges, HUD frames,
           faction colour coding (Thaevrek red, Aurelian Synod cyan, native magenta) and the Terran Intelligence
           Assessment terminal styling for Universe pages. No external fonts or frameworks.
  Change log:
   2026-10-27 — Website Pass 003: full visual redesign (franchise home, campaign route, threat board, recognition
                tiles, faction terminals, Intel terminal dossier); tighter vertical rhythm; no rounded "card" look.
   2026-10-27 — Website Pass 004A: universe record and Chronicles components (records lists, article blocks, transmission
                log, chapter navigation) and the Universe hub's campaign crosslink.
   2026-10-27 — Website Pass 004B: Chronicles reader — volume landing, cinematic chapter pages (full-bleed scene slots
                with atmospheric fades, serif long-form typography, drop cap, system readouts, inscriptions), reading
                progress, chapter navigation, scene palettes, review-build ribbon and stand-in treatment.
*/

:root {
  --void: #010307;
  --bg: #04070e;
  --bg-2: #08101d;
  --panel: rgba(9, 15, 28, .86);
  --line: rgba(150, 190, 230, .14);
  --line-2: rgba(150, 190, 230, .28);
  --ink: #edf2f8;
  --ink-2: #aab8ca;
  --ink-3: #74859b;
  --cyan: #66e7ff;
  --amber: #ffb547;
  --hostile: #ff3d50;
  --synod: #3fe0f0;
  --native: #ff5fc0;
  --accent: var(--cyan);
  --max: 1320px;
  --gutter: clamp(16px, 3.4vw, 44px);
  --band: clamp(24px, 3.2vw, 44px);
  --cut: 14px;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; color: var(--ink); font: 400 16.5px/1.6 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden;
  background: var(--bg);
}
img, video { max-width: 100%; height: auto; display: block; }
picture { display: block; }
a { color: var(--cyan); text-underline-offset: 3px; }
a:hover { color: #c2f7ff; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }
h1, h2, h3 { line-height: 1.02; margin: 0 0 .45em; font-weight: 900; text-transform: uppercase; letter-spacing: -.01em; font-stretch: condensed; }
h1 { font-size: clamp(2.3rem, 6.4vw, 5.4rem); }
h2 { font-size: clamp(1.7rem, 3.8vw, 3.1rem); }
h3 { font-size: 1.2rem; letter-spacing: .01em; }
p { margin: 0 0 1em; }
.mono { font-family: var(--mono); font-size: .74rem; letter-spacing: .16em; text-transform: uppercase; font-weight: 500; }
.small { font-size: .86rem; color: var(--ink-3); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 900px; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--amber); color: #000; padding: 10px 16px; font-weight: 700; }
.skip:focus { top: 12px; }
.hostile { color: var(--hostile); }
.amber { color: var(--amber); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; background: rgba(2, 4, 9, .82);
  backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.site-header::after { content: ""; position: absolute; left: 0; bottom: -1px; width: 180px; height: 1px; background: var(--amber); }
.header-inner { display: flex; align-items: center; gap: 24px; min-height: 58px; }
.brand-logo { width: 138px; height: auto; }
.site-nav { flex: 1; }
.site-nav ul { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; }
.site-nav a {
  display: inline-flex; align-items: baseline; gap: 7px; padding: 8px 14px; color: var(--ink-2); text-decoration: none;
  font-weight: 750; font-size: .82rem; letter-spacing: .14em; text-transform: uppercase; border-bottom: 2px solid transparent;
}
.site-nav .idx { font-family: var(--mono); font-size: .64rem; color: var(--ink-3); letter-spacing: .08em; }
.site-nav a:hover { color: var(--ink); }
.site-nav a[aria-current] { color: var(--ink); border-bottom-color: var(--amber); }
.site-nav a[aria-current] .idx { color: var(--amber); }
.lang-switch { display: inline-flex; gap: 0; text-decoration: none; border: 1px solid var(--line-2); }
.lang-switch span { padding: 6px 9px; }
.lang-switch .cur { background: var(--ink); color: #000; }
.lang-switch .to { color: var(--ink-2); }
.lang-switch:hover .to { color: var(--amber); }
@media (max-width: 640px) {
  .header-inner { flex-wrap: wrap; gap: 0 8px; padding-top: 8px; }
  .brand-logo { width: 118px; }
  .lang-switch { margin-left: auto; }
  .site-nav { order: 3; flex-basis: 100%; }
  .site-nav ul { justify-content: space-between; padding: 2px 0 4px; }
  .site-nav a { padding: 8px 6px; font-size: .76rem; }
  .site-nav { overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .site-nav::-webkit-scrollbar { display: none; }
  .site-nav ul { min-width: max-content; gap: 6px; }
}

/* ---------- commands (buttons) ---------- */
.cmd {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 46px; padding: 0 22px;
  font-weight: 800; font-size: .8rem; letter-spacing: .16em; text-transform: uppercase; text-decoration: none; color: var(--ink);
  background: rgba(4, 8, 16, .55); border: 1px solid var(--line-2);
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
  transition: background .15s ease, color .15s ease;
}
.cmd::after { content: "›"; font-size: 1.1rem; line-height: 0; transform: translateY(-1px); }
.cmd:hover { color: #000; background: var(--ink); }
.cmd.primary { color: #120800; background: var(--amber); border-color: var(--amber); }
.cmd.primary:hover { background: #ffd28a; }
.cmd.ghost { min-height: 38px; padding: 0 16px; font-size: .72rem; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 1.4em 0 0; }
.kicker { font-family: var(--mono); font-size: .74rem; letter-spacing: .24em; text-transform: uppercase; color: var(--cyan); margin-bottom: .9em; display: flex; align-items: center; gap: 10px; }
.kicker::before { content: ""; width: 22px; height: 2px; background: currentColor; }
.kicker.hostile { color: var(--hostile); }
.kicker.amber { color: var(--amber); }
.text-link { font-weight: 700; text-decoration: none; }
.text-link:hover { text-decoration: underline; }

/* legacy buttons on pages not yet rebuilt */
.btn { display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px; font-weight: 800; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; text-decoration: none; color: var(--ink); border: 1px solid var(--line-2); background: rgba(4, 8, 16, .55); }
.btn:hover { background: var(--ink); color: #000; }
.btn-primary { background: var(--amber); color: #120800; border-color: var(--amber); }
.status-pill { display: inline-flex; align-items: center; gap: 10px; padding: 6px 12px; font-family: var(--mono); font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; border: 1px solid var(--amber); color: var(--amber); background: rgba(0, 0, 0, .5); }
.status-pill .dot { width: 7px; height: 7px; background: var(--amber); box-shadow: 0 0 10px var(--amber); }

/* ---------- HUD primitives ---------- */
.hud-frame { position: relative; }
.hud-frame::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 2;
  background:
    linear-gradient(var(--hud, var(--amber)), var(--hud, var(--amber))) top left / 18px 2px,
    linear-gradient(var(--hud, var(--amber)), var(--hud, var(--amber))) top left / 2px 18px,
    linear-gradient(var(--hud, var(--amber)), var(--hud, var(--amber))) top right / 18px 2px,
    linear-gradient(var(--hud, var(--amber)), var(--hud, var(--amber))) top right / 2px 18px,
    linear-gradient(var(--hud, var(--amber)), var(--hud, var(--amber))) bottom left / 18px 2px,
    linear-gradient(var(--hud, var(--amber)), var(--hud, var(--amber))) bottom left / 2px 18px,
    linear-gradient(var(--hud, var(--amber)), var(--hud, var(--amber))) bottom right / 18px 2px,
    linear-gradient(var(--hud, var(--amber)), var(--hud, var(--amber))) bottom right / 2px 18px;
  background-repeat: no-repeat;
}
.hud-corners { position: absolute; inset: 76px var(--gutter) 22px; pointer-events: none; z-index: 1; opacity: .7;
  background:
    linear-gradient(var(--ink), var(--ink)) top left / 30px 1px, linear-gradient(var(--ink), var(--ink)) top left / 1px 30px,
    linear-gradient(var(--ink), var(--ink)) top right / 30px 1px, linear-gradient(var(--ink), var(--ink)) top right / 1px 30px,
    linear-gradient(var(--ink), var(--ink)) bottom left / 30px 1px, linear-gradient(var(--ink), var(--ink)) bottom left / 1px 30px,
    linear-gradient(var(--ink), var(--ink)) bottom right / 30px 1px, linear-gradient(var(--ink), var(--ink)) bottom right / 1px 30px;
  background-repeat: no-repeat; }
.hud-stats { display: flex; flex-wrap: wrap; gap: 0; list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-2); }
.hud-stats li { display: flex; flex-direction: column; gap: 2px; padding: 12px 26px 4px 0; margin-right: 26px; border-right: 1px solid var(--line); }
.hud-stats li:last-child { border-right: 0; }
.hud-stats .n { font-size: clamp(1.6rem, 3.2vw, 2.5rem); font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; }
.hud-stats .mono { color: var(--ink-3); font-size: .66rem; }
.hud-stats.inline { border: 0; margin: 4px 0 18px; }
.hud-stats.inline .n { color: var(--amber); }
@media (max-width: 640px) { .hud-stats li { padding-right: 14px; margin-right: 14px; } }

/* ---------- heroes ---------- */
.hero { position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; min-height: min(90vh, 940px); }
.hero-media { position: absolute; inset: 0; z-index: -2; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: center 45%; }
.hero-shade { position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to top, var(--bg) 0%, rgba(4, 7, 14, .78) 24%, rgba(4, 7, 14, .1) 58%, rgba(4, 7, 14, .5) 100%),
              linear-gradient(to right, rgba(4, 7, 14, .86) 0%, rgba(4, 7, 14, 0) 60%); }
.hero-content { position: relative; z-index: 2; padding-top: 110px; padding-bottom: 18px; }
.hero-content > * { max-width: 780px; }
.hero-logo { width: min(500px, 80vw); margin: 4px 0 14px; filter: drop-shadow(0 6px 30px rgba(0, 0, 0, .7)); }
.hero h1 { text-shadow: 0 4px 34px rgba(0, 0, 0, .7); }
.hero-franchise h1 { font-size: clamp(1.4rem, 2.6vw, 2rem); letter-spacing: .12em; color: var(--ink-2); font-weight: 800; }
.lead, .hero .lead { font-size: clamp(1.05rem, 1.7vw, 1.3rem); color: var(--ink); max-width: 640px; }
.hero-foot { position: relative; z-index: 2; padding-bottom: 26px; }
.hero-command { min-height: min(66vh, 680px); }
.hero-command .hud-stats { margin-top: 18px; }
@media (prefers-reduced-motion: no-preference) {
  .hero-franchise .hero-media img, .hero-command .hero-media img { animation: drift 30s ease-in-out infinite alternate; transform-origin: 60% 50%; }
  @keyframes drift { from { transform: scale(1.03); } to { transform: scale(1.12) translate(-1.2%, -1%); } }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media (max-width: 640px) { .hero { min-height: 86vh; } .hero-content { padding-top: 80px; } .hud-corners { display: none; } }

/* legacy hero variants (pages not yet rebuilt) */
.hero-tag { font-size: clamp(1.4rem, 3vw, 2.2rem); font-weight: 900; text-transform: uppercase; }
.platforms { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0; }
.platforms li { font-family: var(--mono); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; padding: 4px 10px; border: 1px solid var(--line-2); }
.hero-universe, .hero-world { min-height: min(64vh, 680px); }
.hero-game { min-height: min(86vh, 900px); }

/* ---------- band heads ---------- */
.band-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px 40px; flex-wrap: wrap; margin-bottom: 18px; }
.band-head h2 { margin: 0; }
.band-aside { display: flex; align-items: center; gap: 16px; margin: 0; color: var(--ink-3); }
.band-aside .mono { color: var(--ink-3); }

/* ---------- game band (home) ---------- */
.game-band { position: relative; padding: var(--band) 0; background:
  linear-gradient(90deg, rgba(255, 181, 71, .07), transparent 40%), var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.game-band-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); gap: clamp(22px, 4vw, 56px); align-items: center; }
.band-logo { width: min(320px, 70vw); margin-bottom: 10px; }
.band-tag { font-weight: 900; text-transform: uppercase; font-size: clamp(1.2rem, 2.2vw, 1.6rem); line-height: 1.15; margin-bottom: .6em; }
.game-band-text > p:not(.kicker):not(.band-tag) { color: var(--ink-2); }
.video-frame { margin: 0; background: #000; --hud: var(--amber); }
.video-frame video { width: 100%; aspect-ratio: 16 / 9; }
.video-frame figcaption { padding: 8px 0 0; color: var(--ink-3); }
@media (max-width: 860px) { .game-band-grid { grid-template-columns: 1fr; } }

/* ---------- readouts ---------- */
.readout { margin: 0 0 1em; display: grid; }
.readout > div { display: grid; grid-template-columns: minmax(110px, 38%) 1fr; gap: 12px; padding: 7px 0; border-bottom: 1px dashed var(--line-2); }
.readout dt { font-family: var(--mono); font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); padding-top: 3px; }
.readout dd { margin: 0; font-weight: 650; }
.readout.compact > div { grid-template-columns: minmax(90px, 30%) 1fr; }
.stamp { display: inline-block; padding: 4px 9px; border: 1.5px solid var(--hostile); color: var(--hostile); font-family: var(--mono); font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; }
.stamp.unknown { border-color: var(--amber); color: var(--amber); }

/* ---------- campaign route ---------- */
.campaign { padding: var(--band) 0 calc(var(--band) - 12px); position: relative;
  background: radial-gradient(ellipse at 10% 0%, rgba(102, 231, 255, .09), transparent 55%); }
.route {
  position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: clamp(220px, 23vw, 300px); gap: 0; list-style: none; margin: 0;
  --rail-pad: max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter)));
  padding: 0 var(--rail-pad) 14px; scroll-padding-inline: var(--rail-pad); overflow-x: auto; scroll-snap-type: x proximity;
  scrollbar-width: thin; scrollbar-color: rgba(255, 181, 71, .5) transparent;
}
.route:focus-visible { outline-offset: -2px; }
.leg { scroll-snap-align: start; position: relative; }
.leg::before { content: ""; position: absolute; top: 21px; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 30%, transparent)); }
.leg a { display: flex; flex-direction: column; height: 100%; padding: 0 10px 0 0; color: var(--ink); text-decoration: none; }
.leg-node { position: relative; z-index: 1; display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 14px; background: var(--bg); border: 2px solid var(--accent); transform: rotate(45deg); }
.leg-node span { transform: rotate(-45deg); font-family: var(--mono); font-weight: 700; font-size: .8rem; color: var(--accent); }
.leg-art { overflow: hidden; border-top: 3px solid var(--accent); }
.leg-art img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; filter: saturate(1.05); transition: transform .5s ease, filter .3s ease; }
.leg a:hover .leg-art img, .leg a:focus-visible .leg-art img { transform: scale(1.05); filter: saturate(1.25) brightness(1.08); }
.leg a:hover .leg-node { background: var(--accent); }
.leg a:hover .leg-node span { color: #000; }
.leg-text { display: flex; flex-direction: column; gap: 3px; padding: 10px 2px 0; }
.leg-k { color: var(--accent); font-size: .64rem; }
.leg-name { font-weight: 900; text-transform: uppercase; font-size: 1.08rem; line-height: 1.1; }
.leg-tag { color: var(--ink-2); font-size: .88rem; font-style: italic; }
.leg-boss { color: var(--ink-3); font-size: .62rem; margin-top: 2px; }
.leg:nth-child(even) .leg-art img { aspect-ratio: 4 / 4.4; }
.campaign.full .leg-art img { aspect-ratio: 3 / 4; }
@media (max-width: 640px) { .route { grid-auto-columns: 70vw; } }

/* ---------- threat board ---------- */
.threat { padding: var(--band) 0; background: linear-gradient(180deg, var(--bg), #0b0408 40%, var(--bg)); border-top: 1px solid rgba(255, 61, 80, .25); }
.threat-grid { display: grid; grid-template-columns: minmax(0, 2.1fr) minmax(250px, 1fr); gap: 0; }
.threat-grid > * { border: 1px solid rgba(255, 61, 80, .25); background: #050306; }
.stage { --hud: var(--hostile); margin: 0; position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #000; }
.stage-slide { position: absolute; inset: 0; }
.stage-slide[hidden] { display: none; }
.stage-media img, .stage-media.no-visual { width: 100%; height: 100%; object-fit: cover; }
.stage-cap { position: absolute; left: 0; right: 0; bottom: 0; margin: 0; padding: 60px 22px 18px; display: flex; flex-direction: column; gap: 2px;
  background: linear-gradient(to top, rgba(0, 0, 0, .92), transparent); z-index: 1; }
.stage-cap .mono { color: var(--hostile); }
.stage-name { font-size: clamp(1.6rem, 3.6vw, 2.8rem); font-weight: 900; text-transform: uppercase; line-height: 1; }
.stage-class { color: var(--ink-2); }
.boss-index { list-style: none; margin: 0; padding: 0; counter-reset: b; display: flex; flex-direction: column; max-height: 100%; overflow: auto; border-left: 1px solid rgba(255, 61, 80, .25); }
.boss-index li { flex: 1; }
.boss-index a { display: grid; grid-template-columns: 52px 1fr auto; align-items: center; gap: 10px; height: 100%; min-height: 44px; padding: 6px 16px;
  color: var(--ink-2); text-decoration: none; border-bottom: 1px solid rgba(255, 61, 80, .14); }
.boss-index .mono { font-size: .64rem; color: var(--ink-3); }
.boss-index .b-name { font-weight: 800; text-transform: uppercase; font-size: .9rem; letter-spacing: .02em; }
.boss-index a:hover, .boss-index a[aria-current] { background: linear-gradient(90deg, rgba(255, 61, 80, .22), transparent); color: var(--ink); }
.boss-index a[aria-current] { box-shadow: inset 3px 0 0 var(--hostile); }
.boss-index a[aria-current] .mono:first-child { color: var(--hostile); }
@media (max-width: 900px) { .threat-grid { grid-template-columns: 1fr; } .boss-index { border-left: 0; border-top: 1px solid rgba(255, 61, 80, .25); display: grid; grid-template-columns: 1fr 1fr; } .boss-index a { grid-template-columns: 44px 1fr; } .boss-index .b-world { display: none; } }

/* ---------- recognition tiles (Intel renders) ---------- */
.recognition { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 2px; list-style: none; margin-top: 0; margin-bottom: 0; padding-top: 0; padding-bottom: 0; }
ul.recognition:not(.wrap) { padding-left: 0; padding-right: 0; }
.fleet { padding: var(--band) 0; }
.ship-tile { --f: var(--hostile); position: relative; }
.ship-tile.f-synod { --f: var(--synod); }
.ship-tile.f-native { --f: var(--native); }
.ship-tile a { position: relative; display: block; color: var(--ink); text-decoration: none; background: #070305; overflow: hidden; height: 100%; }
.ship-tile .tile-media img, .ship-tile .no-visual { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; transform: scale(1.06); transition: transform .45s ease, filter .3s ease; filter: saturate(.9); }
.ship-tile.f-synod .tile-media img { filter: saturate(.9) hue-rotate(0deg); }
.ship-tile a::after { content: ""; position: absolute; inset: 0; border: 1px solid transparent; transition: border-color .2s ease; pointer-events: none; }
.ship-tile a:hover::after, .ship-tile a:focus-visible::after { border-color: var(--f); }
.ship-tile a:hover .tile-media img { transform: scale(1.12); filter: saturate(1.1) brightness(1.1); }
.tile-tag { position: absolute; top: 8px; left: 8px; color: var(--f); font-size: .62rem; background: rgba(0, 0, 0, .55); padding: 2px 6px; }
.tile-name { position: absolute; left: 10px; right: 10px; bottom: 26px; font-weight: 900; text-transform: uppercase; font-size: .95rem; line-height: 1.05; text-shadow: 0 2px 10px #000; }
.tile-class { position: absolute; left: 10px; right: 10px; bottom: 8px; font-size: .74rem; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 2px 8px #000; }
.ship-tile a::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(to top, rgba(0, 0, 0, .88), rgba(0, 0, 0, 0) 58%); }
.tile-tag, .tile-name, .tile-class { z-index: 2; }
.recognition.dense { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.recognition.mini { grid-template-columns: repeat(5, minmax(0, 1fr)); margin-top: 12px; }
.recognition.mini .tile-class { display: none; }
.recognition.mini .tile-name { bottom: 8px; font-size: .74rem; }
@media (max-width: 1000px) { .recognition { grid-template-columns: repeat(3, minmax(0, 1fr)); } .recognition.mini { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .recognition, .recognition.dense { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- faction terminals ---------- */
.factions-band { padding: var(--band) 0; background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .012) 0 1px, transparent 1px 3px), #05070b; border-top: 1px solid var(--line); }
.terminals { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.terminals.stack { grid-template-columns: 1fr; gap: 14px; }
.terminal { --f: var(--hostile); position: relative; background: rgba(6, 9, 15, .92); border: 1px solid color-mix(in srgb, var(--f) 40%, transparent);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .6), 0 24px 60px rgba(0, 0, 0, .5), inset 0 0 80px color-mix(in srgb, var(--f) 6%, transparent); }
.terminal.f-synod { --f: var(--synod); }
.terminal.f-native { --f: var(--native); margin-top: 14px; }
.term-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0; padding: 8px 14px; font-size: .62rem;
  color: var(--f); background: color-mix(in srgb, var(--f) 10%, transparent); border-bottom: 1px solid color-mix(in srgb, var(--f) 35%, transparent); }
.term-dots { width: 42px; height: 8px; flex: 0 0 auto; background: radial-gradient(circle, var(--f) 3px, transparent 3.5px) 0 0 / 14px 8px repeat-x; opacity: .7; }
.term-body { display: grid; grid-template-columns: minmax(130px, 210px) 1fr; gap: 20px; padding: 18px; }
.term-body.single { grid-template-columns: 1fr; }
.terminal .id-frame { margin: 0; position: relative; padding: 6px; border: 1px solid rgba(255, 255, 255, .12); background: #0b0b0b; align-self: start; }
.terminal .id-frame img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; filter: contrast(1.05); }
.terminal .id-frame::after { content: ""; position: absolute; inset: 6px; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .22) 0 1px, transparent 1px 3px); }
.terminal .id-frame figcaption { margin-top: 6px; font-size: .56rem; color: var(--ink-3); }
.term-k { color: var(--f); margin-bottom: 4px; }
.terminal h3 { font-size: clamp(1.4rem, 2.6vw, 2rem); margin-bottom: 8px; }
.terminal h3 a { color: var(--ink); text-decoration: none; }
.terminal h3 a:hover { color: var(--f); }
.terminal .stamp { border-color: var(--f); color: var(--f); margin-bottom: 12px; }
.term-quote { border-left: 2px solid var(--f); padding: 4px 0 4px 14px; color: var(--ink); font-size: 1.02rem; }
.term-quote .mono { display: block; color: var(--f); font-size: .6rem; margin-bottom: 4px; }
.terminal .cmd { --cut: 10px; }
@media (max-width: 900px) { .terminals { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .term-body { grid-template-columns: 1fr; } .terminal .id-frame { max-width: 200px; } }

/* ---------- closing ---------- */
.closing-band { padding: var(--band) 0; border-top: 1px solid var(--line); background: radial-gradient(ellipse at 80% 100%, rgba(255, 181, 71, .12), transparent 60%); }
.closing-grid { display: grid; grid-template-columns: auto 1fr auto; gap: 14px 36px; align-items: center; }
.closing-line { margin: 0; font-size: clamp(1.5rem, 3.4vw, 2.6rem); font-weight: 900; text-transform: uppercase; line-height: 1; display: flex; flex-direction: column; gap: 6px; }
.closing-line .mono { color: var(--amber); }
.closing-grid .small { margin: 0; max-width: 420px; }
.closing-grid .actions { margin: 0; }
@media (max-width: 860px) { .closing-grid { grid-template-columns: 1fr; } }

/* ---------- Universe command hub ---------- */
.clearance-band { background: repeating-linear-gradient(-45deg, rgba(255, 181, 71, .1) 0 10px, rgba(255, 181, 71, .03) 10px 20px); border-top: 1px solid rgba(255, 181, 71, .45); border-bottom: 1px solid rgba(255, 181, 71, .45); }
.clearance-band p { margin: 0; padding: 9px var(--gutter); color: var(--amber); font-size: .66rem; line-height: 1.6; }
.theatres { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(20px, 3vw, 40px); padding-top: 8px; padding-bottom: var(--band); }
.theatre .intro { color: var(--ink-2); }
@media (max-width: 1000px) { .theatres { grid-template-columns: 1fr; } }

/* ---------- Intel terminal (contact dossier) ---------- */
.intel-terminal { --f: var(--hostile); padding: 22px 0 10px; background: radial-gradient(ellipse at 30% 30%, color-mix(in srgb, var(--f) 12%, transparent), transparent 60%),
  repeating-linear-gradient(0deg, rgba(255, 255, 255, .012) 0 1px, transparent 1px 3px); }
.intel-terminal.f-synod { --f: var(--synod); }
.intel-terminal.f-native { --f: var(--native); }
.intel-terminal > .wrap > .term-bar { border: 1px solid color-mix(in srgb, var(--f) 35%, transparent); border-bottom: 0; }
.intel-terminal .term-bar .stamp { font-size: .6rem; padding: 2px 7px; }
.term-grid { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(300px, 1fr); border: 1px solid color-mix(in srgb, var(--f) 35%, transparent); background: rgba(3, 4, 8, .92); }
.intel-terminal .stage { --hud: var(--f); aspect-ratio: 3 / 2; }
.intel-terminal .stage-media img { transform: scale(1.04); }
.stage-tag { position: absolute; top: 14px; left: 16px; z-index: 3; color: var(--f); font-size: .7rem; background: rgba(0, 0, 0, .55); padding: 3px 8px; }
.intel-terminal .stage figcaption { position: absolute; left: 16px; right: 16px; bottom: 12px; z-index: 3; color: var(--ink-3); font-size: .56rem; }
.readout-panel { padding: clamp(18px, 2.4vw, 30px); border-left: 1px solid color-mix(in srgb, var(--f) 35%, transparent); display: flex; flex-direction: column; }
.readout-panel h1 { font-size: clamp(2rem, 4.2vw, 3.6rem); margin-bottom: 6px; }
.readout-panel .class { color: var(--amber); font-weight: 700; font-size: 1.1rem; margin-bottom: 14px; }
.readout-panel .summary { font-size: 1.02rem; color: var(--ink); line-height: 1.55; margin-top: 4px; }
.withheld { color: var(--amber) !important; font-family: var(--mono); font-size: .86rem !important; letter-spacing: .06em; }
@media (max-width: 1000px) { .term-grid { grid-template-columns: 1fr; } .readout-panel { border-left: 0; border-top: 1px solid color-mix(in srgb, var(--f) 35%, transparent); } }

.modules { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px; margin-top: 18px; margin-bottom: 18px; }
.module { background: var(--panel); border: 1px solid var(--line); padding: 16px 18px 12px; }
.module.wide { grid-column: 1 / -1; }
.mod-h { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; font-size: .7rem; color: var(--ink-3); font-weight: 600; text-transform: uppercase; letter-spacing: .16em; }
.mod-h::before { content: ""; width: 8px; height: 8px; background: var(--accent); flex: 0 0 auto; }
.mod-h a { color: var(--ink-2); }
.rows { list-style: none; margin: 0; padding: 0; }
.rows li { display: grid; grid-template-columns: 30px 1fr; gap: 0 10px; padding: 9px 0; border-top: 1px dashed var(--line); }
.rows li:first-child { border-top: 0; }
.row-n { color: var(--accent); font-size: .64rem; padding-top: 4px; grid-row: span 2; }
.row-t { font-weight: 800; }
.row-d { color: var(--ink-2); font-size: .95rem; }
.tactical { margin: 0; padding: 12px 14px; border-left: 3px solid var(--amber); background: rgba(255, 181, 71, .07); color: var(--ink); font-size: 1.05rem; font-weight: 600; }
.phases { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 2px; counter-reset: p; }
.phases li { padding: 12px 14px; background: rgba(255, 255, 255, .02); border-top: 2px solid var(--accent); color: var(--ink-2); }
.phases .mono { display: block; color: var(--accent); margin-bottom: 4px; }
@media (max-width: 760px) { .modules { grid-template-columns: 1fr; } }

.field { margin-bottom: 18px; }
.field-frame { margin: 0; --hud: var(--accent); }
.field-media img { width: 100%; aspect-ratio: 21 / 9; object-fit: cover; }
.adjacent { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; margin-bottom: 18px; }
.adj { --f: var(--hostile); position: relative; display: grid; grid-template-columns: 160px 1fr; grid-template-rows: auto auto; align-content: center; gap: 2px 16px;
  padding: 10px; background: var(--panel); border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.adj.f-synod { --f: var(--synod); } .adj.f-native { --f: var(--native); }
.adj .adj-media { grid-row: span 2; }
.adj .adj-media img, .adj .no-visual { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; min-height: 0; }
.adj .mono { align-self: end; color: var(--f); font-size: .62rem; }
.adj-name { font-weight: 900; text-transform: uppercase; font-size: 1.1rem; align-self: start; }
.adj.next { grid-column: 2; }
.adj:hover { border-color: var(--f); }
.kin { margin-bottom: 18px; }
@media (max-width: 700px) { .adjacent { grid-template-columns: 1fr; } .adj.next { grid-column: auto; } .adj { grid-template-columns: 110px 1fr; } }

/* ---------- breadcrumbs, notes ---------- */
.crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 12px 0 0; margin: 0; font-family: var(--mono); font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.crumbs li + li::before { content: "/"; margin-right: 6px; }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { color: var(--amber); }
.clearance { margin: 12px 0 0; padding: 8px 12px; border-left: 3px solid var(--amber); color: var(--amber); font-family: var(--mono); font-size: .64rem; letter-spacing: .12em; text-transform: uppercase; line-height: 1.6; background: rgba(255, 181, 71, .05); }
.sources { padding: 8px var(--gutter) 34px; color: var(--ink-3); font-size: .8rem; }
.sources .mono { color: var(--ink-3); margin-bottom: 4px; }
.sources p { margin: 0; overflow-wrap: anywhere; }
.no-visual { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 24px; text-align: center; min-height: 200px;
  background: repeating-linear-gradient(-45deg, rgba(255, 255, 255, .035) 0 8px, transparent 8px 16px), #080808; color: var(--ink-2); }
.no-visual .mono { font-size: .76rem; color: var(--ink); }

/* =====================================================================================================
   Legacy page styles (games, game page, worlds, factions, intel index, press). Kept working in the new
   language until those templates are rebuilt after the prototype review.
   ===================================================================================================== */
.section { padding: var(--band) 0; }
.section.tight { padding: calc(var(--band) * .7) 0; }
.section-head { max-width: 780px; margin-bottom: 22px; }
.section-head .intro, .intro { color: var(--ink-2); font-size: 1.06rem; }
.more { margin-top: 20px; }
.page-head { padding: clamp(44px, 8vw, 96px) 0 4px; background: radial-gradient(ellipse at 20% 0%, rgba(255, 181, 71, .1), transparent 60%); }
.h-small { font-size: .9rem; font-family: var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--ink-3); }
.feature-row { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(20px, 4vw, 56px); align-items: center; margin: 0 0 clamp(26px, 4vw, 48px); }
.feature-row.flip .feature-media { order: 2; }
.feature-media img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.feature-text h3 { font-size: clamp(1.4rem, 2.6vw, 2rem); }
.feature-text p { color: var(--ink-2); }
.gc-panel { aspect-ratio: 16 / 9; display: grid; place-content: center; text-align: center; gap: 4px; background: radial-gradient(circle at 50% 40%, rgba(255, 181, 71, .2), transparent 60%), var(--bg-2); }
.gc-panel span:first-child { font-size: clamp(4rem, 10vw, 7rem); font-weight: 900; color: var(--amber); line-height: 1; }
.store-opening { font-size: clamp(1.5rem, 3.2vw, 2.4rem); font-weight: 900; line-height: 1.15; text-transform: uppercase; }
.store-closing { text-align: center; font-size: clamp(1.1rem, 2.2vw, 1.5rem); font-weight: 900; text-transform: uppercase; letter-spacing: .06em; color: var(--amber); }
.highlights { color: var(--ink-2); border-top: 1px solid var(--line); padding-top: 14px; line-height: 1.9; }
@media (max-width: 760px) { .feature-row { grid-template-columns: 1fr; } .feature-row.flip .feature-media { order: 0; } }
.rail-wrap { overflow: hidden; }
.world-rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 22%); gap: 2px; list-style: none; margin: 0;
  --rail-pad: max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter)));
  padding: 0 var(--rail-pad) 14px; scroll-padding-inline: var(--rail-pad); overflow-x: auto; scroll-snap-type: x mandatory; }
.world-card { scroll-snap-align: start; }
.world-card a, .world-tile a { position: relative; display: block; overflow: hidden; text-decoration: none; color: var(--ink); background: var(--bg-2); height: 100%; border: 1px solid var(--line); }
.world-card a:hover, .world-tile a:hover { border-color: var(--accent); }
.world-card img { aspect-ratio: 10 / 7; object-fit: cover; width: 100%; }
.world-text { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px 16px; border-top: 3px solid var(--accent); }
.world-text .mono { color: var(--accent); }
.world-text .name { font-weight: 900; font-size: 1.1rem; text-transform: uppercase; }
.world-text .tag { color: var(--ink-2); font-size: .9rem; }
.world-text .boss { color: var(--ink-3); margin-top: 4px; }
.world-tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2px; list-style: none; padding: 0; margin: 0; }
.world-tile img { aspect-ratio: 10 / 6; object-fit: cover; width: 100%; }
@media (max-width: 700px) { .world-tiles { grid-template-columns: 1fr; } .world-rail { grid-auto-columns: 76%; } }
.game-cards { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
.game-card a { position: relative; display: block; overflow: hidden; border: 1px solid var(--line); color: var(--ink); text-decoration: none; isolation: isolate; }
.game-card picture img { width: 100%; aspect-ratio: 21 / 9; object-fit: cover; }
.game-card a::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to right, rgba(4, 7, 14, .92), rgba(4, 7, 14, .2) 70%); z-index: 0; }
.game-card-text { position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; justify-content: center; gap: 10px; padding: clamp(18px, 4vw, 48px); max-width: 560px; }
.game-card-text .card-logo { width: min(320px, 60vw); }
.game-card-text .tag { font-weight: 900; text-transform: uppercase; font-size: clamp(1rem, 2vw, 1.4rem); }
.game-card-text .mono { color: var(--amber); }
.game-card a:hover { border-color: var(--amber); }
@media (max-width: 600px) { .game-card picture img { aspect-ratio: 4 / 5; } .game-card a::after { background: linear-gradient(to top, rgba(4, 7, 14, .95), rgba(4, 7, 14, .2) 70%); } .game-card-text { justify-content: flex-end; } }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); }
table.data { width: 100%; border-collapse: collapse; font-size: .95rem; }
table.data th, table.data td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data thead th { font-family: var(--mono); font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
table.data tbody tr:last-child > * { border-bottom: 0; }
.facts { margin: 0 0 1em; display: grid; }
.facts > div { display: grid; grid-template-columns: minmax(130px, 34%) 1fr; gap: 14px; padding: 9px 0; border-bottom: 1px dashed var(--line-2); }
.facts dt { color: var(--ink-3); font-size: .9rem; }
.facts dd { margin: 0; font-weight: 650; }
.facts.intel dt { font-family: var(--mono); font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; padding-top: 3px; }
.counts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px; list-style: none; padding: 0; margin: 0; }
.counts li { padding: 18px; border: 1px solid var(--line); background: var(--panel); display: flex; flex-direction: column; gap: 6px; }
.counts .mono { overflow-wrap: anywhere; letter-spacing: .08em; }
.counts .num { font-size: clamp(2.2rem, 6vw, 3.4rem); font-weight: 900; line-height: 1; color: var(--amber); }
.h-label { font-family: var(--mono); font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font-weight: 600; }
.h-label::before { content: ""; width: 8px; height: 8px; background: var(--accent); flex: 0 0 auto; }
.hero-world .kicker { color: var(--accent); }
.tagline { font-style: italic; }
.world-brief { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.brief-block { padding: 20px; background: var(--panel); border: 1px solid var(--line); border-top: 3px solid var(--accent); }
.sectors { list-style: none; margin: 0; padding: 0; font-family: var(--mono); letter-spacing: .1em; }
.sectors li { padding: 8px 0; border-bottom: 1px dashed var(--line); }
.sectors li:last-child { border: 0; }
.objective { font-size: 1.3rem; font-weight: 900; text-transform: uppercase; }
.boss-panel { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; align-items: center; margin-bottom: 2px; padding: 16px; border: 1px solid var(--line); background: var(--panel); }
.boss-panel-media { display: block; overflow: hidden; }
.boss-panel-media img, .boss-panel-media .no-visual { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.boss-panel h3 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
.boss-panel h3 a { color: var(--ink); text-decoration: none; }
.boss-panel .mono { color: var(--accent); }
.class { color: var(--amber); font-weight: 650; }
@media (max-width: 760px) { .world-brief, .boss-panel { grid-template-columns: 1fr; } }
.contact-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 2px; list-style: none; padding: 0; margin: 0 0 24px; }
.contact-card a { display: flex; flex-direction: column; gap: 3px; height: 100%; padding: 12px 14px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); text-decoration: none; }
.contact-card a:hover { border-color: var(--amber); }
.contact-card .designation { color: var(--amber); font-size: .64rem; }
.contact-card .name { font-weight: 900; text-transform: uppercase; }
.contact-card .class { color: var(--ink-2); font-weight: 400; font-size: .88rem; }
.contact-card .meta { color: var(--ink-3); font-size: .62rem; margin-top: 4px; }
.intel-scope { margin-bottom: 34px; }
.intel-scope h2 a { color: var(--ink); text-decoration: none; }
.dossier-head { padding: clamp(36px, 6vw, 72px) 0 4px; background: radial-gradient(ellipse at 15% 10%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 55%), repeating-linear-gradient(0deg, rgba(255, 255, 255, .012) 0 1px, transparent 1px 3px); }
.dossier-grid { display: grid; grid-template-columns: minmax(240px, 360px) 1fr; gap: clamp(24px, 5vw, 56px); align-items: start; }
.id-frame { margin: 0; }
.id-frame figcaption { color: var(--ink-3); margin-bottom: 10px; font-size: .66rem; }
.id-frame .frame { position: relative; padding: 8px; border: 1px solid rgba(255, 255, 255, .14); background: #0b0b0b; }
.id-frame img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.id-frame > p { margin-top: 12px; font-size: .66rem; }
.dossier-title h1 { font-size: clamp(2rem, 5vw, 3.8rem); }
.dossier-body > section { margin-bottom: 28px; }
.dossier-body p { color: var(--ink-2); }
.motive p { color: #a8f0ff; }
.intel-bullets { list-style: none; margin: 0; padding: 0; }
.intel-bullets li { position: relative; padding: 8px 0 8px 24px; border-bottom: 1px dashed var(--line); color: var(--ink-2); }
.intel-bullets li::before { content: ""; position: absolute; left: 4px; top: 17px; width: 8px; height: 8px; border: 2px solid var(--accent); transform: rotate(45deg); }
.earlier { margin-top: 12px; padding: 10px 14px; border: 1px dashed var(--line-2); }
.earlier summary { cursor: pointer; color: var(--amber); }
@media (max-width: 800px) { .dossier-grid { grid-template-columns: 1fr; } .id-frame { max-width: 360px; } }
.pagers { display: flex; justify-content: space-between; gap: 2px; padding-bottom: 34px; flex-wrap: wrap; }
.pager { display: flex; flex-direction: column; gap: 2px; padding: 12px 16px; border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 800; text-transform: uppercase; }
.pager .mono { color: var(--ink-3); font-size: .62rem; }
.pager.next { margin-left: auto; text-align: right; }
.pager:hover { border-color: var(--accent); }
.press-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 56px); }
.press-grid h2 { font-size: 1.5rem; }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; list-style: none; padding: 0; margin: 18px 0 0; }
.gallery a { display: block; overflow: hidden; border: 1px solid var(--line); }
.gallery img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.gallery a:hover { border-color: var(--amber); }
.gallery p { margin: 6px 0 10px; }
.logo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; list-style: none; padding: 0; margin: 0; }
.logo-grid a { display: flex; flex-direction: column; gap: 6px; padding: 14px; border: 1px solid var(--line); color: var(--ink); text-decoration: none; background: var(--panel); height: 100%; }
.logo-grid a:hover { border-color: var(--amber); }
.logo-swatch { display: grid; place-items: center; height: 130px; background: #03060c; padding: 14px; }
.logo-swatch img { max-height: 100px; width: auto; }
@media (max-width: 860px) { .press-grid { grid-template-columns: 1fr; } .gallery { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .gallery, .logo-grid { grid-template-columns: 1fr; } }
.faction-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2px; list-style: none; padding: 0; margin: 0; }
.faction-cards.wide { grid-template-columns: repeat(3, 1fr); }
.faction-card a { display: flex; flex-direction: column; gap: 3px; height: 100%; padding: 12px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); text-decoration: none; }
.faction-card a:hover { border-color: var(--hostile); }
.faction-card .portrait img { aspect-ratio: 4 / 5; object-fit: cover; width: 100%; margin-bottom: 10px; }
.faction-card .mono { color: var(--hostile); }
.faction-card .name { font-weight: 900; font-size: 1.1rem; text-transform: uppercase; }
.faction-card .status { color: var(--amber); font-family: var(--mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; }
.native-mark { display: block; aspect-ratio: 4 / 5; margin-bottom: 10px; background: radial-gradient(circle at 50% 45%, rgba(255, 95, 192, .45), transparent 55%), #0b0614; }
@media (max-width: 860px) { .faction-cards.wide { grid-template-columns: repeat(2, 1fr); } }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--void); padding: 30px 0 36px; }
.footer-inner { display: grid; grid-template-columns: 1fr auto; gap: 16px 40px; align-items: center; }
.footer-brand { display: flex; align-items: center; gap: 16px; }
.footer-brand img { width: 78px; height: auto; }
.footer-brand p { margin: 0; color: var(--ink-2); font-size: .88rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 20px; list-style: none; margin: 0; padding: 0; }
.footer-links a { color: var(--ink-2); text-decoration: none; font-weight: 700; font-size: .76rem; letter-spacing: .14em; text-transform: uppercase; }
.footer-links a:hover { color: var(--amber); }
.fine { grid-column: 1 / -1; margin: 0; color: var(--ink-3); font-size: .74rem; }
@media (max-width: 760px) { .footer-inner { grid-template-columns: 1fr; } .footer-brand { flex-direction: column; align-items: flex-start; } }

.notfound { min-height: 60vh; }

/* adjacent bands share one gap */
.threat + .fleet, .fleet + .factions-band { padding-top: calc(var(--band) * .6); }

/* ---------------------------------------------------------------- Universe records + Chronicles (Pass 004A) */
.crosslink { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg-2); margin: var(--band) 0 0; }
.crosslink-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; padding-top: 22px; padding-bottom: 22px; }
.crosslink h2 { font-size: clamp(1.4rem, 2.6vw, 2rem); margin-bottom: 4px; }
.crosslink p:last-child { margin: 0; color: var(--ink-2); }

.records { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.record { background: var(--bg); }
.record a { display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 16px 18px; color: var(--ink); text-decoration: none; }
.record.has-media a { padding: 0 0 16px; }
.record.has-media .record-name, .record.has-media .record-sum { padding: 0 18px; }
.record-media img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.record-name { font-weight: 900; text-transform: uppercase; font-size: 1.1rem; line-height: 1.1; }
.record-sum { color: var(--ink-2); font-size: .92rem; }
.record a:hover, .record a:focus-visible { background: var(--bg-2); }
.record a:hover .record-name { color: var(--cyan); }

.b-article { padding-top: 18px; padding-bottom: 8px; font-size: 1.04rem; }
.b-article > p, .b-chapter > p { color: var(--ink); line-height: 1.7; }
.b-h { font-size: clamp(1.25rem, 2.2vw, 1.6rem); margin-top: 1.4em; }
.b-quote { margin: 1.4em 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--amber); }
.b-quote p { font-size: 1.15rem; font-style: italic; margin-bottom: 6px; }
.b-quote footer { color: var(--ink-3); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; }
.b-transmission { margin: 1.4em 0; border: 1px solid var(--line-2); background: var(--panel); }
.b-transmission-text { margin: 0; padding: 14px 16px; font-family: var(--mono); font-size: .92rem; line-height: 1.6; color: var(--ink); white-space: pre-line; }
.b-image { margin: 1.6em 0; }
.b-image figcaption { padding: 8px 0 0; color: var(--ink-3); font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; }
.b-divider { border: 0; height: 1px; margin: 2em 0; background: linear-gradient(90deg, transparent, var(--line-2), transparent); }
.b-embed { margin: 1.2em 0; }
ul.b-embed { padding: 0; max-width: 340px; }
.b-toc { margin-top: 18px; padding: 12px 16px; border: 1px solid var(--line); background: var(--bg-2); }
.b-toc p { margin: 0 0 6px; color: var(--ink-3); font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; }
.b-toc ol { margin: 0; padding-left: 1.4em; }
.b-chapter { padding-top: 10px; scroll-margin-top: 90px; }
.b-chapter + .b-chapter { margin-top: 2em; border-top: 1px solid var(--line); padding-top: 26px; }
.b-chapter-n { margin: 0 0 4px; color: var(--amber); font-size: .66rem; letter-spacing: .16em; text-transform: uppercase; }
.b-meta { margin: 22px 0 0; }
.b-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; }
.b-sources { padding: 18px 0 34px; }
.b-sources ul { margin: 0; padding-left: 1.2em; overflow-wrap: anywhere; }

/* ---------------------------------------------------------------- Chronicles reader (Pass 004B) */
:root { --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, ui-serif, serif; --read: 34em; }
.review-ribbon { margin: 0; padding: 6px var(--gutter); font-size: .62rem; letter-spacing: .16em; text-transform: uppercase; color: #120800; text-align: center;
  background: repeating-linear-gradient(-45deg, var(--amber) 0 12px, #ffc66e 12px 24px); }
.lang-switch.untranslated .to { opacity: .4; text-decoration: line-through; }

/* scene palettes: one colour story per illustration slot */
[data-palette] { --p1: #0b1426; --p2: #66e7ff; --p3: #3a1d5c; }
[data-palette="dawn"] { --p1: #0e1a2e; --p2: #ffcf8a; --p3: #2f6bb0; }
[data-palette="dusk"] { --p1: #120d1c; --p2: #ffb547; --p3: #6a3f8f; }
[data-palette="vectorium"] { --p1: #050913; --p2: #66e7ff; --p3: #8a5cff; }
[data-palette="signal"] { --p1: #04070e; --p2: #b9f4ff; --p3: #2a3f66; }
[data-palette="hull"] { --p1: #07080b; --p2: #ffb547; --p3: #3b3f48; }
[data-palette="threat"] { --p1: #0d0507; --p2: #ff3d50; --p3: #66e7ff; }

.scene-atmos { position: absolute; inset: 0; overflow: hidden; background:
  radial-gradient(120% 80% at 70% 30%, color-mix(in srgb, var(--p3) 55%, transparent), transparent 60%),
  radial-gradient(90% 70% at 20% 85%, color-mix(in srgb, var(--p2) 18%, transparent), transparent 55%),
  linear-gradient(180deg, var(--p1), var(--bg)); }
.atmos-stars { position: absolute; inset: -10%; opacity: .55; background-image:
  radial-gradient(1px 1px at 12% 22%, #fff 99%, transparent), radial-gradient(1px 1px at 68% 14%, #dfefff 99%, transparent),
  radial-gradient(1.5px 1.5px at 38% 64%, #fff 99%, transparent), radial-gradient(1px 1px at 84% 72%, #cfe6ff 99%, transparent),
  radial-gradient(1px 1px at 52% 38%, #fff 99%, transparent), radial-gradient(1px 1px at 24% 88%, #e9f3ff 99%, transparent);
  background-size: 340px 260px; }
.atmos-glow { position: absolute; left: 50%; top: 46%; width: 70vmin; height: 70vmin; transform: translate(-50%, -50%); border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--p2) 22%, transparent), transparent 65%); filter: blur(12px); }
.atmos-signal { position: absolute; left: 0; right: 0; top: 50%; height: 2px; transform: translateY(-50%);
  background: linear-gradient(90deg, transparent, var(--p2) 20%, var(--p2) 80%, transparent); opacity: .7;
  mask-image: repeating-linear-gradient(90deg, #000 0 14px, transparent 14px 18px); -webkit-mask-image: repeating-linear-gradient(90deg, #000 0 14px, transparent 14px 18px); }

/* chapter hero */
.ch-hero { position: relative; isolation: isolate; min-height: calc(100vh - 58px); min-height: calc(100svh - 58px); display: flex; align-items: flex-end;
  overflow: hidden; background: var(--p1); }
.ch-hero .scene-hero { position: absolute; inset: 0; margin: 0; z-index: -2; }
.scene-hero picture, .scene-hero img { width: 100%; height: 100%; object-fit: cover; }
.ch-hero-shade { position: absolute; inset: 0; z-index: -1; background:
  linear-gradient(180deg, rgba(4, 7, 14, .1) 0%, rgba(4, 7, 14, .05) 40%, rgba(4, 7, 14, .78) 78%, var(--bg) 100%),
  linear-gradient(90deg, rgba(4, 7, 14, .55), transparent 60%); }
.ch-hero-text { padding-top: 120px; padding-bottom: clamp(56px, 9vh, 110px); }
.ch-hero-text .kicker { color: var(--p2); }
.ch-hero-text .kicker a { color: inherit; text-decoration: none; }
.ch-label { margin: 0 0 6px; color: var(--ink-2); font-size: .8rem; letter-spacing: .32em; text-transform: uppercase; }
.ch-hero h1 { font-size: clamp(2.8rem, 9vw, 7.4rem); line-height: .92; margin: 0 0 18px; text-shadow: 0 4px 40px rgba(0, 0, 0, .6); max-width: 12ch; }
.ch-meta { margin: 0; color: var(--ink-3); font-size: .7rem; letter-spacing: .18em; text-transform: uppercase; }
.ch-cue { position: absolute; left: 50%; bottom: 22px; width: 28px; height: 44px; margin-left: -14px; border: 1px solid var(--line-2); border-radius: 14px; }
.ch-cue span { position: absolute; left: 50%; top: 9px; width: 2px; height: 8px; margin-left: -1px; background: var(--p2); }
.scene-note { position: absolute; left: var(--gutter); bottom: 14px; z-index: 3; max-width: calc(100% - 2 * var(--gutter)); padding: 5px 9px;
  font-size: .6rem; letter-spacing: .14em; text-transform: uppercase; color: var(--amber); background: rgba(4, 7, 14, .78); border: 1px dashed rgba(255, 181, 71, .6); }
.ch-hero .scene-note { top: 14px; bottom: auto; }

/* reading column */
.reader { padding: clamp(28px, 5vw, 64px) var(--gutter) 24px; }
.prose { max-width: var(--read); margin: 0 auto; font-family: var(--serif); font-size: clamp(1.1rem, 1.02rem + .35vw, 1.3rem); line-height: 1.78; color: #dbe3ee;
  font-feature-settings: "kern", "liga", "onum"; hyphens: manual; }
.prose p { margin: 0 0 1.15em; }
.prose em { font-style: italic; color: #f1f5fa; }
.prose strong { color: #fff; font-weight: 700; }
.prose .lede::first-letter { float: left; font-size: 4.1em; line-height: .82; padding: .07em .1em 0 0; color: var(--amber); font-weight: 700; }
.chapter .prose .lede { font-size: 1.08em; }
.b-system { display: flex; gap: 10px; align-items: baseline; margin: 2em 0; padding: 12px 16px; font-family: var(--mono); font-size: .82rem; line-height: 1.5;
  letter-spacing: .14em; text-transform: uppercase; color: #ffd6a0; background: rgba(255, 181, 71, .06); border-left: 3px solid var(--amber); }
.b-system span { color: var(--amber); }
.b-inscription { margin: 2.2em 0; padding: 1.2em 0; text-align: center; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.b-inscription p { margin: 0; font-style: italic; font-size: 1.12em; line-height: 1.6; color: #f3e6cf; }

/* full-bleed scenes inside the prose */
.prose .scene { position: relative; width: 100vw; margin: 3.2em calc(50% - 50vw); background: var(--p1); }
.prose .scene.has-art { aspect-ratio: 16 / 9; max-height: 92vh; }
.prose .scene.has-art picture, .prose .scene.has-art img { width: 100%; height: 100%; object-fit: cover; }
.prose .scene.has-art picture { -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 14%, #000 86%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0, #000 14%, #000 86%, transparent 100%); }
.prose .scene.is-pending { aspect-ratio: 21 / 9; }
.prose .scene.is-pending .scene-atmos, .prose .scene.is-deferred .scene-atmos { -webkit-mask-image: linear-gradient(180deg, transparent, #000 25%, #000 75%, transparent);
  mask-image: linear-gradient(180deg, transparent, #000 25%, #000 75%, transparent); }
.prose .scene.is-deferred { height: 150px; background: transparent; }
.prose .scene.is-deferred .atmos-stars, .prose .scene.is-deferred .atmos-glow { opacity: .25; }
.is-stand-in img { filter: saturate(.3) brightness(.72) contrast(1.05); }
.is-stand-in::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(135deg, color-mix(in srgb, var(--p2) 14%, transparent), color-mix(in srgb, var(--p3) 22%, transparent)); mix-blend-mode: screen; }
.ch-end { max-width: var(--read); margin: 2.4em auto 0; text-align: center; color: var(--ink-3); font-size: .72rem; letter-spacing: .3em; text-transform: uppercase; }
.ch-end span { color: var(--amber); }

/* progress */
.reader-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60; pointer-events: none; }
.reader-progress span { display: block; height: 100%; width: 100%; transform-origin: 0 50%; transform: scaleX(var(--progress, 0));
  background: linear-gradient(90deg, var(--amber), var(--cyan)); }

/* chapter navigation */
.ch-nav { padding: 28px 0 48px; border-top: 1px solid var(--line); }
.ch-pagers { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); margin-bottom: 28px; }
.ch-pager { position: relative; display: flex; flex-direction: column; gap: 6px; padding: clamp(18px, 3vw, 34px); text-decoration: none; color: var(--ink); overflow: hidden;
  background: radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--p3, #2a3f66) 45%, transparent), transparent 60%), var(--bg-2); }
.ch-pager.next { text-align: right; align-items: flex-end; }
.ch-pager .mono { font-size: .66rem; letter-spacing: .18em; text-transform: uppercase; color: var(--p2, var(--cyan)); }
.ch-pager-title { font-weight: 900; text-transform: uppercase; font-size: clamp(1.2rem, 2.6vw, 2rem); line-height: 1; }
.ch-pager:hover .ch-pager-title, .ch-pager:focus-visible .ch-pager-title { color: var(--amber); }
.ch-toc { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 8px 24px; }
.ch-toc a { display: flex; gap: 10px; padding: 8px 0; color: var(--ink-2); text-decoration: none; border-bottom: 1px dashed var(--line); }
.ch-toc a .mono { color: var(--ink-3); }
.ch-toc a[aria-current] { color: var(--amber); }

/* volume landing + series */
.vol-hero { position: relative; isolation: isolate; overflow: hidden; min-height: min(88vh, 900px); display: flex; align-items: flex-end; }
.vol-hero .scene-atmos { z-index: -1; }
.vol-hero-text { padding-top: 120px; padding-bottom: clamp(40px, 7vh, 80px); }
.vol-hero .kicker { color: var(--p2); }
.vol-hero .kicker a { color: inherit; text-decoration: none; }
.vol-hero h1 { font-size: clamp(3rem, 10vw, 8rem); line-height: .9; margin-bottom: 26px; max-width: 10ch; }
.vol-epigraph { margin: 0 0 22px; max-width: 30em; }
.vol-epigraph p { margin: 0 0 8px; font-family: var(--serif); font-style: italic; font-size: clamp(1.2rem, 2.2vw, 1.6rem); line-height: 1.45; color: #efe3cd; }
.vol-epigraph footer, .vol-meta { color: var(--ink-3); font-size: .68rem; letter-spacing: .18em; text-transform: uppercase; }
.vol-meta { margin: 0 0 18px; }
.vol-contents { padding: 8px 0 52px; }
.toc { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.toc-row a { display: grid; grid-template-columns: auto 1fr auto; gap: clamp(14px, 3vw, 40px); align-items: center; padding: clamp(18px, 3vw, 30px) 0;
  color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); }
.toc-n { font-size: clamp(2.6rem, 6vw, 4.6rem); font-weight: 900; line-height: .9; color: transparent; -webkit-text-stroke: 1px var(--p2); font-variant-numeric: tabular-nums; }
.toc-text { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.toc-k { font-size: .64rem; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-3); }
.toc-title { font-weight: 900; text-transform: uppercase; font-size: clamp(1.3rem, 2.8vw, 2.2rem); line-height: 1; }
.toc-line { font-family: var(--serif); font-style: italic; color: var(--ink-2); max-width: 46em; }
.toc-go { font-size: .66rem; letter-spacing: .18em; text-transform: uppercase; color: var(--p2); white-space: nowrap; }
.toc-row a:hover .toc-title, .toc-row a:focus-visible .toc-title { color: var(--amber); }
.toc-row a:hover .toc-n { color: color-mix(in srgb, var(--p2) 25%, transparent); }
.chron-head { padding: clamp(48px, 8vw, 96px) 0 8px; }
.chron-head .lead { color: var(--ink-2); max-width: 36em; }
.vol-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.vol-card a { position: relative; isolation: isolate; display: flex; align-items: flex-end; min-height: clamp(320px, 46vw, 520px); overflow: hidden;
  color: var(--ink); text-decoration: none; border: 1px solid var(--line); }
.vol-card .scene-hero { position: absolute; inset: 0; margin: 0; z-index: -2; }
.vol-card a::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, transparent 30%, rgba(4, 7, 14, .9)); }
.vol-card .scene-note { top: 12px; bottom: auto; }
.vol-card-text { display: flex; flex-direction: column; gap: 8px; padding: clamp(20px, 4vw, 44px); max-width: 44em; }
.vol-k { font-size: .66rem; letter-spacing: .18em; text-transform: uppercase; color: var(--p2, var(--cyan)); }
.vol-card-title { font-weight: 900; text-transform: uppercase; font-size: clamp(2rem, 6vw, 4.6rem); line-height: .92; }
.vol-card-line { font-family: var(--serif); font-style: italic; font-size: 1.15rem; color: #efe3cd; }
.vol-card a:hover .vol-card-title { color: var(--amber); }

/* reveal + motion (only with JS and when motion is welcome) */
@media (prefers-reduced-motion: no-preference) {
  .js .prose .scene { opacity: 0; transform: scale(1.03); transition: opacity 1.2s ease, transform 1.6s cubic-bezier(.2, .7, .2, 1); }
  .js .prose .scene.is-in { opacity: 1; transform: none; }
  .atmos-glow { animation: atmos-breathe 9s ease-in-out infinite; }
  .atmos-stars { animation: atmos-drift 120s linear infinite; }
  .atmos-signal { animation: atmos-pulse 2.6s ease-in-out infinite; }
  .ch-cue span { animation: cue 1.8s ease-in-out infinite; }
  .ch-hero .scene-hero img { animation: hero-drift 40s ease-in-out infinite alternate; }
}
@keyframes atmos-breathe { 50% { opacity: .55; transform: translate(-50%, -50%) scale(1.12); } }
@keyframes atmos-drift { to { transform: translate3d(-340px, 0, 0); } }
@keyframes atmos-pulse { 50% { opacity: .2; } }
@keyframes cue { 0% { transform: translateY(0); opacity: 1; } 80% { transform: translateY(16px); opacity: 0; } 100% { opacity: 0; } }
@keyframes hero-drift { to { transform: scale(1.06) translate3d(-1%, 0, 0); } }

@media (max-width: 700px) {
  .prose .scene.has-art { aspect-ratio: 4 / 5; }
  .prose .scene.is-pending { aspect-ratio: 3 / 2; }
  .ch-pagers { grid-template-columns: 1fr; }
  .ch-pager.next { text-align: left; align-items: flex-start; }
  .toc-row a { grid-template-columns: auto 1fr; }
  .toc-go { display: none; }
  .ch-hero h1 { max-width: none; }
}
@media (max-width: 440px) { .site-nav .idx { display: none; } .site-nav a { padding: 8px 4px; } }
@media print { .reader-progress, .ch-cue, .scene, .review-ribbon { display: none !important; } .prose { color: #000; } }
