/* ═══════════════════════════════════════════════════════════════
   CYBER OVERRIDE THEME — "Wigforss // Maskinrummet"
   Loads AFTER styles.css. Dark terminal aesthetic, neon S-red,
   cyan telemetry accents. Original light theme stays intact in
   styles.css — remove this file + cyber.js to revert.
   ═══════════════════════════════════════════════════════════════ */

:root {
  --bg:           #05070b;
  --bg-warm:      #090c12;
  --bg-section:   #0c1018;
  --surface:      #0e131d;
  --text:         #e8ebf2;
  --text-soft:    #b3bac7;
  --text-muted:   #69728a;
  --accent:       #ff2b47;
  --accent-light: #ff6671;
  --accent-dark:  #c9162e;
  --accent-glow:  rgba(255, 43, 71, 0.18);
  --accent-glow2: rgba(255, 102, 113, 0.12);
  --cyan:         #4df3ff;
  --cyan-dim:     rgba(77, 243, 255, 0.55);
  --cyan-glow:    rgba(77, 243, 255, 0.14);
  --border:       rgba(255, 43, 71, 0.28);
  --border-soft:  rgba(130, 150, 190, 0.13);
  --panel:        linear-gradient(165deg, rgba(20, 26, 40, 0.92) 0%, rgba(10, 13, 21, 0.96) 100%);
  --panel-flat:   #0d1219;
  --shadow-soft:  0 4px 24px rgba(0, 0, 0, 0.45);
  --shadow-med:   0 8px 40px rgba(0, 0, 0, 0.55);
  --shadow-lg:    0 20px 60px rgba(0, 0, 0, 0.65);
  --radius:       10px;
  --radius-sm:    6px;
  --mono:         'IBM Plex Mono', 'Courier New', monospace;
}

/* ── Base atmosphere ── */
body {
  background:
    radial-gradient(ellipse 90% 60% at 50% -10%, rgba(255, 43, 71, 0.07), transparent 60%),
    radial-gradient(ellipse 70% 50% at 85% 110%, rgba(77, 243, 255, 0.045), transparent 60%),
    var(--bg);
  color: var(--text);
}

/* grain → keep, slightly stronger on dark */
body::before { opacity: 0.05; }

/* scanlines — full-page CRT layer */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 10001;
  pointer-events: none;
  background: repeating-linear-gradient(
    180deg,
    transparent 0px,
    transparent 2px,
    rgba(0, 0, 0, 0.16) 3px,
    transparent 4px
  );
  opacity: 0.35;
  mix-blend-mode: multiply;
}

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

* { scrollbar-width: thin; scrollbar-color: rgba(255,43,71,0.4) #0a0d13; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #0a0d13; }
::-webkit-scrollbar-thumb { background: linear-gradient(180deg, var(--accent-dark), #5a0f1c); border-radius: 0; border: 2px solid #0a0d13; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ── Progress bar: charged beam ── */
#progress {
  height: 2px;
  background: linear-gradient(90deg, var(--accent-dark), var(--accent) 70%, var(--cyan));
  box-shadow: 0 0 12px var(--accent), 0 0 28px rgba(255, 43, 71, 0.5);
}

/* ── Navigation ── */
.main-nav.scrolled {
  background: rgba(7, 9, 14, 0.82);
  backdrop-filter: blur(20px) saturate(1.3);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
  box-shadow: 0 1px 0 rgba(255, 43, 71, 0.25), 0 8px 32px rgba(0, 0, 0, 0.5);
}
.nav-brand {
  font-family: var(--mono);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.85rem;
  color: var(--accent);
  text-shadow: 0 0 14px rgba(255, 43, 71, 0.6);
}
.nav-hamburger {
  border-color: rgba(255, 43, 71, 0.3);
  background: rgba(10, 13, 20, 0.6);
  border-radius: 2px;
}
.nav-hamburger:hover { background: var(--accent-glow); box-shadow: 0 0 16px rgba(255,43,71,0.35); }
.hbl, .main-nav.scrolled .hbl { background: var(--accent); box-shadow: 0 0 6px rgba(255,43,71,0.8); }

.nav-drawer {
  background: rgba(7, 9, 14, 0.94);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.8), inset 0 -1px 0 rgba(255,43,71,0.2);
}
.nav-drawer-link { border-radius: 2px; border: 1px solid transparent; }
.nav-drawer-link:hover,
.nav-drawer-link.active {
  background: rgba(255, 43, 71, 0.08);
  border-color: rgba(255, 43, 71, 0.25);
}
.nav-drawer-num {
  font-family: var(--mono);
  color: var(--cyan);
  opacity: 0.7;
  text-shadow: 0 0 8px var(--cyan-glow);
}
.nav-drawer-title { color: var(--text-soft); }
.nav-drawer-link.completed .nav-drawer-num { color: var(--text-muted); }

/* ── Sound toggle ── */
.sound-btn {
  background: rgba(10, 13, 20, 0.85);
  border-color: rgba(255, 43, 71, 0.35);
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(255,43,71,0.08), 0 4px 24px rgba(0,0,0,0.5);
}
.sound-btn:hover {
  background: rgba(20, 14, 18, 0.95);
  box-shadow: 0 0 18px rgba(255, 43, 71, 0.4);
}
.sound-btn svg { stroke: var(--accent); filter: drop-shadow(0 0 4px rgba(255,43,71,0.7)); }
.sound-info {
  background: rgba(8, 10, 16, 0.95);
  border: 1px solid var(--border-soft);
  border-left: 2px solid var(--accent);
  border-radius: 2px;
}
.sound-info .poem-title { color: var(--text); }

/* ── Hero ── */
.hero { background: transparent; }
.hero::before {
  background-image:
    linear-gradient(rgba(255, 43, 71, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 43, 71, 0.06) 1px, transparent 1px);
  background-size: 56px 56px;
}
.geo-shape {
  filter: blur(70px);
  opacity: 0.5;
}
.geo-1 { background: radial-gradient(circle, rgba(255, 43, 71, 0.25), transparent 70%); }
.geo-2 { background: radial-gradient(circle, rgba(77, 243, 255, 0.12), transparent 70%); }
.geo-3 { background: radial-gradient(circle, rgba(255, 43, 71, 0.18), transparent 70%); }

.hero-logo {
  filter: drop-shadow(0 0 24px rgba(255, 43, 71, 0.55)) drop-shadow(0 0 80px rgba(255, 43, 71, 0.25));
}
.authors-label {
  font-family: var(--mono);
  color: var(--cyan);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.authors-list { font-family: var(--mono); font-size: 0.82rem; color: var(--text-muted); }

.hero h1 {
  text-shadow: 0 0 50px rgba(255, 43, 71, 0.25);
}
.hero h1 em {
  color: var(--accent);
  text-shadow: 0 0 18px rgba(255, 43, 71, 0.85), 0 0 60px rgba(255, 43, 71, 0.4);
}
.hero-sub { color: var(--text-soft); }

.scroll-indicator span { font-family: var(--mono); color: var(--cyan-dim); }
.scroll-line { background: linear-gradient(180deg, var(--accent), transparent); box-shadow: 0 0 8px rgba(255,43,71,0.5); }

/* ── Sections ── */
.section { border-bottom: 1px solid rgba(255, 43, 71, 0.1); }
.section-num {
  font-family: var(--mono);
  font-weight: 600;
  -webkit-text-stroke: 1px rgba(255, 43, 71, 0.45);
  color: transparent;
  text-shadow: 0 0 40px rgba(255, 43, 71, 0.25);
}
.section:hover .section-num { color: rgba(255, 43, 71, 0.12); }
.section-title { color: var(--text); }
.section-tag {
  font-family: var(--mono);
  background: rgba(77, 243, 255, 0.07);
  color: var(--cyan);
  border: 1px solid rgba(77, 243, 255, 0.3);
  border-radius: 2px;
  text-shadow: 0 0 8px var(--cyan-glow);
}
.section-content p { color: var(--text-soft); }
.section-content strong { color: var(--accent-light); }
.section-content em { color: var(--text); }

/* links */
.body-link, .cite { color: var(--accent-light); }
.body-link:hover, .cite:hover { color: var(--cyan); }

/* ── Quote / scenario / definition blocks ── */
.quote-block {
  background: linear-gradient(135deg, rgba(255, 43, 71, 0.07), rgba(12, 16, 24, 0.6));
  border-left: 2px solid var(--accent);
  box-shadow: inset 0 0 50px rgba(255, 43, 71, 0.05);
}
.scenario-block {
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-left: 2px solid var(--accent);
  border-radius: 4px;
  padding: 28px 30px;
  box-shadow: var(--shadow-soft);
}
.scenario-block-label { font-family: var(--mono); color: var(--cyan); letter-spacing: 0.1em; }
.scenario-block p { color: var(--text-soft); }

.definition-block {
  background: rgba(77, 243, 255, 0.04);
  border: 1px solid rgba(77, 243, 255, 0.2);
  border-radius: 4px;
}
.definition-label { font-family: var(--mono); color: var(--cyan); letter-spacing: 0.14em; text-transform: uppercase; }
.definition-body { color: var(--text-soft); }

.section-summary {
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-top: 2px solid var(--accent);
  border-radius: 4px;
}
.summary-label { font-family: var(--mono); color: var(--accent); letter-spacing: 0.16em; }
.summary-item { color: var(--text-soft); }

.reform-preview { border-color: var(--border-soft); }
.reform-preview-label, .reform-preview-num { font-family: var(--mono); color: var(--cyan); }
.reform-preview-title { color: var(--text); }

/* ── Tooltips ── */
.kw { color: var(--accent-light); border-bottom-color: rgba(255, 43, 71, 0.5); }
.kw:hover { color: var(--cyan); }
.kw-tip, .kw-tip::after {
  background: #0c1019;
  border-color: var(--border);
}
.kw-tip { box-shadow: 0 0 0 1px rgba(255,43,71,0.12), 0 16px 48px rgba(0,0,0,0.7), 0 0 32px rgba(255,43,71,0.12); border-radius: 3px; }
.kw-tip strong { color: var(--accent-light); }
.kw-tip p { color: var(--text-soft); }
.fn-tip {
  background: #0c1019;
  border-color: var(--border);
  color: var(--text-soft);
  border-radius: 3px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.7);
}

/* ── Stat cards / data panels ── */
.stat-card, .group-card, .ai-insikt, .scb-ai-block, .job-category,
.ldiv-chart-wrap, .conc-card, .conc-spend, .legal-challenge,
.canaries-figure, .dropdown-item {
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-radius: 4px;
  box-shadow: var(--shadow-soft);
}
.stat-card { box-shadow: var(--shadow-soft), inset 0 1px 0 rgba(255,255,255,0.04); }
.stat-value {
  font-family: var(--mono);
  color: var(--text);
  text-shadow: 0 0 24px rgba(255, 43, 71, 0.5);
}
.stat-label { color: var(--text-soft); }
.stat-source, .group-card-source, .scb-ai-source, .ai-insikts-source,
.conc-sources, .chart-caption, .exposure-chart-source, .canaries-figcaption,
.pyramid-caption, .ldiv-caption {
  font-family: var(--mono);
  font-size: 0.68rem !important;
  color: var(--text-muted);
}

.live-indicator, .live-indicator.mini {
  font-family: var(--mono);
  color: var(--cyan);
  border-color: rgba(77, 243, 255, 0.35);
  background: rgba(77, 243, 255, 0.06);
}
.live-indicator .live-dot { background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.live-indicator.active .live-dot { background: var(--cyan); }
.live-text { color: var(--cyan); letter-spacing: 0.14em; }

.donut-bg { stroke: rgba(255, 255, 255, 0.07); }
.donut-pct { fill: var(--text); font-family: var(--mono); }
.donut-year { fill: var(--text-muted); font-family: var(--mono); }
.ai-insikt-label { color: var(--text-soft); }

.group-card-title { color: var(--text); }
.group-trend-val { font-family: var(--mono); color: var(--text); }
.group-trend-point--now .group-trend-val { color: var(--accent-light); text-shadow: 0 0 14px rgba(255,43,71,0.5); }
.group-trend-label { font-family: var(--mono); color: var(--text-muted); }
.spark-line { stroke: var(--accent); filter: drop-shadow(0 0 4px rgba(255,43,71,0.6)); }
.edu-change-badge {
  font-family: var(--mono);
  background: rgba(255, 43, 71, 0.1);
  color: var(--accent-light);
  border: 1px solid rgba(255, 43, 71, 0.3);
  border-radius: 2px;
}
.edu-bar-pct, .scb-bar-val, .pla-bar-val, .edu-bar-year, .scb-bar-year, .pla-bar-label { font-family: var(--mono); }
.edu-bar-fill, .scb-bar-fill, .pla-bar-fill { box-shadow: 0 0 10px rgba(255, 43, 71, 0.35); }
.scb-bar-fill--large { box-shadow: 0 0 10px rgba(255, 102, 113, 0.4); }

.group-inference {
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-left: 2px solid var(--cyan);
  border-radius: 4px;
}

.pla-card { background: var(--panel); border: 1px solid var(--border-soft); border-radius: 4px; }
.pla-change { font-family: var(--mono); }

.canaries-callout, .stanford-callout, .study-block {
  background: rgba(13, 17, 26, 0.6);
  border: 1px solid var(--border-soft);
  border-radius: 4px;
}
.canaries-title { color: var(--accent-light); }
.canaries-text, .stanford-text { color: var(--text-soft); }
.canaries-cite { font-family: var(--mono); font-size: 0.7rem !important; color: var(--text-muted); }
.canaries-link { color: var(--accent-light); }
.canaries-figure img { filter: invert(0.92) hue-rotate(180deg) saturate(1.4) contrast(0.95); border-radius: 2px; }

/* ── Chapter breaks: signal bands ── */
.chapter-break {
  background:
    repeating-linear-gradient(90deg, transparent 0 18px, rgba(255, 43, 71, 0.04) 18px 19px),
    linear-gradient(180deg, #0a0d13, #07090e);
  border-top: 1px solid rgba(255, 43, 71, 0.18);
  border-bottom: 1px solid rgba(255, 43, 71, 0.18);
  box-shadow: inset 0 0 60px rgba(255, 43, 71, 0.05);
}
.chapter-break-num { font-family: var(--mono); color: var(--accent); text-shadow: 0 0 16px rgba(255,43,71,0.7); }
.chapter-break-title { font-family: var(--mono); letter-spacing: 0.22em; text-transform: uppercase; }
.chapter-break-line { background: linear-gradient(90deg, transparent, rgba(255, 43, 71, 0.5), transparent); height: 1px; }

/* ── Timeline ── */
.timeline-item::before {
  background: #0c1019;
  border: 2px solid var(--accent);
  box-shadow: 0 0 12px rgba(255, 43, 71, 0.6);
}
.timeline-label { color: var(--text); }
.timeline-text { color: var(--text-muted); }
.expand-icon { color: var(--accent); }
.dropdown-item h4 { color: var(--accent-light); }
.dropdown-item p { color: var(--text-soft); }
.dropdown-source { font-family: var(--mono); color: var(--text-muted); }

/* ── BNP chart ── */
.chart-section { background: transparent; }
.chart-title { color: var(--text); }
.axis-label { fill: var(--text-muted); font-family: var(--mono); }
.value-label { fill: var(--text-soft); font-family: var(--mono); }
.chart-line { filter: drop-shadow(0 0 6px rgba(255, 43, 71, 0.6)); }
.chart-dots circle { fill: var(--accent); stroke: #0c1019; }
.decline-zone { fill: rgba(255, 43, 71, 0.07); stroke: rgba(255, 43, 71, 0.3); stroke-dasharray: 6 4; }
.chart-tooltip {
  background: #0c1019;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 2px;
  font-family: var(--mono);
  box-shadow: 0 8px 32px rgba(0,0,0,0.7);
}
.chart-callout { background: var(--panel); border: 1px solid var(--border-soft); border-radius: 4px; }
.callout-text { color: var(--text-soft); }
.chart-overlay { background: rgba(4, 5, 8, 0.92); backdrop-filter: blur(8px); }
.chart-overlay-content { background: #0c1019; border: 1px solid var(--border); border-radius: 4px; }
.overlay-comparison { background: rgba(255, 43, 71, 0.08); color: var(--text); border-radius: 3px; }
.overlay-year-label { fill: var(--text-soft); font-family: var(--mono); }
.decline-amount { fill: var(--accent-light); }

/* ── Exposure scatter (existing) ── */
.exposure-chart-title { color: var(--text); }
.exposure-tip {
  background: #0c1019;
  border: 1px solid var(--border);
  color: var(--text-soft);
  border-radius: 2px;
  font-family: var(--mono);
  box-shadow: 0 12px 40px rgba(0,0,0,0.7), 0 0 24px rgba(255,43,71,0.12);
}
.exp-leg-item {
  font-family: var(--mono);
  background: rgba(13, 17, 26, 0.6);
  border: 1px solid var(--border-soft);
  border-radius: 2px;
  color: var(--text-soft);
}
.exp-leg-item.active, .exp-leg-item:hover {
  border-color: var(--accent);
  background: rgba(255, 43, 71, 0.08);
  box-shadow: 0 0 14px rgba(255, 43, 71, 0.2);
}
.exp-leg-dot { background: var(--accent); box-shadow: 0 0 6px rgba(255,43,71,0.7); }
.exp-leg-vals { color: var(--text-muted); }

/* ── Jobs / conc ── */
.job-icon { filter: grayscale(1) brightness(1.6) sepia(1) hue-rotate(-50deg) saturate(4); }
.job-title { color: var(--text-soft); }
.conc-ratio-n, .conc-share-n, .conc-share-pct { font-family: var(--mono); color: var(--accent); text-shadow: 0 0 20px rgba(255,43,71,0.5); }
.conc-ratio-x, .conc-share-companies { color: var(--text-muted); font-family: var(--mono); }
.conc-card-label, .conc-sme-note { color: var(--text-soft); }
.conc-spend-title { font-family: var(--mono); color: var(--text-muted); letter-spacing: 0.08em; }
.conc-spend-lbl { color: var(--text-soft); }
.conc-spend-pct-lbl { font-family: var(--mono); color: var(--text); }
.conc-size-name { font-family: var(--mono); color: var(--text-muted); }
.conc-size-fill { box-shadow: 0 0 10px rgba(255,43,71,0.4); }
.conc-spend-seg--oth { background: rgba(255,255,255,0.07); border-color: var(--border-soft); }

/* ── ldiv (K-divergence chart) ── */
.ldiv-svg line[stroke^="rgba(0,0,0"] { stroke: rgba(255, 255, 255, 0.1); }
.ldiv-launch-txt, .ldiv-year, .ldiv-zero, .ldiv-end { font-family: var(--mono); }
.ldiv-path--omx { filter: drop-shadow(0 0 5px rgba(77, 243, 255, 0.5)); stroke: var(--cyan); }
.ldiv-end--omx { fill: var(--cyan); }
.ldiv-leg--omx::before { background: var(--cyan); }
.ldiv-path--jobs { filter: drop-shadow(0 0 5px rgba(255, 43, 71, 0.5)); }
.ldiv-leg { font-family: var(--mono); color: var(--text-soft); }

/* ── Reform sections / pol cards / legal / cost table ── */
.reform-section { border-color: var(--border-soft); background: rgba(11, 14, 22, 0.5); border-radius: 4px; }
.reform-header { background: rgba(15, 19, 30, 0.8); }
.reform-header:hover { background: rgba(255, 43, 71, 0.06); }
.reform-num { font-family: var(--mono); color: var(--cyan); }
.reform-title { color: var(--text); }
.reform-subhead { color: var(--accent-light); }
.reform-body p { color: var(--text-soft); }
.pwai-list li { color: var(--text-soft); }
.pwai-list li::marker { color: var(--accent); font-family: var(--mono); }

.pol-card { background: var(--panel); border-color: var(--border-soft); border-radius: 4px; }
.pol-card-title { color: var(--text); }
.pol-card-body { color: var(--text-soft); }
.pol-card-note { border-color: var(--border-soft); color: var(--text-muted); }
.pol-note-label { font-family: var(--mono); color: var(--cyan); }
.pol-conclusion { background: rgba(13, 17, 26, 0.6); border: 1px solid var(--border-soft); border-radius: 4px; }
.pol-conclusion p { color: var(--text-soft); }

.legal-challenge-num {
  font-family: var(--mono);
  background: rgba(255, 43, 71, 0.12);
  color: var(--accent-light);
  border: 1px solid rgba(255, 43, 71, 0.3);
}
.legal-challenge-title { color: var(--text); }
.legal-challenge-body { color: var(--text-soft); }
.legal-challenge-solution { color: var(--text-soft); border-color: var(--border-soft); }
.legal-sol-label { font-family: var(--mono); color: var(--cyan); }

.cost-table-wrap { border-color: var(--border-soft); border-radius: 4px; }
.cost-table th {
  font-family: var(--mono);
  background: rgba(15, 19, 30, 0.9);
  color: var(--text-muted);
  letter-spacing: 0.06em;
}
.cost-table td { color: var(--text-soft); border-color: var(--border-soft) !important; }
.cost-table-total td { color: var(--text); background: rgba(255, 43, 71, 0.07); }

/* ── References ── */
.ref-category-title { color: var(--text); border-color: rgba(255, 43, 71, 0.25); }
.ref-item { color: var(--text-soft); }

/* ── Video overlay ── */
.video-overlay { background: rgba(3, 4, 7, 0.93); backdrop-filter: blur(10px); }
.video-overlay-content { background: #0a0d13; border: 1px solid var(--border); border-radius: 4px; }
.video-overlay-title { color: var(--text); font-family: var(--mono); }
.video-trigger { border-radius: 2px; font-family: var(--mono); box-shadow: 0 0 14px rgba(255, 43, 71, 0.35); }

/* ── Wigforssbot ── */
.wbot-fab {
  background: #0c1019;
  border: 1px solid var(--border);
  box-shadow: 0 0 22px rgba(255, 43, 71, 0.3), 0 8px 30px rgba(0, 0, 0, 0.6);
}
.wbot-window { border: 1px solid var(--border); box-shadow: 0 0 0 1px rgba(255,43,71,0.1), 0 24px 80px rgba(0,0,0,0.8); }

/* ── Footer ── */
footer { border-top: 1px solid rgba(255, 43, 71, 0.15); }

/* ═══════════════════════════════════════
   NEW CYBER ELEMENTS (injected by cyber.js)
   ═══════════════════════════════════════ */

/* neural canvas */
#neuralCanvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.hero, .main, .chapter-break, .chart-section, footer { position: relative; z-index: 1; }

/* HUD status strip */
#hudStatus {
  position: fixed;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  z-index: 900;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  color: var(--cyan-dim);
  text-transform: uppercase;
  pointer-events: none;
  text-shadow: 0 0 8px var(--cyan-glow);
}
#hudStatus .hud-line { display: flex; align-items: center; gap: 7px; }
#hudStatus .hud-bar {
  width: 3px;
  height: 64px;
  background: rgba(77, 243, 255, 0.12);
  position: relative;
  overflow: hidden;
}
#hudStatus .hud-bar-fill {
  position: absolute;
  left: 0; right: 0; top: 0;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
  height: 0%;
}
#hudStatus .hud-sec { color: var(--accent-light); text-shadow: 0 0 8px rgba(255,43,71,0.5); }
@media (max-width: 1100px) { #hudStatus { display: none; } }

/* corner brackets */
.hud-corner {
  position: fixed;
  width: 22px;
  height: 22px;
  z-index: 900;
  pointer-events: none;
  border: 1px solid rgba(255, 43, 71, 0.4);
}
.hud-corner--tl { top: 10px; left: 10px; border-right: none; border-bottom: none; }
.hud-corner--br { bottom: 10px; right: 10px; border-left: none; border-top: none; }
@media (max-width: 800px) { .hud-corner { display: none; } }

/* command palette */
#cmdPalette {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 14vh;
  background: rgba(3, 4, 7, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
#cmdPalette.open { display: flex; }
.cmd-box {
  width: min(620px, calc(100vw - 40px));
  background: #0a0d14;
  border: 1px solid var(--border);
  border-radius: 4px;
  box-shadow: 0 0 0 1px rgba(255, 43, 71, 0.1), 0 40px 120px rgba(0, 0, 0, 0.9), 0 0 60px rgba(255, 43, 71, 0.12);
  overflow: hidden;
  animation: cmdIn 0.18s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes cmdIn { from { opacity: 0; transform: translateY(-14px) scale(0.985); } to { opacity: 1; transform: none; } }
.cmd-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255, 43, 71, 0.18);
}
.cmd-prompt { font-family: var(--mono); color: var(--accent); font-weight: 600; text-shadow: 0 0 10px rgba(255,43,71,0.6); }
#cmdInput {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font-family: var(--mono);
  font-size: 0.95rem;
  color: var(--text);
  caret-color: var(--accent);
}
#cmdInput::placeholder { color: var(--text-muted); }
.cmd-esc {
  font-family: var(--mono);
  font-size: 0.6rem;
  color: var(--text-muted);
  border: 1px solid var(--border-soft);
  border-radius: 2px;
  padding: 3px 7px;
  letter-spacing: 0.1em;
}
.cmd-list { max-height: 46vh; overflow-y: auto; padding: 6px; }
.cmd-item {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 10px 13px;
  border-radius: 2px;
  cursor: pointer;
  border: 1px solid transparent;
}
.cmd-item.sel {
  background: rgba(255, 43, 71, 0.09);
  border-color: rgba(255, 43, 71, 0.35);
  box-shadow: inset 0 0 24px rgba(255, 43, 71, 0.05);
}
.cmd-item-num {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--cyan);
  min-width: 26px;
  text-shadow: 0 0 8px var(--cyan-glow);
}
.cmd-item-title { font-size: 0.9rem; color: var(--text-soft); flex: 1; }
.cmd-item.sel .cmd-item-title { color: var(--text); }
.cmd-item-kind {
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.cmd-empty { font-family: var(--mono); font-size: 0.8rem; color: var(--text-muted); padding: 22px; text-align: center; }
.cmd-foot {
  display: flex;
  gap: 18px;
  padding: 9px 18px;
  border-top: 1px solid var(--border-soft);
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  text-transform: uppercase;
}
.cmd-foot b { color: var(--cyan-dim); font-weight: 500; }

/* palette hint chip */
#cmdHint {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 900;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: rgba(8, 10, 16, 0.8);
  border: 1px solid var(--border-soft);
  border-radius: 2px;
  padding: 6px 12px;
  pointer-events: none;
  transition: opacity 0.6s;
}
#cmdHint b { color: var(--accent-light); font-weight: 600; }
#cmdHint.hidden { opacity: 0; }
@media (max-width: 800px) { #cmdHint { display: none; } }

/* decrypt effect */
.decrypting { color: var(--accent-light) !important; }

/* glitch on hero em */
@keyframes microGlitch {
  0%, 92%, 100% { transform: none; filter: none; clip-path: none; }
  93% { transform: translate(-3px, 1px) skewX(-4deg); filter: hue-rotate(40deg); }
  94% { transform: translate(3px, -2px); clip-path: inset(20% 0 30% 0); }
  95% { transform: translate(-2px, 0) skewX(3deg); clip-path: inset(60% 0 5% 0); }
  96% { transform: none; clip-path: none; }
}
.hero h1 em { display: inline-block; animation: microGlitch 5.5s infinite steps(1); }

/* tilt cards */
.tilt-card { transform-style: preserve-3d; will-change: transform; transition: box-shadow 0.3s; position: relative; }
.tilt-card.tilting { transition: none; }
.tilt-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 92, 110, 0.1), transparent 45%);
}
.tilt-card:hover::after { opacity: 1; }
.tilt-card:hover { box-shadow: 0 18px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(255, 43, 71, 0.14); }

/* ── AI-exposure quadrant explorer (HUD radar) ── */
.qx-block { margin: 44px 0; }
.qx-frame {
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-radius: 4px;
  padding: 22px 22px 16px;
  position: relative;
  box-shadow: var(--shadow-soft);
}
.qx-frame::before, .qx-frame::after {
  content: '';
  position: absolute;
  width: 16px; height: 16px;
  border: 1px solid var(--accent);
  opacity: 0.7;
}
.qx-frame::before { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.qx-frame::after { bottom: -1px; right: -1px; border-left: none; border-top: none; }
.qx-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.qx-title {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cyan);
  text-shadow: 0 0 10px var(--cyan-glow);
}
.qx-sub { font-family: var(--mono); font-size: 0.62rem; color: var(--text-muted); letter-spacing: 0.08em; }
.qx-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 10px; }
.qx-chip {
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.07em;
  padding: 6px 11px;
  border-radius: 2px;
  border: 1px solid var(--border-soft);
  background: rgba(13, 17, 26, 0.7);
  color: var(--text-soft);
  cursor: pointer;
  transition: all 0.18s;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.qx-chip .qx-dot { width: 7px; height: 7px; border-radius: 50%; }
.qx-chip:hover { border-color: var(--accent); color: var(--text); }
.qx-chip.on { border-color: var(--accent); background: rgba(255, 43, 71, 0.1); color: var(--text); box-shadow: 0 0 14px rgba(255, 43, 71, 0.18); }
.qx-svg-wrap { position: relative; }
.qx-svg { width: 100%; height: auto; display: block; }
.qx-tip {
  position: absolute;
  pointer-events: none;
  background: #0c1019;
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 9px 12px;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text);
  opacity: 0;
  transition: opacity 0.12s;
  z-index: 5;
  white-space: nowrap;
  box-shadow: 0 10px 36px rgba(0,0,0,0.7), 0 0 20px rgba(255,43,71,0.12);
}
.qx-tip .qx-tip-sub { display: block; margin-top: 3px; font-size: 0.6rem; color: var(--text-muted); letter-spacing: 0.06em; }
.qx-tip.visible { opacity: 1; }
.qx-src { font-family: var(--mono); font-size: 0.62rem; color: var(--text-muted); margin-top: 10px; }

/* ── Hero disposition fix: logo + authors tucked into corner, clear of headline ── */
@media (min-width: 901px) {
  .hero-logo {
    top: 92px;
    left: 44px;
    right: auto;
    width: 220px;
    max-width: 20vw;
  }
  .hero-authors {
    top: 92px;
    right: 44px;
    text-align: right;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 43, 71, 0.25);
    min-width: 165px;
  }
  .authors-label { font-size: 0.68rem; }
  .authors-list { font-size: 0.78rem; line-height: 1.75; }
  /* keep the centered headline block clear of both corner columns */
  .hero-content { max-width: min(820px, calc(100vw - 2 * 280px)); }
}
@media (min-width: 901px) and (max-width: 1180px) {
  .hero-logo { width: 168px; top: 88px; left: 30px; }
  .hero-authors { top: 88px; right: 30px; min-width: 140px; }
  .hero-content { max-width: calc(100vw - 2 * 210px); }
}
/* short viewports: pull the corner blocks tighter */
@media (min-width: 901px) and (max-height: 760px) {
  .hero-logo { width: 150px; top: 82px; }
  .hero-authors { top: 82px; }
  .authors-list { font-size: 0.72rem; line-height: 1.6; }
}

/* reduced motion: kill the heavy stuff */
@media (prefers-reduced-motion: reduce) {
  #neuralCanvas, body::after { display: none; }
  .hero h1 em { animation: none; }
}
