/* =====================================================================
   THE ABHINANDAN CINEMATIC UNIVERSE
   Visual system: dark cinema, metallic surfaces, red + electric blue,
   gold reserved for honors. Dark theme only, by design.
   ===================================================================== */

:root {
  --bg: #05060a;
  --bg-2: #090c13;
  --navy: #0b1322;
  --panel: rgba(13, 19, 31, 0.72);
  --panel-solid: #0d131f;
  --line: rgba(150, 180, 255, 0.12);
  --line-strong: rgba(150, 180, 255, 0.24);
  --text: #eef1f6;
  --text-2: #c3cad6;
  --muted: #8790a1;
  --dim: #5b6475;

  --red: #e2232f;
  --red-2: #ff4655;
  --red-glow: rgba(226, 35, 47, 0.45);
  --blue: #3fb8ff;
  --blue-2: #8edcff;
  --blue-glow: rgba(63, 184, 255, 0.4);
  --gold: #d9b25f;
  --gold-2: #f3d896;
  --lab: #41f0c8;
  --amber: #ffb547;

  --metal: linear-gradient(180deg, #ffffff 0%, #c9d0db 38%, #7c8594 52%, #e6eaf0 70%, #9aa3b1 100%);
  --metal-red: linear-gradient(180deg, #ff9aa1 0%, #ff4655 40%, #a30f1b 60%, #ff5c69 100%);

  --f-display: "Bebas Neue", "Oswald", Impact, sans-serif;
  --f-body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "Cascadia Code", monospace;
  --f-comic: "Bangers", "Bebas Neue", Impact, sans-serif;
  --f-engrave: "Cinzel", Georgia, serif;

  --gutter: clamp(16px, 4vw, 56px);
  --maxw: 1240px;
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
  --ease-cine: cubic-bezier(0.77, 0, 0.18, 1);
  --header-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  background: var(--bg);
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  scrollbar-gutter: stable; /* keeps the page from jumping sideways when the intro's scroll lock is released */
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.intro-active { overflow: hidden; }
body.modal-open { overflow: hidden; }

img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul, ol { list-style: none; }
kbd { font-family: var(--f-mono); }

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection { background: var(--red); color: #fff; }

.mono { font-family: var(--f-mono); letter-spacing: 0.08em; font-size: 0.72rem; text-transform: uppercase; }
.dim { color: var(--dim); }
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); position: relative; }

.skip-link {
  position: fixed; left: 16px; top: -60px; z-index: 1000;
  background: var(--red); color: #fff; padding: 10px 16px; border-radius: 6px;
  font-weight: 700; transition: top .2s;
}
.skip-link:focus { top: 16px; }

.noscript {
  position: fixed; inset: auto 16px 16px 16px; z-index: 999;
  background: var(--panel-solid); border: 1px solid var(--red); padding: 16px; border-radius: 8px;
}

/* ---------------------------------------------------------------------
   Atmosphere layers
   --------------------------------------------------------------------- */
.fx-grain {
  position: fixed; inset: -100px; z-index: 80; pointer-events: none; opacity: 0.045;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 1.2 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 0.9s steps(5) infinite;
  will-change: transform;
}
@keyframes grain {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-30px, 20px); }
  40% { transform: translate(25px, -35px); }
  60% { transform: translate(-15px, 40px); }
  80% { transform: translate(35px, 10px); }
  100% { transform: translate(0, 0); }
}
.fx-vignette {
  position: fixed; inset: 0; z-index: 79; pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, 0.55) 100%);
}
.fx-light {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(600px circle at var(--mx, 50%) var(--my, 30%), rgba(63, 184, 255, 0.06), transparent 60%);
  transition: opacity .4s;
}
@media (hover: none) { .fx-light { display: none; } }

.scroll-progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 120; pointer-events: none; }
.scroll-progress i {
  display: block; height: 100%; width: 100%; transform-origin: 0 50%; transform: scaleX(var(--p, 0));
  background: linear-gradient(90deg, var(--red), var(--red-2) 60%, var(--blue));
  box-shadow: 0 0 12px var(--red-glow);
}

/* Comic wipe used for modal transitions */
.wipe {
  position: fixed; inset: 0; z-index: 400; pointer-events: none; opacity: 0;
  background:
    radial-gradient(circle, rgba(226, 35, 47, 0.9) 1.6px, transparent 2px) 0 0 / 12px 12px,
    linear-gradient(115deg, #0a0c12 0%, #120509 100%);
  clip-path: polygon(0 0, 0 0, 0 100%, 0 100%);
}
.wipe.run { animation: wipe 0.62s var(--ease-cine) forwards; }
@keyframes wipe {
  0% { opacity: 1; clip-path: polygon(0 0, 0 0, -20% 100%, -20% 100%); }
  45% { opacity: 1; clip-path: polygon(0 0, 120% 0, 100% 100%, -20% 100%); }
  100% { opacity: 1; clip-path: polygon(120% 0, 120% 0, 100% 100%, 100% 100%); }
}

/* ---------------------------------------------------------------------
   Intro / opening sequence
   --------------------------------------------------------------------- */
.intro {
  position: fixed; inset: 0; z-index: 500; background: #000;
  display: grid; place-items: center; overflow: hidden;
  grid-template-columns: 100%; /* lets the wide title overflow both edges evenly instead of pushing right */
  transition: opacity 0.9s var(--ease), visibility 0.9s;
}
.intro.done { opacity: 0; visibility: hidden; pointer-events: none; }

.intro-boot {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  display: grid; gap: 10px; justify-items: center; color: var(--muted);
  transition: opacity .3s;
}
.intro-pct { font-size: 2.2rem; color: var(--text); letter-spacing: 0.2em; }
.intro-bar { width: 220px; height: 1px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.intro-bar i { display: block; height: 100%; width: 100%; background: var(--red); transform: scaleX(0); transform-origin: 0 50%; }

.intro-reel { position: absolute; inset: 0; opacity: 0; display: grid; place-items: center; }
.intro-reel.on { opacity: 1; }
.intro-reel .reel-frame {
  position: absolute; width: min(64vh, 86vw); aspect-ratio: 2 / 3; opacity: 0;
  filter: contrast(1.25) saturate(1.2);
}
.intro-reel .reel-frame.show { opacity: 1; }
.intro-reel .reel-frame svg { width: 100%; height: 100%; }
.intro-reel::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at center, transparent 30%, #000 85%), linear-gradient(rgba(226, 35, 47, 0.18), rgba(226, 35, 47, 0.18));
  mix-blend-mode: normal;
}

.intro-title {
  position: relative; z-index: 2; text-align: center; opacity: 0;
  display: grid; justify-items: center; gap: 18px;
}
.intro-title.on { opacity: 1; }
.it-kicker { color: var(--muted); letter-spacing: 0.5em; opacity: 0; transition: opacity 1s .2s; }
.intro-title.on .it-kicker { opacity: 1; }
.it-main {
  display: grid; font-family: var(--f-display); line-height: 0.88;
  font-size: clamp(2.6rem, 9vw, 8.4rem);
  letter-spacing: 0.5em; transition: letter-spacing 2.4s var(--ease), filter 1.6s;
  filter: blur(8px);
}
.intro-title.on .it-main { letter-spacing: 0.04em; filter: blur(0); }
.it-main span {
  background: var(--metal); -webkit-background-clip: text; background-clip: text; color: transparent;
  background-size: 100% 220%; animation: metalSweep 3s var(--ease) forwards;
  white-space: nowrap; /* wide starting letter-spacing would otherwise wrap, then snap back to one line mid-animation */
}
.it-main span:last-child { background: var(--metal-red); -webkit-background-clip: text; background-clip: text; background-size: 100% 220%; }
@keyframes metalSweep { from { background-position: 0 100%; } to { background-position: 0 0; } }
.it-flare {
  position: absolute; left: 50%; top: 52%; width: 140%; height: 2px; transform: translate(-50%, -50%) scaleX(0);
  background: linear-gradient(90deg, transparent, rgba(142, 220, 255, 0.9), #fff, rgba(142, 220, 255, 0.9), transparent);
  box-shadow: 0 0 30px 6px rgba(63, 184, 255, 0.45);
  transition: transform 1.2s .5s var(--ease), opacity 1s 1.4s;
}
.intro-title.on .it-flare { transform: translate(-50%, -50%) scaleX(1); opacity: 0; }

.intro-skip {
  position: absolute; right: 20px; bottom: 20px; z-index: 3;
  color: var(--muted); padding: 10px 14px; border: 1px solid var(--line); border-radius: 999px;
  transition: color .2s, border-color .2s;
}
.intro-skip:hover { color: var(--text); border-color: var(--line-strong); }
.intro-skip kbd { margin-left: 8px; padding: 2px 6px; border: 1px solid var(--line); border-radius: 4px; font-size: 0.6rem; }

/* ---------------------------------------------------------------------
   Header / nav
   --------------------------------------------------------------------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 110; height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 0 var(--gutter);
  transition: background .4s, border-color .4s, transform .5s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(5, 6, 10, 0.72);
  -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2);
  border-bottom-color: var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--red); }
.brand-mark { width: 34px; height: 34px; filter: drop-shadow(0 0 8px var(--red-glow)); transition: transform .6s var(--ease); }
.brand:hover .brand-mark { transform: rotate(60deg); }
.brand-text { display: grid; line-height: 1; }
.brand-text b { font-family: var(--f-display); font-size: 1.5rem; letter-spacing: 0.12em; color: var(--text); font-weight: 400; }
.brand-text small { font-family: var(--f-mono); font-size: 0.52rem; letter-spacing: 0.2em; color: var(--muted); }

.nav-list { display: flex; gap: 2px; }
.nav-list a {
  position: relative; display: block; padding: 8px 10px;
  font-family: var(--f-mono); font-size: 0.66rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted); transition: color .25s;
}
.nav-list a::after {
  content: ""; position: absolute; left: 10px; right: 10px; bottom: 2px; height: 1px;
  background: var(--red); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease);
}
.nav-list a:hover, .nav-list a.active { color: var(--text); }
.nav-list a.active::after, .nav-list a:hover::after { transform: scaleX(1); }

.nav-toggle {
  display: none; align-items: center; gap: 10px; padding: 8px 12px;
  border: 1px solid var(--line-strong); border-radius: 999px; color: var(--text);
}
.nav-toggle-bars { display: grid; gap: 5px; width: 18px; }
.nav-toggle-bars i { display: block; height: 1.5px; background: currentColor; transition: transform .3s; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars i:first-child { transform: translateY(3.25px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars i:last-child { transform: translateY(-3.25px) rotate(-45deg); }

.mobile-nav {
  position: fixed; inset: 0; z-index: 105; background: rgba(3, 4, 7, 0.97);
  padding: calc(var(--header-h) + 24px) var(--gutter) 32px; overflow-y: auto;
}
.mobile-nav-tag { color: var(--red-2); margin-bottom: 18px; }
.mobile-nav li { border-bottom: 1px solid var(--line); opacity: 0; transform: translateY(14px); animation: mnIn .5s var(--ease) forwards; animation-delay: calc(var(--i) * 40ms); }
@keyframes mnIn { to { opacity: 1; transform: none; } }
.mobile-nav a { display: flex; align-items: baseline; gap: 14px; padding: 12px 0; font-family: var(--f-display); font-size: 2rem; letter-spacing: 0.03em; }
.mobile-nav a span { font-family: var(--f-mono); font-size: 0.7rem; color: var(--red-2); letter-spacing: 0.1em; }

.hud-status {
  position: fixed; left: 20px; bottom: 16px; z-index: 100; pointer-events: none;
  display: flex; align-items: center; gap: 8px; font-size: 0.6rem; color: var(--dim);
  opacity: 0; transition: opacity .6s;
}
.hud-status.on { opacity: 1; }
.hud-dot { width: 6px; height: 6px; border-radius: 50%; background: #3ef08a; box-shadow: 0 0 8px #3ef08a; animation: pulse 2s infinite; }
.hud-sep { color: rgba(255, 255, 255, 0.15); }
#hudChapter { color: var(--muted); }
@keyframes pulse { 50% { opacity: .35; } }

/* ---------------------------------------------------------------------
   Buttons
   --------------------------------------------------------------------- */
.btn {
  position: relative; display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 20px; border-radius: 4px; overflow: hidden;
  font-family: var(--f-mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 500;
  transition: transform .3s var(--ease), box-shadow .3s, background .3s, border-color .3s, color .3s;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}
.btn svg { width: 16px; height: 16px; flex: none; }
.btn-primary { background: linear-gradient(180deg, #ef2a37, #b3121e); color: #fff; box-shadow: 0 10px 30px -10px var(--red-glow); }
.btn-primary::before {
  content: ""; position: absolute; inset: 0; transform: translateX(-120%);
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.35) 50%, transparent 70%);
  transition: transform .7s var(--ease);
}
.btn-primary:hover::before { transform: translateX(120%); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -12px var(--red-glow); }
.btn-ghost { border: 1px solid var(--line-strong); color: var(--text-2); background: rgba(255, 255, 255, 0.02); }
.btn-ghost:hover { color: #fff; border-color: var(--blue); box-shadow: inset 0 0 20px rgba(63, 184, 255, 0.12); }

/* ---------------------------------------------------------------------
   HERO
   --------------------------------------------------------------------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh; overflow: hidden;
  display: grid; align-items: center;
  background:
    radial-gradient(ellipse 70% 60% at 72% 46%, rgba(30, 60, 120, 0.35), transparent 70%),
    radial-gradient(ellipse 50% 50% at 64% 40%, rgba(226, 35, 47, 0.16), transparent 70%),
    linear-gradient(180deg, #03040a 0%, #070a12 60%, #05060a 100%);
}
.hero-particles { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.hero-beams { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.hero-beams i {
  position: absolute; top: -20%; width: 22vw; height: 140%; left: 58%;
  background: linear-gradient(180deg, rgba(142, 220, 255, 0.10), transparent 70%);
  filter: blur(30px); transform-origin: top center; transform: rotate(18deg);
  animation: beam 14s ease-in-out infinite alternate;
}
.hero-beams i:nth-child(2) { left: 72%; width: 10vw; transform: rotate(-12deg); animation-duration: 18s; background: linear-gradient(180deg, rgba(255, 70, 85, 0.10), transparent 70%); }
.hero-beams i:nth-child(3) { left: 40%; width: 8vw; transform: rotate(28deg); animation-duration: 22s; opacity: .6; }
@keyframes beam { to { transform: rotate(4deg) translateX(4vw); opacity: .5; } }

.letterbox { position: absolute; left: 0; right: 0; height: var(--lb, 0px); background: #000; z-index: 6; pointer-events: none; }
.lb-top { top: 0; }
.lb-bottom { bottom: 0; }

.hero-inner {
  position: relative; z-index: 3; width: 100%; max-width: 1360px; margin: 0 auto;
  padding: calc(var(--header-h) + 24px) var(--gutter) 120px;
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: center; gap: 24px;
  will-change: transform, opacity;
}

.hero-file { color: var(--muted); display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.rec-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red-2); box-shadow: 0 0 10px var(--red-2); animation: pulse 1.4s infinite; }

.hero-name {
  font-family: var(--f-display); font-weight: 400; line-height: 0.84;
  font-size: clamp(4rem, 11.5vw, 10.5rem); letter-spacing: 0.01em; text-transform: uppercase;
}
.hn-line { display: block; overflow: hidden; padding-top: 0.04em; }
.hn-line > span {
  display: inline-block; transform: translateY(105%);
  background: var(--metal); -webkit-background-clip: text; background-clip: text; color: transparent;
  background-size: 100% 200%; background-position: 0 100%;
  transition: transform 1.2s var(--ease), background-position 2.4s var(--ease);
}
.hn-line:nth-child(2) > span { transition-delay: .12s; }
.is-live .hn-line > span { transform: none; background-position: 0 0; }

.hero-roles { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 22px; font-family: var(--f-display); font-size: clamp(1.3rem, 2.3vw, 2rem); letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-2); }
.hero-roles span:nth-child(1) { color: var(--red-2); }
.hero-roles span:nth-child(3) { color: var(--blue-2); }
.hero-tagline { margin-top: 18px; font-size: clamp(1.05rem, 1.6vw, 1.3rem); color: var(--text-2); max-width: 36ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

.hero-art { position: relative; margin: 0; }
.hero-art-svg { width: 100%; aspect-ratio: 6 / 7; }
.hero-art-svg svg { width: 100%; height: 100%; overflow: visible; }
.hero-art-tag {
  position: absolute; right: 4%; bottom: 8%; display: grid; gap: 4px; text-align: right;
  font-size: 0.58rem; color: var(--muted); padding: 10px 12px; border-right: 1px solid var(--red);
  background: linear-gradient(270deg, rgba(5, 6, 10, 0.7), transparent);
}
.tag-live { color: var(--red-2); }

.seq { opacity: 0; transform: translateY(18px); transition: opacity 1s var(--ease), transform 1s var(--ease); transition-delay: calc(var(--d) * 220ms); }
.hero-art.seq { transform: scale(1.04); filter: blur(6px); transition: opacity 1.6s var(--ease), transform 2.4s var(--ease), filter 1.6s; transition-delay: calc(var(--d) * 220ms); }
.is-live .seq { opacity: 1; transform: none; }
.is-live .hero-art.seq { filter: none; }

.hero-scroll {
  position: absolute; left: 50%; bottom: 64px; z-index: 7; transform: translateX(-50%);
  display: grid; justify-items: center; gap: 8px; color: var(--text-2);
}
.is-live .hero-scroll.seq { transform: translateX(-50%); }
.hero-scroll.seq { transform: translate(-50%, 18px); }
.hero-scroll .mono { letter-spacing: 0.4em; font-size: 0.64rem; }
.hero-scroll-line { width: 1px; height: 38px; background: rgba(255, 255, 255, 0.12); overflow: hidden; }
.hero-scroll-line i { display: block; width: 100%; height: 50%; background: var(--red-2); animation: scrollLine 1.8s var(--ease) infinite; }
.hero-scroll-arrow { font-size: 0.9rem; color: var(--red-2); }
@keyframes scrollLine { from { transform: translateY(-100%); } to { transform: translateY(200%); } }

.hero-ticker {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 7; height: 36px; overflow: hidden;
  border-top: 1px solid var(--line); background: rgba(3, 4, 8, 0.75);
  display: flex; align-items: center;
}
.ticker-track { display: flex; gap: 0; white-space: nowrap; animation: ticker 48s linear infinite; color: var(--muted); font-size: 0.62rem; }
.ticker-track span { padding: 0 22px; display: inline-flex; align-items: center; gap: 22px; }
.ticker-track span::after { content: ""; width: 5px; height: 5px; background: var(--red); transform: rotate(45deg); }
.ticker-track b { color: var(--text-2); font-weight: 500; }
@keyframes ticker { to { transform: translateX(-50%); } }

/* HUD animation classes inside SVGs */
.spin { transform-box: fill-box; transform-origin: center; animation: spin 40s linear infinite; }
.spin-fast { transform-box: fill-box; transform-origin: center; animation: spin 14s linear infinite; }
.spin-rev { transform-box: fill-box; transform-origin: center; animation: spin 28s linear infinite reverse; }
.float-a { animation: floatY 7s ease-in-out infinite; }
.float-b { animation: floatY 9s ease-in-out infinite reverse; }
.blink { animation: blink 1.1s steps(2) infinite; }
.flick { animation: flick 4s infinite; }
.dash-flow { animation: dashFlow 2.2s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes floatY { 50% { transform: translateY(-10px); } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes flick { 0%, 92%, 100% { opacity: 1; } 94% { opacity: .3; } 96% { opacity: .9; } 97% { opacity: .2; } }
@keyframes dashFlow { to { stroke-dashoffset: -40; } }

/* ---------------------------------------------------------------------
   Sections, chapter title cards
   --------------------------------------------------------------------- */
.section { position: relative; padding: clamp(96px, 14vw, 180px) 0; z-index: 2; }
.section::before {
  content: ""; position: absolute; top: 0; left: 50%; width: min(var(--maxw), 92%); height: 1px; transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, var(--line-strong), transparent);
}

.chapter-head { margin-bottom: clamp(48px, 7vw, 88px); max-width: 980px; }
.chapter-tag { display: flex; align-items: center; gap: 12px; color: var(--red-2); margin-bottom: 22px; }
.chapter-tag svg { width: 16px; height: 16px; }
.chapter-tag .tag-line { flex: 0 0 48px; height: 1px; background: currentColor; opacity: .5; transform: scaleX(0); transform-origin: left; transition: transform 1s .3s var(--ease); }
.in .chapter-tag .tag-line, .chapter-tag.in .tag-line { transform: scaleX(1); }
.chapter-tag.gold { color: var(--gold); }
.chapter-tag.lab { color: var(--lab); }

.chapter-title {
  font-family: var(--f-display); font-weight: 400; text-transform: uppercase;
  font-size: clamp(2.7rem, 7.4vw, 6.4rem); line-height: 0.9; letter-spacing: 0.01em;
}
.chapter-title .line { display: block; overflow: hidden; padding-top: 0.05em; }
.chapter-title .line > span { display: inline-block; transform: translateY(105%) skewY(4deg); transition: transform 1.1s var(--ease); }
.chapter-title .line:nth-child(2) > span { transition-delay: .12s; }
.in .chapter-title .line > span { transform: none; }
.chapter-title .accent > span { background: var(--metal-red); -webkit-background-clip: text; background-clip: text; color: transparent; }
.chapter-title .lab-accent > span { color: var(--lab); text-shadow: 0 0 30px rgba(65, 240, 200, 0.25); }
.chapter-title .gold-accent > span { background: linear-gradient(180deg, #fff3cf, var(--gold) 55%, #8a6a2a); -webkit-background-clip: text; background-clip: text; color: transparent; }
.chapter-lede { margin-top: 24px; color: var(--text-2); max-width: 60ch; font-size: 1.05rem; }

.reveal { opacity: 0; transform: translateY(36px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.chapter-head.reveal { opacity: 1; transform: none; }

.sub-head { margin-bottom: 28px; }
.sub-head .mono { color: var(--blue-2); margin-bottom: 8px; }
.sub-head h3 { font-family: var(--f-display); font-weight: 400; font-size: clamp(2rem, 4vw, 3.2rem); letter-spacing: 0.02em; line-height: 1; }

/* HUD frame utility */
.hud-frame { position: relative; }
.hud-frame::before, .hud-frame::after {
  content: ""; position: absolute; width: 14px; height: 14px; pointer-events: none;
  border: 1.5px solid var(--hud-c, var(--blue)); opacity: .8;
}
.hud-frame::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.hud-frame::after { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }

/* ---------------------------------------------------------------------
   POSTER component
   --------------------------------------------------------------------- */
.poster {
  --acc: var(--red-2);
  position: relative; aspect-ratio: 2 / 3; overflow: hidden; border-radius: 6px;
  background: #07080d; container-type: inline-size; isolation: isolate;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.06);
  transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .5s var(--ease), box-shadow .5s;
}
.poster[data-acc="blue"] { --acc: var(--blue-2); }
.poster[data-acc="gold"] { --acc: var(--gold-2); }
.poster[data-acc="lab"] { --acc: var(--lab); }
.poster[data-acc="gray"] { --acc: #b9c0cc; }
.poster[data-acc="amber"] { --acc: var(--amber); }
.poster-art { position: absolute; inset: 0; }
.poster-art svg { width: 100%; height: 100%; }
.poster-art::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.35) 0%, transparent 18%, transparent 52%, rgba(3, 4, 7, 0.92) 82%, #030407 100%);
}
.poster-glare {
  position: absolute; inset: 0; z-index: 4; pointer-events: none; opacity: 0; transition: opacity .4s;
  background: radial-gradient(circle at var(--gx, 50%) var(--gy, 30%), rgba(255, 255, 255, 0.22), transparent 45%);
  mix-blend-mode: overlay;
}
.poster:hover .poster-glare { opacity: 1; }
.poster-top {
  position: absolute; top: 0; left: 0; right: 0; z-index: 3; display: flex; justify-content: space-between;
  padding: 5cqw 6cqw; font-family: var(--f-mono); font-size: max(9px, 2.6cqw); letter-spacing: 0.18em; color: rgba(255, 255, 255, 0.75);
}
.poster-body { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; padding: 0 6cqw 5.5cqw; text-align: center; }
.poster-kicker { font-family: var(--f-mono); font-size: max(8px, 2.3cqw); letter-spacing: 0.32em; color: var(--acc); margin-bottom: 2.4cqw; }
.poster-title {
  font-family: var(--f-display); font-weight: 400; line-height: 0.86; text-transform: uppercase;
  font-size: 16cqw; letter-spacing: 0.02em;
  background: var(--metal); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.6));
}
.poster-title.long { font-size: 12.5cqw; }
.poster-sub { margin-top: 2.6cqw; font-size: max(10px, 3.4cqw); color: var(--text-2); line-height: 1.35; }
.billing {
  margin-top: 3.4cqw; font-family: var(--f-display); font-size: max(7px, 2.3cqw); letter-spacing: 0.06em; line-height: 1.2;
  color: rgba(255, 255, 255, 0.42); text-transform: uppercase; transform: scaleY(1.25);
}
.billing b { color: rgba(255, 255, 255, 0.7); font-weight: 400; }
.poster-date { margin-top: 2.4cqw; font-family: var(--f-display); font-size: 5cqw; letter-spacing: 0.2em; color: var(--acc); }
.poster-stamp {
  position: absolute; top: 18%; right: -2%; z-index: 4; transform: rotate(-8deg);
  font-family: var(--f-mono); font-weight: 700; font-size: 4.2cqw; letter-spacing: 0.2em; color: #c9cdd6;
  border: 3px solid #c9cdd6; padding: 1.4cqw 3cqw; opacity: .85; mix-blend-mode: screen;
}

.status {
  display: inline-flex; align-items: center; gap: 7px; padding: 4px 10px; border-radius: 2px;
  font-family: var(--f-mono); font-size: 0.62rem; letter-spacing: 0.14em; text-transform: uppercase;
  border: 1px solid currentColor; white-space: nowrap;
}
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.status.s-active { color: #3ef08a; }
.status.s-active::before { animation: pulse 1.4s infinite; }
.status.s-live { color: var(--blue-2); }
.status.s-live::before { animation: pulse 1.4s infinite; }
.status.s-complete { color: var(--gold-2); }
.status.s-archived { color: #9aa1ad; }
.status.s-archived::before { box-shadow: none; }
.status.s-experimental { color: var(--amber); }
.status.s-concept { color: #c39bff; }
.status.s-prototype { color: var(--red-2); }
.status.s-progress { color: var(--blue-2); }
.status.s-classified { color: var(--red-2); }

/* ---------------------------------------------------------------------
   ORIGIN
   --------------------------------------------------------------------- */
.origin-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.origin-poster { position: sticky; top: calc(var(--header-h) + 24px); }
.origin-poster .poster { width: 100%; }

.origin-dossier { background: linear-gradient(180deg, rgba(14, 20, 33, 0.75), rgba(8, 11, 19, 0.6)); border: 1px solid var(--line); padding: clamp(22px, 3vw, 38px); border-radius: 4px; }
.dossier-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-bottom: 16px; border-bottom: 1px dashed var(--line-strong); color: var(--red-2); }
.dossier { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; }
.dossier > div { padding: 16px 0; border-bottom: 1px solid var(--line); }
.dossier > div:nth-child(odd) { padding-right: 18px; }
.dossier > div.wide { grid-column: 1 / -1; }
.dossier dt { font-family: var(--f-mono); font-size: 0.62rem; letter-spacing: 0.18em; color: var(--muted); margin-bottom: 4px; }
.dossier dd { font-family: var(--f-display); font-size: clamp(1.3rem, 2vw, 1.7rem); letter-spacing: 0.03em; line-height: 1.1; }
.dossier dd.small { font-family: var(--f-body); font-size: 1.02rem; letter-spacing: 0; line-height: 1.5; color: var(--text-2); font-weight: 600; }
.dossier dd .type-caret { display: inline-block; width: 0.5em; height: 0.9em; background: var(--red-2); vertical-align: -0.1em; margin-left: 2px; animation: blink 1s steps(2) infinite; }

.origin-story { margin-top: 26px; display: grid; gap: 16px; color: var(--text-2); font-size: 1.04rem; }
.origin-story p:first-child::first-letter { font-family: var(--f-display); font-size: 3.6em; float: left; line-height: .8; margin: 6px 10px 0 0; color: var(--red-2); }
.origin-story strong { color: var(--text); font-weight: 700; }

.stats { margin-top: clamp(56px, 8vw, 100px); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 4px; }
.stat { padding: 28px 24px; position: relative; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat-num { font-family: var(--f-display); font-size: clamp(3rem, 6vw, 4.6rem); line-height: 1; background: var(--metal); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat-label { margin-top: 6px; color: var(--text-2); font-size: .92rem; }
.stat-code { position: absolute; top: 12px; right: 14px; font-family: var(--f-mono); font-size: .56rem; color: var(--dim); letter-spacing: .14em; }

.loop { margin-top: clamp(56px, 8vw, 100px); }
.loop-tag { color: var(--blue-2); margin-bottom: 20px; }
.loop-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.loop-list li { position: relative; padding: 28px; border: 1px solid var(--line); border-radius: 4px; background: rgba(9, 13, 21, 0.6); overflow: hidden; }
.loop-list li::after {
  content: ""; position: absolute; left: 0; top: 0; width: 40px; height: 2px; background: var(--red-2);
}
.loop-list h4 { font-family: var(--f-display); font-weight: 400; font-size: 2.6rem; line-height: 1; letter-spacing: .03em; }
.loop-list h4 span { color: var(--red-2); }
.loop-list p { margin-top: 10px; color: var(--text-2); }

.forms { margin-top: clamp(72px, 10vw, 120px); }
.forms-rail { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.form-card { position: relative; }
.form-card .poster { width: 100%; }
.form-card figcaption { margin-top: 12px; }
.form-card figcaption b { display: block; font-family: var(--f-display); font-weight: 400; font-size: 1.5rem; letter-spacing: .04em; }
.form-card figcaption span { color: var(--muted); font-size: .9rem; }

/* ---------------------------------------------------------------------
   ABILITIES
   --------------------------------------------------------------------- */
.ability-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.ability {
  --hud-c: var(--blue);
  position: relative; padding: clamp(22px, 3vw, 34px); border-radius: 3px; overflow: hidden;
  background:
    linear-gradient(180deg, rgba(16, 24, 40, 0.7), rgba(7, 10, 17, 0.85)),
    repeating-linear-gradient(0deg, rgba(142, 220, 255, 0.025) 0 1px, transparent 1px 4px);
  border: 1px solid var(--line);
  transition: border-color .4s, transform .5s var(--ease), box-shadow .5s;
}
.ability[data-tone="red"] { --hud-c: var(--red-2); }
.ability[data-tone="gold"] { --hud-c: var(--gold); }
.ability[data-tone="lab"] { --hud-c: var(--lab); }
.ability:hover, .ability:focus-within { border-color: color-mix(in srgb, var(--hud-c) 50%, transparent); transform: translateY(-4px); box-shadow: 0 30px 60px -30px color-mix(in srgb, var(--hud-c) 45%, transparent); }

.ability-head { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; }
.ability-icon {
  position: relative; width: 56px; height: 56px; flex: none; display: grid; place-items: center;
  color: var(--hud-c); border: 1px solid color-mix(in srgb, var(--hud-c) 45%, transparent); border-radius: 50%;
  box-shadow: inset 0 0 18px color-mix(in srgb, var(--hud-c) 25%, transparent);
}
.ability-icon::before {
  content: ""; position: absolute; inset: -7px; border-radius: 50%;
  border: 1px dashed color-mix(in srgb, var(--hud-c) 45%, transparent); animation: spin 16s linear infinite;
}
.ability-icon svg { width: 24px; height: 24px; position: relative; z-index: 2; transition: transform .5s var(--ease); }
.ability:hover .ability-icon svg { transform: scale(1.15) rotate(-8deg); }
.burst {
  position: absolute; z-index: 1; width: 140px; height: 140px; left: 50%; top: 50%;
  transform: translate(-50%, -50%) scale(0) rotate(-30deg); pointer-events: none;
  transition: transform .45s cubic-bezier(.34, 1.8, .5, 1);
}
.burst svg { width: 100%; height: 100%; overflow: visible; }
.burst-word {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(-8deg);
  font-family: var(--f-comic); font-size: 1.5rem; letter-spacing: .04em; color: #111; white-space: nowrap;
  text-shadow: 1px 1px 0 #fff;
}
.ability-icon-wrap { position: relative; }
.ability-icon-wrap .burst { left: 70%; top: -10%; width: 110px; height: 110px; }
.ability:hover .burst, .ability:focus-within .burst { transform: translate(-50%, -50%) scale(1) rotate(0); }

.ability-code { font-family: var(--f-mono); font-size: .62rem; letter-spacing: .2em; color: var(--hud-c); }
.ability-title { font-family: var(--f-display); font-weight: 400; font-size: clamp(1.8rem, 3vw, 2.4rem); line-height: 1; letter-spacing: .03em; }
.ability-desc { color: var(--text-2); margin-bottom: 20px; font-size: .98rem; }
.ability-meter { display: flex; gap: 3px; margin-left: auto; align-self: flex-start; }
.ability-meter i { width: 4px; height: 16px; background: color-mix(in srgb, var(--hud-c) 25%, transparent); }
.ability-meter i.on { background: var(--hud-c); box-shadow: 0 0 6px var(--hud-c); }

.skills { display: flex; flex-wrap: wrap; gap: 8px; }
.skill {
  position: relative; padding: 7px 12px; border-radius: 2px;
  font-family: var(--f-mono); font-size: .72rem; letter-spacing: .04em;
  color: var(--text-2); background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line);
  transition: color .2s, border-color .2s, background .2s, transform .2s;
}
.skill:hover, .skill:focus-visible { color: #fff; border-color: var(--hud-c); background: color-mix(in srgb, var(--hud-c) 12%, transparent); transform: translateY(-2px); }
.skill.has-proof::after { content: ""; position: absolute; top: 3px; right: 3px; width: 4px; height: 4px; background: var(--hud-c); border-radius: 50%; }
.skill-tip {
  position: absolute; left: 50%; bottom: calc(100% + 10px); transform: translate(-50%, 6px); z-index: 20;
  white-space: nowrap; padding: 7px 10px; font-size: .6rem; letter-spacing: .12em; text-transform: uppercase;
  background: #03050a; color: var(--hud-c); border: 1px solid var(--hud-c); opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s;
}
.skill-tip::after { content: ""; position: absolute; left: 50%; top: 100%; width: 8px; height: 8px; background: #03050a; border-right: 1px solid var(--hud-c); border-bottom: 1px solid var(--hud-c); transform: translate(-50%, -4px) rotate(45deg); }
.skill:hover .skill-tip, .skill:focus-visible .skill-tip { opacity: 1; transform: translate(-50%, 0); }

.spark { position: fixed; z-index: 300; width: 6px; height: 6px; pointer-events: none; background: var(--c, #fff); clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); animation: spark .7s var(--ease) forwards; }
@keyframes spark { to { transform: translate(var(--dx), var(--dy)) scale(0.2) rotate(180deg); opacity: 0; } }

.ability-proof { margin-top: 18px; font-family: var(--f-mono); font-size: .62rem; letter-spacing: .12em; color: var(--dim); min-height: 1.2em; }
.ability-proof b { color: var(--hud-c); font-weight: 500; }

/* ---------------------------------------------------------------------
   MISSIONS
   --------------------------------------------------------------------- */
.featured {
  display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: clamp(24px, 4vw, 56px); align-items: center;
  padding: clamp(20px, 3vw, 36px); margin-bottom: clamp(56px, 8vw, 96px); position: relative;
  border: 1px solid var(--line); border-radius: 4px;
  background: radial-gradient(ellipse at 20% 50%, rgba(63, 184, 255, 0.08), transparent 60%), linear-gradient(180deg, rgba(12, 18, 30, 0.7), rgba(5, 7, 12, 0.7));
}
.featured-badge {
  position: absolute; top: -12px; left: 24px; z-index: 5; display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 12px; background: var(--red); color: #fff; font-family: var(--f-mono); font-size: .62rem; letter-spacing: .2em;
}
.featured .poster { width: 100%; cursor: pointer; }
.featured-file .mf-code { font-family: var(--f-mono); color: var(--muted); font-size: .7rem; letter-spacing: .16em; }
.featured-file h3 { font-family: var(--f-display); font-weight: 400; font-size: clamp(2.6rem, 5vw, 4.4rem); line-height: .92; margin: 10px 0 14px; letter-spacing: .02em; }
.featured-file .tagline { color: var(--text-2); font-size: 1.12rem; margin-bottom: 22px; }
.featured-rows { display: grid; gap: 14px; margin-bottom: 26px; }
.featured-rows div { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.featured-rows dt { font-family: var(--f-mono); font-size: .62rem; letter-spacing: .18em; color: var(--red-2); padding-top: 3px; }
.featured-rows dd { color: var(--text-2); font-size: .98rem; }

.tech { display: flex; flex-wrap: wrap; gap: 6px; }
.tech span { font-family: var(--f-mono); font-size: .64rem; letter-spacing: .06em; padding: 4px 8px; border: 1px solid var(--line); color: var(--text-2); border-radius: 2px; }

.mission-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.filter {
  padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px;
  font-family: var(--f-mono); font-size: .66rem; letter-spacing: .14em; color: var(--muted);
  transition: all .25s;
}
.filter:hover { color: var(--text); border-color: var(--line-strong); }
.filter[aria-pressed="true"] { background: var(--text); color: #05060a; border-color: var(--text); }
.filter .count { opacity: .6; margin-left: 6px; }

.mission-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
.mission-card { position: relative; display: block; text-align: left; width: 100%; transition: opacity .4s, transform .4s var(--ease); }
.mission-card.hidden { display: none; }
.mission-card .poster { width: 100%; }
.mission-card:hover .poster { box-shadow: 0 40px 70px -30px rgba(0, 0, 0, 0.95), 0 0 0 1px var(--acc-line, rgba(255, 70, 85, 0.5)); }
.mission-card .poster-art svg { transition: transform 1.2s var(--ease); }
.mission-card:hover .poster-art svg { transform: scale(1.06); }
.mc-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; }
.mc-meta .mono { color: var(--muted); }
.mc-line { margin-top: 8px; color: var(--text-2); font-size: .92rem; line-height: 1.45; }
.mc-open {
  position: absolute; left: 50%; top: 40%; z-index: 6; transform: translate(-50%, -50%) scale(.9);
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px;
  font-family: var(--f-mono); font-size: .66rem; letter-spacing: .2em; color: #fff;
  background: rgba(5, 6, 10, 0.8); border: 1px solid rgba(255, 255, 255, 0.3); opacity: 0; transition: all .35s var(--ease);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.mc-open svg { width: 14px; height: 14px; }
.mission-card:hover .mc-open, .mission-card:focus-visible .mc-open { opacity: 1; transform: translate(-50%, -50%) scale(1); }

/* ---------------------------------------------------------------------
   MODALS (mission file, field note)
   --------------------------------------------------------------------- */
.modal {
  border: 0; padding: 0; background: transparent; color: var(--text);
  width: min(1180px, 100vw); max-width: 100vw; max-height: 100vh; height: 100%;
  margin: auto; overflow: visible;
}
.modal::backdrop { background: rgba(2, 3, 6, 0.86); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.modal[open] { display: grid; place-items: center; }
.modal-shell {
  position: relative; width: calc(100% - 24px); max-height: calc(100vh - 32px); overflow: auto;
  background: linear-gradient(180deg, #0b101b, #06080d); border: 1px solid var(--line-strong); border-radius: 4px;
  box-shadow: 0 60px 120px -40px #000;
  animation: modalIn .7s var(--ease-cine) both;
}
@keyframes modalIn {
  0% { clip-path: inset(50% 0 50% 0); opacity: 1; }
  100% { clip-path: inset(0 0 0 0); opacity: 1; }
}
.modal.closing .modal-shell { animation: modalOut .45s var(--ease-cine) forwards; }
@keyframes modalOut { to { clip-path: inset(50% 0 50% 0); } }

.mm-bar {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 18px; background: rgba(5, 7, 12, 0.94); border-bottom: 1px solid var(--line);
  font-family: var(--f-mono); font-size: .62rem; letter-spacing: .16em; color: var(--muted);
}
.mm-bar .cls { color: var(--red-2); }
.modal-close {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border: 1px solid var(--line-strong); border-radius: 2px;
  font-family: var(--f-mono); font-size: .62rem; letter-spacing: .14em; color: var(--text-2);
}
.modal-close:hover { color: #fff; border-color: var(--red-2); }
.modal-close svg { width: 14px; height: 14px; }

.mm-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(20px, 3vw, 44px); padding: clamp(18px, 3vw, 36px); }
.mm-poster { position: sticky; top: 70px; align-self: start; }
.mm-file h3 { font-family: var(--f-display); font-weight: 400; font-size: clamp(2.4rem, 5vw, 4rem); line-height: .92; letter-spacing: .02em; margin: 12px 0 10px; }
.mm-meta { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; font-family: var(--f-mono); font-size: .68rem; letter-spacing: .14em; color: var(--muted); }
.mm-tagline { color: var(--text-2); font-size: 1.1rem; margin: 6px 0 20px; }
.mm-rows { display: grid; gap: 0; margin-top: 22px; }
.mm-row { position: relative; display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 18px; padding: 18px 0; border-top: 1px solid var(--line); }
.mm-row dt { font-family: var(--f-mono); font-size: .62rem; letter-spacing: .18em; color: var(--red-2); padding-top: 4px; }
.mm-row dt.broke { color: var(--amber); }
.mm-row dd { color: var(--text-2); position: relative; }
.mm-row dd::after {
  content: ""; position: absolute; inset: 2px 0; background: #000;
  background-image: repeating-linear-gradient(90deg, #0d0d0f 0 22px, #000 22px 24px);
  transform-origin: right; animation: redact .7s var(--ease-cine) forwards; animation-delay: calc(.35s + var(--i, 0) * .12s);
}
@keyframes redact { to { transform: scaleX(0); } }
.mm-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 4px; }
.mm-metric { border: 1px solid var(--line); padding: 12px; border-radius: 2px; }
.mm-metric b { display: block; font-family: var(--f-display); font-weight: 400; font-size: 1.9rem; line-height: 1; color: var(--gold-2); }
.mm-metric span { font-family: var(--f-mono); font-size: .58rem; letter-spacing: .14em; color: var(--muted); }
.mm-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.mm-restricted { font-family: var(--f-mono); font-size: .64rem; letter-spacing: .14em; color: var(--dim); align-self: center; }
.mm-note { margin-top: 18px; font-size: .82rem; color: var(--dim); }
.decode { white-space: pre-wrap; }

/* ---------------------------------------------------------------------
   RESEARCH LAB (visually distinct: blueprint, lab green)
   --------------------------------------------------------------------- */
.research { background: linear-gradient(180deg, #04070a 0%, #061012 50%, #04070a 100%); overflow: hidden; }
.lab-grid-bg {
  position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image:
    linear-gradient(rgba(65, 240, 200, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(65, 240, 200, 0.06) 1px, transparent 1px),
    linear-gradient(rgba(65, 240, 200, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(65, 240, 200, 0.025) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
}
.paper {
  --hud-c: var(--lab);
  display: grid; grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr); gap: clamp(24px, 4vw, 60px);
}
.paper-head { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; align-items: end; padding-bottom: 24px; border-bottom: 1px solid rgba(65, 240, 200, 0.2); }
.paper-head h3 { font-family: var(--f-display); font-weight: 400; font-size: clamp(2.4rem, 5vw, 4.2rem); line-height: .92; letter-spacing: .02em; }
.paper-head p { color: var(--text-2); margin-top: 8px; max-width: 54ch; }
.paper-status { display: grid; gap: 6px; justify-items: end; text-align: right; }
.paper-status .status { color: var(--lab); }
.paper-status small { font-family: var(--f-mono); font-size: .6rem; color: var(--dim); letter-spacing: .1em; }

.lab-blocks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.lab-block { padding: 20px; border: 1px solid rgba(65, 240, 200, 0.16); background: rgba(4, 16, 16, 0.55); border-radius: 2px; }
.lab-block.wide { grid-column: 1 / -1; }
.lab-block h4 { font-family: var(--f-mono); font-weight: 500; font-size: .66rem; letter-spacing: .2em; color: var(--lab); margin-bottom: 10px; display: flex; gap: 8px; align-items: center; }
.lab-block h4 svg { width: 14px; height: 14px; }
.lab-block p, .lab-block li { color: var(--text-2); font-size: .96rem; }
.lab-block ul { display: grid; gap: 6px; }
.lab-block li { padding-left: 16px; position: relative; }
.lab-block li::before { content: ""; position: absolute; left: 0; top: .7em; width: 6px; height: 1px; background: var(--lab); }

.gauges { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.gauge { padding: 20px; border: 1px solid rgba(65, 240, 200, 0.16); background: rgba(4, 16, 16, 0.55); text-align: center; }
.gauge svg { width: 100%; max-width: 200px; margin: 0 auto; }
.gauge-val { font-family: var(--f-display); font-size: 2.6rem; line-height: 1; margin-top: -36px; position: relative; }
.gauge-label { font-family: var(--f-mono); font-size: .6rem; letter-spacing: .18em; color: var(--muted); margin-top: 6px; }
.gauge-arc { transition: stroke-dashoffset 2s var(--ease); }

.pipeline { display: flex; flex-wrap: wrap; align-items: stretch; gap: 0; margin: 4px 0 0; }
.pipe-step { flex: 1 1 0; min-width: 110px; position: relative; padding: 14px 12px; border: 1px solid rgba(65, 240, 200, 0.2); background: rgba(4, 16, 16, 0.6); }
.pipe-step + .pipe-step { border-left: 0; }
.pipe-step b { display: block; font-family: var(--f-display); font-weight: 400; font-size: 1.25rem; letter-spacing: .04em; }
.pipe-step span { font-family: var(--f-mono); font-size: .58rem; letter-spacing: .08em; color: var(--muted); }
.pipe-step::after {
  content: ""; position: absolute; left: 0; bottom: -1px; height: 2px; width: 100%; background: var(--lab);
  transform: scaleX(0); transform-origin: left; transition: transform .6s var(--ease); transition-delay: calc(var(--i) * .25s + .3s);
}
.in .pipe-step::after { transform: scaleX(1); }

.lab-quote {
  margin: clamp(48px, 7vw, 80px) auto 0; max-width: 900px; text-align: center;
  font-family: var(--f-display); font-size: clamp(2rem, 4.6vw, 3.6rem); line-height: 1; letter-spacing: .02em;
}
.lab-quote span { color: var(--lab); }
.lab-quote cite { display: block; margin-top: 16px; font-family: var(--f-mono); font-style: normal; font-size: .64rem; letter-spacing: .2em; color: var(--muted); }

.investigations { margin-top: clamp(56px, 8vw, 88px); }
.inv-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.inv { position: relative; padding: 24px; border: 1px dashed rgba(65, 240, 200, 0.3); overflow: hidden; }
.inv .mono { color: var(--lab); }
.inv h4 { font-family: var(--f-display); font-weight: 400; font-size: 1.9rem; letter-spacing: .03em; margin: 8px 0 6px; line-height: 1; }
.inv p { color: var(--text-2); font-size: .94rem; }
.inv svg.inv-icon { width: 28px; height: 28px; color: var(--lab); position: absolute; right: 18px; top: 18px; opacity: .8; }

/* ---------------------------------------------------------------------
   IIT DELHI SPECIAL MISSION
   --------------------------------------------------------------------- */
.iitd { background: radial-gradient(ellipse 80% 60% at 70% 50%, rgba(217, 178, 95, 0.07), transparent 70%), #05060a; overflow: hidden; }
.iitd-sub { color: var(--gold); margin-top: 20px; letter-spacing: .3em; }
.iitd-wrap { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.brief { border: 1px solid rgba(217, 178, 95, 0.22); background: rgba(14, 12, 8, 0.5); padding: clamp(20px, 3vw, 32px); border-radius: 2px; --hud-c: var(--gold); }
.brief-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding-bottom: 14px; border-bottom: 1px dashed rgba(217, 178, 95, 0.3); font-family: var(--f-mono); font-size: .62rem; letter-spacing: .16em; color: var(--gold); }
.brief dl { display: grid; }
.brief dl > div { padding: 14px 0; border-bottom: 1px solid var(--line); }
.brief dt { font-family: var(--f-mono); font-size: .6rem; letter-spacing: .18em; color: var(--muted); margin-bottom: 4px; }
.brief dd { color: var(--text); font-weight: 600; }
.brief dd.proj { font-family: var(--f-engrave); font-size: 1.12rem; line-height: 1.4; color: var(--gold-2); font-weight: 500; }
.ops { margin-top: 18px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; }
.ops li { display: flex; gap: 10px; align-items: flex-start; color: var(--text-2); font-size: .92rem; opacity: 0; transform: translateX(-10px); transition: all .5s var(--ease); transition-delay: calc(var(--i) * 70ms); }
.in .ops li { opacity: 1; transform: none; }
.ops li svg { width: 15px; height: 15px; flex: none; color: var(--gold); margin-top: 4px; }

.map-panel { position: relative; border: 1px solid rgba(217, 178, 95, 0.22); background: radial-gradient(ellipse at center, rgba(20, 30, 50, 0.6), rgba(3, 4, 8, 0.9)); border-radius: 2px; overflow: hidden; --hud-c: var(--gold); }
.map-panel canvas { width: 100%; aspect-ratio: 1 / 1; }
.map-hud { position: absolute; left: 14px; right: 14px; top: 12px; display: flex; justify-content: space-between; gap: 10px; font-family: var(--f-mono); font-size: .6rem; letter-spacing: .16em; color: var(--gold); pointer-events: none; }
.map-stage { color: var(--text); }
.map-foot { position: absolute; left: 14px; right: 14px; bottom: 12px; display: flex; justify-content: space-between; gap: 10px; font-family: var(--f-mono); font-size: .56rem; letter-spacing: .1em; color: var(--dim); pointer-events: none; }
.map-stages { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.map-stages span { font-family: var(--f-mono); font-size: .6rem; letter-spacing: .14em; padding: 6px 10px; border: 1px solid var(--line); color: var(--dim); transition: all .3s; }
.map-stages span.on { color: #05060a; background: var(--gold); border-color: var(--gold); }

.iitd-quote { margin-top: clamp(44px, 6vw, 72px); text-align: center; font-family: var(--f-display); font-size: clamp(2rem, 5vw, 4rem); line-height: 1; letter-spacing: .02em; }
.iitd-quote em { font-style: normal; color: var(--gold-2); }

/* ---------------------------------------------------------------------
   HONORS
   --------------------------------------------------------------------- */
.plaques { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.plaque {
  position: relative; display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 0; overflow: hidden; border-radius: 3px;
  background: linear-gradient(160deg, #15120c, #0a0907 50%, #110e09);
  border: 1px solid rgba(217, 178, 95, 0.35);
  box-shadow: inset 0 0 0 6px #0a0806, inset 0 0 0 7px rgba(217, 178, 95, 0.25), 0 40px 80px -40px #000;
}
.plaque .poster { border-radius: 0; box-shadow: none; aspect-ratio: auto; height: 100%; min-height: 100%; }
.plaque-body { padding: clamp(20px, 3vw, 32px); display: flex; flex-direction: column; gap: 10px; }
.plaque-year { font-family: var(--f-mono); font-size: .62rem; letter-spacing: .2em; color: var(--gold); }
.plaque h3 { font-family: var(--f-engrave); font-weight: 700; font-size: clamp(1.2rem, 2vw, 1.55rem); line-height: 1.2; color: var(--gold-2); letter-spacing: .04em; }
.plaque-stat { font-family: var(--f-display); font-size: clamp(3rem, 6vw, 4.4rem); line-height: .9; background: linear-gradient(180deg, #fff6d8, var(--gold) 55%, #7a5a20); -webkit-background-clip: text; background-clip: text; color: transparent; }
.plaque-stat-label { font-family: var(--f-mono); font-size: .64rem; letter-spacing: .14em; color: var(--text-2); }
.plaque p { color: var(--text-2); font-size: .95rem; }
.plaque .lesson { margin-top: auto; padding-top: 12px; border-top: 1px solid rgba(217, 178, 95, 0.2); font-size: .92rem; color: var(--text); }
.plaque .lesson b { font-family: var(--f-mono); font-size: .58rem; letter-spacing: .18em; color: var(--gold); display: block; margin-bottom: 4px; font-weight: 500; }
.plaque::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 240, 200, 0.12) 50%, transparent 65%);
  transform: translateX(-100%); transition: transform 1.2s var(--ease);
}
.plaque:hover::after { transform: translateX(100%); }

.credits { margin-top: clamp(56px, 8vw, 96px); border-top: 1px solid rgba(217, 178, 95, 0.2); }
.credit {
  display: grid; grid-template-columns: 90px minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 1.2fr); gap: 20px; align-items: start;
  padding: 22px 0; border-bottom: 1px solid var(--line); transition: background .3s;
}
.credit:hover { background: linear-gradient(90deg, rgba(217, 178, 95, 0.05), transparent); }
.credit-year { font-family: var(--f-display); font-size: 1.8rem; line-height: 1; color: var(--gold); }
.credit h4 { font-family: var(--f-display); font-weight: 400; font-size: 1.7rem; line-height: 1; letter-spacing: .03em; }
.credit .org { font-family: var(--f-mono); font-size: .6rem; letter-spacing: .14em; color: var(--muted); margin-top: 6px; }
.credit .ach { display: inline-block; font-family: var(--f-mono); font-size: .64rem; letter-spacing: .12em; color: var(--gold-2); border: 1px solid rgba(217, 178, 95, 0.4); padding: 4px 8px; margin-bottom: 8px; }
.credit p { color: var(--text-2); font-size: .92rem; }
.credit .k { font-family: var(--f-mono); font-size: .56rem; letter-spacing: .18em; color: var(--dim); display: block; margin-bottom: 2px; }

/* ---------------------------------------------------------------------
   TIMELINE
   --------------------------------------------------------------------- */
.phase-tabs { display: flex; flex-wrap: wrap; gap: 0; margin-bottom: 40px; border: 1px solid var(--line); width: fit-content; max-width: 100%; }
.phase-tab { padding: 12px 18px; font-family: var(--f-mono); font-size: .66rem; letter-spacing: .16em; color: var(--muted); border-right: 1px solid var(--line); transition: all .25s; }
.phase-tab:last-child { border-right: 0; }
.phase-tab:hover { color: var(--text); }
.phase-tab[aria-selected="true"] { background: var(--red); color: #fff; }

.phase { display: grid; grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr); gap: clamp(24px, 4vw, 64px); padding: clamp(40px, 5vw, 64px) 0; border-top: 1px solid var(--line); }
.phase-card { position: sticky; top: calc(var(--header-h) + 24px); align-self: start; }
.phase-num { font-family: var(--f-mono); font-size: .7rem; letter-spacing: .3em; color: var(--red-2); }
.phase-year { font-family: var(--f-display); font-size: clamp(5rem, 11vw, 9rem); line-height: .85; background: var(--metal); -webkit-background-clip: text; background-clip: text; color: transparent; }
.phase-name { font-family: var(--f-display); font-size: 2rem; letter-spacing: .06em; color: var(--text-2); }
.phase-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.phase-tags span { font-family: var(--f-mono); font-size: .6rem; letter-spacing: .1em; color: var(--muted); border: 1px solid var(--line); padding: 3px 8px; }
.phase[data-future] .phase-year { background: none; color: transparent; -webkit-text-stroke: 1px rgba(255, 255, 255, 0.3); }

.entries { position: relative; padding-left: 34px; }
.entries::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 1px; background: var(--line-strong); }
.entries-fill { position: absolute; left: 7px; top: 6px; width: 1px; height: calc(var(--fill, 0) * (100% - 12px)); background: linear-gradient(180deg, var(--red-2), var(--blue)); box-shadow: 0 0 10px var(--red-glow); }
.entry { position: relative; padding: 0 0 34px; }
.entry:last-child { padding-bottom: 0; }
.entry::before {
  content: ""; position: absolute; left: -32px; top: 6px; width: 12px; height: 12px; transform: rotate(45deg);
  background: var(--bg); border: 1.5px solid var(--line-strong); transition: all .4s;
}
.entry.lit::before { background: var(--red-2); border-color: var(--red-2); box-shadow: 0 0 12px var(--red-2); }
.entry-date { font-family: var(--f-mono); font-size: .64rem; letter-spacing: .14em; color: var(--muted); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.entry-type { color: var(--blue-2); }
.entry h4 { font-family: var(--f-display); font-weight: 400; font-size: clamp(1.6rem, 2.6vw, 2.1rem); line-height: 1.05; letter-spacing: .02em; margin: 6px 0 6px; }
.entry p { color: var(--text-2); font-size: .96rem; max-width: 62ch; }
.entry.classified h4 { color: var(--muted); }
.redacted { display: inline-block; background: #15171d; color: transparent; border-radius: 1px; user-select: none; position: relative; overflow: hidden; }
.redacted::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 70, 85, 0.25), transparent); transform: translateX(-100%); animation: redScan 3s infinite; }
@keyframes redScan { to { transform: translateX(100%); } }
.glitch { position: relative; display: inline-block; }
.glitch::before, .glitch::after { content: attr(data-text); position: absolute; left: 0; top: 0; width: 100%; overflow: hidden; }
.glitch::before { color: var(--red-2); transform: translate(2px, 0); clip-path: inset(0 0 60% 0); animation: gl1 3s infinite steps(1); opacity: .8; }
.glitch::after { color: var(--blue-2); transform: translate(-2px, 0); clip-path: inset(55% 0 0 0); animation: gl2 2.6s infinite steps(1); opacity: .8; }
@keyframes gl1 { 0%, 88%, 100% { transform: none; opacity: 0; } 90% { transform: translate(3px, -1px); opacity: .8; } 94% { transform: translate(-2px, 1px); opacity: .8; } }
@keyframes gl2 { 0%, 82%, 100% { transform: none; opacity: 0; } 84% { transform: translate(-3px, 1px); opacity: .8; } 87% { transform: translate(2px, 0); opacity: .8; } }

/* ---------------------------------------------------------------------
   FIELD NOTES
   --------------------------------------------------------------------- */
.philosophy { max-width: 980px; margin-bottom: 40px; padding-left: 24px; border-left: 2px solid var(--red); }
.philosophy p { font-family: var(--f-display); font-size: clamp(1.9rem, 4vw, 3.2rem); line-height: 1.02; letter-spacing: .02em; }
.philosophy cite { display: block; margin-top: 14px; font-style: normal; color: var(--muted); }
.beats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 40px; }
.beats span { font-family: var(--f-mono); font-size: .64rem; letter-spacing: .14em; text-transform: uppercase; padding: 6px 10px; border: 1px solid var(--line); color: var(--muted); }
.beats span:first-child { color: var(--red-2); border-color: transparent; padding-left: 0; }

.note-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.note {
  position: relative; display: flex; flex-direction: column; gap: 12px; text-align: left; width: 100%;
  padding: 26px 24px 22px; min-height: 280px; border-radius: 2px; overflow: hidden;
  background: linear-gradient(180deg, #0e1320, #080b12); border: 1px solid var(--line);
  transition: transform .5s var(--ease), border-color .4s, box-shadow .5s;
}
.note::before {
  content: ""; position: absolute; top: 0; right: 0; width: 46px; height: 46px;
  background: linear-gradient(225deg, var(--bg) 50%, rgba(255, 255, 255, 0.06) 50%);
}
.note:hover, .note:focus-visible { transform: translateY(-6px) rotate(-0.4deg); border-color: rgba(255, 70, 85, 0.45); box-shadow: 0 30px 60px -30px rgba(226, 35, 47, 0.35); }
.note.featured-note { grid-column: span 2; background: radial-gradient(ellipse at 90% 10%, rgba(226, 35, 47, 0.14), transparent 55%), linear-gradient(180deg, #111726, #080b12); }
.note-code { font-family: var(--f-mono); font-size: .62rem; letter-spacing: .2em; color: var(--red-2); display: flex; justify-content: space-between; gap: 10px; }
.note-code span:last-child { color: var(--dim); }
.note h3 { font-family: var(--f-display); font-weight: 400; font-size: clamp(1.8rem, 2.6vw, 2.3rem); line-height: 1; letter-spacing: .02em; }
.note.featured-note h3 { font-size: clamp(2.2rem, 4vw, 3.4rem); }
.note p { color: var(--text-2); font-size: .95rem; }
.note-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; font-family: var(--f-mono); font-size: .6rem; letter-spacing: .14em; color: var(--muted); }
.note-foot .open { display: inline-flex; gap: 6px; align-items: center; color: var(--text-2); }
.note-foot svg { width: 14px; height: 14px; transition: transform .3s; }
.note:hover .note-foot svg { transform: translateX(4px); }
.note.classified-note { border-style: dashed; cursor: default; }
.note.classified-note:hover { transform: none; box-shadow: none; border-color: var(--line); }
.note-stamp { position: absolute; right: 18px; bottom: 54px; font-family: var(--f-mono); font-weight: 700; font-size: .7rem; letter-spacing: .2em; color: var(--red-2); border: 2px solid var(--red-2); padding: 4px 8px; transform: rotate(-10deg); opacity: .7; }

.nm-body { padding: clamp(22px, 4vw, 56px); max-width: 780px; margin: 0 auto; }
.nm-body .note-code { margin-bottom: 18px; }
.nm-body h3 { font-family: var(--f-display); font-weight: 400; font-size: clamp(2.6rem, 6vw, 4.6rem); line-height: .92; letter-spacing: .02em; }
.nm-meta { margin: 14px 0 26px; font-family: var(--f-mono); font-size: .64rem; letter-spacing: .14em; color: var(--muted); }
.nm-body .lead { font-size: 1.2rem; color: var(--text); line-height: 1.6; }
.nm-body .pull { margin: 26px 0; padding: 18px 22px; border-left: 2px solid var(--red); font-family: var(--f-display); font-size: 1.8rem; line-height: 1.05; letter-spacing: .02em; background: rgba(226, 35, 47, 0.05); }
.nm-body .nm-points { display: grid; gap: 10px; margin: 18px 0 28px; }
.nm-body .nm-points li { color: var(--text-2); padding-left: 22px; position: relative; }
.nm-body .nm-points li::before { content: ""; position: absolute; left: 0; top: .65em; width: 10px; height: 1px; background: var(--red-2); }

/* ---------------------------------------------------------------------
   TRANSMISSIONS
   --------------------------------------------------------------------- */
.channel-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.channel {
  --hud-c: var(--blue);
  position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 18px; align-items: center;
  padding: 24px; border: 1px solid var(--line); border-radius: 2px; overflow: hidden;
  background: linear-gradient(180deg, rgba(14, 20, 33, 0.7), rgba(6, 9, 15, 0.8));
  transition: border-color .3s, transform .4s var(--ease);
}
.channel:hover, .channel:focus-visible { border-color: var(--hud-c); transform: translateY(-3px); }
.channel-icon { width: 54px; height: 54px; display: grid; place-items: center; border: 1px solid color-mix(in srgb, var(--hud-c) 40%, transparent); color: var(--hud-c); border-radius: 50%; }
.channel-icon svg { width: 22px; height: 22px; }
.channel-name { font-family: var(--f-display); font-size: 1.8rem; line-height: 1; letter-spacing: .04em; }
.channel-name span { color: var(--hud-c); }
.channel-sub { font-family: var(--f-mono); font-size: .62rem; letter-spacing: .14em; color: var(--muted); margin-top: 6px; }
.channel-desc { color: var(--text-2); font-size: .92rem; margin-top: 8px; }
.wave { display: flex; align-items: center; gap: 2px; height: 34px; }
.wave i { width: 2px; height: 30%; background: var(--hud-c); opacity: .65; animation: eq 1.2s ease-in-out infinite; animation-delay: var(--dl); }
.channel:hover .wave i { animation-duration: .6s; }
@keyframes eq { 50% { height: var(--h); } }
.channel-rx { position: absolute; right: 16px; top: 12px; font-family: var(--f-mono); font-size: .56rem; letter-spacing: .16em; color: var(--dim); }
.channel:hover .channel-rx { color: var(--hud-c); }

/* ---------------------------------------------------------------------
   FINALE
   --------------------------------------------------------------------- */
.finale { position: relative; min-height: 100vh; display: grid; place-items: center; text-align: center; background: #000; overflow: hidden; padding: 120px var(--gutter); }
.finale-light { position: absolute; left: 50%; top: 0; width: 60vw; height: 100%; transform: translateX(-50%); background: radial-gradient(ellipse at 50% 0%, rgba(142, 220, 255, 0.12), transparent 60%); opacity: 0; transition: opacity 3s; }
.finale.in .finale-light { opacity: 1; }
.finale-inner { position: relative; z-index: 2; display: grid; justify-items: center; gap: 26px; }
.finale-inner > * { opacity: 0; transform: translateY(14px); filter: blur(6px); transition: opacity 1.6s var(--ease), transform 1.6s var(--ease), filter 1.6s; }
.finale.in .fl-1 { transition-delay: .2s; }
.finale.in .fl-2 { transition-delay: 1.6s; }
.finale.in .fl-3 { transition-delay: 2.8s; }
.finale.in .fl-4 { transition-delay: 3.3s; }
.finale.in .fl-5 { transition-delay: 4.2s; }
.finale.in .finale-inner > * { opacity: 1; transform: none; filter: none; }
.finale-line { font-family: var(--f-mono); font-size: clamp(.8rem, 1.4vw, 1rem); letter-spacing: .4em; text-transform: uppercase; color: var(--text-2); }
.finale-big { font-family: var(--f-display); font-weight: 400; font-size: clamp(4.4rem, 15vw, 13rem); line-height: .85; letter-spacing: .02em; background: var(--metal); -webkit-background-clip: text; background-clip: text; color: transparent; }
.finale-contact { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: center; }
.finale-email { font-family: var(--f-mono); font-size: clamp(1rem, 2.4vw, 1.5rem); color: var(--text); border-bottom: 1px solid var(--red); padding-bottom: 4px; letter-spacing: .04em; word-break: break-all; }
.finale-email:hover { color: var(--red-2); }
.finale-links { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.finale-links a { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border: 1px solid var(--line); font-family: var(--f-mono); font-size: .64rem; letter-spacing: .16em; color: var(--text-2); transition: all .25s; }
.finale-links a:hover { color: #fff; border-color: var(--red-2); }
.finale-links svg { width: 15px; height: 15px; }
.finale-closing { display: grid; gap: 2px; margin-top: 30px; font-family: var(--f-display); font-size: clamp(1.8rem, 4vw, 3rem); line-height: 1; letter-spacing: .05em; }
.finale-closing span:last-child { color: var(--red-2); }
.fade-black { position: absolute; left: 0; right: 0; bottom: 0; height: 30%; background: linear-gradient(180deg, transparent, #000); pointer-events: none; }

.end-credits { background: #000; padding: 80px var(--gutter) 120px; text-align: center; position: relative; z-index: 2; }
.credit-roll { max-width: 640px; margin: 0 auto; display: grid; gap: 22px; justify-items: center; }
.credit-roll dl { display: grid; gap: 18px; }
.credit-roll dt { font-family: var(--f-mono); font-size: .6rem; letter-spacing: .24em; text-transform: uppercase; color: var(--dim); }
.credit-roll dd { font-family: var(--f-display); font-size: 1.6rem; letter-spacing: .08em; color: var(--text-2); }
.disclaimer { color: var(--dim); font-size: .8rem; max-width: 48ch; }
.post-credits { margin: 140px auto 0; max-width: 720px; display: grid; gap: 14px; justify-items: center; }
.post-credits .mono { color: var(--red-2); letter-spacing: .4em; }
.pcs-text { color: var(--text-2); font-size: 1.05rem; }
.pcs-return { font-family: var(--f-display); font-size: clamp(2rem, 5vw, 3.4rem); letter-spacing: .08em; line-height: 1; }
.pcs-return span { display: block; font-size: .5em; color: var(--muted); letter-spacing: .3em; margin-top: 8px; }

.copied-toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 600; transform: translate(-50%, 20px); opacity: 0;
  padding: 10px 16px; background: #000; border: 1px solid #3ef08a; color: #3ef08a;
  font-family: var(--f-mono); font-size: .66rem; letter-spacing: .2em; transition: all .3s var(--ease);
}
.copied-toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------------------------------------------------------------------
   Responsive
   --------------------------------------------------------------------- */
@media (max-width: 1180px) {
  .nav-list a { padding: 8px 7px; font-size: .6rem; }
  .brand-text small { display: none; }
}

@media (max-width: 1024px) {
  .nav { display: none; }
  .nav-toggle { display: inline-flex; }
  .mission-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .forms-rail { grid-template-columns: repeat(5, minmax(200px, 1fr)); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 12px; margin: 0 calc(var(--gutter) * -1); padding-left: var(--gutter); padding-right: var(--gutter); scrollbar-width: thin; }
  .form-card { scroll-snap-align: start; }
  .plaques { grid-template-columns: 1fr; }
  .credit { grid-template-columns: 70px minmax(0, 1fr) minmax(0, 1fr); }
  .credit > div:last-child { grid-column: 2 / -1; }
  .hud-status { display: none; }
}

@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; gap: 0; padding-top: calc(var(--header-h) + 8px); padding-bottom: 150px; }
  .hero-art { order: -1; max-width: 460px; margin: 0 auto -16%; width: 100%; }
  .hero-art-svg { aspect-ratio: 6 / 6; }
  .hero-art-tag { display: none; }
  .hero-copy { position: relative; z-index: 2; }
  .hero-name { font-size: clamp(3.6rem, 18vw, 6rem); }
  .hero-scroll { bottom: 52px; }
  .origin-grid, .featured, .mm-grid, .paper, .iitd-wrap, .phase { grid-template-columns: 1fr; }
  .origin-poster, .mm-poster, .phase-card { position: relative; top: 0; }
  .origin-poster { max-width: 420px; }
  .mm-poster { max-width: 360px; }
  .featured .poster { max-width: 420px; margin: 0 auto; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .loop-list, .inv-grid { grid-template-columns: 1fr; }
  .ability-grid, .channel-grid { grid-template-columns: 1fr; }
  .mission-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .note-grid { grid-template-columns: 1fr 1fr; }
  .note.featured-note { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
  :root { --header-h: 60px; }
  body { font-size: 15px; }
  .brand-text b { font-size: 1.3rem; }
  .hero-actions .btn { flex: 1 1 100%; justify-content: center; }
  .hero-ticker { height: 32px; }
  .dossier { grid-template-columns: 1fr; }
  .dossier > div:nth-child(odd) { padding-right: 0; }
  /* posters become vertical cards on phones */
  .mission-grid { grid-template-columns: 1fr; gap: 26px; }
  .mission-card { display: grid; grid-template-columns: 1fr; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: #070a11; }
  .mission-card .poster { aspect-ratio: 4 / 5; border-radius: 0; box-shadow: none; }
  .mission-card .mc-meta, .mission-card .mc-line { padding: 0 16px; }
  .mission-card .mc-line { padding-bottom: 18px; }
  .mc-open { display: none; }
  .note-grid { grid-template-columns: 1fr; }
  .lab-blocks, .gauges, .ops { grid-template-columns: 1fr; }
  .mm-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mm-row, .featured-rows div { grid-template-columns: 1fr; gap: 6px; }
  .plaque { grid-template-columns: 1fr; }
  .plaque .poster { aspect-ratio: 4 / 3; height: auto; }
  .credit { grid-template-columns: 1fr; gap: 8px; }
  .credit > div:last-child { grid-column: auto; }
  .channel { grid-template-columns: auto minmax(0, 1fr); }
  .channel .wave { display: none; }
  .phase-tabs { width: 100%; }
  .phase-tab { flex: 1 1 auto; padding: 10px 10px; font-size: .58rem; }
  .pipe-step { flex-basis: 50%; }
  .pipe-step + .pipe-step { border-left: 1px solid rgba(65, 240, 200, 0.2); }
  .intro-skip { right: 12px; bottom: 12px; }
}

/* Reduced motion: the story still reads, the camera stops moving */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; transition-delay: 0s !important; scroll-behavior: auto !important; }
  .fx-grain { display: none; }
  .reveal, .seq, .finale-inner > * { opacity: 1 !important; transform: none !important; filter: none !important; }
  .hn-line > span, .chapter-title .line > span { transform: none !important; }
  .mm-row dd::after { display: none; }
}

/* ---------------------------------------------------------------------
   Additions: accessibility helpers, stretched hit areas, parallax layers
   --------------------------------------------------------------------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.mc-hit, .note-hit { position: absolute; inset: 0; z-index: 6; width: 100%; height: 100%; cursor: pointer; border-radius: 6px; }
.mc-hit:focus-visible, .note-hit:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; }
.mc-hit .mc-open { top: 34%; }
.mission-card:hover .mc-open, .mc-hit:focus-visible .mc-open { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.featured-poster { cursor: pointer; border-radius: 6px; }

.entry-list { list-style: none; }

.hero-art-svg .par { transition: transform .8s var(--ease); }
.hero-art-svg .par-0 { transform: translate(calc(var(--px, 0) * 18px), calc(var(--py, 0) * 12px)); }
.hero-art-svg .par-1 { transform: translate(calc(var(--px, 0) * 5px), calc(var(--py, 0) * 3px)); }
.hero-art-svg .par-2 { transform: translate(calc(var(--px, 0) * -12px), calc(var(--py, 0) * -8px)); }
.hero-art-svg .par-3 { transform: translate(calc(var(--px, 0) * -20px), calc(var(--py, 0) * -14px)); }

/* ability scan stays inside the card so comic bursts can pop outside it */
.ability { overflow: visible; }
.ability .scan {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--hud-c) 16%, transparent), transparent) no-repeat;
  background-size: 100% 40%; background-position: 0 -120%;
}
.ability:hover .scan { animation: scan2 1.6s var(--ease) 1; }
@keyframes scan2 { from { background-position: 0 -120%; } to { background-position: 0 220%; } }
.ability-icon { z-index: 2; background: #070b13; }
.ability-icon-wrap .burst { left: 105%; top: -18%; z-index: 3; }
@media (hover: none) { .skill-tip { display: none; } }

.pipeline { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; }
.pipe-step { min-width: 0; border: 1px solid rgba(65, 240, 200, 0.2); margin: 0 -1px -1px 0; }
.pipe-step + .pipe-step { border-left: 1px solid rgba(65, 240, 200, 0.2); }
.note-code { flex-wrap: wrap; padding-right: 40px; row-gap: 2px; }
.note-code span { white-space: nowrap; }
.phase-tabs { position: sticky; top: calc(var(--header-h) + 12px); z-index: 20; background: rgba(5, 6, 10, 0.92); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
@media (max-width: 600px) { .pipeline { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pipe-step { flex-basis: auto; } }
.phase-card { top: calc(var(--header-h) + 84px); }
@media (max-width: 600px) { .gauges { grid-template-columns: 1fr 1fr; } .gauge { padding: 14px 10px; } .gauge-val { font-size: 1.6rem; margin-top: -22px; } }
