/* Spheres of Influence — NASA / mission-control vernacular */
:root {
  --void: #05070c;
  --void-2: #0a0e16;
  --header: #030508;
  --cyan: #5ce1ff;
  --cyan-bright: #7ef0ff;
  --cyan-dim: rgba(92, 225, 255, 0.35);
  --cyan-soft: rgba(92, 225, 255, 0.12);
  --amber: #ffc14a;
  --amber-bright: #ffd76a;
  --white: #f4f7fb;
  --text: #dce4ef;
  --muted: #8b9aad;
  --glass: rgba(12, 18, 28, 0.72);
  --glass-border: rgba(255, 255, 255, 0.08);
  /* Cream / ivory beige panels (earlier vernacular) */
  --panel-light: #f3eee4;
  --panel-light-2: #ebe4d6;
  --advisors-bg: #2a2e36;
  --advisors-bg-2: #23272f;
  --advisors-text: #f0f2f5;
  --advisors-muted: #a8b0bc;
  --advisors-hover: #3a404c;
  --advisors-selected: #4a5160;
  /* Companies rail — reversed-out, distinct (slightly lighter) grey vs Advisors */
  --companies-bg: #383e48;
  --companies-bg-2: #313740;
  --companies-text: #f2f4f7;
  --companies-muted: #b4bcc8;
  --companies-hover: #484f5b;
  --companies-selected: #565e6c;
  --companies-accent: #dce4ef;
  --ink: #1a1612;
  --ink-muted: #5c5348;
  --accent: #0b6e8a;
  --selected: #d6ebe8;
  --font: "Inter", "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  --font-ui: "IBM Plex Sans", "Inter", system-ui, sans-serif;
  --font-display: "Orbitron", "Share Tech Mono", system-ui, sans-serif;
  --font-mono: "Share Tech Mono", "IBM Plex Sans", ui-monospace, monospace;
  --radius: 10px;
  --radius-sm: 6px;
}

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

html, body {
  margin: 0;
  height: 100%;
  background: var(--void);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow: hidden;
}

/* —— Header: compact title + sticky ticker —— */
.topbar {
  position: sticky;
  top: 0;
  flex: 0 0 auto;
  background: #000;
  border-bottom: 1px solid rgba(92, 225, 255, 0.22);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
  z-index: 50;
}

.title-bar-frozen {
  background: #000;
  position: relative;
}

.topbar-inner {
  /* theme-switch-stable-header */
  min-height: 4.25rem;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0.7rem 2.5rem 0.75rem;
  min-height: 0;
}

.title-block {
  text-align: center;
  width: 100%;
  max-width: 920px;
  padding-top: 0.35rem;
  padding-bottom: 0.3rem;
}

.wordmark {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.15rem, 2.6vw, 1.85rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
  line-height: 1.05;
  text-shadow:
    0 0 6px rgba(92, 225, 255, 0.95),
    0 0 14px rgba(92, 225, 255, 0.85),
    0 0 28px rgba(92, 225, 255, 0.55),
    0 0 48px rgba(92, 225, 255, 0.35);
}

.title-rule {
  height: 1px;
  width: min(420px, 72%);
  margin: 0.28rem auto 0.28rem;
  background: linear-gradient(90deg, var(--cyan-bright) 0%, var(--amber) 100%);
  box-shadow: 0 0 8px rgba(92, 225, 255, 0.45), 0 0 6px rgba(255, 193, 74, 0.35);
}

.subtitle {
  margin: 0;
  font-family: var(--font-mono);
  font-size: clamp(0.62rem, 1.1vw, 0.78rem);
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--amber-bright);
  text-align: center;
  text-shadow: 0 0 10px rgba(255, 193, 74, 0.45);
}

.credit {
  position: absolute;
  right: 0.75rem;
  bottom: 0.12rem;
  z-index: 5;
  margin: 0;
  font-family: var(--font);
  font-size: 0.68rem;
  font-weight: 400;
  color: #ffffff;
  text-align: right;
  letter-spacing: 0.02em;
  line-height: 1.2;
  pointer-events: auto;
  white-space: nowrap;
}
.credit a {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.credit a:hover { color: var(--cyan-bright); }


.audio-toggle {
  position: absolute;
  right: 0.75rem;
  bottom: 1.35rem;
  z-index: 6;
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  border: 1px solid rgba(92, 225, 255, 0.35);
  background: rgba(8, 12, 20, 0.75);
  color: var(--cyan);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 0.85rem;
  line-height: 1;
  transition: background 0.15s, border-color 0.15s, opacity 0.15s;
}
.audio-toggle:hover {
  background: rgba(92, 225, 255, 0.12);
  border-color: var(--cyan);
}
.audio-toggle.is-muted {
  opacity: 0.55;
  border-color: rgba(255, 255, 255, 0.2);
  color: #9aa3ae;
}
.audio-toggle .audio-icon { pointer-events: none; }

/* —— Theme switch (top-left of frozen title bar) —— */
.theme-switch {
  position: absolute;
  left: 0.75rem;
  top: 0.85rem; /* fixed — do not use 50%/translateY (jumps when title bar height changes) */
  transform: none;
  z-index: 7;
  display: inline-flex;
  align-items: stretch;
  box-sizing: border-box;
  height: 2rem;
  min-width: 7.5rem;
  border-radius: 8px;
  overflow: hidden;
}
.theme-btn {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0 0.65rem;
  border: none;
  background: transparent;
  cursor: pointer;
  line-height: 1;
  height: 100%;
  min-width: 3.5rem;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}
.theme-btn + .theme-btn {
  border-left-width: 1px;
  border-left-style: solid;
}
@media (max-width: 900px) {
  .theme-switch { left: 0.4rem; top: 0.65rem; min-width: 6.5rem; height: 1.85rem; }
  .theme-btn { padding: 0 0.45rem; font-size: 0.55rem; min-width: 3rem; }
}

.theme-switch {
  border: 1px solid rgba(92, 225, 255, 0.35);
  background: rgba(8, 12, 20, 0.75);
  box-shadow: 0 2px 10px rgba(0,0,0,0.35);
}
.theme-btn {
  color: rgba(200, 215, 230, 0.7);
  text-shadow: none;
}
.theme-btn + .theme-btn {
  border-left-color: rgba(92, 225, 255, 0.22);
}
.theme-btn:hover {
  color: var(--cyan-bright);
  background: rgba(92, 225, 255, 0.1);
}
.theme-btn[aria-pressed="true"] {
  background: rgba(92, 225, 255, 0.22);
  color: #fff;
  text-shadow: none; /* avoid size jump from glow */
}



/* Ticker — directly below title, sticky with header */
.ticker-strip {
  background: rgba(255, 255, 255, 0.97);
  color: #0a0e14;
  border-top: 1px solid rgba(92, 225, 255, 0.28);
  overflow: hidden;
  height: 1.7rem;
  display: flex;
  align-items: center;
}

.ticker-track {
  display: flex;
  gap: 2.5rem;
  white-space: nowrap;
  width: max-content;
  animation: ticker 90s linear infinite;
  padding-left: 0;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 500;
  will-change: transform;
}

.ticker-track:hover { animation-play-state: paused; }

.ticker-item {
  color: #0a0e14;
  text-decoration: none;
}
.ticker-item:hover { text-decoration: underline; color: #0b6e8a; }
.ticker-await { color: #667788; padding: 0 1rem; }

@keyframes ticker {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* —— Layout: Advisors | board | Companies —— */
.main {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: 210px 1fr 210px;
  min-height: 0;
  background: radial-gradient(ellipse at 50% 30%, #0c1220 0%, var(--void) 65%);
}

.board {
  position: relative;
  display: grid;
  grid-template-rows: 1fr 168px;
  min-width: 0;
  min-height: 0;
  transition: grid-template-rows 0.05s linear;
}
.board.drawer-open {
  grid-template-rows: 1fr minmax(280px, 55vh);
}

.bottom-rail {
  display: grid;
  grid-template-columns: 1fr 220px;
  min-height: 0;
  min-width: 0;
  border-top: 1px solid rgba(92, 225, 255, 0.15);
  position: relative;
}
.bottom-rail.no-oc {
  grid-template-columns: 1fr 220px;
}

/* Side rails — cream / ivory beige */
.lists-rail {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}

.lists-rail-left { border-right: 1px solid rgba(255,255,255,0.06); }
.lists-rail-right { border-left: 1px solid rgba(255,255,255,0.06); }

.list-panel {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  background: linear-gradient(180deg, var(--panel-light-2) 0%, var(--panel-light) 100%);
  padding: 0.65rem 0.5rem 0.55rem;
  color: var(--ink);
  position: relative;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.55);
}

.list-panel-advisors {
  background: linear-gradient(180deg, var(--advisors-bg-2) 0%, var(--advisors-bg) 100%);
  color: var(--advisors-text);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}
.list-panel-advisors .list-item {
  color: var(--advisors-text);
}
.list-panel-advisors .list-item .list-meta {
  color: var(--advisors-muted);
}
.list-panel-advisors .list-item:hover {
  background: var(--advisors-hover);
  border-color: rgba(255,255,255,0.08);
}
.list-panel-advisors .list-item.selected {
  background: var(--advisors-selected);
  border-color: rgba(92, 225, 255, 0.35);
  box-shadow: 0 0 0 1px rgba(92, 225, 255, 0.15);
}

.list-panel h2 {
  margin: 0 0 0.55rem;
  padding: 0.2rem 0.4rem 0.5rem;
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  flex: 0 0 auto;
}

.list-panel-advisors h2 {
  color: #ffffff;
  border-bottom-color: rgba(255,255,255,0.12);
}


/* Split Companies rail: FTSE 100 | thin line | FTSE 250 — reversed-out */
.list-panel-companies {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-bottom: 0.35rem;
  background: linear-gradient(180deg, var(--companies-bg-2) 0%, var(--companies-bg) 100%);
  color: var(--companies-text);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}
.list-panel-companies h2 {
  color: var(--companies-accent);
  border-bottom-color: rgba(255, 255, 255, 0.12);
}
.list-panel-companies .list-item {
  color: var(--companies-text);
}
.list-panel-companies .list-item .list-meta {
  color: var(--companies-muted);
}
.list-panel-companies .list-item:hover {
  background: var(--companies-hover);
  border-color: rgba(255, 255, 255, 0.08);
}
.list-panel-companies .list-item.selected {
  background: var(--companies-selected);
  border-color: rgba(92, 225, 255, 0.32);
  box-shadow: 0 0 0 1px rgba(92, 225, 255, 0.12);
  font-weight: 600;
}
/* One continuous scroll: FTSE 100 → divider → FTSE 250 (no half-height gaps) */
.list-scroll-companies {
  flex: 1 1 auto;
  overflow-y: auto;
  min-height: 0;
  padding: 0.1rem 0.1rem 0.6rem;
}
.list-panel-companies > .list-scroll-companies > h2 {
  position: sticky;
  top: 0;
  z-index: 2;
  margin: 0 0 0.4rem;
  padding: 0.35rem 0.4rem 0.45rem;
  background: linear-gradient(180deg, var(--companies-bg-2) 0%, var(--companies-bg) 88%);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.companies-block {
  display: block;
  flex: 0 0 auto;
}
.companies-section {
  display: contents;
}
.companies-section h2 {
  margin-bottom: 0.4rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.list-index {
  font-size: 0.62em;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: rgba(180, 192, 208, 0.72);
  text-transform: uppercase;
}
.companies-divider {
  flex: 0 0 auto;
  height: 0;
  margin: 0.35rem 0.35rem 0.45rem;
  border: 0;
  border-top: 1px solid #000;
  opacity: 0.9;
}

.list-scroll {
  flex: 1 1 auto;
  overflow-y: auto;
  min-height: 0;
  padding: 0.1rem 0.1rem 0.6rem;
}

.list-item {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 0.48rem 0.5rem;
  margin: 0 0 2px;
  font-family: var(--font);
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.3;
  color: var(--ink);
  cursor: pointer;
}

.list-item:hover {
  background: rgba(255, 255, 255, 0.65);
  border-color: rgba(0, 0, 0, 0.06);
}

.list-item.selected {
  background: var(--selected);
  border-color: rgba(11, 110, 138, 0.35);
  font-weight: 600;
  box-shadow: 0 0 0 1px rgba(11, 110, 138, 0.12);
}

.list-item .list-meta {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--ink-muted);
  margin-top: 0.12rem;
}

/* Stage / graph */
.stage-wrap {
  position: relative;
  min-height: 0;
  overflow: hidden;
  background: transparent;
}

#starfield {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

#graph {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hint-bar {
  position: absolute;
  left: 50%;
  bottom: 0.55rem;
  transform: translateX(-50%);
  z-index: 5;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 400;
  color: rgba(200, 215, 230, 0.5);
  pointer-events: none;
  letter-spacing: 0.04em;
}

/* Navigator */
.nav-panel { display: none !important; /* removed */
  position: absolute;
  right: 0.75rem;
  bottom: 2.1rem;
  z-index: 6;
  background: var(--glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 0.45rem 0.5rem 0.55rem;
  box-shadow: 0 8px 28px rgba(0,0,0,0.35);
}

.nav-title {
  font-family: var(--font-display);
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(220, 230, 240, 0.7);
  text-align: center;
  margin-bottom: 0.35rem;
}

.nav-grid {
  display: grid;
  grid-template-columns: repeat(3, 40px);
  grid-template-rows: repeat(2, 40px);
  gap: 4px;
}

.nav-btn {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  color: var(--white);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.nav-btn:hover {
  background: var(--cyan-soft);
  border-color: var(--cyan-dim);
  color: var(--cyan);
}

/* HUD */
.hud-card {
  position: absolute;
  z-index: 12;
  max-width: 320px;
  padding: 0.85rem 1rem;
  background: rgba(8, 12, 20, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(92, 225, 255, 0.22);
  border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(0,0,0,0.5), 0 0 1px rgba(92,225,255,0.3);
  pointer-events: none;
  font-size: 0.84rem;
}

.hud-card .hud-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 0.25rem;
}

.hud-card h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
}

.hud-card .hud-meta {
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.hud-card p { margin: 0.25rem 0; color: var(--text); }

.hud-card .hud-status,
.detail-body .hud-status {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.12rem 0.45rem;
  border: 1px solid;
  border-radius: 999px;
  margin: 0.15rem 0 0.35rem;
}

.node-tip {
  position: absolute;
  z-index: 11;
  max-width: 260px;
  padding: 0.55rem 0.7rem;
  background: rgba(8, 12, 20, 0.9);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  pointer-events: none;
  color: var(--text);
}

/* Detail bay (untitled) */
.evidence-bay {
  background: linear-gradient(180deg, rgba(10, 14, 22, 0.95) 0%, rgba(6, 9, 14, 0.98) 100%);
  border-top: none;
  padding: 0 1rem 0.75rem;
  overflow: auto;
  min-height: 0;
  min-width: 0;
  position: relative;
  display: flex;
  flex-direction: column;
}

.evidence-drag-handle {
  flex: 0 0 auto;
  height: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: ns-resize;
  touch-action: none;
  user-select: none;
  margin: 0 -0.25rem 0.15rem;
}
.evidence-drag-handle:hover .drag-grip,
.evidence-drag-handle:focus .drag-grip {
  background: rgba(92, 225, 255, 0.55);
}
.drag-grip {
  width: 42px;
  height: 4px;
  border-radius: 3px;
  background: rgba(160, 180, 200, 0.35);
  box-shadow: 0 0 6px rgba(92, 225, 255, 0.2);
}

.evidence-head {
  display: none; /* untitled bay */
}

.status-bay {
  background: linear-gradient(180deg, rgba(12, 16, 24, 0.96) 0%, rgba(8, 11, 18, 0.98) 100%);
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.65rem 0.85rem 0.75rem;
  overflow: auto;
  min-height: 0;
}

.status-bay > h2 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan);
}

.status-key {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.status-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.25;
}

.status-swatch {
  flex: 0 0 18px;
  width: 18px;
  height: 4px;
  border-radius: 2px;
  box-shadow: 0 0 8px currentColor;
}

.detail-body { font-size: 0.86rem; }
.detail-body .muted { color: var(--muted); }
.detail-body h3 {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
}
.detail-body .kv {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.35rem 1rem;
  margin: 0.45rem 0;
}
.detail-body .kv dt {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.detail-body .kv dd { margin: 0; color: var(--text); }
.detail-body a { color: var(--cyan); word-break: break-all; text-decoration: none; }
.detail-body a:hover { text-decoration: underline; }
.detail-body .summary {
  margin: 0.4rem 0;
  color: var(--text);
  opacity: 0.92;
}
.detail-body ul.edge-list {
  margin: 0.35rem 0 0;
  padding-left: 1.1rem;
}
.detail-body ul.edge-list li { margin-bottom: 0.3rem; }

/* Other Clients — HUD-adjacent box (top-left meets HUD bottom-right) */
.other-clients-hud {
  position: absolute;
  z-index: 13;
  min-width: 132px;
  max-width: 188px;
  max-height: 220px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 0.45rem 0.5rem 0.55rem;
  background: rgba(10, 14, 22, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(140, 155, 170, 0.28);
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 28px rgba(0,0,0,0.4);
  pointer-events: none;
  opacity: 0.92;
}
.other-clients-hud[hidden] { display: none !important; }

.oc-box-title {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(150, 165, 180, 0.72);
  margin-bottom: 0.35rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex: 0 0 auto;
}

.oc-box-list {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}
.oc-scroll-viewport {
  height: 100%;
  max-height: 168px;
  overflow: hidden;
}
.oc-scroll-track {
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
}
.oc-box-list.oc-scrolling .oc-scroll-track {
  animation: oc-marquee-y var(--oc-duration, 28s) linear infinite;
}
@keyframes oc-marquee-y {
  0% { transform: translateY(0); }
  100% { transform: translateY(-50%); }
}

.oc-box-item {
  font-family: var(--font);
  font-size: 0.68rem;
  font-weight: 500;
  color: rgba(160, 172, 186, 0.9);
  line-height: 1.25;
  padding: 0.15rem 0.2rem;
}
.oc-box-item .oc-sub {
  display: block;
  font-size: 0.56rem;
  font-weight: 400;
  color: rgba(120, 135, 150, 0.8);
  margin-top: 0.05rem;
}

/* Keep wider-universe in detail as secondary (can coexist lightly) */
.wider-universe {
  margin-top: 0.75rem;
  padding-top: 0.6rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.wider-universe h4 {
  margin: 0 0 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(200, 210, 220, 0.75);
}
.wider-universe .oc-item {
  margin: 0 0 0.5rem;
  padding: 0.4rem 0.5rem;
  background: rgba(255,255,255,0.03);
  border-radius: var(--radius-sm);
  border-left: 2px solid rgba(140, 155, 170, 0.4);
}
.wider-universe .oc-item strong { color: var(--white); font-weight: 600; }
.wider-universe .oc-meta {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  color: var(--muted);
  margin: 0.12rem 0;
}
.wider-universe .oc-sum {
  font-size: 0.8rem;
  color: var(--text);
  margin: 0.15rem 0 0;
  opacity: 0.9;
}

/* Footer */
.footer {
  flex: 0 0 auto;
  padding: 0.4rem 1rem;
  font-size: 0.72rem;
  color: rgba(160, 175, 195, 0.7);
  background: var(--header);
  border-top: 1px solid rgba(255,255,255,0.05);
  text-align: center;
}
.footer .linkish {
  background: none;
  border: none;
  color: var(--cyan);
  cursor: pointer;
  font: inherit;
  text-decoration: underline;
  padding: 0;
}

/* Methodology overlay */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.overlay[hidden] { display: none !important; }

.method-panel {
  background: rgba(12, 16, 24, 0.96);
  border: 1px solid rgba(92, 225, 255, 0.2);
  border-radius: 14px;
  max-width: 640px;
  max-height: 80vh;
  overflow: auto;
  padding: 1.5rem 1.75rem;
  position: relative;
  box-shadow: 0 24px 64px rgba(0,0,0,0.55);
}
.method-panel h2 {
  margin: 0 0 1rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
}
.method-section { margin-bottom: 1rem; }
.method-section h3 {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  color: var(--cyan);
}
.method-section p { margin: 0; color: var(--text); font-size: 0.88rem; }
.method-section a { color: var(--cyan); }

.chance-close {
  position: absolute;
  top: 0.65rem;
  right: 0.85rem;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}
.chance-close:hover { color: #fff; }

/* Graph labels */
.link-hit { fill: none; stroke: transparent; stroke-width: 16px; cursor: pointer; pointer-events: stroke; }
.link-vis { fill: none; pointer-events: none; }
.node-ftse, .node-pr { cursor: pointer; }

.label-pill { pointer-events: auto; cursor: pointer; }

.label-pill rect {
  fill: rgba(8, 12, 20, 0.78);
  stroke: rgba(92, 225, 255, 0.28);
  stroke-width: 1;
  rx: 5;
  ry: 5;
}

.label-pill.pr-pill rect {
  fill: rgba(12, 18, 28, 0.85);
  stroke: rgba(255, 255, 255, 0.28);
}

.label-pill text {
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  fill: #f0f4fa;
  text-anchor: middle;
  dominant-baseline: middle;
}

.label-pill.pr-pill text {
  font-size: 11.5px;
  font-weight: 600;
  fill: #ffffff;
}

/* Orbital cloud disabled — prefer boxed list */
.other-cloud { display: none; }
.other-cloud text {
  font-family: var(--font);
  font-size: 9px;
  font-weight: 500;
  fill: #a0aab8;
  opacity: 0.36;
  pointer-events: none;
  user-select: none;
}

.node.is-focus .planet-body,
.node.is-focus .station-body {
  stroke: #5ce1ff;
  stroke-width: 2.2px;
  filter: drop-shadow(0 0 10px rgba(92, 225, 255, 0.55));
}

@media (max-width: 1200px) {
  .main { grid-template-columns: 180px 1fr 180px; }
  .board { grid-template-rows: 1fr 150px; }
  .bottom-rail { grid-template-columns: 1fr 190px; }
}

@media (max-width: 900px) {
  .main { grid-template-columns: 1fr; grid-template-rows: auto 1fr auto; }
  .lists-rail { max-height: 180px; border: none; border-top: 1px solid rgba(255,255,255,0.06); }
  .bottom-rail { grid-template-columns: 1fr; }
  .status-bay { border-left: none; border-top: 1px solid rgba(255,255,255,0.08); }
  .audio-toggle { right: 0.4rem; bottom: 1.2rem; }
  .credit { right: 0.4rem; bottom: 0.08rem; font-size: 0.62rem; }
}

.view-btns {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 8;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.28rem; /* Zoom out close under Reset view */
  pointer-events: none;
}
.view-btns .reset-view-btn {
  pointer-events: auto;
  position: relative;
  top: auto;
  left: auto;
}
.reset-view-btn {
  font-family: var(--font-mono);
  font-size: 1.08rem; /* 25% smaller than 1.44rem */
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #0a0e14;
  background: #d8dce2; /* light grey */
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: 2px solid #0a0e14;
  border-radius: 8px;
  padding: 0.21rem 0.49rem;
  line-height: 1.15;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0,0,0,0.45);
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.12s;
}
.reset-view-btn:hover {
  background: #c8ced6;
  border-color: #0a0e14;
  color: #000;
  transform: translateY(-1px);
}
.zoom-out-btn {
  /* sits visibly beneath Reset view, not tucked/overlapping */
  margin-top: 0;
}

/* Universe minimap — top-right of main stage */
.universe-mini {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 8;
  width: 188px;
  background: rgba(8, 12, 20, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(92, 225, 255, 0.28);
  border-radius: var(--radius-sm);
  box-shadow:
    0 10px 32px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 0 18px rgba(92, 225, 255, 0.08);
  overflow: hidden;
  pointer-events: auto;
  user-select: none;
}
.universe-mini-title {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(126, 240, 255, 0.85);
  text-align: center;
  padding: 0.38rem 0.45rem 0.28rem;
  border-bottom: 1px solid rgba(92, 225, 255, 0.18);
  background: linear-gradient(180deg, rgba(92, 225, 255, 0.08), transparent);
}
.universe-mini-stage {
  position: relative;
  width: 100%;
  height: 142px;
  perspective: 720px;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 45%, rgba(30, 50, 80, 0.45) 0%, rgba(5, 8, 14, 0.2) 55%, rgba(0, 0, 0, 0.55) 100%);
}
#universe-mini-canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: crosshair;
  transform-origin: 50% 50%;
  will-change: transform;
}
.universe-mini:hover {
  border-color: rgba(92, 225, 255, 0.45);
  box-shadow:
    0 12px 36px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.05) inset,
    0 0 22px rgba(92, 225, 255, 0.14);
}

.evidence-expand-btn {
  position: absolute;
  right: 0.75rem;
  top: 0.45rem;
  bottom: auto;
  z-index: 4;
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  border: 1px solid rgba(92, 225, 255, 0.4);
  background: rgba(12, 18, 28, 0.85);
  color: var(--cyan);
  font-size: 1.35rem;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,0,0,0.35);
  transition: background 0.15s, border-color 0.15s;
}
.evidence-expand-btn:hover {
  background: rgba(92, 225, 255, 0.15);
  border-color: var(--cyan);
}
.evidence-bay .detail-body {
  flex: 1 1 auto;
  overflow: auto;
  min-height: 0;
  padding-top: 0.25rem;
  padding-bottom: 2.2rem;
}

.evidence-expanded {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  top: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  padding: 0.75rem;
  pointer-events: none;
}
.evidence-expanded[hidden] { display: none !important; }
.evidence-expanded-inner {
  pointer-events: auto;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: rgba(8, 12, 20, 0.94);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(92, 225, 255, 0.28);
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.55), 0 0 1px rgba(92,225,255,0.35);
  overflow: hidden;
}
.evidence-expanded-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0.55rem 0.85rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  flex: 0 0 auto;
}
.evidence-expanded-spacer { flex: 1; }
.evidence-collapse-btn {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.06);
  color: #fff;
  font-size: 1.4rem;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
}
.evidence-collapse-btn:hover {
  background: rgba(92, 225, 255, 0.15);
  border-color: rgba(92, 225, 255, 0.45);
  color: var(--cyan);
}
.detail-body-expanded {
  flex: 1 1 auto;
  overflow: auto;
  padding: 1rem 1.25rem 1.25rem;
  font-size: 0.95rem;
}
