:root {
  --bg: #eef1f3;
  --surface: #ffffff;
  --surface-muted: #f6f7f8;
  --line: #d7dde1;
  --line-strong: #bcc6cc;
  --text: #172126;
  --muted: #647178;
  --quiet: #8a969c;
  --ink: #101719;
  --low: #168f95;
  --low-soft: #dff1f1;
  --elevated: #d28a12;
  --elevated-soft: #fff0cf;
  --high: #cf3f45;
  --high-soft: #fbe5e5;
  --warning: #c45c20;
  --shadow: 0 12px 34px rgba(25, 38, 44, 0.16);
  --header-h: 58px;
  --summary-h: 48px;
  --status-h: 28px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  color: var(--text);
  background: var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  font-size: 13px;
  letter-spacing: 0;
}

button,
input,
select {
  color: inherit;
  font: inherit;
  letter-spacing: 0;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 2px solid var(--low);
  outline-offset: 2px;
}

.app-shell {
  display: grid;
  grid-template-rows: var(--header-h) var(--summary-h) minmax(0, 1fr) var(--status-h);
  width: 100%;
  height: 100%;
}

.topbar {
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 22px;
  min-width: 0;
  padding: 0 14px;
  color: #f8fbfc;
  background: #172126;
  border-bottom: 1px solid #2e3a40;
}

.brand-block {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
  min-width: 190px;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #d9fbf7;
  background: #226b70;
  border: 1px solid #438a8e;
  border-radius: 6px;
}

.brand-mark svg {
  width: 20px;
  height: 20px;
}

.brand-name {
  font-size: 15px;
  font-weight: 750;
  line-height: 1.15;
}

.brand-subtitle {
  margin-top: 2px;
  color: #aab6bc;
  font-size: 11px;
}

.freshness {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 130px;
  color: #c8d1d5;
  font-size: 12px;
  white-space: nowrap;
}

.status-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  background: #5bbf92;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(91, 191, 146, 0.14);
}

.status-dot.is-loading {
  background: #d9a33d;
  box-shadow: 0 0 0 3px rgba(217, 163, 61, 0.16);
}

.status-dot.is-stale,
.status-dot.is-error {
  background: #e05d63;
  box-shadow: 0 0 0 3px rgba(224, 93, 99, 0.16);
}

.toolbar {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}

.workspace-tabs {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  background: #263238;
  border: 1px solid #445158;
  border-radius: 5px;
}

.workspace-tabs a {
  padding: 6px 10px;
  color: #b8c3c8;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
  border-radius: 3px;
}

.workspace-tabs a:hover,
.workspace-tabs a.is-active {
  color: #ffffff;
  background: #3c4a51;
}

.toolbar-date {
  height: 32px;
  padding: 0 8px;
  color: #f3f6f7;
  background: #263238;
  border: 1px solid #445158;
  border-radius: 4px;
}

.select-field,
.sort-field {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #aeb9be;
  font-size: 11px;
}

.select-field select,
.custom-range input {
  height: 32px;
  color: #f3f6f7;
  background: #263238;
  border: 1px solid #445158;
  border-radius: 4px;
}

.select-field select {
  min-width: 122px;
  padding: 0 30px 0 9px;
}

.custom-range {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #aeb9be;
}

.custom-range[hidden] {
  display: none;
}

.custom-range input {
  width: 116px;
  padding: 0 7px;
}

.custom-range input[type="time"] {
  width: 90px;
}

.icon-button {
  display: inline-grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  padding: 0;
  place-items: center;
  color: inherit;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 5px;
  cursor: pointer;
}

.topbar .icon-button {
  color: #dfe5e8;
  border-color: #455159;
}

.icon-button:hover {
  background: rgba(255, 255, 255, 0.08);
}

.icon-button svg {
  width: 17px;
  height: 17px;
}

.icon-button.is-spinning svg {
  animation: spin 0.8s linear infinite;
}

.toggle-control {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #d2dadd;
  font-size: 11px;
  cursor: pointer;
  user-select: none;
}

.toggle-control input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.toggle-track {
  position: relative;
  width: 30px;
  height: 16px;
  background: #4a565c;
  border-radius: 9px;
  transition: background 150ms ease;
}

.toggle-track::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 10px;
  height: 10px;
  content: "";
  background: #d6dcdf;
  border-radius: 50%;
  transition: transform 150ms ease;
}

.toggle-control input:checked + .toggle-track {
  background: #2f8589;
}

.toggle-control input:checked + .toggle-track::after {
  transform: translateX(14px);
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(110px, 150px)) minmax(180px, 1fr);
  min-width: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.outcome-summary {
  grid-template-columns: repeat(5, minmax(105px, 145px)) minmax(170px, 1fr);
}

.summary-item {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  padding: 0 16px;
  border-right: 1px solid var(--line);
}

.summary-label {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.summary-item strong {
  font-size: 17px;
  font-variant-numeric: tabular-nums;
}

.summary-time {
  justify-content: flex-end;
  border-right: 0;
}

.summary-time strong {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace {
  position: relative;
  display: grid;
  grid-template-columns: 306px minmax(360px, 1fr) 354px;
  min-width: 0;
  min-height: 0;
}

.outcome-workspace {
  grid-template-columns: 330px minmax(360px, 1fr) 390px;
}

.outcome-rail {
  grid-template-rows: auto auto minmax(0, 1fr);
}

#outcomeMap {
  width: 100%;
  height: 100%;
}

.outcome-list {
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  border-top: 1px solid var(--line);
}

.outcome-row {
  display: grid;
  width: 100%;
  gap: 8px;
  padding: 12px 14px;
  text-align: left;
  background: #ffffff;
  border: 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}

.outcome-row:hover,
.outcome-row.is-selected {
  background: #edf5f5;
}

.outcome-row.is-selected {
  box-shadow: inset 3px 0 0 var(--low);
}

.outcome-row.research-checked:not(.is-selected) {
  box-shadow: inset 3px 0 0 #5b8f78;
}

.outcome-row.research-checked .outcome-status-chip.pending {
  color: #285b46;
  background: #e8f2ed;
  border-color: #a9c9ba;
}

.outcome-row-head,
.evidence-head,
.evidence-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.outcome-row-head span,
.outcome-row-meta,
.evidence-head span,
.evidence-meta {
  color: var(--muted);
  font-size: 10px;
}

.outcome-row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.outcome-status-chip {
  width: fit-content;
  padding: 3px 6px;
  font-size: 10px;
  font-weight: 750;
  border: 1px solid;
  border-radius: 4px;
}

.outcome-status-chip.confirmed {
  color: #18613d;
  background: #e0f1e8;
  border-color: #9bcbb2;
}

.outcome-status-chip.review {
  color: #8b5600;
  background: var(--elevated-soft);
  border-color: #e1bd75;
}

.outcome-status-chip.pending {
  color: #4f626b;
  background: #edf1f3;
  border-color: #c7d0d5;
}

.outcome-status-chip.closed {
  color: #4f626b;
  background: #ffffff;
  border-color: #c7d0d5;
}

.outcome-marker-shell {
  display: grid;
  place-items: center;
}

.outcome-marker {
  width: 10px;
  height: 10px;
  background: #718087;
  border: 2px solid #ffffff;
  border-radius: 1px;
  box-shadow: 0 1px 5px rgba(20, 32, 38, 0.45);
  transform: rotate(45deg);
}

.outcome-marker-shell.confirmed .outcome-marker {
  background: #2d8a58;
}

.outcome-marker-shell.review .outcome-marker {
  background: #d28a12;
}

.outcome-marker-shell.selected .outcome-marker {
  border-color: #172126;
}

.evidence-point-shell {
  display: grid;
  place-items: center;
}

.evidence-point {
  width: 10px;
  height: 10px;
  background: #f5f7f7;
  border: 3px solid #a64b34;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(20, 32, 38, 0.38);
}

.key-dot.official {
  background: #2d8a58;
}

.key-dot.review {
  background: #d28a12;
}

.key-dot.pending {
  background: #718087;
}

.outcome-status-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 16px 14px;
  padding: 10px 12px;
  background: #edf1f3;
  border-left: 4px solid #718087;
}

.outcome-status-banner.confirmed {
  background: #e0f1e8;
  border-color: #2d8a58;
}

.outcome-status-banner.review {
  background: var(--elevated-soft);
  border-color: #d28a12;
}

.outcome-status-banner strong {
  font-size: 10px;
}

.research-facts {
  margin: 0;
}

.research-facts div {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
}

.research-facts dt {
  color: var(--muted);
}

.research-facts dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-weight: 600;
}

.radar-scan-field {
  display: grid;
  gap: 5px;
}

.radar-scan-field > span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
}

.radar-scan-field select {
  width: 100%;
  min-width: 0;
  height: 34px;
  padding: 0 8px;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  font-size: 10px;
}

.radar-scan-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 10px;
  min-height: 24px;
  margin: 8px 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.4;
}

.radar-scan-facts .radar-detected {
  color: #a52f36;
  font-weight: 750;
}

.radar-review-actions .radar-download-action {
  grid-column: 1 / -1;
}

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

.evidence-item {
  padding: 9px;
  background: var(--surface-muted);
  border: 1px solid var(--line);
  border-radius: 5px;
}

.evidence-item blockquote {
  margin: 4px 0 9px;
  color: #35444b;
  font-size: 11px;
  line-height: 1.45;
}

.evidence-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 12px;
  margin: 8px 0;
  padding: 7px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.evidence-facts div {
  min-width: 0;
  padding: 3px 0;
}

.evidence-facts dt,
.evidence-quote-label {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
}

.evidence-facts dd {
  margin: 2px 0 0;
  overflow-wrap: anywhere;
  font-size: 10px;
  font-weight: 650;
}

.evidence-quote-label {
  margin-top: 8px;
}

.evidence-meta a {
  color: #176f76;
  font-weight: 700;
}

.storm-rail,
.inspector {
  min-width: 0;
  min-height: 0;
  background: var(--surface);
}

.storm-rail {
  z-index: 500;
  display: grid;
  grid-template-rows: auto auto auto auto minmax(0, 1fr);
  border-right: 1px solid var(--line);
}

.rail-header,
.inspector-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.rail-header {
  padding: 16px 15px 11px;
}

.eyebrow {
  display: block;
  margin-bottom: 3px;
  color: var(--quiet);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: 17px;
  line-height: 1.25;
}

.result-count {
  min-width: 30px;
  padding: 4px 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  background: var(--surface-muted);
  border: 1px solid var(--line);
  border-radius: 4px;
}

.search-field {
  position: relative;
  margin: 0 14px 10px;
}

.search-field > svg {
  position: absolute;
  top: 9px;
  left: 10px;
  z-index: 1;
  width: 15px;
  height: 15px;
  color: var(--quiet);
}

.search-field input {
  width: 100%;
  height: 34px;
  padding: 0 34px 0 32px;
  background: var(--surface-muted);
  border: 1px solid var(--line);
  border-radius: 5px;
}

.search-field input:focus {
  background: #fff;
  border-color: #7b9da0;
}

.clear-search {
  position: absolute;
  top: 5px;
  right: 5px;
  display: grid;
  width: 24px;
  height: 24px;
  padding: 0;
  place-items: center;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 4px;
  cursor: pointer;
}

.clear-search svg {
  width: 14px;
  height: 14px;
}

.segmented-control {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 0 14px 10px;
  padding: 2px;
  background: #e9edef;
  border-radius: 5px;
}

.segmented-control button {
  min-width: 0;
  height: 29px;
  padding: 0 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  background: transparent;
  border: 0;
  border-radius: 3px;
  cursor: pointer;
}

.segmented-control button.is-active {
  color: var(--ink);
  background: #fff;
  box-shadow: 0 1px 2px rgba(24, 34, 39, 0.12);
}

.sort-field {
  justify-content: space-between;
  padding: 0 14px 10px;
  color: var(--muted);
}

.sort-field select {
  width: 146px;
  height: 29px;
  padding: 0 26px 0 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
}

.storm-list {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  border-top: 1px solid var(--line);
}

.storm-row {
  position: relative;
  display: grid;
  width: 100%;
  grid-template-columns: 7px minmax(0, 1fr);
  min-height: 91px;
  padding: 0;
  background: #fff;
  border: 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}

.storm-row:hover {
  background: #f8fafb;
}

.storm-row.is-selected {
  background: #eef6f6;
  box-shadow: inset 0 0 0 1px #9cc1c2;
}

.risk-bar {
  height: 100%;
  background: var(--low);
}

.storm-row.elevated .risk-bar {
  background: var(--elevated);
}

.storm-row.high .risk-bar {
  background: var(--high);
}

.storm-row-content {
  min-width: 0;
  padding: 11px 12px 10px;
  text-align: left;
}

.storm-row-head,
.storm-row-meta,
.storm-scores {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.storm-id {
  overflow: hidden;
  font-size: 13px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.storm-time,
.storm-row-meta {
  color: var(--muted);
  font-size: 10px;
}

.storm-row-meta {
  margin-top: 4px;
  justify-content: flex-start;
}

.storm-row-meta span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.storm-row-meta span + span::before {
  margin-right: 7px;
  content: "/";
  color: #b5bec2;
}

.storm-scores {
  margin-top: 8px;
}

.score-pair {
  display: flex;
  align-items: baseline;
  gap: 5px;
}

.score-pair span {
  color: var(--quiet);
  font-size: 9px;
  font-weight: 750;
  text-transform: uppercase;
}

.score-pair strong {
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.warning-badge {
  padding: 2px 5px;
  color: #9c351e;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  background: #ffebe2;
  border: 1px solid #f0b49f;
  border-radius: 3px;
}

.list-state {
  display: flex;
  min-height: 150px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 22px;
  color: var(--muted);
  text-align: center;
}

.spinner {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  border: 2px solid #c7d0d4;
  border-top-color: var(--low);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.map-region {
  position: relative;
  min-width: 0;
  min-height: 0;
  background: #d9e0e2;
}

#map {
  width: 100%;
  height: 100%;
  background: #dce3e5;
}

.leaflet-control-zoom {
  border: 1px solid var(--line-strong) !important;
  border-radius: 5px !important;
  box-shadow: 0 2px 8px rgba(24, 34, 39, 0.12) !important;
}

.leaflet-control-zoom a {
  color: var(--text) !important;
  background: #fff !important;
}

.leaflet-control-attribution {
  font-size: 9px !important;
}

.map-key {
  position: absolute;
  right: 12px;
  bottom: 16px;
  z-index: 450;
  display: flex;
  gap: 12px;
  padding: 7px 9px;
  color: var(--muted);
  font-size: 10px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: 5px;
  box-shadow: 0 2px 8px rgba(24, 34, 39, 0.1);
}

.map-key span {
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.spatial-key {
  right: auto;
  left: 12px;
}

.key-footprint {
  width: 12px;
  height: 8px;
  background: rgba(43, 154, 160, 0.14);
  border: 1px solid #16747a;
}

.key-track {
  width: 14px;
  height: 0;
  border-top: 2px solid #183f45;
}

.key-report {
  width: 8px;
  height: 8px;
  background: #f5f7f7;
  border: 2px solid #a64b34;
  border-radius: 50%;
}

.key-dot {
  width: 8px;
  height: 8px;
  background: var(--low);
  border-radius: 50%;
}

.key-dot.elevated {
  background: var(--elevated);
}

.key-dot.high {
  background: var(--high);
}

.map-message {
  position: absolute;
  top: 14px;
  left: 50%;
  z-index: 450;
  max-width: min(460px, calc(100% - 30px));
  padding: 8px 11px;
  color: #6f351f;
  font-size: 11px;
  text-align: center;
  background: #fff4e8;
  border: 1px solid #e9bd94;
  border-radius: 5px;
  transform: translateX(-50%);
}

.storm-marker-shell {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 0;
  background: transparent;
}

.storm-marker {
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  color: #fff;
  font-size: 7px;
  background: var(--marker-color);
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 2px 7px rgba(16, 23, 25, 0.4);
  transition: width 120ms ease, height 120ms ease, box-shadow 120ms ease;
}

.storm-marker-shell.selected .storm-marker {
  width: 25px;
  height: 25px;
  box-shadow: 0 0 0 4px rgba(24, 143, 149, 0.24), 0 3px 9px rgba(16, 23, 25, 0.45);
}

.track-start {
  width: 7px;
  height: 7px;
  background: #607179;
  border: 1px solid #fff;
  border-radius: 1px;
  box-shadow: 0 1px 3px rgba(16, 23, 25, 0.35);
  transform: rotate(45deg);
}

.leaflet-tooltip.storm-tooltip {
  padding: 5px 7px;
  color: #f5f8f9;
  font-size: 10px;
  background: #1f2a2f;
  border: 0;
  border-radius: 4px;
  box-shadow: 0 3px 12px rgba(16, 23, 25, 0.2);
}

.leaflet-tooltip.storm-tooltip::before {
  border-top-color: #1f2a2f;
}

.inspector {
  z-index: 600;
  overflow-x: hidden;
  overflow-y: auto;
  border-left: 1px solid var(--line);
}

.empty-inspector {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 28px;
  color: var(--muted);
  text-align: center;
}

.empty-inspector svg {
  width: 26px;
  height: 26px;
  margin-bottom: 5px;
  color: #8d9fa5;
}

.empty-inspector strong {
  color: var(--text);
  font-size: 14px;
}

.empty-inspector span {
  max-width: 220px;
  font-size: 11px;
  line-height: 1.5;
}

.inspector-header {
  padding: 17px 17px 13px;
  border-bottom: 1px solid var(--line);
}

.inspector-header h2 {
  font-size: 18px;
}

.detail-meta {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}

.close-inspector {
  display: none;
  color: var(--muted);
}

.risk-banner {
  display: flex;
  min-height: 46px;
  align-items: center;
  justify-content: space-between;
  padding: 0 17px;
  color: #175a5f;
  background: var(--low-soft);
  border-bottom: 1px solid #b8d9d9;
}

.risk-banner.elevated {
  color: #7a4b00;
  background: var(--elevated-soft);
  border-color: #e8c77d;
}

.risk-banner.high {
  color: #842c31;
  background: var(--high-soft);
  border-color: #e9b5b8;
}

.risk-banner span {
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
}

.risk-banner strong {
  font-size: 19px;
  font-variant-numeric: tabular-nums;
}

.metric-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--line);
}

.metric {
  min-width: 0;
  min-height: 83px;
  padding: 13px 15px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.metric:nth-child(2n) {
  border-right: 0;
}

.metric:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.metric span {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metric strong {
  display: block;
  margin-top: 5px;
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}

.metric.compact {
  min-height: 64px;
}

.metric.compact strong {
  font-size: 15px;
}

.meter {
  height: 4px;
  margin-top: 8px;
  overflow: hidden;
  background: #e8edef;
  border-radius: 2px;
}

.meter i {
  display: block;
  width: 0;
  height: 100%;
  background: var(--low);
  transition: width 180ms ease;
}

.detail-section {
  padding: 15px 17px;
  border-bottom: 1px solid var(--line);
}

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

.section-heading h3 {
  font-size: 12px;
}

.section-heading span {
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trend-chart {
  width: 100%;
  height: 105px;
  overflow: hidden;
  background: #fafbfb;
  border: 1px solid var(--line);
  border-radius: 4px;
}

.trend-chart svg {
  display: block;
  width: 100%;
  height: 100%;
}

.trend-legend {
  display: flex;
  gap: 13px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 9px;
}

.trend-legend span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.trend-swatch {
  width: 13px;
  height: 2px;
  background: var(--low);
}

.trend-swatch.probtor {
  background: var(--elevated);
}

.warning-list {
  display: grid;
  gap: 7px;
}

.warning-item {
  padding: 8px 9px;
  background: #fff6f1;
  border-left: 3px solid var(--warning);
}

.warning-item.tornado {
  background: #fff0f0;
  border-color: var(--high);
}

.warning-item strong,
.warning-item span {
  display: block;
}

.warning-item strong {
  font-size: 10px;
}

.warning-item span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.4;
}

.quiet-state {
  padding: 9px;
  color: var(--muted);
  font-size: 10px;
  background: var(--surface-muted);
  border: 1px solid var(--line);
  border-radius: 4px;
}

.analysis-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.analysis-action {
  display: flex;
  min-width: 0;
  min-height: 38px;
  align-items: center;
  gap: 8px;
  padding: 0 9px;
  color: var(--text);
  text-decoration: none;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
}

.analysis-action:hover {
  background: var(--surface-muted);
  border-color: #87989f;
}

.analysis-action.primary {
  color: #fff;
  background: #236f73;
  border-color: #236f73;
}

.analysis-action.primary:hover {
  background: #1c6064;
}

.analysis-action svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}

.analysis-action span {
  overflow: hidden;
  font-size: 10px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.analysis-action.is-disabled {
  color: var(--quiet);
  background: #f4f6f7;
  border-color: var(--line);
  pointer-events: none;
}

.statusbar {
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 12px;
  color: var(--muted);
  font-size: 10px;
  background: #f8f9fa;
  border-top: 1px solid var(--line);
}

.ops-shell {
  grid-template-rows: var(--header-h) var(--summary-h) minmax(0, 1fr) var(--status-h);
}

.ops-workspace {
  min-height: 0;
  overflow: auto;
  padding: 14px;
  background: var(--bg);
}

.ops-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 12px;
  max-width: 1440px;
  margin: 0 auto;
}

.ops-component {
  min-width: 0;
  padding: 13px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--quiet);
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(20, 31, 36, 0.05);
}

.ops-component.status-ok {
  border-left-color: var(--low);
}

.ops-component.status-warning,
.ops-component.status-idle {
  border-left-color: var(--elevated);
}

.ops-component.status-stale,
.ops-component.status-down {
  border-left-color: var(--high);
}

.ops-component-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
}

.ops-component-head h2 {
  margin: 2px 0 0;
  font-size: 15px;
  line-height: 1.2;
}

.ops-stage {
  display: block;
  overflow: hidden;
  color: var(--quiet);
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.ops-component-head p {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.35;
}

.ops-component-head > strong {
  padding: 3px 7px;
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  background: var(--surface-muted);
  border: 1px solid var(--line);
  border-radius: 4px;
}

.ops-status-dot {
  width: 10px;
  height: 10px;
  margin-top: 4px;
  background: var(--quiet);
  border-radius: 50%;
}

.status-ok .ops-status-dot {
  background: var(--low);
}

.status-warning .ops-status-dot,
.status-idle .ops-status-dot {
  background: var(--elevated);
}

.status-stale .ops-status-dot,
.status-down .ops-status-dot {
  background: var(--high);
}

.ops-detail {
  margin-top: 10px;
  padding: 7px 8px;
  overflow: hidden;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: var(--surface-muted);
  border: 1px solid var(--line);
  border-radius: 4px;
}

.ops-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-top: 12px;
}

.ops-metric {
  min-width: 0;
  padding: 8px;
  background: #fbfcfd;
  border: 1px solid var(--line);
  border-radius: 5px;
}

.ops-metric span {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.2;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.ops-metric strong {
  display: block;
  min-width: 0;
  margin-top: 4px;
  overflow: hidden;
  font-size: 12px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 1180px) {
  .workspace {
    grid-template-columns: 286px minmax(340px, 1fr);
  }

  .inspector {
    position: absolute;
    top: 10px;
    right: 10px;
    bottom: 10px;
    width: 350px;
    border: 1px solid var(--line-strong);
    border-radius: 6px;
    box-shadow: var(--shadow);
  }

  .inspector:not(.is-open) {
    display: none;
  }

  .close-inspector {
    display: grid;
  }

  .summary-strip {
    grid-template-columns: repeat(4, minmax(100px, 1fr));
  }

  .summary-time {
    display: none;
  }
}

@media (max-width: 820px) {
  :root {
    --header-h: 104px;
    --summary-h: 45px;
  }

  .topbar {
    flex-wrap: wrap;
    align-content: center;
    gap: 8px 14px;
    padding: 8px 10px;
  }

  .brand-block {
    min-width: 0;
  }

  .brand-subtitle {
    display: none;
  }

  .freshness {
    margin-left: auto;
  }

  .toolbar {
    width: 100%;
    flex-basis: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .toolbar::-webkit-scrollbar {
    display: none;
  }

  .summary-strip {
    grid-template-columns: repeat(4, 1fr);
  }

  .summary-item {
    justify-content: center;
    gap: 4px;
    padding: 0 5px;
  }

  .summary-label {
    font-size: 8px;
  }

  .summary-item strong {
    font-size: 13px;
  }

  .workspace {
    grid-template-columns: 1fr;
    grid-template-rows: 214px minmax(280px, 1fr);
  }

  .storm-rail {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto minmax(0, 1fr);
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .rail-header {
    padding: 10px 12px 7px;
  }

  .rail-header h1 {
    font-size: 15px;
  }

  .search-field {
    margin: 9px 10px 7px 0;
  }

  .segmented-control {
    margin: 0 8px 8px 11px;
  }

  .sort-field {
    justify-content: flex-end;
    padding: 0 10px 8px 0;
  }

  .sort-field > span {
    display: none;
  }

  .storm-list {
    grid-column: 1 / -1;
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    border-top: 1px solid var(--line);
  }

  .storm-row {
    width: 240px;
    min-width: 240px;
    min-height: 96px;
    border-right: 1px solid var(--line);
  }

  .map-region {
    grid-row: 2;
  }

  .map-key {
    right: 7px;
    bottom: 7px;
    flex-direction: column;
    gap: 4px;
  }

  .inspector {
    position: fixed;
    top: calc(var(--header-h) + 8px);
    right: 8px;
    bottom: calc(var(--status-h) + 8px);
    left: 8px;
    width: auto;
  }

  .outcomes-shell {
    --header-h: 142px;
    width: 100vw;
    max-width: 100vw;
    height: 100%;
    overflow-y: auto;
    grid-template-rows: var(--header-h) var(--summary-h) auto var(--status-h);
  }

  .outcomes-shell .topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 170px);
    grid-template-rows: 42px auto;
    width: 100%;
    overflow: hidden;
  }

  .outcomes-shell .workspace-tabs {
    min-width: 0;
    margin-left: 0;
    justify-self: end;
  }

  .outcomes-shell .toolbar {
    grid-column: 1 / -1;
    width: auto;
    max-width: calc(100vw - 20px);
  }

  .outcome-summary .summary-time {
    display: none;
  }

  .outcomes-shell .outcome-summary {
    width: 100%;
    overflow: hidden;
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .outcome-rail {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto minmax(0, 1fr);
  }

  .outcome-rail .search-field {
    margin: 0 10px 8px;
  }

  .outcome-list {
    grid-column: 1 / -1;
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .outcome-row {
    width: 270px;
    min-width: 270px;
    border-right: 1px solid var(--line);
  }

  .outcomes-shell .outcome-workspace {
    width: 100%;
    overflow: hidden;
    grid-template-columns: 1fr;
    grid-template-rows: 214px 430px auto;
  }

  .outcomes-shell .outcome-inspector {
    position: static;
    display: block;
    grid-row: 3;
    width: auto;
    min-height: 0;
    border: 0;
    border-top: 1px solid var(--line);
    border-radius: 0;
    box-shadow: none;
  }

  .outcomes-shell .outcome-key {
    display: none;
  }

  .outcomes-shell .spatial-key {
    right: auto;
    left: 7px;
  }
}

@media (max-width: 540px) {
  .select-field > span {
    display: none;
  }

  .custom-range {
    position: fixed;
    top: var(--header-h);
    right: 8px;
    left: 8px;
    z-index: 1500;
    padding: 8px;
    background: #1f2a2f;
    border: 1px solid #4c5b62;
    border-radius: 5px;
    box-shadow: var(--shadow);
  }

  .custom-range input {
    min-width: 0;
    flex: 1 1 auto;
  }

  .summary-item {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1;
  }

  .outcomes-shell .brand-mark {
    width: 30px;
    height: 30px;
  }

  .outcomes-shell .workspace-tabs a {
    padding: 6px 7px;
  }

  .outcomes-shell .summary-label {
    max-width: 76px;
    text-align: center;
    white-space: normal;
  }

  .search-field {
    margin-left: 4px;
  }

  .sort-field select {
    width: 122px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
