:root {
  --bg: #04060c;
  --bg-2: #080c18;
  --panel: rgba(12, 18, 34, 0.78);
  --panel-solid: #0c1222;
  --line: rgba(120, 170, 255, 0.16);
  --line-2: rgba(120, 170, 255, 0.3);
  --ink: #eef0f6;
  --ink-2: #b7bfd3;
  --ink-3: #7c86a0;
  --amber: #ffb347;
  --amber-2: #ff8c1a;
  --cyan: #4de3ff;
  --cyan-2: #1aa6d9;
  --rose: #ff5c8a;
  --violet: #a58bff;
  --green: #5cffb1;
  --glow-amber: 0 0 18px rgba(255, 179, 71, 0.45);
  --glow-cyan: 0 0 18px rgba(77, 227, 255, 0.45);
  --radius: 14px;
  --display: 'Orbitron', 'Rajdhani', system-ui, sans-serif;
  --ui: 'Rajdhani', system-ui, -apple-system, sans-serif;
  --mono: 'Share Tech Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --prose: 'Spectral', Georgia, serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(1200px 800px at 80% -10%, #16204a 0%, transparent 60%),
    radial-gradient(900px 700px at -10% 110%, #2a0f2e 0%, transparent 55%), var(--bg);
  color: var(--ink);
  font-family: var(--ui);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: var(--mono); color: var(--amber); }
.mono { font-family: var(--mono); letter-spacing: 0.02em; }
.dim { color: var(--ink-3); }
button { font: inherit; color: inherit; }

#stars { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -2; }
.scanlines {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 3px);
  mix-blend-mode: overlay;
}

/* ------------------------------------------------------------- top bar */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px clamp(16px, 4vw, 40px) 12px;
  max-width: 1280px; margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 14px; color: var(--ink); text-decoration: none !important; }
.brand-mark { width: 46px; height: 46px; filter: drop-shadow(0 0 10px rgba(77, 227, 255, 0.35)); animation: spin 60s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-title { font-family: var(--display); font-weight: 900; font-size: clamp(20px, 3.2vw, 30px); letter-spacing: 0.18em;
  background: linear-gradient(90deg, var(--amber), #ffe2b0 40%, var(--cyan)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand-sub { font-family: var(--mono); font-size: 11px; letter-spacing: 0.22em; color: var(--ink-3); margin-top: 4px; }
.telemetry { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.tele { display: flex; flex-direction: column; align-items: flex-end; padding: 6px 12px; border: 1px solid var(--line); border-radius: 10px; background: rgba(8, 12, 24, 0.6); }
.tele-k { font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-3); }
.tele-v { font-size: 15px; color: var(--amber); }
#countdown { color: var(--cyan); }

/* ------------------------------------------------------------- tabs */
.tabs {
  position: sticky; top: 0; z-index: 20;
  display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none;
  padding: 8px clamp(16px, 4vw, 40px);
  max-width: 1280px; margin: 0 auto;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  background: linear-gradient(to bottom, rgba(4, 6, 12, 0.92), rgba(4, 6, 12, 0.7));
  border-bottom: 1px solid var(--line);
}
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
  flex: none; display: flex; align-items: baseline; gap: 8px;
  padding: 8px 16px; border-radius: 999px 6px 6px 999px;
  color: var(--ink-2); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; font-size: 14px;
  border: 1px solid transparent; text-decoration: none !important; transition: all 0.2s;
}
.tab-n { font-family: var(--mono); font-size: 11px; color: var(--ink-3); }
.tabs a:hover { color: var(--ink); border-color: var(--line); }
.tabs a.active { color: #120a00; background: linear-gradient(90deg, var(--amber), #ffd08a); box-shadow: var(--glow-amber); }
.tabs a.active .tab-n { color: #5a3200; }

main { max-width: 1280px; margin: 0 auto; padding: 24px clamp(16px, 4vw, 40px) 60px; outline: none; }
.boot { padding: 80px 0; text-align: center; color: var(--cyan); }

/* ------------------------------------------------------------- panels */
.panel {
  position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(16px, 2.4vw, 26px); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.panel::before, .panel::after { /* HUD corner brackets */
  content: ''; position: absolute; width: 18px; height: 18px; pointer-events: none; border-color: var(--cyan); opacity: 0.7;
}
.panel::before { top: -1px; left: -1px; border-top: 2px solid; border-left: 2px solid; border-top-left-radius: var(--radius); }
.panel::after { bottom: -1px; right: -1px; border-bottom: 2px solid; border-right: 2px solid; border-bottom-right-radius: var(--radius); }
.panel.amber::before, .panel.amber::after { border-color: var(--amber); }

.eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--cyan); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.eyebrow .sep { color: var(--ink-3); }
h1, h2, h3 { font-family: var(--display); letter-spacing: 0.06em; margin: 0; line-height: 1.15; }
h1 { font-size: clamp(26px, 4.4vw, 44px); font-weight: 900; }
h2 { font-size: clamp(20px, 2.6vw, 26px); font-weight: 700; }
h3 { font-size: 16px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.section-title { display: flex; align-items: center; gap: 14px; margin: 38px 0 16px; }
.section-title::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line-2), transparent); }
.section-title h2 { font-size: 15px; letter-spacing: 0.26em; text-transform: uppercase; color: var(--ink-2); }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; border: 1px solid var(--line-2); color: var(--ink-2); white-space: nowrap; }
.badge.live { color: var(--green); border-color: rgba(92, 255, 177, 0.45); }
.badge.live::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); animation: pulse 1.4s ease-in-out infinite; }
.badge.closed { color: var(--ink-3); }
.badge.canon { color: #120a00; background: var(--amber); border-color: var(--amber); box-shadow: var(--glow-amber); }
.badge.new { color: #0a0014; background: var(--rose); border-color: var(--rose); }
.badge.away { color: var(--cyan); border-color: rgba(77, 227, 255, 0.5); }
.badge.lost { color: var(--rose); border-color: rgba(255, 92, 138, 0.5); }
@keyframes pulse { 50% { opacity: 0.35; } }

.btn { display: inline-flex; align-items: center; gap: 10px; padding: 11px 20px; border-radius: 999px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; font-size: 14px; cursor: pointer; border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.03); color: var(--ink); text-decoration: none !important; transition: all 0.2s; }
.btn:hover { border-color: var(--cyan); box-shadow: var(--glow-cyan); }
.btn.primary { background: linear-gradient(90deg, var(--amber), #ffd08a); color: #1a0e00; border: none; box-shadow: var(--glow-amber); }
.btn.primary:hover { filter: brightness(1.08); }
.btn svg { width: 16px; height: 16px; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }

/* ------------------------------------------------------------- bridge */
.bridge-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 22px; }
@media (max-width: 960px) { .bridge-grid { grid-template-columns: minmax(0, 1fr); } }
.hero h1 { margin: 10px 0 6px; }
.hero .question { font-family: var(--prose); font-size: clamp(18px, 2vw, 21px); color: var(--ink-2); font-style: italic; margin: 0 0 18px; }
.hero-media { border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #000; }
.hero-media video, .hero-media img { display: block; width: 100%; max-height: 520px; object-fit: contain; background: #000; }
.hero-top { display: grid; grid-template-columns: minmax(0, 1fr) 190px; gap: 20px; align-items: start; }
@media (max-width: 640px) { .hero-top { grid-template-columns: minmax(0, 1fr); } .hero-top .hero-media { max-width: 260px; } }

.vote-clock { display: flex; gap: 14px; align-items: center; margin: 4px 0 18px; flex-wrap: wrap; }
.vote-clock .mono { color: var(--cyan); font-size: 15px; }
.progress-ring { width: 44px; height: 44px; transform: rotate(-90deg); }
.progress-ring circle { fill: none; stroke-width: 4; }

/* options + bars */
.options { display: grid; gap: 12px; }
.opt {
  position: relative; overflow: hidden; border-radius: 12px; border: 1px solid var(--line); background: rgba(6, 10, 20, 0.7);
  padding: 14px 16px 14px 18px; transition: border-color 0.2s, transform 0.2s;
}
.opt:hover { border-color: var(--line-2); }
.opt-bar { position: absolute; inset: 0 auto 0 0; width: 0; background: linear-gradient(90deg, rgba(77, 227, 255, 0.2), rgba(77, 227, 255, 0.05)); transition: width 1.2s cubic-bezier(.2,.8,.2,1); z-index: 0; }
.opt.leader .opt-bar { background: linear-gradient(90deg, rgba(255, 179, 71, 0.3), rgba(255, 179, 71, 0.06)); }
.opt.canon { border-color: var(--amber); box-shadow: inset 0 0 0 1px rgba(255, 179, 71, 0.4), var(--glow-amber); }
.opt.untaken { opacity: 0.55; }
.opt > * { position: relative; z-index: 1; }
.opt-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.opt-label { font-weight: 700; font-size: 18px; letter-spacing: 0.02em; }
.opt-key { font-family: var(--mono); font-size: 12px; color: var(--ink-3); margin-right: 8px; }
.opt-pct { font-family: var(--display); font-weight: 700; font-size: 20px; color: var(--cyan); white-space: nowrap; }
.opt.leader .opt-pct { color: var(--amber); }
.opt-summary { color: var(--ink-2); font-size: 15px; margin-top: 4px; }
.opt-reason { margin-top: 8px; font-size: 14px; color: var(--ink-3); border-left: 2px solid var(--line-2); padding-left: 10px; font-style: italic; }
.opt-votes { font-family: var(--mono); font-size: 12px; color: var(--ink-3); }
.opt-tags { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }

.sentiment { margin-top: 18px; padding: 14px 16px; border-radius: 12px; border: 1px dashed var(--line-2); background: rgba(165, 139, 255, 0.06); }
.sentiment .eyebrow { color: var(--violet); }
.sentiment p { margin: 6px 0 0; font-size: 16px; }
.vote-meta { margin-top: 12px; font-family: var(--mono); font-size: 12px; color: var(--ink-3); display: flex; gap: 16px; flex-wrap: wrap; }
.no-votes { padding: 14px 16px; border-radius: 12px; border: 1px dashed var(--line-2); color: var(--ink-3); font-size: 15px; }

.side-stack { display: grid; gap: 22px; align-content: start; }
.path-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 12px; }
.chip { padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 14px; font-weight: 600; background: rgba(255, 255, 255, 0.03); color: var(--ink); text-decoration: none !important; }
.chip:hover { border-color: var(--amber); }
.chip.pending { border-style: dashed; color: var(--cyan); }
.chip-arrow { color: var(--ink-3); font-family: var(--mono); font-size: 12px; }

.stat-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.stat { padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: rgba(0, 0, 0, 0.25); }
.stat-v { font-family: var(--display); font-size: 22px; font-weight: 700; color: var(--amber); }
.stat-k { font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-3); }

.meter { height: 8px; border-radius: 99px; background: rgba(255, 255, 255, 0.06); overflow: hidden; margin: 10px 0 4px; }
.meter > span { display: block; height: 100%; background: linear-gradient(90deg, var(--cyan), var(--amber)); border-radius: 99px; box-shadow: var(--glow-cyan); }
.meter-cap { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 12px; color: var(--ink-3); }

.away-strip { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.away-strip .portrait { width: 64px; }

/* ------------------------------------------------------------- mission log */
.mission { margin-bottom: 26px; }
.mission-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.mission-num { font-family: var(--mono); color: var(--amber); letter-spacing: 0.24em; font-size: 13px; text-transform: uppercase; }
.beats { display: grid; gap: 10px; }
.beat-row {
  display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 16px; align-items: center;
  padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line); background: rgba(6, 10, 20, 0.6);
  color: var(--ink); text-decoration: none !important; transition: all 0.2s;
}
.beat-row:hover { border-color: var(--cyan); transform: translateX(3px); box-shadow: var(--glow-cyan); }
.beat-no { font-family: var(--display); font-weight: 900; font-size: 22px; color: var(--ink-3); text-align: center; }
.beat-row.open .beat-no { color: var(--green); }
.beat-title { font-weight: 700; font-size: 18px; }
.beat-sub { font-size: 14px; color: var(--ink-3); }
.beat-result { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; text-align: right; }
.mini-split { display: flex; width: 150px; height: 6px; border-radius: 99px; overflow: hidden; background: rgba(255, 255, 255, 0.05); }
.mini-split span { display: block; height: 100%; }
@media (max-width: 640px) {
  .beat-row { grid-template-columns: 40px minmax(0, 1fr); }
  .beat-result { grid-column: 2; align-items: flex-start; text-align: left; }
}

/* ------------------------------------------------------------- beat detail */
.detail { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 24px; align-items: start; }
@media (max-width: 960px) { .detail { grid-template-columns: minmax(0, 1fr); } }
.crumbs { font-family: var(--mono); font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 12px; }
.crumbs a { color: var(--ink-2); }
.prose { font-family: var(--prose); font-size: 19px; line-height: 1.72; color: #e7e3d8; }
.prose p { margin: 0 0 1.05em; }
.prose q, .prose .dlg { color: #ffe2b0; quotes: none; }
.prose .contact { font-family: var(--ui); font-weight: 700; color: var(--cyan); letter-spacing: 0.08em; }
.prose .choose { font-family: var(--display); font-weight: 900; font-size: 22px; letter-spacing: 0.2em; color: var(--amber); text-shadow: var(--glow-amber); }
.prose .aside { font-size: 15px; color: var(--ink-3); font-style: italic; }
.prose .headline { font-family: var(--display); font-size: 14px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-3); }
.media-stack { display: grid; gap: 12px; margin: 0 0 22px; }
.media-stack img, .media-stack video { width: 100%; border-radius: 12px; border: 1px solid var(--line); background: #000; display: block; }
.pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 26px; flex-wrap: wrap; }
.recap { margin-top: 22px; }
.recap summary { cursor: pointer; font-family: var(--mono); letter-spacing: 0.2em; text-transform: uppercase; font-size: 13px; color: var(--violet); }
.recap .prose { font-size: 17px; margin-top: 12px; }
.recap img { max-width: 360px; width: 100%; border-radius: 10px; border: 1px solid var(--line); }
.x-stats { display: flex; gap: 16px; flex-wrap: wrap; font-family: var(--mono); font-size: 13px; color: var(--ink-3); margin-top: 14px; }
.x-stats b { color: var(--ink-2); font-weight: 400; }
.sticky { position: sticky; top: 72px; }
@media (max-width: 960px) { .sticky { position: static; } }

/* ------------------------------------------------------------- timeline map */
.map { position: relative; padding: 10px 0 40px; }
.map::before { content: ''; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; transform: translateX(-50%); background: linear-gradient(var(--amber), var(--cyan) 60%, transparent); box-shadow: var(--glow-amber); opacity: 0.8; }
.node { position: relative; display: flex; flex-direction: column; align-items: center; padding: 18px 0; }
.node-core {
  position: relative; z-index: 2; text-align: center; max-width: 520px; padding: 12px 20px; border-radius: 14px;
  background: var(--panel-solid); border: 1px solid var(--line-2); color: var(--ink); text-decoration: none !important;
}
.node-core:hover { border-color: var(--amber); }
.node-core .eyebrow { justify-content: center; font-size: 11px; }
.node-core .t { font-family: var(--display); font-weight: 700; font-size: 17px; letter-spacing: 0.06em; margin-top: 4px; }
.node-core .q { font-size: 14px; color: var(--ink-3); margin-top: 2px; }
.node.open .node-core { border-color: var(--green); box-shadow: 0 0 22px rgba(92, 255, 177, 0.25); }
.branches { position: relative; z-index: 2; display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; max-width: 900px; }
.branch {
  position: relative; padding: 8px 14px; border-radius: 10px; font-size: 14px; font-weight: 600; background: rgba(6, 10, 20, 0.92);
  border: 1px dashed rgba(124, 134, 160, 0.4); color: var(--ink-3); min-width: 120px; text-align: center;
}
.branch .pct { display: block; font-family: var(--mono); font-size: 12px; font-weight: 400; }
.branch.taken { border: 1px solid var(--amber); color: #1a0e00; background: linear-gradient(90deg, var(--amber), #ffd08a); box-shadow: var(--glow-amber); }
.branch.leading { border: 1px solid var(--green); color: var(--green); border-style: solid; }
.branch.untaken { opacity: 0.75; }
.branch.untaken::after { content: 'unexplored timeline'; display: block; font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none; opacity: 0.7; }
.mission-divider { position: relative; z-index: 2; text-align: center; margin: 24px auto; }
.mission-divider span { display: inline-block; padding: 8px 22px; border-radius: 999px; background: var(--bg); border: 1px solid var(--amber); font-family: var(--display); font-weight: 900; letter-spacing: 0.24em; font-size: 13px; color: var(--amber); text-transform: uppercase; box-shadow: var(--glow-amber); }
.map-end { position: relative; z-index: 2; text-align: center; font-family: var(--mono); color: var(--cyan); letter-spacing: 0.2em; font-size: 13px; }

/* ------------------------------------------------------------- chronicle */
.chronicle { max-width: 760px; margin: 0 auto; }
.chapter { margin: 0 0 56px; }
.chapter h2 { margin: 6px 0 18px; }
.decision-card { margin: 22px 0 0; padding: 16px 18px; border-radius: 12px; border: 1px solid var(--amber); background: rgba(255, 179, 71, 0.06); font-family: var(--ui); }
.decision-card .eyebrow { color: var(--amber); }
.decision-card .choice { font-size: 20px; font-weight: 700; margin-top: 4px; }
.decision-card .why { color: var(--ink-2); font-size: 15px; margin-top: 4px; }
.decision-card.pending { border-color: var(--green); background: rgba(92, 255, 177, 0.05); }
.decision-card.pending .eyebrow { color: var(--green); }
.mission-title-card { text-align: center; margin: 20px 0 50px; padding: 40px 20px; border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
.mission-title-card .mission-num { display: block; margin-bottom: 8px; }

/* ------------------------------------------------------------- crew */
.crew-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.crew-card { border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: rgba(6, 10, 20, 0.7); transition: transform 0.2s, border-color 0.2s; }
.crew-card:hover { transform: translateY(-3px); border-color: var(--cyan); }
.crew-card.away { border-color: var(--cyan); box-shadow: var(--glow-cyan); }
.crew-card.lost { filter: grayscale(1); opacity: 0.6; }
.portrait { aspect-ratio: 153.6 / 256; background-repeat: no-repeat; background-size: 500% 400%; border-radius: 8px; }
.crew-card .portrait { border-radius: 0; }
.crew-info { padding: 10px 12px 12px; }
.crew-name { font-weight: 700; font-size: 16px; line-height: 1.2; }
.crew-role { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--amber); margin-top: 2px; }
.crew-origin { font-size: 13px; color: var(--ink-3); margin-top: 2px; }
.crew-card .opt-tags { margin-top: 8px; }
.origin-legend { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.origin-legend button { cursor: pointer; background: transparent; }
.origin-legend button.on { border-color: var(--amber); color: var(--amber); }
.assets { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.asset { padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line); background: rgba(6, 10, 20, 0.6); }
.asset .t { font-weight: 700; font-size: 17px; }
.asset .s { font-family: var(--mono); font-size: 12px; color: var(--cyan); text-transform: uppercase; letter-spacing: 0.12em; }
.asset .n { font-size: 14px; color: var(--ink-3); margin-top: 4px; }

/* ------------------------------------------------------------- comms */
.comms { display: grid; gap: 14px; max-width: 820px; }
.comm { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; }
.comm .prose { font-size: 17px; }
.comm img, .comm video { max-width: 200px; border-radius: 10px; border: 1px solid var(--line); }
@media (max-width: 640px) { .comm { grid-template-columns: minmax(0, 1fr); } }

.foot { max-width: 1280px; margin: 0 auto; padding: 20px clamp(16px, 4vw, 40px) 40px; color: var(--ink-3); font-size: 14px; border-top: 1px solid var(--line); }

.fade-in { animation: fadeIn 0.5s ease both; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } }
@media (max-width: 720px) { .hide-sm { display: none; } .topbar { flex-direction: column; align-items: flex-start; } .telemetry { justify-content: flex-start; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media (max-width: 480px) {
  .stat-v { font-size: 18px; }
  .stat-k { letter-spacing: 0.08em; }
  .opt-label { font-size: 16px; }
  .eyebrow { letter-spacing: 0.14em; }
}
.morale { margin-top: 12px; max-width: 420px; }
.incoming { margin-bottom: 22px; border-color: rgba(92, 255, 177, 0.5); box-shadow: 0 0 26px rgba(92, 255, 177, 0.18); }

/* ------------------------------------------------------------- about */
.about .lead { max-width: 780px; font-size: 18px; margin: 0 0 18px; }
.about-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: 820px; }
@media (max-width: 640px) { .about-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.flow {
  display: grid; gap: 0;
  grid-template-columns: minmax(0, 1fr) 120px minmax(0, 1fr) 120px minmax(0, 1fr);
  grid-template-areas: "a e1 b e2 c" ". . . . e3" "g e5 f e4 d";
}
.flow.side { grid-template-areas: "a e1 b . ."; padding-left: 14px; border-left: 2px dashed rgba(165, 139, 255, 0.5); }
.flow-node { padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line-2); background: rgba(6, 10, 20, 0.85); }
.flow-node.amber { border-color: var(--amber); box-shadow: inset 0 0 0 1px rgba(255, 179, 71, 0.2); }
.flow-node.cyan { border-color: var(--cyan); box-shadow: var(--glow-cyan); }
.flow-node.violet { border-color: var(--violet); box-shadow: 0 0 18px rgba(165, 139, 255, 0.35); }
.flow-t { font-family: var(--display); font-size: 13px; font-weight: 700; letter-spacing: 0.08em; }
.flow-s { font-size: 14px; color: var(--ink-2); margin-top: 6px; line-height: 1.4; }
/* Edges: a connector line with an arrowhead; the label sits in the gap, never over a node. */
.flow-edge { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 0 10px; }
.flow-edge i { position: relative; display: block; width: 100%; height: 2px; background: linear-gradient(90deg, rgba(255, 179, 71, 0.2), var(--amber)); }
.flow-edge i::after { content: ''; position: absolute; right: -2px; top: -4px; border: 5px solid transparent; border-left: 8px solid var(--amber); border-right: 0; }
.flow-edge.left i { transform: scaleX(-1); }
.flow-edge.down { flex-direction: row; justify-content: center; padding: 10px 0; min-height: 64px; }
.flow-edge.down i { width: 2px; height: 44px; background: linear-gradient(180deg, rgba(255, 179, 71, 0.2), var(--amber)); }
.flow-edge.down i::after { right: auto; left: -4px; top: auto; bottom: -2px; border: 5px solid transparent; border-top: 8px solid var(--amber); border-bottom: 0; }
.flow-edge span { font-family: var(--mono); font-size: 10.5px; line-height: 1.3; letter-spacing: 0.04em; color: var(--ink-3); text-align: center; }
.flow-edge.down span { text-align: left; max-width: 150px; }
@media (max-width: 860px) {
  .flow, .flow.side { grid-template-columns: minmax(0, 1fr); grid-template-areas: none; }
  .flow > * { grid-area: auto !important; }
  .flow-edge, .flow-edge.left, .flow-edge.down { flex-direction: row; justify-content: flex-start; gap: 12px; padding: 8px 0 8px 22px; min-height: 0; }
  .flow-edge i, .flow-edge.left i, .flow-edge.down i { transform: none; width: 2px; height: 30px; background: linear-gradient(180deg, rgba(255, 179, 71, 0.2), var(--amber)); }
  .flow-edge i::after, .flow-edge.left i::after, .flow-edge.down i::after { right: auto; left: -4px; top: auto; bottom: -2px; border: 5px solid transparent; border-top: 8px solid var(--amber); border-bottom: 0; }
  .flow-edge span, .flow-edge.down span { text-align: left; max-width: none; }
}
.about-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 18px; }
.about-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 860px) { .about-grid, .about-grid.three { grid-template-columns: minmax(0, 1fr); } }
.about-grid p, .about-grid li { color: var(--ink-2); font-size: 16px; }
.about-grid ul { padding-left: 20px; margin: 8px 0; }
.about-grid li { margin-bottom: 6px; }
.code { font-family: var(--mono); font-size: 12.5px; line-height: 1.5; color: #cfe9ff; background: rgba(0, 0, 0, 0.45); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; overflow-x: auto; margin: 10px 0 0; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.about-table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 640px; }
.about-table th { text-align: left; font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); padding: 10px 12px; border-bottom: 1px solid var(--line-2); }
.about-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.about-table tr:last-child td { border-bottom: 0; }
.sample-note { margin-top: 14px; padding: 10px 14px; border-radius: 10px; border: 1px dashed rgba(255, 92, 138, 0.5); background: rgba(255, 92, 138, 0.06); font-size: 14px; color: var(--ink-2); }
.sample-note .badge { color: var(--rose); border-color: rgba(255, 92, 138, 0.5); margin-right: 6px; }
.source-status.warn { border-color: rgba(255, 92, 138, 0.45); }
.source-status p { color: var(--ink-2); font-size: 15px; }
