/* regulators-gap-map.css — plate-glass-atlas flavor.
   Frosted-blue map background, monospace overlays, choropleth fills
   (cyan = rich, amber = thin, red = gap). 24th distinct surface flavor
   in the ON1 landing rotation.
*/

:root {
  --night:      #0a1828;
  --night-2:    #0c1c2c;
  --plate:      #102640;
  --plate-2:    #163356;
  --frost:      #1c3a5c;
  --ink:        #d8e8f4;
  --ink-2:      #a8c0d4;
  --ink-faint:  #6a849c;
  --rule:       #284870;
  --rich:       #4be8d4;
  --rich-deep:  #1c8a82;
  --thin:       #f0a838;
  --thin-deep:  #b8742c;
  --gap:        #ec5a5a;
  --gap-deep:   #9c2c2c;
  --cyan:       #6cbcf0;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--night);
  background-image:
    radial-gradient(circle at 20% 18%, rgba(76, 188, 240, 0.10) 0, transparent 55%),
    radial-gradient(circle at 80% 82%, rgba(75, 232, 212, 0.06) 0, transparent 50%);
  color: var(--ink);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 14px;
  line-height: 1.55;
  min-height: 100vh;
}

body.atlas {
  padding: 14px 22px 48px;
  max-width: 1320px;
  margin: 0 auto;
}

.atlas-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px;
  background: rgba(16, 38, 64, 0.75);
  border: 1px solid var(--rule);
  border-radius: 6px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  margin-bottom: 18px;
  position: sticky;
  top: 8px;
  z-index: 4;
}

.atlas-head-l, .atlas-head-r {
  display: flex;
  align-items: center;
  gap: 14px;
}

.callsign {
  font-family: 'Chakra Petch', monospace;
  font-size: 22px;
  letter-spacing: 0.08em;
  color: var(--cyan);
}

.atlas-sep {
  color: var(--ink-faint);
  font-weight: 700;
  letter-spacing: 0.1em;
}

.atlas-title {
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
}

.atlas-badge {
  display: inline-block;
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rich);
  border: 1px solid var(--rich);
  padding: 4px 10px;
  border-radius: 3px;
  background: rgba(75, 232, 212, 0.06);
}
.atlas-badge.stale { color: var(--gap); border-color: var(--gap); background: rgba(236, 90, 90, 0.06); }
.atlas-badge.warn  { color: var(--thin); border-color: var(--thin); background: rgba(240, 168, 56, 0.06); }

.atlas-link {
  color: var(--cyan);
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-bottom: 1px dotted var(--cyan);
  padding-bottom: 1px;
}
.atlas-link:hover { color: var(--rich); border-bottom-color: var(--rich); }

.atlas-hero {
  background: linear-gradient(150deg, rgba(22, 51, 86, 0.65), rgba(12, 28, 44, 0.85));
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 24px 28px 22px;
  margin-bottom: 18px;
}

.atlas-kicker {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 8px;
}

.atlas-hero h1 {
  font-family: 'Familjen Grotesk', sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
  margin-bottom: 10px;
}

.atlas-hero p {
  font-family: 'Familjen Grotesk', sans-serif;
  color: var(--ink-2);
  max-width: 820px;
}

.atlas-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  align-items: center;
  padding: 12px 18px;
  background: rgba(16, 38, 64, 0.55);
  border: 1px solid var(--rule);
  border-radius: 6px;
  margin-bottom: 12px;
}

.legend-block {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: 0.08em;
}

.legend-swatch {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.swatch-rich { background: var(--rich); box-shadow: 0 0 12px rgba(75, 232, 212, 0.45); }
.swatch-thin { background: var(--thin); box-shadow: 0 0 8px rgba(240, 168, 56, 0.4); }
.swatch-gap  { background: var(--gap);  box-shadow: 0 0 6px rgba(236, 90, 90, 0.4); }

.legend-text { color: var(--ink); }
.legend-text strong {
  font-weight: 700;
  letter-spacing: 0.14em;
  margin-right: 6px;
}
.legend-rule { color: var(--ink-faint); font-size: 11px; }

.legend-counts { margin-left: auto; }

.count-pill {
  display: inline-block;
  margin-left: 6px;
  padding: 3px 9px;
  border-radius: 11px;
  font-weight: 700;
  font-size: 12px;
  font-family: 'IBM Plex Mono', monospace;
  border: 1px solid;
}
.count-rich { color: var(--rich); border-color: var(--rich); background: rgba(75, 232, 212, 0.08); }
.count-thin { color: var(--thin); border-color: var(--thin); background: rgba(240, 168, 56, 0.08); }
.count-gap  { color: var(--gap);  border-color: var(--gap);  background: rgba(236, 90, 90, 0.08); }

.atlas-map-wrap {
  margin-bottom: 22px;
}

.atlas-map-card {
  position: relative;
  background: var(--plate);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 24px;
  box-shadow:
    inset 0 1px 0 rgba(108, 188, 240, 0.08),
    0 6px 24px rgba(8, 18, 32, 0.45);
}

.atlas-map-rule {
  position: absolute;
  background: var(--cyan);
  opacity: 0.32;
}
.atlas-map-rule.top    { top: 12px; left: 24px; right: 24px; height: 1px; }
.atlas-map-rule.bottom { bottom: 12px; left: 24px; right: 24px; height: 1px; }
.atlas-map-rule.left   { top: 24px; bottom: 24px; left: 12px; width: 1px; }
.atlas-map-rule.right  { top: 24px; bottom: 24px; right: 12px; width: 1px; }

.atlas-map-coords {
  position: absolute;
  font-size: 9.5px;
  letter-spacing: 0.14em;
  color: var(--ink-faint);
  text-transform: uppercase;
  font-family: 'IBM Plex Mono', monospace;
}
.coords-tl { top: 14px; left: 24px; }
.coords-tr { top: 14px; right: 24px; }
.coords-bl { bottom: 14px; left: 24px; }
.coords-br { bottom: 14px; right: 24px; }

#gm-svg {
  width: 100%;
  height: auto;
  display: block;
  background: var(--night-2);
  border: 1px solid var(--frost);
  border-radius: 4px;
}

.atlas-detail-line {
  margin-top: 10px;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ink-2);
  text-align: center;
  min-height: 18px;
}

.atlas-detail-line.active { color: var(--rich); }

/* SVG marker styling */
.marker {
  cursor: pointer;
  transition: filter 0.18s, transform 0.18s;
  transform-box: fill-box;
  transform-origin: center;
}
.marker:hover, .marker:focus {
  filter: brightness(1.18);
  transform: scale(1.15);
  outline: none;
}
.marker-rich circle { fill: var(--rich); stroke: var(--rich-deep); stroke-width: 1.4; filter: drop-shadow(0 0 6px rgba(75, 232, 212, 0.55)); }
.marker-thin circle { fill: var(--thin); stroke: var(--thin-deep); stroke-width: 1.4; filter: drop-shadow(0 0 4px rgba(240, 168, 56, 0.5)); }
.marker-gap  circle { fill: var(--gap);  stroke: var(--gap-deep);  stroke-width: 1.4; filter: drop-shadow(0 0 3px rgba(236, 90, 90, 0.5)); }

.marker-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  fill: var(--ink);
  text-anchor: middle;
  pointer-events: none;
  letter-spacing: 0.06em;
  font-weight: 600;
  paint-order: stroke fill;
  stroke: var(--night);
  stroke-width: 2.5;
  stroke-linejoin: round;
}

.atlas-tabular {
  margin-bottom: 22px;
}

.atlas-section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
}

.atlas-section-title {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan);
}

.atlas-section-sub {
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
}

.atlas-table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(16, 38, 64, 0.55);
  border: 1px solid var(--rule);
  border-radius: 6px;
  overflow: hidden;
}
.atlas-table thead th {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cyan);
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--rule);
  background: rgba(40, 72, 112, 0.18);
}
.atlas-table th.num, .atlas-table td.num { text-align: right; }
.atlas-table tbody td {
  padding: 8px 12px;
  font-size: 12.5px;
  color: var(--ink);
  border-bottom: 1px solid rgba(40, 72, 112, 0.35);
}
.atlas-table tbody tr:last-child td { border-bottom: none; }
.atlas-table tbody tr:hover td { background: rgba(40, 72, 112, 0.2); }

.tier-pill {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 11px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid;
}
.tier-rich { color: var(--rich); border-color: var(--rich); background: rgba(75, 232, 212, 0.08); }
.tier-thin { color: var(--thin); border-color: var(--thin); background: rgba(240, 168, 56, 0.08); }
.tier-gap  { color: var(--gap);  border-color: var(--gap);  background: rgba(236, 90, 90, 0.08); }

.atlas-tbody-empty {
  padding: 20px;
  text-align: center;
  color: var(--ink-faint);
  font-style: italic;
}

.atlas-cta {
  margin-bottom: 22px;
}

.atlas-cta-card {
  background: linear-gradient(150deg, rgba(40, 72, 112, 0.45), rgba(12, 28, 44, 0.65));
  border: 1px solid var(--rule);
  border-left: 4px solid var(--thin);
  border-radius: 6px;
  padding: 22px 26px;
}

.folder-tab {
  display: inline-block;
  background: var(--rule);
  color: var(--ink);
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 11px;
  padding: 4px 14px;
  border-radius: 3px;
  margin-bottom: 12px;
}
.folder-tab-amber { background: var(--thin); color: var(--night); }

.atlas-cta-card h2 {
  font-family: 'Familjen Grotesk', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 10px;
}

.atlas-cta-card p {
  font-family: 'Familjen Grotesk', sans-serif;
  color: var(--ink-2);
  margin-bottom: 14px;
  max-width: 760px;
}

.atlas-cta-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0 12px;
}

.atlas-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(16, 38, 64, 0.85);
  border: 1px solid var(--rule);
  border-radius: 4px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--ink);
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.atlas-cta-btn:hover {
  background: rgba(40, 72, 112, 0.65);
  border-color: var(--cyan);
  color: var(--cyan);
}
.atlas-cta-btn.primary {
  border-color: var(--thin);
  color: var(--thin);
  background: rgba(240, 168, 56, 0.08);
}
.atlas-cta-btn.primary:hover {
  background: rgba(240, 168, 56, 0.18);
  color: var(--night);
  background-color: var(--thin);
}

.cta-arrow {
  font-family: 'Chakra Petch', monospace;
  font-size: 16px;
}

.atlas-cta-fine {
  font-size: 11.5px;
  color: var(--ink-faint);
  margin-top: 8px;
}
.atlas-cta-fine code {
  background: rgba(40, 72, 112, 0.45);
  border: 1px solid var(--frost);
  padding: 1px 5px;
  border-radius: 2px;
  font-size: 11px;
}

.atlas-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-top: 1px solid var(--rule);
  margin-top: 20px;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
  text-transform: uppercase;
  font-family: 'IBM Plex Mono', monospace;
}

@media (max-width: 720px) {
  body.atlas { padding: 12px 12px 40px; }
  .atlas-head { flex-direction: column; gap: 8px; align-items: flex-start; }
  .atlas-head-r { flex-wrap: wrap; }
  .atlas-hero h1 { font-size: 22px; }
  .atlas-legend { gap: 12px; }
  .legend-counts { margin-left: 0; }
  .atlas-cta-buttons { flex-direction: column; }
  .atlas-cta-btn { width: 100%; justify-content: flex-start; }
  .atlas-table thead th { font-size: 9.5px; padding: 8px 6px; }
  .atlas-table tbody td { font-size: 11.5px; padding: 6px 6px; }
}
