:root {
  color-scheme: light;
  --night: #172124;
  --night-2: #202c30;
  --paper: #f3f4ef;
  --card: #fcfcf8;
  --ink: #1b292a;
  --muted: #6c7a78;
  --faint: #9ca9a3;
  --line: #dce2dc;
  --line-dark: #344247;
  --lime: #d5f36a;
  --lime-ink: #32431a;
  --cyan: #52bfd0;
  --cyan-dark: #246c75;
  --coral: #da6149;
  --coral-soft: #fae7e0;
  --amber: #ce8b35;
  --amber-soft: #f5ebd6;
  --green: #32856e;
  --green-soft: #e2eee8;
  --font: "Avenir Next", "Trebuchet MS", sans-serif;
  --display: "Avenir Next Condensed", "Franklin Gothic Medium", "Arial Narrow", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font); font-size: 14px; -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .55; }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 3px solid #1b8e9d; outline-offset: 3px; }
a { color: inherit; }
.app-shell { max-width: 1640px; margin: 0 auto; padding: 0 46px 24px; }
.topbar { min-height: 70px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; border-bottom: 1px solid var(--line-dark); background: var(--night); color: #e9efeb; padding: 0 26px; margin: 0 -46px; }
.brand { display: inline-flex; align-items: center; gap: 10px; width: max-content; text-decoration: none; }
.brand-mark { width: 23px; height: 27px; display: inline-flex; }
.brand-mark svg { width: 100%; height: 100%; fill: var(--cyan); }
.brand-mark svg path + path { fill: none; stroke: var(--night); stroke-width: 2; stroke-linecap: round; }
.brand-name { font-family: var(--display); font-size: 19px; font-weight: 800; letter-spacing: .11em; }
.brand-name span { color: var(--lime); }
.topbar-center, .topbar-right, .demo-chip, .eyebrow, .summary-label, .weather-foot, .scenario-labels label, .range-scale, .schematic-pill, .map-legend, .map-note, .map-place, .queue-item small, .queue-score small, .detail-topline, .detail-factors span, .detail-foot, .status-pill, .footer, .hero-boundary { font-family: var(--mono); letter-spacing: .04em; }
.topbar-center { display: flex; align-items: center; gap: 10px; color: #bdc9c4; font-size: 9px; }
.topbar-divider { color: #566469; }
.live-dot { width: 7px; height: 7px; display: inline-block; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 4px #d5f36a20; }
.topbar-right { display: flex; justify-content: flex-end; gap: 11px; align-items: center; }
.demo-chip { color: var(--lime); background: #31402b; border: 1px solid #566543; padding: 7px 9px; font-size: 8px; }
.team-chip { width: 30px; height: 30px; border-radius: 50%; background: var(--lime); color: var(--night); display: grid; place-items: center; font-family: var(--mono); font-weight: 700; font-size: 10px; }

.hero-grid { display: grid; grid-template-columns: minmax(360px, 1.12fr) minmax(420px, .88fr); gap: 36px; align-items: center; padding: 42px 26px 38px; margin: 0 -46px; color: #eff4ef; background-color: var(--night); background-image: radial-gradient(ellipse at 91% 8%, #25454a 0, transparent 31%), repeating-linear-gradient(132deg, transparent 0 38px, #ffffff08 39px 40px); }
.eyebrow { margin: 0 0 11px; color: var(--muted); text-transform: uppercase; font-size: 9px; }
.hero-copy .eyebrow { color: var(--cyan); }
h1, h2, h3, p { margin-top: 0; }
h1 { margin: 0; font-family: var(--display); font-size: clamp(44px, 5.5vw, 71px); line-height: .94; letter-spacing: -.035em; font-weight: 750; }
h1 span { color: var(--lime); }
.hero-lede { max-width: 550px; color: #bac8c2; margin: 17px 0 0; font-size: 14px; line-height: 1.7; }
.hero-boundary { display: flex; gap: 8px; align-items: center; margin-top: 20px; color: #b8c6bf; font-size: 9px; }
.boundary-mark { display: inline-grid; place-items: center; width: 16px; height: 16px; border: 1px solid #92a391; border-radius: 50%; color: var(--lime); font-size: 10px; }

.weather-panel { color: var(--ink); padding: 20px 22px 16px; border-radius: 5px; background: var(--card); box-shadow: 9px 10px 0 #0b1012; }
.weather-head, .weather-reading, .weather-foot, .scenario-labels, .weather-source { display: flex; align-items: center; justify-content: space-between; }
.weather-head { margin-bottom: 16px; }
.weather-head .eyebrow { margin-bottom: 4px; color: var(--cyan-dark); }
.weather-head h2 { font-family: var(--display); font-size: 26px; margin: 0; line-height: 1; }
.icon-button { width: 34px; height: 34px; border: 1px solid var(--line); background: #f6f7f1; border-radius: 50%; color: var(--cyan-dark); font-size: 21px; line-height: 1; }
.icon-button:hover { background: var(--cyan-dark); color: white; }
.weather-reading { justify-content: flex-start; gap: 0; padding: 13px 0 12px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.weather-reading > div:not(.weather-divider) { min-width: 44%; display: flex; flex-direction: column; gap: 3px; }
.weather-reading strong { font-family: var(--display); font-size: 30px; line-height: 1; }
.weather-reading span { color: var(--muted); font-size: 9px; }
.weather-divider { width: 1px; height: 38px; margin: 0 22px 0 0; background: var(--line); }
.weather-source { justify-content: flex-start; gap: 7px; min-height: 31px; color: var(--muted); font-size: 10px; }
.weather-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--cyan-dark); }
.weather-foot { justify-content: space-between; color: #8d9a94; font-size: 8px; }

.scenario-row { display: grid; grid-template-columns: minmax(185px, .75fr) minmax(260px, 1.15fr) minmax(210px, .66fr); gap: 23px; align-items: center; padding: 19px 23px; background: var(--card); border: 1px solid var(--line); border-top: 0; }
.scenario-title { display: flex; align-items: center; gap: 12px; }
.scenario-icon { display: grid; place-items: center; width: 36px; height: 36px; background: var(--lime); color: var(--night); border-radius: 50%; font-size: 21px; font-weight: 700; }
.scenario-title .eyebrow { margin-bottom: 3px; color: var(--muted); }
.scenario-title h2 { margin: 0; font-family: var(--display); font-size: 22px; line-height: 1; }
.scenario-labels { margin-bottom: 7px; }
.scenario-labels label { color: var(--muted); font-size: 8px; }
.scenario-labels label span { color: var(--amber); font-weight: 700; }
.scenario-labels output { font-family: var(--display); font-size: 18px; font-weight: 700; }
input[type="range"] { appearance: none; display: block; width: 100%; height: 6px; border-radius: 5px; background: linear-gradient(90deg, var(--cyan) 0%, var(--lime) 54%, var(--amber) 100%); }
input[type="range"]::-webkit-slider-thumb { appearance: none; width: 17px; height: 17px; border: 3px solid var(--night); border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 2px var(--card); }
input[type="range"]::-moz-range-thumb { width: 12px; height: 12px; border: 3px solid var(--night); border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 2px var(--card); }
.range-scale { display: flex; justify-content: space-between; margin-top: 5px; color: #98a49e; font-size: 8px; }
.button-live, .button-primary, .button-quiet { border-radius: 3px; padding: 11px 13px; font-size: 10px; font-weight: 700; letter-spacing: .01em; }
.button-live { border: 1px solid var(--night); background: var(--night); color: var(--lime); }
.button-live:hover:not(:disabled) { background: #2c3b3d; }
.button-live span { padding-left: 7px; }
.scenario-note { grid-column: 2 / 4; margin: -14px 0 0; color: #94a09a; font-size: 9px; }

.summary-strip { display: grid; grid-template-columns: .8fr .8fr .8fr 1.55fr; margin-top: 20px; border: 1px solid var(--line); background: #e9ede7; }
.summary-cell, .summary-recommendation { min-height: 88px; padding: 14px 17px 12px; border-right: 1px solid #d7ded7; display: flex; flex-direction: column; align-items: flex-start; }
.summary-label { margin-bottom: 3px; color: #81908a; font-size: 8px; }
.summary-cell strong, .summary-recommendation strong { font-family: var(--display); font-size: 22px; line-height: 1.1; }
.summary-cell small, .summary-recommendation small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.summary-recommendation { border-right: 0; background: #dce9df; }
.summary-recommendation strong { color: #285e4c; }

.workspace-grid { display: grid; grid-template-columns: minmax(0, 1.52fr) minmax(360px, .88fr); gap: 18px; margin-top: 18px; align-items: stretch; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 4px; }
.map-panel { padding: 17px 18px 13px; min-width: 0; }
.panel-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 15px; }
.panel-heading .eyebrow { margin-bottom: 4px; color: var(--cyan-dark); }
.panel-heading h2 { margin: 0; font-family: var(--display); font-size: 25px; line-height: 1; }
.schematic-pill { display: inline-flex; align-items: center; gap: 6px; padding: 7px 8px; border: 1px solid var(--line); color: #788680; font-size: 8px; white-space: nowrap; }
.schematic-pill i { width: 6px; height: 6px; background: var(--amber); border-radius: 50%; }
.map-canvas-wrap { height: 402px; position: relative; overflow: hidden; margin-top: 15px; background: #f1f2ec; border: 1px solid #e1e6df; }
.storm-map { display: block; width: 100%; height: 100%; }
.road-base { fill: none; stroke: #fbfcf8; stroke-width: 18; }
.flow-line { fill: none; stroke: #91bac0; stroke-width: 6; stroke-linecap: round; opacity: .72; }
.flow-main { stroke: #67aeb8; stroke-width: 7; stroke-dasharray: 2 11; }
.flow-side { stroke-width: 4; stroke-dasharray: 3 12; opacity: .48; }
.contour-line { fill: none; stroke: #7aa3a2; stroke-width: 1.2; stroke-dasharray: 1 11; opacity: .75; }
.map-note { fill: #758783; font-size: 9px; }
.map-place { fill: #9ba9a2; font: 9px var(--mono); letter-spacing: .08em; }
.asset-marker-layer { position: absolute; inset: 0; }
.asset-marker { position: absolute; transform: translate(-50%, -50%); width: 42px; height: 42px; display: grid; place-items: center; border: 0; border-radius: 50%; background: #cae8e7; box-shadow: 0 0 0 5px #cae8e75c; color: #1f6970; transition: transform .18s ease, box-shadow .18s ease; }
.asset-marker span { font-family: var(--mono); font-size: 10px; font-weight: 700; }
.asset-marker small { position: absolute; top: 41px; left: 50%; transform: translateX(-50%); padding: 4px 6px; color: #51625e; background: #fbfcf8ed; border: 1px solid #e0e5df; white-space: nowrap; font: 8px var(--mono); }
.asset-marker.hot { color: #8a3527; background: #f1b6a5; box-shadow: 0 0 0 5px #f1b6a566; }
.asset-marker.watch { color: #805314; background: #f1d693; box-shadow: 0 0 0 5px #f1d6936e; }
.asset-marker.clear { color: #27745c; background: #b8dbc5; box-shadow: 0 0 0 5px #b8dbc55c; }
.asset-marker.selected { z-index: 2; transform: translate(-50%, -50%) scale(1.14); box-shadow: 0 0 0 6px #172124, 0 0 0 10px var(--lime); }
.map-north { position: absolute; top: 13px; right: 16px; display: flex; flex-direction: column; align-items: center; color: #71817d; }
.map-north span { font-size: 19px; line-height: 1; }
.map-north small { font: 8px var(--mono); }
.map-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 13px; padding: 12px 1px 0; color: #73817c; font-size: 8px; }
.map-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.legend-marker { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.legend-marker.hot { background: var(--coral); }
.legend-marker.watch { background: var(--amber); }
.legend-marker.clear { background: var(--green); }
.map-legend-note { margin-left: auto; color: #9aa59f; }

.queue-panel { padding: 17px 17px 14px; min-width: 0; }
.queue-heading { align-items: center; }
.queue-count { min-width: 32px; height: 32px; display: grid; place-items: center; background: var(--night); color: var(--lime); font: 11px var(--mono); }
.queue-intro { margin: 11px 0 10px; color: var(--muted); font-size: 10px; }
.queue-list { display: flex; flex-direction: column; gap: 5px; }
.queue-item { width: 100%; display: grid; grid-template-columns: 28px minmax(0,1fr) 91px; align-items: center; gap: 8px; border: 1px solid transparent; border-bottom-color: var(--line); background: transparent; text-align: left; padding: 8px 6px; color: var(--ink); }
.queue-item:hover { background: #f3f5ed; }
.queue-item.active { border-color: #c8d995; background: #f2f5e7; }
.queue-order { font: 10px var(--mono); color: #9ca9a2; }
.queue-copy { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.queue-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.queue-item small { color: #8e9b95; font-size: 7px; }
.queue-score { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.queue-score strong { font-family: var(--display); font-size: 17px; line-height: 1; }
.queue-score small { color: #7a8983; font-size: 7px; text-align: right; }
.selected-asset { margin-top: 12px; padding: 12px; background: #eef1eb; border-left: 3px solid var(--lime); }
.detail-topline { display: flex; justify-content: space-between; gap: 8px; align-items: center; color: #77847e; font-size: 8px; }
.status-pill { padding: 4px 5px; font-size: 7px; white-space: nowrap; }
.status-pill.pending, .status-pill.blocked { color: #813b2d; background: var(--coral-soft); }
.status-pill.unknown { color: #845b19; background: var(--amber-soft); }
.status-pill.clear { color: #306c57; background: var(--green-soft); }
.selected-asset h3 { margin: 10px 0 4px; font-family: var(--display); font-size: 20px; line-height: 1; }
.detail-observation { margin: 0 0 11px; color: #63716c; font-size: 10px; line-height: 1.45; }
.detail-factors { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; padding: 9px 0; border-top: 1px solid #d6ded5; border-bottom: 1px solid #d6ded5; }
.detail-factors > div { display: flex; flex-direction: column; gap: 4px; }
.detail-factors span { color: #829089; font-size: 7px; }
.detail-factors strong { font: 700 14px var(--display); }
.detail-factors strong small { color: #8a9992; font: 8px var(--mono); }
.detail-actions { display: flex; gap: 7px; margin-top: 10px; }
.button-primary { border: 1px solid var(--night); color: var(--lime); background: var(--night); }
.button-primary:hover { background: #2c3b3d; }
.button-quiet { border: 1px solid #c7d0c9; color: #53635f; background: transparent; }
.button-quiet:hover { background: #e4e9e0; }
.detail-actions button { flex: 1; padding: 8px 6px; font-size: 8px; }
.detail-foot { margin: 8px 0 0; color: #96a29c; font-size: 7px; }

.model-note { display: grid; grid-template-columns: 35px minmax(0,1fr) auto; align-items: center; gap: 13px; margin-top: 17px; padding: 15px 18px; border: 1px solid #d4dbd3; background: #e7ebe3; }
.model-mark { display: grid; place-items: center; width: 30px; height: 30px; background: var(--night); color: var(--lime); font: 16px var(--mono); }
.model-note .eyebrow { margin: 0 0 5px; color: #6d7c75; }
.model-note p:last-child { margin: 0; color: #65736d; font-size: 10px; line-height: 1.5; }
.model-note strong { color: var(--ink); }
.text-link { padding: 7px 0 7px 10px; border: 0; color: #315d5c; background: transparent; white-space: nowrap; font-size: 9px; font-weight: 700; }
.text-link:hover { color: #0f3335; text-decoration: underline; }
.text-link span { padding-left: 4px; }
.footer { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 14px; color: #7e8c86; font-size: 8px; }
.footer b { color: var(--ink); }
.reset-demo { padding: 6px 8px; border: 1px solid #cdd5ce; background: transparent; color: #556661; font: 8px var(--mono); }
.reset-demo:hover { color: var(--ink); border-color: var(--ink); }

.model-dialog { width: min(540px, calc(100% - 28px)); border: 1px solid var(--line); padding: 0; color: var(--ink); background: var(--card); box-shadow: 0 18px 70px #0d191988; }
.model-dialog::backdrop { background: #10191caa; backdrop-filter: blur(3px); }
.dialog-content { position: relative; padding: 32px; }
.dialog-close { position: absolute; top: 11px; right: 14px; border: 0; background: transparent; color: #586763; font-size: 24px; }
.dialog-content .eyebrow { color: var(--cyan-dark); }
.dialog-content h2 { font: 700 31px/1.02 var(--display); }
.dialog-content p:not(.eyebrow) { color: #63716b; font-size: 12px; line-height: 1.65; }
.dialog-content .button-primary { margin-top: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (max-width: 1120px) {
  .app-shell { padding: 0 25px 20px; }
  .topbar, .hero-grid { margin-left: -25px; margin-right: -25px; }
  .hero-grid { padding-left: 25px; padding-right: 25px; grid-template-columns: 1fr 1fr; gap: 22px; }
  .scenario-row { grid-template-columns: minmax(170px, .7fr) minmax(240px, 1fr); }
  .button-live { grid-column: 2; }
  .scenario-note { grid-column: 2; margin-top: -15px; }
  .workspace-grid { grid-template-columns: 1fr; }
  .queue-panel { display: grid; grid-template-columns: 1fr 1fr; column-gap: 16px; }
  .queue-heading, .queue-intro { grid-column: 1 / -1; }
  .selected-asset { margin-top: 0; }
  .queue-list { align-self: start; }
}

@media (max-width: 700px) {
  .app-shell { padding: 0 13px 16px; }
  .topbar { min-height: 58px; padding: 0 13px; margin: 0 -13px; grid-template-columns: 1fr auto; }
  .topbar-center { display: none; }
  .brand-name { font-size: 16px; }
  .demo-chip { font-size: 7px; padding: 6px; }
  .hero-grid { display: block; margin: 0 -13px; padding: 28px 16px 22px; }
  h1 { font-size: clamp(45px, 13vw, 62px); }
  .hero-lede { font-size: 12px; margin-top: 13px; }
  .hero-boundary { font-size: 8px; margin: 14px 0 20px; }
  .weather-panel { padding: 15px; }
  .weather-reading strong { font-size: 25px; }
  .weather-divider { margin-right: 16px; }
  .scenario-row { display: grid; grid-template-columns: 1fr; gap: 12px; padding: 15px; }
  .scenario-control { padding: 3px 0; }
  .button-live, .scenario-note { grid-column: 1; }
  .scenario-note { margin: -7px 0 0; }
  .summary-strip { grid-template-columns: 1fr 1fr; }
  .summary-cell, .summary-recommendation { min-height: 75px; padding: 11px; border-bottom: 1px solid #d7ded7; }
  .summary-cell:nth-child(2) { border-right: 0; }
  .summary-recommendation { grid-column: 1 / -1; }
  .summary-cell strong, .summary-recommendation strong { font-size: 19px; }
  .workspace-grid { margin-top: 12px; }
  .map-panel, .queue-panel { padding: 13px 11px; }
  .panel-heading h2 { font-size: 22px; }
  .schematic-pill { font-size: 7px; padding: 6px; }
  .map-canvas-wrap { height: 325px; margin-top: 12px; }
  .asset-marker { width: 34px; height: 34px; }
  .asset-marker span { font-size: 9px; }
  .asset-marker small { top: 33px; font-size: 6px; }
  .map-legend { gap: 8px 11px; font-size: 7px; }
  .map-legend-note { width: 100%; margin-left: 0; }
  .queue-panel { display: block; }
  .selected-asset { margin-top: 12px; }
  .queue-item { grid-template-columns: 25px minmax(0, 1fr) 81px; padding: 8px 3px; }
  .model-note { grid-template-columns: 30px minmax(0,1fr); gap: 8px; padding: 12px; }
  .model-note p:last-child { font-size: 9px; }
  .text-link { grid-column: 2; justify-self: start; padding: 0; }
  .footer { flex-wrap: wrap; justify-content: flex-start; padding-top: 12px; font-size: 7px; }
  .footer > span:nth-child(2) { flex-basis: 100%; order: 1; }
  .reset-demo { margin-left: auto; }
}

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