:root {
  --bg-0: #04111d;
  --bg-1: #071828;
  --bg-2: rgba(8, 22, 37, 0.9);
  --bg-3: rgba(11, 31, 49, 0.86);
  --bg-4: rgba(18, 44, 66, 0.86);
  --teal: #56d6c8;
  --teal-2: #87f0e5;
  --cyan: #73bde8;
  --green: #38d39f;
  --amber: #f5c76c;
  --orange: #ff9b68;
  --red: #ff6f7d;
  --violet: #7f89ff;
  --text: #f5fcff;
  --muted: rgba(236, 246, 250, 0.92);
  --muted-strong: #dcecf3;
  --panel-bg: linear-gradient(180deg, rgba(7, 22, 36, 0.97), rgba(5, 17, 29, 0.95));
  --panel-bg-soft: rgba(6, 20, 33, 0.9);
  --soft: rgba(255, 255, 255, 0.06);
  --line: rgba(86, 214, 200, 0.14);
  --line-strong: rgba(86, 214, 200, 0.28);
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.32);
  --title: "Rajdhani", sans-serif;
  --body: "Exo 2", sans-serif;
  --mono: "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --radius: 18px;
  --layout-min-width: 0px;
  --layout-fallback-min-width: 1280px;
  --topbar-height: 74px;
  --topbar-inline-pad: clamp(16px, 1.1vw, 24px);
  --sidebar-width: clamp(220px, 13.5vw, 290px);
  --context-rail-width: clamp(240px, 14vw, 300px);
  --sidebar-width-compact: clamp(210px, 14.25vw, 270px);
  --context-rail-width-compact: clamp(230px, 14.5vw, 280px);
  --page-pad: clamp(12px, 0.9vw, 20px);
  --panel-gap: clamp(8px, 0.55vw, 12px);
  --control-height: clamp(40px, 2.4vw, 52px);
  --screen-header-gap: clamp(14px, 1vw, 24px);
  --screen-title-size: clamp(30px, 2vw, 36px);
  --geo-screen-title-size: clamp(26px, 1.65vw, 30px);
  --overview-map-min-height: clamp(500px, 44vh, 560px);
  --map-panel-min-height: clamp(340px, 29vh, 380px);
  --geo-playback-chart-height: clamp(280px, 24vh, 360px);
  --map-overlay-safe-offset: 108px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  min-height: 100%;
  background:
    radial-gradient(circle at 12% 10%, rgba(51, 141, 162, 0.34), transparent 24%),
    radial-gradient(circle at 80% 0%, rgba(40, 102, 155, 0.26), transparent 28%),
    linear-gradient(180deg, #06121f 0%, #04111d 100%);
  color: var(--text);
  font-family: var(--body);
}

body {
  width: 100%;
  min-width: 0;
  overflow-x: hidden;
}

.rev2-root,
.app {
  height: 100vh;
  min-height: 100vh;
  width: 100%;
  min-width: 0;
}

@supports (height: 100dvh) {
  .rev2-root,
  .app {
    height: 100dvh;
    min-height: 100dvh;
  }
}

.app {
  display: grid;
  /* 3 tracks: topbar (74px) · preload-bar (auto — 0 when hidden, 22px when
     visible) · main-shell wrapper (1fr). Without the explicit middle track
     the preload-bar would occupy the only 1fr track and push the main
     content off-screen, so it was only visible on screens whose own layout
     happened to keep room (Geo Explorer). */
  grid-template-rows: var(--topbar-height) auto minmax(0, 1fr);
  overflow: hidden;
  width: 100%;
}
.app > .preload-bar {
  grid-row: 2;
}
.app > #rev2-main-shell-row {
  grid-row: 3;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--panel-gap);
  padding: 0 var(--topbar-inline-pad);
  background: rgba(4, 17, 29, 0.82);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 20;
  min-width: 0;
}

.topbar > * {
  min-width: 0;
}

.brand,
.topbar-right,
.status-cluster,
.meta-cluster {
  display: flex;
  align-items: center;
  min-width: 0;
}

.brand {
  gap: clamp(12px, 0.8vw, 16px);
  flex: 1 1 auto;
}

.logo {
  font-family: var(--title);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--teal);
  text-shadow: 0 0 24px rgba(86, 214, 200, 0.35);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.log-helper-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
  font-size: 10px;
  color: var(--muted);
  min-width: 0;
}

.log-helper-label {
  text-transform: uppercase;
  letter-spacing: 1.4px;
  opacity: 0.78;
}

.log-helper-path {
  display: inline-block;
  min-width: 0;
  max-width: 100%;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(158, 185, 200, 0.16);
  background: rgba(6, 21, 35, 0.58);
  color: #b9d7e6;
  font-family: var(--mono);
  font-size: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-title {
  font-family: var(--title);
  font-size: clamp(15px, 1vw, 17px);
  letter-spacing: 1.1px;
}

.brand-subtitle {
  color: var(--muted);
  font-size: clamp(10px, 0.68vw, 11px);
  letter-spacing: 1.8px;
  text-transform: uppercase;
}

.topbar-right {
  gap: clamp(10px, 0.75vw, 16px);
  flex: 0 1 auto;
  justify-content: flex-end;
}

.status-cluster {
  gap: clamp(8px, 0.55vw, 10px);
  flex: 0 1 auto;
}

.meta-cluster {
  gap: clamp(6px, 0.45vw, 8px);
  flex: 0 1 auto;
}

.topbar-preload-btn {
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.topbar-preload-btn:hover {
  background: rgba(86, 214, 200, 0.18);
  border-color: var(--teal);
}
.topbar-preload-btn:disabled {
  opacity: 0.5;
  cursor: default;
}
.topbar-preload-btn.preload-done {
  background: rgba(86, 214, 200, 0.12);
  border-color: var(--teal);
  color: var(--teal);
  opacity: 0.7;
}
.topbar-preload-status {
  font-size: 9px;
  color: var(--teal);
  padding: 0 6px;
  white-space: nowrap;
}

.topbar-auth-link {
  text-decoration: none;
  font-weight: 600;
  color: var(--teal-2);
  border-color: rgba(135, 240, 229, 0.24);
  background: rgba(86, 214, 200, 0.1);
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.topbar-auth-link:hover {
  color: var(--text);
  border-color: rgba(135, 240, 229, 0.36);
  background: rgba(86, 214, 200, 0.18);
  transform: translateY(-1px);
}

/* ── Swappable 4th hero card (MOII slot) ──────────────────────────── */
.hero-card-with-selector {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.hero-card-with-selector > .overview-hero-card {
  flex: 1 1 auto;
  min-height: 0;
}
/* Compact variant of rev2-native-select — same visual language as the
   Time Series dropdown but smaller so the hero card keeps most of its
   vertical space. */
.hero-card-selector-select {
  width: 100%;
  height: 36px;
  padding: 0 36px 0 12px;
  font-size: 12px;
  border-radius: 10px;
}
.hero-card-selector-select option:disabled {
  color: rgba(86, 214, 200, 0.65);
  font-weight: 600;
  letter-spacing: 1px;
}

/* ── Preload progress bar ──────────────────────────────────────────── */
.preload-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 18px;
  height: 22px;
  background: var(--body);
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.preload-bar-track {
  flex: 1 1 auto;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}
.preload-bar-fill {
  height: 100%;
  width: 0%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--teal), var(--teal-2, #3ad8c5));
  transition: width 0.3s ease;
}
.preload-bar-label {
  font-size: 10px;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 140px;
}

.pill,
.badge,
.nav-tag,
.toggle-pill,
.hud-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  white-space: nowrap;
  min-width: 0;
  max-width: 100%;
}

#rev2-topbar-updated,
#rev2-topbar-confidence,
#rev2-topbar-coverage {
  max-width: clamp(120px, 14vw, 180px);
  overflow: hidden;
  text-overflow: ellipsis;
}

.pill {
  padding: clamp(6px, 0.4vw, 7px) clamp(10px, 0.75vw, 12px);
  border: 1px solid var(--line);
  background: rgba(86, 214, 200, 0.08);
  font-size: clamp(11px, 0.75vw, 12px);
  color: var(--text);
}

.pill.live {
  color: #a3ffc1;
  border-color: rgba(91, 255, 158, 0.24);
  background: rgba(52, 212, 125, 0.1);
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #52f58b;
  box-shadow: 0 0 12px #52f58b;
}

.main {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr) var(--context-rail-width);
  height: 100%;
  overflow: hidden;
  min-height: 0;
  min-width: 0;
  width: 100%;
  align-items: stretch;
}

.main-geo {
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
}

.main-help {
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
}

.main > * {
  min-width: 0;
  min-height: 0;
}

.sidebar,
.context-rail {
  background: rgba(4, 16, 28, 0.92);
  backdrop-filter: blur(16px);
}

.sidebar {
  border-right: 1px solid var(--line);
  height: 100%;
  padding: var(--page-pad) clamp(12px, 0.75vw, 14px) calc(var(--page-pad) - 2px);
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 0.9vw, 16px);
  min-height: 0;
  min-width: 0;
  overflow: auto;
  scrollbar-gutter: stable;
}

.context-rail {
  border-left: 1px solid var(--line);
  height: 100%;
  min-height: 0;
  padding: var(--page-pad) clamp(14px, 0.9vw, 18px);
  min-width: 0;
  overflow: auto;
  scrollbar-gutter: stable;
}

.sidebar-section-title,
.rail-title,
.section-label,
.screen-kicker {
  font-family: var(--title);
  text-transform: uppercase;
  letter-spacing: 2px;
}

.sidebar-section-title,
.rail-title {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 10px;
}

.nav-list,
.layer-list,
.station-list,
.rail-stack,
.chip-row,
.rev2-alert-list {
  display: grid;
  gap: 10px;
}

.nav-item,
.station-item {
  width: 100%;
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  border-radius: 16px;
  padding: 12px 12px;
  cursor: pointer;
  transition: 0.2s ease;
  text-align: left;
  font-family: var(--body);
  min-width: 0;
}

.nav-item:hover,
.station-item:hover {
  background: rgba(86, 214, 200, 0.08);
  border-color: rgba(86, 214, 200, 0.16);
  transform: translateX(2px);
}

.nav-item.active,
.station-item.active {
  background: linear-gradient(135deg, rgba(86, 214, 200, 0.16), rgba(115, 189, 232, 0.08));
  border-color: rgba(86, 214, 200, 0.28);
  box-shadow: inset 0 0 0 1px rgba(135, 240, 229, 0.06);
}

.nav-icon,
.item-icon {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-copy,
.item-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.nav-title {
  font-size: 14px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-subtitle,
.item-copy span,
.item-copy strong + span {
  font-size: 11px;
  color: var(--muted-strong);
  min-width: 0;
}

.nav-tag,
.toggle-pill {
  padding: 4px 8px;
  font-size: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted-strong);
  background: rgba(255, 255, 255, 0.07);
}

.nav-item.active .nav-tag {
  color: var(--teal-2);
  border-color: rgba(86, 214, 200, 0.22);
  background: rgba(86, 214, 200, 0.1);
}

.sidebar-note,
.rail-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-bg);
  box-shadow: var(--shadow);
  padding: 14px;
}

.panel,
.metric-card,
.mapbox-sidepanel,
.rev2-side-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-bg);
  box-shadow: var(--shadow);
}

.sidebar-note {
  margin-top: auto;
  padding: 14px;
}

.sidebar-note h4,
.rail-card h4 {
  margin: 0 0 6px;
  font-size: 14px;
  font-family: var(--title);
  letter-spacing: 1px;
}

.sidebar-note p,
.footer-note,
.geo-summary-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.content {
  height: 100%;
  padding: var(--page-pad);
  min-height: 0;
  min-width: 0;
  overflow: auto;
  position: relative;
  scrollbar-gutter: stable;
}

.content-geo {
  padding: clamp(10px, 0.7vw, 14px) clamp(12px, 0.9vw, 16px) clamp(12px, 0.9vw, 16px);
  overflow: auto;
  overscroll-behavior: contain;
  min-width: 0;
}

.content-help {
  padding: clamp(14px, 0.9vw, 18px) clamp(14px, 0.9vw, 18px) var(--page-pad);
  overflow: auto;
  overscroll-behavior: contain;
  min-width: 0;
}

.context-rail-hidden {
  display: none;
}

.context-bar,
.filter-row,
.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.context-bar {
  margin-bottom: 18px;
}

.badge {
  padding: 6px 10px;
  font-size: 11px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.08);
  color: var(--text);
}

.badge.observed,
.badge.ok {
  border-color: rgba(86, 214, 200, 0.22);
  background: rgba(86, 214, 200, 0.12);
  color: var(--teal-2);
}

.badge.modeled {
  border-color: rgba(127, 137, 255, 0.24);
  background: rgba(127, 137, 255, 0.12);
  color: #c7cbff;
}

.badge.assimilated {
  border-color: rgba(115, 189, 232, 0.24);
  background: rgba(115, 189, 232, 0.12);
  color: #c8ecff;
}

.badge.remote {
  border-color: rgba(115, 189, 232, 0.24);
  background: rgba(115, 189, 232, 0.12);
  color: #c8ecff;
}

.badge.scenario {
  border-color: rgba(255, 155, 104, 0.24);
  background: rgba(255, 155, 104, 0.12);
  color: #ffd6c3;
}

.badge.experimental {
  border-color: rgba(127, 137, 255, 0.24);
  background: rgba(127, 137, 255, 0.12);
  color: #d4d8ff;
}

.badge.mrv {
  border-color: rgba(56, 211, 159, 0.24);
  background: rgba(56, 211, 159, 0.12);
  color: #b9ffe4;
}

.badge.warning {
  border-color: rgba(245, 199, 108, 0.24);
  background: rgba(245, 199, 108, 0.12);
  color: #ffe5a8;
}

.screen {
  animation: fade 0.25s ease;
}

.geo-screen {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.screen-header {
  display: flex;
  justify-content: space-between;
  gap: var(--screen-header-gap);
  align-items: flex-start;
  margin-bottom: clamp(14px, 1vw, 18px);
  min-width: 0;
}

.screen-header > * {
  min-width: 0;
}

.geo-screen .screen-header {
  margin-bottom: clamp(6px, 0.45vw, 10px);
  gap: clamp(10px, 0.8vw, 14px);
}

.geo-screen-header-copy {
  width: 100%;
  min-width: 0;
}

.geo-screen-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: clamp(10px, 0.7vw, 16px);
  width: 100%;
  margin-bottom: clamp(4px, 0.35vw, 8px);
  min-width: 0;
}

.screen-kicker {
  color: var(--teal-2);
  font-size: 12px;
  margin-bottom: 4px;
}

.screen-title {
  margin: 0 0 6px;
  font-family: var(--title);
  font-size: var(--screen-title-size);
  line-height: 0.95;
  letter-spacing: 1px;
  min-width: 0;
}

.geo-screen .screen-title {
  flex: 1 1 320px;
  font-size: var(--geo-screen-title-size);
  margin-bottom: 0;
}

.screen-desc {
  margin: 0;
  max-width: min(760px, 100%);
  color: var(--muted);
  line-height: 1.55;
  font-size: clamp(12px, 0.72vw, 14px);
  min-width: 0;
}

.geo-screen .screen-desc {
  max-width: min(720px, 100%);
  font-size: clamp(11px, 0.68vw, 12px);
  line-height: 1.36;
}

.screen-actions {
  display: flex;
  gap: clamp(8px, 0.6vw, 10px);
  flex-wrap: wrap;
  justify-content: flex-end;
  min-width: 0;
}

.geo-screen .screen-actions {
  gap: 8px;
}

.geo-screen-actions-inline {
  flex: 1 1 420px;
  width: min(100%, 720px);
  margin-left: auto;
  justify-content: flex-end;
  align-items: center;
  min-width: 0;
}

.geo-side-actions {
  flex: 0 0 auto;
  width: 100%;
  margin-left: 0;
  justify-content: flex-end;
  align-items: center;
}

.geo-column-main > .screen-header {
  margin-bottom: var(--panel-gap);
}

.help-screen {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.help-screen-actions {
  min-width: min(420px, 100%);
  max-width: 560px;
  flex: 0 1 460px;
  flex-direction: column;
  align-items: stretch;
}

.help-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  width: 100%;
}

.help-search-input {
  width: 100%;
  min-width: 0;
  min-height: 58px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  padding: 15px 18px;
  font-size: 14px;
  line-height: 1.45;
  font-family: var(--body);
  outline: none;
}

.help-search-input:focus {
  border-color: rgba(135, 240, 229, 0.42);
  box-shadow: 0 0 0 1px rgba(135, 240, 229, 0.12);
}

.help-search-meta {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.help-stats-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.help-search-inline:empty {
  display: none;
}

.help-search-inline-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(10, 29, 46, 0.98), rgba(5, 17, 29, 0.98));
  box-shadow: var(--shadow);
  padding: 18px;
}

.help-search-inline-header {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
}

.help-search-inline-title {
  font-family: var(--title);
  font-size: 18px;
  color: var(--text);
  letter-spacing: 0.7px;
}

.help-search-inline-copy {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.help-search-inline-results {
  display: grid;
  gap: 10px;
}

.help-stat-card,
.help-page-summary-card,
.help-section-card,
.help-visual-card,
.help-sidebar {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel-bg);
  box-shadow: var(--shadow);
}

.help-stat-card {
  padding: 14px 16px;
}

.help-stat-label {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.4px;
}

.help-stat-value {
  margin-top: 8px;
  font-family: var(--title);
  font-size: 30px;
  color: var(--teal-2);
}

.help-grid {
  display: grid;
  grid-template-columns: minmax(220px, 260px) minmax(0, 1fr) minmax(210px, 250px);
  gap: 16px;
  min-height: 0;
  flex: 1 1 auto;
  width: 100%;
}

.help-grid > * {
  min-width: 0;
}

.help-sidebar,
.help-main {
  min-height: 0;
  min-width: 0;
}

.help-sidebar {
  padding: 16px;
  overflow: auto;
  scrollbar-gutter: stable;
}

.help-main {
  display: grid;
  align-content: start;
  gap: 16px;
  min-width: 0;
}

.help-panel-title {
  font-family: var(--title);
  font-size: 13px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--teal-2);
  margin-bottom: 12px;
}

.help-panel-title-spaced {
  margin-top: 22px;
}

.help-page-list,
.help-search-results,
.help-toc-list {
  display: grid;
  gap: 10px;
}

.help-search-results {
  max-height: 420px;
  overflow: auto;
  padding-right: 4px;
}

.help-page-list {
  max-height: 340px;
  overflow: auto;
  padding-right: 4px;
}

.help-page-link,
.help-result-card,
.help-toc-link {
  width: 100%;
  text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-radius: 14px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
  font-family: var(--body);
  white-space: normal;
}

.help-page-link,
.help-result-card {
  padding: 12px 13px;
}

.help-toc-link {
  padding: 10px 12px;
  font-size: 12px;
}

.help-page-link:hover,
.help-result-card:hover,
.help-toc-link:hover {
  border-color: rgba(135, 240, 229, 0.24);
  background: rgba(86, 214, 200, 0.08);
  transform: translateX(2px);
}

.help-page-link.is-active,
.help-toc-link.is-active {
  border-color: rgba(86, 214, 200, 0.28);
  background: linear-gradient(135deg, rgba(86, 214, 200, 0.16), rgba(115, 189, 232, 0.09));
}

.help-page-link.is-match {
  box-shadow: inset 0 0 0 1px rgba(245, 199, 108, 0.12);
}

.help-page-link-title,
.help-result-title {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 6px;
  overflow-wrap: anywhere;
}

.help-page-chip-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.help-page-chip,
.help-term-chip,
.help-section-tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 10px;
  letter-spacing: 0.04em;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.help-page-chip {
  color: var(--muted-strong);
}

.help-search-empty,
.help-result-meta,
.help-result-snippet,
.help-page-summary-copy,
.help-page-metric-note,
.help-visual-subtitle,
.help-source-label,
.help-breadcrumb,
.help-markdown,
.help-source-row {
  color: var(--muted);
}

.help-result-meta,
.help-result-snippet,
.help-search-empty {
  font-size: 11px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.help-result-meta {
  margin-bottom: 6px;
}

.help-result-header {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.help-result-rank {
  min-width: 26px;
  height: 26px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(86, 214, 200, 0.14);
  color: var(--teal-2);
  font-size: 11px;
  font-weight: 700;
}

.help-result-copy {
  min-width: 0;
}

.help-page-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.help-breadcrumb {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 12px;
  align-items: center;
}

.help-breadcrumb-root,
.help-breadcrumb-page,
.help-breadcrumb-section {
  color: var(--muted-strong);
}

.help-breadcrumb-page {
  color: var(--teal-2);
}

.help-pager {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.help-page-summary-card {
  padding: 18px;
}

.help-page-category {
  color: var(--teal-2);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.8px;
  margin-bottom: 6px;
}

.help-page-title {
  margin: 0 0 8px;
  font-family: var(--title);
  font-size: 30px;
  letter-spacing: 0.8px;
  overflow-wrap: anywhere;
}

.help-page-summary-copy {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.help-page-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.help-page-metric-card {
  border-radius: 14px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.help-page-metric-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.3px;
  color: var(--muted);
}

.help-page-metric-value {
  margin: 6px 0;
  font-size: 24px;
  font-family: var(--title);
  color: var(--text);
}

.help-source-row {
  margin-top: 14px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  font-size: 11px;
}

.help-source-path {
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.07);
  color: var(--teal-2);
  font-family: var(--mono, monospace);
  overflow-wrap: anywhere;
}

.help-page-visuals {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

.help-page-dossier {
  display: grid;
  gap: 16px;
}

.help-visual-card {
  padding: 16px;
  min-width: 0;
  overflow: hidden;
}

.help-visual-title {
  font-family: var(--title);
  font-size: 15px;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.help-visual-subtitle {
  margin: 10px 0 8px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
}

.help-visual-copy {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 12px;
  overflow-wrap: anywhere;
}

.help-visual-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.help-visual-list-item {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  color: var(--muted-strong);
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.help-visual-graph {
  height: 360px;
}

.help-visual-graph-tall {
  height: 540px;
}

.help-visual-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.help-visual-graph .js-plotly-plot,
.help-visual-graph .plot-container,
.help-visual-graph .svg-container {
  height: 100% !important;
}

.help-band-grid {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.help-band-row {
  display: grid;
  grid-template-columns: 14px minmax(100px, 120px) minmax(90px, 110px) minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.help-band-swatch {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  display: inline-block;
}

.help-band-title,
.help-band-domain {
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}

.help-band-domain {
  color: var(--teal-2);
  font-weight: 600;
}

.help-band-note {
  color: var(--muted-strong);
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.help-page-content {
  display: grid;
  gap: 16px;
}

.help-section-card {
  padding: 18px;
  overflow: hidden;
}

.help-section-card.is-selected {
  border-color: rgba(86, 214, 200, 0.3);
  box-shadow: inset 0 0 0 1px rgba(86, 214, 200, 0.12), var(--shadow);
}

.help-focus-anchor {
  background: linear-gradient(180deg, rgba(14, 38, 57, 0.96), rgba(7, 22, 36, 0.98));
}

.help-page-intro {
  background: linear-gradient(180deg, rgba(11, 31, 49, 0.94), rgba(7, 22, 36, 0.98));
}

.help-section-kicker {
  color: var(--teal-2);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.6px;
  margin-bottom: 8px;
}

.help-section-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.help-section-title {
  font-family: var(--title);
  font-size: 22px;
  letter-spacing: 0.7px;
  overflow-wrap: anywhere;
}

.help-section-tag,
.help-term-chip {
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted-strong);
}

.help-markdown {
  font-size: 13px;
  line-height: 1.65;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.help-markdown h1,
.help-markdown h2,
.help-markdown h3,
.help-markdown h4 {
  font-family: var(--title);
  letter-spacing: 0.6px;
  color: var(--text);
}

.help-markdown p,
.help-markdown li {
  color: var(--muted-strong);
}

.help-markdown table,
.help-mini-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
  font-size: 12px;
  display: block;
  overflow-x: auto;
}

.help-markdown th,
.help-markdown td,
.help-mini-table th,
.help-mini-table td {
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 9px 10px;
  vertical-align: top;
}

.help-markdown th,
.help-mini-table th {
  background: rgba(255, 255, 255, 0.06);
  color: var(--teal-2);
  text-align: left;
}

.help-markdown code,
.help-mini-table code {
  font-family: var(--mono, monospace);
  color: #c5f7ef;
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 5px;
  border-radius: 6px;
  white-space: pre-wrap;
  word-break: break-word;
}

.help-markdown pre {
  overflow: auto;
  padding: 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.help-toc-link.is-nested {
  margin-left: 14px;
  width: calc(100% - 14px);
}

.help-term-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.help-term-button {
  cursor: pointer;
  font-family: var(--body);
}

.help-term-button:hover {
  border-color: rgba(135, 240, 229, 0.28);
  background: rgba(86, 214, 200, 0.12);
}

.help-related-button {
  border: none;
  background: transparent;
  padding: 0;
  text-align: left;
  cursor: pointer;
  font-family: var(--body);
}

.help-related-button .help-related-card,
.help-quick-nav-card {
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}

.help-related-button:hover .help-related-card,
.help-quick-nav-card:hover {
  border-color: rgba(135, 240, 229, 0.28);
  background: rgba(86, 214, 200, 0.10);
  transform: translateY(-1px);
}

.help-dossier-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(9, 28, 45, 0.98), rgba(5, 17, 29, 0.98));
  box-shadow: var(--shadow);
  padding: 18px;
  min-width: 0;
  overflow: hidden;
}

.help-dossier-title,
.help-definition-title {
  font-family: var(--title);
  letter-spacing: 1px;
  color: var(--text);
}

.help-dossier-title {
  font-size: 16px;
  margin-bottom: 12px;
}

.help-definition-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 10px;
}

.help-definition-title {
  font-size: 22px;
  overflow-wrap: anywhere;
}

.help-definition-kicker {
  color: var(--teal-2);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  text-align: right;
}

.help-definition-copy {
  color: var(--muted-strong);
  font-size: 13px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.help-definition-primary {
  color: var(--text);
  font-size: 14px;
}

.help-definition-row {
  display: grid;
  grid-template-columns: minmax(120px, 160px) minmax(0, 1fr);
  gap: 12px;
  padding-top: 10px;
  margin-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.help-definition-label,
.help-ref-kind,
.help-related-unit {
  color: var(--teal-2);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.3px;
}

.help-definition-value {
  color: var(--muted-strong);
  font-size: 13px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.help-definition-subtitle {
  color: var(--teal-2);
  font-size: 12px;
  margin: 14px 0 8px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
}

.help-ref-grid,
.help-related-grid {
  display: grid;
  gap: 12px;
}

.help-ref-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.help-related-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.help-ref-card,
.help-related-card {
  border-radius: 14px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.07);
  min-width: 0;
}

.help-ref-title,
.help-related-title {
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  margin: 5px 0 7px;
  overflow-wrap: anywhere;
}

.help-ref-note,
.help-related-copy {
  color: var(--muted-strong);
  font-size: 12px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.help-ref-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 12px;
}

.help-ref-path {
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted-strong);
  font-size: 10px;
  font-family: var(--mono, monospace);
  overflow-wrap: anywhere;
}

.help-ref-link {
  color: var(--teal-2);
  font-size: 11px;
  text-decoration: none;
  border: 1px solid rgba(86, 214, 200, 0.24);
  border-radius: 999px;
  padding: 4px 10px;
  background: rgba(86, 214, 200, 0.08);
}

.help-ref-link:hover {
  background: rgba(86, 214, 200, 0.14);
}

.help-quick-nav-section {
  margin-top: 10px;
}

.help-quick-nav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}

.help-quick-nav-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  padding: 14px;
  min-height: 118px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  text-align: left;
  cursor: pointer;
  font-family: var(--body);
  color: var(--text);
  white-space: normal;
}

.help-quick-nav-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 6px;
  overflow-wrap: anywhere;
}

.help-quick-nav-copy,
.help-focus-mode {
  color: var(--muted-strong);
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.geo-layer-controls-toggle.is-open {
  background: linear-gradient(135deg, rgba(86, 214, 200, 0.26), rgba(115, 189, 232, 0.18));
  border-color: rgba(135, 240, 229, 0.4);
  box-shadow: inset 0 0 0 1px rgba(135, 240, 229, 0.08);
}

.btn {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  min-height: var(--control-height);
  padding: 0 clamp(12px, 0.85vw, 14px);
  border-radius: 14px;
  cursor: pointer;
  font-family: var(--body);
  font-size: clamp(11px, 0.75vw, 12px);
  line-height: 1.1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: 0.2s ease;
}

.geo-screen .btn {
  min-height: clamp(38px, 2.2vw, 48px);
  padding: 0 clamp(10px, 0.7vw, 12px);
  font-size: clamp(10px, 0.6vw, 11px);
}

.btn.primary {
  background: linear-gradient(135deg, rgba(86, 214, 200, 0.18), rgba(115, 189, 232, 0.12));
  border-color: rgba(86, 214, 200, 0.24);
}

.btn:hover {
  border-color: var(--line-strong);
  background: rgba(86, 214, 200, 0.09);
}

.grid-1,
.grid-2,
.grid-4,
.geo-layout {
  display: grid;
  gap: clamp(12px, 0.9vw, 16px);
}

.grid-1 {
  grid-template-columns: 1fr;
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
}

.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 16px;
}

.geo-layout {
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
}

.rev2-geo-layout {
  grid-template-columns: minmax(0, 1.42fr) minmax(clamp(560px, 33vw, 760px), 0.92fr);
  gap: var(--panel-gap);
  align-items: stretch;
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
}

.geo-column {
  display: grid;
  gap: var(--panel-gap);
  min-height: 0;
  min-width: 0;
}

.geo-column-main {
  grid-template-rows: auto auto;
  align-content: start;
}

.geo-column-side {
  grid-template-rows: auto auto;
  align-content: start;
}

.geo-side-stack {
  display: grid;
  gap: var(--panel-gap);
  align-content: start;
}

.geo-selected-card {
  margin-top: 0;
  grid-area: selected;
}

.geo-registry-card {
  align-self: start;
  justify-self: stretch;
  margin-top: 0;
}

.geo-half-card {
  min-height: 0;
}

.geo-post-map-grid {
  margin-top: clamp(6px, 0.5vw, 8px);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  grid-template-areas:
    "legend selected"
    "legend focus";
  gap: var(--panel-gap);
  align-items: start;
  position: relative;
  z-index: 2;
  min-height: 0;
  flex: 0 0 auto;
  min-width: 0;
}

.geo-post-map-grid > * {
  min-width: 0;
}

.geo-overlay-legend-card {
  grid-area: legend;
  padding: 9px 11px !important;
  min-height: 138px;
}

.geo-scenario-focus-card {
  border-style: dashed;
  border-color: rgba(245, 199, 108, 0.32);
  background:
    linear-gradient(180deg, rgba(245, 199, 108, 0.08), rgba(255, 143, 107, 0.04)),
    rgba(255, 255, 255, 0.02);
}

.geo-scenario-focus-wrap {
  grid-area: focus;
}

.geo-scenario-patch-legend {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.geo-patch-legend-title {
  color: var(--text);
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.geo-patch-legend-rows {
  display: grid;
  gap: 6px;
}

.geo-patch-legend-row {
  align-items: flex-start;
  gap: 10px;
}

.geo-patch-legend-meta {
  display: grid;
  gap: 1px;
}

.geo-patch-legend-label {
  color: var(--text);
  font-size: 11px;
  line-height: 1.2;
}

.geo-patch-legend-copy {
  color: var(--muted-strong);
  font-size: 10px;
  line-height: 1.3;
}

.geo-patch-overlay-copy {
  display: grid;
  gap: 4px;
}

.geo-overlay-legend-inner {
  display: grid;
  gap: 6px;
}

.panel,
.metric-card,
.mapbox-sidepanel,
.rev2-side-card {
  padding: clamp(12px, 0.9vw, 16px);
}

.content-geo .panel,
.content-geo .mapbox-sidepanel,
.content-geo .rev2-side-card {
  padding: clamp(10px, 0.65vw, 12px);
}

.panel-title,
.card-title,
.rev2-panel-title {
  margin: 0 0 4px;
  font-family: var(--title);
  font-size: clamp(16px, 1vw, 18px);
  letter-spacing: 0.6px;
}

.content-geo .panel-title,
.content-geo .rev2-panel-title {
  font-size: clamp(15px, 0.88vw, 16px);
  margin-bottom: 3px;
}

.panel-title-small {
  font-size: 15px;
}

.panel-subtitle,
.card-subtitle,
.rev2-panel-subtitle {
  margin: 0 0 14px;
  color: var(--muted-strong);
  font-size: clamp(11px, 0.75vw, 12px);
  line-height: 1.55;
}

.content-geo .panel-subtitle {
  margin-bottom: 8px;
  font-size: clamp(10px, 0.64vw, 11px);
  line-height: 1.35;
}

.metric-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
}

.metric-label {
  font-size: 12px;
  color: var(--muted-strong);
  text-transform: uppercase;
  letter-spacing: 1.6px;
}

.metric-value {
  font-size: 34px;
  font-weight: 700;
  font-family: var(--title);
  line-height: 1;
}

.metric-foot {
  font-size: 12px;
  color: var(--muted-strong);
  line-height: 1.45;
}

.progress {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
  margin-bottom: 10px;
}

.progress > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(86, 214, 200, 0.48), rgba(86, 214, 200, 1));
}

.map-panel,
.chart-panel,
.world-map-panel {
  position: relative;
  overflow: hidden;
}

.world-map-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: visible;
}

.map-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: var(--map-panel-min-height);
  min-width: 0;
  background:
    radial-gradient(circle at 30% 40%, rgba(59, 139, 163, 0.38), transparent 26%),
    radial-gradient(circle at 68% 55%, rgba(81, 183, 168, 0.18), transparent 24%),
    linear-gradient(180deg, #082031 0%, #051725 100%);
}

.map-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 54px 54px;
  opacity: 0.52;
}

.reef-shape {
  position: absolute;
  left: 13%;
  top: 10%;
  width: 55%;
  height: 76%;
  border-radius: 42% 58% 56% 44% / 21% 43% 57% 79%;
  border: 1px solid rgba(86, 214, 200, 0.26);
  box-shadow: inset 0 0 0 1px rgba(86, 214, 200, 0.05);
}

.reef-shape::before,
.reef-shape::after {
  content: "";
  position: absolute;
  inset: 8% 11%;
  border-radius: inherit;
  border: 1px dashed rgba(135, 240, 229, 0.18);
}

.reef-shape::after {
  inset: 18% 22%;
  opacity: 0.55;
}

.station {
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.86);
  box-shadow: 0 0 18px currentColor;
}

.station.good {
  color: var(--green);
  background: rgba(56, 211, 159, 0.28);
}

.station.warn {
  color: var(--amber);
  background: rgba(245, 199, 108, 0.28);
}

.station.critical {
  color: var(--red);
  background: rgba(255, 111, 125, 0.28);
}

.station.selected {
  transform: scale(1.2);
}

.map-legend,
.floating-note {
  position: absolute;
  background: rgba(4, 16, 27, 0.94);
  border: 1px solid var(--line);
  border-radius: 14px;
  backdrop-filter: blur(10px);
}

.map-legend {
  left: 16px;
  bottom: 16px;
  padding: 10px 12px;
  width: 210px;
}

.floating-note {
  right: 16px;
  top: 16px;
  padding: 10px 12px;
  width: min(220px, calc(100% - 32px));
  box-shadow: 0 18px 40px rgba(0,0,0,0.28);
}

.legend-bar {
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, #1f6fd7 0%, #56d6c8 45%, #f5c76c 72%, #ff6f7d 100%);
  margin: 8px 0 6px;
}

.legend-labels {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted-strong);
  font-size: 11px;
}

.floating-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text);
}

.floating-copy {
  font-size: 12px;
  color: var(--muted-strong);
  line-height: 1.5;
}

.chart-panel {
  min-height: 360px;
}

.overview-graph {
  height: 240px;
}

.overview-graph .js-plotly-plot,
.overview-graph .plot-container,
.overview-graph .svg-container {
  height: 240px !important;
}

.timeseries-meta-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--panel-gap);
  margin-top: clamp(10px, 0.75vw, 12px);
}

.timeseries-meta-chip {
  min-height: clamp(48px, 3.6vw, 54px);
  padding: clamp(8px, 0.6vw, 10px) clamp(10px, 0.75vw, 12px);
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted-strong);
  font-size: clamp(10px, 0.72vw, 11px);
  line-height: 1.4;
}

.insight-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.insight {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.08);
}

.insight strong {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
}

.insight p {
  margin: 0;
  font-size: 12px;
  color: var(--muted-strong);
  line-height: 1.45;
}

.warning-accent {
  border-color: rgba(245, 199, 108, 0.28);
}

.critical-accent {
  border-color: rgba(255, 111, 125, 0.28);
}

.positive-accent {
  border-color: rgba(56, 211, 159, 0.28);
}

.rail-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted-strong);
  font-size: 12px;
  margin-bottom: 10px;
}

.rail-center {
  text-align: center;
}

.confidence-ring {
  width: 128px;
  height: 128px;
  margin: 0 auto 12px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at center, rgba(5, 18, 31, 0.92) 53%, transparent 54%),
    conic-gradient(var(--teal) 0 78%, rgba(255,255,255,0.08) 78% 100%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);
}

.confidence-ring span {
  font-family: var(--title);
  font-size: 28px;
}

.rail-card-heading {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
}

.chip-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.section-spacing {
  margin-top: 16px;
}

.gis-shell {
  position: relative;
  min-height: 0;
  height: clamp(360px, 45vh, 540px);
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(86, 214, 200, 0.12);
  background: #06131f;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02), 0 20px 60px rgba(0, 0, 0, 0.24);
}

.map-search {
  position: absolute;
  left: 16px;
  top: 16px;
  z-index: 900;
  width: 360px;
  display: flex;
  align-items: center;
  padding: 0;
  height: auto;
  border: 0;
  background: transparent;
  backdrop-filter: none;
  box-shadow: none;
}

.map-search-input,
.map-search-input:focus {
  flex: 1;
  background: transparent;
  border: 0;
  outline: none;
  color: var(--text);
  font-family: var(--body);
}

.map-aoi-selector-dropdown {
  flex: 1;
  min-width: 0;
  height: 40px;
  padding: 0 42px 0 14px;
  border: 1px solid rgba(86, 214, 200, 0.18);
  border-radius: 14px;
  background: rgba(4, 16, 27, 0.96);
  background-color: rgba(4, 16, 27, 0.96);
  backdrop-filter: blur(12px);
  font-size: 14px;
}

.map-aoi-selector-dropdown:focus {
  border: 1px solid rgba(86, 214, 200, 0.24);
  box-shadow: none;
}

.search-icon,
.draw-icon {
  color: var(--muted-strong);
  font-size: 14px;
}

.basemap-switcher {
  position: absolute;
  right: 16px;
  top: 16px;
  z-index: 900;
  width: 170px;
}

.gis-toolbar {
  position: absolute;
  left: 16px;
  top: 76px;
  display: grid;
  gap: 8px;
  z-index: 900;
}

.gis-tool {
  width: 36px;
  height: 36px;
  border-radius: 12px !important;
  display: grid;
  place-items: center;
  border: 1px solid rgba(86, 214, 200, 0.18) !important;
  background: rgba(5, 17, 29, 0.78) !important;
  color: var(--text) !important;
  backdrop-filter: blur(12px);
  box-shadow: none !important;
}

.gis-tool-fx {
  width: 92px;
  min-width: 92px;
  height: 40px !important;
  padding: 0 10px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
.gis-tool-fx.active {
  background: rgba(86, 214, 200, 0.18) !important;
  border-color: var(--teal) !important;
  color: var(--teal) !important;
}

.gis-tool-wx {
  width: 74px;
  min-width: 74px;
  height: 40px !important;
  padding: 0 10px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px;
  font-size: 12px !important;
  font-weight: 600 !important;
  line-height: 1.1 !important;
}
.gis-tool-wx.active {
  background: rgba(86, 214, 200, 0.18) !important;
  border-color: var(--teal) !important;
  color: var(--teal) !important;
}

/* Weather FX canvas overlay */
.weather-fx-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 450;
  pointer-events: none;
}

.gis-tool-draw {
  width: 76px;
  min-width: 76px;
  height: 40px !important;
  padding: 0 14px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  place-items: unset;
  font-size: 12px !important;
  font-weight: 600 !important;
  line-height: 1.1 !important;
  text-align: center;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.gis-tool.active {
  border-color: rgba(86, 214, 200, 0.3) !important;
  background: rgba(86, 214, 200, 0.14) !important;
  color: var(--teal-2) !important;
}

.gis-tool.selected {
  border-color: rgba(115, 189, 232, 0.34) !important;
  background: rgba(115, 189, 232, 0.14) !important;
  color: var(--cyan) !important;
}

.map-hud {
  position: absolute;
  left: 70px;
  top: 58px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  z-index: 900;
  max-width: calc(100% - 320px);
}

.hud-chip {
  padding: 6px 10px;
  border: 1px solid rgba(86, 214, 200, 0.16);
  background: rgba(4, 16, 27, 0.94);
  backdrop-filter: blur(12px);
  font-size: 10px;
  color: var(--text);
}

.rev2-map {
  height: 100%;
  width: 100%;
  border-radius: 18px;
}

/* ── Overview: map wrapper scopes overlays to the map area ────────────────── */
.overview-map-wrapper {
  position: relative;
  flex: 1 1 auto;
  height: 100%;
  min-height: var(--overview-map-min-height);
  min-width: 0;
  overflow: hidden;
  border-radius: 12px;
}

.rev2-overview-map {
  width: 100%;
  height: 100%;
}

.overview-map-title,
.overview-map-subtitle {
  position: relative;
  z-index: 2;
}

/* Legend, alert and station detail are scoped inside the wrapper */
.overview-map-wrapper .map-legend,
.overview-map-wrapper .floating-note,
.overview-map-wrapper .overview-map-coords,
.overview-map-wrapper .overview-station-detail,
.overview-map-wrapper .overview-compass-control,
.overview-map-wrapper .overview-weather-toggle,
.overview-map-wrapper .overview-weather-card {
  z-index: 500;
}

.rev2-map-shell .overview-map-coords,
.rev2-map-shell .overview-compass-control,
.rev2-map-shell .overview-weather-toggle,
.rev2-map-shell .overview-weather-card {
  z-index: 500;
}

.rev2-map-shell .overview-weather-toggle {
  left: 16px;
  top: 256px;
}

.rev2-map-shell .geo-map-patch-toggle {
  left: 16px;
  right: auto;
  top: 378px;
}

.rev2-map-shell .geo-map-metric-toggle {
  left: 16px;
  right: auto;
  top: 452px;
}

.rev2-map-shell .overview-weather-card {
  left: min(92px, calc(100% - 202px));
  top: 78px;
  width: min(186px, calc(100% - 136px));
  max-width: calc(100% - var(--map-overlay-safe-offset));
}

.rev2-map-shell .overview-compass-control {
  top: 68px;
  right: 12px;
}

.rev2-map-shell .overview-map-coords {
  right: 12px;
  bottom: 12px;
}

.rev2-map-shell .floating-note.rev2-floating-panel {
  top: 78px;
}

.rev2-map-signals {
  display: grid;
}

.rev2-map-shell .leaflet-bottom.leaflet-right {
  right: 12px;
  bottom: 0;
}

.rev2-map-shell .leaflet-bottom.leaflet-right .leaflet-control-attribution {
  margin: 0;
}

.rev2-map-shell .leaflet-bottom.leaflet-right .leaflet-control-scale {
  margin-bottom: 36px;
}

.overview-map-coords {
  position: absolute;
  right: 10px;
  bottom: 10px;
  min-width: min(154px, calc(100% - 24px));
  max-width: min(240px, calc(100% - 24px));
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(115, 189, 232, 0.16);
  background: rgba(5, 17, 29, 0.86);
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.16);
  color: var(--muted-strong);
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
  letter-spacing: 0.02em;
  line-height: 1;
  pointer-events: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.overview-map-wrapper .leaflet-bottom.leaflet-right {
  right: 10px;
  bottom: 0;
}

.overview-map-wrapper .leaflet-bottom.leaflet-right .leaflet-control-attribution {
  margin: 0;
}

.overview-map-wrapper .leaflet-bottom.leaflet-right .leaflet-control-scale {
  margin-bottom: 34px;
}

.overview-compass-control {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 52px;
  height: 52px;
  border-radius: 999px;
  border: 1px solid rgba(115, 189, 232, 0.18);
  background: linear-gradient(180deg, rgba(6, 20, 33, 0.94), rgba(5, 17, 29, 0.9));
  backdrop-filter: blur(12px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.22);
  display: block;
  overflow: hidden;
}

.overview-compass-ring {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 999px;
  border: 1px solid rgba(115, 189, 232, 0.16);
  background: radial-gradient(circle at 35% 30%, rgba(115, 189, 232, 0.12), rgba(255, 255, 255, 0.02));
}

.overview-compass-cross {
  position: absolute;
  left: 50%;
  top: 50%;
  background: rgba(115, 189, 232, 0.12);
  transform: translate(-50%, -50%);
}

.overview-compass-cross-v {
  width: 1px;
  height: 34px;
}

.overview-compass-cross-h {
  width: 34px;
  height: 1px;
}

.overview-compass-needle {
  position: absolute;
  left: 50%;
  top: 8px;
  width: 2px;
  height: 18px;
  transform: translateX(-50%);
  transform-origin: 50% calc(100% - 4px);
  background: linear-gradient(180deg, #ff8f6b 0%, #73bde8 100%);
  border-radius: 999px;
  box-shadow: 0 0 10px rgba(115, 189, 232, 0.4);
  z-index: 2;
}

.overview-compass-needle::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -2px;
  width: 8px;
  height: 8px;
  transform: translateX(-50%) rotate(45deg);
  background: #ff8f6b;
  border-radius: 2px;
}

.overview-compass-label {
  position: absolute;
  color: var(--muted-strong);
  font-family: var(--title);
  font-size: 8px;
  letter-spacing: 0.08em;
  z-index: 2;
}

.overview-compass-label-n {
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
}

.overview-compass-label-e {
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
}

.overview-compass-label-s {
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
}

.overview-compass-label-w {
  left: 5px;
  top: 50%;
  transform: translateY(-50%);
}

.overview-weather-toggle {
  position: absolute;
  left: 6px;
  top: 6px;
  height: 26px;
  padding: 0 8px 0 6px;
  border-radius: 999px;
  border: 1px solid rgba(135, 240, 229, 0.18);
  background: linear-gradient(135deg, rgba(5, 18, 31, 0.92), rgba(9, 34, 51, 0.9));
  color: var(--text);
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.18);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: 0.2s ease;
  font-family: var(--body);
  font-size: 9px;
  letter-spacing: 0.03em;
  z-index: 540;
}

.overview-weather-toggle.is-open,
.overview-weather-toggle.is-closed {
  display: inline-flex;
}

.overview-weather-toggle:hover {
  transform: translateY(-1px);
  border-color: rgba(135, 240, 229, 0.28);
  background: linear-gradient(135deg, rgba(8, 24, 40, 0.96), rgba(10, 39, 58, 0.94));
}

.overview-weather-toggle-kicker {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: rgba(135, 240, 229, 0.12);
  border: 1px solid rgba(135, 240, 229, 0.16);
  color: var(--teal-2);
  font-family: var(--title);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.overview-weather-card {
  position: absolute;
  left: 0;
  top: 0;
  width: 186px;
  padding: 7px 7px 6px;
  border-radius: 12px 0 12px 0;
  border: 1px solid rgba(135, 240, 229, 0.14);
  background:
    linear-gradient(180deg, rgba(7, 23, 37, 0.96), rgba(4, 16, 27, 0.94)),
    radial-gradient(circle at top left, rgba(115, 189, 232, 0.12), transparent 44%);
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 22px rgba(0,0,0,0.18);
  display: grid;
  gap: 5px;
  transform-origin: top left;
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
  z-index: 550;
}

.overview-weather-card.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.overview-weather-card.is-closed {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-6px) scale(0.98);
}

.overview-weather-toolbar {
  position: relative;
  display: block;
  padding-right: 20px;
}

.rev2-map-shell .overview-weather-toolbar,
.rev2-map-shell .geo-map-patch-card-toolbar,
.rev2-map-shell .geo-map-metric-legend-toolbar {
  cursor: move;
  user-select: none;
}

.rev2-map-shell .overview-weather-close,
.rev2-map-shell .geo-map-patch-card-close {
  cursor: pointer;
}

.rev2-map-shell [data-geo-draggable][data-geo-drag-active="true"] {
  user-select: none;
}

.overview-weather-heading-copy {
  display: grid;
  gap: 1px;
}

.overview-weather-close {
  position: absolute;
  top: -1px;
  right: -1px;
  width: 16px;
  min-width: 16px;
  height: 16px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted-strong);
  cursor: pointer;
  font-family: var(--body);
  font-size: 10px;
  line-height: 1;
  display: grid;
  place-items: center;
  transition: 0.2s ease;
}

.overview-weather-close:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
}

.overview-weather-title,
.overview-weather-subtitle,
.overview-weather-confidence {
  color: var(--muted-strong);
  font-size: 10px;
  line-height: 1.35;
}

.overview-weather-title {
  color: var(--text);
  font-family: var(--title);
  font-size: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.overview-weather-head {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 6px;
  align-items: center;
}

.overview-weather-icon {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-family: var(--mono, monospace);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.09em;
  color: var(--text);
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.overview-weather-copy {
  display: grid;
  gap: 1px;
}

.overview-weather-condition {
  color: var(--text);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.1;
}

.overview-weather-date {
  color: var(--teal-2);
  font-size: 7px;
  line-height: 1.35;
}

.overview-weather-body {
  display: grid;
  gap: 5px;
}

.overview-weather-chips {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
}

.overview-weather-chip {
  padding: 4px 5px;
  border-radius: 8px;
  border: 1px solid rgba(86, 214, 200, 0.12);
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.03));
  display: grid;
  gap: 2px;
}

.overview-weather-chip-label {
  color: var(--muted);
  font-size: 6px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.overview-weather-chip-value {
  color: var(--text);
  font-size: 8px;
  font-weight: 600;
}

.overview-weather-subtitle {
  margin-top: 0;
  font-size: 7px;
  display: flex;
  align-items: center;
  gap: 0;
}

/* Source tag: OBS (teal) vs SCN (amber) */
.weather-source-tag {
  display: inline-block;
  font-size: 6px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0px 3px;
  border-radius: 2px;
  line-height: 1.5;
  vertical-align: middle;
  flex-shrink: 0;
}
.weather-source-tag.observed {
  background: rgba(86, 214, 200, 0.18);
  color: var(--teal);
}
.weather-source-tag.scenario {
  background: rgba(245, 166, 35, 0.22);
  color: var(--amber);
}

.overview-weather-confidence {
  color: var(--teal-2);
  min-height: 12px;
  padding-top: 2px;
  border-top: 1px solid rgba(86, 214, 200, 0.1);
  font-size: 7px;
}

.overview-weather-icon.weather-clear {
  color: #87f0e5;
  border-color: rgba(135, 240, 229, 0.28);
  background: rgba(135, 240, 229, 0.10);
}

.overview-weather-icon.weather-breezy,
.overview-weather-icon.weather-windy {
  color: #73bde8;
  border-color: rgba(115, 189, 232, 0.28);
  background: rgba(115, 189, 232, 0.10);
}

.overview-weather-icon.weather-hot {
  color: #ff8f6b;
  border-color: rgba(255, 143, 107, 0.28);
  background: rgba(255, 143, 107, 0.10);
}

.overview-weather-icon.weather-cloudy,
.overview-weather-icon.weather-partial {
  color: #f5c76c;
  border-color: rgba(245, 199, 108, 0.28);
  background: rgba(245, 199, 108, 0.10);
}

.overview-weather-icon.weather-unsettled,
.overview-weather-icon.weather-no_data {
  color: #ff6f7d;
  border-color: rgba(255, 111, 125, 0.28);
  background: rgba(255, 111, 125, 0.10);
}

.rev2-floating-panel {
  top: 88px;
  right: 16px;
  width: 184px;
}

.map-status-bar {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 28px;
  z-index: 900;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.85fr);
  gap: 8px;
}

.map-status-card,
.geo-summary-card {
  padding: 8px 10px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(4, 16, 27, 0.94);
  font-size: 10px;
  line-height: 1.32;
  color: var(--muted-strong);
}

.map-status-card strong,
.geo-summary-card strong {
  display: block;
  margin-bottom: 3px;
  font-size: 11px;
  color: var(--text);
}

.mapbox-sidepanel {
  padding: 0;
  overflow: hidden;
}

.sidepanel-tabs {
  display: flex;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,0.02);
}

.sidepanel-tab {
  flex: 1;
  text-align: center;
  padding: 10px 8px;
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1.2px;
}

.sidepanel-tab.active {
  color: var(--text);
  background: rgba(86, 214, 200, 0.08);
  box-shadow: inset 0 -2px 0 rgba(86, 214, 200, 0.7);
}

.sidepanel-body,
.rev2-side-body {
  padding: 16px;
  display: grid;
  gap: 16px;
}

.content-geo .rev2-side-body {
  padding: 10px;
  gap: 10px;
}

.geo-controls-only {
  gap: 8px;
}

.geo-layout > .geo-half-card {
  align-self: start;
}

.layer-item-card {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border-radius: 14px;
  border: 1px solid var(--line);
  padding: 8px 10px;
  background: rgba(255,255,255,0.06);
  text-align: left;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02);
  color: var(--text);
  font-family: var(--body);
}

.layer-item-card.active {
  border-color: rgba(86, 214, 200, 0.28);
  background: linear-gradient(135deg, rgba(86, 214, 200, 0.16), rgba(115, 189, 232, 0.08));
  box-shadow: inset 0 0 0 1px rgba(135, 240, 229, 0.06), 0 0 0 1px rgba(86, 214, 200, 0.08);
}

.layer-control-list {
  display: grid;
  gap: 8px;
}

.layer-control-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 7px 8px;
  background: rgba(255,255,255,0.04);
  transition: 0.18s ease;
}

.layer-control-row.active {
  border-color: rgba(86, 214, 200, 0.28);
  background: linear-gradient(135deg, rgba(86, 214, 200, 0.14), rgba(115, 189, 232, 0.06));
  box-shadow: inset 0 0 0 1px rgba(135, 240, 229, 0.05);
}

.layer-control-row:hover {
  border-color: rgba(86, 214, 200, 0.22);
  background: rgba(255,255,255,0.06);
}

.layer-control-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  font-family: var(--body);
  cursor: pointer;
}

.layer-control-main .item-copy span {
  font-size: 10px;
}

.layer-control-main .item-icon {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
}

.rev2-layer-tooltip .tooltip-inner {
  max-width: 260px;
  padding: 8px 10px;
  border: 1px solid rgba(86, 214, 200, 0.18);
  background: rgba(4, 16, 27, 0.96);
  color: var(--text);
  font-size: 11px;
  line-height: 1.45;
}

.layer-item-card:hover {
  border-color: rgba(86, 214, 200, 0.22);
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.05));
}

.layer-item-card *,
.layer-item-card strong,
.layer-item-card span,
.layer-item-card div {
  color: inherit;
}

.layer-item-right {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
}

.layer-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(86,214,200,0.16);
  background: rgba(86,214,200,0.08);
  font-size: 10px;
  color: var(--teal-2);
  text-transform: uppercase;
  letter-spacing: 0.9px;
  line-height: 1.2;
}

.layer-metric-label,
.layer-control-label,
.rev2-legend-range {
  font-size: 11px;
  color: var(--muted-strong);
  text-transform: uppercase;
  letter-spacing: 1.2px;
}

.layer-control-label {
  margin-bottom: 0;
}

.layer-control-label-tight {
  margin-top: 0;
}

.layer-metric-value {
  margin-top: 4px;
  color: var(--text);
  font-family: var(--title);
  font-size: 14px;
}

.rev2-opacity-slider {
  margin: 0 0 2px;
}

.rev2-opacity-slider-compact {
  margin-bottom: 1px;
}

.rev2-slider-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px;
  align-items: center;
  gap: 10px;
}

.rev2-slider-track-wrap {
  min-width: 0;
}

.rev2-slider-value-box {
  display: grid;
  place-items: center;
  min-height: 48px;
  padding: 0 10px;
  border-radius: 14px;
  border: 1px solid rgba(135, 240, 229, 0.24);
  background: linear-gradient(180deg, rgba(10, 29, 45, 0.98), rgba(6, 18, 30, 0.98));
  color: var(--text);
  font-family: var(--title);
  font-size: 18px;
  line-height: 1;
  white-space: nowrap;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.03), 0 10px 24px rgba(0,0,0,0.22);
  text-shadow: 0 1px 0 rgba(0,0,0,0.3);
}

/* Dash 4 opacity slider (single Slider, uses slider-* classes) */
.rev2-opacity-slider .slider-track {
  background: rgba(255,255,255,0.12);
}

.rev2-opacity-slider .slider-range {
  background: linear-gradient(90deg, rgba(86,214,200,0.7), rgba(115,189,232,0.9));
}

.rev2-opacity-slider .slider-thumb {
  border: 2px solid var(--teal);
  background-color: #0b2234 !important;
  background-image: none !important;
  border-radius: 50% !important;
  opacity: 1 !important;
}

.rev2-opacity-slider .slider-mark-text {
  color: var(--muted-strong);
  font-size: 10px;
}

.rev2-opacity-slider input {
  display: none !important;
}

.rev2-overlay-readout {
  color: var(--muted-strong);
  font-size: 10px;
  line-height: 1.35;
  margin-bottom: 0;
}

#rev2-overlay-radius-readout {
  margin-top: 2px;
  margin-bottom: 12px;
  font-size: 11px;
  font-style: italic;
  line-height: 1.35;
}

.rc-slider-tooltip,
.rc-slider-tooltip-content,
.rc-slider-tooltip-inner,
.rc-slider-tooltip-arrow,
[class*="rc-slider-tooltip"],
.slider-tooltip,
[class*="slider-tooltip"] {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.rc-tooltip,
.rc-tooltip-content,
.rc-tooltip-inner,
.rc-tooltip-arrow,
[class*="rc-tooltip"] {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.item-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.layer-section-stack {
  display: grid;
  gap: 10px;
}

.layer-section {
  display: grid;
  gap: 6px;
}

.layer-section-title {
  color: var(--muted-strong);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.3px;
}

.item-copy {
  min-width: 0;
}

.layer-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
}

.item-copy strong {
  display: block;
  margin-bottom: 0;
  color: var(--text);
  font-family: var(--title);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3px;
  line-height: 1.1;
}

.item-copy span {
  display: block;
  color: var(--muted-strong);
  font-size: 10px;
  line-height: 1.3;
}

.layer-item-card .item-icon {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.06);
  color: var(--teal-2);
  font-size: 13px;
}

.layer-item-card.active .item-icon {
  background: rgba(86,214,200,0.12);
  border-color: rgba(86,214,200,0.18);
  color: var(--teal-2);
}

.layer-item-card .toggle-pill {
  min-width: 38px;
  justify-content: center;
  padding: 4px 8px;
  font-size: 9px;
  color: var(--text);
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.1);
}

.layer-item-card.active .toggle-pill {
  background: rgba(86,214,200,0.14);
  border-color: rgba(86,214,200,0.18);
}

.toggle-pill-on {
  background: rgba(56, 211, 159, 0.16) !important;
  border-color: rgba(56, 211, 159, 0.26) !important;
  color: #baffdf !important;
}

.toggle-pill-off {
  background: rgba(255,255,255,0.05) !important;
  border-color: rgba(255,255,255,0.08) !important;
  color: rgba(236,246,250,0.72) !important;
}

.toggle-pill.off {
  opacity: 0.6;
}

.rev2-layer-list label {
  display: block;
  margin-bottom: 10px;
}

.basemap-switcher-dropdown,
.overview-filter-dropdown,
.geo-control-stack .rev2-date-range,
.overview-controls-row .rev2-date-range {
  position: relative;
  z-index: 2;
}

.rev2-native-select {
  min-width: min(180px, 100%);
  height: var(--control-height);
  padding: 0 clamp(36px, 2.1vw, 42px) 0 clamp(12px, 0.9vw, 14px);
  border-radius: clamp(12px, 0.9vw, 14px);
  border: 1px solid rgba(86, 214, 200, 0.18) !important;
  background: rgba(5, 18, 30, 0.98) !important;
  background-color: rgba(5, 18, 30, 0.98) !important;
  color: var(--text) !important;
  font-family: var(--body);
  font-size: clamp(11px, 0.75vw, 12px);
  font-weight: 500;
  outline: none;
  box-shadow: none !important;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--text) 50%),
    linear-gradient(135deg, var(--text) 50%, transparent 50%) !important;
  background-position:
    calc(100% - 22px) calc(50% - 3px),
    calc(100% - 14px) calc(50% - 3px) !important;
  background-size: 8px 8px, 8px 8px !important;
  background-repeat: no-repeat !important;
}

.rev2-native-select:focus {
  border-color: rgba(86, 214, 200, 0.28) !important;
  outline: none !important;
  box-shadow: none !important;
}

/* Bootstrap 5 .form-select overrides our background on light theme — re-assert with higher specificity */
select.form-select.rev2-native-select,
.panel select.rev2-native-select,
.map-panel select.rev2-native-select,
.chart-panel select.rev2-native-select {
  background-color: rgba(5, 18, 30, 0.98) !important;
  color: var(--text) !important;
}

.overview-filter-dropdown {
  width: 220px;
  margin: 0;
}

.rev2-date-range {
  margin: 10px 0;
}

.overview-controls-row,
.geo-control-stack {
  display: grid;
  gap: 12px;
}

.geo-control-stack {
  gap: 4px;
}

.geo-layer-controls-panel {
  display: grid;
  gap: 12px;
}

.rev2-geo-layer-drawer.offcanvas {
  width: min(430px, calc(100vw - 24px));
  background: rgba(6, 18, 30, 0.98);
  color: var(--text);
  border-left: 1px solid rgba(86, 214, 200, 0.16);
  box-shadow: var(--shadow);
}

.rev2-geo-layer-drawer .offcanvas-header {
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(86, 214, 200, 0.06), rgba(86, 214, 200, 0)),
    rgba(255, 255, 255, 0.01);
}

.rev2-geo-layer-drawer .offcanvas-title {
  font-family: var(--title);
  font-size: 18px;
  letter-spacing: 0.7px;
}

.rev2-geo-layer-drawer .offcanvas-body {
  padding: 14px 16px 18px;
}

.rev2-geo-layer-drawer .btn-close {
  filter: invert(1) brightness(1.2);
  opacity: 0.85;
}

.geo-draw-card {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

.rev2-aoi-draw-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rev2-aoi-draw-btn {
  min-height: 36px;
}

.rev2-aoi-draw-summary,
.rev2-aoi-draw-status {
  color: var(--muted-strong);
  font-size: 11px;
  line-height: 1.45;
}

.rev2-aoi-draw-export {
  width: 100%;
  min-height: 180px;
  resize: vertical;
  border-radius: 14px;
  border: 1px solid rgba(86, 214, 200, 0.18);
  background: rgba(5, 18, 30, 0.98);
  color: var(--text);
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
  line-height: 1.45;
  padding: 12px 14px;
}

.overview-controls-row {
  grid-template-columns: minmax(0, 1fr) 220px;
  align-items: start;
  margin: 12px 0 10px;
}

.overview-date-range {
  margin: 0;
}

.rev2-date-range {
  display: flex;
  align-items: center;
  gap: clamp(8px, 0.6vw, 10px);
}

.rev2-date-input {
  flex: 1;
  min-width: 0;
  height: clamp(38px, 2.2vw, 44px);
  padding: 0 clamp(12px, 0.9vw, 14px);
  border-radius: clamp(10px, 0.8vw, 12px);
  border: 1px solid rgba(86, 214, 200, 0.18);
  background: rgba(5, 18, 30, 0.98);
  background-color: rgba(5, 18, 30, 0.98);
  color: var(--text);
  font-family: var(--body);
  font-size: clamp(10px, 0.72vw, 11px);
  font-weight: 500;
  outline: none;
  box-shadow: none;
  color-scheme: dark;
}

.rev2-date-input::-webkit-calendar-picker-indicator {
  filter: invert(1) brightness(1.2);
  opacity: 0.9;
  cursor: pointer;
}

.rev2-date-separator {
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
}

.rev2-feature-title {
  font-family: var(--title);
  font-size: 17px;
  margin-bottom: 4px;
  color: var(--text);
}

.geo-half-card .rev2-feature-title {
  font-size: 15px;
}

.rev2-feature-subtitle,
.rev2-feature-row,
.rev2-feature-note,
.rev2-registry-subtitle,
.popup-subtitle,
.popup-row,
.popup-note {
  color: var(--muted-strong);
  font-size: 11px;
  line-height: 1.4;
}

.geo-half-card .rev2-feature-subtitle,
.geo-half-card .rev2-feature-row,
.geo-half-card .rev2-feature-note,
.geo-half-card .rev2-registry-subtitle {
  font-size: 10px;
  line-height: 1.3;
}

.rev2-feature-note,
.popup-note {
  margin-top: 8px;
}

.rev2-registry-title,
.popup-title {
  font-family: var(--title);
  font-size: 14px;
  margin-bottom: 3px;
  color: var(--text);
}

.geo-half-card .rev2-registry-title {
  font-size: 13px;
}

.rev2-side-card .rev2-panel-title,
.mapbox-sidepanel .panel-title,
.mapbox-sidepanel .section-label {
  color: var(--text);
}

.rev2-side-card,
.layer-item-card,
.station-item {
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02);
}

.rev2-station-registry {
  max-height: 196px;
  overflow: auto;
  padding-right: 4px;
}

.geo-bottom-card {
  min-height: 0;
}

.geo-bottom-card .rev2-panel-title {
  margin-bottom: 4px;
}

.geo-post-map-grid .rev2-station-registry {
  max-height: 170px;
}

.geo-registry-card .rev2-station-registry {
  max-height: 58px;
}

.geo-half-card {
  padding: 9px !important;
}

.geo-half-card .station-item {
  padding: 6px 8px;
  gap: 6px;
}

.geo-registry-card .station-item {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.geo-registry-card .item-meta {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  width: 100%;
  gap: 6px;
}

.geo-registry-card .item-copy {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
}

.geo-registry-card .rev2-registry-title,
.geo-registry-card .rev2-registry-subtitle {
  max-width: none;
  white-space: normal;
  line-height: 1.05;
}

.geo-registry-card .badge {
  justify-self: end;
  min-width: 46px;
  padding: 3px 7px;
  font-size: 8px;
}

.geo-half-card .item-icon {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  font-size: 11px;
}

.geo-half-card .badge {
  padding: 4px 8px;
  font-size: 9px;
}

.content-geo .context-bar {
  margin-bottom: 12px;
}

.content-geo .badge {
  padding: 5px 9px;
  font-size: 10px;
}

.rev2-station-registry::-webkit-scrollbar {
  width: 8px;
}

.rev2-station-registry::-webkit-scrollbar-thumb {
  background: rgba(86, 214, 200, 0.18);
  border-radius: 999px;
}

.mapbox-sidepanel .badge,
.station-item .badge {
  justify-self: end;
}

.plotly .main-svg,
.js-plotly-plot .plotly .main-svg {
  font-family: var(--body) !important;
}

.js-plotly-plot .plotly text {
  fill: #f0f9fc !important;
}

.js-plotly-plot .plotly .gtitle {
  fill: var(--text) !important;
}

.screen-desc,
.panel-subtitle,
.metric-foot,
.footer-note,
.sidebar-note p,
.geo-summary-card p,
.rev2-feature-row,
.rev2-feature-note,
.rev2-registry-subtitle,
.popup-row,
.popup-note,
.item-copy span,
.nav-subtitle,
.legend-labels,
.floating-copy,
.rail-row,
.insight p {
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.22);
}

.sidebar-note,
.rail-card,
.metric-card,
.panel,
.mapbox-sidepanel,
.rev2-side-card,
.layer-item-card,
.station-item,
.map-status-card,
.geo-summary-card,
.floating-note,
.map-legend {
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02), 0 18px 46px rgba(0,0,0,0.26);
}

.rev2-legend {
  display: grid;
  gap: 6px;
}

.rev2-legend-context {
  color: var(--muted-strong);
  font-size: 10px;
  line-height: 1.35;
  padding: 6px 10px;
  border: 1px solid rgba(86, 214, 200, 0.14);
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
}

.rev2-legend-title {
  font-size: 12px;
  color: var(--text);
}

.rev2-legend-copy {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.35;
}

.rev2-legend-bar-wrap {
  position: relative;
  height: 16px;
  margin: 2px 0;
}

.rev2-legend-bar {
  position: absolute;
  left: 0;
  right: 0;
  top: 3px;
  height: 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: linear-gradient(90deg, #234c77 0%, #37a1d9 35%, #f5c76c 68%, #ff6f7d 100%);
}

.rev2-legend-bar-marker {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 10px;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 2;
}

.rev2-legend-bar-marker-dot {
  position: absolute;
  left: 50%;
  top: 0;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(5, 17, 29, 0.82);
  box-shadow: 0 0 10px rgba(255,255,255,0.28);
  transform: translateX(-50%);
}

.rev2-legend-bar-marker-line {
  position: absolute;
  left: 50%;
  top: 6px;
  bottom: 0;
  width: 2px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 0 0 1px rgba(5, 17, 29, 0.55), 0 0 8px rgba(255,255,255,0.18);
  transform: translateX(-50%);
}

.rev2-legend-scale {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.rev2-legend-axis {
  font-size: 10px;
  color: var(--muted);
}

.leaflet-popup-content-wrapper {
  border-radius: 16px;
  border: 1px solid rgba(86, 214, 200, 0.18);
  background: linear-gradient(180deg, rgba(7, 22, 36, 0.98), rgba(5, 17, 29, 0.98)) !important;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.34);
}

.leaflet-popup-content {
  margin: 0 !important;
  min-width: 260px;
  max-width: 320px;
  padding: 16px 18px 14px;
  color: var(--text);
  font-family: var(--body);
}

.leaflet-popup-tip {
  background: rgba(6, 19, 31, 0.98) !important;
  border: 1px solid rgba(86, 214, 200, 0.14);
  box-shadow: none !important;
}

.leaflet-popup-close-button {
  top: 10px !important;
  right: 10px !important;
  color: var(--muted-strong) !important;
  font-size: 24px !important;
  font-weight: 400 !important;
}

/* ── Overview Intelligence Rail ─────────────────────────────────────── */

.rail-kv-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  padding: 5px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.rail-kv-row:last-of-type {
  border-bottom: none;
}

.rail-kv-key {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}

.rail-kv-val {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  text-align: right;
}

.rail-kv-ok {
  color: var(--teal-2);
}

.rail-kv-alert {
  color: var(--amber);
}

.rail-why-text {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
  margin-top: 2px;
}

.rail-divider {
  border: none;
  border-top: 1px solid var(--line);
  margin: 8px 0;
}

.btn-rail-cta {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 8px 14px;
  font-size: 12px;
  font-family: var(--body);
  font-weight: 600;
  color: var(--teal-2);
  background: rgba(86, 214, 200, 0.1);
  border: 1px solid rgba(86, 214, 200, 0.22);
  border-radius: 10px;
  cursor: pointer;
  text-align: center;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.btn-rail-cta:hover {
  background: rgba(86, 214, 200, 0.18);
  border-color: rgba(86, 214, 200, 0.38);
  color: var(--teal-2);
}

.rail-heading-center {
  text-align: center;
}

.leaflet-popup-close-button:hover {
  color: var(--text) !important;
}

.leaflet-tooltip {
  border-radius: 12px !important;
  border: 1px solid rgba(86, 214, 200, 0.18) !important;
  background: linear-gradient(180deg, rgba(7, 22, 36, 0.98), rgba(5, 17, 29, 0.98)) !important;
  color: var(--text) !important;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
  padding: 10px 14px !important;
  font-family: var(--body);
  font-size: 13px;
  line-height: 1.35;
}

.leaflet-tooltip::before {
  border-right-color: rgba(6, 19, 31, 0.98) !important;
}

.leaflet-tooltip-left::before {
  border-left-color: rgba(6, 19, 31, 0.98) !important;
}

.leaflet-tooltip-right::before {
  border-right-color: rgba(6, 19, 31, 0.98) !important;
}

.leaflet-tooltip-top::before {
  border-top-color: rgba(6, 19, 31, 0.98) !important;
}

.leaflet-tooltip-bottom::before {
  border-bottom-color: rgba(6, 19, 31, 0.98) !important;
}

.station-popup .popup-title {
  color: var(--text);
  font-family: var(--title);
  font-size: 18px;
  line-height: 1.1;
  margin: 0 20px 8px 0;
}

.station-popup .popup-subtitle {
  color: var(--teal-2);
  font-size: 13px;
  margin-bottom: 6px;
}

.station-popup .popup-row {
  color: var(--muted-strong);
  font-size: 12px;
  line-height: 1.45;
  margin-bottom: 2px;
}

.station-popup .popup-note {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.scenario-patch-label {
  border-radius: 999px !important;
  border: 1px solid rgba(247, 251, 255, 0.30) !important;
  background:
    linear-gradient(180deg, rgba(10, 28, 44, 0.98), rgba(7, 20, 32, 0.98)) !important;
  color: #f7fbff !important;
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.30),
    0 0 0 2px rgba(255, 143, 107, 0.14);
  padding: 6px 10px !important;
  font-family: var(--title);
  font-size: 12px;
  letter-spacing: 0.3px;
  line-height: 1;
}

.scenario-patch-label::before {
  border-top-color: rgba(7, 20, 32, 0.98) !important;
}

.leaflet-container {
  background: #081521;
  font-family: var(--body);
}

.leaflet-control-attribution,
.leaflet-control-scale-line {
  background: rgba(5, 17, 29, 0.82) !important;
  color: var(--text) !important;
  border-color: rgba(255,255,255,0.1) !important;
}

@keyframes fade {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (min-width: 1601px) and (max-width: 2100px) {
  :root {
    --topbar-height: 68px;
    --topbar-inline-pad: 18px;
    --sidebar-width: clamp(220px, 11.8vw, 236px);
    --context-rail-width: clamp(236px, 12.5vw, 260px);
    --page-pad: 10px;
    --panel-gap: 7px;
    --control-height: 40px;
    --screen-header-gap: 10px;
    --screen-title-size: 28px;
    --geo-screen-title-size: 21px;
    --overview-map-min-height: 452px;
    --map-panel-min-height: 320px;
    --geo-playback-chart-height: 286px;
  }

  .topbar {
    gap: 8px;
  }

  .brand {
    max-width: min(510px, 34vw);
  }

  .logo {
    font-size: 23px;
    letter-spacing: 2px;
  }

  .brand-title {
    font-size: 14px;
  }

  .log-helper-row {
    gap: 6px;
    margin-top: 3px;
    font-size: 9px;
  }

  .log-helper-path {
    max-width: min(170px, 12vw);
    font-size: 9px;
  }

  .topbar-right {
    gap: 6px;
  }

  .pill {
    padding: 5px 9px;
    font-size: 10px;
  }

  .screen-desc {
    font-size: 11px;
  }

  .geo-screen .screen-desc {
    font-size: 10px;
  }

  .content-geo {
    padding: 10px;
  }

  .nav-item,
  .station-item {
    grid-template-columns: 30px minmax(0, 1fr) auto;
    align-items: start;
    gap: 7px;
    padding: 9px;
  }

  .nav-icon,
  .item-icon {
    width: 30px;
    height: 30px;
    border-radius: 10px;
    font-size: 13px;
  }

  .nav-title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    white-space: normal;
    line-height: 1.18;
    font-size: 12px;
  }

  .nav-subtitle,
  .item-copy span,
  .item-copy strong + span {
    font-size: 9px;
    line-height: 1.28;
  }

  .nav-tag,
  .toggle-pill {
    align-self: start;
    padding: 3px 6px;
    font-size: 9px;
  }

  .screen-title {
    letter-spacing: 0.8px;
  }

  .content-geo .panel-title,
  .content-geo .rev2-panel-title {
    font-size: 13px;
  }

  .content-geo .panel-subtitle {
    font-size: 9px;
    line-height: 1.28;
  }

  .geo-screen-actions-inline {
    flex: 0 1 auto;
    width: auto;
  }

  .geo-side-actions {
    width: 100%;
    margin-left: 0;
    justify-content: flex-end;
  }

  .rev2-geo-layout {
    grid-template-columns: minmax(0, 1.68fr) minmax(clamp(480px, 29vw, 540px), 0.76fr);
  }

  .geo-handoff-banner {
    margin-top: 6px;
    margin-bottom: 6px;
    padding: 8px 10px;
    font-size: 9px;
    line-height: 1.28;
  }

  .geo-handoff-grid {
    gap: 5px;
    margin-bottom: 6px;
  }

  .geo-handoff-field {
    min-height: 48px;
    padding: 7px 8px;
  }

  .geo-handoff-field-label {
    font-size: 8px;
  }

  .geo-handoff-field-value {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    font-size: 10px;
    line-height: 1.2;
  }

  .geo-handoff-copy {
    font-size: 9px;
    line-height: 1.22;
  }

  .map-aoi-selector-dropdown {
    height: 36px;
    padding: 0 36px 0 12px;
    border-radius: 12px;
    font-size: 12px;
  }

  .basemap-switcher {
    right: 12px;
    top: 12px;
    width: 146px;
  }

  .gis-toolbar {
    left: 12px;
    top: 66px;
    gap: 6px;
  }

  .gis-tool {
    width: 34px;
    height: 34px;
    border-radius: 11px !important;
  }

  .gis-tool-fx {
    width: 82px;
    min-width: 82px;
    height: 36px !important;
    padding: 0 8px !important;
    font-size: 10px !important;
  }

  .gis-tool-wx,
  .gis-tool-draw {
    width: 68px;
    min-width: 68px;
    height: 36px !important;
    padding: 0 8px !important;
    font-size: 10px !important;
  }

  .geo-playback-toolbar {
    grid-template-columns: auto minmax(136px, 170px) minmax(0, 1fr);
  }

  .sim-play-btn {
    height: 38px;
    padding: 0 10px;
    border-radius: 9px;
    font-size: 10px;
  }

  .sim-speed-select {
    min-width: 136px;
    padding-right: 28px !important;
    font-size: 10px !important;
  }

  .sim-cursor-label {
    font-size: 10px;
  }

  .geo-restoration-row {
    grid-template-columns: minmax(0, 172px) auto minmax(0, 1fr);
    padding: 5px 7px;
  }

  .event-restoration-checklist {
    gap: 7px;
  }

  .event-restoration-checklist .form-check-label {
    font-size: 9px;
  }

  .timeseries-meta-chip {
    min-height: 40px;
    padding: 7px 8px;
    font-size: 9px;
  }

  .geo-playback-chip {
    min-height: 46px;
    padding: 6px 7px;
  }

  .geo-playback-chip-label {
    font-size: 7px;
  }

  .geo-playback-chip-value {
    font-size: 9px;
  }

  .geo-map-time-chip {
    top: 10px;
    min-width: min(156px, calc(100% - 24px));
    padding: 5px 9px;
    font-size: 8px;
  }

  .rev2-map-shell .overview-weather-card {
    left: 86px;
    top: 54px;
    width: min(148px, calc(100% - 118px));
  }

  .rev2-map-shell .geo-map-patch-toggle {
    top: 288px;
    left: 10px;
  }

  .rev2-map-shell .geo-map-metric-toggle {
    top: 344px;
    left: 10px;
  }

  .overview-weather-card {
    padding: 6px 6px 5px;
    gap: 4px;
  }

  .overview-weather-toolbar {
    padding-right: 18px;
  }

  .overview-weather-title,
  .overview-weather-subtitle,
  .overview-weather-confidence {
    font-size: 9px;
  }

  .overview-weather-title {
    font-size: 7px;
  }

  .overview-weather-head {
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 5px;
  }

  .overview-weather-icon {
    width: 24px;
    height: 24px;
    border-radius: 8px;
    font-size: 8px;
  }

  .overview-weather-condition {
    font-size: 9px;
  }

  .overview-weather-date {
    font-size: 6px;
  }

  .overview-weather-chips {
    gap: 3px;
  }

  .overview-weather-chip {
    padding: 3px 4px;
    border-radius: 7px;
  }

  .overview-weather-chip-label {
    font-size: 5px;
  }

  .overview-weather-chip-value {
    font-size: 7px;
  }

  .overview-map-coords {
    right: 8px;
    bottom: 8px;
    min-width: min(138px, calc(100% - 16px));
    padding: 6px 8px;
    font-size: 9px;
  }

  .overview-compass-control {
    width: 44px;
    height: 44px;
  }

  .overview-compass-cross-v {
    height: 28px;
  }

  .overview-compass-cross-h {
    width: 28px;
  }

  .overview-compass-needle {
    top: 7px;
    height: 15px;
  }

  .overview-compass-label {
    font-size: 7px;
  }

  .geo-map-metric-legend {
    left: 10px;
    bottom: 10px;
    width: min(184px, calc(100% - 20px));
    padding: 7px 8px;
    gap: 5px;
  }

  .geo-map-metric-legend-body,
  .geo-map-metric-rows {
    gap: 5px;
  }

  .geo-map-metric-row {
    grid-template-columns: 12px minmax(0, 1fr);
    gap: 6px;
  }

  .geo-map-metric-swatch {
    width: 9px;
    height: 9px;
  }

  .geo-map-metric-label {
    font-size: 9px;
  }

  .geo-map-metric-copy {
    font-size: 8px;
  }

  .geo-map-patch-card {
    top: 56px;
    right: 10px;
    width: min(236px, calc(100% - 20px));
    max-height: min(292px, calc(100% - 112px));
    padding: 8px;
    overflow: auto;
  }

  .geo-map-patch-card.is-open {
    gap: 6px;
  }

  .geo-map-patch-card-body {
    gap: 6px;
  }

  .geo-map-patch-card-kicker {
    font-size: 8px;
  }

  .geo-map-patch-card-title {
    font-size: 14px;
  }

  .geo-map-patch-metric {
    font-size: 16px;
    line-height: 1.02;
  }

  .geo-map-patch-feedback {
    padding: 3px 6px;
    font-size: 8px;
  }

  .geo-map-patch-copy {
    font-size: 9px;
    line-height: 1.24;
  }

  .geo-map-patch-note {
    font-size: 8px;
  }

  .scenario-layout {
    grid-template-columns: minmax(232px, 0.84fr) minmax(0, 1fr);
    gap: 12px;
  }

  .scenario-sidebar {
    gap: 10px;
  }

  .scenario-baseline-card {
    min-height: 96px;
    padding: 13px 14px;
    border-radius: 16px;
  }

  .scenario-baseline-title {
    font-size: 22px;
  }

  .scenario-baseline-copy,
  .scenario-inline-help-copy,
  .scenario-inline-help-list {
    font-size: 10px;
    line-height: 1.42;
  }

  .scenario-selector-card,
  .scenario-summary-card {
    padding: 12px;
  }

  #rev2-scenarios-summary-cards.grid-4 {
    gap: 10px;
  }

  .preset {
    padding: 10px 12px;
  }

  .preset strong,
  .scenario-current-panel .panel-title,
  .scenario-runtime-title {
    font-size: 14px;
  }

  .preset p,
  .scenario-current-panel .panel-subtitle,
  .scenario-runtime-copy {
    font-size: 10px;
    line-height: 1.4;
  }

  .scenario-summary-meta {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
  }

  .scenario-summary-chip {
    min-height: 68px;
    padding: 9px 10px;
  }

  .scenario-summary-chip-label,
  .scenario-driver-kicker,
  .scenario-summary-kicker,
  .scenario-section-divider::after {
    font-size: 9px;
  }

  .scenario-summary-chip-value {
    font-size: 13px;
    line-height: 1.26;
  }

  .scenario-driver-grid {
    gap: 8px;
  }

  .scenario-driver-card,
  .scenario-driver-empty-card {
    padding: 10px 11px;
  }

  .scenario-driver-title {
    font-size: 12px;
    line-height: 1.3;
  }

  .scenario-driver-detail,
  .scenario-driver-empty,
  .scenario-summary-detail,
  .scenario-kv-row,
  .scenario-action-list,
  .scenario-evidence-item,
  .scenario-field-helper {
    font-size: 10px;
    line-height: 1.42;
  }

  .scenario-summary-card .metric-label,
  .scenario-toggle button,
  .scenario-inline-help-title,
  .scenario-field-label {
    font-size: 10px;
    line-height: 1.26;
  }

  .scenario-summary-card .metric-value {
    font-size: 20px;
  }

  .scenario-summary-card .badge {
    padding: 3px 7px;
    font-size: 8px;
  }

  .scenario-summary-card .metric-foot {
    font-size: 8px;
    line-height: 1.28;
  }

  .scenario-builder-field,
  .scenario-builder-status-card,
  .scenario-builder-library-card {
    padding: 16px;
    border-radius: 18px;
  }

  .scenario-help-dot {
    width: 20px;
    height: 20px;
    font-size: 9px;
  }

  .scenario-help-dot::after {
    width: 210px;
    bottom: calc(100% + 8px);
    padding: 8px 10px;
    border-radius: 10px;
    font-size: 10px;
    line-height: 1.36;
  }

  .rev2-layer-tooltip .tooltip-inner,
  .hero-badge-tooltip .tooltip-inner,
  .geo-forecast-lenses-tooltip .tooltip-inner,
  .geo-handoff-tooltip .tooltip-inner {
    max-width: 250px;
    padding: 8px 10px;
    border-radius: 10px;
    font-size: 10px;
    line-height: 1.36;
  }

  .hero-badge-tooltip .tooltip-inner strong {
    font-size: 11px;
  }
}

@media (min-width: 1601px) and (max-width: 1920px) {
  :root {
    --sidebar-width: clamp(188px, 10.1vw, 202px);
    --page-pad: 6px;
    --panel-gap: 6px;
    --screen-header-gap: 8px;
    --screen-title-size: 24px;
    --geo-screen-title-size: 17px;
    --control-height: 36px;
    --geo-playback-chart-height: 264px;
  }

  .content-geo {
    padding: 7px 8px 9px;
  }

  .nav-item,
  .station-item {
    grid-template-columns: 26px minmax(0, 1fr) auto;
    gap: 6px;
    padding: 8px 8px;
    border-radius: 14px;
  }

  .nav-icon,
  .item-icon {
    width: 26px;
    height: 26px;
    border-radius: 9px;
    font-size: 11px;
  }

  .nav-title {
    font-size: 9px;
    line-height: 1.14;
  }

  .nav-subtitle,
  .item-copy span,
  .item-copy strong + span {
    font-size: 6.5px;
    line-height: 1.18;
  }

  .nav-tag,
  .toggle-pill {
    padding: 2px 5px;
    font-size: 7px;
    border-radius: 999px;
  }

  .geo-screen .screen-header {
    margin-bottom: 3px;
  }

  .geo-screen .screen-desc {
    max-width: 100%;
    font-size: 7.5px;
    line-height: 1.22;
  }

  .geo-screen-title-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 6px;
  }

  .geo-screen-actions-inline {
    flex: 0 1 auto;
    width: auto;
    max-width: 100%;
    gap: 6px;
  }

  .geo-side-actions {
    width: 100%;
    margin-left: 0;
    justify-content: flex-end;
    gap: 6px;
  }

  .geo-screen .btn {
    min-height: 34px;
    padding: 0 9px;
    font-size: 8.5px;
  }

  .rev2-geo-layout {
    grid-template-columns: minmax(0, 1.48fr) minmax(clamp(450px, 28vw, 540px), 0.88fr);
  }

  .content-geo .panel-title,
  .content-geo .rev2-panel-title {
    font-size: 10px;
  }

  .content-geo .panel-subtitle {
    font-size: 6.5px;
    line-height: 1.22;
  }

  .map-search {
    left: 12px;
    top: 12px;
    width: min(320px, calc(100% - 158px));
  }

  .map-aoi-selector-dropdown {
    height: 34px;
    padding: 0 34px 0 10px;
    border-radius: 11px;
    font-size: 11px;
  }

  .basemap-switcher {
    top: 12px;
    right: 10px;
    width: 134px;
  }

  .basemap-switcher .rev2-native-select {
    height: 34px;
    padding: 0 34px 0 10px;
    font-size: 11px;
  }

  .gis-toolbar {
    left: 10px;
    top: 54px;
    gap: 5px;
  }

  .gis-tool {
    width: 32px;
    height: 32px;
    border-radius: 10px !important;
    font-size: 11px !important;
  }

  .gis-tool-fx {
    width: 72px !important;
    min-width: 72px !important;
    height: 32px !important;
    padding: 0 8px !important;
    font-size: 9px !important;
    font-weight: 600 !important;
  }

  .gis-tool-wx,
  .gis-tool-draw {
    width: 60px !important;
    min-width: 60px !important;
    height: 32px !important;
    padding: 0 8px !important;
    font-size: 9px !important;
    font-weight: 600 !important;
  }

  .rev2-map-shell .overview-weather-card {
    left: 82px;
    top: 42px;
    width: min(116px, calc(100% - 108px));
  }

  .rev2-map-shell .geo-map-patch-toggle {
    top: 246px;
    left: 8px;
  }

  .rev2-map-shell .geo-map-metric-toggle {
    top: 296px;
    left: 8px;
  }

  .overview-weather-card {
    padding: 4px;
    gap: 2px;
    border-radius: 10px 0 10px 0;
  }

  .overview-weather-toolbar {
    padding-right: 14px;
  }

  .overview-weather-title,
  .overview-weather-subtitle,
  .overview-weather-confidence {
    font-size: 7px;
  }

  .overview-weather-title {
    font-size: 6px;
  }

  .overview-weather-head {
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 3px;
  }

  .overview-weather-icon {
    width: 18px;
    height: 18px;
    border-radius: 6px;
    font-size: 6px;
  }

  .overview-weather-condition {
    font-size: 7px;
  }

  .overview-weather-date {
    font-size: 5px;
  }

  .overview-weather-chips {
    gap: 2px;
  }

  .overview-weather-chip {
    padding: 2px 3px;
    border-radius: 5px;
  }

  .overview-weather-chip-label {
    font-size: 5px;
  }

  .overview-weather-chip-value {
    font-size: 5px;
  }

  .overview-weather-close {
    width: 14px;
    min-width: 14px;
    height: 14px;
    font-size: 9px;
  }

  .overview-map-coords {
    right: 8px;
    bottom: 8px;
    min-width: min(132px, calc(100% - 16px));
    padding: 5px 7px;
    font-size: 8px;
  }

  .overview-compass-control {
    width: 40px;
    height: 40px;
  }

  .overview-compass-cross-v {
    height: 25px;
  }

  .overview-compass-cross-h {
    width: 25px;
  }

  .overview-compass-needle {
    top: 6px;
    height: 14px;
  }

  .overview-compass-label {
    font-size: 6px;
  }

  .geo-map-metric-legend {
    left: 8px;
    bottom: 8px;
    width: min(156px, calc(100% - 16px));
    padding: 5px 6px;
    gap: 3px;
  }

  .geo-map-metric-legend-body,
  .geo-map-metric-rows {
    gap: 4px;
  }

  .geo-map-metric-legend-title {
    font-size: 7px;
  }

  .geo-map-metric-row {
    grid-template-columns: 10px minmax(0, 1fr);
    gap: 5px;
  }

  .geo-map-metric-swatch {
    width: 8px;
    height: 8px;
  }

  .geo-map-metric-label {
    font-size: 6px;
  }

  .geo-map-metric-copy {
    font-size: 5px;
    line-height: 1.12;
  }

  .geo-map-patch-card {
    top: 48px;
    right: 8px;
    width: min(172px, calc(100% - 16px));
    max-height: min(214px, calc(100% - 84px));
    padding: 5px;
  }

  .geo-map-patch-card.is-open,
  .geo-map-patch-card-body {
    gap: 5px;
  }

  .geo-map-patch-card-kicker {
    font-size: 6px;
  }

  .geo-map-patch-card-title {
    font-size: 10px;
  }

  .geo-map-patch-metric {
    font-size: 11px;
  }

  .geo-map-patch-note,
  .geo-map-patch-summary,
  .geo-map-patch-copy {
    font-size: 6px;
    line-height: 1.14;
  }

  .geo-map-patch-card .badge {
    padding: 2px 5px;
    font-size: 7px;
  }

  .geo-map-patch-feedback {
    padding: 2px 5px;
    font-size: 6px;
  }

  .geo-map-patch-card-close {
    width: 20px;
    height: 20px;
    font-size: 12px;
  }

  .geo-map-patch-card-toolbar {
    gap: 6px;
  }

  .geo-playback-toolbar {
    grid-template-columns: auto minmax(116px, 144px) minmax(0, 1fr);
  }

  .sim-play-btn {
    height: 36px;
    padding: 0 9px;
    font-size: 9px;
  }

  .sim-speed-select {
    min-width: 116px;
    padding-right: 26px !important;
    font-size: 9px !important;
  }

  .sim-cursor-label {
    font-size: 9px;
  }

  .geo-restoration-row {
    grid-template-columns: minmax(0, 146px) auto minmax(0, 1fr);
    padding: 4px 6px;
  }

  .event-restoration-checklist {
    gap: 6px;
  }

  .event-restoration-checklist .form-check-label {
    font-size: 8px;
  }

  .timeseries-meta-chip {
    min-height: 36px;
    padding: 6px 7px;
    font-size: 8px;
  }

  .geo-playback-chip {
    min-height: 42px;
    padding: 5px 6px;
  }

  .geo-playback-chip-label {
    font-size: 6px;
  }

  .geo-playback-chip-value {
    font-size: 8px;
  }
}

@media (max-width: 1600px) {
  body {
    min-width: var(--layout-fallback-min-width);
    overflow-x: auto;
  }

  .rev2-root,
  .app {
    min-width: var(--layout-fallback-min-width);
  }

  .app {
    width: max(100%, var(--layout-fallback-min-width));
  }

  .main {
    grid-template-columns: var(--sidebar-width-compact) minmax(0, 1fr) var(--context-rail-width-compact);
  }

  .main.main-geo,
  .main.main-help {
    grid-template-columns: var(--sidebar-width-compact) minmax(0, 1fr);
  }

  .rev2-geo-layout {
    grid-template-columns: minmax(0, 1.24fr) minmax(clamp(400px, 31vw, 520px), 0.92fr);
  }

  .sidebar {
    padding: 12px 10px 14px;
  }

  .nav-list {
    gap: 8px;
  }

  .nav-item,
  .station-item {
    grid-template-columns: 24px minmax(0, 1fr) auto;
    align-items: start;
    gap: 6px;
    padding: 7px 8px;
    border-radius: 14px;
  }

  .nav-icon,
  .item-icon {
    width: 24px;
    height: 24px;
    border-radius: 8px;
    font-size: 10px;
  }

  .nav-title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    white-space: normal;
    font-size: 8px;
    line-height: 1.16;
  }

  .nav-subtitle,
  .item-copy span,
  .item-copy strong + span {
    font-size: 6px;
    line-height: 1.2;
  }

  .nav-tag,
  .toggle-pill {
    align-self: start;
    padding: 2px 4px;
    font-size: 6px;
  }

  .geo-screen .screen-desc {
    font-size: 7px;
    line-height: 1.22;
  }

  .geo-screen .btn {
    min-height: 32px;
    padding: 0 8px;
    font-size: 8px;
  }

  .map-search {
    left: 10px;
    top: 10px;
    width: min(212px, calc(100% - 150px));
  }

  .map-aoi-selector-dropdown {
    height: 32px;
    padding: 0 30px 0 10px;
    border-radius: 10px;
    font-size: 10px;
  }

  .basemap-switcher {
    right: 10px;
    top: 10px;
    width: 118px;
  }

  .basemap-switcher .rev2-native-select {
    height: 32px;
    padding: 0 30px 0 10px;
    font-size: 10px;
  }

  .gis-toolbar {
    left: 10px;
    top: 50px;
    gap: 4px;
  }

  .gis-tool {
    width: 30px;
    height: 30px;
    border-radius: 9px !important;
    font-size: 10px !important;
  }

  .gis-tool-fx {
    width: 60px !important;
    min-width: 60px !important;
    height: 30px !important;
    padding: 0 6px !important;
    font-size: 8px !important;
    line-height: 1 !important;
  }

  .gis-tool-wx,
  .gis-tool-draw {
    width: 54px !important;
    min-width: 54px !important;
    height: 30px !important;
    padding: 0 6px !important;
    font-size: 8px !important;
    line-height: 1 !important;
    gap: 2px;
  }

  .rev2-map-shell .overview-weather-card {
    left: 78px;
    top: 38px;
    width: min(108px, calc(100% - 100px));
  }

  .rev2-map-shell .overview-weather-toggle {
    left: 10px;
    top: 214px;
  }

  .rev2-map-shell .geo-map-patch-toggle {
    left: 10px;
    top: 256px;
  }

  .rev2-map-shell .geo-map-metric-toggle {
    left: 10px;
    top: 298px;
  }

  .overview-weather-card {
    padding: 3px;
    gap: 2px;
    border-radius: 10px 0 10px 0;
  }

  .overview-weather-toolbar {
    padding-right: 12px;
  }

  .overview-weather-head {
    grid-template-columns: 17px minmax(0, 1fr);
    gap: 3px;
  }

  .overview-weather-icon {
    width: 17px;
    height: 17px;
    border-radius: 5px;
    font-size: 6px;
  }

  .overview-weather-title,
  .overview-weather-subtitle,
  .overview-weather-confidence,
  .overview-weather-condition {
    font-size: 6px;
  }

  .overview-weather-date,
  .overview-weather-chip-label {
    font-size: 4px;
  }

  .overview-weather-chip {
    padding: 2px 3px;
    border-radius: 5px;
  }

  .overview-weather-chip-value {
    font-size: 5px;
  }

  .overview-weather-close {
    width: 13px;
    min-width: 13px;
    height: 13px;
    font-size: 8px;
  }

  .geo-map-time-chip {
    top: 10px;
    min-width: min(126px, calc(100% - 18px));
    padding: 4px 7px;
    font-size: 7px;
  }

  .geo-map-patch-card {
    top: 42px;
    right: 8px;
    width: min(168px, calc(100% - 16px));
    max-height: min(214px, calc(100% - 84px));
    padding: 5px;
    gap: 3px;
  }

  .geo-map-patch-card-kicker,
  .geo-map-patch-note,
  .geo-map-patch-summary,
  .geo-map-patch-copy {
    font-size: 6px;
    line-height: 1.14;
  }

  .geo-map-patch-card-title {
    font-size: 10px;
  }

  .geo-map-patch-metric {
    font-size: 11px;
  }

  .geo-map-patch-card .badge {
    padding: 2px 5px;
    font-size: 7px;
  }

  .geo-map-patch-feedback {
    padding: 2px 5px;
    font-size: 6px;
  }

  .geo-map-patch-card-close {
    width: 20px;
    height: 20px;
    font-size: 12px;
  }

  .geo-map-patch-card-toolbar {
    gap: 6px;
  }

  .geo-map-metric-legend {
    left: 8px;
    bottom: 8px;
    width: min(144px, calc(100% - 16px));
    padding: 5px 6px;
  }

  .geo-map-metric-legend-title {
    font-size: 7px;
  }

  .geo-map-metric-row {
    grid-template-columns: 9px minmax(0, 1fr);
    gap: 4px;
  }

  .geo-map-metric-swatch {
    width: 7px;
    height: 7px;
    margin-top: 1px;
  }

  .geo-map-metric-label {
    font-size: 6px;
  }

  .geo-map-metric-copy {
    font-size: 5px;
    line-height: 1.12;
  }

  .scenario-layout {
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 12px;
  }

  .scenario-sidebar {
    gap: 10px;
  }

  .scenario-baseline-card {
    min-height: 88px;
    padding: 12px 13px;
    border-radius: 16px;
  }

  .scenario-baseline-title {
    font-size: 20px;
  }

  .scenario-baseline-copy,
  .scenario-inline-help-copy,
  .scenario-inline-help-list {
    font-size: 10px;
    line-height: 1.4;
  }

  .scenario-selector-card,
  .scenario-summary-card,
  .scenario-builder-field,
  .scenario-builder-status-card,
  .scenario-builder-library-card {
    padding: 12px;
    border-radius: 16px;
  }

  #rev2-scenarios-summary-cards.grid-4 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }

  .scenario-current-panel {
    gap: 10px;
  }

  .scenario-current-panel .panel-title,
  .scenario-runtime-title {
    font-size: 13px;
  }

  .scenario-current-panel .panel-subtitle,
  .scenario-runtime-copy {
    font-size: 9px;
    line-height: 1.36;
  }

  .scenario-summary-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .scenario-summary-chip {
    min-height: 62px;
    padding: 8px 9px;
  }

  .scenario-summary-chip-label,
  .scenario-driver-kicker,
  .scenario-summary-kicker,
  .scenario-section-divider::after {
    font-size: 8px;
  }

  .scenario-summary-chip-value {
    font-size: 12px;
    line-height: 1.24;
  }

  .scenario-driver-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .scenario-driver-card,
  .scenario-driver-empty-card {
    padding: 9px 10px;
  }

  .scenario-driver-title,
  .scenario-summary-card .metric-label,
  .scenario-toggle button,
  .scenario-inline-help-title,
  .scenario-field-label {
    font-size: 9px;
    line-height: 1.22;
  }

  .scenario-summary-card .metric-value {
    font-size: 17px;
  }

  .scenario-summary-card .badge {
    padding: 2px 6px;
    font-size: 7px;
  }

  .scenario-summary-card .metric-foot {
    font-size: 7px;
    line-height: 1.22;
  }

  .scenario-driver-detail,
  .scenario-driver-empty,
  .scenario-summary-detail,
  .scenario-field-helper,
  .scenario-kv-row,
  .scenario-action-list,
  .scenario-evidence-item {
    font-size: 9px;
    line-height: 1.38;
  }

  .scenario-display-metrics-bar .sim-ctrl-label,
  .scenario-display-metrics-checklist .form-check-label {
    font-size: 8px;
  }

  .scenario-help-dot {
    width: 18px;
    height: 18px;
    font-size: 8px;
  }

  .scenario-help-dot::after {
    width: 190px;
    bottom: calc(100% + 7px);
    padding: 7px 9px;
    border-radius: 9px;
    font-size: 9px;
    line-height: 1.32;
  }

  .rev2-layer-tooltip .tooltip-inner,
  .hero-badge-tooltip .tooltip-inner,
  .geo-forecast-lenses-tooltip .tooltip-inner,
  .geo-handoff-tooltip .tooltip-inner {
    max-width: 220px;
    padding: 7px 9px;
    border-radius: 9px;
    font-size: 9px;
    line-height: 1.3;
  }

  .hero-badge-tooltip .tooltip-inner strong {
    font-size: 10px;
  }
}

@media (max-width: 1400px) {
  .rev2-geo-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ── Overview map: legend dots ───────────────────────────────────────────── */
.overview-legend-title {
  font-family: var(--title);
  font-size: 12px;
  letter-spacing: 0.4px;
  color: var(--text);
  margin-bottom: 7px;
}

.legend-section {
  margin-bottom: 8px;
}

.legend-section:last-child {
  margin-bottom: 0;
}

.legend-label {
  font-size: 9px;
  color: var(--muted);
  letter-spacing: 0.6px;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.legend-items {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.legend-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text);
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.5);
  display: inline-block;
  flex-shrink: 0;
}

.legend-dot-core  { background: #38d39f; }
.legend-dot-info  { background: #56d6c8; }
.legend-dot-warn  { background: #f5c76c; }
.legend-dot-crit  { background: #ff6f7d; }
.legend-dot-biogeo {
  background: #73bde8;
  border-radius: 3px;
  width: 9px;
  height: 9px;
}

/* ── Close button (shared: station detail + floating alert) ──────────────── */
.panel-close-btn {
  position: absolute;
  top: 7px;
  right: 8px;
  width: 20px;
  height: 20px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s, color 0.12s;
  z-index: 2;
}

.panel-close-btn:hover {
  background: rgba(255, 255, 255, 0.10);
  color: var(--text);
}

/* Floating note needs relative positioning for the close button */
.floating-note {
  position: relative;
}

/* ── Overview: station detail overlay (top-left of map wrapper) ─────────── */
.overview-station-detail {
  position: absolute;
  left: 16px;
  top: 16px;
  width: min(210px, calc(100% - 32px));
  background: rgba(4, 16, 27, 0.94);
  border: 1px solid var(--line);
  border-radius: 14px;
  backdrop-filter: blur(10px);
  padding: 10px 12px 10px 12px;
  display: none;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02), 0 18px 46px rgba(0,0,0,0.26);
  animation: fade 0.18s ease;
}

.detail-title {
  font-family: var(--title);
  font-size: 13px;
  padding-right: 18px;  /* space for the × button */
  color: var(--text);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.detail-sub {
  font-size: 10px;
  color: var(--teal-2);
  margin-bottom: 2px;
}

.detail-period {
  font-size: 9px;
  color: var(--muted);
  margin-bottom: 7px;
  letter-spacing: 0.2px;
}

.detail-var-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 3px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.detail-var-row:last-child {
  border-bottom: none;
}

.detail-var-label {
  font-size: 10px;
  color: var(--muted-strong);
  font-family: var(--mono, monospace);
}

.detail-var-value {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.detail-var-ok      { color: #38d39f; }
.detail-var-crit    { color: #ff6f7d; }
.detail-var-neutral { color: var(--muted); }

.detail-no-data {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}

/* ── Overview: "→ Investigate in Geo Explorer" CTA button ─────────────────── */
.overview-cta-btn {
  margin-top: 9px;
  width: 100%;
  font-size: 10px;
  font-family: var(--body);
  padding: 5px 8px;
  border-radius: 8px;
  background: rgba(86, 214, 200, 0.1);
  border: 1px solid rgba(86, 214, 200, 0.28);
  color: var(--teal);
  text-align: left;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  letter-spacing: 0.2px;
}

.overview-cta-btn:hover {
  background: rgba(86, 214, 200, 0.2);
  border-color: rgba(86, 214, 200, 0.5);
}

/* ═══════════════════════════════════════════════════════════════════════════
   Module screens — shared component styles
   ═══════════════════════════════════════════════════════════════════════════ */

/* grid-3 — used in QA/QC metrics, Report cards, Model cards */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

/* section-spacing — visual gap between stacked grid rows */
.section-spacing {
  margin-top: 16px;
}

/* badge.critical */
.badge.critical {
  border-color: rgba(255, 111, 125, 0.28);
  background: rgba(255, 111, 125, 0.14);
  color: #ffb3bc;
}

/* badge.planned — Models registry */
.badge.planned {
  border-color: rgba(115, 189, 232, 0.22);
  background: rgba(115, 189, 232, 0.10);
  color: #c8ecff;
}

/* chip-row — reused in reports, provenance */
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* ── Source cards ────────────────────────────────────────────────────────── */
.source-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.source-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
}

.source-card h4 {
  margin: 0 0 6px;
  font-size: 14px;
  font-family: var(--title);
  letter-spacing: 0.6px;
}

.source-card p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

/* ── Key-value grid ──────────────────────────────────────────────────────── */
.kv {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
  font-size: 12px;
}

.kv div span:first-child {
  color: var(--muted);
}

/* ── Coverage heatmap ────────────────────────────────────────────────────── */
.heatmap {
  display: grid;
  grid-template-columns: 110px repeat(6, 1fr);
  gap: 8px;
  align-items: center;
  font-size: 12px;
  margin-top: 10px;
}

.heatmap > div {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
}

.header-cell,
.row-label {
  color: var(--muted);
  justify-content: flex-start !important;
  padding-left: 4px;
  background: transparent !important;
  border: none !important;
  min-height: unset !important;
}

.cell-high { background: rgba(56, 211, 159, 0.18); border: 1px solid rgba(56, 211, 159, 0.2); }
.cell-med  { background: rgba(245, 199, 108, 0.14); border: 1px solid rgba(245, 199, 108, 0.18); }
.cell-low  { background: rgba(255, 111, 125, 0.13); border: 1px solid rgba(255, 111, 125, 0.16); }

/* ── Log lists ───────────────────────────────────────────────────────────── */
.log-list {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.log-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
}

.log-item strong {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
}

.log-item p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.log-item.critical-accent { border-left: 3px solid rgba(255, 111, 125, 0.55); }
.log-item.warning-accent  { border-left: 3px solid rgba(245, 199, 108, 0.55); }
.log-item.positive-accent { border-left: 3px solid rgba(56, 211, 159, 0.55); }

/* ── Tables ──────────────────────────────────────────────────────────────── */
.table {
  display: grid;
  gap: 8px;
  font-size: 12px;
  margin-top: 10px;
}

.table-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.02);
}

.table-header {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  font-size: 10px;
  background: transparent;
  border-color: transparent;
}

/* ── Twin State — state-compare ──────────────────────────────────────────── */
.state-compare {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.state-box {
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.state-box strong {
  display: block;
  margin: 6px 0 4px;
  font-size: 14px;
}

/* quick map grid placeholder used in twin / scenario */
.map-grid {
  width: 100%;
  height: 200px;
  border-radius: 12px;
  background: linear-gradient(145deg, #04111e 0%, #071e34 60%, #0a2540 100%);
  margin-bottom: 8px;
}

.twin-map-panel {
  position: relative;
}

/* ── Scenarios ───────────────────────────────────────────────────────────── */
.scenario-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 16px;
  min-width: 0;
}

.scenario-layout > * {
  min-width: 0;
}

.scenario-screen-header {
  margin-bottom: 14px;
  align-items: center;
}

.scenario-screen-header .screen-title {
  margin-bottom: 0;
}

.scenario-display-metrics-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0 2px;
  flex-wrap: wrap;
}
.scenario-display-metrics-bar .sim-ctrl-label {
  font-size: 9px;
  white-space: nowrap;
}
.scenario-display-metrics-checklist {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.scenario-display-metrics-checklist .form-check {
  padding-left: 18px;
  min-height: auto;
  margin-bottom: 0;
}
.scenario-display-metrics-checklist .form-check-label {
  font-size: 9px;
  color: var(--text);
  line-height: 1.3;
}
.scenario-display-metrics-checklist .form-check-input {
  width: 11px;
  height: 11px;
  margin-top: 1px;
}
.scenario-display-metrics-bar .overview-weather-subtitle {
  font-size: 7px;
  color: var(--muted);
  margin: 0;
}

.scenario-sidebar {
  display: grid;
  align-content: start;
  gap: 12px;
  min-width: 0;
}

.scenario-baseline-card {
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 8px;
  min-height: 112px;
  padding: 16px 18px;
  border: 1px solid rgba(115, 189, 232, 0.16);
  border-radius: 18px;
  background:
    radial-gradient(circle at top left, rgba(115, 189, 232, 0.10), transparent 42%),
    linear-gradient(180deg, rgba(12, 33, 51, 0.94), rgba(7, 20, 34, 0.98));
  box-shadow: var(--shadow);
  cursor: pointer;
  text-align: left;
  transition:
    border-color 0.18s ease,
    transform 0.18s ease,
    background 0.18s ease;
}

.scenario-baseline-card:hover,
.scenario-baseline-card.active {
  border-color: rgba(115, 189, 232, 0.34);
  background:
    radial-gradient(circle at top left, rgba(86, 214, 200, 0.12), transparent 42%),
    linear-gradient(180deg, rgba(14, 38, 58, 0.96), rgba(8, 23, 38, 1));
  transform: translateY(-1px);
}

.scenario-baseline-title {
  font-family: var(--title);
  font-size: 26px;
  line-height: 1;
  letter-spacing: 0.8px;
  color: var(--text);
}

.scenario-baseline-copy {
  color: var(--muted-strong);
  font-size: 12px;
  line-height: 1.5;
}

.scenario-selector-card {
  padding: 16px;
  display: grid;
  gap: 10px;
}

.scenario-selector-select {
  width: 100%;
  min-width: 0;
}

.scenario-inline-help {
  margin-top: 10px;
  padding: 12px 14px;
  border: 1px solid rgba(86, 214, 200, 0.16);
  border-radius: 12px;
  background: rgba(8, 22, 37, 0.72);
  display: grid;
  gap: 8px;
}

.scenario-inline-help.is-hidden {
  display: none;
}

.scenario-inline-help-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
}

.scenario-inline-help-copy {
  font-size: 12px;
  line-height: 1.55;
  color: var(--muted-strong);
}

.scenario-inline-help-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted-strong);
  font-size: 12px;
  line-height: 1.6;
}

.scenario-summary-chip-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.scenario-chip-help-button {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid rgba(86, 214, 200, 0.28);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.scenario-chip-help-button:hover {
  background: rgba(86, 214, 200, 0.12);
  border-color: rgba(86, 214, 200, 0.42);
}

.scenario-help-modal .modal-content {
  background: linear-gradient(180deg, rgba(7, 22, 36, 0.99), rgba(4, 14, 26, 0.99));
  border: 1px solid rgba(86, 214, 200, 0.22);
  color: var(--text);
}

.scenario-help-modal .modal-header,
.scenario-help-modal .modal-footer {
  border-color: rgba(255, 255, 255, 0.08);
}

.scenario-help-modal .btn-close {
  filter: invert(1) opacity(0.8);
}

.preset-list {
  display: grid;
  gap: 10px;
}

.preset {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.preset strong {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
}

.preset p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.preset.active,
.preset:hover {
  border-color: var(--line-strong);
  background: rgba(86, 214, 200, 0.08);
}

.scenario-summary-card {
  padding: 14px;
  display: grid;
  gap: 6px;
  align-content: start;
}

.scenario-current-panel {
  display: grid;
  gap: 12px;
}

.scenario-current-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.scenario-current-copy {
  display: grid;
  gap: 6px;
  align-content: start;
  min-width: 0;
}

.scenario-current-panel .panel-title {
  margin-bottom: 2px;
  font-size: 16px;
}

.scenario-current-panel .panel-subtitle {
  margin-bottom: 0;
  max-width: 920px;
  font-size: 11px;
  line-height: 1.45;
  color: rgba(220, 236, 243, 0.78);
}

.scenario-parameter-summary {
  display: grid;
  gap: 12px;
  min-width: 0;
  width: 100%;
}

.scenario-summary-meta-wrap {
  position: relative;
  width: 100%;
}

.scenario-summary-meta {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
}

.scenario-summary-chip {
  display: grid;
  gap: 4px;
  align-content: start;
  min-height: 76px;
  padding: 11px 13px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.scenario-summary-chip-label {
  font-family: var(--title);
  font-size: 10px;
  letter-spacing: 1.3px;
  text-transform: uppercase;
  color: rgba(220, 236, 243, 0.72);
}

.scenario-summary-chip-label.metric-label-tip {
  border-bottom-color: rgba(220, 236, 243, 0.34);
}

.scenario-summary-chip-value {
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.32;
  word-break: break-word;
}

.scenario-summary-chip.is-id {
  border-color: rgba(115, 189, 232, 0.22);
  background: linear-gradient(180deg, rgba(24, 55, 81, 0.5), rgba(255, 255, 255, 0.03));
}

.scenario-summary-chip.is-id .scenario-summary-chip-value {
  color: #c8ecff;
}

.scenario-summary-chip.is-horizon {
  border-color: rgba(86, 214, 200, 0.2);
  background: linear-gradient(180deg, rgba(15, 57, 54, 0.46), rgba(255, 255, 255, 0.03));
}

.scenario-summary-chip.is-horizon .scenario-summary-chip-value {
  color: var(--teal-2);
}

.scenario-summary-chip.is-support {
  border-color: rgba(56, 211, 159, 0.22);
  background: linear-gradient(180deg, rgba(20, 63, 49, 0.46), rgba(255, 255, 255, 0.03));
}

.scenario-summary-chip.is-support .scenario-summary-chip-value {
  color: #b9ffe4;
}

.scenario-summary-chip.is-risk {
  border-color: rgba(255, 155, 104, 0.24);
  background: linear-gradient(180deg, rgba(66, 39, 20, 0.5), rgba(255, 255, 255, 0.03));
}

.scenario-summary-chip.is-risk .scenario-summary-chip-value {
  color: #ffd6c3;
}

.scenario-summary-chip.is-patches {
  border-color: rgba(127, 137, 255, 0.24);
  background: linear-gradient(180deg, rgba(39, 45, 88, 0.5), rgba(255, 255, 255, 0.03));
}

.scenario-summary-chip.is-patches .scenario-summary-chip-value {
  color: #d4d8ff;
}

.scenario-driver-section {
  display: grid;
  gap: 10px;
  width: 100%;
}

.scenario-driver-section-title {
  font-family: var(--title);
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(220, 236, 243, 0.72);
}

.scenario-driver-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.scenario-driver-card,
.scenario-driver-empty-card {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(86, 214, 200, 0.12);
  background:
    radial-gradient(circle at top right, rgba(86, 214, 200, 0.07), transparent 34%),
    rgba(255, 255, 255, 0.028);
}

.scenario-driver-kicker {
  font-family: var(--title);
  font-size: 10px;
  letter-spacing: 1.3px;
  text-transform: uppercase;
  color: var(--teal-2);
}

.scenario-driver-title {
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}

.scenario-driver-detail,
.scenario-driver-empty {
  color: var(--muted-strong);
  font-size: 11px;
  line-height: 1.45;
}

.scenario-section-divider {
  position: relative;
  height: 18px;
  margin: 2px 0 4px;
}

.scenario-section-divider::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: linear-gradient(
    90deg,
    rgba(86, 214, 200, 0),
    rgba(86, 214, 200, 0.24) 12%,
    rgba(115, 189, 232, 0.18) 50%,
    rgba(86, 214, 200, 0.24) 88%,
    rgba(86, 214, 200, 0)
  );
  transform: translateY(-50%);
}

.scenario-section-divider::after {
  content: "Scenario response";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  padding: 0 12px;
  font-family: var(--title);
  font-size: 10px;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: rgba(220, 236, 243, 0.62);
  background: #071828;
}

.scenario-summary-card .metric-head {
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.scenario-summary-card .metric-label {
  text-transform: none;
  letter-spacing: 0.2px;
  line-height: 1.35;
  font-size: 12px;
  max-width: none;
  flex: 1 1 124px;
  min-width: 0;
}

.scenario-summary-card .badge {
  margin-left: auto;
  align-self: flex-start;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 10px;
  line-height: 1.05;
  white-space: nowrap;
}

.scenario-summary-card .metric-value {
  margin-top: 2px;
  line-height: 0.98;
  overflow-wrap: anywhere;
}

.scenario-summary-kicker {
  margin-top: 6px;
  font-family: var(--title);
  font-size: 10px;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  color: rgba(220, 236, 243, 0.56);
}

.scenario-summary-detail {
  margin-top: 2px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.scenario-toggle {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.scenario-toggle button {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  padding: 8px 12px;
  border-radius: 12px;
  cursor: pointer;
  font-family: var(--body);
  font-size: 12px;
}

.scenario-toggle button.active {
  border-color: rgba(245, 199, 108, 0.3);
  background: rgba(245, 199, 108, 0.1);
  color: var(--amber);
}

.scenario-main-grid,
.stack-col {
  display: grid;
  gap: 16px;
}

.scenario-loading-wrap {
  min-height: 120px;
}

.scenario-runtime-banner {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(245, 199, 108, 0.24);
  background: rgba(9, 27, 45, 0.92);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.16);
}

.scenario-runtime-banner.is-hidden {
  display: none;
}

.scenario-runtime-banner.is-warning {
  border-color: rgba(245, 199, 108, 0.28);
  background:
    linear-gradient(180deg, rgba(52, 39, 16, 0.64), rgba(9, 27, 45, 0.92)),
    rgba(9, 27, 45, 0.92);
}

.scenario-runtime-banner.is-error {
  border-color: rgba(255, 111, 125, 0.32);
  background:
    linear-gradient(180deg, rgba(66, 22, 31, 0.72), rgba(9, 27, 45, 0.94)),
    rgba(9, 27, 45, 0.94);
}

.scenario-runtime-title {
  font-family: var(--title);
  font-size: 16px;
  letter-spacing: 0.5px;
  color: var(--text);
}

.scenario-runtime-copy {
  color: var(--muted-strong);
  font-size: 12px;
  line-height: 1.5;
}

.scenario-patch-list {
  max-height: 360px;
  overflow: auto;
}

.scenario-kv {
  display: grid;
  gap: 10px;
}

.scenario-kv-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
}

.scenario-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.scenario-evidence-list {
  display: grid;
  gap: 10px;
}

.scenario-evidence-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
}

.scenario-kv-row-block {
  align-items: flex-start;
}

.scenario-action-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted-strong);
  line-height: 1.5;
}

.scenario-builder-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(115, 189, 232, 0.14);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(11, 28, 45, 0.92), rgba(8, 22, 36, 0.96));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.scenario-builder-summary {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.scenario-builder-status {
  display: grid;
  gap: 8px;
}

.scenario-builder-status-card,
.scenario-builder-library-card {
  padding: 20px;
  border: 1px solid rgba(86, 214, 200, 0.14);
  border-radius: 20px;
  background:
    radial-gradient(circle at top right, rgba(86, 214, 200, 0.10), transparent 42%),
    linear-gradient(180deg, rgba(12, 32, 50, 0.94), rgba(8, 22, 36, 0.97));
  box-shadow:
    0 18px 40px rgba(1, 7, 14, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.scenario-builder-section-title {
  margin-bottom: 8px;
}

.scenario-builder-field {
  display: grid;
  gap: 14px;
  padding: 20px;
  border: 1px solid rgba(115, 189, 232, 0.16);
  border-radius: 20px;
  background:
    radial-gradient(circle at top right, rgba(115, 189, 232, 0.08), transparent 36%),
    linear-gradient(180deg, rgba(10, 30, 49, 0.94), rgba(8, 22, 37, 0.98));
  box-shadow:
    0 18px 38px rgba(1, 7, 14, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
  transition:
    border-color 0.18s ease,
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.scenario-builder-field-label,
.scenario-builder-field-horizon {
  min-height: 164px;
  align-content: start;
}

.scenario-builder-field:hover {
  border-color: rgba(115, 189, 232, 0.26);
  transform: translateY(-1px);
  box-shadow:
    0 20px 44px rgba(1, 7, 14, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.scenario-field-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.scenario-field-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.24px;
  text-transform: uppercase;
}

.scenario-help-dot {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(115, 189, 232, 0.22);
  background: rgba(115, 189, 232, 0.10);
  color: #c8ecff;
  font-size: 10px;
  font-weight: 700;
  cursor: help;
  flex: 0 0 auto;
  position: relative;
}

.scenario-help-dot::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%);
  width: 240px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(115, 189, 232, 0.22);
  background: rgba(9, 27, 45, 0.96);
  color: var(--text);
  font-size: 11px;
  line-height: 1.45;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.28);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease;
  z-index: 20;
}

.scenario-help-dot:hover::after,
.scenario-help-dot:focus-visible::after {
  opacity: 1;
}

.scenario-field-helper {
  font-size: 11px;
  line-height: 1.55;
  color: var(--muted);
}

.scenario-field-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.scenario-field-meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px solid rgba(235, 247, 251, 0.10);
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted-strong);
  font-size: 10px;
}

.scenario-field-meta-label {
  color: var(--muted);
}

.scenario-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(3, 10, 18, 0.72);
  backdrop-filter: blur(8px);
  z-index: 1200;
}

.scenario-modal.is-hidden {
  display: none;
}

.scenario-modal-card {
  width: min(1180px, calc(100vw - 40px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  min-width: 0;
  padding: 26px;
  border-radius: 24px;
  border: 1px solid rgba(115, 189, 232, 0.16);
  background:
    radial-gradient(circle at top left, rgba(115, 189, 232, 0.08), transparent 26%),
    linear-gradient(180deg, rgba(7, 22, 35, 0.98), rgba(5, 16, 28, 0.99));
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
  scrollbar-gutter: stable;
}

.scenario-form-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
  margin-top: 14px;
}

.scenario-form-grid-2 {
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.85fr);
}

.scenario-form-grid-top {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  margin-top: 22px;
}

.scenario-form-grid-top .scenario-builder-field {
  min-width: 0;
  width: 100%;
}

.scenario-form-grid-stress {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 18px;
}

.scenario-input {
  width: 100%;
  min-width: 0;
  min-height: 54px;
  border-radius: 14px;
  border: 1px solid rgba(115, 189, 232, 0.18);
  background: linear-gradient(180deg, rgba(27, 48, 67, 0.78), rgba(19, 35, 51, 0.82));
  color: var(--text);
  padding: 14px 16px;
  font-family: var(--body);
  font-size: 14px;
  line-height: 1.35;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.scenario-input::placeholder {
  color: rgba(214, 233, 241, 0.42);
}

.scenario-input:focus {
  outline: none;
  border-color: rgba(115, 189, 232, 0.38);
  box-shadow:
    0 0 0 3px rgba(115, 189, 232, 0.10),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.scenario-builder-lower {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 20px;
  margin-top: 24px;
}

.scenario-library-feedback {
  min-height: 18px;
  margin-top: 10px;
  color: var(--muted-strong);
  font-size: 11px;
  line-height: 1.45;
}

.scenario-library-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  max-height: 320px;
  overflow: auto;
}

.scenario-library-empty,
.scenario-library-item {
  border: 1px solid rgba(115, 189, 232, 0.14);
  border-radius: 18px;
  padding: 15px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.03));
}

.scenario-library-empty {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.scenario-library-item {
  display: grid;
  gap: 12px;
}

.scenario-library-item-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.scenario-library-item-title {
  margin: 0;
  font-size: 13px;
  color: var(--text);
}

.scenario-library-item-time {
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
}

.scenario-library-item-copy {
  color: var(--muted-strong);
  font-size: 11px;
  line-height: 1.45;
}

.scenario-library-item-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn.scenario-library-btn {
  padding: 7px 10px;
  font-size: 11px;
}

.scenario-draft-status {
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(115, 189, 232, 0.16);
  background: rgba(255, 255, 255, 0.03);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.scenario-draft-status.is-valid {
  border-color: rgba(56, 211, 159, 0.22);
  background: rgba(56, 211, 159, 0.08);
}

.scenario-draft-status.is-invalid {
  border-color: rgba(245, 199, 108, 0.22);
  background: rgba(245, 199, 108, 0.08);
}

.scenario-draft-status-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.scenario-draft-status-copy {
  margin-top: 4px;
  color: var(--muted-strong);
  font-size: 11px;
  line-height: 1.5;
}

.scenario-stepper {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 46px;
  align-items: stretch;
  gap: 10px;
}

.scenario-stepper-btn {
  min-height: 56px;
  border: 1px solid rgba(115, 189, 232, 0.20);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(25, 48, 69, 0.96), rgba(14, 32, 50, 0.96));
  color: #e7f7ff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 10px 20px rgba(1, 7, 14, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition:
    border-color 0.16s ease,
    transform 0.16s ease,
    box-shadow 0.16s ease;
}

.scenario-stepper-btn:hover {
  border-color: rgba(115, 189, 232, 0.34);
  background: linear-gradient(180deg, rgba(32, 60, 85, 0.98), rgba(17, 39, 60, 0.98));
  transform: translateY(-1px);
  box-shadow:
    0 12px 24px rgba(1, 7, 14, 0.20),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.scenario-stepper-input {
  width: 100%;
  min-width: 0;
  min-height: 56px;
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.2px;
  padding: 10px 8px;
  border-color: rgba(115, 189, 232, 0.22);
  background:
    linear-gradient(180deg, rgba(35, 58, 79, 0.96), rgba(23, 42, 61, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    inset 0 -10px 18px rgba(6, 14, 24, 0.16);
}

.scenario-label-input {
  min-height: 60px;
  font-size: 14px;
}

.scenario-payload-details {
  margin-top: 18px;
  border: 1px solid rgba(115, 189, 232, 0.14);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.02);
}

.scenario-payload-summary {
  padding: 14px 16px;
  cursor: pointer;
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 700;
}

.scenario-builder-actions {
  position: sticky;
  bottom: 0;
  margin-top: 22px;
  padding-top: 16px;
  padding-bottom: 4px;
  justify-content: flex-end;
  border-top: 1px solid rgba(115, 189, 232, 0.12);
  background: linear-gradient(180deg, rgba(5, 16, 28, 0), rgba(5, 16, 28, 0.98) 28%);
  min-width: 0;
}

.scenario-json-preview {
  margin: 0;
  padding: 14px;
  border-top: 1px solid rgba(115, 189, 232, 0.12);
  border-radius: 0 0 16px 16px;
  background: rgba(255, 255, 255, 0.02);
  color: #c8ecff;
  font-size: 11px;
  line-height: 1.45;
  overflow: auto;
}

@media (max-width: 1100px) {
  .scenario-form-grid-stress {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .scenario-modal {
    padding: 18px;
  }

  .scenario-modal-card {
    padding: 22px;
  }

  .scenario-layout {
    grid-template-columns: 1fr;
  }

  .scenario-sidebar {
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
  }

  .scenario-builder-cta {
    flex-direction: column;
    align-items: stretch;
  }

  .scenario-builder-lower {
    grid-template-columns: 1fr;
  }

  .scenario-form-grid-2 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .scenario-modal {
    padding: 10px;
  }

  .scenario-modal-card {
    width: min(100vw - 20px, 100%);
    max-height: calc(100vh - 20px);
    padding: 16px;
    border-radius: 18px;
  }

  .scenario-form-grid-stress,
  .scenario-detail-grid {
    grid-template-columns: 1fr;
  }

  .scenario-sidebar {
    grid-template-columns: 1fr;
  }

  .scenario-baseline-title {
    font-size: 22px;
  }

  .scenario-library-item-head,
  .scenario-builder-actions,
  .scenario-library-item-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .scenario-stepper {
    grid-template-columns: 48px minmax(80px, 1fr) 48px;
  }
}

.geo-context-banner {
  position: absolute;
  left: 16px;
  bottom: 16px;
  max-width: 420px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(245, 199, 108, 0.24);
  background: rgba(9, 27, 45, 0.92);
  color: var(--text);
  font-size: 11px;
  line-height: 1.4;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
  z-index: 420;
}

.geo-handoff-banner {
  display: block;
  margin-top: 10px;
  margin-bottom: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(245, 199, 108, 0.24);
  background:
    linear-gradient(180deg, rgba(245, 199, 108, 0.08), rgba(86, 214, 200, 0.04)),
    rgba(9, 27, 45, 0.94);
  color: var(--text);
  font-size: 11px;
  line-height: 1.4;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}

.geo-handoff-banner.is-hidden {
  display: none;
}

.geo-handoff-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.geo-handoff-field-wrap {
  min-width: 0;
}

.geo-handoff-field {
  display: grid;
  gap: 4px;
  min-height: 62px;
  padding: 9px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  cursor: help;
}

.geo-handoff-field-label {
  color: var(--muted);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.geo-handoff-field-value {
  color: var(--text);
  font-size: 12px;
  line-height: 1.35;
  font-weight: 600;
  word-break: break-word;
}

.geo-handoff-tooltip .tooltip-inner {
  max-width: 280px;
  padding: 10px 12px;
  background: linear-gradient(180deg, rgba(7, 22, 36, 0.99), rgba(4, 14, 26, 0.99));
  border: 1px solid rgba(86, 214, 200, 0.22);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.32);
  color: var(--text);
  font-size: 11px;
  line-height: 1.45;
  text-align: left;
}

.geo-handoff-tooltip.bs-tooltip-bottom .tooltip-arrow::before {
  border-bottom-color: rgba(86, 214, 200, 0.22);
}

.geo-handoff-copy {
  color: var(--muted-strong);
  font-size: 11px;
  line-height: 1.45;
  padding-top: 2px;
}

.metric-value-positive {
  color: var(--mint);
}

.metric-value-negative {
  color: var(--red);
}

.metric-value-neutral {
  color: var(--text);
}

/* ── Alerts — timeline ───────────────────────────────────────────────────── */
.timeline {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
}

.timeline-item time {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
}

.timeline-item strong {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
}

.timeline-item p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

/* ── Reports ─────────────────────────────────────────────────────────────── */
.report-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
}

.report-card h4 {
  margin: 8px 0 6px;
  font-size: 14px;
  font-family: var(--title);
  letter-spacing: 0.6px;
}

.report-card p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.report-meta {
  display: flex;
  gap: 12px;
  font-size: 11px;
  color: var(--muted);
}

/* ── Provenance — lineage flow ───────────────────────────────────────────── */
.flow {
  display: grid;
  grid-template-columns: repeat(11, minmax(0, 1fr));
  gap: 6px;
  align-items: center;
  margin-top: 12px;
}

.flow-step {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 8px;
  text-align: center;
  background: rgba(255, 255, 255, 0.03);
}

.flow-step strong {
  display: block;
  font-size: 12px;
  margin-bottom: 3px;
}

.flow-step span {
  font-size: 10px;
  color: var(--muted);
}

.flow-arrow {
  text-align: center;
  color: var(--muted);
  font-size: 16px;
}

/* ── Models ──────────────────────────────────────────────────────────────── */
.model-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
}

.model-card h4 {
  margin: 8px 0 6px;
  font-size: 14px;
  font-family: var(--title);
  letter-spacing: 0.6px;
}

.model-card p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

/* ── ML Lab — experiment cards ───────────────────────────────────────────── */
.experiment-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
}

.experiment-card h4 {
  margin: 0 0 6px;
  font-size: 14px;
  font-family: var(--title);
  letter-spacing: 0.6px;
}

.experiment-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

/* ── mini-chart SVG wrapper ──────────────────────────────────────────────── */
.mini-chart {
  position: relative;
  min-height: 190px;
}

.mini-chart svg {
  width: 100%;
  height: 180px;
  display: block;
}

/* Decorative mock chart placeholder for screens without real data wiring */
.mini-chart-placeholder {
  width: 100%;
  height: 180px;
  border-radius: 10px;
  background:
    linear-gradient(180deg, transparent 39px, rgba(255,255,255,0.04) 39px, rgba(255,255,255,0.04) 40px, transparent 40px),
    linear-gradient(180deg, transparent 89px, rgba(255,255,255,0.04) 89px, rgba(255,255,255,0.04) 90px, transparent 90px),
    linear-gradient(180deg, transparent 139px, rgba(255,255,255,0.04) 139px, rgba(255,255,255,0.04) 140px, transparent 140px),
    linear-gradient(145deg, #04111e 0%, #071e34 60%, #0a2540 100%);
  position: relative;
  overflow: hidden;
}

.mini-chart-placeholder::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right,
      transparent 0%,
      rgba(86, 214, 200, 0.45) 18%,
      rgba(86, 214, 200, 0.55) 35%,
      rgba(86, 214, 200, 0.38) 55%,
      rgba(86, 214, 200, 0.52) 72%,
      rgba(86, 214, 200, 0.60) 88%,
      transparent 100%
    );
  clip-path: polygon(
    0% 60%, 18% 45%, 35% 50%, 55% 42%, 72% 56%, 88% 38%, 100% 44%,
    100% 100%, 0% 100%
  );
  opacity: 0.35;
}

.mini-chart-placeholder::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 3px;
  background: linear-gradient(to right,
    #56d6c8 0%, #73bde8 35%, #56d6c8 55%, #73bde8 72%, #56d6c8 88%, #73bde8 100%
  );
  top: calc(55% - 1px);
  border-radius: 2px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Overview screen — new components (trust bar, hero cards, value cards,
   action cards, section label, risk/action badges)
   ═══════════════════════════════════════════════════════════════════════════ */

.overview-section-label {
  font-size: 11px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--muted);
  padding: 4px 0 8px;
  border-top: 1px solid var(--line);
}

/* ── Trust bar ──────────────────────────────────────────────────────────── */
.overview-trust-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
  align-items: center;
}

.trust-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 11px;
  background: rgba(255, 255, 255, 0.03);
}

.trust-pill-label {
  color: var(--muted);
}

.trust-pill-value {
  color: var(--text);
  font-weight: 600;
}

.trust-pill-alert .trust-pill-value {
  color: var(--amber);
}

/* ── Hero cards ─────────────────────────────────────────────────────────── */
.overview-hero-row {
  margin-bottom: 12px;
}

.overview-hero-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hero-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hero-card-label {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.hero-value {
  font-size: 42px;
  font-family: var(--title);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 1px;
  color: var(--text);
}

.hero-body {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
  flex: 1;
}

.hero-footer {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.hero-footer-pill {
  padding: 3px 9px;
  border-radius: 10px;
  font-size: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted-strong);
}

/* ── Value cards ────────────────────────────────────────────────────────── */
.overview-value-card {
  display: flex;
  flex-direction: column;
}

.value-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.value-card-label {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.value-card-value {
  font-family: var(--title);
  font-size: 26px;
  font-weight: 700;
  margin: 4px 0;
}

.value-card-note {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.4;
  flex: 1;
}

.value-card-footer {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid var(--line);
}

/* ── Action cards ───────────────────────────────────────────────────────── */
.overview-action-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.action-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.action-card-label {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.action-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 5px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 12px;
}

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

.action-row-key {
  color: var(--muted);
  font-size: 11px;
}

.action-row-value {
  font-weight: 600;
  font-size: 12px;
}

/* ── Badge variants ─────────────────────────────────────────────────────── */

/* High-risk indicator (red-amber tones) */
.badge.risk {
  border-color: rgba(255, 111, 125, 0.28);
  background: rgba(255, 111, 125, 0.10);
  color: #ffb3bc;
}

/* Recommended action / positive intervention (teal-green tones) */
.badge.action {
  border-color: rgba(56, 211, 159, 0.28);
  background: rgba(56, 211, 159, 0.10);
  color: #b9ffe4;
}

/* ── Indicator dropdown selector (chart panel) ───────────────────────────── */
.overview-indicator-select {
  width: 100%;
  margin-bottom: 4px;
}

/* ── Spatial Situation: map panel header + focus controls ────────────────── */
.overview-map-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.overview-map-header .panel-title {
  margin-bottom: 0;
  flex-shrink: 0;
}

.overview-map-controls {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  flex-shrink: 0;
}

/* Compact version of the native select for the map focus dropdown */
.overview-map-focus-select {
  min-width: 220px !important;
  max-width: 220px !important;
  height: 34px !important;
  padding: 0 34px 0 11px !important;
  font-size: 11.5px !important;
  border-radius: 10px !important;
}

/* Link-with-chart toggle (dcc.Checklist styled as a pill toggle) */
.overview-map-link-toggle {
  display: flex;
  align-items: center;
}

.overview-map-link-toggle .form-check {
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 7px;
}

.overview-map-link-toggle .form-check-input {
  width: 14px !important;
  height: 14px !important;
  flex-shrink: 0;
  background-color: rgba(255, 255, 255, 0.06) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.30) !important;
  border-radius: 3px !important;
  cursor: pointer;
  appearance: none !important;
  -webkit-appearance: none !important;
  transition: background 0.15s, border-color 0.15s;
  box-shadow: none !important;
}

.overview-map-link-toggle .form-check-input:checked {
  background-color: var(--teal) !important;
  border-color: var(--teal) !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M2 5l2.5 2.5L8 3' stroke='%23081625' stroke-width='1.8' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
  background-size: 10px !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
}

.overview-map-link-toggle .form-check-input:focus {
  box-shadow: none !important;
  border-color: rgba(255, 255, 255, 0.45) !important;
}

.overview-map-link-toggle .form-check-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text) !important;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  opacity: 0.82;
}

/* ── Spatial summary chips ───────────────────────────────────────────────── */
.spatial-chips-row {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
}

.spatial-chip {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 5px 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 8px;
  flex: 1;
  min-width: 0;
}

.spatial-chip-label {
  font-size: 9px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0.7;
  white-space: nowrap;
}

.spatial-chip-value {
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Dynamic legend note line ────────────────────────────────────────────── */
.legend-note {
  font-size: 9px;
  color: var(--muted);
  opacity: 0.6;
  margin-top: 4px;
  letter-spacing: 0.03em;
}

/* ── Hero badge tooltips ────────────────────────────────────────────── */

.hero-badge-tooltip .tooltip-inner {
  max-width: 320px;
  padding: 12px 14px;
  background: linear-gradient(180deg, rgba(7, 22, 36, 0.99), rgba(4, 14, 26, 0.99));
  border: 1px solid rgba(86, 214, 200, 0.22);
  border-radius: 14px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.42);
  color: var(--text);
  font-family: var(--body);
  font-size: 12px;
  line-height: 1.55;
  text-align: left;
}

.hero-badge-tooltip .tooltip-inner strong {
  color: var(--teal-2);
  font-size: 13px;
}

.hero-badge-tooltip .tooltip-inner .hero-badge-tooltip-row {
  margin-top: 4px;
}

.hero-badge-tooltip.bs-tooltip-bottom .tooltip-arrow::before {
  border-bottom-color: rgba(86, 214, 200, 0.22);
}

.hero-badge-tooltip.bs-tooltip-top .tooltip-arrow::before {
  border-top-color: rgba(86, 214, 200, 0.22);
}

.metric-label-tip {
  cursor: help;
  border-bottom: 1px dashed rgba(86, 214, 200, 0.4);
}

.hero-card-label-tip {
  cursor: help;
  border-bottom: 1px dashed rgba(86, 214, 200, 0.4);
}

/* ── Simulation controls ─────────────────────────────────────────────────── */

.sim-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  border-radius: 6px;
  margin-bottom: 10px;
}

.sim-ctrl-row {
  display: flex;
  align-items: center;
  gap: var(--panel-gap);
  flex-wrap: wrap;
}

.sim-ctrl-label {
  font-size: clamp(9px, 0.62vw, 10px);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  min-width: 0;
}

.sim-drivers-checklist .form-check {
  margin-right: 6px;
}

.sim-drivers-checklist .form-check-label {
  font-size: 11px;
  color: var(--text);
  font-family: var(--mono, monospace);
}

.sim-drivers-checklist .form-check-input:checked {
  background-color: var(--teal);
  border-color: var(--teal);
}

.sim-play-btn {
  font-size: clamp(10px, 0.72vw, 11px);
  font-family: var(--mono, monospace);
  padding: 0 clamp(12px, 0.9vw, 14px);
  height: clamp(38px, 2.2vw, 44px);
  border: 1px solid var(--teal);
  color: var(--teal);
  background: transparent;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}

.sim-play-btn:hover {
  background: rgba(86, 214, 200, 0.12);
}

.sim-speed-select {
  height: clamp(38px, 2.2vw, 44px) !important;
  font-size: clamp(10px, 0.72vw, 11px) !important;
  padding: 0 clamp(32px, 1.9vw, 38px) 0 clamp(10px, 0.8vw, 12px) !important;
  min-width: clamp(160px, 12vw, 200px);
  max-width: 100%;
}

.sim-cursor-label {
  font-family: var(--mono, monospace);
  font-size: clamp(11px, 0.78vw, 12px);
  color: #f5c76c;
  letter-spacing: 0.04em;
  opacity: 0.9;
}

.geo-playback-card {
  display: grid;
  gap: var(--panel-gap);
  align-content: start;
  min-width: 0;
  container-type: inline-size;
}

.geo-playback-lens-select {
  width: 100%;
}

.geo-forecast-lenses-tooltip .tooltip-inner {
  max-width: 420px;
}

.geo-forecast-lenses-tooltip .tooltip-inner,
.geo-handoff-tooltip .tooltip-inner {
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 11px;
  line-height: 1.45;
}

.geo-forecast-lenses-tooltip.is-available .tooltip-inner {
  border-color: rgba(86, 214, 200, 0.22);
}

.geo-forecast-lenses-tooltip.is-warning .tooltip-inner {
  border-color: rgba(245, 199, 108, 0.28);
}

.geo-playback-toolbar {
  display: grid;
  grid-template-columns: auto minmax(170px, 220px) minmax(0, 1fr);
  align-items: center;
  justify-content: initial;
  gap: var(--panel-gap);
}

.geo-playback-toolbar > * {
  min-width: 0;
}

.geo-playback-toolbar .sim-play-btn {
  width: max-content;
}

.geo-playback-toolbar .sim-speed-select {
  width: 100%;
}

.geo-playback-toolbar .sim-cursor-label {
  justify-self: end;
  text-align: right;
}

.geo-playback-window {
  display: grid;
  gap: clamp(6px, 0.45vw, 8px);
}

.geo-playback-control-block {
  display: grid;
  gap: clamp(6px, 0.45vw, 8px);
}

.geo-playback-zoom-block {
  margin-top: -2px;
}

.geo-playback-cursor-block {
  margin-top: 2px;
}

.geo-playback-radius-block {
  margin-top: -1px;
}

.geo-playback-control-label {
  margin-bottom: 0;
}

.geo-playback-window-label {
  margin-bottom: 0;
}

.geo-playback-date-range {
  margin-bottom: 2px;
}

.geo-playback-window-drawer {
  margin-top: 2px;
}

.geo-playback-date-range-display {
  pointer-events: none;
}

.rev2-date-input-display {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono, monospace);
  letter-spacing: 0.02em;
}

.geo-playback-zoom-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.geo-playback-control-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.geo-playback-zoom-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.geo-playback-zoom-slider-row {
  margin-top: 2px;
}

.geo-sim-slider {
  margin: 0 4px 4px;
  padding: 6px 0 4px;
}

.geo-sim-slider .slider-input-container,
.geo-sim-slider .slider-min-input,
.geo-sim-slider .slider-max-input,
.geo-sim-slider input {
  display: none !important;
}

.geo-sim-slider .slider-track {
  background: rgba(255, 255, 255, 0.10) !important;
  height: 4px !important;
  border-radius: 999px !important;
}

.geo-sim-slider .slider-range {
  background: linear-gradient(90deg, rgba(86, 214, 200, 0.70), rgba(115, 189, 232, 0.92)) !important;
  height: 4px !important;
  border-radius: 999px !important;
}

.geo-sim-slider .slider-thumb {
  width: 16px !important;
  height: 16px !important;
  border-radius: 50% !important;
  background-color: #081625 !important;
  background-image: none !important;
  border: 2px solid #56d6c8 !important;
  box-shadow: 0 0 0 3px rgba(86, 214, 200, 0.18) !important;
  opacity: 1 !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
}

.geo-sim-slider .slider-tooltip {
  display: none !important;
}

.geo-playback-chart-shell {
  position: relative;
  isolation: isolate;
  min-width: 0;
}

.geo-playback-fallback-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: var(--geo-playback-chart-height);
  object-fit: fill;
  pointer-events: none;
  opacity: 0.9;
  z-index: 0;
  transition: opacity 140ms ease;
}

.geo-playback-fallback-image.is-hidden {
  opacity: 0;
}

.geo-playback-chart {
  height: var(--geo-playback-chart-height);
  border-radius: 12px;
  overflow: visible;
  border: 1px solid rgba(86, 214, 200, 0.12);
  background: rgba(4, 16, 27, 0.52);
  position: relative;
  z-index: 1;
  min-width: 0;
}

.geo-playback-chart .js-plotly-plot,
.geo-playback-chart .plot-container,
.geo-playback-chart .svg-container {
  height: var(--geo-playback-chart-height) !important;
  overflow: visible !important;
}

.geo-playback-chart .js-plotly-plot,
.geo-playback-chart .plot-container,
.geo-playback-chart .svg-container,
.geo-playback-chart .plotly,
.geo-playback-chart .plotly .main-svg,
.geo-playback-chart .main-svg {
  background: transparent !important;
}

.geo-playback-chart .bg {
  fill: transparent !important;
}

.geo-playback-chart .cartesianlayer,
.geo-playback-chart .polarlayer,
.geo-playback-chart .ternarylayer,
.geo-playback-chart .scatterlayer,
.geo-playback-chart .scatterlayer .trace,
.geo-playback-chart .scatterlayer path,
.geo-playback-chart .xaxislayer-above,
.geo-playback-chart .yaxislayer-above,
.geo-playback-chart .gridlayer,
.geo-playback-chart .zerolinelayer {
  opacity: 1 !important;
  visibility: visible !important;
}

.geo-playback-chart .scatterlayer path {
  stroke-opacity: 1 !important;
  vector-effect: none !important;
  shape-rendering: geometricPrecision !important;
  paint-order: stroke !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}

.geo-playback-chart .scatterlayer .trace path {
  fill-opacity: 1 !important;
}

/* Compact restoration row */
.geo-restoration-row {
  display: grid;
  grid-template-columns: minmax(0, 210px) auto minmax(0, 1fr);
  align-items: start;
  gap: var(--panel-gap);
  padding: clamp(6px, 0.45vw, 8px) clamp(8px, 0.65vw, 10px);
  margin-bottom: 2px;
}

/* Let Plotly render the native hover label and vertical guide in Geo Explorer. */
.geo-playback-chart .hoverlayer {
  opacity: 1 !important;
  pointer-events: none !important;
}

.geo-chart-fixed-hover {
  display: none !important;
  position: absolute;
  top: 10px;
  right: 10px;
  width: min(220px, calc(100% - 20px));
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(86, 214, 200, 0.14);
  background: rgba(8, 22, 37, 0.92);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.22);
  z-index: 8;
  display: grid;
  gap: 4px;
}

.geo-chart-fixed-hover.is-hidden {
  display: none !important;
}

.geo-chart-fixed-hover-title {
  color: var(--text);
  font-size: 10px;
  line-height: 1.3;
  font-weight: 600;
}

.geo-chart-fixed-hover-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.2;
}

.geo-chart-fixed-hover-date,
.geo-chart-fixed-hover-value {
  white-space: nowrap;
}

.geo-chart-fixed-hover-copy {
  color: var(--muted-strong);
  font-size: 9px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.geo-chart-human-legend {
  display: grid;
  gap: var(--panel-gap);
  margin-top: clamp(8px, 0.65vw, 10px);
}

.geo-chart-legend-group {
  display: grid;
  gap: clamp(6px, 0.45vw, 8px);
  padding: clamp(8px, 0.65vw, 10px) clamp(10px, 0.75vw, 12px);
  border-radius: 12px;
  border: 1px solid rgba(86, 214, 200, 0.10);
  background: rgba(6, 18, 30, 0.55);
}

.geo-chart-legend-group-title {
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.geo-chart-legend-group-items {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.geo-chart-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  max-width: 100%;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: help;
  overflow-wrap: anywhere;
}

.geo-chart-legend-label {
  font-size: 11px;
  line-height: 1.3;
}

.geo-chart-legend-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.geo-chart-legend-line {
  width: 18px;
  height: 0;
  border-top-width: 2px;
  border-top-style: solid;
}

.geo-chart-legend-band {
  width: 18px;
  height: 10px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.geo-chart-legend-marker {
  min-width: 14px;
  font-size: 13px;
  line-height: 1;
}

.geo-chart-legend-empty {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(86, 214, 200, 0.10);
  background: rgba(6, 18, 30, 0.55);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.geo-playback-chip-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--panel-gap);
}

.geo-playback-chip {
  display: grid;
  gap: 3px;
  min-height: clamp(54px, 4vw, 60px);
  padding: clamp(7px, 0.55vw, 9px) clamp(8px, 0.65vw, 10px);
  border-radius: 10px;
  border: 1px solid rgba(86, 214, 200, 0.12);
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.03));
}

.geo-playback-chip-label {
  font-size: clamp(8px, 0.55vw, 9px);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.geo-playback-chip-value {
  font-size: clamp(10px, 0.72vw, 11px);
  color: var(--text);
  line-height: 1.35;
}

.geo-map-time-chip {
  position: absolute;
  left: 50%;
  top: 12px;
  transform: translateX(-50%);
  z-index: 520;
  min-width: min(180px, calc(100% - 32px));
  max-width: 320px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(86, 214, 200, 0.16);
  background: rgba(5, 17, 29, 0.86);
  backdrop-filter: blur(12px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
  color: var(--text);
  font-size: 10px;
  line-height: 1;
  text-align: center;
  pointer-events: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.geo-map-metric-legend {
  position: absolute;
  left: 92px;
  bottom: 18px;
  z-index: 520;
  width: min(250px, calc(100% - 128px));
  display: none;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(5, 17, 29, 0.88);
  backdrop-filter: blur(14px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.24);
  min-width: 0;
}

.geo-map-metric-legend.is-hidden {
  display: none;
}

.geo-map-metric-legend.is-open {
  display: grid;
  animation: geoPatchCardEnter 180ms ease-out;
}

.geo-map-metric-legend-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.geo-map-metric-legend-body {
  display: grid;
  gap: 8px;
}

.geo-map-metric-legend-title {
  color: var(--text);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.geo-map-metric-rows {
  display: grid;
  gap: 7px;
}

.geo-map-metric-row {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

.geo-map-metric-swatch {
  width: 12px;
  height: 12px;
  margin-top: 2px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.geo-map-metric-copy-wrap {
  display: grid;
  gap: 2px;
}

.geo-map-metric-label {
  color: var(--text);
  font-size: 11px;
  line-height: 1.1;
  font-weight: 600;
}

.geo-map-metric-copy {
  color: var(--muted-strong);
  font-size: 10px;
  line-height: 1.25;
}

.geo-map-patch-card {
  position: absolute;
  top: 78px;
  right: 16px;
  z-index: 520;
  width: min(var(--context-rail-width), calc(100% - 32px));
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(245, 199, 108, 0.2);
  background:
    linear-gradient(180deg, rgba(245, 199, 108, 0.12), rgba(255, 143, 107, 0.05)),
    rgba(5, 17, 29, 0.94);
  backdrop-filter: blur(16px);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.28);
}

.geo-map-patch-card.is-hidden {
  display: none;
}

.geo-map-patch-card.is-open {
  display: grid;
  gap: 10px;
  animation: geoPatchCardEnter 180ms ease-out;
}

.geo-map-patch-card.from-map {
  border-color: rgba(86, 214, 200, 0.42);
  box-shadow:
    0 0 0 1px rgba(86, 214, 200, 0.14),
    0 18px 36px rgba(0, 0, 0, 0.28),
    0 0 28px rgba(86, 214, 200, 0.18);
}

.geo-map-patch-card-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.geo-map-patch-card-head-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.geo-map-patch-card-kicker {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.geo-map-patch-card-title {
  color: var(--text);
  font-size: 18px;
  line-height: 1;
  font-weight: 650;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.geo-map-patch-card-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, transform 140ms ease;
}

.geo-map-patch-card-close:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(245, 199, 108, 0.34);
  transform: translateY(-1px);
}

.geo-map-patch-card-close:focus-visible {
  outline: 2px solid rgba(245, 199, 108, 0.55);
  outline-offset: 2px;
}

.geo-map-patch-card-body {
  display: grid;
  gap: 8px;
}

.geo-map-patch-card .badge-row {
  gap: 8px;
}

.geo-map-patch-card .badge {
  background: rgba(255, 255, 255, 0.06);
}

.geo-map-patch-metric {
  color: var(--text);
  font-size: 21px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.geo-map-patch-feedback {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(86, 214, 200, 0.22);
  background: rgba(86, 214, 200, 0.10);
  color: var(--teal-2);
  font-size: 10px;
  line-height: 1;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.geo-map-patch-copy {
  color: var(--muted-strong);
  font-size: 11px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.geo-map-patch-note {
  padding-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

@keyframes geoPatchCardEnter {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.geo-map-value-marker {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  pointer-events: none !important;
}

@media (max-width: 900px) {
  .rev2-map-shell .geo-map-patch-toggle {
    top: auto;
    left: 12px;
    right: auto;
    bottom: 12px;
  }

  .rev2-map-shell .geo-map-metric-toggle {
    top: auto;
    left: 12px;
    right: auto;
    bottom: 48px;
  }

  .geo-map-patch-card {
    top: auto;
    right: 12px;
    bottom: 48px;
    left: 12px;
    width: auto;
  }

  .geo-map-metric-legend {
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
  }

  .geo-handoff-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ── Temporal zoom RangeSlider (Dash 4 uses slider-* not rc-slider-*) ────── */

.sim-zoom-slider {
  margin: 0 4px 18px 4px;
  padding: 10px 0 8px 0;
}

/* Hide the text inputs that Bootstrap renders as white boxes */
.sim-zoom-slider .slider-min-input,
.sim-zoom-slider .slider-max-input,
.sim-zoom-slider input[type="number"],
.sim-zoom-slider input[type="text"],
.sim-zoom-slider input {
  display: none !important;
}

/* Rail (unfilled background track) */
.sim-zoom-slider .slider-track {
  background: rgba(255, 255, 255, 0.12) !important;
  height: 4px !important;
  border-radius: 2px !important;
}

/* Filled section between thumbs */
.sim-zoom-slider .slider-range {
  background: rgba(86, 214, 200, 0.50) !important;
  height: 4px !important;
  border-radius: 2px !important;
}

/* Thumb (handle): dark circle with teal border */
.sim-zoom-slider .slider-thumb {
  width: 18px !important;
  height: 18px !important;
  border-radius: 50% !important;
  background-color: #081625 !important;
  background-image: none !important;
  border: 2px solid #56d6c8 !important;
  box-shadow: 0 0 0 3px rgba(86, 214, 200, 0.18) !important;
  cursor: grab !important;
  opacity: 1 !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
}

.sim-zoom-slider .slider-thumb:active {
  cursor: grabbing !important;
  border-color: #38d39f !important;
  box-shadow: 0 0 0 5px rgba(86, 214, 200, 0.25) !important;
}

/* Hide Dash 4 slider tooltips */
.sim-zoom-slider .slider-tooltip {
  display: none !important;
}

/* Zoom range text label (replaces tooltip) */
.sim-zoom-label {
  font-family: var(--mono, monospace);
  font-size: 11px;
  color: #56d6c8;
  opacity: 0.85;
}

/* Zoom in / out buttons */
.zoom-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  min-width: 28px;
  height: 28px;
  padding: 0;
  line-height: 1;
  font-size: 16px;
  font-weight: 600;
  font-family: var(--mono, monospace);
  background: transparent;
  color: var(--teal);
  border: 1px solid rgba(86, 214, 200, 0.35);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.zoom-btn:hover {
  background: rgba(86, 214, 200, 0.10);
  border-color: rgba(86, 214, 200, 0.65);
}

/* ── Climate Event Overlay controls ─────────────────────────── */

.event-overlay-controls {
  margin: 6px 0 4px 0;
  padding: 6px 10px;
  background: rgba(245, 199, 108, 0.06);
  border: 1px solid rgba(245, 199, 108, 0.18);
  border-radius: 8px;
}

.event-ctrl-row {
  gap: 8px;
}

.event-overlay-switch {
  flex-shrink: 0;
}

.event-overlay-label {
  font-weight: 600;
  color: var(--amber, #f5c76c);
}

.event-preset-select {
  max-width: 100%;
  font-size: clamp(10px, 0.72vw, 11px) !important;
  height: clamp(38px, 2.2vw, 44px) !important;
  padding: 0 clamp(30px, 1.8vw, 34px) 0 clamp(10px, 0.8vw, 12px) !important;
}

.geo-event-selector-block {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.geo-event-preset-tooltip-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--teal-2);
  margin-bottom: 4px;
}

.geo-restoration-label {
  margin-left: 0;
  align-self: start;
  padding-top: 2px;
}

.event-restoration-checklist {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(8px, 0.6vw, 12px);
}

.event-restoration-checklist .form-check {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  margin: 0;
  min-height: auto;
}

.event-restoration-checklist .form-check-label {
  font-size: clamp(10px, 0.72vw, 11px);
  color: var(--text, #d4e5f7);
  letter-spacing: 0.02em;
}

.event-restoration-checklist .form-check-input {
  width: clamp(14px, 0.95vw, 16px);
  height: clamp(14px, 0.95vw, 16px);
  margin: 0;
}

@container (max-width: 680px) {
  .geo-playback-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .geo-playback-toolbar .sim-cursor-label {
    grid-column: 1 / -1;
    justify-self: end;
  }

  .geo-restoration-row,
  .timeseries-meta-row,
  .geo-playback-chip-row {
    grid-template-columns: 1fr;
  }
}

/* ── Overview Weather FX toggle button ────────────────────── */

/* Overview map toolbar — always visible, left side under weather card */
.ov-map-toolbar {
  position: absolute;
  left: 8px;
  bottom: 210px;
  z-index: 510;
  display: flex;
  gap: 4px;
  align-items: center;
}

/* Keep Wx toggle always visible inside toolbar */
.ov-map-toolbar .overview-weather-toggle {
  position: static !important;
  display: inline-flex !important;
}
.ov-map-toolbar .overview-weather-toggle.is-open {
  display: inline-flex !important;
  background: linear-gradient(135deg, rgba(86, 214, 200, 0.18), rgba(9, 34, 51, 0.9));
  border-color: rgba(86, 214, 200, 0.35);
}

/* Weather FX toggle inside toolbar */
.ov-map-toolbar #rev2-ov-weather-fx-toggle {
  position: static !important;
  width: auto;
  min-width: auto;
  height: 26px;
  padding: 0 8px;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
  border-radius: 999px;
}

/* ── Overview Weather Card (inline) ───────────────────────── */

.ov-weather-card-inline {
  margin: 4px 0;
  padding: 6px 10px;
  background: rgba(86, 214, 200, 0.05);
  border: 1px solid rgba(86, 214, 200, 0.15);
  border-radius: 8px;
}

.ov-weather-chips-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-top: 4px;
}

.ov-weather-chips-inline .overview-weather-chip {
  flex: 0 0 auto;
  min-width: 60px;
}

.ov-weather-condition-chip {
  font-size: 12px;
  font-weight: 600;
  color: var(--teal, #56d6c8);
  margin-left: 4px;
  letter-spacing: 0.03em;
}

.ov-weather-date-chip {
  font-size: 10px;
  font-family: var(--mono, monospace);
  color: var(--muted, #8ca8c4);
  margin-left: auto;
}

.geo-playback-zoom-value {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 94px;
  font-size: 16px;
  letter-spacing: 0.02em;
}

/* --- Phase 1: El Niño scenario guardrails --- */
.scenario-guardrail-warnings {
    margin: 8px 0;
}
.scenario-guardrail-warnings .guardrail-warning {
    background: rgba(var(--amber-rgb, 255, 191, 0), 0.10);
    border-left: 3px solid var(--amber, #ffbf00);
    padding: 8px 12px;
    margin-bottom: 6px;
    border-radius: 4px;
    font-size: 0.82rem;
    color: var(--text, #c8d6e5);
    line-height: 1.35;
}

/* --- Phase 1: Scenario-forced badge in Geo --- */
.badge.scenario {
    background: rgba(var(--teal-rgb, 0, 210, 190), 0.15);
    color: var(--teal, #00d2be);
    border: 1px solid var(--teal, #00d2be);
    font-size: 0.72rem;
    padding: 2px 8px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
}
.badge.scenario.is-hidden {
    display: none;
}

/* --- Phase 1: New weather condition icons --- */
.weather-clear_hot { color: #ff6b35; }
.weather-calm_high_insolation { color: #ffd166; }
.weather-wind_cooling { color: #73d2de; }
.weather-cloud_buffered { color: #8d99ae; }
.weather-storm_runoff { color: #e76f51; }

/* --- Phase 1: Builder section label for atmospheric drivers --- */
.builder-section-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--muted, #8395a7);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 14px 0 6px;
    padding-top: 10px;
    border-top: 1px solid var(--line, rgba(255,255,255,0.06));
}

/* --- Phase 2: Event lane new kind colors --- */
.event-badge-enso_phase_change { color: #a78bfa; }
.event-badge-upwelling_event { color: #22d3ee; }
.event-badge-wind_shift { color: #94a3b8; }

/* --- Authentication / Login --- */
body.login-body {
  min-width: 0;
  overflow-x: hidden;
}

.login-shell {
  min-height: 100vh;
  padding: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.login-shell::before,
.login-shell::after {
  content: "";
  position: absolute;
  inset: auto;
  border-radius: 999px;
  filter: blur(18px);
  opacity: 0.9;
  pointer-events: none;
}

.login-shell::before {
  width: 360px;
  height: 360px;
  top: 48px;
  left: max(24px, 6vw);
  background: radial-gradient(circle, rgba(86, 214, 200, 0.18), transparent 70%);
}

.login-shell::after {
  width: 420px;
  height: 420px;
  right: max(24px, 4vw);
  bottom: 24px;
  background: radial-gradient(circle, rgba(115, 189, 232, 0.16), transparent 72%);
}

.login-grid {
  width: min(1120px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 460px);
  gap: 28px;
  position: relative;
  z-index: 1;
}

.login-hero,
.login-panel {
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(7, 22, 36, 0.96), rgba(5, 17, 29, 0.9));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.login-hero {
  padding: 36px 38px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 620px;
  position: relative;
  overflow: hidden;
}

.login-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 16% 18%, rgba(86, 214, 200, 0.18), transparent 30%),
    radial-gradient(circle at 82% 4%, rgba(127, 137, 255, 0.12), transparent 24%),
    linear-gradient(135deg, rgba(135, 240, 229, 0.04), transparent 42%);
  pointer-events: none;
}

.login-brand,
.login-hero-copy,
.login-hero-metrics {
  position: relative;
  z-index: 1;
}

.login-brand {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.login-brand-mark {
  font-family: var(--title);
  font-size: clamp(38px, 5vw, 54px);
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--teal);
  text-shadow: 0 0 26px rgba(86, 214, 200, 0.24);
}

.login-brand-kicker {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal-2);
}

.login-brand-title {
  font-family: var(--title);
  font-size: clamp(28px, 4vw, 38px);
  line-height: 1.05;
  letter-spacing: 0.03em;
}

.login-brand-subtitle {
  max-width: 54ch;
  color: var(--muted);
  line-height: 1.6;
  font-size: 15px;
}

.login-hero-copy {
  display: grid;
  gap: 18px;
}

.login-hero-card {
  padding: 18px 20px;
  border-radius: 20px;
  border: 1px solid rgba(135, 240, 229, 0.14);
  background: rgba(5, 17, 29, 0.46);
}

.login-hero-card h2,
.login-hero-card p {
  margin: 0;
}

.login-hero-card h2 {
  font-family: var(--title);
  font-size: 20px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.login-hero-card p {
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.65;
  font-size: 14px;
}

.login-hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.login-metric {
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(86, 214, 200, 0.12);
  background: rgba(5, 17, 29, 0.42);
}

.login-metric-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.login-metric-value {
  margin-top: 8px;
  font-family: var(--title);
  font-size: 24px;
  letter-spacing: 0.04em;
  color: var(--text);
}

.login-panel {
  padding: 34px 30px 30px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.login-panel-header {
  margin-bottom: 22px;
}

.login-panel-header h1,
.login-panel-header p {
  margin: 0;
}

.login-panel-header h1 {
  font-family: var(--title);
  font-size: 30px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.login-panel-header p {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.55;
}

.login-form {
  display: grid;
  gap: 18px;
}

.login-field {
  display: grid;
  gap: 8px;
}

.login-field label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--teal-2);
}

.login-field input {
  width: 100%;
  border-radius: 16px;
  border: 1px solid rgba(86, 214, 200, 0.18);
  background: rgba(4, 17, 29, 0.86);
  color: var(--text);
  padding: 14px 16px;
  font-size: 15px;
  outline: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.01);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.login-field input:focus {
  border-color: rgba(135, 240, 229, 0.44);
  box-shadow: 0 0 0 3px rgba(86, 214, 200, 0.12);
  background: rgba(5, 19, 32, 0.94);
}

.login-submit {
  width: 100%;
  border: 1px solid rgba(135, 240, 229, 0.34);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(86, 214, 200, 0.2), rgba(115, 189, 232, 0.16));
  color: var(--text);
  padding: 14px 18px;
  font-family: var(--title);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.login-submit:hover {
  transform: translateY(-1px);
  border-color: rgba(135, 240, 229, 0.48);
  background: linear-gradient(135deg, rgba(86, 214, 200, 0.28), rgba(115, 189, 232, 0.2));
}

.login-error {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 111, 125, 0.26);
  background: rgba(255, 111, 125, 0.1);
  color: #ffd6db;
  font-size: 13px;
  line-height: 1.5;
}

.login-footnote {
  margin-top: 18px;
  color: rgba(220, 236, 243, 0.72);
  font-size: 12px;
  line-height: 1.55;
}

@media (max-width: 1080px) {
  .login-grid {
    grid-template-columns: 1fr;
  }

  .login-hero {
    min-height: auto;
  }
}

@media (max-width: 680px) {
  .login-shell {
    padding: 18px;
  }

  .login-hero,
  .login-panel {
    border-radius: 22px;
  }

  .login-hero {
    padding: 28px 24px;
  }

  .login-panel {
    padding: 28px 22px 24px;
  }

  .login-hero-metrics {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 1601px) and (max-width: 2100px) {
  #rev2-scenarios-summary-cards.grid-4 {
    gap: 10px;
  }

  .scenario-summary-card {
    padding: 12px;
    gap: 5px;
  }

  .scenario-summary-card .metric-head {
    gap: 6px;
    margin-bottom: 6px;
  }

  .scenario-summary-card .metric-label {
    flex: 1 1 132px;
    font-size: 10px;
    line-height: 1.18;
  }

  .scenario-summary-card .badge {
    padding: 2px 7px;
    font-size: 8px;
  }

  .scenario-summary-card .metric-value {
    font-size: 18px;
  }

  .scenario-summary-card .metric-foot,
  .scenario-summary-detail {
    font-size: 8px;
    line-height: 1.25;
  }

  .rev2-map-shell .overview-weather-card {
    left: 84px;
    top: 42px;
    width: min(100px, calc(100% - 108px));
  }

  .overview-weather-card {
    padding: 3px;
    gap: 2px;
    border-radius: 10px 0 10px 0;
  }

  .overview-weather-toolbar {
    padding-right: 12px;
  }

  .overview-weather-head {
    grid-template-columns: 16px minmax(0, 1fr);
    gap: 3px;
  }

  .overview-weather-icon {
    width: 16px;
    height: 16px;
    border-radius: 5px;
    font-size: 5px;
  }

  .overview-weather-title,
  .overview-weather-subtitle,
  .overview-weather-confidence,
  .overview-weather-condition {
    font-size: 6px;
    line-height: 1.15;
  }

  .overview-weather-date,
  .overview-weather-chip-label {
    font-size: 4px;
    line-height: 1.1;
  }

  .overview-weather-chip {
    padding: 2px 3px;
    gap: 1px;
    border-radius: 5px;
  }

  .overview-weather-chip-value {
    font-size: 5px;
  }

  .overview-weather-close {
    width: 12px;
    min-width: 12px;
    height: 12px;
    font-size: 7px;
  }

  .geo-map-patch-card {
    top: 60px;
    right: 10px;
    width: min(184px, calc(100% - 20px));
    padding: 8px;
    border-radius: 14px;
  }

  .geo-map-patch-card.is-open {
    gap: 6px;
    max-height: min(186px, calc(100% - 72px));
    overflow: auto;
  }

  .geo-map-patch-card-toolbar {
    gap: 8px;
  }

  .geo-map-patch-card-head-copy {
    gap: 3px;
  }

  .geo-map-patch-card-kicker {
    font-size: 7px;
  }

  .geo-map-patch-card-title {
    font-size: 12px;
  }

  .geo-map-patch-card-close {
    width: 22px;
    height: 22px;
    font-size: 13px;
  }

  .geo-map-patch-card-body {
    gap: 5px;
  }

  .geo-map-patch-card .badge {
    padding: 2px 5px;
    font-size: 7px;
  }

  .geo-map-patch-metric {
    font-size: 12px;
    line-height: 1.02;
  }

  .geo-map-patch-feedback {
    padding: 2px 5px;
    font-size: 6px;
  }

  .geo-map-patch-copy,
  .geo-map-patch-note {
    font-size: 6px;
    line-height: 1.16;
  }

  .geo-map-metric-legend {
    left: 10px;
    bottom: 10px;
    width: min(172px, calc(100% - 20px));
    padding: 6px 7px;
    border-radius: 12px;
  }

  .geo-map-metric-legend.is-open {
    gap: 4px;
  }

  .geo-map-metric-legend-toolbar {
    gap: 8px;
  }

  .geo-map-metric-legend-body {
    gap: 5px;
  }

  .geo-map-metric-legend-title {
    font-size: 7px;
  }

  .geo-map-metric-row {
    grid-template-columns: 8px minmax(0, 1fr);
    gap: 4px;
  }

  .geo-map-metric-swatch {
    width: 7px;
    height: 7px;
  }

  .geo-map-metric-label {
    font-size: 6px;
  }

  .geo-map-metric-copy {
    font-size: 5px;
    line-height: 1.12;
  }
}

@media (max-width: 1600px) {
  #rev2-scenarios-summary-cards.grid-4 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .scenario-summary-card {
    padding: 10px;
    gap: 4px;
    border-radius: 14px;
  }

  .scenario-summary-card .metric-head {
    gap: 5px;
    margin-bottom: 5px;
  }

  .scenario-summary-card .metric-label {
    flex: 1 1 116px;
    font-size: 9px;
    line-height: 1.18;
  }

  .scenario-summary-card .badge {
    padding: 2px 5px;
    font-size: 7px;
  }

  .scenario-summary-card .metric-value {
    font-size: 16px;
  }

  .scenario-summary-card .metric-foot,
  .scenario-summary-detail {
    font-size: 7px;
    line-height: 1.22;
  }

  .rev2-map-shell .overview-weather-card {
    left: 78px;
    top: 38px;
    width: min(92px, calc(100% - 100px));
  }

  .overview-weather-card {
    padding: 3px;
    gap: 2px;
    border-radius: 9px 0 9px 0;
  }

  .overview-weather-toolbar {
    padding-right: 10px;
  }

  .overview-weather-head {
    grid-template-columns: 15px minmax(0, 1fr);
    gap: 2px;
  }

  .overview-weather-icon {
    width: 15px;
    height: 15px;
    border-radius: 5px;
    font-size: 5px;
  }

  .overview-weather-title,
  .overview-weather-subtitle,
  .overview-weather-confidence,
  .overview-weather-condition {
    font-size: 5px;
    line-height: 1.12;
  }

  .overview-weather-date,
  .overview-weather-chip-label {
    font-size: 4px;
    line-height: 1.05;
  }

  .overview-weather-chip {
    padding: 1px 3px;
    gap: 1px;
    border-radius: 5px;
  }

  .overview-weather-chip-value {
    font-size: 4px;
  }

  .overview-weather-close {
    width: 11px;
    min-width: 11px;
    height: 11px;
    font-size: 7px;
  }

  .geo-map-patch-card {
    top: 52px;
    right: 8px;
    width: min(160px, calc(100% - 16px));
    padding: 6px;
    border-radius: 12px;
  }

  .geo-map-patch-card.is-open {
    gap: 5px;
    max-height: min(170px, calc(100% - 64px));
    overflow: auto;
  }

  .geo-map-patch-card-toolbar {
    gap: 6px;
  }

  .geo-map-patch-card-head-copy {
    gap: 2px;
  }

  .geo-map-patch-card-kicker {
    font-size: 6px;
  }

  .geo-map-patch-card-title {
    font-size: 10px;
  }

  .geo-map-patch-card-close {
    width: 20px;
    height: 20px;
    font-size: 12px;
  }

  .geo-map-patch-card-body {
    gap: 4px;
  }

  .geo-map-patch-card .badge {
    padding: 2px 4px;
    font-size: 6px;
  }

  .geo-map-patch-metric {
    font-size: 10px;
    line-height: 1.02;
  }

  .geo-map-patch-feedback {
    padding: 2px 4px;
    font-size: 5px;
  }

  .geo-map-patch-copy,
  .geo-map-patch-note {
    font-size: 5px;
    line-height: 1.14;
  }

  .geo-map-metric-legend {
    left: 8px;
    bottom: 8px;
    width: min(148px, calc(100% - 16px));
    padding: 5px 6px;
    border-radius: 11px;
  }

  .geo-map-metric-legend.is-open {
    gap: 4px;
  }

  .geo-map-metric-legend-toolbar {
    gap: 6px;
  }

  .geo-map-metric-legend-body {
    gap: 4px;
  }

  .geo-map-metric-legend-title {
    font-size: 6px;
  }

  .geo-map-metric-row {
    grid-template-columns: 7px minmax(0, 1fr);
    gap: 4px;
  }

  .geo-map-metric-swatch {
    width: 6px;
    height: 6px;
  }

  .geo-map-metric-label {
    font-size: 5px;
  }

  .geo-map-metric-copy {
    font-size: 4px;
    line-height: 1.1;
  }
}
