/* R3 slice 6/14 (25-geo-panels.css) — extracted VERBATIM from styles.css lines 4039-4380.
   geography view header tabs, geo hero/stat tiles, state list, zones donut card, LGA footer card.
   Link order in index.html is load-bearing: cascade tie-breaks depend on it. Do not reorder. */

/* ── Geography segmented tab control (foundations §7) ──
   Scoped to .view-header (geography-only) so the shared .tab-btn used by the
   Users sub-tabs keeps its legacy styling. The .active rule needs !important
   to override the legacy `.tab-btn.active { ...green... !important }` block. */

.view-header {
  margin-bottom: 20px;
  display: flex;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 12px;
}

.view-header .tab-nav {
  display: inline-flex;
  gap: 4px;
  background: var(--chip);
  padding: 4px;
  border-radius: 12px;
}

.view-header .tab-btn {
  min-height: 44px;
  padding: 0 16px;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-body-new);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: background .2s ease, color .2s ease;
}

.view-header .tab-btn:hover { color: var(--ink); }

.view-header .tab-btn.active {
  background: var(--surface) !important;
  color: var(--accent-ink) !important;        /* bright green in dark -> the active tab is obvious */
  border: 1px solid var(--border) !important;
  box-shadow: var(--shadow-card) !important;
}

@media (prefers-reduced-motion: reduce) {
  .view-header .tab-btn { transition: none; }
}

/* ── Geography bento grid ──────────────────────────── */

.geo-layout {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 12px;
}

.geo-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Hero card — state rankings */
.geo-hero-card {
  grid-area: hero;
  display: flex;
  flex-direction: column;
  min-height: 460px;
  gap: 12px;
}

.geo-stat-tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 0 20px;
}

.geo-stat-tile {
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: var(--hover-bg);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.geo-stat-tile strong {
  color: var(--ink);
  font-weight: 700;
  font-size: 15px;
  line-height: 1.2;
}

.geo-stat-tile small {
  color: var(--muted);
  font-size: 11px;
}

.geo-state-list {
  display: flex;
  flex-direction: column;
  padding: 0 20px 20px;
  flex: 1;
  min-height: 0;
}

.geo-state-row {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) minmax(0, 90px) 56px;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--hairline);
  padding: 9px 0;
}

.geo-state-row:last-child {
  border-bottom: none;
}

.geo-state-row > span {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--green);
  background: rgba(0, 162, 99, .1);
  font-family: "Geist Mono", monospace;
  font-size: 11px;
  font-weight: 700;
}

.geo-state-row strong {
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

.geo-state-bar {
  height: 4px;
  border-radius: 999px;
  background: var(--hover-bg);
  border: 1px solid var(--hairline);
  overflow: hidden;
}

.geo-state-bar i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--green);
  min-width: 4%;
}

.geo-state-row > b {
  color: var(--ink);
  font-weight: 700;
  font-family: "Geist Mono", monospace;
  font-size: 12px;
  text-align: right;
}

/* Zone distribution card */
.geo-zones-card {
  grid-area: zones;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.geo-donut {
  width: 200px;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35);
  margin: 0 auto;
}

.geo-donut span {
  width: 72%;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  align-content: center;
  text-align: center;
  color: var(--ink);
  background: var(--card-start);
  border: 1px solid var(--hairline);
  font-weight: 800;
  font-size: 15px;
  line-height: 1;
}

.geo-donut small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
}

.geo-zone-legend {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
  padding: 0 20px;
}

.geo-zone-legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
}

.geo-zone-legend i {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  flex: 0 0 auto;
}

.geo-zone-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 20px 20px;
  flex: 1;
  min-height: 0;
}

.geo-zone-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  border: 1px solid var(--hairline);
  border-left-width: 3px;
  border-radius: 8px;
  background: var(--card-start);
  padding: 10px 14px;
}

.geo-zone-row strong {
  display: block;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.geo-zone-row small {
  color: var(--muted);
  font-size: 11px;
}

.geo-zone-row > span {
  color: var(--ink);
  font-weight: 700;
  font-family: "Geist Mono", monospace;
  font-size: 13px;
  white-space: nowrap;
}

/* LGA footer card */
.geo-lga-card {
  grid-area: lgas;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.geo-lga-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 0 20px 20px;
}

.geo-lga-tile {
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: var(--hover-bg);
  padding: 12px;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  grid-template-rows: auto auto auto;
  column-gap: 10px;
  row-gap: 2px;
}

.geo-lga-tile > span {
  grid-row: 1 / 4;
  align-self: center;
  width: 28px;
  height: 28px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--green);
  background: rgba(0, 162, 99, .1);
  font-family: "Geist Mono", monospace;
  font-size: 11px;
  font-weight: 700;
}

.geo-lga-tile strong {
  display: block;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 600;
}

.geo-lga-tile b {
  display: block;
  color: var(--ink);
  font-weight: 700;
  font-size: 12px;
}

.geo-lga-tile small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
