/* AstraVeris Atlas — UI styled to match opengridworks.com exactly,
   reskinned with the AstraVeris gold accent.

   OGW computed values were captured live (2026-04-27):
   - Panel:          rgba(10,15,26,0.92) bg, 1px slate border @ 0.06 alpha,
                     12px radius, 0 8px 24px rgba(0,0,0,0.5) shadow,
                     260px wide, 16px padding, 13px Inter
   - Section title:  rgba(248,250,252,0.96), 14px / weight 640
   - Item:           18px row, flex
   - Swatch:         10×10 circle
   - Label:          rgb(203,213,225), 12px
   - Stat:           rgb(219,234,254), 11px, letter 0.11px
   We mirror those exactly; gold (#D4A843) replaces OGW's cyan accent.
*/

:root {
  --ogw-bg:           rgba(10, 15, 26, 0.94);
  --ogw-bg-solid:     #0A0F1A;
  --ogw-bg-elevated:  rgba(18, 24, 38, 0.96);     /* popovers, dropdowns */
  --ogw-border:       rgba(148, 163, 184, 0.10);
  --ogw-border-soft:  rgba(148, 163, 184, 0.04);
  /* No-white text palette: warm-grey + warm-cream — none above #D6CDAE */
  --ogw-text-primary: #C9CDD6;
  --ogw-text-title:   #D6CDAE;                    /* warm cream — replaces near-white */
  --ogw-text-label:   #A8AAB4;                    /* secondary label */
  --ogw-text-stat:    #BDB390;                    /* warm cream-tan for numeric counts */
  --ogw-text-muted:   #7A7E89;
  --ogw-text-faint:   #5C5E69;
  --ogw-accent:       #D4A843;
  --ogw-accent-bright: #E8C547;
  --ogw-accent-glow:  rgba(212, 168, 67, 0.14);
  --ogw-accent-glow-strong: rgba(212, 168, 67, 0.22);
  --ogw-row-hover:    rgba(212, 168, 67, 0.06);
  --ogw-row-active:   rgba(212, 168, 67, 0.12);
}

body.atlas-page {
  margin: 0;
  background: #03060F;
  color: var(--ogw-text-primary);
  font-family: Inter, 'Segoe UI', system-ui, -apple-system, sans-serif;
  overflow: hidden;
}
/* Starfield canvas — fixed under everything, visible where map is transparent.
   Sits between body background and the map container so MapLibre's sky/fog
   tints stars without hiding them. */
body.atlas-page .starfield {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.85;          /* punchy enough to read as space behind the globe */
}
#atlas-container { position: fixed; inset: 0; background: transparent; z-index: 1; }
#atlas-map { position: absolute; inset: 0; background: transparent; }
.maplibregl-canvas { background: transparent !important; }
.maplibregl-ctrl-bottom-right,
.maplibregl-ctrl-bottom-left,
.maplibregl-ctrl-attrib { display: none !important; }

/* === Loading === */
.atlas-loading {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at center, #0A0F1A 0%, #03060F 70%);
  z-index: 100;
  transition: opacity 0.55s ease, visibility 0.55s ease;
}
.atlas-loading.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.atlas-loading-inner { text-align: center; }
.atlas-loading-ring {
  width: 40px; height: 40px;
  border: 2px solid rgba(212, 168, 67, 0.18);
  border-top-color: var(--ogw-accent);
  border-radius: 50%;
  margin: 0 auto 14px;
  animation: ogw-spin 1s linear infinite;
}
@keyframes ogw-spin { to { transform: rotate(360deg); } }
.atlas-loading-text {
  font-size: 11px; letter-spacing: 0.18em; color: var(--ogw-accent); font-weight: 500;
}
.atlas-loading-sub {
  font-size: 10px; letter-spacing: 0.1em; color: var(--ogw-text-muted);
  margin-top: 6px; font-family: 'JetBrains Mono', 'DM Mono', monospace;
}

/* === OGW-style left panel ============================================== */
.ogw-panel {
  position: absolute;
  left: 16px; top: 152px;            /* clear toolbar pills above */
  width: 290px;
  max-height: calc(100vh - 190px);
  background: var(--ogw-bg);
  border: 1px solid var(--ogw-border);
  border-radius: 10px;
  padding: 18px 18px 14px;           /* +2 horizontal, +2 top to feel less cramped */
  font-size: 13px;
  color: var(--ogw-text-primary);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.55);
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 30;
  transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s;
}
.ogw-panel:not(.is-open) {
  transform: translateX(-110%);
  opacity: 0;
  pointer-events: none;
}

/* Custom dark scrollbar (webkit + firefox) */
.ogw-panel::-webkit-scrollbar { width: 8px; height: 8px; }
.ogw-panel::-webkit-scrollbar-track { background: transparent; }
.ogw-panel::-webkit-scrollbar-thumb {
  background: rgba(212, 168, 67, 0.18);
  border-radius: 4px;
}
.ogw-panel::-webkit-scrollbar-thumb:hover { background: rgba(212, 168, 67, 0.32); }
.ogw-panel { scrollbar-width: thin; scrollbar-color: rgba(212, 168, 67, 0.20) transparent; }

/* === Top-left toolbar (OGW pattern: pills float above the map) ========= */
.ogw-toolbar {
  position: absolute;
  left: 16px; top: 96px;             /* clear site header + ticker bar */
  display: flex;
  gap: 6px;
  z-index: 35;
}
.ogw-tool-pill {
  background: var(--ogw-bg);
  border: 1px solid var(--ogw-border);
  border-radius: 8px;
  color: var(--ogw-text-primary);
  font-family: Inter, sans-serif;
  font-size: 11px;
  font-weight: 540;
  letter-spacing: 0.04em;
  padding: 8px 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.ogw-tool-pill:hover { background: var(--ogw-accent-glow); border-color: rgba(212,168,67,0.30); color: var(--ogw-accent-bright); }
.ogw-tool-pill.is-active {
  background: var(--ogw-accent-glow-strong);
  border-color: rgba(212,168,67,0.55);
  color: var(--ogw-accent-bright);
}
.ogw-tool-pill-glyph { font-size: 13px; line-height: 1; }
.ogw-tool-pill-count {
  background: rgba(0, 0, 0, 0.30);
  color: var(--ogw-text-stat);
  border-radius: 8px;
  font-size: 9px;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.04em;
  padding: 1px 6px;
  margin-left: 2px;
  font-variant-numeric: tabular-nums;
}
.ogw-tool-pill-count.is-active {
  background: var(--ogw-accent-glow-strong);
  color: var(--ogw-accent-bright);
}

/* Toolbar panel-handle replacement (when panel collapsed, toolbar is the way back in) */
.ogw-handle { display: none; }   /* old handle replaced by toolbar */

/* Collapse toggle inside panel */
.ogw-collapse-toggle {
  position: absolute;
  top: 14px; right: 14px;
  background: transparent;
  border: 1px solid var(--ogw-border);
  border-radius: 6px;
  color: var(--ogw-text-muted);
  width: 24px; height: 24px;
  cursor: pointer;
  font-size: 14px; line-height: 1;
  font-family: inherit;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
  z-index: 2;
}
.ogw-collapse-toggle:hover { color: var(--ogw-accent); background: var(--ogw-accent-glow); border-color: rgba(212,168,67,0.30); }

/* Header — generous spacing, no overlap with collapse button */
.ogw-header {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin: 0 0 18px;
  padding: 0 38px 14px 0;          /* leave room for collapse toggle on right */
  border-bottom: 1px solid var(--ogw-border-soft);
}
.ogw-badge {
  display: inline-block;
  background: var(--ogw-accent-glow);
  color: var(--ogw-accent);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.18em;
  padding: 2px 7px;
  border-radius: 3px;
  align-self: flex-start;
  margin-bottom: 6px;
}
.ogw-title {
  margin: 0;
  font-size: 18px;
  font-weight: 640;
  letter-spacing: -0.005em;
  color: var(--ogw-text-title);
  line-height: 1.15;
}
.ogw-subtitle {
  margin: 4px 0 0;
  font-size: 11px;
  color: var(--ogw-text-stat);
  font-family: 'JetBrains Mono', 'DM Mono', monospace;
  letter-spacing: 0.04em;
}
.ogw-subtitle .ogw-divider {
  color: var(--ogw-text-faint);
  margin: 0 6px;
}

/* View context line — separated from header, no longer overlaps gear */
.ogw-view-context {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  color: var(--ogw-text-muted);
  letter-spacing: 0.04em;
  font-family: 'JetBrains Mono', 'DM Mono', monospace;
  margin: 0 0 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--ogw-border-soft);
}
.ogw-view-context-label { flex: 1; }
.ogw-view-gear {
  background: transparent;
  border: 1px solid transparent;
  color: var(--ogw-text-muted);
  font-size: 12px;
  cursor: pointer;
  padding: 0;
  width: 22px; height: 22px;
  line-height: 1;
  border-radius: 4px;
}
.ogw-view-gear:hover { color: var(--ogw-accent); border-color: var(--ogw-border); background: var(--ogw-accent-glow); }

/* Status grid — only 2 columns now (CENTER + ZOOM on row 1, LAYERS + FRESH on row 2) */
.ogw-status {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 16px;
  font-family: 'JetBrains Mono', 'DM Mono', monospace;
  font-size: 10px;
  margin: 0 0 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--ogw-border-soft);
}
.ogw-status-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ogw-status-key {
  color: var(--ogw-text-faint);
  letter-spacing: 0.14em;
  font-size: 8.5px;
  font-weight: 600;
}
.ogw-status-val {
  color: var(--ogw-text-stat);
  font-size: 11px;
  font-weight: 500;
}
.ogw-status-val.is-fresh { color: #7BC9A8; }
.ogw-status-val.is-stale { color: var(--ogw-accent-bright); }

/* === Custom dark checkboxes (no native white) ============================ */
.ogw-panel input[type="checkbox"],
.ogw-popover input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  width: 13px;
  height: 13px;
  margin: 0;
  border: 1px solid rgba(148, 163, 184, 0.30);
  border-radius: 3px;
  background: rgba(8, 12, 20, 0.65);
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
  transition: background 0.15s, border-color 0.15s;
}
.ogw-panel input[type="checkbox"]:hover,
.ogw-popover input[type="checkbox"]:hover {
  border-color: var(--ogw-accent);
  background: rgba(212, 168, 67, 0.08);
}
.ogw-panel input[type="checkbox"]:checked,
.ogw-popover input[type="checkbox"]:checked {
  background: var(--ogw-accent);
  border-color: var(--ogw-accent);
}
.ogw-panel input[type="checkbox"]:checked::after,
.ogw-popover input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 3px; top: 0px;
  width: 5px; height: 8px;
  border-right: 2px solid #07080C;
  border-bottom: 2px solid #07080C;
  transform: rotate(45deg);
}
.ogw-panel input[type="checkbox"]:indeterminate,
.ogw-popover input[type="checkbox"]:indeterminate {
  background: var(--ogw-accent-glow-strong);
  border-color: var(--ogw-accent);
}
.ogw-panel input[type="checkbox"]:indeterminate::after,
.ogw-popover input[type="checkbox"]:indeterminate::after {
  content: '';
  position: absolute;
  left: 2px; top: 5px;
  width: 7px; height: 2px;
  background: var(--ogw-accent);
  border-radius: 1px;
}
.ogw-panel input[type="checkbox"]:focus-visible,
.ogw-popover input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--ogw-accent);
  outline-offset: 2px;
}

/* === Section (category group) — generous gap, breathing room === */
.ogw-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 22px;
}
.ogw-section:last-child { margin-bottom: 4px; }
.ogw-section-header {
  display: flex;
  align-items: center;
  gap: 6px;
  user-select: none;
}
.ogw-section-toggle {
  flex-shrink: 0;
  cursor: pointer;
  width: 12px; height: 12px;
  margin: 0;
  accent-color: var(--ogw-accent);
}
.ogw-section-title {
  flex: 1;
  background: transparent;
  border: 0;
  padding: 0;
  font-family: inherit;
  font-size: 14px;
  font-weight: 640;
  letter-spacing: 0.14px;
  color: var(--ogw-text-title);
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}
.ogw-section-title:hover { color: var(--ogw-accent-bright); }
.ogw-section-caret {
  font-size: 10px;
  color: var(--ogw-text-muted);
  width: 10px;
  display: inline-block;
}
.ogw-section-count {
  margin-left: auto;
  font-family: 'JetBrains Mono', 'DM Mono', monospace;
  font-size: 9px;
  color: var(--ogw-text-faint);
  font-weight: 400;
  letter-spacing: 0.05em;
}
.ogw-section-count.is-active {
  color: var(--ogw-accent);
}
.ogw-section.is-collapsed .ogw-legend { display: none; }
.ogw-section.is-collapsed .ogw-section-meta { display: none; }

/* === Legend rows — taller, more padding, easier to scan === */
.ogw-legend {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ogw-legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 24px;
  padding: 2px 6px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.12s;
}
.ogw-legend-item:hover {
  background: var(--ogw-row-hover);
  box-shadow: inset 2px 0 0 rgba(212, 168, 67, 0.28);
}
.ogw-legend-item.is-on {
  background: var(--ogw-row-active);
  box-shadow: inset 2px 0 0 var(--ogw-accent);
}
.ogw-legend-item.is-on .ogw-label { color: var(--ogw-text-title); }
.ogw-legend-item.is-on .ogw-stat .ogw-stat-count { color: var(--ogw-accent-bright); }
.ogw-legend-checkbox {
  width: 11px; height: 11px;
  margin: 0;
  accent-color: var(--ogw-accent);
  flex-shrink: 0;
  cursor: pointer;
}
.ogw-swatch {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-block;
}
.ogw-swatch.shape-square { border-radius: 1.5px; }
.ogw-swatch.shape-triangle {
  background: transparent !important;
  width: 0; height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 9px solid currentColor;
  border-radius: 0;
}
.ogw-swatch.shape-diamond {
  border-radius: 1.5px;
  transform: rotate(45deg) scale(0.78);
}
.ogw-swatch.shape-star,
.ogw-swatch.shape-hex {
  /* Glyph-driven: real char in CSS via ::before */
  width: 11px; height: 11px;
  background: transparent !important;
  position: relative;
}
.ogw-swatch.shape-star::before { content: '★'; color: currentColor; font-size: 12px; line-height: 1; position: absolute; inset: -1px 0 0 0; text-align: center; }
.ogw-swatch.shape-hex::before  { content: '⬢'; color: currentColor; font-size: 12px; line-height: 1; position: absolute; inset: -1px 0 0 0; text-align: center; }
.ogw-swatch.shape-ring {
  background: transparent !important;
  border: 2px solid currentColor;
  border-radius: 50%;
  width: 9px; height: 9px;
}
.ogw-swatch.shape-polygon {
  border-radius: 1.5px;
  width: 12px; height: 7px;
  border: 1px solid currentColor;
  background: rgba(255,255,255,0.06) !important;
}
.ogw-swatch.shape-cross {
  background: transparent !important;
  position: relative;
  width: 10px; height: 10px;
}
.ogw-swatch.shape-cross::before {
  content: '✚';
  color: currentColor;
  font-size: 11px;
  line-height: 1;
  position: absolute; inset: -1px 0 0 0;
  text-align: center;
}
.ogw-label {
  flex: 1 1 auto;
  min-width: 0;                       /* allow flex shrink past content */
  font-size: 12px;
  color: var(--ogw-text-label);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ogw-stat {
  display: flex;
  align-items: baseline;
  gap: 3px;
  font-size: 10.5px;
  color: var(--ogw-text-stat);
  letter-spacing: 0.04em;
  font-family: 'JetBrains Mono', 'DM Mono', monospace;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
  max-width: 100px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ogw-stat-count { white-space: nowrap; }
.ogw-stat-unit  { white-space: nowrap; }
.ogw-stat-count.is-muted { color: var(--ogw-text-faint); font-size: 13px; }
.ogw-stat-divider {
  color: var(--ogw-text-faint);
  margin: 0 1px;
}
.ogw-fresh-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
  cursor: help;
}
.ogw-fresh-dot.is-fresh { background: #7BC9A8; box-shadow: 0 0 5px #7BC9A8; }
.ogw-fresh-dot.is-stale { background: var(--ogw-accent-bright); }

/* Section meta — shown below section header (encoding axis labels + size legend) */
.ogw-section-meta {
  font-family: 'JetBrains Mono', 'DM Mono', monospace;
  font-size: 9px;
  color: var(--ogw-text-muted);
  letter-spacing: 0.04em;
  margin: 0 4px 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ogw-section-meta-line { display: flex; gap: 4px; align-items: center; }
.ogw-section-meta-key {
  color: var(--ogw-accent);
  font-weight: 600;
  letter-spacing: 0.08em;
  font-size: 8.5px;
  text-transform: uppercase;
}

/* Per-layer expandable settings (opacity + filters) */
.ogw-settings-btn {
  background: transparent;
  border: 0;
  color: var(--ogw-text-faint);
  width: 16px; height: 16px;
  cursor: pointer;
  font-size: 10px;
  line-height: 1;
  flex-shrink: 0;
  border-radius: 3px;
  opacity: 0;
  transition: opacity 0.15s, color 0.15s;
}
.ogw-legend-item:hover .ogw-settings-btn { opacity: 1; color: var(--ogw-text-muted); }
.ogw-settings-btn:hover { color: var(--ogw-accent); }
.ogw-settings-btn.is-open { opacity: 1; color: var(--ogw-accent); }

/* === Floating popovers (presets dropdown + per-layer settings) ============ */
.ogw-popover {
  position: absolute;
  background: var(--ogw-bg-elevated);
  border: 1px solid var(--ogw-border);
  border-radius: 8px;
  padding: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(212, 168, 67, 0.04);
  z-index: 50;
  min-width: 220px;
  max-width: 320px;
  font-family: Inter, sans-serif;
  font-size: 12px;
  color: var(--ogw-text-primary);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 0.16s ease, transform 0.16s ease;
}
.ogw-popover.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
/* Subtle caret pointing back at the anchor element */
.ogw-popover::before {
  content: '';
  position: absolute;
  top: -6px; left: 22px;
  width: 12px; height: 12px;
  background: var(--ogw-bg-elevated);
  border-left: 1px solid var(--ogw-border);
  border-top: 1px solid var(--ogw-border);
  transform: rotate(45deg);
  border-top-left-radius: 2px;
}
.ogw-popover-header {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--ogw-accent);
  text-transform: uppercase;
  margin: 0 0 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--ogw-border-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ogw-popover-close {
  background: transparent;
  border: 0;
  color: var(--ogw-text-muted);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
}
.ogw-popover-close:hover { color: var(--ogw-accent); }

/* Presets popover specifically — 2-column grid of preset chips */
.ogw-popover-presets {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.ogw-preset {
  background: rgba(20, 27, 45, 0.55);
  border: 1px solid var(--ogw-border);
  border-radius: 5px;
  color: var(--ogw-text-label);
  font-family: inherit;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 8px 10px;
  cursor: pointer;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 7px;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.ogw-preset:hover { background: var(--ogw-row-hover); color: var(--ogw-accent-bright); border-color: rgba(212,168,67,0.25); }
.ogw-preset.is-active {
  background: var(--ogw-accent-glow-strong);
  color: var(--ogw-accent-bright);
  border-color: rgba(212, 168, 67, 0.55);
}
.ogw-preset-glyph {
  font-size: 12px;
  flex-shrink: 0;
  width: 14px;
  text-align: center;
}

/* Layer settings popover */
.ogw-popover-settings {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ogw-setting-row {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 10px;
  font-family: 'JetBrains Mono', 'DM Mono', monospace;
  color: var(--ogw-text-muted);
}
.ogw-setting-row .ogw-setting-key {
  letter-spacing: 0.12em;
  font-size: 8.5px;
  font-weight: 600;
  color: var(--ogw-text-faint);
  text-transform: uppercase;
}
.ogw-setting-row input[type="range"] {
  flex: 1;
  accent-color: var(--ogw-accent);
  height: 3px;
  margin: 0;
}
.ogw-setting-row .ogw-setting-val {
  font-size: 11px; color: var(--ogw-text-stat);
  text-align: right;
}
.ogw-setting-row .ogw-setting-text {
  color: var(--ogw-text-label);
  font-size: 11px;
  word-break: break-word;
}
.ogw-setting-row a {
  color: var(--ogw-accent);
  text-decoration: none;
  border-bottom: 1px dashed rgba(212, 168, 67, 0.25);
  font-size: 10px;
  word-break: break-all;
}
.ogw-setting-row a:hover { color: var(--ogw-accent-bright); }
.ogw-setting-slider-row {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 10px;
}
.ogw-setting-slider-row .ogw-setting-key { min-width: 56px; }

/* === HUD chrome on the map (bottom-right buttons + attribution) === */
.atlas-hud {
  position: absolute;
  background: var(--ogw-bg);
  border: 1px solid var(--ogw-border);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 11px;
  color: var(--ogw-text-primary);
  z-index: 10;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}
.atlas-hud-bl { bottom: 16px; left: 326px; padding: 5px 9px; font-size: 10px; }
.atlas-hud-br {
  bottom: 16px; right: 16px;
  display: flex; gap: 5px; padding: 5px 6px;
  align-items: center;
}
.atlas-btn-divider {
  width: 1px; height: 16px;
  background: rgba(148, 163, 184, 0.18);
  margin: 0 3px;
  display: inline-block;
}
.atlas-btn.is-flash {
  background: rgba(123, 201, 168, 0.22);
  border-color: #7BC9A8;
  color: #7BC9A8;
}

.atlas-attr-text { color: var(--ogw-text-faint); font-size: 10px; font-family: 'JetBrains Mono', 'DM Mono', monospace; }
.atlas-attr-text a { color: inherit; text-decoration: underline; text-decoration-color: rgba(148,163,184,0.20); }

.atlas-btn {
  background: var(--ogw-accent-glow);
  color: var(--ogw-accent);
  border: 1px solid rgba(212, 168, 67, 0.22);
  padding: 5px 11px;
  font-family: inherit;
  font-size: 10px; font-weight: 500; letter-spacing: 0.12em;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.atlas-btn:hover { background: rgba(212, 168, 67, 0.22); border-color: rgba(212, 168, 67, 0.45); }
.atlas-btn.is-active { background: rgba(212, 168, 67, 0.28); border-color: var(--ogw-accent); color: var(--ogw-accent-bright); }

/* === Header overrides for atlas page === */
body.atlas-page .header { background: rgba(3, 6, 15, 0.78); z-index: 50; }
body.atlas-page .ticker-bar { z-index: 51; }

/* === Hover tooltip on data points === */
.atlas-hover-tip {
  position: fixed;
  pointer-events: none;
  z-index: 60;
  background: var(--ogw-bg);
  border: 1px solid var(--ogw-border);
  border-radius: 6px;
  padding: 7px 10px;
  font-family: 'JetBrains Mono', 'DM Mono', monospace;
  font-size: 10px;
  color: var(--ogw-text-primary);
  letter-spacing: 0.02em;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
  max-width: 260px;
  opacity: 0;
  transition: opacity 0.12s ease;
}
.atlas-hover-tip.is-visible { opacity: 1; }
.atlas-hover-tip-title {
  color: var(--ogw-accent);
  font-size: 9px;
  letter-spacing: 0.16em;
  margin-bottom: 3px;
  text-transform: uppercase;
  font-weight: 700;
}
.atlas-hover-tip-body { line-height: 1.45; }
.atlas-hover-tip-row { display: flex; gap: 8px; }
.atlas-hover-tip-key { color: var(--ogw-text-faint); min-width: 56px; }
.atlas-hover-tip-val { color: var(--ogw-text-primary); }

/* MapLibre popup chrome */
.maplibregl-popup-content {
  background: var(--ogw-bg) !important;
  color: var(--ogw-text-primary) !important;
  border: 1px solid var(--ogw-border) !important;
  border-radius: 6px !important;
  font-family: 'JetBrains Mono', 'DM Mono', monospace;
  font-size: 11px;
  padding: 0 !important;
}
.maplibregl-popup-tip { border-top-color: rgba(10,15,26,0.92) !important; }
.maplibregl-popup-close-button {
  color: var(--ogw-text-muted) !important;
  font-size: 14px !important;
  padding: 4px 6px 0 0 !important;
}
.maplibregl-popup-close-button:hover { color: var(--ogw-accent) !important; background: transparent !important; }

/* Body-wide dark scrollbar fallback */
body.atlas-page ::-webkit-scrollbar { width: 8px; height: 8px; }
body.atlas-page ::-webkit-scrollbar-track { background: rgba(0,0,0,0.2); }
body.atlas-page ::-webkit-scrollbar-thumb {
  background: rgba(212, 168, 67, 0.18);
  border-radius: 4px;
}
body.atlas-page ::-webkit-scrollbar-thumb:hover { background: rgba(212, 168, 67, 0.32); }

/* ─── DC Suitability Score gear-panel UI (weight sliders + factor list) ─── */
.ogw-setting-divider {
  height: 1px;
  background: rgba(212, 168, 67, 0.18);
  margin: 8px 0 6px;
}
.ogw-setting-section {
  font-size: 10px;
  letter-spacing: 0.12em;
  color: #D4A843;
  text-transform: uppercase;
  margin: 4px 0 4px;
  font-weight: 600;
}
.ogw-mini-btn {
  background: rgba(212, 168, 67, 0.1);
  border: 1px solid rgba(212, 168, 67, 0.35);
  color: #D4A843;
  font-family: 'JetBrains Mono', 'DM Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: 3px;
  cursor: pointer;
  text-transform: uppercase;
}
.ogw-mini-btn:hover {
  background: rgba(212, 168, 67, 0.22);
  border-color: rgba(212, 168, 67, 0.6);
}
.dc-factor-list {
  margin-top: 4px;
  max-height: 280px;
  overflow-y: auto;
  font-family: 'JetBrains Mono', 'DM Mono', monospace;
  font-size: 10px;
}
.dc-factor-group {
  font-size: 9px;
  letter-spacing: 0.14em;
  color: #D4A843;
  margin: 6px 0 2px;
  opacity: 0.85;
}
.dc-factor-row {
  display: grid;
  grid-template-columns: 14px 1fr auto;
  gap: 6px;
  align-items: baseline;
  padding: 2px 0;
}
.dc-factor-sign {
  font-weight: 700;
  font-size: 12px;
  text-align: center;
  width: 14px;
}
.dc-factor-name { color: #EDEDF0; letter-spacing: 0.04em; }
.dc-factor-src { color: #9da0aa; font-size: 9px; text-align: right; opacity: 0.85; }
.dc-factor-note { color: #7a7d86; font-size: 9px; margin: 0 0 4px 20px; font-style: italic; }
