:root {
  --bg: #06100f;
  --panel: #091714;
  --panel-raised: #10211e;
  --panel-soft: #142a25;
  --ink: #edf4ec;
  --muted: #91a69f;
  --faint: #647a73;
  --line: rgba(218, 237, 228, .1);
  --line-strong: rgba(218, 237, 228, .18);
  --accent: #d9ff91;
  --accent-ink: #13200d;
  --water: #67b9d4;
  --water-bright: #8fdff1;
  --recovery: #ff806f;
  --candidate: #efc472;
  --warning: #e8b86a;
  --shadow: 0 20px 60px rgba(0,0,0,.32);
  --topbar: 66px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { min-height: 100%; scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body { min-height: 100%; margin: 0; background: var(--bg); color: var(--ink); font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; }
h1, h2, p { margin-top: 0; }
h1, h2 { text-wrap: balance; }
p, label { text-wrap: pretty; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.skip-link { position: fixed; left: 16px; top: 10px; z-index: 1000; padding: 10px 14px; border-radius: 8px; background: var(--accent); color: var(--accent-ink); transform: translateY(-160%); transition: transform 160ms ease; }
.skip-link:focus { transform: translateY(0); }
.eyebrow, .card-label, .step-label { color: var(--faint); font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 9px; font-weight: 600; letter-spacing: .12em; line-height: 1.2; text-transform: uppercase; }

.drift-shell { min-height: 100vh; }
.drift-topbar { position: sticky; top: 0; z-index: 800; min-height: var(--topbar); display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 0 16px; border-bottom: 1px solid var(--line); background: rgba(6,16,15,.94); backdrop-filter: blur(18px); box-shadow: 0 8px 30px rgba(0,0,0,.16); }
.brand-block, .topbar-actions, .section-heading, .results-heading, .results-toolbar, .scrubber-copy, .dialog-actions { display: flex; align-items: center; }
.brand-block { min-width: 0; gap: 11px; }
.brand-block h1 { margin: 0; font-size: 16px; letter-spacing: -.02em; white-space: nowrap; }
.brand-block h1 span { margin-left: 8px; color: var(--muted); font-size: 11px; font-weight: 500; letter-spacing: .02em; }
.eyebrow { margin: 0 0 3px; }
.back-link { display: grid; place-items: center; width: 42px; height: 42px; flex: 0 0 42px; border-radius: 10px; background: var(--panel-raised); box-shadow: 0 0 0 1px var(--line-strong); text-decoration: none; transition: background-color 150ms ease, scale 150ms ease; }
.back-link:hover { background: var(--panel-soft); }
.back-link:active, button:active { scale: .97; }
.topbar-actions { gap: 10px; }
.model-chip { display: inline-flex; align-items: center; gap: 7px; min-height: 32px; padding: 0 10px; border: 1px solid rgba(232,184,106,.28); border-radius: 999px; color: #f1cb8e; background: rgba(232,184,106,.08); font-size: 11px; }
.model-chip i { width: 6px; height: 6px; border-radius: 50%; background: var(--warning); box-shadow: 0 0 0 4px rgba(232,184,106,.1); }
.quiet-link { min-height: 36px; display: inline-flex; align-items: center; padding: 0 10px; color: var(--muted); font-size: 12px; text-decoration: none; }
.quiet-link:hover { color: var(--ink); }

.drift-workspace { display: grid; grid-template-columns: 344px minmax(0,1fr); min-height: calc(100vh - var(--topbar)); }
.control-panel { position: sticky; top: var(--topbar); align-self: start; height: calc(100vh - var(--topbar)); border-right: 1px solid var(--line); background: var(--panel); }
.panel-scroll { height: 100%; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #315047 transparent; }
.control-section { padding: 20px 18px; border-bottom: 1px solid var(--line); }
.control-section h2 { margin: 2px 0 0; font-size: 15px; letter-spacing: -.015em; }
.step-label { margin: 0 0 11px; }
.step-label span { display: inline-grid; place-items: center; width: 18px; height: 18px; margin-right: 7px; border: 1px solid var(--line-strong); border-radius: 50%; color: var(--ink); }
.anchor-card { padding: 14px; border: 1px solid rgba(255,128,111,.18); border-radius: 12px; background: linear-gradient(145deg,rgba(255,128,111,.09),rgba(16,33,30,.42)); }
.anchor-card div { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 8px; font-size: 11px; }
.anchor-card div span { color: var(--muted); }
.anchor-card div strong { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.anchor-card p { margin: 12px 0 0; padding-top: 11px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; line-height: 1.5; }
.anchor-card .anchor-choice { display: grid; gap: 6px; margin-top: 12px; padding-top: 11px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.section-heading { justify-content: space-between; gap: 12px; }
.section-heading .step-label { margin-bottom: 7px; }
.text-button { min-height: 40px; border: 0; background: transparent; color: var(--accent); font-size: 11px; cursor: pointer; }
.section-copy { margin: 8px 0 13px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.candidate-checklist { display: grid; gap: 8px; }
.candidate-group { overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: rgba(255,255,255,.012); }
.candidate-group summary { min-height: 54px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 11px; cursor: pointer; list-style: none; }
.candidate-group summary::-webkit-details-marker { display: none; }
.candidate-group summary::after { content: "+"; flex: 0 0 auto; color: var(--faint); font-size: 15px; }
.candidate-group[open] summary::after { content: "−"; }
.candidate-group summary span { min-width: 0; display: grid; gap: 3px; }
.candidate-group summary strong { color: var(--ink); font-size: 11px; font-weight: 600; }
.candidate-group summary small { overflow: hidden; color: var(--faint); font-size: 9px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.candidate-group-body { display: grid; gap: 6px; padding: 0 7px 7px; border-top: 1px solid var(--line); }
.group-select-button { min-height: 36px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--accent); font-size: 10px; text-align: left; cursor: pointer; }
.group-select-button:hover { color: #e6ffb4; }
.candidate-check { min-height: 52px; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.018); cursor: pointer; transition: border-color 150ms ease, background-color 150ms ease; }
.candidate-check:hover { border-color: var(--line-strong); background: rgba(255,255,255,.035); }
.candidate-check input { width: 17px; height: 17px; margin: 0; accent-color: var(--accent); }
.candidate-check span { min-width: 0; display: grid; gap: 3px; }
.candidate-check strong { font-size: 12px; font-weight: 600; }
.candidate-check small { color: var(--muted); font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 9px; line-height: 1.4; }
.remove-candidate { width: 32px; height: 32px; margin-left: auto; border: 0; border-radius: 8px; background: transparent; color: var(--faint); cursor: pointer; }
.remove-candidate:hover { background: rgba(255,255,255,.06); color: var(--ink); }
.add-candidate { width: 100%; min-height: 42px; margin-top: 9px; border: 1px dashed var(--line-strong); border-radius: 10px; background: transparent; color: var(--muted); font-size: 11px; cursor: pointer; }
.add-candidate:hover { border-color: rgba(217,255,145,.42); color: var(--accent); }
.profile-picker { display: grid; gap: 7px; margin-top: 13px; }
.profile-option { display: grid; gap: 4px; width: 100%; min-height: 58px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: transparent; text-align: left; cursor: pointer; }
.profile-option strong { font-size: 12px; font-weight: 600; }
.profile-option small { color: var(--muted); font-size: 10px; line-height: 1.4; }
.profile-option.is-active { border-color: rgba(217,255,145,.4); background: rgba(217,255,145,.075); box-shadow: inset 3px 0 0 var(--accent); }
.run-section { padding: 16px 18px 14px; }
.run-button { min-height: 48px; display: inline-flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; padding: 0 16px; border: 0; border-radius: 10px; background: var(--accent); color: var(--accent-ink); font-weight: 700; cursor: pointer; box-shadow: 0 8px 30px rgba(173,218,91,.1); }
.run-button:hover { background: #e6ffb4; }
.run-button:disabled { opacity: .58; cursor: wait; }
.run-section p { margin: 8px 0 0; color: var(--faint); font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 9px; text-align: center; }
.advanced-panel { border-top: 1px solid var(--line); }
.advanced-panel summary { min-height: 48px; display: flex; align-items: center; justify-content: space-between; padding: 0 18px; color: var(--muted); font-size: 11px; cursor: pointer; list-style: none; }
.advanced-panel summary::-webkit-details-marker { display: none; }
.advanced-panel summary::after { content: "+"; font-size: 15px; }
.advanced-panel[open] summary::after { content: "−"; }
.advanced-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 0 18px 14px; }
.advanced-grid label, .dialog-grid label, .textarea-label { position: relative; display: grid; gap: 6px; color: var(--muted); font-size: 10px; }
input, textarea, select { width: 100%; min-height: 42px; border: 1px solid var(--line-strong); border-radius: 8px; background: #07120f; color: var(--ink); padding: 0 10px; font-variant-numeric: tabular-nums; }
textarea { min-height: 210px; padding: 10px; resize: vertical; font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 10px; line-height: 1.55; }
.advanced-grid label span { position: absolute; right: 8px; bottom: 13px; color: var(--faint); font-size: 8px; pointer-events: none; }
.advanced-grid label:has(span) input { padding-right: 48px; }
.secondary-button { min-height: 42px; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--panel-raised); color: var(--ink); padding: 0 13px; cursor: pointer; }
.secondary-button:hover { background: var(--panel-soft); }
.advanced-panel > .secondary-button { width: calc(100% - 36px); margin: 0 18px 18px; }
.field-status { margin: -2px 18px 12px; color: var(--faint); font-size: 9px; line-height: 1.45; }

.results-column { min-width: 0; padding: 14px; background: radial-gradient(circle at 72% 0,rgba(29,78,67,.22),transparent 38%),var(--bg); }
.results-toolbar { min-height: 46px; justify-content: space-between; gap: 16px; padding: 0 4px 10px; }
.view-tabs { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: rgba(5,14,12,.7); }
.view-tabs button { min-height: 34px; padding: 0 13px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-size: 11px; cursor: pointer; }
.view-tabs button.is-active { background: var(--panel-raised); color: var(--ink); box-shadow: 0 0 0 1px var(--line); }
.map-legend { display: flex; gap: 14px; color: var(--muted); font-size: 9px; }
.legend-dot { display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 50%; }
.legend-dot.recovery { background: var(--recovery); }
.legend-dot.particle { background: var(--water-bright); }
.legend-dot.candidate { background: var(--candidate); }
.map-stage { position: relative; min-height: 480px; height: min(61vh,680px); overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: #071411; box-shadow: var(--shadow); }
#drift-map { width: 100%; height: 100%; background: linear-gradient(135deg,#0b2428,#071310); }
.map-placeholder { position: absolute; inset: 0; display: grid; place-content: center; gap: 12px; color: var(--muted); text-align: center; }
.map-placeholder span { width: 26px; height: 26px; margin: auto; border: 2px solid var(--line-strong); border-top-color: var(--water-bright); border-radius: 50%; animation: spin 1s linear infinite; }
.map-placeholder p { margin: 0; font-size: 11px; }
@keyframes spin { to { transform: rotate(360deg); } }
.map-callout { position: absolute; z-index: 500; top: 14px; left: 14px; min-width: 194px; padding: 11px 13px; border: 1px solid rgba(255,255,255,.12); border-radius: 11px; background: rgba(6,16,15,.88); backdrop-filter: blur(12px); box-shadow: 0 8px 30px rgba(0,0,0,.2); pointer-events: none; }
.map-callout p { margin: 0 0 2px; color: var(--muted); font-size: 9px; }
.map-callout strong { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 12px; }
.run-state { position: absolute; z-index: 500; right: 14px; bottom: 14px; display: flex; align-items: center; gap: 8px; min-height: 32px; padding: 0 10px; border: 1px solid rgba(255,255,255,.1); border-radius: 999px; background: rgba(6,16,15,.86); color: var(--muted); font-size: 9px; backdrop-filter: blur(10px); pointer-events: none; }
.run-state i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.run-state.is-running i { animation: pulse 900ms ease-in-out infinite alternate; }
.run-state.is-stale i { background: var(--warning); }
@keyframes pulse { to { opacity: .3; scale: .7; } }
.time-scrubber { position: relative; padding: 17px 5px 8px; }
.time-scrubber.is-disabled { opacity: .42; }
.scrubber-copy { justify-content: space-between; color: var(--faint); font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 9px; }
.scrubber-copy strong { color: var(--ink); font-size: 11px; }
.time-scrubber input[type="range"] { appearance: none; width: 100%; min-height: 28px; padding: 0; border: 0; background: transparent; accent-color: var(--water-bright); }
.time-scrubber input[type="range"]::-webkit-slider-runnable-track { height: 3px; border-radius: 999px; background: linear-gradient(90deg,var(--water-bright),rgba(143,223,241,.16)); }
.time-scrubber input[type="range"]::-webkit-slider-thumb { appearance: none; width: 16px; height: 16px; margin-top: -6.5px; border: 3px solid var(--bg); border-radius: 50%; background: var(--water-bright); box-shadow: 0 0 0 1px rgba(143,223,241,.5); }
.date-marks { position: absolute; left: 7px; right: 7px; bottom: 10px; display: flex; justify-content: space-between; pointer-events: none; }
.date-marks i { width: 1px; height: 5px; background: var(--line-strong); }
.answer-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 12px; margin-top: 6px; }
.answer-card { min-width: 0; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: rgba(10,25,22,.85); }
.primary-answer { background: linear-gradient(145deg,rgba(25,64,59,.42),rgba(10,25,22,.84)); }
.card-label { margin: 0 0 7px; }
.answer-card h2, .candidate-results h2, .method-section h2 { margin: 0 0 8px; font-size: 17px; letter-spacing: -.025em; }
.answer-card > p:not(.card-label), .method-section > p { margin-bottom: 15px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.mini-metrics { display: grid; grid-template-columns: repeat(3,1fr); margin: 0; border-top: 1px solid var(--line); }
.mini-metrics div { min-width: 0; padding: 11px 9px 0 0; }
.mini-metrics dt { color: var(--faint); font-size: 9px; }
.mini-metrics dd { margin: 4px 0 0; overflow: hidden; color: var(--ink); font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.inline-button { min-height: 40px; padding: 0; border: 0; background: transparent; color: var(--accent); font-size: 11px; cursor: pointer; }
.candidate-results { margin-top: 12px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.results-heading { justify-content: space-between; gap: 20px; margin-bottom: 12px; }
.results-heading h2 { margin-bottom: 0; }
.results-heading > p { max-width: 280px; margin: 0; color: var(--muted); font-size: 10px; line-height: 1.45; text-align: right; }
.result-table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 11px; }
th, td { padding: 11px 10px; border-top: 1px solid var(--line); text-align: left; white-space: nowrap; }
th { color: var(--faint); font-size: 9px; font-weight: 500; text-transform: uppercase; letter-spacing: .06em; }
td { color: var(--muted); }
td strong { color: var(--ink); font-weight: 600; }
td > small { display: block; max-width: 250px; margin-top: 3px; color: var(--faint); font-size: 9px; white-space: normal; }
.context-cell { max-width: 180px; color: var(--faint); font-size: 9px; line-height: 1.35; white-space: normal; }
.rate-line { display: flex; align-items: baseline; gap: 8px; }
.rate-line strong { min-width: 48px; color: var(--accent); font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 12px; }
.rate-line small { color: var(--faint); font-size: 8px; }
.rate-bar { display: block; width: 150px; height: 3px; margin-top: 6px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.07); }
.rate-bar i { display: block; min-width: 2px; height: 100%; border-radius: inherit; background: var(--accent); }
.is-best td { background: rgba(217,255,145,.025); }
.table-view-button { min-height: 32px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--panel-raised); color: var(--ink); font-size: 9px; cursor: pointer; }
.table-view-button:hover { background: var(--panel-soft); }
.empty-row { height: 72px; color: var(--muted); text-align: center; }
.pending-value { display: inline-flex; min-height: 24px; align-items: center; padding: 0 7px; border-radius: 999px; background: rgba(255,255,255,.05); color: var(--faint); font-size: 9px; }
.method-section { display: grid; grid-template-columns: minmax(240px,.8fr) minmax(320px,1.2fr) auto; align-items: center; gap: 26px; margin-top: 12px; padding: 20px; border: 1px solid rgba(232,184,106,.18); border-radius: 14px; background: rgba(232,184,106,.045); }
.method-section h2 { margin: 0; }
.method-section > p { margin: 0; }
.method-section > a { color: var(--accent); font-size: 10px; text-decoration: none; white-space: nowrap; }
.model-audit-section { margin-top: 12px; padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: rgba(9,23,20,.84); }
.audit-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 16px; }
.audit-heading h2 { margin: 0; font-size: 17px; letter-spacing: -.025em; }
.audit-heading > p { max-width: 360px; margin: 0; color: var(--muted); font-size: 10px; line-height: 1.5; text-align: right; }
.audit-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 9px; }
.audit-grid article { min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: 11px; background: rgba(255,255,255,.018); }
.audit-grid article > span { color: var(--water-bright); font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 9px; }
.audit-grid h3, .audit-details h3 { margin: 8px 0 5px; font-size: 12px; }
.audit-grid p, .audit-details p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.forcing-facts { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; margin-top: 10px; }
.forcing-facts article { min-width: 0; display: grid; gap: 5px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: rgba(103,185,212,.035); }
.forcing-facts span { color: var(--faint); font-size: 8px; text-transform: uppercase; letter-spacing: .07em; }
.forcing-facts strong { color: var(--ink); font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 11px; }
.forcing-facts small { color: var(--muted); font-size: 9px; line-height: 1.4; }
.audit-details { margin-top: 10px; border: 1px solid var(--line); border-radius: 11px; overflow: hidden; }
.audit-details summary { min-height: 46px; display: flex; align-items: center; justify-content: space-between; padding: 0 14px; color: var(--muted); font-size: 10px; cursor: pointer; list-style: none; }
.audit-details summary::-webkit-details-marker { display: none; }
.audit-details summary::after { content: "+"; color: var(--ink); font-size: 15px; }
.audit-details[open] summary::after { content: "−"; }
.audit-details-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; padding: 15px; border-top: 1px solid var(--line); }
.audit-details-grid h3:first-child { margin-top: 0; }
.audit-details dl { margin: 0; }
.audit-details dl div { display: grid; grid-template-columns: minmax(110px,.8fr) 1.2fr; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 9px; }
.audit-details dt { color: var(--faint); }
.audit-details dd { margin: 0; color: var(--ink); }
.audit-details p + h3 { margin-top: 17px; }
.source-links { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.source-links a { min-height: 32px; display: inline-flex; align-items: center; padding: 0 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 9px; text-decoration: none; }
.source-links a:hover { border-color: var(--line-strong); color: var(--accent); }

.lab-dialog { width: min(580px,calc(100vw - 28px)); padding: 22px; border: 1px solid var(--line-strong); border-radius: 16px; background: #0a1916; color: var(--ink); box-shadow: var(--shadow); }
.lab-dialog::backdrop { background: rgba(1,7,5,.72); backdrop-filter: blur(4px); }
.lab-dialog h2 { margin: 4px 38px 16px 0; font-size: 21px; }
.dialog-close { position: absolute; top: 14px; right: 14px; display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel-raised); cursor: pointer; }
.dialog-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dialog-note { color: var(--muted); font-size: 11px; line-height: 1.55; }
.dialog-actions { justify-content: flex-end; gap: 9px; margin-top: 18px; }
.run-button.compact { width: auto; min-height: 42px; }
.forcing-dialog { width: min(720px,calc(100vw - 28px)); }
.toast { position: fixed; z-index: 1200; right: 18px; bottom: 18px; max-width: 340px; padding: 11px 14px; border: 1px solid var(--line-strong); border-radius: 10px; background: #11241f; color: var(--ink); box-shadow: var(--shadow); font-size: 11px; opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity 160ms ease, transform 160ms ease; }
.toast.is-visible { opacity: 1; transform: translateY(0); }

.leaflet-container { background: #071411; font-family: Inter, ui-sans-serif, sans-serif; }
.leaflet-control-zoom a, .leaflet-control-layers { border-color: var(--line-strong)!important; background: rgba(7,18,15,.9)!important; color: var(--ink)!important; }
.leaflet-control-attribution { background: rgba(6,16,15,.72)!important; color: var(--faint)!important; font-size: 8px!important; }
.leaflet-control-attribution a { color: var(--muted)!important; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: #10211e; color: var(--ink); }
.leaflet-popup-content { font-size: 11px; line-height: 1.5; }
.leaflet-container.is-picking { cursor: crosshair; }
.map-fallback { height: 100%; display: grid; place-content: center; padding: 30px; color: var(--muted); text-align: center; }
.map-fallback strong { color: var(--ink); }
.map-fallback p { max-width: 340px; margin: 8px auto 0; font-size: 11px; line-height: 1.6; }

@media (max-width: 1000px) {
  .drift-workspace { grid-template-columns: 308px minmax(0,1fr); }
  .answer-grid { grid-template-columns: 1fr; }
  .method-section { grid-template-columns: 1fr; gap: 10px; }
  .method-section > a { white-space: normal; }
  .map-legend { display: none; }
  .audit-grid { grid-template-columns: 1fr; }
  .forcing-facts { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .drift-topbar { position: relative; min-height: 64px; padding: 8px 10px; }
  .brand-block h1 span, .model-chip { display: none; }
  .quiet-link { padding: 0 4px; }
  .drift-workspace { display: block; }
  .control-panel { position: relative; top: auto; height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .panel-scroll { height: auto; overflow: visible; }
  .anchor-section { padding-top: 16px; }
  .results-column { padding: 10px; }
  .map-stage { min-height: 430px; height: 62vh; border-radius: 13px; }
  .results-toolbar { padding-left: 0; padding-right: 0; }
  .mini-metrics { grid-template-columns: 1fr; }
  .mini-metrics div { padding-top: 9px; }
  .results-heading { align-items: flex-start; flex-direction: column; gap: 5px; }
  .results-heading > p { max-width: none; text-align: left; }
  .dialog-grid { grid-template-columns: 1fr; }
  .audit-heading { display: block; }
  .audit-heading > p { margin-top: 8px; text-align: left; }
  .forcing-facts { grid-template-columns: 1fr; }
  .audit-details-grid { grid-template-columns: 1fr; }
}

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