:root {
  color-scheme: dark;
  --bg: #071013;
  --panel: #10191c;
  --panel-2: #142124;
  --panel-glass: rgba(12, 25, 29, 0.82);
  --line: rgba(211, 231, 232, 0.16);
  --line-strong: rgba(103, 232, 222, 0.28);
  --text: #ecf6f4;
  --muted: #9eb6b5;
  --muted-2: #6f8b8c;
  --cyan: #53d5e0;
  --green: #60d394;
  --amber: #f2b84b;
  --coral: #ff7a66;
  --deep: #082239;
  --shadow: 0 18px 44px rgba(0, 0, 0, 0.34);
  --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.24);
  --panel-highlight: linear-gradient(90deg, rgba(83, 213, 224, 0.18), rgba(96, 211, 148, 0.08), transparent 58%);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
}

body {
  min-width: 320px;
  overflow: hidden;
  background:
    linear-gradient(rgba(125, 222, 222, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(125, 222, 222, 0.018) 1px, transparent 1px),
    radial-gradient(circle at 14% 8%, rgba(83, 213, 224, 0.11), transparent 28%),
    radial-gradient(circle at 80% 18%, rgba(96, 211, 148, 0.07), transparent 24%),
    linear-gradient(135deg, #071013 0%, #0e1a1d 46%, #08131a 100%);
  background-size: 34px 34px, 34px 34px, auto, auto, auto;
  color: var(--text);
  font-family: "Microsoft YaHei UI", "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), transparent 10%, transparent 90%, rgba(0, 0, 0, 0.18)),
    repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 5px);
  opacity: 0.34;
  z-index: 0;
}

button,
input {
  font: inherit;
}

.app-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 296px minmax(0, 1fr);
  grid-template-rows: 72px minmax(0, 1fr);
  grid-template-areas:
    "top top"
    "side work";
  height: 100%;
}

.topbar {
  grid-area: top;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(10, 22, 25, 0.94), rgba(6, 14, 17, 0.88)),
    var(--panel-highlight);
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
}

.brand {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 12px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 8px;
  background:
    linear-gradient(135deg, transparent 41%, rgba(255, 255, 255, 0.42) 42%, transparent 44%),
    conic-gradient(from 210deg, #53d5e0, #60d394, #f2b84b, #ff7a66, #53d5e0);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.24),
    inset 0 -10px 18px rgba(0, 0, 0, 0.12),
    0 10px 28px rgba(83, 213, 224, 0.18);
}

h1,
h2,
p {
  margin: 0;
}

.brand h1 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 20px;
  font-weight: 720;
  letter-spacing: 0;
}

.brand p,
.stage-title p,
.control-section p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.status-strip {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.status-strip span {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(211, 231, 232, 0.14);
  border-radius: 6px;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.045);
  color: #d9eeed;
  font-size: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.view-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(4, 12, 15, 0.78);
  box-shadow: inset 0 0 18px rgba(83, 213, 224, 0.035);
}

.view-tabs button {
  min-height: 30px;
  border: 0;
  border-radius: 6px;
  padding: 4px 12px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.view-tabs button.active {
  background: linear-gradient(135deg, rgba(83, 213, 224, 0.24), rgba(96, 211, 148, 0.16));
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(83, 213, 224, 0.42), 0 0 18px rgba(83, 213, 224, 0.12);
}

.hidden {
  display: none !important;
}

.control-panel {
  grid-area: side;
  overflow: auto;
  padding: 16px;
  border-right: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(11, 25, 28, 0.90), rgba(6, 16, 19, 0.86)),
    linear-gradient(90deg, rgba(83, 213, 224, 0.07), transparent 34%);
  backdrop-filter: blur(12px);
}

.control-section {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.control-section:first-child {
  padding-top: 0;
}

.control-section h2,
.stage-title h2 {
  margin-bottom: 10px;
  font-size: 14px;
  font-weight: 690;
  letter-spacing: 0;
}

.control-section h2 {
  color: #f3fbfa;
  text-shadow: 0 0 18px rgba(83, 213, 224, 0.10);
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(4, 12, 15, 0.78);
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.16);
}

.segmented.stacked {
  grid-template-columns: repeat(auto-fit, minmax(54px, 1fr));
}

.segmented.is-four {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.segmented.is-four span {
  padding: 0 4px;
  text-align: center;
  line-height: 1.25;
  font-size: 12px;
}

.segmented input,
.toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segmented span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border-radius: 6px;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.segmented input:checked + span {
  background: linear-gradient(135deg, rgba(83, 213, 224, 0.22), rgba(96, 211, 148, 0.18));
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(83, 213, 224, 0.44), 0 0 18px rgba(83, 213, 224, 0.10);
}

.toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 38px;
  color: #dceceb;
  cursor: pointer;
  font-size: 13px;
  transition: color 0.18s ease;
}

.toggle:hover {
  color: #f3fbfa;
}

.toggle::after {
  content: "";
  width: 38px;
  height: 20px;
  border-radius: 999px;
  background: #233033;
  box-shadow: inset 0 0 0 1px var(--line);
  transition: background 0.18s ease;
}

.toggle:has(input:checked)::after {
  background: linear-gradient(90deg, var(--cyan), var(--green));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24), 0 0 14px rgba(83, 213, 224, 0.18);
}

.range {
  width: 100%;
  accent-color: var(--cyan);
}

.range-row {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
}

.transport {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.number-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.select-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.select-grid label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
}

.select-grid select {
  width: 100%;
  min-height: 32px;
  border: 1px solid rgba(211, 231, 232, 0.14);
  border-radius: 6px;
  padding: 4px 8px;
  background: rgba(3, 13, 16, 0.76);
  color: var(--text);
  outline: 0;
}

.select-grid select:focus {
  border-color: rgba(83, 213, 224, 0.46);
  box-shadow: 0 0 0 2px rgba(83, 213, 224, 0.10);
}

.select-grid select:disabled {
  color: var(--muted-2);
  opacity: 0.65;
}

.fine-print {
  margin-top: 8px;
  color: var(--muted-2);
  font-size: 11px;
  line-height: 1.5;
}

.number-grid label {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
}

.number-grid input {
  width: 100%;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 4px 8px;
  background: rgba(4, 12, 15, 0.82);
  color: var(--text);
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.number-grid input:focus {
  border-color: rgba(83, 213, 224, 0.62);
  box-shadow: 0 0 0 3px rgba(83, 213, 224, 0.08);
}

.mini-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.mini-actions button {
  min-height: 30px;
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(19, 33, 36, 0.88);
  color: #dceceb;
  cursor: pointer;
  font-size: 12px;
}

.mini-actions button:hover {
  border-color: rgba(83, 213, 224, 0.68);
  background: #172c30;
}

.icon-button {
  width: 38px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(19, 33, 36, 0.88);
  color: var(--text);
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.18s ease, background 0.18s ease;
}

.icon-button:hover {
  border-color: rgba(83, 213, 224, 0.68);
  background: #172c30;
  transform: translateY(-1px);
}

.compact p {
  padding: 10px;
  border: 1px dashed rgba(83, 213, 224, 0.28);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(83, 213, 224, 0.08), rgba(96, 211, 148, 0.035));
  color: #b8d2d1;
}

.obs-summary {
  display: grid;
  gap: 8px;
}

.obs-summary article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 6px 9px;
  background: rgba(255, 255, 255, 0.035);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.obs-summary span {
  color: var(--muted);
  font-size: 12px;
}

.obs-summary strong {
  color: var(--text);
  font-size: 18px;
}

.workspace {
  grid-area: work;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(430px, 1.55fr) minmax(320px, 0.85fr);
  grid-template-rows: minmax(260px, 1.15fr) minmax(260px, 0.95fr) 96px;
  gap: 14px;
  padding: 16px;
  overflow: hidden;
}

.observation-workspace {
  grid-template-columns: minmax(560px, 1.45fr) minmax(320px, 0.8fr);
  grid-template-rows: minmax(390px, 1fr) minmax(150px, 0.34fr) 96px;
  grid-template-areas:
    "obs-chart obs-map"
    "obs-lists ."
    "obs-metrics obs-metrics";
}

.wrf-workspace {
  grid-template-columns: minmax(720px, 1.45fr) minmax(520px, 0.95fr);
  grid-template-rows: minmax(455px, 1.05fr) minmax(190px, 0.42fr);
  grid-template-areas:
    "wrf-track wrf-intensity"
    "wrf-metrics wrf-summary";
}

.ranch-workspace {
  grid-template-columns: minmax(680px, 1.35fr) minmax(360px, 0.72fr);
  grid-template-rows: minmax(430px, 1fr) minmax(220px, 0.46fr) 92px;
  grid-template-areas:
    "ranch-map ranch-dashboard"
    "ranch-zones ranch-alerts"
    "ranch-data ranch-data";
}

.wrf-track-stage {
  grid-area: wrf-track;
}

.wrf-intensity-stage {
  grid-area: wrf-intensity;
}

.wrf-summary-stage {
  grid-area: wrf-summary;
}

.wrf-metrics {
  grid-area: wrf-metrics;
  gap: 10px;
  align-self: start;
  height: auto;
}

.wrf-workspace .map-stage,
.wrf-workspace .metrics {
  grid-column: auto;
  grid-row: auto;
}

.ranch-map-stage {
  grid-area: ranch-map;
}

.ranch-dashboard-stage {
  grid-area: ranch-dashboard;
}

.ranch-zone-stage {
  grid-area: ranch-zones;
}

.ranch-alert-stage {
  grid-area: ranch-alerts;
}

.ranch-data-stage {
  grid-area: ranch-data;
}

.ranch-workspace .map-stage {
  grid-column: auto;
  grid-row: auto;
}

.ranch-dashboard-stage,
.ranch-zone-stage,
.ranch-alert-stage,
.ranch-data-stage {
  position: relative;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background:
    var(--panel-highlight),
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 24%),
    linear-gradient(180deg, rgba(16, 25, 28, 0.92), rgba(10, 19, 22, 0.88));
  box-shadow: var(--shadow);
}

.ranch-data-stage {
  grid-template-rows: minmax(0, 1fr);
  padding: 10px 14px;
}

.ranch-stage-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid rgba(83, 213, 224, 0.32);
  border-radius: 999px;
  padding: 4px 12px;
  color: #d8efed;
  background: rgba(83, 213, 224, 0.10);
  font-size: 12px;
}

.ranch-dashboard-grid,
.ranch-zone-grid,
.ranch-alert-list {
  min-height: 0;
  overflow: auto;
  display: grid;
  gap: 10px;
  align-content: start;
  padding-right: 4px;
  scrollbar-color: rgba(158, 182, 181, 0.58) rgba(255, 255, 255, 0.04);
}

.ranch-dashboard-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ranch-metric-card,
.ranch-zone-card,
.ranch-alert-item,
.ranch-data-row article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(83, 213, 224, 0.06), transparent 38%),
    rgba(9, 21, 24, 0.70);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.ranch-metric-card {
  min-height: 104px;
  padding: 12px;
}

.ranch-metric-card span,
.ranch-zone-card small,
.ranch-alert-item p,
.ranch-data-row span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.ranch-metric-card strong {
  display: block;
  margin-top: 8px;
  color: #f5fbfa;
  font-size: 23px;
  font-weight: 780;
}

.ranch-metric-card small {
  display: block;
  margin-top: 8px;
  color: #9eb6b5;
  line-height: 1.4;
}

.ranch-zone-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ranch-zone-card {
  min-height: 122px;
  padding: 12px;
  border-color: color-mix(in srgb, var(--zone-color), transparent 58%);
}

.ranch-zone-card div {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.ranch-zone-card b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  color: #061115;
  background: var(--zone-color);
  font-weight: 800;
}

.ranch-zone-card strong {
  color: #f4fbfa;
  font-size: 14px;
}

.ranch-zone-card p {
  margin-bottom: 8px;
  color: #d6e8e7;
  font-size: 12px;
  line-height: 1.55;
}

.ranch-alert-item {
  padding: 12px;
}

.ranch-alert-item strong {
  display: block;
  margin-bottom: 6px;
  color: #f5fbfa;
  font-size: 14px;
}

.ranch-alert-item.is-emphasis {
  border-color: rgba(255, 122, 102, 0.38);
  background:
    linear-gradient(135deg, rgba(255, 122, 102, 0.13), rgba(242, 184, 75, 0.05)),
    rgba(9, 21, 24, 0.76);
}

.ranch-data-row {
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.ranch-data-row article {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  padding: 10px 12px;
}

.ranch-data-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #f4fbfa;
  font-size: 14px;
  margin-top: 6px;
}

.wrf-metrics article {
  min-height: 0;
  padding: 9px 12px;
  justify-content: center;
}

.wrf-metrics span {
  font-size: 11px;
}

.wrf-metrics strong {
  margin-top: 4px;
  font-size: 21px;
}

.wrf-metrics .diagnostic-note {
  grid-column: 1 / -1;
  margin: 0;
  color: rgba(185, 208, 207, 0.78);
  font-size: 12px;
  line-height: 1.35;
}

.observation-map-stage {
  grid-area: obs-map;
}

.observation-chart-stage {
  grid-area: obs-chart;
}

.ship-list-stage {
  min-width: 0;
}

.station-list-stage {
  min-width: 0;
}

.observation-lists-stage {
  grid-area: obs-lists;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.observation-lists-stage.single {
  grid-template-columns: minmax(0, 1fr);
}

.observation-list,
.observation-chart-stage {
  position: relative;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 22%),
    linear-gradient(180deg, rgba(16, 25, 28, 0.92), rgba(10, 19, 22, 0.88));
  box-shadow: var(--shadow);
  overflow: hidden;
}

.observation-list[hidden] {
  display: none;
}

.observation-chart-stage {
  grid-template-rows: auto minmax(0, 1fr);
}

.obs-table {
  min-height: 0;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 8px;
  padding-right: 4px;
  scrollbar-color: rgba(158, 182, 181, 0.58) rgba(255, 255, 255, 0.04);
}

.obs-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) auto;
  gap: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 9px 10px;
  background: rgba(255, 255, 255, 0.035);
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.18s ease, background 0.18s ease;
}

.obs-row:hover {
  border-color: rgba(83, 213, 224, 0.38);
  background: rgba(83, 213, 224, 0.065);
  transform: translateY(-1px);
}

.obs-row.active {
  border-color: rgba(83, 213, 224, 0.72);
  background:
    linear-gradient(90deg, rgba(83, 213, 224, 0.14), rgba(83, 213, 224, 0.06));
  box-shadow: inset 3px 0 0 rgba(83, 213, 224, 0.78);
}

.obs-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #f4fbfa;
  font-size: 13px;
}

.obs-row span,
.obs-row small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.obs-row .obs-meta {
  grid-column: 1 / 3;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
}

.obs-pill {
  color: #d9eeed;
  font-size: 11px;
}

.obs-legend {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}

.obs-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.obs-legend span::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--cyan);
}

.obs-legend .station-dot::before {
  border-radius: 2px;
  background: var(--amber);
}

.obs-metrics {
  grid-area: obs-metrics;
}

.map-stage,
.profile-stage,
.scene-stage,
.metrics {
  min-width: 0;
  min-height: 0;
}

.map-stage,
.profile-stage,
.scene-stage {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    var(--panel-highlight),
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 24%),
    linear-gradient(180deg, rgba(16, 25, 28, 0.92), rgba(10, 19, 22, 0.88));
  box-shadow: var(--shadow);
  overflow: hidden;
}

.map-stage::before,
.profile-stage::before,
.scene-stage::before,
.observation-list::before,
.observation-chart-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), inset 0 0 0 1px rgba(83, 213, 224, 0.025);
}

.map-stage {
  grid-row: 1 / 3;
}

.stage-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
}

.stage-title h2 {
  color: #f3fbfa;
  text-shadow: 0 0 18px rgba(83, 213, 224, 0.12);
}

.stage-title.tight {
  padding-bottom: 8px;
}

.legend {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 180px;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.legend::before {
  content: "";
  width: 116px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, #2539a7, #21b7d4, #6dd36f, #f2c14e, #e64b4b);
  box-shadow: 0 0 16px rgba(83, 213, 224, 0.18);
}

.legend-readout {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 180px;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.legend-readout::before {
  content: "";
  width: 116px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, #2539a7, #21b7d4, #6dd36f, #f2c14e, #e64b4b);
  box-shadow: 0 0 16px rgba(83, 213, 224, 0.18);
}

.typhoon-dot-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 12px;
  color: rgba(236, 246, 244, 0.82);
  font-size: 11px;
}

.typhoon-dot-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.typhoon-dot-legend i {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  box-shadow: 0 0 9px currentColor, inset 0 0 0 1px rgba(5, 12, 16, 0.58);
}

canvas {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  display: block;
  border-radius: 6px;
  background:
    radial-gradient(circle at 50% 45%, rgba(17, 60, 68, 0.22), transparent 58%),
    #061115;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.025), inset 0 0 34px rgba(0, 0, 0, 0.26);
}

#mapCanvas {
  cursor: crosshair;
}

.metrics {
  grid-column: 1 / 3;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.metrics article {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(83, 213, 224, 0.06), transparent 38%),
    rgba(16, 25, 28, 0.78);
  box-shadow: var(--shadow-soft), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.metrics span {
  color: var(--muted);
  font-size: 12px;
}

.metrics strong {
  margin-top: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #f4fbfa;
  font-size: 24px;
  font-weight: 760;
  text-shadow: 0 0 22px rgba(83, 213, 224, 0.12);
}

.observation-workspace .observation-map-stage {
  grid-area: obs-map;
}

.observation-workspace .observation-chart-stage {
  grid-area: obs-chart;
}

.observation-workspace .ship-list-stage {
  min-width: 0;
}

.observation-workspace .station-list-stage {
  min-width: 0;
}

.observation-workspace .observation-lists-stage {
  grid-area: obs-lists;
}

.observation-workspace .obs-metrics {
  grid-area: obs-metrics;
}

/* Scientific visual refresh: interface-only overrides. */
:root {
  --bg: #041012;
  --panel: #0b171b;
  --panel-2: #101f24;
  --panel-glass: rgba(10, 22, 26, 0.86);
  --line: rgba(190, 222, 225, 0.15);
  --line-strong: rgba(100, 225, 224, 0.36);
  --text: #f2faf9;
  --muted: #a8bfbe;
  --muted-2: #708a8d;
  --cyan: #5fe4ec;
  --green: #6ee0a5;
  --amber: #f5c562;
  --coral: #ff826e;
  --deep: #071f32;
  --shadow: 0 20px 54px rgba(0, 0, 0, 0.38);
  --shadow-soft: 0 12px 32px rgba(0, 0, 0, 0.28);
  --panel-highlight:
    linear-gradient(115deg, rgba(95, 228, 236, 0.15), rgba(110, 224, 165, 0.055) 34%, transparent 66%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), transparent 42%);
}

body {
  background:
    linear-gradient(rgba(126, 220, 224, 0.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(126, 220, 224, 0.022) 1px, transparent 1px),
    linear-gradient(112deg, rgba(95, 228, 236, 0.105) 0%, transparent 34%),
    linear-gradient(248deg, rgba(110, 224, 165, 0.070) 0%, transparent 38%),
    linear-gradient(135deg, #041012 0%, #09181d 48%, #041017 100%);
  background-size: 36px 36px, 36px 36px, auto, auto, auto;
  font-feature-settings: "tnum";
}

body::before {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.038), transparent 8%, transparent 92%, rgba(0, 0, 0, 0.22)),
    repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.012) 0 1px, transparent 1px 6px);
  opacity: 0.28;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(95, 228, 236, 0.035), transparent 18%, transparent 82%, rgba(110, 224, 165, 0.025)),
    linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.18));
  z-index: 0;
}

button,
select,
input {
  letter-spacing: 0;
}

button:focus-visible,
select:focus-visible,
input:focus-visible {
  outline: 2px solid rgba(95, 228, 236, 0.76);
  outline-offset: 2px;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.035);
}

::-webkit-scrollbar-thumb {
  border: 2px solid rgba(5, 15, 18, 0.88);
  border-radius: 999px;
  background: rgba(151, 180, 181, 0.62);
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(95, 228, 236, 0.74);
}

.topbar {
  min-height: 72px;
  border-bottom-color: rgba(149, 220, 218, 0.18);
  background:
    linear-gradient(180deg, rgba(7, 18, 21, 0.97), rgba(5, 14, 17, 0.92)),
    linear-gradient(90deg, rgba(95, 228, 236, 0.12), transparent 30%, rgba(110, 224, 165, 0.06));
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.30);
}

.brand-mark {
  border-radius: 7px;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.28),
    inset 0 -12px 18px rgba(0, 0, 0, 0.16),
    0 0 0 1px rgba(95, 228, 236, 0.18),
    0 16px 34px rgba(95, 228, 236, 0.16);
}

.brand h1 {
  color: #f7fcfb;
  font-weight: 760;
  text-shadow: 0 0 18px rgba(95, 228, 236, 0.14);
}

.brand p {
  color: rgba(195, 218, 217, 0.78);
}

.view-tabs,
.segmented {
  border-color: rgba(190, 222, 225, 0.16);
  background:
    linear-gradient(180deg, rgba(7, 19, 22, 0.96), rgba(2, 9, 12, 0.86));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    inset 0 0 22px rgba(95, 228, 236, 0.035);
}

.view-tabs button,
.segmented span {
  color: rgba(197, 220, 219, 0.76);
}

.view-tabs button:hover,
.segmented span:hover {
  color: #f4fbfa;
  background: rgba(95, 228, 236, 0.07);
}

.view-tabs button.active,
.segmented input:checked + span {
  background:
    linear-gradient(135deg, rgba(95, 228, 236, 0.22), rgba(110, 224, 165, 0.16)),
    rgba(8, 29, 33, 0.88);
  box-shadow:
    inset 0 0 0 1px rgba(95, 228, 236, 0.52),
    0 0 0 1px rgba(95, 228, 236, 0.08),
    0 0 20px rgba(95, 228, 236, 0.12);
}

.status-strip span {
  border-color: rgba(190, 222, 225, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.024));
  color: rgba(232, 247, 246, 0.92);
}

.control-panel {
  background:
    linear-gradient(180deg, rgba(8, 21, 24, 0.94), rgba(4, 13, 16, 0.90)),
    linear-gradient(90deg, rgba(95, 228, 236, 0.075), transparent 38%);
  scrollbar-color: rgba(151, 180, 181, 0.62) rgba(255, 255, 255, 0.035);
}

.control-section {
  border-bottom-color: rgba(190, 222, 225, 0.13);
}

.control-section h2,
.stage-title h2 {
  color: #f5fbfa;
  font-weight: 760;
}

.control-section h2::before {
  content: "";
  display: inline-block;
  width: 3px;
  height: 13px;
  margin-right: 7px;
  border-radius: 999px;
  vertical-align: -2px;
  background: linear-gradient(180deg, var(--cyan), var(--green));
  box-shadow: 0 0 12px rgba(95, 228, 236, 0.26);
}

.toggle {
  color: rgba(223, 238, 237, 0.90);
}

.toggle::after {
  width: 40px;
  height: 22px;
  border-color: rgba(190, 222, 225, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.020)),
    #1a2a2e;
}

.toggle:has(input:checked)::after {
  background: linear-gradient(90deg, #54dbe5, #6ee0a5);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.28),
    0 0 18px rgba(95, 228, 236, 0.20);
}

.number-grid input,
.select-grid select,
.mini-actions button,
.icon-button {
  border-color: rgba(190, 222, 225, 0.15);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012)),
    rgba(3, 13, 16, 0.82);
}

.mini-actions button:hover,
.icon-button:hover {
  background:
    linear-gradient(180deg, rgba(95, 228, 236, 0.10), rgba(255, 255, 255, 0.018)),
    rgba(12, 31, 35, 0.92);
}

.map-stage,
.profile-stage,
.scene-stage,
.observation-list,
.observation-chart-stage,
.ranch-dashboard-stage,
.ranch-zone-stage,
.ranch-alert-stage,
.ranch-data-stage {
  border-color: rgba(190, 222, 225, 0.18);
  background:
    var(--panel-highlight),
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 28%),
    linear-gradient(180deg, rgba(13, 28, 32, 0.94), rgba(7, 17, 21, 0.90));
  box-shadow:
    var(--shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

.map-stage::after,
.profile-stage::after,
.scene-stage::after,
.observation-list::after,
.observation-chart-stage::after,
.ranch-dashboard-stage::after,
.ranch-zone-stage::after,
.ranch-alert-stage::after,
.ranch-data-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background:
    linear-gradient(90deg, rgba(95, 228, 236, 0.10), transparent 28%, transparent 76%, rgba(110, 224, 165, 0.052)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.030), transparent 26%);
  opacity: 0.72;
}

.stage-title {
  position: relative;
  z-index: 1;
}

.stage-title h2 {
  margin-bottom: 8px;
  font-size: 15px;
}

.stage-title h2::after {
  content: "";
  display: block;
  width: 32px;
  height: 2px;
  margin-top: 7px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--cyan), transparent);
  opacity: 0.78;
}

.stage-title p {
  color: rgba(191, 216, 216, 0.78);
}

canvas {
  position: relative;
  z-index: 1;
  border: 1px solid rgba(190, 222, 225, 0.08);
  border-radius: 7px;
  background:
    linear-gradient(rgba(125, 220, 224, 0.024) 1px, transparent 1px),
    linear-gradient(90deg, rgba(125, 220, 224, 0.020) 1px, transparent 1px),
    linear-gradient(135deg, rgba(10, 45, 70, 0.56), rgba(2, 13, 17, 0.96));
  background-size: 42px 42px, 42px 42px, auto;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.024),
    inset 0 0 38px rgba(0, 0, 0, 0.30);
}

.legend::before,
.legend-readout::before {
  height: 9px;
  box-shadow:
    0 0 18px rgba(95, 228, 236, 0.20),
    inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.metrics article,
.ranch-metric-card,
.ranch-zone-card,
.ranch-alert-item,
.ranch-data-row article,
.obs-summary article,
.obs-row {
  border-color: rgba(190, 222, 225, 0.15);
  background:
    linear-gradient(135deg, rgba(95, 228, 236, 0.072), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012)),
    rgba(8, 20, 24, 0.74);
}

.metrics article,
.ranch-metric-card,
.ranch-zone-card,
.ranch-alert-item {
  position: relative;
  overflow: hidden;
}

.metrics article::before,
.ranch-metric-card::before,
.ranch-zone-card::before,
.ranch-alert-item::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, rgba(95, 228, 236, 0.68), rgba(110, 224, 165, 0.18), transparent);
  opacity: 0.62;
}

.metrics span,
.ranch-metric-card span,
.ranch-zone-card small,
.ranch-alert-item p,
.ranch-data-row span {
  color: rgba(191, 216, 216, 0.78);
}

.metrics strong,
.ranch-metric-card strong,
.obs-summary strong,
.ranch-data-row strong {
  color: #f7fcfb;
  text-shadow: 0 0 18px rgba(95, 228, 236, 0.11);
}

.obs-row:hover,
.ranch-zone-card:hover,
.ranch-alert-item:hover,
.ranch-metric-card:hover {
  border-color: rgba(95, 228, 236, 0.34);
  background:
    linear-gradient(135deg, rgba(95, 228, 236, 0.11), transparent 44%),
    rgba(10, 25, 29, 0.82);
}

.obs-row.active {
  border-color: rgba(95, 228, 236, 0.74);
  background:
    linear-gradient(90deg, rgba(95, 228, 236, 0.16), rgba(110, 224, 165, 0.055)),
    rgba(9, 27, 31, 0.82);
}

.compact p {
  border-color: rgba(95, 228, 236, 0.30);
  background:
    linear-gradient(135deg, rgba(95, 228, 236, 0.075), rgba(110, 224, 165, 0.040)),
    rgba(5, 18, 22, 0.62);
}

.ranch-stage-badge {
  border-color: rgba(95, 228, 236, 0.35);
  background:
    linear-gradient(135deg, rgba(95, 228, 236, 0.12), rgba(110, 224, 165, 0.055));
}

@media (max-width: 980px) {
  body {
    overflow: auto;
  }

  .app-shell {
    height: auto;
    min-height: 100%;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    grid-template-areas:
      "top"
      "side"
      "work";
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .control-panel {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 18px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .workspace {
    height: auto;
    overflow: visible;
    grid-template-columns: 1fr;
    grid-template-rows: 480px 340px 380px auto;
  }

  .observation-workspace {
    grid-template-columns: 1fr;
    grid-template-rows: 420px 340px 320px auto;
    grid-template-areas:
      "obs-chart"
      "obs-map"
      "obs-lists"
      "obs-metrics";
  }

  .wrf-workspace {
    grid-template-columns: 1fr;
    grid-template-rows: 520px 340px 300px auto;
    grid-template-areas:
      "wrf-track"
      "wrf-intensity"
      "wrf-summary"
      "wrf-metrics";
  }

  .ranch-workspace {
    grid-template-columns: 1fr;
    grid-template-rows: 520px 360px 360px 300px auto;
    grid-template-areas:
      "ranch-map"
      "ranch-dashboard"
      "ranch-zones"
      "ranch-alerts"
      "ranch-data";
  }

  .map-stage,
  .metrics,
  .observation-map-stage,
  .observation-chart-stage,
  .ship-list-stage,
  .station-list-stage,
  .observation-lists-stage,
  .wrf-track-stage,
  .wrf-intensity-stage,
  .wrf-summary-stage,
  .wrf-metrics,
  .ranch-map-stage,
  .ranch-dashboard-stage,
  .ranch-zone-stage,
  .ranch-alert-stage,
  .ranch-data-stage,
  .obs-metrics {
    grid-column: auto;
    grid-row: auto;
  }

  .ranch-data-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .control-panel,
  .metrics {
    grid-template-columns: 1fr;
  }

  .workspace {
    padding: 10px;
    gap: 10px;
    grid-template-rows: 420px 300px 340px auto;
  }

  .map-stage,
  .profile-stage,
  .scene-stage {
    padding: 10px;
  }

  .stage-title {
    flex-direction: column;
  }

  .legend {
    min-width: 0;
  }

  .ranch-dashboard-grid,
  .ranch-zone-grid,
  .ranch-data-row {
    grid-template-columns: 1fr;
  }
}

/* HQFCS mission-control redesign. */
:root {
  --bg: #080b0f;
  --panel: #10151b;
  --panel-2: #151c24;
  --panel-glass: rgba(14, 20, 27, 0.94);
  --line: rgba(171, 194, 205, 0.16);
  --line-strong: rgba(56, 189, 248, 0.46);
  --text: #f3f7f8;
  --muted: #a2b1b8;
  --muted-2: #687982;
  --cyan: #22d3ee;
  --green: #84cc16;
  --amber: #f59e0b;
  --coral: #fb7185;
  --blue: #3b82f6;
  --violet: #a78bfa;
  --deep: #071827;
  --shadow: 0 18px 44px rgba(0, 0, 0, 0.42);
  --shadow-soft: 0 8px 20px rgba(0, 0, 0, 0.30);
  --panel-highlight: linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 42%);
}

body {
  background:
    linear-gradient(rgba(148, 163, 184, 0.024) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.020) 1px, transparent 1px),
    linear-gradient(180deg, #090d12, #070a0e);
  background-size: 32px 32px, 32px 32px, auto;
  color: var(--text);
}

body::before {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.018), transparent 14%),
    repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.008) 0 1px, transparent 1px 5px);
  opacity: 0.34;
}

body::after {
  background:
    linear-gradient(90deg, rgba(34, 211, 238, 0.022), transparent 26%, transparent 74%, rgba(245, 158, 11, 0.018)),
    linear-gradient(180deg, transparent 76%, rgba(0, 0, 0, 0.22));
}

.topbar {
  position: relative;
  min-height: 82px;
  padding: 12px 18px;
  border-top: 3px solid var(--cyan);
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(8, 12, 16, 0.96);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.38);
}

.topbar::after {
  content: "";
  position: absolute;
  right: 0;
  top: -3px;
  width: 35%;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--amber) 56%, var(--coral));
}

.brand {
  gap: 13px;
}

.brand-mark {
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 4px;
  background:
    linear-gradient(135deg, transparent 43%, rgba(255, 255, 255, 0.58) 44%, transparent 46%),
    conic-gradient(from 205deg, #22d3ee, #84cc16, #f59e0b, #fb7185, #3b82f6, #22d3ee);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.07), 0 14px 28px rgba(0, 0, 0, 0.42);
}

.brand-copy {
  min-width: 0;
}

.brand-eyebrow {
  display: block;
  margin-bottom: 3px;
  color: var(--cyan);
  font-family: Consolas, "Segoe UI", sans-serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0;
}

.brand h1 {
  color: #ffffff;
  font-size: 19px;
  font-weight: 760;
  text-shadow: none;
}

.brand p {
  margin-top: 2px;
  color: #7f929c;
  font-size: 11px;
}

.view-tabs {
  gap: 2px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.view-tabs button {
  position: relative;
  min-height: 39px;
  border-radius: 0;
  padding: 4px 16px;
  color: #7f929c;
  font-size: 13px;
  font-weight: 650;
}

.view-tabs button::after {
  content: "";
  position: absolute;
  right: 14px;
  bottom: -1px;
  left: 14px;
  height: 2px;
  background: transparent;
}

.view-tabs button:hover {
  color: #e9f0f2;
  background: rgba(255, 255, 255, 0.025);
}

.view-tabs button.active {
  color: #ffffff;
  background: rgba(34, 211, 238, 0.055);
  box-shadow: none;
}

.view-tabs button.active::after {
  background: var(--cyan);
  box-shadow: 0 0 14px rgba(34, 211, 238, 0.62);
}

.status-strip {
  gap: 6px;
}

.status-strip span {
  min-height: 30px;
  border-color: rgba(148, 163, 184, 0.18);
  border-radius: 3px;
  padding: 5px 9px;
  background: #10171d;
  color: #c8d4d8;
  font-family: Consolas, "Segoe UI", sans-serif;
  font-size: 11px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.status-strip span:first-child {
  border-left: 3px solid var(--green);
  color: #e7f6dc;
}

.control-panel {
  padding: 14px 16px 24px;
  border-right-color: rgba(148, 163, 184, 0.18);
  background:
    linear-gradient(90deg, rgba(34, 211, 238, 0.025), transparent 36%),
    #0c1116;
  scrollbar-color: #41515a #0c1116;
}

.control-panel::before {
  content: "CONTROL DECK";
  display: block;
  padding: 1px 0 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  color: #5f727d;
  font-family: Consolas, "Segoe UI", sans-serif;
  font-size: 10px;
  font-weight: 700;
}

.control-section {
  padding: 14px 0;
  border-bottom-color: rgba(148, 163, 184, 0.13);
}

.control-section:first-of-type {
  padding-top: 14px;
}

.control-section h2 {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
  color: #dce6e9;
  font-size: 12px;
  font-weight: 720;
}

.control-section h2::before {
  width: 12px;
  height: 2px;
  margin-right: 8px;
  border-radius: 0;
  background: var(--cyan);
  box-shadow: none;
}

.control-section:nth-of-type(3n + 2) h2::before {
  background: var(--amber);
}

.control-section:nth-of-type(3n) h2::before {
  background: var(--violet);
}

.segmented {
  gap: 3px;
  padding: 3px;
  border-color: rgba(148, 163, 184, 0.16);
  border-radius: 3px;
  background: #070b0f;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.42);
}

.segmented span {
  min-height: 34px;
  border-radius: 2px;
  color: #7f929c;
  font-size: 12px;
}

.segmented span:hover {
  color: #edf4f5;
  background: #121920;
}

.segmented input:checked + span {
  background: #19242c;
  color: #ffffff;
  box-shadow: inset 0 -2px 0 var(--cyan), inset 0 0 0 1px rgba(34, 211, 238, 0.22);
}

.select-grid label > span,
.number-grid label > span,
.range-row {
  color: #71838d;
  font-family: Consolas, "Segoe UI", sans-serif;
  font-size: 10px;
}

.number-grid input,
.select-grid select,
.mini-actions button,
.icon-button {
  border-color: rgba(148, 163, 184, 0.17);
  border-radius: 3px;
  background: #0a0f14;
  color: #dce6e9;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.mini-actions button:hover,
.icon-button:hover {
  border-color: rgba(34, 211, 238, 0.40);
  background: #142029;
}

.transport {
  gap: 5px;
}

.icon-button {
  width: 38px;
  height: 34px;
}

.toggle {
  min-height: 34px;
  color: #b9c6cb;
  font-size: 12px;
}

.toggle::after {
  width: 34px;
  height: 18px;
  border-color: rgba(148, 163, 184, 0.24);
  border-radius: 2px;
  background: #1b242b;
}

.toggle:has(input:checked)::after {
  border-color: rgba(34, 211, 238, 0.52);
  background:
    linear-gradient(90deg, var(--cyan) 0 48%, #18313a 48% 100%);
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.16);
}

.compact p {
  border: 0;
  border-left: 2px solid rgba(245, 158, 11, 0.54);
  border-radius: 0;
  background: #0a0f14;
  color: #8799a2;
}

.workspace {
  gap: 10px;
  padding: 12px;
  background:
    linear-gradient(rgba(148, 163, 184, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.016) 1px, transparent 1px),
    #090d12;
  background-size: 28px 28px, 28px 28px, auto;
}

.wrf-workspace {
  grid-template-columns: minmax(0, 1.62fr) minmax(340px, 0.78fr);
}

.map-stage,
.profile-stage,
.scene-stage,
.observation-list,
.observation-chart-stage,
.ranch-dashboard-stage,
.ranch-zone-stage,
.ranch-alert-stage,
.ranch-data-stage {
  border-color: rgba(148, 163, 184, 0.20);
  border-radius: 4px;
  background: #10161c;
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.map-stage,
.profile-stage,
.scene-stage {
  padding: 12px;
}

.map-stage {
  border-top: 2px solid var(--cyan);
}

.profile-stage {
  border-top: 2px solid var(--amber);
}

.scene-stage {
  border-top: 2px solid var(--violet);
}

.observation-chart-stage {
  border-top-color: var(--coral);
}

.observation-map-stage {
  border-top-color: var(--blue);
}

.ranch-map-stage {
  border-top-color: var(--green);
}

.map-stage::before,
.profile-stage::before,
.scene-stage::before,
.observation-list::before,
.observation-chart-stage::before,
.map-stage::after,
.profile-stage::after,
.scene-stage::after,
.observation-list::after,
.observation-chart-stage::after,
.ranch-dashboard-stage::after,
.ranch-zone-stage::after,
.ranch-alert-stage::after,
.ranch-data-stage::after {
  display: none;
}

.stage-title {
  align-items: center;
  min-height: 48px;
  margin: -4px -4px 10px;
  padding: 4px 4px 10px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.13);
}

.stage-title h2 {
  margin-bottom: 3px;
  color: #f4f7f8;
  font-size: 14px;
  font-weight: 760;
  text-shadow: none;
}

.stage-title h2::after {
  display: none;
}

.stage-title p {
  color: #7d9099;
  font-size: 11px;
}

.stage-tools {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.source-chip {
  display: inline-flex;
  min-height: 23px;
  align-items: center;
  border: 1px solid rgba(132, 204, 22, 0.30);
  border-radius: 3px;
  padding: 3px 7px;
  background: rgba(132, 204, 22, 0.065);
  color: #b8d58e;
  font-family: Consolas, "Segoe UI", sans-serif;
  font-size: 9px;
  white-space: nowrap;
}

.forecast-time-chip {
  border-color: rgba(83, 213, 224, 0.48);
  background: rgba(83, 213, 224, 0.10);
  color: #a6f3fb;
  letter-spacing: 0.04em;
}

.legend,
.legend-readout {
  min-width: 162px;
  color: #8799a2;
}

.legend::before,
.legend-readout::before {
  width: 104px;
  height: 7px;
  border-radius: 1px;
  box-shadow: none;
}

.typhoon-dot-legend {
  gap: 6px 10px;
  color: #aebdc3;
  font-size: 10px;
}

.typhoon-dot-legend i {
  width: 8px;
  height: 8px;
}

canvas {
  border-color: rgba(148, 163, 184, 0.10);
  border-radius: 2px;
  background:
    linear-gradient(rgba(92, 127, 145, 0.040) 1px, transparent 1px),
    linear-gradient(90deg, rgba(92, 127, 145, 0.035) 1px, transparent 1px),
    #07131b;
  background-size: 40px 40px, 40px 40px, auto;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.018), inset 0 0 42px rgba(0, 0, 0, 0.34);
}

.metrics {
  gap: 10px;
}

.metrics article,
.ranch-metric-card,
.ranch-zone-card,
.ranch-alert-item,
.ranch-data-row article,
.obs-summary article,
.obs-row {
  border-color: rgba(148, 163, 184, 0.16);
  border-radius: 3px;
  background: #10161c;
  box-shadow: var(--shadow-soft);
}

.metrics article {
  min-height: 82px;
  border-top: 2px solid rgba(34, 211, 238, 0.70);
  padding: 11px 13px;
}

.metrics article:nth-of-type(2) {
  border-top-color: rgba(245, 158, 11, 0.78);
}

.metrics article:nth-of-type(3) {
  border-top-color: rgba(251, 113, 133, 0.78);
}

.metrics article:nth-of-type(4) {
  border-top-color: rgba(167, 139, 250, 0.78);
}

.metrics article::before,
.ranch-metric-card::before,
.ranch-zone-card::before,
.ranch-alert-item::before {
  display: none;
}

.metrics span {
  color: #71838d;
  font-family: Consolas, "Segoe UI", sans-serif;
  font-size: 10px;
}

.metrics strong {
  margin-top: 5px;
  color: #ffffff;
  font-size: 23px;
  text-shadow: none;
}

.obs-row:hover,
.ranch-zone-card:hover,
.ranch-alert-item:hover,
.ranch-metric-card:hover {
  border-color: rgba(34, 211, 238, 0.38);
  background: #151f27;
}

.obs-row.active {
  border-color: rgba(34, 211, 238, 0.72);
  background: #14242c;
  box-shadow: inset 3px 0 0 var(--cyan);
}

.ranch-stage-badge {
  border-color: rgba(132, 204, 22, 0.34);
  border-radius: 3px;
  background: rgba(132, 204, 22, 0.07);
  color: #c4dea2;
}

@media (min-width: 981px) {
  .app-shell {
    grid-template-columns: 304px minmax(0, 1fr);
    grid-template-rows: 82px minmax(0, 1fr);
  }

  .workspace {
    grid-template-rows: minmax(270px, 1.18fr) minmax(245px, 0.86fr) 88px;
  }

  .observation-workspace {
    grid-template-rows: minmax(390px, 1fr) minmax(150px, 0.32fr) 88px;
  }

  .wrf-workspace {
    grid-template-rows: minmax(455px, 1.08fr) minmax(184px, 0.38fr);
  }
}

@media (max-width: 980px) {
  .topbar {
    gap: 12px;
  }

  .control-panel::before {
    grid-column: 1 / -1;
  }

  .stage-tools {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

@media (max-width: 640px) {
  .brand-eyebrow,
  .source-chip {
    display: none;
  }

  .brand h1 {
    font-size: 16px;
  }

  .view-tabs {
    width: 100%;
    overflow-x: auto;
  }

  .view-tabs button {
    flex: 1 0 auto;
    padding-right: 10px;
    padding-left: 10px;
  }
}

/* Scientific command UI · 2026-07-04
   Visual-only layer. Existing canvas rendering and application logic remain unchanged. */
:root {
  --bg: #030a11;
  --panel: #09131d;
  --panel-2: #0d1924;
  --panel-glass: rgba(8, 18, 28, 0.94);
  --line: rgba(137, 175, 199, 0.16);
  --line-strong: rgba(57, 220, 232, 0.48);
  --text: #eef8fb;
  --muted: #8da5b4;
  --muted-2: #526b79;
  --cyan: #39dce8;
  --green: #80e6b2;
  --amber: #f4bd67;
  --coral: #ff7c83;
  --blue: #71a7ff;
  --violet: #b99cff;
  --deep: #061829;
  --shadow: 0 18px 48px rgba(0, 3, 8, 0.46);
  --shadow-soft: 0 10px 28px rgba(0, 3, 8, 0.32);
  --panel-highlight:
    linear-gradient(135deg, rgba(57, 220, 232, 0.055), transparent 36%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.026), transparent 34%);
}

html {
  background: var(--bg);
}

body {
  background:
    radial-gradient(circle at 67% -12%, rgba(24, 122, 157, 0.18), transparent 36%),
    radial-gradient(circle at 100% 92%, rgba(103, 75, 177, 0.10), transparent 32%),
    linear-gradient(rgba(110, 162, 190, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(110, 162, 190, 0.024) 1px, transparent 1px),
    #030a11;
  background-size: auto, auto, 36px 36px, 36px 36px, auto;
  color: var(--text);
  font-family: Inter, "Segoe UI Variable", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  font-feature-settings: "tnum", "ss01";
}

body::before {
  background:
    linear-gradient(90deg, rgba(57, 220, 232, 0.03), transparent 18%, transparent 82%, rgba(185, 156, 255, 0.025)),
    repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.008) 0 1px, transparent 1px 6px);
  opacity: 0.7;
}

body::after {
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.06), transparent 16%, transparent 78%, rgba(0, 0, 0, 0.25)),
    radial-gradient(circle at 50% 40%, transparent 52%, rgba(0, 2, 6, 0.22));
}

button,
select,
input {
  font: inherit;
}

.app-shell {
  grid-template-columns: 292px minmax(0, 1fr);
  grid-template-rows: 78px minmax(0, 1fr);
}

.topbar {
  min-height: 78px;
  gap: 18px;
  padding: 10px 18px;
  border: 0;
  border-bottom: 1px solid rgba(117, 169, 197, 0.18);
  background:
    linear-gradient(90deg, rgba(57, 220, 232, 0.035), transparent 31%),
    rgba(3, 10, 17, 0.94);
  box-shadow: 0 12px 34px rgba(0, 3, 8, 0.44);
  backdrop-filter: blur(22px) saturate(120%);
}

.topbar::before {
  content: "";
  position: absolute;
  right: 18px;
  bottom: -1px;
  left: 18px;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(90deg, var(--cyan), transparent 28%, transparent 78%, rgba(185, 156, 255, 0.56));
}

.topbar::after {
  display: none;
}

.brand {
  gap: 13px;
  min-width: 390px;
}

.brand-mark {
  position: relative;
  width: 47px;
  height: 47px;
  border: 1px solid rgba(102, 226, 236, 0.36);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, rgba(57, 220, 232, 0.16) 0 21%, transparent 22%),
    radial-gradient(ellipse at 50% 50%, transparent 48%, rgba(57, 220, 232, 0.78) 49% 51%, transparent 52%),
    linear-gradient(90deg, transparent 48%, rgba(128, 230, 178, 0.75) 49% 51%, transparent 52%),
    linear-gradient(180deg, transparent 48%, rgba(113, 167, 255, 0.66) 49% 51%, transparent 52%),
    #071723;
  box-shadow:
    inset 0 0 24px rgba(57, 220, 232, 0.12),
    0 0 0 4px rgba(57, 220, 232, 0.035),
    0 0 30px rgba(57, 220, 232, 0.12);
}

.brand-mark::before {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(185, 156, 255, 0.44);
  border-radius: 50%;
  transform: rotate(38deg) scaleY(0.42);
}

.brand-mark::after {
  content: "";
  position: absolute;
  top: 7px;
  right: 5px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 10px var(--cyan), 0 0 22px var(--cyan);
}

.brand-eyebrow {
  margin-bottom: 4px;
  color: rgba(57, 220, 232, 0.88);
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.brand h1 {
  color: #f4fbfd;
  font-size: 18px;
  font-weight: 680;
  letter-spacing: 0.01em;
}

.brand p {
  margin-top: 3px;
  color: #698391;
  font-size: 10px;
  letter-spacing: 0.08em;
}

.view-tabs {
  align-self: stretch;
  gap: 1px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.view-tabs button {
  min-height: 46px;
  border-radius: 0;
  padding: 4px 14px;
  color: #6f8897;
  font-size: 12px;
  font-weight: 600;
}

.view-tabs button::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 5px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  transform: translateY(-50%);
}

.view-tabs button::after {
  right: 10px;
  bottom: 4px;
  left: 10px;
  height: 1px;
}

.view-tabs button:hover {
  color: #cce1e8;
  background: rgba(57, 220, 232, 0.025);
}

.view-tabs button.active {
  color: #f3fbfd;
  background: linear-gradient(180deg, transparent, rgba(57, 220, 232, 0.055));
}

.view-tabs button.active::before {
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
}

.status-strip {
  flex-wrap: nowrap;
  gap: 5px;
}

.status-strip span {
  position: relative;
  min-width: 72px;
  min-height: 42px;
  align-items: flex-end;
  justify-content: flex-start;
  border: 1px solid rgba(117, 169, 197, 0.14);
  border-radius: 6px;
  padding: 16px 9px 6px;
  background: rgba(10, 24, 35, 0.68);
  color: #d7e8ed;
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 10px;
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.status-strip span[data-label]::before {
  content: attr(data-label);
  position: absolute;
  top: 6px;
  left: 9px;
  color: #587382;
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.status-strip span:first-child {
  min-width: auto;
  border-left: 1px solid rgba(128, 230, 178, 0.24);
}

.status-strip .system-live {
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  color: #a8efc8;
  letter-spacing: 0.08em;
}

.system-live i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(128, 230, 178, 0.08), 0 0 13px var(--green);
  animation: live-pulse 2.4s ease-in-out infinite;
}

@keyframes live-pulse {
  50% {
    opacity: 0.52;
    transform: scale(0.78);
  }
}

.control-panel {
  counter-reset: control-section;
  padding: 15px 13px 28px;
  border-right: 1px solid rgba(117, 169, 197, 0.16);
  background:
    linear-gradient(180deg, rgba(57, 220, 232, 0.025), transparent 18%),
    rgba(4, 12, 20, 0.92);
  scrollbar-color: rgba(91, 130, 151, 0.62) rgba(3, 10, 17, 0.8);
}

.control-panel::before {
  content: "SYSTEM CONTROL  /  01";
  margin: 0 3px 12px;
  padding: 2px 0 11px;
  border-bottom: 1px solid rgba(117, 169, 197, 0.12);
  color: #527081;
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.control-section,
.control-section:first-of-type {
  counter-increment: control-section;
  margin-bottom: 8px;
  padding: 12px;
  border: 1px solid rgba(117, 169, 197, 0.12);
  border-radius: 7px;
  background:
    linear-gradient(135deg, rgba(57, 220, 232, 0.028), transparent 44%),
    rgba(8, 19, 29, 0.62);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.018);
}

.control-section h2 {
  margin-bottom: 11px;
  color: #cfe0e6;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.04em;
}

.control-section h2::before {
  width: 4px;
  height: 4px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 8px rgba(57, 220, 232, 0.58);
}

.control-section:nth-of-type(3n + 2) h2::before {
  background: var(--amber);
  box-shadow: 0 0 8px rgba(244, 189, 103, 0.48);
}

.control-section:nth-of-type(3n) h2::before {
  background: var(--violet);
  box-shadow: 0 0 8px rgba(185, 156, 255, 0.44);
}

.control-section h2::after {
  content: "0" counter(control-section);
  margin-left: auto;
  color: #3f5b6b;
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 8px;
  font-weight: 500;
}

.segmented {
  gap: 3px;
  padding: 3px;
  border: 1px solid rgba(117, 169, 197, 0.14);
  border-radius: 5px;
  background: rgba(2, 8, 14, 0.78);
}

.segmented span {
  min-height: 32px;
  border-radius: 3px;
  color: #6f8896;
  font-size: 11px;
}

.segmented span:hover {
  color: #d7e9ee;
  background: rgba(57, 220, 232, 0.04);
}

.segmented input:checked + span {
  background:
    linear-gradient(180deg, rgba(57, 220, 232, 0.11), rgba(57, 220, 232, 0.035)),
    #0b1c27;
  color: #effbfd;
  box-shadow: inset 0 0 0 1px rgba(57, 220, 232, 0.22), inset 0 -2px 0 var(--cyan);
}

.select-grid label > span,
.number-grid label > span,
.range-row {
  color: #58717f;
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 8px;
  letter-spacing: 0.08em;
}

.number-grid input,
.select-grid select,
.mini-actions button,
.icon-button {
  min-height: 32px;
  border: 1px solid rgba(117, 169, 197, 0.15);
  border-radius: 4px;
  background: rgba(2, 9, 15, 0.74);
  color: #c9dce2;
}

.mini-actions button:hover,
.icon-button:hover {
  border-color: rgba(57, 220, 232, 0.40);
  background: rgba(16, 43, 56, 0.72);
}

.toggle {
  min-height: 32px;
  color: #9fb2bc;
  font-size: 11px;
}

.toggle::after {
  width: 32px;
  height: 16px;
  border: 1px solid rgba(117, 169, 197, 0.18);
  border-radius: 999px;
  background:
    radial-gradient(circle at 8px 50%, #536773 0 3px, transparent 4px),
    #0b151d;
}

.toggle:has(input:checked)::after {
  border-color: rgba(57, 220, 232, 0.42);
  background:
    radial-gradient(circle at 23px 50%, #ecfeff 0 3px, transparent 4px),
    linear-gradient(90deg, rgba(57, 220, 232, 0.74), rgba(57, 220, 232, 0.20));
  box-shadow: 0 0 12px rgba(57, 220, 232, 0.12);
}

.range {
  height: 14px;
  accent-color: var(--cyan);
}

.fine-print,
.control-section p {
  color: #748b98;
}

.compact p {
  border: 0;
  border-left: 1px solid rgba(244, 189, 103, 0.42);
  border-radius: 0;
  background: rgba(2, 8, 14, 0.44);
}

.workspace {
  gap: 11px;
  padding: 13px;
  background:
    radial-gradient(circle at 45% 20%, rgba(24, 103, 133, 0.07), transparent 38%),
    linear-gradient(rgba(110, 162, 190, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(110, 162, 190, 0.016) 1px, transparent 1px),
    #040b12;
  background-size: auto, 28px 28px, 28px 28px, auto;
}

.map-stage,
.profile-stage,
.scene-stage,
.observation-list,
.observation-chart-stage,
.ranch-dashboard-stage,
.ranch-zone-stage,
.ranch-alert-stage,
.ranch-data-stage {
  border: 1px solid rgba(117, 169, 197, 0.16);
  border-radius: 9px;
  background:
    linear-gradient(135deg, rgba(57, 220, 232, 0.025), transparent 36%),
    rgba(7, 17, 27, 0.92);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.map-stage,
.profile-stage,
.scene-stage {
  padding: 11px;
}

.map-stage {
  border-top: 1px solid rgba(57, 220, 232, 0.38);
}

.profile-stage {
  border-top: 1px solid rgba(244, 189, 103, 0.38);
}

.scene-stage {
  border-top: 1px solid rgba(185, 156, 255, 0.38);
}

.map-stage::before,
.profile-stage::before,
.scene-stage::before,
.observation-list::before,
.observation-chart-stage::before,
.map-stage::after,
.profile-stage::after,
.scene-stage::after,
.observation-list::after,
.observation-chart-stage::after,
.ranch-dashboard-stage::after,
.ranch-zone-stage::after,
.ranch-alert-stage::after,
.ranch-data-stage::after {
  display: block;
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    linear-gradient(90deg, var(--cyan), transparent 68%) top left / 92px 1px no-repeat,
    linear-gradient(180deg, var(--cyan), transparent 68%) top left / 1px 56px no-repeat,
    linear-gradient(270deg, rgba(185, 156, 255, 0.54), transparent 68%) bottom right / 72px 1px no-repeat,
    linear-gradient(0deg, rgba(185, 156, 255, 0.54), transparent 68%) bottom right / 1px 42px no-repeat;
  opacity: 0.46;
}

.stage-title {
  position: relative;
  min-height: 53px;
  margin: 0 0 9px;
  padding: 15px 2px 9px;
  border-bottom: 1px solid rgba(117, 169, 197, 0.10);
}

.stage-title::before {
  content: attr(data-module);
  position: absolute;
  top: 0;
  left: 2px;
  color: #4f7183;
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.stage-title h2 {
  margin-bottom: 3px;
  color: #e8f4f7;
  font-size: 13px;
  font-weight: 660;
  letter-spacing: 0.03em;
}

.stage-title h2::after {
  display: none;
}

.stage-title p {
  color: #69818e;
  font-size: 10px;
}

.stage-tools {
  gap: 10px;
}

.source-chip,
.ranch-stage-badge {
  min-height: 22px;
  border: 1px solid rgba(128, 230, 178, 0.24);
  border-radius: 999px;
  padding: 3px 8px;
  background: rgba(128, 230, 178, 0.055);
  color: #9dcab2;
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 8px;
  letter-spacing: 0.04em;
}

.legend,
.legend-readout {
  min-width: 156px;
  color: #66808e;
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 8px;
}

.legend::before,
.legend-readout::before {
  width: 98px;
  height: 6px;
  border-radius: 999px;
  box-shadow: 0 0 12px rgba(57, 220, 232, 0.15);
}

.legend.windy-velocity::before,
.legend-readout.windy-velocity::before {
  background: linear-gradient(
    90deg,
    #3f3e97 0%,
    #3e67b2 14%,
    #3799b8 30%,
    #44b88e 46%,
    #69c665 62%,
    #b8c466 76%,
    #dea666 88%,
    #be6375 96%,
    #834683 100%
  );
  box-shadow:
    0 0 12px rgba(74, 181, 157, 0.16),
    inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

canvas {
  border: 1px solid rgba(117, 169, 197, 0.10);
  border-radius: 5px;
  background:
    linear-gradient(rgba(80, 134, 159, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(80, 134, 159, 0.03) 1px, transparent 1px),
    radial-gradient(circle at 50% 44%, rgba(16, 68, 91, 0.22), transparent 62%),
    #03101a;
  background-size: 32px 32px, 32px 32px, auto, auto;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.012), inset 0 0 48px rgba(0, 2, 7, 0.42);
}

.metrics {
  gap: 11px;
}

.metrics article,
.ranch-metric-card,
.ranch-zone-card,
.ranch-alert-item,
.ranch-data-row article,
.obs-summary article,
.obs-row {
  border: 1px solid rgba(117, 169, 197, 0.14);
  border-radius: 7px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--metric-accent, var(--cyan)) 5%, transparent), transparent 48%),
    rgba(7, 17, 27, 0.82);
  box-shadow: var(--shadow-soft), inset 0 1px 0 rgba(255, 255, 255, 0.018);
}

.metrics article {
  --metric-accent: var(--cyan);
  min-height: 82px;
  border-top: 1px solid color-mix(in srgb, var(--metric-accent) 58%, transparent);
  padding: 11px 13px 12px;
}

.metrics article:nth-of-type(2) {
  --metric-accent: var(--amber);
}

.metrics article:nth-of-type(3) {
  --metric-accent: var(--coral);
}

.metrics article:nth-of-type(4) {
  --metric-accent: var(--violet);
}

.metrics article::before {
  display: block;
  content: "";
  position: absolute;
  top: 12px;
  right: 12px;
  width: 28px;
  height: 12px;
  border-top: 1px solid color-mix(in srgb, var(--metric-accent) 58%, transparent);
  border-right: 1px solid color-mix(in srgb, var(--metric-accent) 32%, transparent);
  opacity: 0.64;
  transform: skewX(-26deg);
}

.metrics article::after {
  display: block;
  content: "";
  position: absolute;
  right: 13px;
  bottom: 10px;
  left: 13px;
  height: 1px;
  background: linear-gradient(90deg, var(--metric-accent), transparent 76%);
  opacity: 0.20;
}

.metrics span {
  color: #6c8491;
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 8px;
  letter-spacing: 0.08em;
}

.metrics strong {
  margin-top: 5px;
  color: #f3fbfd;
  font-size: 22px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.obs-row:hover,
.ranch-zone-card:hover,
.ranch-alert-item:hover,
.ranch-metric-card:hover {
  border-color: rgba(57, 220, 232, 0.34);
  background: rgba(11, 29, 42, 0.92);
  transform: translateY(-1px);
}

.obs-row.active {
  border-color: rgba(57, 220, 232, 0.58);
  background: rgba(12, 38, 49, 0.88);
  box-shadow: inset 2px 0 0 var(--cyan);
}

button:focus-visible,
select:focus-visible,
input:focus-visible {
  outline: 1px solid var(--cyan);
  outline-offset: 2px;
}

@media (min-width: 981px) {
  .app-shell {
    grid-template-columns: 292px minmax(0, 1fr);
    grid-template-rows: 78px minmax(0, 1fr);
  }

  .workspace {
    grid-template-rows: minmax(270px, 1.18fr) minmax(245px, 0.86fr) 84px;
  }

  .observation-workspace {
    grid-template-rows: minmax(390px, 1fr) minmax(150px, 0.32fr) 84px;
  }
}

@media (max-width: 1240px) {
  .brand {
    min-width: 330px;
  }

  .brand p {
    display: none;
  }

  .view-tabs button {
    padding-right: 10px;
    padding-left: 10px;
  }

  .status-strip .system-live {
    display: none;
  }
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
  }

  .topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    padding: 12px 14px;
  }

  .brand {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
  }

  .view-tabs {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .status-strip {
    grid-column: 2;
    grid-row: 1;
    justify-content: flex-end;
  }

  .control-panel {
    gap: 10px;
    padding: 12px;
  }

  .control-section,
  .control-section:first-of-type {
    margin-bottom: 0;
  }
}

@media (max-width: 640px) {
  .topbar {
    display: flex;
    gap: 10px;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
  }

  .brand h1 {
    font-size: 15px;
  }

  .status-strip span {
    flex: 1 1 30%;
  }

  .workspace {
    padding: 9px;
  }

  .stage-title {
    align-items: flex-start;
    gap: 8px;
  }

  .stage-tools {
    width: 100%;
  }
}

/* Canva proposal 01 · Graphite signal system · 2026-07-04
   Visual-only override. Data contracts, canvas renderers and interaction IDs stay intact. */
:root {
  --bg: #151515;
  --panel: #252525;
  --panel-2: #303030;
  --panel-glass: rgba(31, 31, 31, 0.96);
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(0, 194, 232, 0.70);
  --text: #f4f4f0;
  --muted: #b8b8b2;
  --muted-2: #777771;
  --cyan: #00c2e8;
  --green: #55d6a4;
  --amber: #ffc400;
  --coral: #ff6f61;
  --blue: #5f7cff;
  --violet: #d35fe8;
  --deep: #101416;
  --shadow: 0 18px 42px rgba(0, 0, 0, 0.34);
  --shadow-soft: 0 9px 24px rgba(0, 0, 0, 0.24);
  --panel-highlight:
    linear-gradient(145deg, rgba(255, 255, 255, 0.035), transparent 34%),
    linear-gradient(90deg, rgba(0, 194, 232, 0.025), transparent 28%);
}

html {
  background: #151515;
}

body {
  background:
    linear-gradient(rgba(255, 255, 255, 0.016) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.014) 1px, transparent 1px),
    linear-gradient(135deg, #171717, #111111 68%);
  background-size: 32px 32px, 32px 32px, auto;
  color: var(--text);
  font-family: "Segoe UI Variable", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
}

body::before {
  background:
    linear-gradient(90deg, rgba(0, 194, 232, 0.04), transparent 22%, transparent 78%, rgba(255, 196, 0, 0.035)),
    repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.006) 0 1px, transparent 1px 7px);
  opacity: 0.66;
}

body::after {
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.02), transparent 18%, transparent 82%, rgba(0, 0, 0, 0.28)),
    radial-gradient(circle at 52% 42%, transparent 50%, rgba(0, 0, 0, 0.20));
}

* {
  scrollbar-color: #5d5d58 #1b1b1b;
}

.app-shell {
  grid-template-columns: 278px minmax(0, 1fr);
  grid-template-rows: 82px minmax(0, 1fr);
}

.topbar {
  min-height: 82px;
  gap: 18px;
  padding: 9px 18px;
  border-bottom: 2px solid var(--amber);
  background:
    linear-gradient(90deg, #353535 0 278px, #202020 278px 100%);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(18px) saturate(92%);
}

.topbar::before {
  top: 0;
  right: auto;
  bottom: 0;
  left: 278px;
  width: 1px;
  height: auto;
  background: var(--cyan);
  box-shadow: 0 0 18px rgba(0, 194, 232, 0.38);
}

.topbar::after {
  display: block;
  content: "LIVE DATA OPERATIONS";
  position: absolute;
  right: 18px;
  bottom: -17px;
  z-index: 2;
  padding: 2px 8px;
  background: var(--amber);
  color: #181818;
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.13em;
}

.brand {
  gap: 12px;
  min-width: 400px;
}

.brand-mark {
  width: 48px;
  height: 48px;
  border: 1px solid var(--cyan);
  border-radius: 3px;
  background:
    linear-gradient(90deg, transparent 48%, rgba(0, 194, 232, 0.84) 49% 51%, transparent 52%),
    linear-gradient(180deg, transparent 48%, rgba(255, 196, 0, 0.88) 49% 51%, transparent 52%),
    linear-gradient(135deg, transparent 45%, rgba(255, 255, 255, 0.18) 46% 48%, transparent 49%),
    #191919;
  box-shadow:
    inset 0 0 0 6px #303030,
    0 0 0 3px rgba(0, 194, 232, 0.07);
}

.brand-mark::before {
  inset: 8px;
  border: 1px solid rgba(255, 196, 0, 0.74);
  border-radius: 0;
  transform: rotate(45deg);
}

.brand-mark::after {
  top: 5px;
  right: 5px;
  width: 6px;
  height: 6px;
  border-radius: 0;
  background: var(--amber);
  box-shadow: -34px 34px 0 var(--cyan);
}

.brand-eyebrow {
  margin-bottom: 3px;
  color: var(--cyan);
  font-size: 8px;
  letter-spacing: 0.16em;
}

.brand h1 {
  color: var(--amber);
  font-size: 19px;
  font-weight: 720;
  letter-spacing: 0;
}

.brand p {
  margin-top: 3px;
  color: #aaa9a2;
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 8px;
  letter-spacing: 0.07em;
}

.view-tabs {
  align-self: center;
  gap: 0;
  min-height: 44px;
  border: 1px solid #4b4b48;
  background: #181818;
}

.view-tabs button {
  min-height: 42px;
  border-right: 1px solid #41413e;
  padding: 5px 15px;
  color: #a7a7a1;
  font-size: 11px;
  font-weight: 650;
}

.view-tabs button:last-child {
  border-right: 0;
}

.view-tabs button::before {
  left: 8px;
  border-radius: 0;
}

.view-tabs button::after {
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
}

.view-tabs button:hover {
  color: #ffffff;
  background: #2c2c2c;
}

.view-tabs button.active {
  color: #131313;
  background: var(--cyan);
}

.view-tabs button.active::before {
  background: var(--amber);
  box-shadow: none;
}

.view-tabs button.active::after {
  background: var(--amber);
}

.status-strip {
  gap: 4px;
}

.status-strip span {
  min-width: 74px;
  min-height: 43px;
  border: 1px solid #4a4a46;
  border-radius: 2px;
  padding: 17px 9px 6px;
  background: #2b2b2b;
  color: #f4f4ef;
  box-shadow: inset 0 -2px 0 rgba(0, 194, 232, 0.28);
}

.status-strip span[data-label]::before {
  color: var(--cyan);
}

.status-strip .system-live {
  border-color: rgba(85, 214, 164, 0.42);
  border-left: 3px solid var(--green);
  color: #baf1d7;
}

.control-panel {
  padding: 17px 12px 30px;
  border-right: 1px solid #4a4a47;
  background:
    linear-gradient(180deg, rgba(0, 194, 232, 0.045), transparent 16%),
    #202020;
}

.control-panel::before {
  content: "HQFCS  /  CONTROL DECK";
  margin: 0 4px 12px;
  padding: 3px 0 11px;
  border-bottom: 1px solid #474744;
  color: var(--amber);
  font-size: 8px;
  letter-spacing: 0.16em;
}

.control-section,
.control-section:first-of-type {
  margin-bottom: 7px;
  padding: 11px;
  border: 1px solid #474744;
  border-radius: 3px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.025), transparent 40%),
    #303030;
  box-shadow: inset 3px 0 0 rgba(0, 194, 232, 0.12);
}

.control-section:nth-of-type(3n + 2) {
  box-shadow: inset 3px 0 0 rgba(255, 196, 0, 0.14);
}

.control-section h2 {
  margin-bottom: 10px;
  color: #f2f2ed;
  font-size: 11px;
  font-weight: 700;
}

.control-section h2::before {
  width: 5px;
  height: 5px;
  border-radius: 0;
  background: var(--cyan);
  box-shadow: none;
}

.control-section:nth-of-type(3n + 2) h2::before {
  background: var(--amber);
  box-shadow: none;
}

.control-section:nth-of-type(3n) h2::before {
  background: #ffffff;
  box-shadow: none;
}

.control-section h2::after {
  color: #7d7d77;
}

.segmented {
  gap: 2px;
  padding: 2px;
  border: 1px solid #50504c;
  border-radius: 2px;
  background: #181818;
}

.segmented span {
  min-height: 32px;
  border-radius: 1px;
  color: #a1a19b;
}

.segmented span:hover {
  color: #ffffff;
  background: #363636;
}

.segmented input:checked + span {
  background: var(--cyan);
  color: #131313;
  font-weight: 750;
  box-shadow: inset 0 -3px 0 var(--amber);
}

.number-grid input,
.select-grid select,
.mini-actions button,
.icon-button {
  min-height: 32px;
  border: 1px solid #52524e;
  border-radius: 2px;
  background: #1b1b1b;
  color: #eeeeea;
}

.select-grid select:focus,
.number-grid input:focus {
  border-color: var(--cyan);
}

.mini-actions button:hover,
.icon-button:hover {
  border-color: var(--amber);
  background: #3b3b3b;
  color: var(--amber);
}

.toggle {
  min-height: 31px;
  color: #cacac4;
}

.toggle::after {
  width: 34px;
  height: 16px;
  border: 1px solid #595954;
  border-radius: 2px;
  background:
    linear-gradient(90deg, #64645f 0 9px, transparent 9px),
    #1b1b1b;
}

.toggle:has(input:checked)::after {
  border-color: var(--cyan);
  background:
    linear-gradient(90deg, transparent 0 22px, var(--amber) 22px 31px, transparent 31px),
    rgba(0, 194, 232, 0.20);
  box-shadow: none;
}

.range {
  accent-color: var(--amber);
}

.range::-webkit-slider-thumb {
  box-shadow: 0 0 0 3px rgba(0, 194, 232, 0.14);
}

.fine-print,
.control-section p {
  color: #adada7;
}

.compact p {
  border-left-color: var(--amber);
  background: #252525;
}

.workspace {
  gap: 10px;
  padding: 12px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.013) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.012) 1px, transparent 1px),
    #171717;
  background-size: 28px 28px, 28px 28px, auto;
}

.map-stage,
.profile-stage,
.scene-stage,
.observation-list,
.observation-chart-stage,
.ranch-dashboard-stage,
.ranch-zone-stage,
.ranch-alert-stage,
.ranch-data-stage {
  border: 1px solid #494946;
  border-radius: 4px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.025), transparent 35%),
    #292929;
  box-shadow: var(--shadow);
}

.map-stage,
.profile-stage,
.scene-stage {
  padding: 10px;
}

.map-stage {
  border-top: 2px solid var(--cyan);
}

.profile-stage {
  border-top: 2px solid var(--amber);
}

.scene-stage {
  border-top: 2px solid #8d8d86;
}

.map-stage::before,
.profile-stage::before,
.scene-stage::before,
.observation-list::before,
.observation-chart-stage::before,
.map-stage::after,
.profile-stage::after,
.scene-stage::after,
.observation-list::after,
.observation-chart-stage::after,
.ranch-dashboard-stage::after,
.ranch-zone-stage::after,
.ranch-alert-stage::after,
.ranch-data-stage::after {
  border-radius: inherit;
  background:
    linear-gradient(90deg, var(--cyan), transparent 75%) top left / 112px 1px no-repeat,
    linear-gradient(180deg, var(--cyan), transparent 75%) top left / 1px 64px no-repeat,
    linear-gradient(270deg, var(--amber), transparent 75%) bottom right / 90px 1px no-repeat,
    linear-gradient(0deg, var(--amber), transparent 75%) bottom right / 1px 48px no-repeat;
  opacity: 0.72;
}

.stage-title {
  min-height: 54px;
  margin-bottom: 8px;
  padding: 16px 2px 9px;
  border-bottom: 1px solid #454541;
}

.stage-title::before {
  color: var(--amber);
  font-size: 7px;
  letter-spacing: 0.17em;
}

.stage-title h2 {
  color: var(--cyan);
  font-size: 14px;
  font-weight: 720;
}

.stage-title p {
  color: #aaa9a2;
}

.source-chip,
.ranch-stage-badge {
  min-height: 23px;
  border: 1px solid rgba(255, 196, 0, 0.56);
  border-radius: 2px;
  background: rgba(255, 196, 0, 0.08);
  color: #ffe481;
}

.legend,
.legend-readout {
  color: #b8b8b2;
}

canvas {
  border: 1px solid #4c4c48;
  border-radius: 2px;
  background:
    linear-gradient(rgba(0, 194, 232, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 194, 232, 0.035) 1px, transparent 1px),
    radial-gradient(circle at 48% 42%, rgba(0, 95, 118, 0.15), transparent 62%),
    #101719;
  background-size: 34px 34px, 34px 34px, auto, auto;
  box-shadow: inset 0 0 54px rgba(0, 0, 0, 0.40);
}

.metrics {
  gap: 10px;
}

.metrics article,
.ranch-metric-card,
.ranch-zone-card,
.ranch-alert-item,
.ranch-data-row article,
.obs-summary article,
.obs-row {
  border: 1px solid #494946;
  border-radius: 3px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.025), transparent 46%),
    #303030;
  box-shadow: var(--shadow-soft);
}

.metrics article {
  min-height: 76px;
  border-top: 2px solid var(--metric-accent, var(--cyan));
  padding: 10px 13px;
}

.metrics article:nth-of-type(1),
.metrics article:nth-of-type(3) {
  --metric-accent: var(--cyan);
}

.metrics article:nth-of-type(2),
.metrics article:nth-of-type(4) {
  --metric-accent: var(--amber);
}

.metrics article::before {
  width: 30px;
  height: 10px;
  border-top-color: var(--metric-accent);
  border-right-color: var(--metric-accent);
  opacity: 0.74;
}

.metrics article::after {
  background: linear-gradient(90deg, var(--metric-accent), transparent 78%);
  opacity: 0.32;
}

.metrics span {
  color: #adada7;
}

.metrics strong {
  color: var(--amber);
  font-size: 21px;
  font-weight: 720;
  letter-spacing: 0;
}

.ranch-metric-card strong,
.obs-summary strong,
.ranch-data-row strong {
  color: var(--amber);
}

.ranch-zone-card b,
.ranch-alert-item strong,
.obs-pill {
  color: var(--cyan);
}

.obs-row:hover,
.ranch-zone-card:hover,
.ranch-alert-item:hover,
.ranch-metric-card:hover {
  border-color: var(--cyan);
  background: #383838;
  transform: translateY(-1px);
}

.obs-row.active {
  border-color: var(--cyan);
  background: #353535;
  box-shadow: inset 3px 0 0 var(--amber);
}

.typhoon-dot-legend i {
  box-shadow: 0 0 0 2px #202020, 0 0 8px currentColor;
}

button:focus-visible,
select:focus-visible,
input:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}

@media (min-width: 981px) {
  .app-shell {
    grid-template-columns: 278px minmax(0, 1fr);
    grid-template-rows: 82px minmax(0, 1fr);
  }

  .workspace {
    grid-template-rows: minmax(285px, 1.22fr) minmax(236px, 0.82fr) 78px;
  }

  .observation-workspace {
    grid-template-rows: minmax(390px, 1fr) minmax(150px, 0.32fr) 78px;
  }
}

@media (max-width: 1240px) {
  .topbar {
    background: #202020;
  }

  .topbar::before {
    left: 0;
  }
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    width: 100%;
    max-width: 100%;
  }

  .topbar {
    padding: 12px 14px 10px;
    border-bottom-width: 2px;
  }

  .brand {
    min-width: 0;
    width: 100%;
  }

  .topbar::before {
    top: auto;
    right: 14px;
    bottom: 0;
    left: 14px;
    width: auto;
    height: 1px;
  }

  .topbar::after {
    display: none;
  }

  .control-panel {
    padding: 12px;
  }
}

@media (max-width: 640px) {
  .topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }

  .brand {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
    max-width: 100%;
  }

  .brand-copy {
    min-width: 0;
  }

  .brand h1 {
    font-size: 14px;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .brand-eyebrow {
    font-size: 7px;
  }

  .brand p {
    display: none;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
  }

  .view-tabs {
    grid-column: 1;
    grid-row: 2;
    width: 100%;
    min-width: 0;
  }

  .view-tabs button {
    flex: 1 1 0;
    min-width: 0;
    padding-inline: 7px;
  }

  .status-strip {
    grid-column: 1;
    grid-row: 3;
    width: 100%;
    min-width: 0;
  }

  .status-strip span {
    min-width: 0;
  }

  .control-panel,
  .workspace,
  .control-section {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .workspace {
    padding: 8px;
  }
}

/* WRF dedicated diagnostic workspace · 2026-07-05
   Keeps the geographic plot near its natural aspect and gives diagnostics a readable column. */
@media (min-width: 981px) {
  .wrf-workspace {
    grid-template-columns: minmax(0, 1.28fr) minmax(360px, 0.92fr);
    grid-template-rows: minmax(205px, 0.36fr) minmax(250px, 0.54fr) 104px;
    grid-template-areas:
      "wrf-track wrf-summary"
      "wrf-track wrf-intensity"
      "wrf-metrics wrf-intensity";
    align-items: stretch;
  }

  .wrf-track-stage,
  .wrf-intensity-stage,
  .wrf-summary-stage,
  .wrf-metrics {
    min-width: 0;
    min-height: 0;
  }

  .wrf-workspace .wrf-track-stage {
    grid-area: wrf-track;
  }

  .wrf-summary-stage {
    grid-area: wrf-summary;
  }

  .wrf-intensity-stage {
    grid-area: wrf-intensity;
  }

  .wrf-workspace .wrf-metrics {
    grid-area: wrf-metrics;
    align-self: stretch;
    height: 100%;
  }
}

.wrf-workspace .stage-title {
  min-height: 58px;
  padding-top: 18px;
}

.wrf-workspace .stage-title h2 {
  font-size: 15px;
  line-height: 1.25;
}

.wrf-workspace .stage-title p {
  margin-top: 4px;
  color: #c2c2bc;
  font-size: 11px;
  line-height: 1.45;
}

.wrf-track-stage .stage-title {
  align-items: center;
}

.wrf-track-stage .stage-tools {
  max-width: 58%;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.wrf-track-stage .typhoon-dot-legend {
  gap: 7px 11px;
  color: #e7e7e1;
  font-size: 11px;
  font-weight: 650;
}

.wrf-track-stage .typhoon-dot-legend i {
  width: 11px;
  height: 11px;
}

.wrf-track-stage canvas,
.wrf-intensity-stage canvas,
.wrf-summary-stage canvas {
  border-color: #5b5b56;
}

.wrf-summary-stage {
  border-top-color: var(--cyan);
}

.wrf-intensity-stage {
  border-top-color: var(--amber);
}

.wrf-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 7px;
}

.wrf-metrics article {
  min-height: 0;
  padding: 9px 11px;
  justify-content: center;
}

.wrf-metrics span {
  color: #c2c2bc;
  font-size: 10px;
  font-weight: 650;
}

.wrf-metrics strong {
  margin-top: 5px;
  color: var(--amber);
  font-size: 20px;
  font-weight: 760;
}

.wrf-metrics .diagnostic-note {
  grid-column: 1 / -1;
  margin: 0;
  padding-left: 8px;
  border-left: 2px solid var(--cyan);
  color: #b6b6b0;
  font-size: 10px;
  line-height: 1.35;
}

@media (max-width: 1180px) and (min-width: 981px) {
  .wrf-workspace {
    grid-template-columns: minmax(0, 1.12fr) minmax(340px, 0.88fr);
  }

  .wrf-track-stage .stage-title {
    align-items: flex-start;
  }

  .wrf-track-stage .stage-tools {
    max-width: 54%;
  }

  .wrf-track-stage .source-chip {
    display: none;
  }
}

@media (max-width: 980px) {
  .wrf-workspace {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: 540px 270px 500px auto;
    grid-template-areas:
      "wrf-track"
      "wrf-summary"
      "wrf-intensity"
      "wrf-metrics";
  }

  .wrf-track-stage .stage-tools {
    max-width: 62%;
  }

  .wrf-metrics {
    height: auto;
  }
}

@media (max-width: 640px) {
  .wrf-workspace {
    grid-template-rows: 440px 280px 560px auto;
  }

  .wrf-track-stage .stage-title {
    display: block;
  }

  .wrf-track-stage .stage-tools {
    width: 100%;
    max-width: none;
    margin-top: 9px;
    justify-content: flex-start;
  }

  .wrf-track-stage .source-chip {
    display: none;
  }

  .wrf-track-stage .typhoon-dot-legend {
    justify-content: flex-start;
    font-size: 10px;
  }

  .wrf-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .wrf-metrics .diagnostic-note {
    grid-column: 1 / -1;
  }
}

/* Coupled forecast readability and zoom resilience · 2026-07-05
   Designed for common browser zoom equivalents from 1280px to 2400px CSS viewports. */
:root {
  --forecast-rail: clamp(266px, 16.5vw, 316px);
  --forecast-topbar: 88px;
  --forecast-panel: #0d1b20;
  --forecast-panel-raised: #11242a;
  --forecast-line: rgba(146, 192, 199, 0.25);
  --forecast-line-strong: rgba(83, 213, 224, 0.48);
}

html[data-active-view="model"] body {
  background:
    linear-gradient(rgba(116, 178, 188, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(116, 178, 188, 0.02) 1px, transparent 1px),
    radial-gradient(circle at 13% 7%, rgba(29, 139, 161, 0.14), transparent 30%),
    linear-gradient(135deg, #071216 0%, #0b181d 48%, #071115 100%);
  background-size: 32px 32px, 32px 32px, auto, auto;
}

@media (min-width: 981px) {
  html[data-active-view="model"] .app-shell {
    grid-template-columns: var(--forecast-rail) minmax(0, 1fr);
    grid-template-rows: var(--forecast-topbar) minmax(0, 1fr);
  }
}

html[data-active-view="model"] .topbar {
  min-height: var(--forecast-topbar);
  padding: 10px 20px;
  border-bottom: 1px solid rgba(83, 213, 224, 0.42);
  background:
    linear-gradient(90deg, rgba(7, 18, 22, 0.98), rgba(11, 24, 29, 0.96)),
    none;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.34);
}

html[data-active-view="model"] .topbar::before {
  left: var(--forecast-rail);
  background: rgba(83, 213, 224, 0.44);
}

html[data-active-view="model"] .topbar::after {
  bottom: -16px;
  background: var(--cyan);
  color: #041115;
  font-size: 8px;
}

html[data-active-view="model"] .brand {
  min-width: 390px;
}

html[data-active-view="model"] .brand-mark {
  width: 50px;
  height: 50px;
  border-color: rgba(83, 213, 224, 0.62);
  background:
    linear-gradient(90deg, transparent 48%, rgba(83, 213, 224, 0.92) 49% 51%, transparent 52%),
    linear-gradient(180deg, transparent 48%, rgba(242, 184, 75, 0.92) 49% 51%, transparent 52%),
    linear-gradient(135deg, transparent 45%, rgba(255, 255, 255, 0.20) 46% 48%, transparent 49%),
    #0b171c;
}

html[data-active-view="model"] .brand-eyebrow {
  color: #7adfe7;
  font-size: 9px;
}

html[data-active-view="model"] .brand h1 {
  color: #f5f9f8;
  font-size: 21px;
  font-weight: 760;
}

html[data-active-view="model"] .brand p {
  color: #9fb2b6;
  font-size: 9px;
}

html[data-active-view="model"] .view-tabs {
  border-color: var(--forecast-line);
  background: rgba(4, 13, 16, 0.80);
}

html[data-active-view="model"] .view-tabs button {
  min-height: 44px;
  padding-inline: 16px;
  border-color: rgba(146, 192, 199, 0.16);
  color: #b8c8ca;
  font-size: 13px;
}

html[data-active-view="model"] .view-tabs button.active {
  background: #153d47;
  color: #ffffff;
  box-shadow: inset 0 -3px 0 var(--amber);
}

html[data-active-view="model"] .status-strip span {
  min-width: 80px;
  min-height: 46px;
  border-color: var(--forecast-line);
  background: rgba(12, 29, 34, 0.88);
  color: #edf7f6;
  font-size: 11px;
}

html[data-active-view="model"] .forecast-control-panel {
  padding: 18px 13px 28px;
  border-right-color: var(--forecast-line);
  background:
    linear-gradient(180deg, rgba(83, 213, 224, 0.055), transparent 18%),
    #09171b;
  scrollbar-color: rgba(83, 213, 224, 0.56) rgba(255, 255, 255, 0.04);
}

html[data-active-view="model"] .forecast-control-panel::before {
  content: "COUPLED FORECAST  /  CONTROL";
  margin: 0 5px 13px;
  border-bottom-color: var(--forecast-line);
  color: #78dce5;
  font-size: 9px;
}

html[data-active-view="model"] .forecast-control-panel .control-section {
  margin-bottom: 9px;
  padding: 13px;
  border-color: var(--forecast-line);
  border-radius: 6px;
  background:
    linear-gradient(135deg, rgba(83, 213, 224, 0.035), transparent 44%),
    var(--forecast-panel);
  box-shadow: inset 3px 0 0 rgba(83, 213, 224, 0.24);
}

html[data-active-view="model"] .forecast-control-panel .control-section:nth-of-type(2n) {
  box-shadow: inset 3px 0 0 rgba(242, 184, 75, 0.26);
}

html[data-active-view="model"] .forecast-control-panel .control-section h2 {
  margin-bottom: 12px;
  color: #f0f7f6;
  font-size: 13px;
  font-weight: 760;
}

html[data-active-view="model"] .forecast-control-panel .control-section h3 {
  margin: 13px 0 7px;
  color: #9eb6bb;
  font-size: 11px;
  font-weight: 650;
}

html[data-active-view="model"] .forecast-source-section h3:first-of-type {
  margin-top: 0;
}

html[data-active-view="model"] .forecast-control-panel .segmented span {
  min-height: 38px;
  color: #b6c5c7;
  font-size: 12px;
  font-weight: 650;
}

html[data-active-view="model"] .forecast-control-panel .segmented input:checked + span {
  background: #174754;
  color: #ffffff;
  box-shadow: inset 0 -3px 0 var(--amber);
}

html[data-active-view="model"] .forecast-control-panel .select-grid {
  gap: 8px;
}

html[data-active-view="model"] .forecast-control-panel .select-grid label > span,
html[data-active-view="model"] .forecast-control-panel .number-grid label > span,
html[data-active-view="model"] .forecast-control-panel .range-row,
html[data-active-view="model"] .forecast-control-panel .fine-print {
  color: #9fb1b5;
  font-size: 11px;
  line-height: 1.55;
}

html[data-active-view="model"] .forecast-control-panel select,
html[data-active-view="model"] .forecast-control-panel input[type="number"],
html[data-active-view="model"] .forecast-control-panel button {
  min-height: 36px;
  border-color: rgba(146, 192, 199, 0.28);
  background: #071418;
  color: #edf7f6;
  font-size: 12px;
}

html[data-active-view="model"] .layer-control-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 10px;
}

html[data-active-view="model"] .layer-control-grid .toggle {
  min-width: 0;
  min-height: 37px;
  gap: 6px;
  color: #d0dcdd;
  font-size: 12px;
}

html[data-active-view="model"] .layer-control-grid .toggle::after {
  width: 31px;
  flex: 0 0 31px;
}

html[data-active-view="model"] .control-subgroup + .control-subgroup {
  margin-top: 13px;
  padding-top: 12px;
  border-top: 1px solid rgba(146, 192, 199, 0.16);
}

html[data-active-view="model"] .control-subgroup h3 {
  margin-top: 0;
}

html[data-active-view="model"] .forecast-control-panel .transport {
  gap: 7px;
  margin-bottom: 8px;
}

html[data-active-view="model"] .forecast-control-panel .icon-button {
  width: 38px;
  min-width: 38px;
  font-size: 16px;
}

html[data-active-view="model"][data-forecast-model="wrf"] .mit-only-control,
html[data-active-view="model"][data-forecast-model="wrf"] .mit-only-layer {
  display: none;
}

html[data-active-view="model"] .forecast-access-details {
  margin: 3px 1px 0;
  border: 1px solid var(--forecast-line);
  border-radius: 6px;
  background: rgba(10, 28, 33, 0.84);
}

html[data-active-view="model"] .forecast-access-details summary {
  padding: 11px 12px;
  color: #b8c8ca;
  cursor: pointer;
  font-size: 11px;
  font-weight: 650;
}

html[data-active-view="model"] .forecast-access-details div {
  padding: 0 12px 12px;
  border-top: 1px solid rgba(146, 192, 199, 0.14);
}

html[data-active-view="model"] .forecast-access-details p {
  margin-top: 9px;
  color: #97acb0;
  font-size: 11px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

html[data-active-view="model"] #modelWorkspace,
html[data-active-view="model"] #wrfWorkspace {
  gap: 12px;
  padding: 14px;
  background:
    linear-gradient(rgba(105, 162, 173, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(105, 162, 173, 0.016) 1px, transparent 1px),
    #071115;
  background-size: 30px 30px, 30px 30px, auto;
}

html[data-active-view="model"] #modelWorkspace .map-stage,
html[data-active-view="model"] #modelWorkspace .profile-stage,
html[data-active-view="model"] #modelWorkspace .scene-stage,
html[data-active-view="model"] #wrfWorkspace .map-stage,
html[data-active-view="model"] #wrfWorkspace .profile-stage,
html[data-active-view="model"] #wrfWorkspace .scene-stage {
  padding: 12px;
  border-color: var(--forecast-line);
  border-radius: 6px;
  background:
    linear-gradient(145deg, rgba(83, 213, 224, 0.035), transparent 38%),
    var(--forecast-panel);
}

html[data-active-view="model"] #modelWorkspace .stage-title,
html[data-active-view="model"] #wrfWorkspace .stage-title {
  min-height: 62px;
  margin-bottom: 9px;
  padding: 18px 3px 10px;
  border-bottom-color: rgba(146, 192, 199, 0.18);
}

html[data-active-view="model"] #modelWorkspace .stage-title h2,
html[data-active-view="model"] #wrfWorkspace .stage-title h2 {
  color: #67d9e4;
  font-size: 17px;
  font-weight: 760;
  line-height: 1.25;
}

html[data-active-view="model"] #modelWorkspace .stage-title p,
html[data-active-view="model"] #wrfWorkspace .stage-title p {
  margin-top: 5px;
  color: #aebfc2;
  font-size: 12px;
  line-height: 1.45;
}

html[data-active-view="model"] #modelWorkspace .source-chip,
html[data-active-view="model"] #wrfWorkspace .source-chip {
  min-height: 26px;
  padding-inline: 9px;
  border-color: rgba(242, 184, 75, 0.42);
  background: rgba(242, 184, 75, 0.07);
  color: #f6d889;
  font-size: 10px;
}

html[data-active-view="model"] #modelWorkspace .legend,
html[data-active-view="model"] #wrfWorkspace .legend {
  color: #b9c8ca;
  font-size: 12px;
}

html[data-active-view="model"] #modelWorkspace canvas,
html[data-active-view="model"] #wrfWorkspace canvas {
  border-color: rgba(146, 192, 199, 0.30);
  background:
    linear-gradient(rgba(83, 213, 224, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(83, 213, 224, 0.03) 1px, transparent 1px),
    #061419;
  background-size: 36px 36px, 36px 36px, auto;
}

html[data-active-view="model"] #modelWorkspace .metrics,
html[data-active-view="model"] #wrfWorkspace .metrics {
  gap: 10px;
}

html[data-active-view="model"] #modelWorkspace .metrics article,
html[data-active-view="model"] #wrfWorkspace .metrics article {
  min-height: 82px;
  padding: 11px 14px;
  border-color: var(--forecast-line);
  border-radius: 5px;
  background:
    linear-gradient(135deg, rgba(83, 213, 224, 0.045), transparent 48%),
    var(--forecast-panel-raised);
}

html[data-active-view="model"] #modelWorkspace .metrics span,
html[data-active-view="model"] #wrfWorkspace .metrics span {
  color: #afc0c2;
  font-size: 11px;
  font-weight: 650;
}

html[data-active-view="model"] #modelWorkspace .metrics strong,
html[data-active-view="model"] #wrfWorkspace .metrics strong {
  margin-top: 6px;
  color: #f6c95f;
  font-size: 22px;
  font-weight: 780;
}

@media (min-width: 981px) {
  html[data-active-view="model"] #modelWorkspace {
    grid-template-columns: minmax(470px, 1.5fr) minmax(330px, 0.9fr);
    grid-template-rows: minmax(255px, 1.2fr) minmax(205px, 0.9fr) 86px;
  }

  html[data-active-view="model"] #wrfWorkspace {
    grid-template-columns: minmax(0, 1.24fr) minmax(360px, 0.96fr);
    grid-template-rows: minmax(200px, 0.36fr) minmax(235px, 0.54fr) 112px;
  }
}

@media (min-width: 981px) and (max-width: 1420px) {
  :root {
    --forecast-rail: 270px;
    --forecast-topbar: 84px;
  }

  html[data-active-view="model"] .brand {
    min-width: 340px;
  }

  html[data-active-view="model"] .brand h1 {
    font-size: 18px;
  }

  html[data-active-view="model"] .brand p {
    display: none;
  }

  html[data-active-view="model"] .brand-mark {
    width: 46px;
    height: 46px;
  }

  html[data-active-view="model"] .view-tabs button {
    padding-inline: 12px;
    font-size: 12px;
  }

  html[data-active-view="model"] .status-strip span {
    min-width: 70px;
    padding-inline: 7px;
    font-size: 10px;
  }

  html[data-active-view="model"] #modelWorkspace,
  html[data-active-view="model"] #wrfWorkspace {
    padding: 10px;
    gap: 9px;
  }

  html[data-active-view="model"] #modelWorkspace .stage-title,
  html[data-active-view="model"] #wrfWorkspace .stage-title {
    min-height: 56px;
    padding-top: 16px;
  }

  html[data-active-view="model"] #modelWorkspace .stage-title h2,
  html[data-active-view="model"] #wrfWorkspace .stage-title h2 {
    font-size: 15px;
  }

  html[data-active-view="model"] #modelWorkspace .stage-title p,
  html[data-active-view="model"] #wrfWorkspace .stage-title p {
    font-size: 11px;
  }
}

@media (max-width: 1100px) and (min-width: 981px) {
  html[data-active-view="model"] .brand {
    min-width: 280px;
  }

  html[data-active-view="model"] .brand-eyebrow,
  html[data-active-view="model"] .status-strip .system-live {
    display: none;
  }
}

@media (max-width: 980px) {
  html[data-active-view="model"] .topbar::before {
    left: 14px;
  }

  html[data-active-view="model"] .brand {
    min-width: 0;
  }

  html[data-active-view="model"] .forecast-control-panel {
    padding: 12px;
  }

  html[data-active-view="model"] .layer-control-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  html[data-active-view="model"] #modelWorkspace,
  html[data-active-view="model"] #wrfWorkspace {
    padding: 10px;
  }
}

@media (max-width: 640px) {
  html[data-active-view="model"] .layer-control-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  html[data-active-view="model"] .status-strip span {
    min-height: 42px;
    font-size: 10px;
  }

  html[data-active-view="model"] #modelWorkspace .stage-title,
  html[data-active-view="model"] #wrfWorkspace .stage-title {
    min-height: 0;
  }

  html[data-active-view="model"] #modelWorkspace .metrics,
  html[data-active-view="model"] #wrfWorkspace .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Historical observations readability and workspace hierarchy · 2026-07-05 */
:root {
  --observation-rail: clamp(270px, 17vw, 320px);
  --observation-topbar: 88px;
  --observation-panel: #0d1b20;
  --observation-panel-raised: #11242a;
  --observation-line: rgba(146, 192, 199, 0.25);
}

/* Interactive WebGIS basemap · 2026-07-05 */
.geo-map-frame {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(146, 192, 199, 0.34);
  border-radius: 5px;
  background: #d7dee1;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.24),
    0 10px 28px rgba(0, 0, 0, 0.24);
  isolation: isolate;
}

.geo-basemap,
.geo-data-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.geo-basemap {
  background:
    linear-gradient(rgba(38, 82, 101, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(38, 82, 101, 0.05) 1px, transparent 1px),
    #d7dee1;
  background-size: 32px 32px;
}

html[data-active-view="model"] #modelWorkspace .geo-data-overlay,
html[data-active-view="model"] #wrfWorkspace .geo-data-overlay {
  z-index: 2;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  pointer-events: none;
}

.geo-map-frame .maplibregl-control-container {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}

.geo-map-frame .maplibregl-ctrl {
  pointer-events: auto;
}

.geo-map-frame .maplibregl-ctrl-group {
  overflow: hidden;
  border: 1px solid rgba(20, 55, 70, 0.26);
  border-radius: 4px;
  background: rgba(250, 252, 251, 0.94);
  box-shadow: 0 5px 15px rgba(20, 46, 58, 0.20);
}

.geo-map-frame .maplibregl-ctrl-group button {
  width: 32px;
  height: 32px;
}

.geo-map-frame .geo-home-control {
  color: #153c4c;
  font: 700 20px/1 "Segoe UI Symbol", sans-serif;
}

.geo-map-frame .maplibregl-ctrl-scale {
  border-color: rgba(14, 48, 62, 0.70);
  background: rgba(248, 251, 250, 0.84);
  color: #143845;
  font-size: 10px;
}

.geo-map-frame .maplibregl-ctrl-attrib {
  background: rgba(248, 251, 250, 0.88);
  color: #355762;
  font-size: 9px;
}

.geo-map-frame .maplibregl-ctrl-attrib a {
  color: #1a657d;
}

.geo-map-hint {
  position: absolute;
  z-index: 5;
  top: 10px;
  left: 10px;
  max-width: calc(100% - 108px);
  padding: 6px 9px;
  border: 1px solid rgba(18, 65, 83, 0.22);
  border-radius: 4px;
  background: rgba(248, 251, 250, 0.88);
  color: #244d5b;
  font-size: 10px;
  font-weight: 650;
  line-height: 1.3;
  box-shadow: 0 4px 13px rgba(20, 46, 58, 0.14);
  pointer-events: none;
}

.basemap-error {
  display: none;
  position: absolute;
  z-index: 5;
  right: 48px;
  bottom: 28px;
  padding: 6px 9px;
  border: 1px solid rgba(170, 82, 55, 0.34);
  border-radius: 4px;
  background: rgba(255, 245, 238, 0.92);
  color: #914a32;
  font-size: 10px;
  font-weight: 650;
  pointer-events: none;
}

.geo-map-frame.basemap-degraded .basemap-error,
.geo-map-frame.basemap-token-missing .basemap-error {
  display: block;
}

@media (max-width: 980px) {
  .geo-map-hint {
    display: none;
  }
}

html[data-active-view="observation"] body {
  background:
    linear-gradient(rgba(116, 178, 188, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(116, 178, 188, 0.02) 1px, transparent 1px),
    radial-gradient(circle at 78% 10%, rgba(96, 211, 148, 0.09), transparent 28%),
    linear-gradient(135deg, #071216 0%, #0a171b 50%, #071115 100%);
  background-size: 32px 32px, 32px 32px, auto, auto;
}

@media (min-width: 981px) {
  html[data-active-view="observation"] .app-shell {
    grid-template-columns: var(--observation-rail) minmax(0, 1fr);
    grid-template-rows: var(--observation-topbar) minmax(0, 1fr);
  }
}

html[data-active-view="observation"] .topbar {
  min-height: var(--observation-topbar);
  padding: 10px 20px;
  border-bottom: 1px solid rgba(96, 211, 148, 0.38);
  background: linear-gradient(90deg, rgba(7, 18, 22, 0.98), rgba(11, 24, 29, 0.96));
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.34);
}

html[data-active-view="observation"] .topbar::before {
  left: var(--observation-rail);
  background: rgba(96, 211, 148, 0.42);
}

html[data-active-view="observation"] .topbar::after {
  bottom: -16px;
  background: var(--green);
  color: #041115;
  font-size: 8px;
}

html[data-active-view="observation"] .brand {
  min-width: 390px;
}

html[data-active-view="observation"] .brand-mark {
  width: 50px;
  height: 50px;
  border-color: rgba(96, 211, 148, 0.58);
  background:
    linear-gradient(90deg, transparent 48%, rgba(83, 213, 224, 0.92) 49% 51%, transparent 52%),
    linear-gradient(180deg, transparent 48%, rgba(96, 211, 148, 0.92) 49% 51%, transparent 52%),
    linear-gradient(135deg, transparent 45%, rgba(255, 255, 255, 0.20) 46% 48%, transparent 49%),
    #0b171c;
}

html[data-active-view="observation"] .brand-eyebrow {
  color: #78ded0;
  font-size: 9px;
}

html[data-active-view="observation"] .brand h1 {
  color: #f5f9f8;
  font-size: 21px;
  font-weight: 760;
}

html[data-active-view="observation"] .brand p {
  color: #9fb2b6;
  font-size: 9px;
}

html[data-active-view="observation"] .view-tabs {
  border-color: var(--observation-line);
  background: rgba(4, 13, 16, 0.80);
}

html[data-active-view="observation"] .view-tabs button {
  min-height: 44px;
  padding-inline: 16px;
  border-color: rgba(146, 192, 199, 0.16);
  color: #b8c8ca;
  font-size: 13px;
}

html[data-active-view="observation"] .view-tabs button.active {
  background: #17463f;
  color: #ffffff;
  box-shadow: inset 0 -3px 0 var(--amber);
}

html[data-active-view="observation"] .status-strip span {
  min-width: 80px;
  min-height: 46px;
  border-color: var(--observation-line);
  background: rgba(12, 29, 34, 0.88);
  color: #edf7f6;
  font-size: 11px;
}

html[data-active-view="observation"] .observation-control-panel {
  padding: 18px 13px 28px;
  border-right-color: var(--observation-line);
  background:
    linear-gradient(180deg, rgba(96, 211, 148, 0.055), transparent 18%),
    #09171b;
  scrollbar-color: rgba(96, 211, 148, 0.56) rgba(255, 255, 255, 0.04);
}

html[data-active-view="observation"] .observation-control-panel::before {
  content: "HISTORICAL OBSERVATIONS  /  ARCHIVE";
  margin: 0 5px 13px;
  border-bottom-color: var(--observation-line);
  color: #78ded0;
  font-size: 9px;
}

html[data-active-view="observation"] .observation-control-panel .control-section {
  margin-bottom: 10px;
  padding: 14px;
  border-color: var(--observation-line);
  border-radius: 6px;
  background:
    linear-gradient(135deg, rgba(96, 211, 148, 0.035), transparent 44%),
    var(--observation-panel);
  box-shadow: inset 3px 0 0 rgba(96, 211, 148, 0.24);
}

html[data-active-view="observation"] .observation-control-panel .control-section:nth-of-type(2) {
  box-shadow: inset 3px 0 0 rgba(83, 213, 224, 0.26);
}

html[data-active-view="observation"] .observation-control-panel .control-section:nth-of-type(3) {
  box-shadow: inset 3px 0 0 rgba(242, 184, 75, 0.26);
}

html[data-active-view="observation"] .observation-control-panel h2 {
  margin-bottom: 12px;
  color: #f0f7f6;
  font-size: 13px;
  font-weight: 760;
}

html[data-active-view="observation"] .observation-control-panel h3 {
  margin: 13px 0 7px;
  color: #9eb6bb;
  font-size: 11px;
  font-weight: 650;
}

html[data-active-view="observation"] .observation-filter-section h3:first-of-type {
  margin-top: 0;
}

html[data-active-view="observation"] .observation-kind-grid,
html[data-active-view="observation"] .observation-variable-grid {
  display: grid;
  gap: 2px;
}

html[data-active-view="observation"] .observation-kind-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

html[data-active-view="observation"] .observation-variable-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

html[data-active-view="observation"] .observation-control-panel .segmented span {
  min-height: 38px;
  color: #b6c5c7;
  font-size: 12px;
  font-weight: 650;
}

html[data-active-view="observation"] .observation-control-panel .segmented input:checked + span {
  background: #17463f;
  color: #ffffff;
  box-shadow: inset 0 -3px 0 var(--amber);
}

html[data-active-view="observation"] .observation-layer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

html[data-active-view="observation"] .observation-layer-grid .toggle {
  min-width: 0;
  min-height: 38px;
  color: #d0dcdd;
  font-size: 12px;
}

html[data-active-view="observation"] .observation-layer-grid .toggle::after {
  width: 32px;
  flex: 0 0 32px;
}

html[data-active-view="observation"] .obs-summary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

html[data-active-view="observation"] .obs-summary article {
  min-width: 0;
  min-height: 64px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  border-color: rgba(146, 192, 199, 0.20);
  border-radius: 5px;
  background: #0a171b;
}

html[data-active-view="observation"] .obs-summary span {
  color: #9fb1b5;
  font-size: 10px;
  white-space: nowrap;
}

html[data-active-view="observation"] .obs-summary strong {
  color: #f6c95f;
  font-size: 21px;
}

html[data-active-view="observation"] .observation-access-details {
  margin: 3px 1px 0;
  border: 1px solid var(--observation-line);
  border-radius: 6px;
  background: rgba(10, 28, 33, 0.84);
}

html[data-active-view="observation"] .observation-access-details summary {
  padding: 11px 12px;
  color: #b8c8ca;
  cursor: pointer;
  font-size: 11px;
  font-weight: 650;
}

html[data-active-view="observation"] .observation-access-details div {
  padding: 0 12px 12px;
  border-top: 1px solid rgba(146, 192, 199, 0.14);
}

html[data-active-view="observation"] .observation-access-details p {
  margin-top: 9px;
  color: #97acb0;
  font-size: 11px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

html[data-active-view="observation"] .observation-workspace {
  gap: 12px;
  padding: 14px;
  background:
    linear-gradient(rgba(105, 162, 173, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(105, 162, 173, 0.016) 1px, transparent 1px),
    #071115;
  background-size: 30px 30px, 30px 30px, auto;
}

html[data-active-view="observation"] .observation-chart-stage,
html[data-active-view="observation"] .observation-map-stage,
html[data-active-view="observation"] .observation-list {
  padding: 12px;
  border-color: var(--observation-line);
  border-radius: 6px;
  background:
    linear-gradient(145deg, rgba(96, 211, 148, 0.032), transparent 40%),
    var(--observation-panel);
}

html[data-active-view="observation"] .observation-chart-stage {
  border-top: 2px solid var(--cyan);
}

html[data-active-view="observation"] .observation-map-stage {
  border-top: 2px solid var(--green);
}

html[data-active-view="observation"] .observation-list {
  border-top: 2px solid var(--amber);
}

html[data-active-view="observation"] .observation-workspace .stage-title {
  min-height: 62px;
  margin-bottom: 9px;
  padding: 18px 3px 10px;
  border-bottom-color: rgba(146, 192, 199, 0.18);
}

html[data-active-view="observation"] .observation-workspace .stage-title h2 {
  color: #67d9e4;
  font-size: 17px;
  font-weight: 760;
  line-height: 1.25;
}

html[data-active-view="observation"] .observation-workspace .stage-title p {
  margin-top: 5px;
  color: #aebfc2;
  font-size: 12px;
  line-height: 1.45;
}

html[data-active-view="observation"] .observation-map-stage .stage-title {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

html[data-active-view="observation"] .observation-map-stage .stage-tools {
  align-items: flex-end;
  flex-direction: column;
  gap: 6px;
}

html[data-active-view="observation"] .observation-workspace .source-chip {
  min-height: 25px;
  padding-inline: 8px;
  border-color: rgba(96, 211, 148, 0.40);
  background: rgba(96, 211, 148, 0.07);
  color: #bdebcf;
  font-size: 10px;
}

html[data-active-view="observation"] .obs-legend {
  color: #d2dedd;
  font-size: 11px;
  font-weight: 650;
}

html[data-active-view="observation"] .observation-workspace canvas {
  border: 1px solid rgba(146, 192, 199, 0.28);
  border-radius: 4px;
  background:
    linear-gradient(rgba(83, 213, 224, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(83, 213, 224, 0.03) 1px, transparent 1px),
    #061419;
  background-size: 36px 36px, 36px 36px, auto;
}

html[data-active-view="observation"] .observation-lists-stage {
  gap: 12px;
}

html[data-active-view="observation"] .obs-table {
  gap: 7px;
  scrollbar-color: rgba(96, 211, 148, 0.52) rgba(255, 255, 255, 0.04);
}

html[data-active-view="observation"] .obs-row {
  min-height: 58px;
  padding: 9px 11px;
  border-color: rgba(146, 192, 199, 0.20);
  border-radius: 5px;
  background: #0a171b;
}

html[data-active-view="observation"] .obs-row:hover {
  border-color: rgba(83, 213, 224, 0.54);
  background: #10262c;
}

html[data-active-view="observation"] .obs-row.active {
  border-color: rgba(96, 211, 148, 0.72);
  background: linear-gradient(90deg, rgba(96, 211, 148, 0.14), rgba(83, 213, 224, 0.045));
  box-shadow: inset 3px 0 0 var(--amber);
}

html[data-active-view="observation"] .obs-row strong {
  color: #edf7f6;
  font-size: 12px;
  font-weight: 700;
}

html[data-active-view="observation"] .obs-row span,
html[data-active-view="observation"] .obs-row small,
html[data-active-view="observation"] .obs-pill {
  color: #9fb2b6;
  font-size: 10px;
}

html[data-active-view="observation"] .obs-metrics {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(310px, 1.6fr) minmax(120px, 0.62fr);
  gap: 10px;
}

html[data-active-view="observation"] .obs-metrics article {
  min-height: 86px;
  padding: 11px 14px;
  border-color: var(--observation-line);
  border-radius: 5px;
  background:
    linear-gradient(135deg, rgba(96, 211, 148, 0.04), transparent 48%),
    var(--observation-panel-raised);
}

html[data-active-view="observation"] .obs-metrics span {
  color: #afc0c2;
  font-size: 11px;
  font-weight: 650;
}

html[data-active-view="observation"] .obs-metrics strong {
  margin-top: 6px;
  color: #f6c95f;
  font-size: 19px;
  font-weight: 780;
  line-height: 1.25;
}

html[data-active-view="observation"] .obs-metrics article:nth-child(3) strong {
  font-size: 17px;
  white-space: normal;
}

@media (min-width: 981px) {
  html[data-active-view="observation"] .observation-workspace {
    grid-template-columns: minmax(620px, 1.72fr) minmax(300px, 0.78fr);
    grid-template-rows: minmax(355px, 1fr) minmax(165px, 0.34fr) 88px;
  }
}

@media (min-width: 981px) and (max-width: 1420px) {
  :root {
    --observation-rail: 270px;
    --observation-topbar: 84px;
  }

  html[data-active-view="observation"] .brand {
    min-width: 340px;
  }

  html[data-active-view="observation"] .brand h1 {
    font-size: 18px;
  }

  html[data-active-view="observation"] .brand p {
    display: none;
  }

  html[data-active-view="observation"] .brand-mark {
    width: 46px;
    height: 46px;
  }

  html[data-active-view="observation"] .view-tabs button {
    padding-inline: 12px;
    font-size: 12px;
  }

  html[data-active-view="observation"] .status-strip span {
    min-width: 70px;
    padding-inline: 7px;
    font-size: 10px;
  }

  html[data-active-view="observation"] .observation-workspace {
    gap: 9px;
    padding: 10px;
  }

  html[data-active-view="observation"] .observation-workspace .stage-title {
    min-height: 56px;
    padding-top: 16px;
  }

  html[data-active-view="observation"] .observation-workspace .stage-title h2 {
    font-size: 15px;
  }

  html[data-active-view="observation"] .observation-workspace .stage-title p {
    font-size: 11px;
  }

  html[data-active-view="observation"] .observation-map-stage .source-chip {
    display: none;
  }

  html[data-active-view="observation"] .obs-metrics {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(280px, 1.55fr) minmax(100px, 0.58fr);
  }
}

@media (max-width: 1100px) and (min-width: 981px) {
  html[data-active-view="observation"] .brand {
    min-width: 280px;
  }

  html[data-active-view="observation"] .brand-eyebrow,
  html[data-active-view="observation"] .status-strip .system-live {
    display: none;
  }
}

@media (max-width: 980px) {
  html[data-active-view="observation"] .topbar::before {
    left: 14px;
  }

  html[data-active-view="observation"] .brand {
    min-width: 0;
  }

  html[data-active-view="observation"] .observation-control-panel {
    padding: 12px;
  }

  html[data-active-view="observation"] .observation-workspace {
    grid-template-rows: 520px 400px 360px auto;
    gap: 10px;
    padding: 10px;
  }

  html[data-active-view="observation"] .obs-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  html[data-active-view="observation"] .obs-metrics article:nth-child(3) {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  html[data-active-view="observation"] .observation-control-panel {
    grid-template-columns: minmax(0, 1fr);
  }

  html[data-active-view="observation"] .observation-workspace {
    grid-template-rows: 520px 390px 410px auto;
  }

  html[data-active-view="observation"] .observation-lists-stage {
    grid-template-columns: minmax(0, 1fr);
  }

  html[data-active-view="observation"] .observation-map-stage .stage-title {
    grid-template-columns: minmax(0, 1fr);
  }

  html[data-active-view="observation"] .observation-map-stage .stage-tools {
    align-items: flex-start;
    margin-top: 8px;
  }

  html[data-active-view="observation"] .obs-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  html[data-active-view="observation"] .obs-metrics {
    grid-template-columns: minmax(0, 1fr);
  }

  html[data-active-view="observation"] .obs-metrics article:nth-child(3) {
    grid-column: auto;
  }
}

/* Marine ranch visual refinement - keep this block at the end so it wins older theme rules. */
.topbar > * {
  position: relative;
  z-index: 2;
}

.topbar::before,
.topbar::after {
  pointer-events: none;
}

.brand-copy {
  position: relative;
  z-index: 4;
  isolation: isolate;
}

.brand-copy::before {
  content: "";
  position: absolute;
  inset: -2px -10px -3px -3px;
  z-index: -1;
  border-radius: 6px;
  background: linear-gradient(90deg, rgba(5, 15, 18, 0.98), rgba(5, 15, 18, 0.86), rgba(5, 15, 18, 0));
}

.brand h1 {
  position: relative;
  z-index: 5;
  line-height: 1.18;
  text-decoration: none;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.45);
}

html[data-active-view="ranch"] {
  --ranch-rail: clamp(268px, 15vw, 318px);
  --ranch-topbar: 88px;
  --ranch-panel: rgba(7, 20, 23, 0.92);
  --ranch-panel-raised: rgba(9, 30, 35, 0.9);
  --ranch-line: rgba(115, 234, 188, 0.28);
  --ranch-line-strong: rgba(115, 234, 188, 0.48);
  --ranch-accent: #72f0bd;
  --ranch-cyan: #63e6f2;
  --ranch-yellow: #f4c95d;
  --ranch-orange: #ff9b54;
  --ranch-red: #ff6b6b;
}

html[data-active-view="ranch"] body {
  font-family: "Microsoft YaHei UI", "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
}

html[data-active-view="ranch"] .app-shell {
  grid-template-columns: var(--ranch-rail) minmax(0, 1fr);
  grid-template-rows: var(--ranch-topbar) minmax(0, 1fr);
}

html[data-active-view="ranch"] .topbar {
  min-height: var(--ranch-topbar);
  padding: 12px 20px;
  border-bottom: 1px solid rgba(115, 234, 188, 0.22);
  background:
    linear-gradient(90deg, rgba(4, 16, 18, 0.97) 0 var(--ranch-rail), rgba(8, 27, 30, 0.97) var(--ranch-rail), rgba(5, 13, 16, 0.96) 100%),
    radial-gradient(circle at 24% 0%, rgba(99, 230, 242, 0.12), transparent 34%);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
}

html[data-active-view="ranch"] .topbar::before {
  left: var(--ranch-rail);
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(115, 234, 188, 0.62), transparent);
  opacity: 0.62;
}

html[data-active-view="ranch"] .topbar::after {
  display: none;
}

html[data-active-view="ranch"] .brand {
  gap: 14px;
  min-width: clamp(420px, 31vw, 620px);
}

html[data-active-view="ranch"] .brand-mark {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  box-shadow: 0 0 0 1px rgba(130, 245, 199, 0.32), 0 0 28px rgba(62, 211, 177, 0.16);
}

html[data-active-view="ranch"] .brand-eyebrow {
  color: rgba(139, 245, 202, 0.96);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.14em;
}

html[data-active-view="ranch"] .brand h1 {
  color: #f6fbf8;
  font-size: clamp(19px, 1.14vw, 24px);
  font-weight: 820;
  letter-spacing: 0;
}

html[data-active-view="ranch"] .brand p {
  margin-top: 4px;
  color: rgba(208, 229, 224, 0.82);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

html[data-active-view="ranch"] .control-panel {
  padding: 16px 14px;
  background: linear-gradient(180deg, rgba(4, 17, 20, 0.98), rgba(5, 22, 25, 0.95));
  border-right-color: rgba(115, 234, 188, 0.18);
}

html[data-active-view="ranch"] .control-section {
  padding-bottom: 18px;
  margin-bottom: 18px;
  border-bottom-color: rgba(115, 234, 188, 0.16);
}

html[data-active-view="ranch"] .control-section h2 {
  margin-bottom: 10px;
  color: #effbf6;
  font-size: 15px;
  font-weight: 850;
}

html[data-active-view="ranch"] .segmented {
  gap: 5px;
  padding: 5px;
  border-color: rgba(115, 234, 188, 0.18);
  background: rgba(1, 10, 12, 0.72);
}

html[data-active-view="ranch"] .segmented label span {
  min-height: 38px;
  font-size: 13px;
  font-weight: 760;
}

html[data-active-view="ranch"] .segmented input:checked + span {
  color: #f8fffb;
  background: linear-gradient(180deg, rgba(38, 126, 111, 0.9), rgba(18, 74, 70, 0.9));
  border-color: rgba(115, 234, 188, 0.54);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 0 22px rgba(77, 232, 189, 0.14);
}

html[data-active-view="ranch"] .switch-row {
  min-height: 38px;
  color: rgba(226, 243, 239, 0.92);
  font-size: 13px;
  font-weight: 760;
}

html[data-active-view="ranch"] .workspace.ranch-workspace {
  grid-template-columns: minmax(720px, 1.42fr) minmax(420px, 0.78fr);
  grid-template-rows: minmax(500px, 1.08fr) minmax(260px, 0.48fr) minmax(104px, 0.18fr);
  grid-template-areas:
    "ranch-map ranch-dashboard"
    "ranch-zones ranch-alerts"
    "ranch-data ranch-data";
  gap: 14px;
  padding: 16px;
  background:
    linear-gradient(90deg, rgba(9, 38, 42, 0.42), transparent 32%),
    radial-gradient(circle at 28% 18%, rgba(78, 229, 188, 0.08), transparent 34%);
}

html[data-active-view="ranch"] .ranch-map-stage,
html[data-active-view="ranch"] .ranch-dashboard-stage,
html[data-active-view="ranch"] .ranch-zone-stage,
html[data-active-view="ranch"] .ranch-alert-stage,
html[data-active-view="ranch"] .ranch-data-stage {
  border-radius: 8px;
  border-color: var(--ranch-line);
  background:
    linear-gradient(180deg, rgba(20, 48, 48, 0.58), rgba(7, 18, 22, 0.86)),
    repeating-linear-gradient(90deg, rgba(133, 238, 204, 0.03) 0 1px, transparent 1px 44px);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.22);
}

html[data-active-view="ranch"] .ranch-map-stage {
  border-top: 2px solid rgba(115, 234, 188, 0.55);
  min-height: 0;
}

html[data-active-view="ranch"] .stage-title {
  min-height: 72px;
  padding: 18px 6px 14px;
  align-items: start;
}

html[data-active-view="ranch"] .stage-title h2 {
  color: #f4fbf7;
  font-size: clamp(17px, 1vw, 22px);
  font-weight: 860;
  letter-spacing: 0;
}

html[data-active-view="ranch"] .stage-title p {
  margin-top: 7px;
  color: rgba(202, 224, 219, 0.82);
  font-size: 13px;
  line-height: 1.45;
}

html[data-active-view="ranch"] .ranch-stage-badge {
  padding: 7px 11px;
  border-radius: 999px;
  border: 1px solid rgba(115, 234, 188, 0.34);
  color: rgba(225, 255, 246, 0.9);
  background: rgba(6, 25, 28, 0.72);
  font-size: 12px;
  font-weight: 820;
}

html[data-active-view="ranch"] .ranch-map-stage canvas {
  width: 100%;
  height: calc(100% - 76px);
  min-height: 410px;
  border-radius: 7px;
}

html[data-active-view="ranch"] .ranch-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 2px;
}

html[data-active-view="ranch"] .ranch-metric-card {
  min-height: 132px;
  padding: 16px 16px 15px;
  border-radius: 7px;
  border-color: rgba(115, 234, 188, 0.18);
  border-left: 3px solid var(--metric-accent, var(--ranch-accent));
  background: linear-gradient(180deg, rgba(8, 28, 32, 0.88), rgba(5, 16, 20, 0.88));
}

html[data-active-view="ranch"] .ranch-metric-1 {
  --metric-accent: var(--ranch-cyan);
}

html[data-active-view="ranch"] .ranch-metric-2 {
  --metric-accent: var(--ranch-accent);
}

html[data-active-view="ranch"] .ranch-metric-3 {
  --metric-accent: var(--ranch-yellow);
}

html[data-active-view="ranch"] .ranch-metric-4 {
  --metric-accent: var(--ranch-orange);
}

html[data-active-view="ranch"] .ranch-metric-card span {
  color: rgba(206, 235, 229, 0.82);
  font-size: 13px;
  font-weight: 780;
}

html[data-active-view="ranch"] .ranch-metric-card strong {
  margin-top: 10px;
  color: #f7fffb;
  font-size: clamp(24px, 1.45vw, 34px);
  line-height: 1.05;
  letter-spacing: 0;
}

html[data-active-view="ranch"] .ranch-metric-card small {
  margin-top: 10px;
  color: rgba(188, 216, 210, 0.78);
  font-size: 12px;
  line-height: 1.55;
}

html[data-active-view="ranch"] .ranch-zone-grid {
  grid-template-columns: repeat(auto-fit, minmax(172px, 1fr));
  gap: 12px;
}

html[data-active-view="ranch"] .ranch-zone-card {
  min-height: 152px;
  padding: 14px;
  border-radius: 7px;
  background: linear-gradient(180deg, rgba(8, 27, 31, 0.9), rgba(4, 15, 18, 0.88));
}

html[data-active-view="ranch"] .ranch-zone-card b {
  width: 34px;
  height: 34px;
  font-size: 15px;
  box-shadow: 0 0 18px color-mix(in srgb, var(--zone-color) 28%, transparent);
}

html[data-active-view="ranch"] .ranch-zone-card strong {
  color: #f4fbf8;
  font-size: 14px;
  font-weight: 840;
}

html[data-active-view="ranch"] .ranch-zone-card p {
  color: rgba(199, 224, 219, 0.82);
  font-size: 12px;
  line-height: 1.55;
}

html[data-active-view="ranch"] .ranch-alert-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  overflow: visible;
}

html[data-active-view="ranch"] .ranch-alert-item {
  min-height: 104px;
  padding: 13px;
  border-radius: 7px;
  background: rgba(5, 17, 20, 0.78);
}

html[data-active-view="ranch"] .ranch-alert-item span {
  font-size: 12px;
  font-weight: 820;
}

html[data-active-view="ranch"] .ranch-alert-item strong {
  color: #f5fffb;
  font-size: 14px;
  font-weight: 850;
}

html[data-active-view="ranch"] .ranch-alert-item small {
  font-size: 12px;
  line-height: 1.45;
}

html[data-active-view="ranch"] .ranch-data-stage {
  min-height: 104px;
}

html[data-active-view="ranch"] .ranch-data-row {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

html[data-active-view="ranch"] .ranch-data-row article {
  min-height: 76px;
  border-radius: 7px;
  border-color: rgba(115, 234, 188, 0.16);
  background: rgba(5, 17, 20, 0.76);
}

html[data-active-view="ranch"] .ranch-data-row span {
  font-size: 12px;
  font-weight: 760;
}

html[data-active-view="ranch"] .ranch-data-row strong {
  font-size: 14px;
  font-weight: 820;
}

@media (max-width: 1500px) and (min-width: 981px) {
  html[data-active-view="ranch"] .workspace.ranch-workspace {
    grid-template-columns: minmax(640px, 1.34fr) minmax(380px, 0.78fr);
    grid-template-rows: minmax(470px, 1fr) minmax(260px, 0.5fr) minmax(104px, 0.18fr);
  }

  html[data-active-view="ranch"] .ranch-alert-list {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 1180px) and (min-width: 981px) {
  html[data-active-view="ranch"] {
    --ranch-rail: 250px;
  }

  html[data-active-view="ranch"] .brand {
    min-width: 320px;
  }

  html[data-active-view="ranch"] .brand-eyebrow {
    display: none;
  }

  html[data-active-view="ranch"] .workspace.ranch-workspace {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: 520px auto auto auto;
    grid-template-areas:
      "ranch-map"
      "ranch-dashboard"
      "ranch-zones"
      "ranch-alerts"
      "ranch-data";
  }
}

@media (max-width: 980px) {
  html[data-active-view="ranch"] .app-shell {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto minmax(0, 1fr);
  }

  html[data-active-view="ranch"] .topbar::before {
    left: 14px;
  }

  html[data-active-view="ranch"] .brand {
    min-width: 0;
  }

  html[data-active-view="ranch"] .workspace.ranch-workspace {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: 520px auto auto auto auto;
    grid-template-areas:
      "ranch-map"
      "ranch-dashboard"
      "ranch-zones"
      "ranch-alerts"
      "ranch-data";
    gap: 10px;
    padding: 10px;
  }

  html[data-active-view="ranch"] .ranch-dashboard-grid,
  html[data-active-view="ranch"] .ranch-alert-list,
  html[data-active-view="ranch"] .ranch-data-row {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Stable global header/navigation layout. */
@media (min-width: 981px) {
  .app-shell,
  html[data-active-view="model"] .app-shell,
  html[data-active-view="observation"] .app-shell,
  html[data-active-view="ranch"] .app-shell {
    grid-template-rows: 84px minmax(0, 1fr);
  }
}

.topbar,
html[data-active-view="model"] .topbar,
html[data-active-view="observation"] .topbar,
html[data-active-view="ranch"] .topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 420px) minmax(0, 1fr);
  align-items: center;
  column-gap: 16px;
  min-height: 84px;
  height: 84px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.brand,
html[data-active-view="model"] .brand,
html[data-active-view="observation"] .brand,
html[data-active-view="ranch"] .brand {
  grid-column: 1;
  justify-self: start;
  width: min(100%, 640px);
  min-width: 0;
  overflow: hidden;
}

.view-tabs,
html[data-active-view="model"] .view-tabs,
html[data-active-view="observation"] .view-tabs,
html[data-active-view="ranch"] .view-tabs {
  position: relative;
  inset: auto;
  grid-column: 2;
  z-index: 40;
  transform: none;
  justify-self: center;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  width: clamp(360px, 22vw, 420px);
  height: 48px;
  padding: 0;
  border: 1px solid rgba(126, 218, 224, 0.24);
  border-radius: 0;
  background:
    linear-gradient(180deg, rgba(8, 24, 28, 0.86), rgba(3, 11, 14, 0.92)),
    repeating-linear-gradient(90deg, rgba(124, 226, 224, 0.04) 0 1px, transparent 1px 26px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.035), 0 12px 26px rgba(0, 0, 0, 0.18);
  overflow: hidden;
}

.view-tabs button,
html[data-active-view="model"] .view-tabs button,
html[data-active-view="observation"] .view-tabs button,
html[data-active-view="ranch"] .view-tabs button {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 46px;
  height: 46px;
  margin: 0;
  padding: 0 12px;
  border: 0;
  border-right: 1px solid rgba(126, 218, 224, 0.18);
  border-radius: 0;
  background: transparent;
  color: rgba(207, 226, 225, 0.72);
  font-size: 13px;
  font-weight: 830;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transform: none;
  box-shadow: none;
}

.view-tabs button:last-child,
html[data-active-view="model"] .view-tabs button:last-child,
html[data-active-view="observation"] .view-tabs button:last-child,
html[data-active-view="ranch"] .view-tabs button:last-child {
  border-right: 0;
}

.view-tabs button::before,
html[data-active-view="model"] .view-tabs button::before,
html[data-active-view="observation"] .view-tabs button::before,
html[data-active-view="ranch"] .view-tabs button::before {
  display: none;
}

.view-tabs button::after,
html[data-active-view="model"] .view-tabs button::after,
html[data-active-view="observation"] .view-tabs button::after,
html[data-active-view="ranch"] .view-tabs button::after {
  content: "";
  position: absolute;
  right: 12px;
  bottom: 7px;
  left: 12px;
  height: 2px;
  border-radius: 999px;
  background: transparent;
  box-shadow: none;
}

.view-tabs button:hover,
html[data-active-view="model"] .view-tabs button:hover,
html[data-active-view="observation"] .view-tabs button:hover,
html[data-active-view="ranch"] .view-tabs button:hover {
  color: #f5fbfa;
  background: rgba(83, 213, 224, 0.08);
}

.view-tabs button.active,
html[data-active-view="model"] .view-tabs button.active,
html[data-active-view="observation"] .view-tabs button.active,
html[data-active-view="ranch"] .view-tabs button.active {
  color: #f8fffb;
  background:
    linear-gradient(180deg, rgba(35, 122, 112, 0.58), rgba(9, 43, 45, 0.62)),
    linear-gradient(90deg, rgba(91, 232, 199, 0.14), transparent 72%);
  outline: 0;
  box-shadow: inset 0 0 0 1px rgba(112, 237, 208, 0.38), inset 0 0 24px rgba(83, 213, 224, 0.12);
}

.view-tabs button.active::after,
html[data-active-view="model"] .view-tabs button.active::after,
html[data-active-view="observation"] .view-tabs button.active::after,
html[data-active-view="ranch"] .view-tabs button.active::after {
  background: linear-gradient(90deg, #f4c95d, #65eec6);
  box-shadow: 0 0 12px rgba(101, 238, 198, 0.36);
}

.status-strip,
html[data-active-view="model"] .status-strip,
html[data-active-view="observation"] .status-strip,
html[data-active-view="ranch"] .status-strip {
  grid-column: 3;
  justify-self: end;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
}

.status-strip span,
html[data-active-view="model"] .status-strip span,
html[data-active-view="observation"] .status-strip span,
html[data-active-view="ranch"] .status-strip span {
  box-sizing: border-box;
  justify-content: center;
  min-height: 34px;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 820;
}

.status-strip .system-live {
  min-width: 78px;
}

#runName {
  min-width: 148px;
  max-width: 188px;
}

#clockLabel,
#depthLabel {
  min-width: 88px;
}

@media (max-width: 1380px) and (min-width: 981px) {
  .topbar,
  html[data-active-view="model"] .topbar,
  html[data-active-view="observation"] .topbar,
  html[data-active-view="ranch"] .topbar {
    grid-template-columns: minmax(0, 1fr) minmax(330px, 380px) minmax(0, 1fr);
    column-gap: 12px;
  }

  .view-tabs,
  html[data-active-view="model"] .view-tabs,
  html[data-active-view="observation"] .view-tabs,
  html[data-active-view="ranch"] .view-tabs {
    width: clamp(330px, 26vw, 380px);
  }

  .view-tabs button,
  html[data-active-view="model"] .view-tabs button,
  html[data-active-view="observation"] .view-tabs button,
  html[data-active-view="ranch"] .view-tabs button {
    padding: 0 8px;
    font-size: 12px;
  }

  #runName {
    min-width: 120px;
    max-width: 150px;
  }
}

@media (max-width: 1180px) and (min-width: 981px) {
  .topbar,
  html[data-active-view="model"] .topbar,
  html[data-active-view="observation"] .topbar,
  html[data-active-view="ranch"] .topbar {
    grid-template-columns: minmax(0, 1fr) minmax(306px, 340px) minmax(0, 1fr);
    column-gap: 10px;
  }

  .view-tabs,
  html[data-active-view="model"] .view-tabs,
  html[data-active-view="observation"] .view-tabs,
  html[data-active-view="ranch"] .view-tabs {
    width: min(100%, 340px);
  }

  .brand-eyebrow,
  .brand p,
  .status-strip .system-live {
    display: none;
  }

  #runName {
    min-width: 104px;
    max-width: 124px;
  }

  #clockLabel,
  #depthLabel {
    min-width: 72px;
  }

  .status-strip,
  html[data-active-view="model"] .status-strip,
  html[data-active-view="observation"] .status-strip,
  html[data-active-view="ranch"] .status-strip {
    gap: 5px;
  }
}

@media (max-width: 980px) {
  .topbar,
  html[data-active-view="model"] .topbar,
  html[data-active-view="observation"] .topbar,
  html[data-active-view="ranch"] .topbar {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    row-gap: 10px;
  }

  .view-tabs,
  html[data-active-view="model"] .view-tabs,
  html[data-active-view="observation"] .view-tabs,
  html[data-active-view="ranch"] .view-tabs {
    position: static;
    grid-column: auto;
    transform: none;
    width: min(100%, 420px);
    justify-self: stretch;
  }

  .status-strip,
  html[data-active-view="model"] .status-strip,
  html[data-active-view="observation"] .status-strip,
  html[data-active-view="ranch"] .status-strip {
    grid-column: auto;
    justify-self: stretch;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-flow: row;
  }

  .status-strip span,
  .status-strip .system-live,
  #runName,
  #clockLabel,
  #depthLabel {
    min-width: 0;
    max-width: none;
  }
}
html[data-active-view="model"] #modelWorkspace .forecast-time-chip {
  border-color: rgba(246, 211, 101, 0.65);
  background: rgba(246, 211, 101, 0.12);
  color: #ffe08a;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: none;
}

html[data-active-view="model"] #modelWorkspace .stage-title {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  align-items: center;
  gap: 18px;
}

html[data-active-view="model"] #modelWorkspace .stage-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  flex-wrap: nowrap;
}

html[data-active-view="model"] #modelWorkspace #mitgcmTimeChip.forecast-time-chip {
  min-height: 38px;
  min-width: 430px;
  justify-content: center;
  padding: 7px 16px;
  border-width: 2px;
  border-color: rgba(246, 211, 101, 0.82);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(246, 211, 101, 0.18), rgba(246, 211, 101, 0.08));
  color: #ffe08a;
  font-size: 17px;
  font-weight: 950;
  letter-spacing: 0.05em;
  line-height: 1.2;
  text-transform: none;
  text-shadow: 0 0 16px rgba(246, 211, 101, 0.36);
}

html[data-active-view="model"] #modelWorkspace .forecast-absolute-time {
  display: none !important;
}

