/* ============================================================
   Bunker map — ABAB-Billionaires
   ============================================================ */

:root {
  --bg: #07090f;
  --bg-elev: #11192b;
  --bg-elev-2: #18223a;
  --border: #1f2a44;
  --border-strong: #2a385a;
  --text: #e8ecf4;
  --text-dim: #9aa6c0;
  --text-muted: #6a7896;
  --accent: #f59e0b;
  --accent-soft: #fbbf24;
  --link: #38bdf8;
  --abab: #f59e0b;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--link); text-decoration: none; }
a:hover { color: #8eb0ff; text-decoration: underline; }

.muted { color: var(--text-muted); font-weight: 400; }
.hint  { color: var(--text-muted); font-size: 12px; margin: 8px 0 0; }

/* Header */
.header {
  background: linear-gradient(180deg, #0e1628 0%, #07090f 100%);
  border-bottom: 1px solid var(--border);
  padding: 14px 24px 16px;
}
.header-inner { max-width: 1800px; margin: 0 auto; }
.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  gap: 16px;
}
.abab-mark {
  display: inline-flex; align-items: baseline; gap: 10px;
  text-decoration: none;
}
.abab-mark:hover .abab-badge { background: var(--accent-soft); }
.abab-badge {
  background: var(--accent); color: #0a0a0a;
  padding: 3px 8px; border-radius: 4px;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 11px; font-weight: 700; letter-spacing: 1.2px;
  transition: background 120ms;
}
.abab-text {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 12px; color: var(--text-muted); letter-spacing: 0.3px;
}
.topnav-links { display: flex; gap: 12px; }
.manifesto-link {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 12px; color: var(--text-muted);
  text-decoration: none;
  border: 1px solid var(--border-strong);
  padding: 5px 11px; border-radius: 4px;
  transition: all 120ms;
}
.manifesto-link:hover { color: var(--text); border-color: var(--accent); text-decoration: none; }
.manifesto-link.active { color: var(--text); border-color: var(--accent); }

.header h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.2px;
}
.subtitle {
  margin: 6px 0 0;
  color: var(--text-dim);
  font-size: 13.5px;
}

/* Layout grid */
.layout {
  display: grid;
  grid-template-columns: 290px 1fr 340px;
  gap: 16px;
  padding: 16px 16px 0;
  max-width: 1800px;
  margin: 0 auto;
  align-items: stretch;
}
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  max-height: calc(100vh - 180px);
  overflow-y: auto;
  padding-right: 4px;
}

/* Panels */
.panel {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
}
.panel-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.panel h2 {
  margin: 0;
  font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.6px;
  color: var(--text-dim);
}

/* Filter list */
.filter-list { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; }
.filter-row {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 4px;
  border-radius: 3px;
  cursor: pointer;
  user-select: none;
  color: var(--text-dim);
}
.filter-row:hover { background: var(--bg-elev-2); color: var(--text); }
.filter-row input { accent-color: var(--accent); margin: 0; flex-shrink: 0; }
.filter-row .swatch { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.filter-row .lbl { flex: 1; }
.filter-row .ct { color: var(--text-muted); font-size: 11px; font-variant-numeric: tabular-nums; }

/* Stats list */
.stats-list { list-style: none; padding: 0; margin: 0; }
.stats-list li {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  align-items: baseline;
}
.stats-list li:last-child { border-bottom: none; }
.stat-num {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 17px; font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.stat-label { color: var(--text-dim); font-size: 12.5px; line-height: 1.4; }

/* Rushkoff blockquote */
.rushkoff {
  margin: 0;
  font-family: Georgia, serif;
  font-size: 15px;
  font-style: italic;
  color: var(--text);
  line-height: 1.5;
  border-left: 3px solid var(--accent);
  padding: 6px 0 6px 14px;
}
.rushkoff cite {
  display: block;
  margin-top: 8px;
  font-style: normal;
  font-size: 11.5px;
  color: var(--text-muted);
}

/* Map canvas */
.canvas-wrap {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 8px;
  position: relative;
  min-height: 600px;
  overflow: hidden;
}
#map {
  display: block;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at center, #0a1020 0%, #07090f 100%);
}

.map-status {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  color: var(--text-dim);
  font-family: ui-monospace, monospace;
  font-size: 13px;
}

.tooltip {
  position: absolute;
  pointer-events: none;
  background: rgba(7, 9, 15, 0.95);
  border: 1px solid var(--border-strong);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  padding: 10px 14px;
  max-width: 320px;
  font-size: 12.5px;
  color: var(--text);
  opacity: 0;
  transition: opacity 80ms;
  z-index: 30;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}
.tooltip.visible { opacity: 1; }
.tooltip .name { font-weight: 700; margin-bottom: 4px; color: var(--accent); }
.tooltip .meta { color: var(--text-dim); font-size: 11.5px; line-height: 1.45; }
.tooltip .hint { font-size: 10.5px; color: var(--text-muted); margin-top: 6px; font-style: italic; }

/* Markers */
g.marker .ring { transition: r 120ms, fill-opacity 120ms; }
g.marker:hover .ring { r: 18; fill-opacity: 0.35; }
g.marker.active .ring { r: 22; fill-opacity: 0.45; stroke-width: 2.5; }
g.marker.active .dot { r: 7; }

/* Info panel (right) */
.info-panel {
  font-size: 13.5px;
  line-height: 1.55;
}
.empty-info {
  color: var(--text-dim);
  text-align: center;
  padding: 30px 10px;
}
.empty-info h3 {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
}
.info-header {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 10px;
}
.info-header .flag { font-size: 26px; }
.info-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
}
.info-tag {
  display: inline-block;
  font-family: ui-monospace, monospace;
  font-size: 10.5px;
  letter-spacing: 0.5px;
  border: 1px solid;
  padding: 2px 8px;
  border-radius: 3px;
  margin-bottom: 12px;
}
.info-meta, .info-status, .info-details {
  margin-bottom: 14px;
  color: var(--text);
}
.info-meta { font-size: 12.5px; line-height: 1.7; color: var(--text-dim); }
.info-meta strong { color: var(--text); font-weight: 600; }
.info-status {
  font-size: 12.5px;
  background: rgba(245, 158, 11, 0.06);
  border-left: 2px solid var(--accent);
  padding: 8px 12px;
  border-radius: 3px;
  color: var(--text);
}
.info-status strong { color: var(--accent); }
.info-details {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text);
}
.info-scenarios {
  margin: 16px 0;
  padding: 12px 14px;
  background: rgba(245, 158, 11, 0.05);
  border-radius: 6px;
}
.info-scenarios-label {
  font-family: ui-monospace, monospace;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.scenario-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.scenario-chip {
  font-family: ui-monospace, monospace;
  font-size: 10.5px;
  border: 1px solid;
  padding: 3px 8px;
  border-radius: 3px;
  background: rgba(0,0,0,0.3);
  cursor: help;
}

.info-source {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 12px;
}
.info-source a {
  font-family: ui-monospace, monospace;
  color: var(--link);
}

/* Manifesto strip */
.manifesto-strip {
  background: linear-gradient(180deg, var(--bg) 0%, #0e1628 100%);
  border-top: 1px solid var(--border);
  padding: 40px 24px;
  margin-top: 24px;
}
.manifesto-strip-inner {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}
.manifesto-strip h2 {
  margin: 0 0 16px;
  font-family: ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent);
}
.manifesto-strip p {
  font-size: 17px;
  line-height: 1.55;
  color: var(--text);
  font-family: Georgia, serif;
  margin: 0 0 20px;
}
.cta-link {
  display: inline-block;
  font-family: ui-monospace, monospace;
  font-size: 14px;
  color: #0a0a0a;
  background: var(--accent);
  padding: 12px 22px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
}
.cta-link:hover {
  background: var(--accent-soft);
  text-decoration: none;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  padding: 24px;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  font-family: ui-monospace, monospace;
}

/* Responsive */
@media (max-width: 1200px) {
  .layout { grid-template-columns: 240px 1fr 280px; }
}
@media (max-width: 980px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { max-height: none; }
}
