/* Spheres of Influence — colour-reversed (light ivory mission-control) */
:root {
  --void: #f3efe6;
  --void-2: #e8e2d6;
  --header: #f7f4ec;
  --cyan: #0a6b7a;
  --cyan-bright: #0d8494;
  --cyan-dim: rgba(10, 107, 122, 0.35);
  --cyan-soft: rgba(10, 107, 122, 0.12);
  --amber: #c45e12;
  --amber-bright: #d97706;
  --white: #1a1c22;
  --text: #1c2128;
  --muted: #5a6575;
  --glass: rgba(255, 252, 245, 0.88);
  --glass-border: rgba(26, 28, 34, 0.12);
  /* Side panels — light (inverse of dark reversed rails) */
  --panel-light: #faf7f0;
  --panel-light-2: #f3eee4;
  --advisors-bg: #efe9df;
  --advisors-bg-2: #e6dfd2;
  --advisors-text: #1a1c22;
  --advisors-muted: #5c6570;
  --advisors-hover: #ddd4c4;
  --advisors-selected: #d0c6b4;
  /* Companies rail — slightly cooler light grey */
  --companies-bg: #e4e8ed;
  --companies-bg-2: #d9dee5;
  --companies-text: #1a1c22;
  --companies-muted: #5a6575;
  --companies-hover: #cdd3db;
  --companies-selected: #c0c8d2;
  --companies-accent: #0a6b7a;
  --ink: #1a1612;
  --ink-muted: #5c5348;
  --accent: #0a6b7a;
  --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: var(--header);
  border-bottom: 1px solid rgba(10, 107, 122, 0.28);
  box-shadow: 0 6px 24px rgba(80, 70, 50, 0.12);
  z-index: 50;
}

.title-bar-frozen {
  background: var(--header);
  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: #0e1218;
  line-height: 1.05;
  text-shadow:
    0 0 6px rgba(10, 107, 122, 0.55),
    0 0 14px rgba(10, 107, 122, 0.4),
    0 0 28px rgba(10, 107, 122, 0.25),
    0 0 48px rgba(196, 94, 18, 0.18);
}

.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(10, 107, 122, 0.4), 0 0 6px rgba(196, 94, 18, 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(196, 94, 18, 0.35);
}

.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: #1a1c22;
  text-align: right;
  letter-spacing: 0.02em;
  line-height: 1.2;
  pointer-events: auto;
  white-space: nowrap;
}
.credit a {
  color: #1a1c22;
  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(10, 107, 122, 0.45);
  background: rgba(255, 252, 245, 0.9);
  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(10, 107, 122, 0.12);
  border-color: var(--cyan);
}
.audio-toggle.is-muted {
  opacity: 0.55;
  border-color: rgba(26, 28, 34, 0.25);
  color: #6a7380;
}
.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(10, 107, 122, 0.4);
  background: rgba(255, 252, 245, 0.92);
  box-shadow: 0 2px 10px rgba(60,50,30,0.12);
}
.theme-btn {
  color: rgba(50, 58, 70, 0.75);
  text-shadow: none;
}
.theme-btn + .theme-btn {
  border-left-color: rgba(10, 107, 122, 0.22);
}
.theme-btn:hover {
  color: var(--cyan);
  background: rgba(10, 107, 122, 0.1);
}
.theme-btn[aria-pressed="true"] {
  background: rgba(10, 107, 122, 0.18);
  color: #0e1218;
  text-shadow: none;
}



/* Ticker — directly below title, sticky with header */
.ticker-strip {
  background: #1a1c22;
  color: #f0f2f5;
  border-top: 1px solid rgba(10, 107, 122, 0.35);
  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: #f0f2f5;
  text-decoration: none;
}
.ticker-item:hover { text-decoration: underline; color: #7ef0ff; }
.ticker-await { color: #9aa3ae; 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%, #fffdf8 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(10, 107, 122, 0.2);
  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(26,28,34,0.1); }
.lists-rail-right { border-left: 1px solid rgba(26,28,34,0.1); }

.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.55);
}
.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(26,28,34,0.08);
}
.list-panel-advisors .list-item.selected {
  background: var(--advisors-selected);
  border-color: rgba(10, 107, 122, 0.4);
  box-shadow: 0 0 0 1px rgba(10, 107, 122, 0.18);
}

.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: var(--accent);
  border-bottom-color: rgba(26,28,34,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.55);
}
.list-panel-companies h2 {
  color: var(--companies-accent);
  border-bottom-color: rgba(26, 28, 34, 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(26, 28, 34, 0.08);
}
.list-panel-companies .list-item.selected {
  background: var(--companies-selected);
  border-color: rgba(10, 107, 122, 0.35);
  box-shadow: 0 0 0 1px rgba(10, 107, 122, 0.15);
  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(90, 101, 117, 0.85);
  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(60, 75, 95, 0.55);
  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(255, 252, 245, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(10, 107, 122, 0.28);
  border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(60,50,30,0.18), 0 0 1px rgba(10,107,122,0.25);
  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: #1a1c22;
  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(255, 252, 245, 0.95);
  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(250, 247, 240, 0.98) 0%, rgba(243, 238, 228, 0.99) 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(10, 107, 122, 0.55);
}
.drag-grip {
  width: 42px;
  height: 4px;
  border-radius: 3px;
  background: rgba(90, 101, 117, 0.4);
  box-shadow: 0 0 6px rgba(10, 107, 122, 0.2);
}

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

.status-bay {
  background: linear-gradient(180deg, rgba(244, 246, 249, 0.98) 0%, rgba(232, 236, 242, 0.99) 100%);
  border-left: 1px solid rgba(26, 28, 34, 0.1);
  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: #1a1c22;
  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(255, 252, 245, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(90, 101, 117, 0.28);
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 28px rgba(60,50,30,0.15);
  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(90, 101, 117, 0.85);
  margin-bottom: 0.35rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid rgba(26, 28, 34, 0.1);
  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(50, 58, 70, 0.92);
  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(90, 101, 117, 0.85);
  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(26, 28, 34, 0.1);
}
.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(90, 101, 117, 0.9);
}
.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(90, 101, 117, 0.85);
  background: var(--header);
  border-top: 1px solid rgba(26,28,34,0.1);
  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(40, 35, 25, 0.45);
  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(255, 252, 245, 0.98);
  border: 1px solid rgba(10, 107, 122, 0.28);
  border-radius: 14px;
  max-width: 640px;
  max-height: 80vh;
  overflow: auto;
  padding: 1.5rem 1.75rem;
  position: relative;
  box-shadow: 0 24px 64px rgba(60,50,30,0.25);
}
.method-panel h2 {
  margin: 0 0 1rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: #1a1c22;
}
.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: #1a1c22; }

/* 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(255, 252, 245, 0.92);
  stroke: rgba(10, 107, 122, 0.35);
  stroke-width: 1;
  rx: 5;
  ry: 5;
}

.label-pill.pr-pill rect {
  fill: rgba(232, 236, 242, 0.95);
  stroke: rgba(26, 28, 34, 0.28);
}

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

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

/* 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: #0a6b7a;
  stroke-width: 2.2px;
  filter: drop-shadow(0 0 10px rgba(10, 107, 122, 0.45));
}

@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(26,28,34,0.1); }
  .bottom-rail { grid-template-columns: 1fr; }
  .status-bay { border-left: none; border-top: 1px solid rgba(26,28,34,0.1); }
  .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: #f4f7fb;
  background: #2a3038;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: 2px solid #1a1c22;
  border-radius: 8px;
  padding: 0.21rem 0.49rem;
  line-height: 1.15;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(60,50,30,0.2);
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.12s;
}
.reset-view-btn:hover {
  background: #3a424c;
  border-color: #0a6b7a;
  color: #fff;
  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(255, 252, 245, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(10, 107, 122, 0.35);
  border-radius: var(--radius-sm);
  box-shadow:
    0 10px 32px rgba(60, 50, 30, 0.18),
    0 0 0 1px rgba(255, 255, 255, 0.5) inset,
    0 0 18px rgba(10, 107, 122, 0.1);
  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(10, 107, 122, 0.95);
  text-align: center;
  padding: 0.38rem 0.45rem 0.28rem;
  border-bottom: 1px solid rgba(10, 107, 122, 0.22);
  background: linear-gradient(180deg, rgba(10, 107, 122, 0.08), transparent);
}
.universe-mini-stage {
  position: relative;
  width: 100%;
  height: 142px;
  perspective: 720px;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 45%, rgba(220, 230, 240, 0.9) 0%, rgba(232, 226, 214, 0.5) 55%, rgba(200, 195, 185, 0.4) 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(10, 107, 122, 0.55);
  box-shadow:
    0 12px 36px rgba(60, 50, 30, 0.22),
    0 0 0 1px rgba(255, 255, 255, 0.5) inset,
    0 0 22px rgba(10, 107, 122, 0.16);
}

.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(10, 107, 122, 0.45);
  background: rgba(255, 252, 245, 0.95);
  color: var(--cyan);
  font-size: 1.35rem;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(60,50,30,0.15);
  transition: background 0.15s, border-color 0.15s;
}
.evidence-expand-btn:hover {
  background: rgba(10, 107, 122, 0.12);
  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(255, 252, 245, 0.97);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(10, 107, 122, 0.32);
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(60,50,30,0.22), 0 0 1px rgba(10,107,122,0.3);
  overflow: hidden;
}
.evidence-expanded-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0.55rem 0.85rem;
  border-bottom: 1px solid rgba(26,28,34,0.1);
  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(26,28,34,0.2);
  background: rgba(26,28,34,0.06);
  color: #1a1c22;
  font-size: 1.4rem;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
}
.evidence-collapse-btn:hover {
  background: rgba(10, 107, 122, 0.12);
  border-color: rgba(10, 107, 122, 0.45);
  color: var(--cyan);
}
.detail-body-expanded {
  flex: 1 1 auto;
  overflow: auto;
  padding: 1rem 1.25rem 1.25rem;
  font-size: 0.95rem;
}
