/* ============================================================================
   ASTROSCAN COMMAND V2 — Mission Control stylesheet
   Premium / cinematic / glass / cyan-on-graphite.
   ========================================================================== */

/* ---------- Design Tokens -------------------------------------------------- */
:root {
  /* Palette — softer cyan, deeper graphite, higher-contrast ink */
  --bg-0: #03070d;
  --bg-1: #060c14;
  --bg-2: #08111c;
  --bg-3: #0b1826;
  --panel: rgba(8, 16, 26, 0.72);
  --panel-edge: rgba(127, 209, 230, 0.10);
  --panel-edge-strong: rgba(127, 209, 230, 0.20);
  --panel-glass: rgba(8, 16, 26, 0.60);

  --ink-0: #eaf3fb;
  --ink-1: #aec3d5;
  --ink-2: #758ea3;
  --ink-3: #4d6378;
  --ink-4: #2b3e52;

  /* Refined cyan — softer ice-blue primary; saturated only for highlight */
  --cyan: #7fd1e6;
  --cyan-bright: #5be3ff;
  --cyan-soft: rgba(127, 209, 230, 0.14);
  --cyan-line: rgba(127, 209, 230, 0.26);
  --cyan-deep: #2188a1;

  --amber: #f0b260;
  --amber-soft: rgba(240, 178, 96, 0.13);

  --red: #f06070;
  --red-soft: rgba(240, 96, 112, 0.13);

  --green: #5cd9a1;
  --green-soft: rgba(92, 217, 161, 0.13);

  --grid-line: rgba(127, 209, 230, 0.05);

  /* Typography */
  --ff-display: "Orbitron", "Inter", ui-sans-serif, system-ui, sans-serif;
  --ff-ui: "Inter", ui-sans-serif, system-ui, sans-serif;
  --ff-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  /* Geometry */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;

  /* Shadows — restrained */
  --glow-cyan: 0 0 18px rgba(127, 209, 230, 0.18);
  --glow-soft: 0 6px 28px rgba(0, 14, 28, 0.55);
}

/* ---------- Reset --------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg-0);
  color: var(--ink-0);
  font-family: var(--ff-ui);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow: hidden;
}

body {
  background:
    radial-gradient(1200px 800px at 80% -10%, rgba(26, 166, 200, 0.10), transparent 60%),
    radial-gradient(900px 700px at -10% 110%, rgba(91, 227, 255, 0.08), transparent 55%),
    linear-gradient(180deg, #02060b 0%, #050a13 50%, #04080e 100%);
}

body.boot-locked { overflow: hidden; }

button {
  font-family: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

ul { list-style: none; padding: 0; margin: 0; }

::selection { background: var(--cyan-soft); color: var(--ink-0); }

/* Premium keyboard focus — replaces browser default outline.
   Only on :focus-visible (keyboard navigation, not mouse click). */
:focus { outline: none; }
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 1px solid var(--cyan-line);
  outline-offset: 2px;
  border-radius: 4px;
  box-shadow: 0 0 0 3px rgba(127, 209, 230, 0.10);
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(91, 227, 255, 0.15);
  border-radius: 8px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(91, 227, 255, 0.28); }

/* ============================================================================
   BOOT OVERLAY
   ========================================================================== */
.boot-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  background:
    radial-gradient(800px 600px at 50% 40%, rgba(26, 166, 200, 0.10), transparent 60%),
    linear-gradient(180deg, #02060b 0%, #01040a 100%);
  overflow: hidden;
  transition: opacity 900ms ease, visibility 900ms ease;
}
.boot-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.boot-grid {
  position: absolute;
  inset: -2px;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, black 35%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 35%, transparent 75%);
  opacity: 0.6;
}
.boot-scanlines {
  position: absolute; inset: 0;
  background: repeating-linear-gradient(
    180deg,
    transparent 0px,
    transparent 2px,
    rgba(91, 227, 255, 0.025) 3px,
    transparent 4px
  );
  pointer-events: none;
  mix-blend-mode: screen;
}
.boot-vignette {
  position: absolute; inset: 0;
  background: radial-gradient(closest-side at 50% 50%, transparent 55%, rgba(0,0,0,0.7) 100%);
  pointer-events: none;
}

.boot-stage {
  position: relative;
  width: min(720px, 90vw);
  padding: 36px 40px 28px;
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, rgba(10,22,36,0.55), rgba(6,14,24,0.6));
  border: 1px solid var(--panel-edge);
  box-shadow: var(--glow-soft), inset 0 0 60px rgba(91, 227, 255, 0.04);
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
}

.boot-brand {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 18px;
  align-items: center;
}
.boot-emblem svg {
  width: 64px; height: 64px;
  filter: drop-shadow(0 0 12px rgba(91, 227, 255, 0.45));
}
.emblem-ring { fill: none; stroke: var(--cyan); stroke-width: 1.1; opacity: 0.85; }
.emblem-ring.outer { animation: ringSpin 18s linear infinite; transform-origin: 32px 32px; }
.emblem-ring.mid   { animation: ringSpin 12s linear infinite reverse; transform-origin: 32px 32px; }
.emblem-ring.inner { stroke-width: 1.4; }
.emblem-core { fill: var(--cyan); }
.emblem-cross { stroke: rgba(91, 227, 255, 0.45); stroke-width: 0.6; }

@keyframes ringSpin {
  from { transform: rotate(0deg); } to { transform: rotate(360deg); }
}

.boot-eyebrow {
  font-family: var(--ff-mono);
  letter-spacing: 0.22em;
  font-size: 11px;
  color: var(--ink-2);
  text-transform: uppercase;
}
.boot-title {
  font-family: var(--ff-display);
  font-weight: 700;
  letter-spacing: 0.18em;
  font-size: 34px;
  margin: 4px 0 2px;
  text-shadow: 0 0 18px rgba(91, 227, 255, 0.18);
}
.boot-subtitle {
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 0.32em;
  color: var(--ink-2);
  text-transform: uppercase;
}

.boot-progress { margin-top: 28px; }
.boot-progress-track {
  height: 4px;
  background: rgba(91, 227, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}
.boot-progress-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--cyan-deep), var(--cyan));
  box-shadow: 0 0 12px rgba(91, 227, 255, 0.55);
  transition: width 280ms cubic-bezier(0.4, 0.2, 0.2, 1);
}
.boot-progress-meta {
  margin-top: 10px;
  display: flex; justify-content: space-between;
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--ink-2);
}
#boot-progress-pct { color: var(--cyan); }

.boot-log {
  margin-top: 22px;
  padding: 14px 16px;
  background: rgba(2, 8, 16, 0.55);
  border: 1px solid var(--panel-edge);
  border-radius: var(--r-md);
  font-family: var(--ff-mono);
  font-size: 12px;
  color: var(--ink-1);
  min-height: 168px;
  max-height: 168px;
  overflow: hidden;
}
.boot-log li {
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 320ms ease, transform 320ms ease;
  padding: 2px 0;
  letter-spacing: 0.06em;
}
.boot-log li.in {
  opacity: 1;
  transform: translateY(0);
}
.boot-log li .glyph { color: var(--cyan); margin-right: 10px; }
.boot-log li.ok .glyph { color: var(--green); }

.boot-footer {
  margin-top: 18px;
  display: flex; justify-content: space-between;
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: 0.24em;
  color: var(--ink-3);
}

/* ============================================================================
   MISSION CONTROL LAYOUT
   ========================================================================== */
.mission-control {
  position: fixed;
  inset: 0;
  display: grid;
  grid-template-rows: 56px 1fr;
  opacity: 0;
  transition: opacity 800ms ease 100ms;
}
/* Viewport-wide cinematic vignette — felt, not seen.
   z-index 49: above grid content (z:1), below status-bar (z:60),
   below all popovers (200+) and overlays. */
.mission-control::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 49;
  background: radial-gradient(ellipse 130% 110% at 50% 50%, transparent 60%, rgba(0, 2, 6, 0.20) 100%);
}
.mission-control.is-live { opacity: 1; }
.mission-control[aria-hidden="true"] { pointer-events: none; }

/* ---------- Top status bar ----------------------------------------------- */
.status-bar {
  position: relative;
  z-index: 60; /* lift above the grid so popovers escape the stage stacking context */
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 18px;
  background: linear-gradient(180deg, rgba(7, 17, 29, 0.94), rgba(5, 11, 20, 0.72));
  border-bottom: 1px solid var(--panel-edge);
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
}
.grid { position: relative; z-index: 1; }

.status-bar__left,
.status-bar__right {
  display: flex; align-items: center; gap: 14px;
}
.status-bar__right { justify-content: flex-end; }

.brand-mark {
  display: flex; align-items: center; gap: 12px;
}
.brand-mark svg { width: 30px; height: 30px; }
.brand-ring { fill: none; stroke: var(--cyan); stroke-width: 1; opacity: 0.85; }
.brand-ring--mid { stroke-dasharray: 4 5; }
.brand-core { fill: var(--cyan); }
.brand-cross { stroke: rgba(91, 227, 255, 0.4); stroke-width: 0.5; }

.brand-title {
  font-family: var(--ff-display);
  font-weight: 700;
  letter-spacing: 0.18em;
  font-size: 13px;
}
.brand-sub {
  font-family: var(--ff-mono);
  font-size: 10px;
  color: var(--ink-2);
  letter-spacing: 0.22em;
  margin-top: 2px;
}

.status-bar__center {
  display: flex; gap: 10px;
}

.status-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(7, 17, 29, 0.75);
  border: 1px solid var(--panel-edge);
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
}
.status-chip__dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
  animation: pulseDot 1.6s ease-in-out infinite;
}
.status-chip__label { color: var(--ink-2); }
.status-chip__value { color: var(--cyan); }
.status-chip[data-state="warn"] .status-chip__dot { background: var(--amber); box-shadow: 0 0 10px var(--amber); }
.status-chip[data-state="warn"] .status-chip__value { color: var(--amber); }
.status-chip[data-state="crit"] .status-chip__dot { background: var(--red); box-shadow: 0 0 10px var(--red); }
.status-chip[data-state="crit"] .status-chip__value { color: var(--red); }

.status-chip--sim {
  background: rgba(240, 178, 96, 0.05);
  border-color: rgba(240, 178, 96, 0.22);
}
.status-chip--sim .status-chip__label { color: var(--amber); letter-spacing: 0.22em; }
.status-chip--sim .status-chip__value { color: var(--amber); }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  border: 1px solid var(--panel-edge);
  border-radius: 50%;
  background: rgba(3, 10, 18, 0.65);
  color: var(--ink-2);
  cursor: pointer;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
  margin-left: 4px;
}
.icon-btn:hover { color: var(--ink-0); border-color: var(--cyan-line); }
.icon-btn svg { width: 14px; height: 14px; fill: currentColor; }
.icon-btn[aria-expanded="true"] { color: var(--cyan); border-color: var(--cyan-line); background: var(--cyan-soft); }

@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.25); opacity: 0.65; }
}

.ghost-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 12px;
  border: 1px solid var(--panel-edge);
  border-radius: 999px;
  background: rgba(7, 17, 29, 0.7);
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--ink-1);
  transition: border-color 180ms ease, color 180ms ease, background 180ms ease;
}
.ghost-btn:hover {
  border-color: var(--cyan-line);
  color: var(--ink-0);
}
.ghost-btn__dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
}
.ghost-btn[aria-pressed="false"] .ghost-btn__dot {
  background: var(--ink-3);
  box-shadow: none;
}

.clock-block {
  text-align: right;
  padding-left: 12px;
  border-left: 1px solid var(--panel-edge);
}
.clock-block__label {
  font-family: var(--ff-mono);
  font-size: 9px;
  color: var(--ink-3);
  letter-spacing: 0.24em;
}
.clock-block__value {
  font-family: var(--ff-mono);
  font-size: 14px;
  color: var(--cyan);
  letter-spacing: 0.10em;
  margin-top: 2px;
  min-width: 88px;
  text-align: right;
}

/* ---------- Grid --------------------------------------------------------- */
.grid {
  display: grid;
  grid-template-columns: 280px 1fr 300px;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 14px;
  padding: 14px;
  min-height: 0;
}
.panel--left, .stage, .panel--right { grid-row: 1; }

/* ---------- Drawer (tabbed, collapsible) -------------------------------- */
.drawer {
  grid-column: 1 / -1;
  grid-row: 2;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--panel-edge);
  border-radius: var(--r-lg);
  overflow: hidden;
  min-height: 0;
  backdrop-filter: blur(10px) saturate(110%);
  -webkit-backdrop-filter: blur(10px) saturate(110%);
  box-shadow: var(--glow-soft);
  transition: background 200ms ease;
}
.drawer__head {
  display: flex; align-items: stretch; justify-content: space-between;
  height: 40px;
  padding: 0 8px 0 4px;
  border-bottom: 1px solid var(--panel-edge);
  background: linear-gradient(180deg, rgba(127, 209, 230, 0.04), transparent);
}
.drawer__tabs {
  display: flex; align-items: stretch; gap: 0;
}
.drawer-tab {
  display: inline-flex; align-items: center; gap: 8px;
  background: none; border: none;
  padding: 0 16px;
  color: var(--ink-2);
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 0.20em;
  cursor: pointer;
  position: relative;
  transition: color 160ms ease;
}
.drawer-tab:hover { color: var(--ink-0); }
.drawer-tab.is-active { color: var(--cyan); }
.drawer-tab.is-active::after {
  content: "";
  position: absolute;
  left: 12px; right: 12px; bottom: -1px;
  height: 1px;
  background: var(--cyan);
}
.drawer-tab__dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 6px rgba(127, 209, 230, 0.5);
  transition: transform 200ms ease;
}
.drawer-tab.is-cadence:not(.is-active) .drawer-tab__dot {
  animation: drawerCadence 1.4s ease-out;
}
@keyframes drawerCadence {
  0%   { transform: scale(1);   box-shadow: 0 0 6px rgba(127, 209, 230, 0.5); }
  35%  { transform: scale(1.65); box-shadow: 0 0 14px rgba(127, 209, 230, 0.85); }
  100% { transform: scale(1);    box-shadow: 0 0 6px rgba(127, 209, 230, 0.5); }
}
.drawer-tab__chip {
  font-size: 8px;
  letter-spacing: 0.18em;
  padding: 2px 5px;
  border-radius: 3px;
  border: 1px solid rgba(240, 178, 96, 0.30);
  background: rgba(240, 178, 96, 0.08);
  color: var(--amber);
}

.drawer__meta {
  display: inline-flex; align-items: center; gap: 14px;
}
.drawer__meta-item {
  display: inline-flex; align-items: baseline; gap: 6px;
}
.drawer__meta-k {
  font-family: var(--ff-mono);
  font-size: 9px;
  letter-spacing: 0.22em;
  color: var(--ink-3);
}
.drawer__meta-v {
  font-family: var(--ff-mono);
  font-size: 11px;
  color: var(--cyan);
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
  transition: color 320ms ease;
}
/* Latency quality color shift — premium aerospace status code */
.drawer__meta-item[data-quality="optimal"]  .drawer__meta-v { color: var(--green); }
.drawer__meta-item[data-quality="stable"]   .drawer__meta-v { color: var(--cyan); }
.drawer__meta-item[data-quality="degraded"] .drawer__meta-v { color: var(--amber); }
#build-latency { transition: color 320ms ease; font-variant-numeric: tabular-nums; }
#build-latency[data-quality="optimal"]  { color: var(--green); }
#build-latency[data-quality="stable"]   { color: var(--cyan); }
#build-latency[data-quality="degraded"] { color: var(--amber); }
.drawer__toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px;
  border: 1px solid var(--panel-edge);
  border-radius: 50%;
  background: rgba(3, 10, 18, 0.6);
  color: var(--ink-2);
  cursor: pointer;
  margin-left: 8px;
  transition: color 160ms ease, border-color 160ms ease, transform 220ms ease;
}
.drawer__toggle:hover { color: var(--ink-0); border-color: var(--cyan-line); }
.drawer__toggle svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.4; }
.drawer.is-collapsed .drawer__toggle { transform: rotate(180deg); }

.drawer__body {
  display: block;
  padding: 14px 16px;
  min-height: 0;
  max-height: 240px;
  overflow: hidden;
}
.drawer.is-collapsed .drawer__body { display: none; }

.drawer-panel { display: none; }
.drawer-panel.is-active { display: block; }

/* Alerts panel inside drawer */
.drawer-panel[data-panel="alerts"] .alert-feed {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  max-height: 210px;
  overflow-y: auto;
}

/* RF panel inside drawer */
.rf-grid, .log-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 18px;
  min-height: 0;
}
.rf-grid__left, .log-grid__left { display: grid; gap: 10px; min-width: 0; }
.rf-grid__right, .log-grid__right { display: grid; gap: 8px; min-width: 0; min-height: 0; }

.sim-banner {
  margin: 0;
  padding: 6px 10px;
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--amber);
  background: rgba(240, 178, 96, 0.06);
  border: 1px solid rgba(240, 178, 96, 0.22);
  border-radius: var(--r-sm);
}

.log-status {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 0.20em;
  color: var(--ink-2);
}
.log-status__label { color: var(--ink-1); }
.log-actions {
  display: flex; gap: 8px;
}

/* ---------- Panel base --------------------------------------------------- */
.panel {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--panel-edge);
  border-radius: var(--r-lg);
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 0;
  backdrop-filter: blur(10px) saturate(110%);
  -webkit-backdrop-filter: blur(10px) saturate(110%);
  /* Aerospace bevel — top highlight + bottom inset shadow, restrained. */
  box-shadow:
    var(--glow-soft),
    inset 0 1px 0 rgba(127, 209, 230, 0.06),
    inset 0 -1px 0 rgba(0, 4, 10, 0.45);
  scrollbar-gutter: stable;
}
.panel .panel__head {
  position: sticky;
  top: 0;
  z-index: 3;
  background: linear-gradient(180deg, rgba(8, 16, 26, 0.96), rgba(8, 16, 26, 0.88));
  backdrop-filter: blur(10px) saturate(110%);
  -webkit-backdrop-filter: blur(10px) saturate(110%);
}
.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(91, 227, 255, 0.05), transparent 35%),
    linear-gradient(0deg, rgba(91, 227, 255, 0.03), transparent 40%);
  pointer-events: none;
}

.panel__head {
  position: relative;
  overflow: hidden;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--panel-edge);
  background: linear-gradient(180deg, rgba(127, 209, 230, 0.030), transparent);
}
.panel__head::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: -32%;
  width: 32%;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(127, 209, 230, 0.55) 50%, transparent 100%);
  animation: panelHeadShimmer 24s ease-in-out infinite;
  pointer-events: none;
  opacity: 0;
}
@keyframes panelHeadShimmer {
  0%   { left: -32%; opacity: 0; }
  8%   { opacity: 0.85; }
  42%  { left: 100%; opacity: 0.55; }
  50%, 100% { left: 100%; opacity: 0; }
}
.panel__title {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--ff-display);
  font-weight: 600;
  letter-spacing: 0.22em;
  font-size: 11px;
  color: var(--ink-1);
}
.panel__source {
  font-family: var(--ff-mono);
  font-size: 9px;
  letter-spacing: 0.20em;
  color: var(--ink-3);
}

/* ---------- Trust badge (data provenance) ------------------------------ */
.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--panel-edge);
  background: rgba(3, 10, 18, 0.55);
  font-family: var(--ff-mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-2);
  white-space: nowrap;
}
.trust-badge::before {
  content: "";
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--ink-3);
  flex-shrink: 0;
}
.trust-badge[data-trust="live"] {
  color: var(--green);
  border-color: rgba(92, 217, 161, 0.28);
  background: rgba(92, 217, 161, 0.06);
}
.trust-badge[data-trust="live"]::before {
  background: var(--green);
  box-shadow: 0 0 6px rgba(92, 217, 161, 0.55);
  animation: trustLivePulse 2.4s ease-in-out infinite;
}
@keyframes trustLivePulse {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}
.trust-badge[data-trust="sim"] {
  color: var(--amber);
  border-color: rgba(240, 178, 96, 0.28);
  background: rgba(240, 178, 96, 0.06);
}
.trust-badge[data-trust="sim"]::before { background: var(--amber); }
.trust-badge[data-trust="estimated"] {
  color: var(--ink-1);
}
.trust-badge[data-trust="estimated"]::before { background: var(--ink-2); }
.trust-badge[data-trust="cached"] { color: var(--ink-2); }
.trust-badge[data-trust="cached"]::before { background: var(--ink-3); }
.trust-badge[data-trust="stale"] {
  color: var(--red);
  border-color: rgba(240, 96, 112, 0.28);
  background: rgba(240, 96, 112, 0.06);
}
.trust-badge[data-trust="stale"]::before { background: var(--red); }
.panel__index { display: none; }

.panel__pulse {
  display: inline-flex; gap: 3px;
}
.panel__pulse span {
  display: inline-block;
  width: 3px; height: 12px;
  background: var(--cyan);
  border-radius: 1px;
  opacity: 0.4;
  animation: pulseBars 1.4s ease-in-out infinite;
}
.panel__pulse span:nth-child(2) { animation-delay: 180ms; }
.panel__pulse span:nth-child(3) { animation-delay: 360ms; }
@keyframes pulseBars {
  0%, 100% { transform: scaleY(0.5); opacity: 0.4; }
  50% { transform: scaleY(1); opacity: 1; }
}

.panel__section {
  padding: 16px 18px;
  border-bottom: 1px dashed rgba(127, 209, 230, 0.07);
}
.panel__section:last-child { border-bottom: none; }
.panel__section--soft { background: rgba(3, 10, 18, 0.35); }

.section-head {
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--ink-3);
  text-transform: uppercase;
  margin-bottom: 10px;
  display: flex; align-items: center; gap: 8px;
}
.section-head > span:first-child { flex: 0 0 auto; }
.section-head .trust-badge { margin-left: auto; }
.section-head:not(:has(.trust-badge))::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--panel-edge), transparent);
}

/* ---------- Readouts ----------------------------------------------------- */
.readout-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.readout-grid--duo .readout--wide { grid-column: 1 / -1; }
.readout {
  position: relative;
  padding: 10px 12px;
  background: rgba(3, 10, 18, 0.55);
  border: 1px solid var(--panel-edge);
  border-radius: var(--r-md);
  overflow: hidden;
}
.readout::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan-line), transparent);
  opacity: 0.7;
}
.readout__label {
  font-family: var(--ff-mono);
  font-size: 9px;
  color: var(--ink-3);
  letter-spacing: 0.22em;
}
.readout__value {
  font-family: var(--ff-display);
  font-weight: 600;
  font-size: 22px;
  color: var(--ink-0);
  letter-spacing: 0.04em;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}
.threat-headline__value { font-variant-numeric: tabular-nums; }
.readout__unit {
  font-family: var(--ff-mono);
  font-size: 10px;
  color: var(--ink-2);
  margin-top: 2px;
  letter-spacing: 0.18em;
}

/* ---------- Meters ------------------------------------------------------- */
.meter-stack { display: grid; gap: 10px; }
.meter__row {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 5px;
}
.meter__label {
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--ink-2);
}
.meter__valuegroup {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.meter__value {
  font-family: var(--ff-mono);
  font-size: 12px;
  color: var(--cyan);
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
  transition: color 220ms ease;
}
.meter__value.is-tick {
  animation: meterValueTick 320ms ease-out;
}
@keyframes meterValueTick {
  0%   { color: var(--cyan-bright); text-shadow: 0 0 6px rgba(91, 227, 255, 0.45); }
  100% { color: var(--cyan);        text-shadow: none; }
}
.meter__trend {
  font-size: 9px;
  line-height: 1;
  color: var(--ink-3);
  width: 9px; text-align: center;
}
.meter__trend[data-dir="up"]   { color: var(--amber); }
.meter__trend[data-dir="down"] { color: var(--green); }
.meter__trend[data-dir="flat"] { color: var(--ink-3); }
.meter__bar {
  position: relative;
  height: 6px;
  background: rgba(91, 227, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
}
.meter__bar span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--cyan-deep), var(--cyan));
  box-shadow: 0 0 10px rgba(91, 227, 255, 0.55);
  border-radius: 3px;
  transition: width 900ms cubic-bezier(0.4, 0.2, 0.2, 1);
}
.meter[data-level="warn"] .meter__bar span {
  background: linear-gradient(90deg, #b56b1f, var(--amber));
  box-shadow: 0 0 10px rgba(255, 180, 84, 0.55);
}
.meter[data-level="warn"] .meter__value { color: var(--amber); }
.meter[data-level="crit"] .meter__bar span {
  background: linear-gradient(90deg, #a02331, var(--red));
  box-shadow: 0 0 10px rgba(255, 94, 108, 0.6);
}
.meter[data-level="crit"] .meter__value { color: var(--red); }

/* ---------- Solar monitor ------------------------------------------------ */
.meter--solar { padding-bottom: 2px; }

.solar-monitor {
  position: relative;
  margin-top: 10px;
  padding: 10px 10px 8px;
  background:
    radial-gradient(180px 80px at 50% 0%, rgba(91, 227, 255, 0.10), transparent 70%),
    rgba(3, 10, 18, 0.6);
  border: 1px solid var(--panel-edge);
  border-radius: var(--r-md);
  overflow: hidden;
}
.solar-monitor::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan-line), transparent);
}

.solar-monitor__wave {
  display: block;
  width: 100%;
  height: 64px;
}
.solar-monitor__grid line {
  stroke: rgba(91, 227, 255, 0.10);
  stroke-width: 0.4;
  stroke-dasharray: 2 3;
}
.solar-monitor__line {
  fill: none;
  stroke: url(#solar-stroke);
  stroke-width: 1.4;
  stroke-linejoin: round;
  stroke-linecap: round;
  filter: url(#solar-glow);
}
.solar-monitor__area {
  fill: url(#solar-fill);
  opacity: 0.9;
}
.solar-monitor__head {
  fill: var(--cyan);
  filter: drop-shadow(0 0 6px rgba(91, 227, 255, 0.85));
  animation: solarHeadPulse 1.4s ease-in-out infinite;
}
@keyframes solarHeadPulse {
  0%, 100% { r: 2.2; opacity: 0.85; }
  50%      { r: 3.0; opacity: 1; }
}

.solar-monitor__nodes {
  margin-top: 6px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  padding: 0 2px;
}
.solar-monitor__nodes span {
  height: 4px;
  border-radius: 2px;
  background: rgba(91, 227, 255, 0.12);
  position: relative;
  overflow: hidden;
}
.solar-monitor__nodes span::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(90deg, var(--cyan-deep), var(--cyan));
  transform: scaleX(0);
  transform-origin: left center;
  animation: solarNodePulse 2.4s ease-in-out infinite;
  box-shadow: 0 0 8px rgba(91, 227, 255, 0.6);
}
.solar-monitor__nodes span:nth-child(1)::after { animation-delay: 0ms; }
.solar-monitor__nodes span:nth-child(2)::after { animation-delay: 240ms; }
.solar-monitor__nodes span:nth-child(3)::after { animation-delay: 480ms; }
.solar-monitor__nodes span:nth-child(4)::after { animation-delay: 720ms; }
.solar-monitor__nodes span:nth-child(5)::after { animation-delay: 960ms; }
.solar-monitor__nodes span:nth-child(6)::after { animation-delay: 1200ms; }
@keyframes solarNodePulse {
  0%, 100% { transform: scaleX(0.05); opacity: 0.55; }
  50%      { transform: scaleX(1);    opacity: 1; }
}

.meter--solar[data-level="warn"] .solar-monitor__line,
.meter--solar[data-level="crit"] .solar-monitor__line {
  /* Stroke color shifts handled by JS by swapping <stop> if needed; keep base */
}
.meter--solar[data-level="warn"] .solar-monitor__nodes span::after {
  background: linear-gradient(90deg, #b56b1f, var(--amber));
  box-shadow: 0 0 8px rgba(255, 180, 84, 0.6);
}
.meter--solar[data-level="crit"] .solar-monitor__nodes span::after {
  background: linear-gradient(90deg, #a02331, var(--red));
  box-shadow: 0 0 8px rgba(255, 94, 108, 0.6);
}
.meter--solar[data-level="warn"] .solar-monitor__head { fill: var(--amber); filter: drop-shadow(0 0 6px rgba(255, 180, 84, 0.85)); }
.meter--solar[data-level="crit"] .solar-monitor__head { fill: var(--red);   filter: drop-shadow(0 0 6px rgba(255, 94, 108, 0.85)); }

.solar-monitor__meta {
  display: grid;
  grid-template-columns: auto 1fr auto 1fr;
  gap: 6px 10px;
  margin-top: 8px;
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
}
.solar-monitor__k { color: var(--ink-3); }
.solar-monitor__v { color: var(--cyan); text-align: right; }

/* ---------- Space environment (right panel) ----------------------------- */
.env-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
}
.env-cell {
  display: flex;
  flex-direction: column;
  padding: 8px 10px 9px;
  background: rgba(3, 10, 18, 0.55);
  border: 1px solid var(--panel-edge);
  border-radius: var(--r-sm);
}
.env-cell__k {
  font-family: var(--ff-mono);
  font-size: 8.5px;
  letter-spacing: 0.22em;
  color: var(--ink-3);
}
.env-cell__v {
  font-family: var(--ff-display);
  font-size: 17px;
  font-weight: 600;
  color: var(--ink-0);
  letter-spacing: 0.04em;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
  transition: color 240ms ease;
}
.env-cell__v[data-level="warn"] { color: var(--amber); }
.env-cell__v[data-level="crit"] { color: var(--red); }
.env-cell__band {
  font-family: var(--ff-mono);
  font-size: 9px;
  letter-spacing: 0.20em;
  color: var(--ink-2);
  margin-top: 2px;
}

/* Stage overlay supports stacked trust badges */
.overlay-trust {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.overlay-toggle {
  display: inline-flex; align-items: center;
  padding: 3px 10px;
  font-family: var(--ff-mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border-radius: 999px;
  border: 1px dashed rgba(127, 209, 230, 0.22);
  background: rgba(3, 10, 18, 0.55);
  color: var(--ink-3);
  cursor: pointer;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}
.overlay-toggle:hover { color: var(--ink-1); border-color: var(--cyan-line); }
.overlay-toggle[aria-pressed="true"] {
  color: var(--cyan);
  border-style: solid;
  border-color: var(--cyan-line);
  background: var(--cyan-soft);
}

/* ---------- Signal quality (right panel) -------------------------------- */
.signal-grid {
  display: grid;
  gap: 8px;
}
.signal-cell {
  padding: 7px 10px 8px;
  background: rgba(3, 10, 18, 0.50);
  border: 1px solid var(--panel-edge);
  border-radius: var(--r-sm);
}
.signal-cell__row {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 5px;
}
.signal-cell__k {
  font-family: var(--ff-mono);
  font-size: 9.5px;
  letter-spacing: 0.22em;
  color: var(--ink-3);
}
.signal-cell__v {
  font-family: var(--ff-mono);
  font-size: 11px;
  color: var(--ink-0);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
}
.signal-cell__bar {
  height: 2px;
  background: rgba(127, 209, 230, 0.08);
  border-radius: 2px;
  overflow: hidden;
}
.signal-cell__bar span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, rgba(127, 209, 230, 0.55), var(--cyan));
  transition: width 600ms cubic-bezier(0.32, 0.72, 0.32, 1);
}

.signal-regions {
  margin-top: 10px;
  display: flex; gap: 6px; flex-wrap: wrap;
}
.region-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--panel-edge);
  background: rgba(3, 10, 18, 0.45);
  font-family: var(--ff-mono);
  font-size: 9px;
  letter-spacing: 0.20em;
  color: var(--ink-3);
}
.region-pill__dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--ink-3);
}
.region-pill[data-state="watch"] {
  color: var(--amber);
  border-color: rgba(240, 178, 96, 0.32);
  background: rgba(240, 178, 96, 0.06);
}
.region-pill[data-state="watch"] .region-pill__dot {
  background: var(--amber);
  box-shadow: 0 0 5px rgba(240, 178, 96, 0.55);
}
.region-pill[data-state="hot"] {
  color: var(--red);
  border-color: rgba(240, 96, 112, 0.32);
  background: rgba(240, 96, 112, 0.06);
}
.region-pill[data-state="hot"] .region-pill__dot {
  background: var(--red);
  box-shadow: 0 0 6px rgba(240, 96, 112, 0.55);
}

/* ---------- Operational posture (right panel) -------------------------- */
.posture-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
}
.posture-cell {
  padding: 8px 10px;
  background: rgba(3, 10, 18, 0.55);
  border: 1px solid var(--panel-edge);
  border-radius: var(--r-sm);
}
.posture-cell__k {
  font-family: var(--ff-mono);
  font-size: 8.5px;
  letter-spacing: 0.22em;
  color: var(--ink-3);
}
.posture-cell__v {
  font-family: var(--ff-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--ink-0);
  letter-spacing: 0.04em;
  margin-top: 4px;
}
.posture-cell__v[data-dir="up"]   { color: var(--amber); }
.posture-cell__v[data-dir="down"] { color: var(--green); }
.posture-cell__v[data-dir="hot"]  { color: var(--red); }

.posture-spark {
  margin-top: 8px;
  height: 30px;
}
.posture-spark svg { width: 100%; height: 100%; }
#posture-spark-line {
  fill: none;
  stroke: var(--cyan);
  stroke-width: 1.2;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 3px rgba(127, 209, 230, 0.45));
}

/* ---------- Subsystem list ----------------------------------------------- */
.subsystem-list {
  display: grid;
  gap: 8px;
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
}
.subsystem-list li {
  display: grid;
  grid-template-columns: 12px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  background: rgba(3, 10, 18, 0.45);
  border: 1px solid var(--panel-edge);
  border-radius: var(--r-sm);
  color: var(--ink-1);
}
.subsystem-list .muted { color: var(--ink-2); font-size: 10px; letter-spacing: 0.18em; }
.dot { width: 8px; height: 8px; border-radius: 50%; }
.dot--green { background: var(--green); box-shadow: 0 0 8px var(--green); }
.dot--amber { background: var(--amber); box-shadow: 0 0 8px var(--amber); }
.dot--red { background: var(--red); box-shadow: 0 0 8px var(--red); }

/* ---------- Stage / Cesium ----------------------------------------------- */
.stage {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  background:
    radial-gradient(1100px 700px at 50% 55%, rgba(26, 120, 145, 0.06), transparent 70%),
    radial-gradient(820px  620px at 18% 88%, rgba(20, 58, 80, 0.045), transparent 60%),
    radial-gradient(900px  700px at 86% 14%, rgba(48, 26, 88, 0.035), transparent 60%),
    #02060b;
  border: 1px solid var(--panel-edge);
  min-height: 0;
  isolation: isolate;
}
.cesium-container { position: absolute; inset: 0; }
.stage::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 48%, rgba(1, 3, 8, 0.78) 100%);
  z-index: 1;
}

/* ---------- Solar flare overlay ----------------------------------------- */
.solar-flare {
  position: absolute;
  top: -8%;
  right: -6%;
  width: 46%;
  height: 60%;
  pointer-events: none;
  mix-blend-mode: screen;
  z-index: 2;
  --flare-intensity: 0.45;
  opacity: calc(0.55 + 0.45 * var(--flare-intensity));
  transition: opacity 700ms ease;
}
.solar-flare__corona {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(closest-side at 70% 30%, rgba(255, 220, 150, 0.18), transparent 60%),
    radial-gradient(closest-side at 70% 30%, rgba(91, 227, 255, 0.10), transparent 70%);
  filter: blur(4px);
  animation: flarePulse 4.6s ease-in-out infinite;
}
.solar-flare__core {
  position: absolute;
  top: 22%; right: 18%;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: rgba(255, 250, 220, 0.92);
  box-shadow:
    0 0 18px rgba(255, 230, 170, 0.85),
    0 0 48px rgba(255, 200, 120, 0.55),
    0 0 90px rgba(91, 227, 255, 0.25);
  animation: flareCore 3.4s ease-in-out infinite;
}
.solar-flare__ray {
  position: absolute;
  top: 27%; right: 14%;
  width: 220px; height: 1px;
  background: linear-gradient(90deg, rgba(255, 220, 160, 0), rgba(255, 220, 160, 0.35), rgba(255, 220, 160, 0));
  transform-origin: right center;
  filter: blur(0.4px);
  opacity: 0.7;
}
.solar-flare__ray--a { transform: rotate(-18deg);  animation: flareRayA 7s ease-in-out infinite; }
.solar-flare__ray--b { transform: rotate( 26deg);  animation: flareRayB 9s ease-in-out infinite; }

@keyframes flarePulse {
  0%, 100% { transform: scale(1);    opacity: 0.85; }
  50%      { transform: scale(1.06); opacity: 1; }
}
@keyframes flareCore {
  0%, 100% { transform: scale(1);    filter: brightness(1.0); }
  50%      { transform: scale(1.25); filter: brightness(1.4); }
}
@keyframes flareRayA {
  0%, 100% { opacity: 0.45; width: 180px; }
  50%      { opacity: 0.85; width: 260px; }
}
@keyframes flareRayB {
  0%, 100% { opacity: 0.35; width: 220px; }
  50%      { opacity: 0.75; width: 300px; }
}

/* ---------- HUD scan shimmer (stage-wide subtle) ------------------------- */
.stage::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg,
    transparent 0%,
    rgba(91, 227, 255, 0.03) 30%,
    transparent 32%,
    transparent 100%);
  background-size: 100% 280%;
  animation: hudScan 8.5s linear infinite;
  mix-blend-mode: screen;
  z-index: 3;
}
@keyframes hudScan {
  0%   { background-position: 0 -120%; opacity: 0.5; }
  50%  { opacity: 0.9; }
  100% { background-position: 0 220%;  opacity: 0.5; }
}

/* Hide Cesium chrome we don't want */
.cesium-viewer-bottom,
.cesium-viewer-toolbar,
.cesium-viewer-fullscreenContainer,
.cesium-viewer-vrContainer,
.cesium-viewer-animationContainer,
.cesium-viewer-timelineContainer,
.cesium-credit-logoContainer,
.cesium-widget-credits {
  display: none !important;
}

.stage-frame {
  position: absolute; inset: 0;
  pointer-events: none;
}
.frame-corner {
  position: absolute;
  width: 14px; height: 14px;
  border: 1px solid rgba(127, 209, 230, 0.18);
}
.frame-corner--tl { top: 14px; left: 14px; border-right: none; border-bottom: none; }
.frame-corner--tr { top: 14px; right: 14px; border-left: none; border-bottom: none; }
.frame-corner--bl { bottom: 14px; left: 14px; border-right: none; border-top: none; }
.frame-corner--br { bottom: 14px; right: 14px; border-left: none; border-top: none; }

.mode-strip {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  background: rgba(3, 10, 18, 0.55);
  border: 1px solid var(--panel-edge);
  border-radius: 999px;
  backdrop-filter: blur(10px) saturate(110%);
  -webkit-backdrop-filter: blur(10px) saturate(110%);
  z-index: 6;
  box-shadow: 0 4px 18px rgba(0, 6, 14, 0.40);
}
.mode-pill {
  background: none; border: none;
  padding: 5px 14px;
  font-family: var(--ff-mono);
  font-size: 9.5px;
  letter-spacing: 0.24em;
  color: var(--ink-3);
  border-radius: 999px;
  cursor: pointer;
  transition: color 180ms ease, background 220ms ease;
}
.mode-pill:hover { color: var(--ink-1); }
.mode-pill.is-active {
  color: var(--cyan);
  background: var(--cyan-soft);
  box-shadow: inset 0 0 0 1px var(--cyan-line);
}

.stage-overlay-top {
  position: absolute;
  top: 18px; left: 18px; right: 18px;
  display: flex; gap: 10px; flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  z-index: 4;
}
.overlay-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 10px;
  background: rgba(3, 10, 18, 0.55);
  border: 1px solid var(--panel-edge);
  border-radius: var(--r-sm);
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.overlay-chip__label { color: var(--ink-3); }
.overlay-chip__value { color: var(--cyan); }

.stage-overlay-bottom {
  position: absolute;
  bottom: 14px; left: 14px; right: 14px;
  display: flex; align-items: flex-end; gap: 14px;
  z-index: 4;
}

.radar-sweep { display: none !important; }
.solar-flare { display: none !important; }
.command-bar { display: none !important; }
.stage::after { display: none !important; content: none; }
.panel__pulse { display: none !important; }

.radar-sweep--legacy-stub {
  position: relative;
  width: 92px; height: 92px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, rgba(91, 227, 255, 0.05), transparent 70%);
  border: 1px solid var(--cyan-line);
  overflow: hidden;
  flex: 0 0 auto;
}
.radar-sweep__ring {
  position: absolute;
  border-radius: 50%;
  border: 1px dashed rgba(91, 227, 255, 0.22);
  pointer-events: none;
}
.radar-sweep__ring--1 { inset: 6px;  border-style: dashed; border-color: rgba(91, 227, 255, 0.16); }
.radar-sweep__ring--2 { inset: 20px; border-style: dotted; border-color: rgba(91, 227, 255, 0.22); }
.radar-sweep__ring--3 { inset: 34px; border-style: solid; border-color: rgba(91, 227, 255, 0.10); }
.radar-sweep__crosshair {
  position: absolute; inset: 6px;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent calc(50% - 0.5px), rgba(91, 227, 255, 0.20) calc(50% - 0.5px), rgba(91, 227, 255, 0.20) calc(50% + 0.5px), transparent calc(50% + 0.5px)),
    linear-gradient(0deg,  transparent calc(50% - 0.5px), rgba(91, 227, 255, 0.20) calc(50% - 0.5px), rgba(91, 227, 255, 0.20) calc(50% + 0.5px), transparent calc(50% + 0.5px));
  border-radius: 50%;
  mask-image: radial-gradient(circle, black 60%, transparent 100%);
  -webkit-mask-image: radial-gradient(circle, black 60%, transparent 100%);
}

.radar-sweep__pulse {
  position: absolute;
  left: 50%; top: 50%;
  width: 6px; height: 6px;
  margin: -3px 0 0 -3px;
  border: 1px solid rgba(91, 227, 255, 0.7);
  border-radius: 50%;
  transform: scale(0);
  animation: radarPulseEcho 3.4s ease-out infinite;
  pointer-events: none;
}
.radar-sweep__pulse[data-pulse="2"] { animation-delay: 1.7s; }
@keyframes radarPulseEcho {
  0%   { transform: scale(0.2); opacity: 0.85; }
  70%  { opacity: 0.10; }
  100% { transform: scale(12); opacity: 0; }
}

.radar-sweep__blip {
  position: absolute;
  left: 50%; top: 50%;
  width: 4px; height: 4px;
  margin: -2px 0 0 -2px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan), 0 0 14px rgba(91, 227, 255, 0.6);
  animation: radarBlipOrbit var(--speed, 8s) linear infinite;
  animation-delay: var(--delay, 0s);
  pointer-events: none;
}
.radar-sweep__blip--hot {
  background: var(--amber);
  box-shadow: 0 0 8px var(--amber), 0 0 14px rgba(255, 180, 84, 0.7);
}
@keyframes radarBlipOrbit {
  from { transform: rotate(0deg)   translateX(var(--orbit, 26px)); }
  to   { transform: rotate(360deg) translateX(var(--orbit, 26px)); }
}

.radar-sweep.is-flashing { animation: radarFlash 0.8s ease-out; }
.radar-sweep.is-flashing .radar-sweep__blip {
  box-shadow: 0 0 12px var(--cyan), 0 0 22px rgba(91, 227, 255, 0.95);
}
.radar-sweep.is-flashing .radar-sweep__blip--hot {
  background: var(--red);
  box-shadow: 0 0 12px var(--red), 0 0 24px rgba(255, 94, 108, 0.9);
}
@keyframes radarFlash {
  0%   { box-shadow: inset 0 0 0 1px var(--cyan-line), 0 0 0 rgba(91,227,255,0); }
  40%  { box-shadow: inset 0 0 0 1px var(--cyan), 0 0 22px rgba(91,227,255,0.45); }
  100% { box-shadow: inset 0 0 0 1px var(--cyan-line), 0 0 0 rgba(91,227,255,0); }
}
.radar-sweep__beam {
  position: absolute;
  inset: 0;
  background: conic-gradient(from 0deg, rgba(91, 227, 255, 0) 0deg, rgba(91, 227, 255, 0.55) 30deg, rgba(91, 227, 255, 0) 60deg);
  animation: radarSpin 4.6s linear infinite;
}
.radar-sweep__core {
  position: absolute;
  left: 50%; top: 50%;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  transform: translate(-50%, -50%);
  box-shadow: 0 0 10px var(--cyan);
}
@keyframes radarSpin {
  from { transform: rotate(0deg); } to { transform: rotate(360deg); }
}

.ai-console { display: none; }

.advisor {
  flex: 1;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 10px 18px 11px;
  background: rgba(2, 7, 13, 0.82);
  border: 1px solid var(--panel-edge-strong);
  border-radius: 10px;
  backdrop-filter: blur(16px) saturate(125%);
  -webkit-backdrop-filter: blur(16px) saturate(125%);
  max-width: 760px;
  box-shadow:
    0 8px 26px rgba(0, 6, 14, 0.42),
    inset 0 1px 0 rgba(127, 209, 230, 0.04);
}
.advisor__head {
  display: inline-flex; align-items: center; gap: 10px;
  padding-right: 14px;
  border-right: 1px solid rgba(127, 209, 230, 0.14);
}
.advisor__label {
  font-family: var(--ff-mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.30em;
  color: var(--ink-2);
  text-transform: uppercase;
}
.advisor__msg {
  margin: 0;
  font-family: var(--ff-ui);
  font-weight: 600;
  font-size: 15px;
  line-height: 1.25;
  letter-spacing: 0.005em;
  color: #f4faff;
  min-height: 19px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 0 1px rgba(0, 8, 14, 0.45);
}
.advisor__msg .caret { display: none; }

/* ---------- Acquisition strip (right panel head) ----------------------- */
.panel__section--acq {
  padding: 12px 18px;
  border-bottom: 1px solid var(--panel-edge);
}
.acq-strip {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
}
.acq-pill {
  display: grid;
  grid-template-columns: 7px auto auto;
  gap: 6px;
  align-items: center;
  padding: 6px 8px;
  background: rgba(3, 10, 18, 0.55);
  border: 1px solid var(--panel-edge);
  border-radius: var(--r-sm);
  font-family: var(--ff-mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  min-width: 0;
}
.acq-pill__dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--ink-3);
}
.acq-pill__k { color: var(--ink-3); }
.acq-pill__v {
  color: var(--ink-1);
  letter-spacing: 0.10em;
  font-variant-numeric: tabular-nums;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.acq-pill[data-state="locked"]   .acq-pill__dot { background: var(--green); box-shadow: 0 0 5px rgba(92, 217, 161, 0.55); animation: srcLivePulse 2.4s ease-in-out infinite; }
.acq-pill[data-state="locked"]   .acq-pill__v   { color: var(--green); }
.acq-pill[data-state="syncing"]  .acq-pill__dot { background: var(--amber); animation: srcLoadPulse 1.4s ease-in-out infinite; }
.acq-pill[data-state="syncing"]  .acq-pill__v   { color: var(--amber); }
.acq-pill[data-state="degraded"] .acq-pill__dot { background: var(--amber); }
.acq-pill[data-state="degraded"] .acq-pill__v   { color: var(--amber); }
.acq-pill[data-state="lost"]     .acq-pill__dot { background: var(--red); box-shadow: 0 0 5px rgba(240, 96, 112, 0.55); }
.acq-pill[data-state="lost"]     .acq-pill__v   { color: var(--red); }

/* ---------- Confidence matrix (under acquisition strip) ---------------- */
.conf-grid {
  margin-top: 10px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 8px;
}
.conf-cell { display: grid; gap: 3px; min-width: 0; }
.conf-cell__k {
  font-family: var(--ff-mono);
  font-size: 8px;
  letter-spacing: 0.20em;
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.conf-cell__bar {
  height: 3px;
  background: rgba(127, 209, 230, 0.08);
  border-radius: 2px;
  overflow: hidden;
}
.conf-cell__bar > span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, rgba(127, 209, 230, 0.40), var(--cyan));
  border-radius: 2px;
  transition: width 600ms cubic-bezier(0.32, 0.72, 0.32, 1), background 200ms ease;
}
.conf-cell--warn .conf-cell__bar > span { background: linear-gradient(90deg, rgba(240, 178, 96, 0.40), var(--amber)); }
.conf-cell--crit .conf-cell__bar > span { background: linear-gradient(90deg, rgba(240, 96, 112, 0.40), var(--red)); }
.conf-trust {
  margin-top: 8px;
  display: flex;
  justify-content: flex-end;
}

/* ---------- Threat panel ------------------------------------------------- */
.threat-headline {
  position: relative;
  text-align: center;
  padding: 6px 0 10px;
}
.threat-headline.is-band-shift::after {
  content: "";
  position: absolute;
  inset: -6px -4px;
  border-radius: 10px;
  border: 1px solid currentColor;
  color: var(--cyan);
  opacity: 0;
  pointer-events: none;
  animation: thresholdPulse 720ms ease-out;
}
.threat-headline.is-band-shift[data-band="warn"]::after { color: var(--amber); }
.threat-headline.is-band-shift[data-band="crit"]::after { color: var(--red); }
@keyframes thresholdPulse {
  0%   { opacity: 0;    transform: scale(0.96); }
  35%  { opacity: 0.75; }
  100% { opacity: 0;    transform: scale(1.04); }
}
.threat-headline__label {
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: 0.24em;
  color: var(--ink-3);
}
.threat-headline__value {
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 40px;
  letter-spacing: 0.04em;
  color: var(--ink-0);
  margin: 4px 0 6px;
}
.threat-headline__band {
  display: inline-block;
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--cyan-line);
  color: var(--cyan);
  background: var(--cyan-soft);
}
.threat-headline[data-band="warn"] .threat-headline__value { color: var(--amber); text-shadow: 0 0 22px rgba(255, 180, 84, 0.4); }
.threat-headline[data-band="warn"] .threat-headline__band {
  color: var(--amber);
  border-color: rgba(255, 180, 84, 0.45);
  background: var(--amber-soft);
}
.threat-headline[data-band="crit"] .threat-headline__value { color: var(--red); text-shadow: 0 0 22px rgba(255, 94, 108, 0.5); }
.threat-headline[data-band="crit"] .threat-headline__band {
  color: var(--red);
  border-color: rgba(255, 94, 108, 0.45);
  background: var(--red-soft);
}

/* ===================================================================
   THREAT RING — 6-LAYER AEROSPACE INSTRUMENT
   L1 outer precision frame · L2 rotating micro ticks · L3 radar sweep
   L4 acquisition scan line · L5 core intelligence · L6 echo blips
   All CSS-transforms, GPU-composited, zero JS animation loops.
   =================================================================== */
.threat-ring {
  width: 168px;
  aspect-ratio: 1 / 1;
  margin: 8px auto 4px;
  position: relative;
}
.threat-ring__svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* L1 — outer precision frame + cardinal/intermediate marks ----------- */
.threat-ring__frame circle {
  fill: none;
  stroke: rgba(127, 209, 230, 0.18);
  stroke-width: 0.6;
}
.threat-ring__frame line {
  stroke: rgba(127, 209, 230, 0.20);
  stroke-width: 0.55;
  stroke-linecap: round;
}
.threat-ring__frame line.card {
  stroke: rgba(127, 209, 230, 0.55);
  stroke-width: 0.95;
}

/* L2 — rotating micro ticks (1 turn / 90s, counter-clockwise) -------- */
/* transform-box omitted → defaults to view-box for SVG elements,      */
/* so transform-origin: 60px 60px resolves to the SVG centre (60,60).  */
.threat-ring__ticks-rotating {
  transform-origin: 60px 60px;
  animation: threatTicksRotating 90s linear infinite;
}
.threat-ring__ticks-rotating line {
  stroke: rgba(127, 209, 230, 0.16);
  stroke-width: 0.5;
  stroke-linecap: round;
}
@keyframes threatTicksRotating {
  from { transform: rotate(0deg); }
  to   { transform: rotate(-360deg); }
}

/* Range rings + bearing axes (structural lattice) -------------------- */
.threat-ring__range circle {
  fill: none;
  stroke: rgba(127, 209, 230, 0.07);
  stroke-width: 0.4;
  stroke-dasharray: 1.4 2.4;
}
.threat-ring__axes line {
  stroke: rgba(127, 209, 230, 0.22);
  stroke-width: 0.5;
  stroke-linecap: round;
}

/* Threat signature trace (subordinate data trace, not a progress bar) */
.threat-ring__bar {
  fill: none;
  stroke: var(--cyan);
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-dasharray: 0 100;
  transform: rotate(-90deg);
  transform-origin: center;
  transform-box: fill-box;
  transition: stroke-dasharray 900ms cubic-bezier(0.4, 0.2, 0.2, 1), stroke 300ms ease;
  opacity: 0.62;
  filter: drop-shadow(0 0 4px rgba(127, 209, 230, 0.30));
}
.threat-ring[data-band="warn"] .threat-ring__bar { stroke: var(--amber); filter: drop-shadow(0 0 4px rgba(240, 178, 96, 0.34)); }
.threat-ring[data-band="crit"] .threat-ring__bar { stroke: var(--red);   filter: drop-shadow(0 0 4px rgba(240, 96, 112, 0.42)); }

/* L3 — radar sweep beam (rotating wedge with gradient) --------------- */
/* Same view-box default: wedge anchored at (60,60) rotates around     */
/* the true SVG centre, staying within the viewBox at every angle.     */
.threat-ring__sweep {
  transform-origin: 60px 60px;
  animation: threatSweep 5s linear infinite;
  pointer-events: none;
}
.threat-ring__sweep-wedge { fill: url(#threat-sweep-ok); }
.threat-ring[data-band="warn"] .threat-ring__sweep-wedge { fill: url(#threat-sweep-warn); }
.threat-ring[data-band="crit"] .threat-ring__sweep-wedge { fill: url(#threat-sweep-crit); }
@keyframes threatSweep {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* L4 — acquisition scan line (oscilloscope-style vertical traverse) -- */
.threat-ring__scan {
  stroke: var(--cyan);
  stroke-width: 0.5;
  stroke-dasharray: 1.5 2.5;
  stroke-linecap: round;
  opacity: 0;
  animation: threatScan 5.4s ease-in-out infinite;
  pointer-events: none;
}
.threat-ring[data-band="warn"] .threat-ring__scan { stroke: var(--amber); }
.threat-ring[data-band="crit"] .threat-ring__scan { stroke: var(--red); }
@keyframes threatScan {
  0%   { transform: translateY(-42px); opacity: 0; }
  18%  { opacity: 0.45; }
  50%  { transform: translateY(42px);  opacity: 0.45; }
  82%  { opacity: 0; }
  100% { transform: translateY(42px);  opacity: 0; }
}

/* L4b — pulse return (radar ping expanding outward) ----------------- */
.threat-ring__pulse {
  fill: none;
  stroke: rgba(127, 209, 230, 0.36);
  stroke-width: 0.5;
  transform-origin: 60px 60px;
  animation: threatPulseReturn 6.5s ease-out infinite;
  opacity: 0;
  pointer-events: none;
}
.threat-ring[data-band="warn"] .threat-ring__pulse { stroke: rgba(240, 178, 96, 0.42); }
.threat-ring[data-band="crit"] .threat-ring__pulse { stroke: rgba(240, 96, 112, 0.48); }
@keyframes threatPulseReturn {
  0%   { transform: scale(0.15); opacity: 0; }
  8%   { opacity: 0.55; }
  85%  { opacity: 0; }
  100% { transform: scale(5.0);  opacity: 0; }
}

/* L5 — core intelligence (halo + breathing core) --------------------- */
.threat-ring__core-halo {
  fill: rgba(127, 209, 230, 0.10);
  transform-origin: center;
  transform-box: fill-box;
  animation: threatCoreHalo 4.4s ease-in-out infinite;
}
.threat-ring[data-band="warn"] .threat-ring__core-halo { fill: rgba(240, 178, 96, 0.14); }
.threat-ring[data-band="crit"] .threat-ring__core-halo { fill: rgba(240, 96, 112, 0.18); }
@keyframes threatCoreHalo {
  0%, 100% { transform: scale(0.55); opacity: 0.22; }
  50%      { transform: scale(1.10); opacity: 0.55; }
}
.threat-ring__core {
  fill: rgba(127, 209, 230, 0.88);
  transform-origin: center;
  transform-box: fill-box;
  animation: threatCore 4.4s ease-in-out infinite;
  filter: drop-shadow(0 0 4px rgba(127, 209, 230, 0.55));
}
.threat-ring[data-band="warn"] .threat-ring__core { fill: rgba(240, 178, 96, 0.92); filter: drop-shadow(0 0 4px rgba(240, 178, 96, 0.55)); }
.threat-ring[data-band="crit"] .threat-ring__core { fill: rgba(240, 96, 112, 0.95); filter: drop-shadow(0 0 5px rgba(240, 96, 112, 0.65)); }
@keyframes threatCore {
  0%, 100% { transform: scale(0.80); opacity: 0.70; }
  50%      { transform: scale(1.00); opacity: 1.00; }
}

/* L6 — echo blips (transient intelligence, staggered) ----------------- */
.threat-ring__echo {
  fill: rgba(127, 209, 230, 0.95);
  transform-origin: center;
  transform-box: fill-box;
  opacity: 0;
  animation: threatEcho 8s ease-in-out infinite;
  filter: drop-shadow(0 0 2px rgba(127, 209, 230, 0.55));
}
.threat-ring[data-band="warn"] .threat-ring__echo { fill: rgba(240, 178, 96, 0.95); filter: drop-shadow(0 0 2px rgba(240, 178, 96, 0.55)); }
.threat-ring[data-band="crit"] .threat-ring__echo { fill: rgba(240, 96, 112, 0.95); filter: drop-shadow(0 0 2px rgba(240, 96, 112, 0.55)); }
@keyframes threatEcho {
  0%, 100% { opacity: 0;   transform: scale(0.4); }
  8%       { opacity: 0.6; transform: scale(1.0); }
  22%      { opacity: 0;   transform: scale(0.4); }
}

/* ---------- Alert feed --------------------------------------------------- */
.alert-feed {
  display: grid;
  gap: 6px;
  max-height: 180px;
  overflow-y: auto;
  padding-right: 4px;
}
.alert {
  position: relative;
  display: grid;
  grid-template-columns: 90px 48px 1fr;
  gap: 10px;
  align-items: center;
  padding: 7px 10px;
  background: rgba(3, 10, 18, 0.48);
  border: 1px solid var(--panel-edge);
  border-radius: var(--r-sm);
  font-family: var(--ff-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  min-width: 0;
  overflow: hidden;
  animation: alertIn 380ms ease;
}
.alert--info { box-shadow: inset 2px 0 0 0 rgba(127, 209, 230, 0.45); }
.alert--warn { box-shadow: inset 2px 0 0 0 rgba(240, 178, 96, 0.55); }
.alert--crit { box-shadow: inset 2px 0 0 0 rgba(240, 96, 112, 0.65); }
.alert__time { font-variant-numeric: tabular-nums; }
.alert:first-child::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: var(--cyan);
  box-shadow: 0 0 6px rgba(127, 209, 230, 0.55);
  opacity: 0;
  animation: alertFreshIn 380ms ease forwards, alertFreshFade 3s ease 4s forwards;
}
@keyframes alertFreshIn {
  from { opacity: 0; }
  to   { opacity: 0.85; }
}
@keyframes alertFreshFade {
  to { opacity: 0; }
}
.alert__msg { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@keyframes alertIn {
  from { opacity: 0; transform: translateY(-3px); }
  to { opacity: 1; transform: translateY(0); }
}
.alert__time { color: var(--ink-3); }
.alert__tag {
  text-align: center;
  font-size: 9px;
  letter-spacing: 0.18em;
  padding: 2px 4px;
  border-radius: 3px;
  border: 1px solid var(--panel-edge);
  color: var(--cyan);
  background: var(--cyan-soft);
}
.alert__tag--info { color: var(--cyan); border-color: var(--cyan-line); background: var(--cyan-soft); }
.alert__tag--warn { color: var(--amber); border-color: rgba(255, 180, 84, 0.4); background: var(--amber-soft); }
.alert__tag--crit { color: var(--red); border-color: rgba(255, 94, 108, 0.4); background: var(--red-soft); }
.alert__msg { color: var(--ink-1); }

/* ---------- Command bar -------------------------------------------------- */
.command-bar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 0 18px;
  background: linear-gradient(0deg, rgba(7, 17, 29, 0.92), rgba(5, 11, 20, 0.7));
  border-top: 1px solid var(--panel-edge);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.command-bar__brand {
  font-family: var(--ff-display);
  font-weight: 700;
  letter-spacing: 0.24em;
  font-size: 11px;
  color: var(--ink-1);
  border-right: 1px solid var(--panel-edge);
  padding-right: 18px;
}
.command-bar__feed {
  position: relative;
  overflow: hidden;
  min-height: 28px;
  padding: 4px 0;
}
.ticker {
  position: relative;
  height: 22px;
}
.ticker li {
  position: absolute;
  inset: 0;
  display: flex; align-items: center; gap: 12px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 540ms ease, transform 540ms ease;
  font-family: var(--ff-mono);
  font-size: 12px;
  letter-spacing: 0.10em;
  color: var(--ink-1);
}
.ticker li.in { opacity: 1; transform: translateY(0); }
.ticker li.out { opacity: 0; transform: translateY(-8px); }
.ticker li::before {
  content: "▸";
  color: var(--cyan);
  font-size: 10px;
}

.command-bar__meta {
  display: flex; gap: 10px;
}
.meta-pill {
  display: inline-flex; gap: 8px;
  padding: 5px 10px;
  background: rgba(3, 10, 18, 0.55);
  border: 1px solid var(--panel-edge);
  border-radius: 999px;
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
}
.meta-pill__k { color: var(--ink-3); }
.meta-pill__v { color: var(--cyan); }

/* ---------- System integrity popover ------------------------------------ */
.system-control { position: relative; display: inline-flex; align-items: center; }
.system-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: -8px;
  width: 360px;
  max-height: 78vh;
  overflow-y: auto;
  padding: 12px 14px 14px;
  background: rgba(6, 12, 20, 0.86);
  border: 1px solid rgba(127, 209, 230, 0.18);
  border-radius: 12px;
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  box-shadow:
    0 18px 44px rgba(0, 6, 14, 0.55),
    0 1px 3px rgba(0, 12, 24, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    inset 0 0 0 1px rgba(127, 209, 230, 0.04);
  z-index: 220;
  opacity: 0;
  transform: translateY(-6px) scale(0.985);
  pointer-events: none;
  transition: opacity 220ms cubic-bezier(0.32, 0.72, 0.32, 1),
              transform 240ms cubic-bezier(0.32, 0.72, 0.32, 1);
}
.system-panel.is-open {
  opacity: 1; transform: translateY(0) scale(1); pointer-events: auto;
}
.system-panel::-webkit-scrollbar { width: 4px; }

.system-panel__head {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(127, 209, 230, 0.10);
  margin-bottom: 10px;
}
.system-panel__title {
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: 0.28em;
  color: var(--ink-1);
  text-transform: uppercase;
}

.sys-block + .sys-block { margin-top: 12px; padding-top: 10px; border-top: 1px dashed rgba(127, 209, 230, 0.08); }
.sys-block__head {
  font-family: var(--ff-mono);
  font-size: 9px;
  letter-spacing: 0.24em;
  color: var(--ink-3);
  margin-bottom: 6px;
  text-transform: uppercase;
}

.src-list, .roadmap-list { display: grid; gap: 4px; }
.src-item {
  display: grid;
  grid-template-columns: 8px 1fr auto auto;
  gap: 8px;
  align-items: center;
  padding: 5px 8px;
  background: rgba(3, 10, 18, 0.45);
  border: 1px solid var(--panel-edge);
  border-radius: var(--r-sm);
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: 0.05em;
}
.src-item__dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--ink-3);
}
.src-item[data-state="live"]    .src-item__dot { background: var(--green); box-shadow: 0 0 5px rgba(92, 217, 161, 0.55); animation: srcLivePulse 2.4s ease-in-out infinite; }
.src-item[data-state="cached"]  .src-item__dot { background: var(--amber); }
.src-item[data-state="loading"] .src-item__dot { background: var(--ink-3); animation: srcLoadPulse 1.4s ease-in-out infinite; }
.src-item[data-state="error"]   .src-item__dot { background: var(--red); box-shadow: 0 0 5px rgba(240, 96, 112, 0.55); }
@keyframes srcLivePulse {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}
@keyframes srcLoadPulse {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 0.85; }
}
.src-item__name  { color: var(--ink-1); }
.src-item__state { color: var(--ink-2); font-size: 9px; letter-spacing: 0.18em; text-transform: uppercase; }
.src-item[data-state="live"]    .src-item__state { color: var(--green); }
.src-item[data-state="cached"]  .src-item__state { color: var(--amber); }
.src-item[data-state="error"]   .src-item__state { color: var(--red); }
.src-item__age   { color: var(--ink-3); font-size: 9px; min-width: 50px; text-align: right; letter-spacing: 0.04em; }

.roadmap-item {
  display: grid;
  grid-template-columns: 1fr 64px 110px;
  gap: 8px;
  align-items: center;
  padding: 4px 8px;
  background: rgba(3, 10, 18, 0.4);
  border: 1px solid var(--panel-edge);
  border-radius: var(--r-sm);
  font-family: var(--ff-mono);
  font-size: 10px;
}
.roadmap-item__name  { color: var(--ink-1); letter-spacing: 0.05em; }
.roadmap-item__state {
  font-size: 8.5px; letter-spacing: 0.20em; text-align: center;
  padding: 2px 6px; border-radius: 3px;
  border: 1px solid var(--panel-edge);
}
.roadmap-item[data-state="live"]    .roadmap-item__state { color: var(--green); border-color: rgba(92, 217, 161, 0.32); background: rgba(92, 217, 161, 0.06); }
.roadmap-item[data-state="planned"] .roadmap-item__state { color: var(--amber); border-color: rgba(240, 178, 96, 0.30); background: rgba(240, 178, 96, 0.05); }
.roadmap-item__src   { color: var(--ink-3); font-size: 9px; letter-spacing: 0.10em; text-align: right; }

.build-list {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 4px 12px;
  margin: 0;
  font-family: var(--ff-mono);
  font-size: 10px;
}
.build-list dt { color: var(--ink-3); letter-spacing: 0.18em; text-transform: uppercase; font-size: 9px; }
.build-list dd { color: var(--ink-1); margin: 0; letter-spacing: 0.04em; }

/* ---------- Demo narrative banner --------------------------------------- */
.demo-banner {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  width: min(660px, 92vw);
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transition: opacity 240ms ease, transform 240ms ease;
}
.demo-banner.is-open {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}
.demo-banner__inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 12px 18px;
  background: rgba(4, 10, 18, 0.92);
  border: 1px solid var(--panel-edge-strong);
  border-radius: 12px;
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  box-shadow: 0 18px 48px rgba(0, 6, 14, 0.55);
}
.demo-banner__step {
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--cyan);
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--cyan-line);
  background: var(--cyan-soft);
}
.demo-banner__msg {
  font-family: var(--ff-ui);
  font-weight: 500;
  font-size: 13.5px;
  line-height: 1.4;
  color: var(--ink-0);
}
.demo-banner__actions { display: inline-flex; gap: 6px; }

/* ---------- Event response micro-reactions ----------------------------- */
.is-refreshing {
  animation: refreshGlow 800ms ease-out;
}
@keyframes refreshGlow {
  0%   { box-shadow: 0 0 0 1px rgba(127, 209, 230, 0.0), 0 0 0 rgba(127, 209, 230, 0); }
  20%  { box-shadow: 0 0 0 1px rgba(127, 209, 230, 0.55), 0 0 18px rgba(127, 209, 230, 0.28); }
  100% { box-shadow: 0 0 0 1px rgba(127, 209, 230, 0.0), 0 0 0 rgba(127, 209, 230, 0); }
}
.is-acquiring {
  position: relative;
}
.is-acquiring::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 999px;
  border: 1px solid var(--cyan);
  opacity: 0;
  animation: acqLockPulse 2.2s ease-out;
  pointer-events: none;
}
@keyframes acqLockPulse {
  0%   { transform: scale(0.85); opacity: 0; }
  15%  { opacity: 0.85; }
  100% { transform: scale(1.45); opacity: 0; }
}

/* ---------- Speculative mode (BLACK ORBIT) ------------------------------ */
.speculative-ribbon {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 22px;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 14px;
  font-family: var(--ff-mono);
  font-size: 9.5px;
  letter-spacing: 0.40em;
  text-transform: uppercase;
  color: var(--amber);
  background: linear-gradient(180deg, rgba(56, 30, 8, 0.85), rgba(28, 16, 6, 0.78));
  border-bottom: 1px solid rgba(240, 178, 96, 0.40);
  z-index: 280;
  pointer-events: none;
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
}
.speculative-ribbon__dot {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 6px rgba(240, 178, 96, 0.55);
}
body.is-black-orbit .speculative-ribbon { display: flex; }
body.is-black-orbit .mission-control     { top: 22px; }

/* Subtle palette warm shift while speculative is on — does not affect cyan
   trust badges (those keep their semantics, which is the point). */
body.is-black-orbit {
  --grid-line: rgba(240, 178, 96, 0.05);
}
body.is-black-orbit .stage {
  background:
    radial-gradient(1100px 700px at 50% 55%, rgba(120, 70, 26, 0.10), transparent 70%),
    #060508;
}

.sys-block--speculative { padding-top: 8px; }
.speculative-toggle {
  display: grid;
  grid-template-columns: 8px 1fr auto auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 8px 10px;
  background: rgba(3, 10, 18, 0.55);
  border: 1px solid rgba(240, 178, 96, 0.22);
  border-radius: var(--r-sm);
  cursor: pointer;
  text-align: left;
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  transition: border-color 160ms ease, background 160ms ease;
}
.speculative-toggle:hover { border-color: rgba(240, 178, 96, 0.42); }
.speculative-toggle__dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--ink-3);
}
.speculative-toggle[aria-pressed="true"] .speculative-toggle__dot {
  background: var(--amber);
  box-shadow: 0 0 6px rgba(240, 178, 96, 0.65);
  animation: srcLivePulse 2.4s ease-in-out infinite;
}
.speculative-toggle__name {
  font-family: var(--ff-display);
  font-weight: 600;
  letter-spacing: 0.10em;
  color: var(--ink-0);
}
.speculative-toggle__tag {
  font-size: 8.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--amber);
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid rgba(240, 178, 96, 0.32);
  background: rgba(240, 178, 96, 0.06);
}
.speculative-toggle__state {
  font-size: 9px;
  letter-spacing: 0.20em;
  color: var(--ink-2);
}
.speculative-toggle[aria-pressed="true"] .speculative-toggle__state {
  color: var(--amber);
}
.speculative-note {
  margin: 6px 2px 0;
  font-size: 9.5px;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  line-height: 1.4;
}

.is-demo-highlight {
  position: relative;
  z-index: 50;
  outline: 1px solid var(--cyan);
  outline-offset: 4px;
  box-shadow:
    0 0 0 1px rgba(127, 209, 230, 0.30),
    0 0 22px rgba(127, 209, 230, 0.35) !important;
  border-radius: var(--r-md);
  transition: outline-offset 280ms ease, box-shadow 280ms ease;
}

/* ---------- Audio control popover --------------------------------------- */
.audio-control { position: relative; display: inline-flex; align-items: center; gap: 4px; }
.audio-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 220px;
  padding: 9px 12px 10px;
  background: rgba(6, 12, 20, 0.72);
  border: 1px solid rgba(127, 209, 230, 0.16);
  border-radius: 10px;
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  box-shadow:
    0 12px 30px rgba(0, 6, 14, 0.45),
    0 1px 2px rgba(0, 12, 24, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    inset 0 0 0 1px rgba(127, 209, 230, 0.04);
  z-index: 200;
  opacity: 0;
  transform: translateY(-5px) scale(0.985);
  pointer-events: none;
  transition:
    opacity 200ms cubic-bezier(0.32, 0.72, 0.32, 1),
    transform 240ms cubic-bezier(0.32, 0.72, 0.32, 1);
}
.audio-panel.is-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.audio-panel::before {
  content: "";
  position: absolute;
  top: -5px; right: 12px;
  width: 9px; height: 9px;
  background: rgba(6, 12, 20, 0.72);
  border-left: 1px solid rgba(127, 209, 230, 0.16);
  border-top: 1px solid rgba(127, 209, 230, 0.16);
  transform: rotate(45deg);
  backdrop-filter: inherit;
  -webkit-backdrop-filter: inherit;
}
.audio-panel__head {
  display: flex; justify-content: space-between; align-items: baseline;
  padding-bottom: 6px;
  margin-bottom: 4px;
  border-bottom: 1px solid rgba(127, 209, 230, 0.10);
}
.audio-panel__title {
  font-family: var(--ff-mono);
  font-weight: 500;
  letter-spacing: 0.28em;
  font-size: 10px;
  color: var(--ink-1);
  text-transform: uppercase;
}
.audio-panel__hint {
  font-family: var(--ff-mono);
  font-size: 8.5px;
  letter-spacing: 0.22em;
  color: var(--ink-3);
}
.audio-panel__row {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 10px;
  align-items: center;
  padding: 4px 0;
}
.audio-panel__row + .audio-panel__row { border-top: 1px dashed rgba(127, 209, 230, 0.06); }
.audio-panel__label {
  font-family: var(--ff-mono);
  font-size: 9.5px;
  letter-spacing: 0.22em;
  color: var(--ink-3);
}
.audio-panel__slider {
  display: grid;
  grid-template-columns: 1fr 26px;
  align-items: center;
  gap: 8px;
}
.audio-panel__readout {
  font-family: var(--ff-mono);
  font-size: 9.5px;
  color: var(--cyan);
  text-align: right;
  letter-spacing: 0.06em;
}
.audio-panel input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, rgba(127, 209, 230, 0.45), rgba(127, 209, 230, 0.10));
  border-radius: 2px;
  outline: none;
}
.audio-panel input[type="range"]:focus { outline: none; }
.audio-panel input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--ink-0);
  box-shadow: 0 0 0 1px rgba(127, 209, 230, 0.45), 0 0 6px rgba(127, 209, 230, 0.22);
  cursor: pointer;
  border: none;
  transition: transform 140ms ease, box-shadow 140ms ease;
}
.audio-panel input[type="range"]:hover::-webkit-slider-thumb {
  transform: scale(1.10);
  box-shadow: 0 0 0 1px var(--cyan), 0 0 10px rgba(127, 209, 230, 0.55);
}
.audio-panel input[type="range"]::-moz-range-thumb {
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--ink-0);
  box-shadow: 0 0 0 1px rgba(127, 209, 230, 0.55), 0 0 8px rgba(127, 209, 230, 0.30);
  cursor: pointer;
  border: none;
}
.audio-panel input[type="range"]::-moz-range-track {
  height: 2px; background: rgba(127, 209, 230, 0.18); border-radius: 2px;
}
.audio-panel__select {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  background:
    linear-gradient(45deg, transparent 50%, var(--ink-2) 50%) calc(100% - 11px) 50%/5px 5px no-repeat,
    rgba(3, 10, 18, 0.55);
  border: 1px solid var(--panel-edge);
  color: var(--ink-0);
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: 0.10em;
  padding: 5px 22px 5px 8px;
  border-radius: var(--r-sm);
  outline: none;
  cursor: pointer;
}
.audio-panel__select:focus { border-color: var(--cyan-line); }
.audio-panel__select option { background: #0a1422; color: var(--ink-0); }

.toggle-btn {
  justify-self: end;
  padding: 4px 12px;
  border: 1px solid var(--panel-edge);
  border-radius: 999px;
  background: rgba(3, 10, 18, 0.6);
  color: var(--ink-2);
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: 0.20em;
  cursor: pointer;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}
.toggle-btn[aria-pressed="true"] {
  color: var(--cyan);
  border-color: var(--cyan-line);
  background: var(--cyan-soft);
}

/* ---------- Intel drawer cards (RF / Recorder) -------------------------- */
.intel-card {
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--panel-edge);
  border-radius: var(--r-lg);
  overflow: hidden;
  min-height: 0;
  backdrop-filter: blur(10px) saturate(110%);
  -webkit-backdrop-filter: blur(10px) saturate(110%);
  box-shadow: var(--glow-soft);
  position: relative;
}
.intel-card::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(91, 227, 255, 0.04), transparent 40%);
  pointer-events: none;
}
.intel-card__head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--panel-edge);
  background: linear-gradient(180deg, rgba(91, 227, 255, 0.05), transparent);
}
.intel-card__index {
  font-family: var(--ff-mono);
  font-size: 10px;
  color: var(--cyan);
  padding: 2px 6px;
  border: 1px solid var(--cyan-line);
  border-radius: 4px;
}
.intel-card__title {
  margin: 0;
  font-family: var(--ff-display);
  font-weight: 600;
  letter-spacing: 0.22em;
  font-size: 11px;
  color: var(--ink-1);
}
.intel-card__status {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: 0.20em;
  color: var(--ink-2);
}

.rf-scanner, .rec-body {
  display: grid;
  gap: 8px;
  padding: 10px 12px 8px;
  overflow: hidden;
  min-height: 0;
}

.rf-display {
  display: grid;
  grid-template-columns: 1.4fr 1fr auto;
  gap: 12px;
  align-items: baseline;
  padding-bottom: 4px;
}
.rf-display__meta { display: flex; flex-direction: column; gap: 2px; }
.rf-display__meta--right { text-align: right; }
.rf-display__k {
  font-family: var(--ff-mono);
  font-size: 9px;
  letter-spacing: 0.22em;
  color: var(--ink-3);
}
.rf-display__v {
  font-family: var(--ff-display);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.06em;
  color: var(--cyan);
}
.rf-display__v#rf-freq { font-size: 17px; text-shadow: 0 0 10px rgba(91, 227, 255, 0.35); }

.rf-wave {
  width: 100%;
  height: 64px;
  background: rgba(3, 10, 18, 0.55);
  border: 1px solid var(--panel-edge);
  border-radius: var(--r-sm);
  display: block;
}
.rf-wave__grid line {
  stroke: rgba(91, 227, 255, 0.08);
  stroke-width: 0.4;
  stroke-dasharray: 2 3;
}
.rf-wave__line {
  fill: none;
  stroke: var(--cyan);
  stroke-width: 1.2;
  stroke-linejoin: round;
  filter: url(#rf-glow);
}
.rf-wave__area { fill: url(#rf-fill); opacity: 0.9; }
.rf-wave__cursor {
  stroke: var(--amber);
  stroke-width: 1;
  stroke-dasharray: 2 3;
  opacity: 0.75;
}

.rf-list {
  display: grid;
  gap: 4px;
  max-height: 92px;
  overflow-y: auto;
  padding-right: 2px;
}
.rf-channel {
  display: grid;
  grid-template-columns: 86px 100px 1fr 44px;
  gap: 8px;
  align-items: center;
  padding: 5px 8px;
  background: rgba(3, 10, 18, 0.45);
  border: 1px solid var(--panel-edge);
  border-radius: var(--r-sm);
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--ink-1);
  transition: border-color 140ms ease, background 140ms ease;
}
.rf-channel__freq { color: var(--cyan); }
.rf-channel__band { color: var(--ink-2); }
.rf-channel__note { color: var(--ink-1); }
.rf-channel__sig  { color: var(--ink-3); text-align: right; }
.rf-channel.is-active {
  border-color: var(--cyan-line);
  background: var(--cyan-soft);
  box-shadow: inset 0 0 0 1px rgba(91, 227, 255, 0.10);
}
.rf-channel.is-active .rf-channel__sig { color: var(--cyan); }

.rf-disclaimer {
  margin: 4px 0 0;
  font-family: var(--ff-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--ink-3);
  padding: 6px 8px;
  border-top: 1px dashed rgba(91, 227, 255, 0.10);
  text-transform: uppercase;
}

/* Recorder */
.rec-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--ink-3);
  transition: background 200ms ease, box-shadow 200ms ease;
}
.rec-dot.is-rec {
  background: var(--red);
  box-shadow: 0 0 8px var(--red), 0 0 14px rgba(255, 94, 108, 0.6);
  animation: recBlink 0.7s ease-in-out infinite;
}
@keyframes recBlink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.35; }
}
.rec-wave {
  width: 100%;
  height: 52px;
  background: rgba(3, 10, 18, 0.55);
  border: 1px solid var(--panel-edge);
  border-radius: var(--r-sm);
  display: block;
  transition: border-color 200ms ease;
}
.rec-wave__grid line {
  stroke: rgba(91, 227, 255, 0.08);
  stroke-width: 0.4;
  stroke-dasharray: 2 3;
}
.rec-wave__line {
  fill: none;
  stroke: var(--cyan);
  stroke-width: 1.0;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 3px rgba(91, 227, 255, 0.7));
}
.rec-wave.is-rec { border-color: rgba(255, 94, 108, 0.45); }
.rec-wave.is-rec .rec-wave__line {
  stroke: var(--red);
  filter: drop-shadow(0 0 4px rgba(255, 94, 108, 0.8));
}

.rec-list {
  display: grid;
  gap: 4px;
  max-height: 76px;
  overflow-y: auto;
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
}
.rec-event {
  display: grid;
  grid-template-columns: 76px 78px 1fr 50px;
  gap: 8px;
  align-items: center;
  padding: 4px 8px;
  background: rgba(3, 10, 18, 0.45);
  border: 1px solid var(--panel-edge);
  border-radius: var(--r-sm);
  color: var(--ink-1);
}
.rec-event__time { color: var(--ink-3); }
.rec-event__id   { color: var(--cyan); }
.rec-event__band { color: var(--ink-1); }
.rec-event__sig  { color: var(--amber); text-align: right; }

.rec-actions {
  display: flex;
  gap: 8px;
  padding-top: 4px;
}
.ghost-btn--mini {
  padding: 5px 10px;
  font-size: 10px;
  letter-spacing: 0.16em;
}

/* ---------- DEEP SPACE SIGINT module ------------------------------------ */
.sigint {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 8px;
  height: 100%;
  min-height: 0;
}
.sigint__head {
  display: flex; align-items: center; gap: 12px;
  padding-bottom: 6px;
  border-bottom: 1px dashed rgba(127, 209, 230, 0.10);
}
.sigint__title {
  font-family: var(--ff-display);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.24em;
  color: var(--ink-1);
  text-transform: uppercase;
}
.sigint__sub {
  flex: 1;
  font-family: var(--ff-mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  color: var(--ink-3);
  text-transform: uppercase;
}

.sigint-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 10px;
  min-height: 0;
}
.sigint-grid__left {
  display: grid;
  grid-template-rows: repeat(5, 1fr);
  gap: 4px;
  min-height: 0;
}

/* Compact tiles */
.sigint-tile {
  padding: 4px 9px 5px;
  background: rgba(3, 10, 18, 0.50);
  border: 1px solid var(--panel-edge);
  border-radius: var(--r-sm);
  display: grid;
  grid-template-rows: auto auto auto;
  gap: 2px;
  font-family: var(--ff-mono);
  letter-spacing: 0.04em;
  min-height: 0;
  overflow: hidden;
  transition: border-color 200ms ease, background 200ms ease;
}
.sigint-tile:hover { border-color: var(--cyan-line); }
.sigint-tile__row {
  display: flex; justify-content: space-between; align-items: baseline; gap: 8px;
  min-width: 0;
}
.sigint-tile__k {
  font-size: 8.5px;
  letter-spacing: 0.22em;
  color: var(--ink-3);
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sigint-tile__v {
  font-size: 10.5px;
  color: var(--cyan);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
}
.sigint-tile__bar {
  height: 2px;
  background: rgba(127, 209, 230, 0.08);
  border-radius: 1px;
  overflow: hidden;
}
.sigint-tile__bar > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, rgba(127, 209, 230, 0.40), var(--cyan));
  border-radius: 1px;
  transition: width 700ms cubic-bezier(0.32, 0.72, 0.32, 1);
}
.sigint-tile__foot {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
}
.sigint-tile__chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 8px;
  letter-spacing: 0.20em;
  color: var(--ink-2);
  text-transform: uppercase;
}
.sigint-tile__dot {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 4px rgba(92, 217, 161, 0.55);
  animation: srcLivePulse 2.4s ease-in-out infinite;
}
.sigint-tile__dot--amber {
  background: var(--amber);
  box-shadow: 0 0 4px rgba(240, 178, 96, 0.55);
}
.sigint-tile__pct {
  font-size: 9px;
  color: var(--cyan);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.05em;
}

/* Solar tile waveform */
.sigint-tile__wave { width: 100%; height: 12px; display: block; }
.sigint-tile__wave polyline {
  fill: none;
  stroke: var(--cyan);
  stroke-width: 0.8;
  opacity: 0.65;
  stroke-linejoin: round;
}

/* Pulsar heartbeat — 8 cells pulse in sequence at 714 ms each (real B0329+54 period) */
.sigint-tile__pulses {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 3px;
  height: 5px;
}
.sigint-tile__pulses span {
  background: rgba(127, 209, 230, 0.18);
  border-radius: 1px;
  animation: sigintPulseBeat 5712ms linear infinite;
}
.sigint-tile__pulses span:nth-child(1) { animation-delay: 0ms; }
.sigint-tile__pulses span:nth-child(2) { animation-delay: 714ms; }
.sigint-tile__pulses span:nth-child(3) { animation-delay: 1428ms; }
.sigint-tile__pulses span:nth-child(4) { animation-delay: 2142ms; }
.sigint-tile__pulses span:nth-child(5) { animation-delay: 2856ms; }
.sigint-tile__pulses span:nth-child(6) { animation-delay: 3570ms; }
.sigint-tile__pulses span:nth-child(7) { animation-delay: 4284ms; }
.sigint-tile__pulses span:nth-child(8) { animation-delay: 4998ms; }
@keyframes sigintPulseBeat {
  0%, 12%  { background: var(--cyan); box-shadow: 0 0 5px rgba(127, 209, 230, 0.65); }
  18%, 100% { background: rgba(127, 209, 230, 0.18); box-shadow: none; }
}

/* FRB monitor grid — 24 cells (24h) */
.sigint-tile__cells {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 2px;
  height: 7px;
}
.sigint-tile__cells span {
  background: rgba(127, 209, 230, 0.10);
  border-radius: 0.5px;
}
.sigint-tile__cells span:nth-child(6n)  { background: rgba(127, 209, 230, 0.18); }
.sigint-tile[data-state="transient"] .sigint-tile__cells span:nth-child(7) {
  background: var(--amber);
  box-shadow: 0 0 5px rgba(240, 178, 96, 0.6);
}

/* === HERO: SIGNAL SPECTRUM RADAR === */
.sigint-spectrum {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 6px;
  height: 100%;
  padding: 8px 12px 10px;
  background:
    radial-gradient(ellipse 80% 60% at 50% 100%, rgba(127, 209, 230, 0.05), transparent 65%),
    rgba(3, 10, 18, 0.55);
  border: 1px solid var(--panel-edge);
  border-radius: var(--r-sm);
  box-shadow: inset 0 1px 0 rgba(127, 209, 230, 0.05);
  min-height: 0;
}
.sigint-spectrum__head {
  display: flex; align-items: center; gap: 12px;
}
.sigint-spectrum__title {
  font-family: var(--ff-display);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.24em;
  color: var(--ink-1);
  text-transform: uppercase;
}
.sigint-spectrum__band {
  flex: 1;
  font-family: var(--ff-mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  color: var(--ink-3);
  text-transform: uppercase;
}
.sigint-spectrum__dish {
  width: 16px; height: 16px;
  color: var(--cyan);
  animation: sigintDishRotate 9s linear infinite;
  filter: drop-shadow(0 0 3px rgba(127, 209, 230, 0.45));
}
.sigint-spectrum__dish svg { width: 100%; height: 100%; display: block; }
@keyframes sigintDishRotate {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.sigint-spectrum__plot {
  width: 100%;
  height: 100%;
  display: block;
  min-height: 0;
}
.sigint-spectrum__grid line {
  stroke: rgba(127, 209, 230, 0.06);
  stroke-width: 0.3;
  stroke-dasharray: 2 3;
}
.sigint-spectrum__area { fill: url(#sigint-spectrum-fill); }
.sigint-spectrum__trace {
  fill: none;
  stroke: var(--cyan);
  stroke-width: 0.8;
  stroke-linejoin: round;
  stroke-linecap: round;
  filter: drop-shadow(0 0 1px rgba(127, 209, 230, 0.55));
}
.sigint-spectrum__h1-line {
  stroke: var(--amber);
  stroke-width: 0.6;
  stroke-dasharray: 2 2;
  opacity: 0.78;
}
.sigint-spectrum__h1-label {
  font-family: var(--ff-mono);
  font-size: 6.5px;
  fill: var(--amber);
  letter-spacing: 0.10em;
  opacity: 0.85;
}
.sigint-spectrum__scan {
  stroke: var(--cyan);
  stroke-width: 0.5;
  stroke-dasharray: 2 3;
  opacity: 0;
  animation: sigintSpectrumScan 7.2s linear infinite;
  pointer-events: none;
}
@keyframes sigintSpectrumScan {
  0%   { transform: translateX(0);     opacity: 0; }
  10%  { opacity: 0.55; }
  90%  { opacity: 0.55; }
  100% { transform: translateX(400px); opacity: 0; }
}
.sigint-flick {
  fill: var(--cyan);
  opacity: 0;
  animation: sigintFlick 7s ease-in-out infinite;
  filter: drop-shadow(0 0 2px rgba(127, 209, 230, 0.65));
  transform-origin: center;
  transform-box: fill-box;
}
@keyframes sigintFlick {
  0%, 100% { opacity: 0;    transform: scale(0.6); }
  4%       { opacity: 0.85; transform: scale(1.0); }
  18%      { opacity: 0;    transform: scale(0.6); }
}

.sigint-spectrum__readout {
  display: grid;
  grid-template-columns: auto auto auto auto auto auto;
  gap: 4px 10px;
  font-family: var(--ff-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  align-items: baseline;
  justify-content: start;
}
.sigint-spectrum__k {
  color: var(--ink-3);
  text-transform: uppercase;
}
.sigint-spectrum__v {
  color: var(--cyan);
  font-variant-numeric: tabular-nums;
}

/* Allow drawer body more height when SIGINT tab is active */
.drawer[data-active-tab="sigint"] .drawer__body {
  max-height: 320px;
}

/* ---------- Responsive --------------------------------------------------- */
@media (max-width: 1280px) {
  .grid { grid-template-columns: 280px 1fr 300px; }
  .readout__value { font-size: 18px; }
}

@media (max-width: 1024px) {
  .grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto 360px auto auto;
  }
  .panel--left  { grid-row: 1; }
  .stage        { grid-row: 2; }
  .panel--right { grid-row: 3; }
  .intel-drawer { grid-row: 4; grid-template-columns: 1fr; }
  .panel--left, .panel--right { max-height: 280px; overflow-y: auto; }
  .status-bar__center { display: none; }
}
