:root {
  --ink: #202124;
  --muted: #60646c;
  --paper: #fafafa;
  --white: #fff;
  --line: #e1e3e6;
  --accent: #285b45;
  --mono: 'IBM Plex Mono', monospace;
  --sans: 'IBM Plex Sans', system-ui, sans-serif;
  --workspace-height: clamp(440px, calc(100vh - 335px), 720px);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 14px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; }
button { color: inherit; cursor: pointer; border: 0; }
button:disabled { opacity: .55; cursor: wait; }
a { color: inherit; text-underline-offset: 3px; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible, [tabindex]:focus-visible { outline: 3px solid #3271b8; outline-offset: 3px; }
[hidden] { display: none !important; }
.icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; flex: none; vertical-align: middle; pointer-events: none; }
.icon-definitions { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: -100px; left: 20px; padding: 12px; background: white; z-index: 3000; }
.skip-link:focus { top: 12px; }
.topbar { min-height: 64px; padding: 0 28px; border-bottom: 1px solid var(--line); background: var(--white); display: flex; align-items: center; gap: 20px; }
.wordmark { font-size: 22px; font-weight: 600; letter-spacing: -.7px; text-decoration: none; }
.product-name { font-size: 13px; color: var(--muted); }
.topbar nav { display: flex; align-self: stretch; gap: 6px; margin-left: auto; }
.nav-button { min-height: 44px; padding: 0 12px; background: none; color: var(--muted); font-size: 13px; border-bottom: 2px solid transparent; }
.nav-button:hover { color: var(--ink); background: #f7f7f8; }
.nav-button.active { color: var(--ink); border-bottom-color: var(--ink); }
main { max-width: 1740px; margin: 0 auto; padding: 22px 28px 0; }
h1, h2, h3, p { overflow-wrap: anywhere; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
h1 { font-size: 24px; font-weight: 500; line-height: 1.3; letter-spacing: -.6px; margin: 0; }
.heading-actions { display: flex; gap: 8px; }
.button { min-height: 40px; padding: 9px 14px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 5px; font-size: 13px; font-weight: 500; }
.button.primary { color: white; background: var(--accent); border-color: var(--accent); }
.button.primary:hover { background: #214c39; }
.button.secondary { background: white; border-color: #cfd2d7; }
.button.secondary:hover { background: #f5f5f6; }
.button .icon { width: 16px; height: 16px; }
.text-button { background: none; padding: 5px 0; min-height: 32px; display: inline-flex; align-items: center; gap: 6px; color: inherit; font-size: 12px; font-weight: 500; }
.text-button:hover { text-decoration: underline; text-underline-offset: 3px; }
.text-button .icon { width: 15px; height: 15px; }
.context-banner { border: 1px solid #eadcb3; background: #fffbef; color: #74551b; display: flex; align-items: center; gap: 12px; justify-content: space-between; padding: 10px 12px; border-radius: 5px; font-size: 13px; }
.context-banner > div { display: flex; gap: 10px; align-items: center; }
.context-banner.live { background: #f6f7f8; border-color: var(--line); color: var(--muted); }
.scenario-badge { font-size: 11px; font-weight: 600; background: #f7ebc8; border: 1px solid #e6d59e; border-radius: 3px; padding: 2px 6px; white-space: nowrap; }
.context-banner.live .scenario-badge { color: #3c454d; background: white; border-color: #d4d8dd; }
.operation-status { display: flex; align-items: center; gap: 9px; margin-top: 10px; padding: 10px 12px; background: #edf4fa; color: #2f567c; border: 1px solid #d1e0ee; border-radius: 5px; font-size: 13px; }
.operation-status .loading-spinner { height: 16px; width: 16px; }
.metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); margin: 16px 0 0; border-bottom: 1px solid var(--line); }
.metric { padding: 0 18px 14px; min-width: 0; }
.metric:first-child { padding-left: 0; }
.metric + .metric { border-left: 1px solid var(--line); }
.metric-label { display: block; font-size: 12px; color: var(--muted); }
.metric-value { font-size: 27px; font-weight: 500; letter-spacing: -.6px; margin: 3px 0 1px; line-height: 1.25; }
.metric-value small { font-size: 13px; font-weight: 400; letter-spacing: 0; color: var(--muted); padding-left: 5px; }
.metric-caption { display: block; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.evidence-context { display: flex; justify-content: space-between; gap: 10px 20px; flex-wrap: wrap; padding: 10px 0 12px; font-size: 12px; color: var(--muted); }
.evidence-context .warning { color: #875514; font-weight: 500; }
.analysis-notes { background: white; border: 1px solid var(--line); border-radius: 5px; margin-bottom: 12px; padding: 0 12px; color: var(--muted); font-size: 12px; }
.analysis-notes.warning { border-color: #e6cd97; background: #fffbf1; color: #73531d; }
.analysis-notes summary { padding: 8px 0; cursor: pointer; font-weight: 500; }
#analysis-messages { padding-bottom: 10px; }
#analysis-messages p { margin: 0; }
#analysis-messages p + p { margin-top: 6px; }
.workspace { display: grid; grid-template-columns: minmax(0,1fr) minmax(360px,36%); gap: 16px; align-items: start; }
.map-panel, .impact-panel { border: 1px solid var(--line); border-radius: 6px; background: white; overflow: hidden; min-width: 0; }
.panel-heading { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 14px; border-bottom: 1px solid var(--line); }
.panel-heading h2 { font-size: 14px; font-weight: 500; margin: 0; }
.panel-title { display: flex; align-items: center; gap: 8px; min-width: 0; }
.map-heading-tools { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--muted); }
.icon-button { min-height: 36px; min-width: 36px; display: inline-grid; place-items: center; background: none; border-radius: 4px; color: var(--muted); }
.icon-button:hover { background: #f0f1f2; }
.map-canvas { position: relative; height: var(--workspace-height); background: #e9ece8; }
#map { height: 100%; width: 100%; z-index: 1; background: #e9ece8; }
.leaflet-container { font: 12px var(--sans); }
.leaflet-tile-pane { filter: saturate(.5); }
.leaflet-control-attribution { font: 10px var(--sans) !important; }
.leaflet-control-attribution a { color: #315a72; }
.leaflet-control-zoom { border: 1px solid #cfd2d7 !important; box-shadow: none !important; }
.leaflet-control-zoom a { font-family: var(--sans) !important; color: var(--ink) !important; background: white !important; }
.leaflet-bar a, .leaflet-bar a:hover { width: 34px !important; height: 34px !important; line-height: 34px !important; }
.map-layer-controls { position: absolute; z-index: 450; top: 10px; right: 10px; display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; background: #fffffff5; border: 1px solid #d3d7da; border-radius: 4px; font-size: 12px; }
.map-layer-controls label { display: flex; gap: 7px; align-items: center; cursor: pointer; min-height: 24px; }
.map-layer-controls input { width: 15px; height: 15px; margin: 0; accent-color: var(--accent); }
.layer-swatch { width: 13px; height: 7px; display: inline-block; flex: none; }
.layer-swatch.flood { background: #93c8ce; border: 1px solid #23818b; }
.layer-swatch.network { height: 3px; background: #64756c; }
.map-legend { position: absolute; bottom: 27px; left: 10px; z-index: 450; background: #fffffff5; display: flex; flex-wrap: wrap; gap: 8px 12px; max-width: calc(100% - 20px); padding: 8px 10px; border: 1px solid #d3d7da; border-radius: 4px; font-size: 11px; }
.map-legend > span { display: flex; align-items: center; gap: 5px; }
.legend-line { height: 3px; width: 14px; display: inline-block; }
.legend-line.high { background: #a82d32; }
.legend-line.moderate { background: #8b6914; }
.legend-line.low { background: #356345; }
.legend-line.unknown { height: 0; border-top: 3px dashed #71717a; }
.map-footer { padding: 7px 12px; display: flex; align-items: center; justify-content: space-between; min-height: 48px; gap: 10px; font-size: 11px; color: var(--muted); }
.map-footer .text-button { flex: none; }
#map-fallback { position: absolute; z-index: 449; inset: 40% 20px auto; text-align: center; background: white; padding: 20px; border: 1px solid var(--line); border-radius: 4px; }
.impact-panel { height: calc(var(--workspace-height) + 98px); display: flex; flex-direction: column; }
.count-badge { background: #f1f2f3; color: #515760; font-size: 11px; padding: 2px 6px; border-radius: 3px; white-space: nowrap; }
.queue-controls { display: flex; gap: 8px; padding: 12px 12px 4px; }
.search-field { display: flex; align-items: center; border: 1px solid #cfd2d7; border-radius: 4px; gap: 7px; padding: 0 9px; flex: 1; min-width: 0; color: var(--muted); }
.search-field .icon { width: 15px; height: 15px; }
.search-field input { width: 100%; border: 0; min-width: 0; padding: 9px 0; background: none; font-size: 12px; color: var(--ink); }
.search-field input::placeholder { color: #646972; }
.priority-select select { font-size: 12px; width: 124px; border: 1px solid #cfd2d7; border-radius: 4px; background: white; padding: 8px; color: var(--ink); min-height: 38px; }
.queue-subheading { display: flex; align-items: center; justify-content: space-between; gap: 5px; min-height: 38px; padding: 3px 14px; font-size: 11px; color: var(--muted); border-bottom: 1px solid var(--line); }
.queue-subheading .text-button { font-size: 11px; }
.impact-list { flex: 1; min-height: 105px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #d3d7dc transparent; }
.impact-row { width: 100%; display: flex; align-items: center; text-align: left; gap: 12px; border-bottom: 1px solid #eceef0; background: white; padding: 13px 14px; position: relative; }
.impact-row:hover { background: #f7f8f9; }
.impact-row.selected { background: #edf4f0; box-shadow: inset 3px 0 var(--accent); }
.asset-information { flex: 1; min-width: 0; }
.asset-name { display: block; font-size: 13px; font-weight: 500; overflow-wrap: anywhere; margin-bottom: 3px; }
.asset-subtitle { font-size: 11px; color: var(--muted); display: block; }
.asset-freshness { font-size: 11px; color: #875514; display: block; margin-top: 3px; }
.severity-pill { display: inline-block; font-size: 10px; font-weight: 500; padding: 3px 6px; border-radius: 3px; text-transform: capitalize; white-space: nowrap; flex: none; }
.severity-pill.critical { background: #fbe9e9; color: #a32630; }
.severity-pill.high { background: #fff0e5; color: #944817; }
.severity-pill.moderate { background: #fcf3d8; color: #7a5b0b; }
.severity-pill.low { background: #edf4ed; color: #356345; }
.severity-pill.unknown { background: #eeeef1; color: #55555f; border: 1px dashed #9797a0; }
.empty-state { padding: 28px 20px; text-align: center; color: var(--muted); font-size: 13px; }
.empty-state .icon { width: 24px; height: 24px; margin-bottom: 6px; }
.empty-state strong { display: block; color: var(--ink); font-weight: 500; }
.empty-state p { margin: 6px 0 0; }
.impact-detail { border-top: 1px solid var(--line); background: #fafbfa; padding: 13px 14px; overflow-y: auto; flex: 0 1 62%; min-height: 0; }
.impact-panel.has-selection .impact-list { flex: 1 0 115px; }
.detail-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 11px; color: var(--muted); }
.detail-heading .icon-button { min-width: 32px; min-height: 32px; }
.impact-detail h3 { font-size: 15px; font-weight: 500; margin: 0 0 7px; }
.detail-status { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.detail-facts { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin: 12px 0; }
.detail-facts dt { font-size: 11px; color: var(--muted); margin-bottom: 2px; }
.detail-facts dd { margin: 0; font-size: 13px; }
.detail-action { font-size: 12px; line-height: 1.6; color: #304b3e; padding: 10px 12px; border-left: 2px solid #8cae9c; background: #f0f5f2; }
.detail-action strong { display: block; font-weight: 500; margin-bottom: 3px; }
.detail-evidence { margin-top: 12px; font-size: 12px; }
.detail-evidence summary { cursor: pointer; font-weight: 500; min-height: 32px; padding: 4px 0; }
.detail-evidence p, .detail-evidence li { line-height: 1.6; }
.detail-evidence ul { padding-left: 18px; }
.detail-evidence a { color: #235881; overflow-wrap: anywhere; }
.provenance { font-size: 11px; line-height: 1.6; color: var(--muted); overflow-wrap: anywhere; margin-top: 8px; }
.queue-footer { border-top: 1px solid var(--line); padding: 10px 14px; font-size: 11px; color: var(--muted); }
.page-footer { display: flex; align-items: center; justify-content: space-between; padding: 12px 0 20px; gap: 10px; color: var(--muted); font-size: 12px; }
.page-footer .text-button { flex: none; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); max-width: calc(100vw - 32px); width: max-content; background: #263b30; color: white; box-shadow: 0 3px 14px #0002; padding: 12px 16px; border-radius: 5px; z-index: 3000; font-size: 13px; }
.toast.error { background: #873b32; }
.loading-spinner { height: 20px; width: 20px; display: inline-block; border: 2px solid #dce5e0; border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; flex: none; }
dialog { border: 1px solid #d4d7dc; border-radius: 8px; background: white; color: var(--ink); padding: 24px; max-width: 600px; width: calc(100% - 32px); max-height: calc(100dvh - 32px); overflow-y: auto; box-shadow: 0 12px 45px #0003; }
dialog::backdrop { background: #1d232b70; }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.dialog-heading h2 { font-size: 20px; font-weight: 500; line-height: 1.3; letter-spacing: -.3px; margin: 0; }
.dialog-intro { font-size: 13px; color: var(--muted); margin: 12px 0 16px; }
.form-note { border: 1px solid #e6d6ab; border-radius: 4px; background: #fffbef; padding: 10px 12px; color: #74551b; font-size: 12px; }
.form-note.custom { background: #f7f8f9; color: var(--muted); border-color: var(--line); }
#change-network { margin-top: 3px; }
fieldset { border: 0; padding: 0; margin: 20px 0 0; min-width: 0; }
legend { font-size: 13px; font-weight: 500; margin-bottom: 10px; width: 100%; display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
legend span { font-size: 11px; font-weight: 400; color: var(--muted); }
.coordinate-fields { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; }
.coordinate-fields label, .date-fields label { font-size: 12px; color: var(--muted); display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.coordinate-fields input, .date-fields input { width: 100%; min-width: 0; min-height: 40px; border: 1px solid #cfd2d7; border-radius: 4px; padding: 8px; background: white; color: var(--ink); font-size: 13px; }
fieldset .text-button { margin-top: 5px; }
.date-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-help { font-size: 12px; color: var(--muted); margin: 18px 0 0; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.dialog-actions .loading-spinner { height: 15px; width: 15px; }
.form-error { margin: 12px 0; padding: 10px 12px; background: #fff1ef; color: #8e382b; border: 1px solid #ebc4bc; border-radius: 4px; font-size: 13px; }
.form-error .text-button { display: block; }
.source-card { border-top: 1px solid var(--line); padding: 16px 0; }
.source-card-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.source-card h3 { font-size: 15px; margin: 0; font-weight: 500; }
.source-status { font-size: 11px; color: #456450; background: #eff5f0; border-radius: 3px; padding: 3px 6px; }
.source-card p { font-size: 13px; color: var(--muted); margin: 10px 0; }
.source-meta { font-size: 12px; color: var(--muted); }
.export-option { display: flex; align-items: center; width: 100%; gap: 12px; padding: 16px 12px; border: 1px solid var(--line); background: white; border-radius: 5px; margin: 12px 0; text-align: left; }
.export-option:hover { background: #f7f8f9; }
.export-option > div { flex: 1; }
.export-option strong { display: block; font-size: 14px; font-weight: 500; }
.export-option > div > span { display: block; font-size: 12px; color: var(--muted); margin-top: 4px; }
.file-type { font: 11px var(--mono); color: var(--muted); padding: 3px 5px; background: #f3f4f5; border-radius: 3px; }
.guide-section { padding: 14px 0; border-top: 1px solid var(--line); }
.guide-section h3, .network-choice h3 { font-size: 14px; font-weight: 500; margin: 0 0 5px; }
.guide-section p, .network-choice p { font-size: 13px; color: var(--muted); margin: 0; }
.network-choice { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 16px 0; border-top: 1px solid var(--line); }
.network-choice > div { flex: 1; }
.network-choice .button { flex: none; }
.network-choice .attribution { font-size: 11px; margin-top: 7px; }
.import-guide { font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 12px; }
.import-guide summary { cursor: pointer; min-height: 32px; }
.leaflet-tooltip { font: 12px var(--sans) !important; border: 1px solid #d0d5d9 !important; border-radius: 3px !important; color: var(--ink) !important; box-shadow: 0 2px 6px #0001 !important; }
.impact-marker { height: 18px; width: 18px; border-radius: 50%; border: 3px solid white; box-shadow: 0 1px 5px #0004; background: #a82d32; display: block; }
.impact-marker.high { background: #c56531; }
.impact-marker.moderate { background: #8b6914; }
.impact-marker.low { background: #356345; }
.impact-marker.unknown { background: #71717a; border-style: dashed; }
.impact-marker.selected { outline: 2px solid #202124; outline-offset: 3px; }
.busy-cursor { cursor: progress; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 1100px) {
  .product-name { max-width: 260px; }
  .workspace { grid-template-columns: minmax(0,1fr) 370px; gap: 12px; }
  .map-heading-tools > span { max-width: 145px; text-align: right; }
}
@media (max-width: 920px) {
  :root { --workspace-height: 450px; }
  .topbar { padding: 0 20px; gap: 14px; }
  .product-name { max-width: 240px; }
  main { padding: 20px 20px 0; }
  .workspace { grid-template-columns: minmax(0,1fr); }
  .impact-panel { height: auto; }
  .impact-list { flex: auto; max-height: 400px; }
  .impact-detail { overflow: visible; flex: auto; }
  .impact-panel.has-selection .impact-list { flex: auto; max-height: 220px; }
}
@media (max-width: 600px) {
  :root { --workspace-height: 380px; }
  .topbar { padding: 10px 16px 0; flex-wrap: wrap; gap: 0 12px; }
  .wordmark { font-size: 20px; }
  .product-name { font-size: 11px; max-width: none; flex: 1; }
  .topbar nav { width: 100%; margin-left: 0; margin-top: 5px; }
  .nav-button { padding: 0 10px; min-height: 42px; }
  main { padding: 18px 16px 0; }
  .page-heading { align-items: flex-start; flex-direction: column; gap: 12px; margin-bottom: 14px; }
  h1 { font-size: 22px; }
  .heading-actions { width: 100%; }
  .heading-actions .primary { flex: 1; }
  .context-banner > div { align-items: flex-start; flex-direction: column; gap: 5px; }
  .context-banner { font-size: 12px; }
  .context-banner > .text-button { flex: none; }
  .metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .metric { padding: 10px 12px; }
  .metric:nth-child(odd) { padding-left: 0; border-left: 0; }
  .metric:nth-child(n+3) { border-top: 1px solid var(--line); }
  .metric-value { font-size: 25px; }
  .metric-label, .metric-caption { font-size: 11px; }
  .evidence-context { display: flex; flex-direction: column; gap: 4px; }
  .map-heading-tools > span { max-width: 135px; font-size: 10px; }
  .map-layer-controls { font-size: 11px; padding: 8px; gap: 4px; }
  .map-legend { font-size: 10px; gap: 6px 10px; }
  .map-footer { align-items: flex-start; font-size: 11px; }
  .map-footer > span { padding-top: 5px; }
  .map-footer .text-button { font-size: 11px; }
  .icon-button { min-width: 40px; min-height: 40px; }
  .queue-controls input, .priority-select select { min-height: 42px; font-size: 13px; }
  .priority-select select { width: 122px; }
  .queue-subheading .text-button, .page-footer .text-button { min-height: 40px; }
  .impact-row { padding: 14px; min-height: 60px; }
  .page-footer { align-items: flex-start; flex-direction: column; gap: 2px; font-size: 11px; }
  dialog { padding: 18px; }
  .dialog-heading h2 { font-size: 19px; }
  .coordinate-fields { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .date-fields { grid-template-columns: minmax(0,1fr); }
  .network-choice { flex-direction: column; gap: 10px; }
  .network-choice .button { min-height: 44px; }
  .toast { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
