:root {
    color-scheme: only light;
    --ink: #182521;
    --muted: #55665f;
    --muted-2: #64766e;
    --bg: #f3f6f4;
    --panel: #ffffff;
    --panel-2: #eef4f1;
    --line: #d6e1dc;
    --line-strong: #71877d;
    --mint: #08755c;
    --mint-soft: rgba(8, 117, 92, 0.09);
    --red: #c42b49;
    --coral: #c42b49;
    --orange: #a94f08;
    --yellow: #806000;
    --green: #08755c;
    --font-sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
    margin: 0;
    color: var(--ink);
    background: var(--bg);
    font-family: var(--font-sans);
    font-size: 14px;
    overflow: hidden;
}
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
:where(a, button, input, select, textarea, [tabindex]):focus-visible { outline: 2px solid var(--mint); outline-offset: 2px; }
.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; }
.skip-link { position: fixed; z-index: 9999; top: -80px; left: 12px; padding: 10px 14px; color: #fff; background: var(--mint); border-radius: 4px; }
.skip-link:focus { top: 12px; }

.app-shell { height: 100%; display: grid; grid-template-rows: 60px 34px 1fr 27px; }
.topbar {
    display: grid;
    grid-template-columns: 280px 1fr 280px;
    align-items: center;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.97);
    padding: 0 18px;
    position: relative;
    z-index: 800;
}
.brand { display: inline-flex; align-items: center; gap: 10px; width: max-content; letter-spacing: 0.12em; }
.brand-mark { width: 29px; height: 29px; border: 1px solid var(--mint); border-radius: 50%; display: grid; place-items: center; position: relative; box-shadow: 0 0 18px rgba(8,117,92,.1); }
.brand-mark::before, .brand-mark::after { content: ''; position: absolute; background: var(--mint); opacity: .7; }
.brand-mark::before { width: 1px; height: 37px; }
.brand-mark::after { height: 1px; width: 37px; }
.brand-mark i { width: 5px; height: 5px; border: 1px solid var(--mint); border-radius: 50%; }
.brand strong, .brand em { display: block; line-height: 1; font-style: normal; }
.brand strong { font-size: 13px; }
.brand em { color: var(--mint); font-family: var(--font-mono); font-size: 9px; margin-top: 4px; letter-spacing: .32em; }
.live-state { justify-self: center; display: flex; align-items: center; gap: 9px; color: #43554e; font-family: var(--font-mono); font-size: 9px; letter-spacing: .11em; }
.pulse { width: 6px; height: 6px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 0 rgba(196,43,73,.45); animation: pulse 2s infinite; }
.divider { height: 11px; width: 1px; background: var(--line-strong); }
.live-state time { color: var(--muted); }
.top-actions { justify-self: end; display: flex; align-items: center; gap: 19px; color: var(--muted); font-family: var(--font-mono); font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.top-actions a:hover, .top-actions a:focus-visible { color: var(--mint); }
.admin-link { border: 1px solid var(--line-strong); padding: 7px 10px; border-radius: 3px; }

.signal-strip { display: grid; grid-template-columns: 160px 1fr 150px; align-items: center; min-width: 0; background: #f4f8f6; border-bottom: 1px solid var(--line); font-family: var(--font-mono); font-size: 9px; letter-spacing: .08em; position: relative; z-index: 700; }
.signal-label { height: 100%; display: flex; align-items: center; padding-left: 20px; color: #fff; background: var(--mint); font-weight: 800; clip-path: polygon(0 0, 92% 0, 100% 50%, 92% 100%, 0 100%); }
.ticker { overflow: hidden; display: flex; align-items: center; gap: 30px; white-space: nowrap; padding: 0 20px; color: #465850; }
.ticker span { display: inline-flex; align-items: center; gap: 8px; }
.ticker i { width: 5px; height: 5px; border-radius: 50%; background: var(--yellow); }
.ticker i.critical { background: var(--red); }
.ticker i.high { background: var(--orange); }
.source-health { justify-self: end; display: flex; align-items: center; gap: 6px; padding-right: 18px; color: var(--muted); }
.source-health span { width: 5px; height: 5px; border-radius: 50%; background: var(--mint); }
.source-health b { color: var(--ink); }

.workspace { min-height: 0; display: grid; grid-template-columns: 272px minmax(340px, 1fr) 356px; }
.control-panel, .feed-panel { min-height: 0; background: rgba(255, 255, 255, .985); position: relative; z-index: 600; }
.control-panel { border-right: 1px solid var(--line); padding: 20px 16px 14px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
.feed-panel { border-left: 1px solid var(--line); display: flex; flex-direction: column; }
.panel-heading { display: flex; justify-content: space-between; align-items: start; margin-bottom: 17px; }
.eyebrow { margin: 0 0 5px; font-family: var(--font-mono); font-size: 8px; letter-spacing: .18em; color: var(--mint); }
.panel-heading h1, .feed-header h2 { margin: 0; font-size: 16px; line-height: 1.15; font-weight: 600; letter-spacing: -.02em; }
.view-switcher { display: grid; grid-template-columns: repeat(3, 1fr); padding: 3px; background: #eef3f1; border: 1px solid var(--line); border-radius: 4px; }
.view-tab { border: 0; background: transparent; padding: 8px 4px; color: var(--muted); font-family: var(--font-mono); font-size: 9px; cursor: pointer; border-radius: 2px; }
.view-tab:hover { color: var(--ink); }
.view-tab.active { background: #fff; color: var(--mint); box-shadow: 0 1px 3px rgba(18,55,43,.08), inset 0 0 0 1px rgba(8,117,92,.13); }
.search-box { height: 37px; margin: 14px 0 18px; border: 1px solid var(--line); border-radius: 3px; display: flex; align-items: center; gap: 8px; padding: 0 9px; background: #fff; transition: border-color .2s; }
.search-box:focus-within { border-color: rgba(8,117,92,.5); box-shadow: 0 0 0 3px rgba(8,117,92,.07); }
.search-icon { width: 12px; height: 12px; border: 1px solid var(--muted); border-radius: 50%; position: relative; flex: 0 0 auto; }
.search-icon::after { content: ''; position: absolute; width: 5px; height: 1px; background: var(--muted); right: -4px; bottom: -2px; transform: rotate(45deg); }
.search-box input { min-width: 0; flex: 1; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 11px; }
.search-box input::placeholder { color: var(--muted-2); }
.search-box kbd { color: var(--muted-2); border: 1px solid var(--line); border-radius: 2px; padding: 1px 4px; font-family: var(--font-mono); font-size: 8px; }
.filter-section { margin-top: 17px; padding-top: 16px; border-top: 1px solid var(--line); }
.filter-section.compact { margin-top: 14px; padding-top: 14px; }
.section-title { display: flex; align-items: center; justify-content: space-between; }
.filter-section h2 { margin: 0 0 10px; color: #42554d; font-family: var(--font-mono); font-size: 9px; letter-spacing: .11em; text-transform: uppercase; }
.section-title button { border: 0; padding: 0; background: transparent; color: var(--muted-2); font-family: var(--font-mono); font-size: 8px; cursor: pointer; }
.entity-list { display: grid; gap: 3px; max-height: 173px; overflow-y: auto; scrollbar-width: thin; }
.entity-row { width: 100%; border: 0; border-left: 2px solid transparent; background: transparent; padding: 7px 8px; display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 11px; cursor: pointer; }
.entity-row span { display: flex; align-items: center; gap: 8px; }
.entity-row i { width: 4px; height: 4px; border-radius: 50%; background: var(--muted-2); }
.entity-row b { color: var(--muted-2); font-family: var(--font-mono); font-size: 9px; font-weight: 500; }
.entity-row:hover { color: var(--ink); background: rgba(8,117,92,.055); }
.entity-row.active { color: var(--mint); border-left-color: var(--mint); background: linear-gradient(90deg, var(--mint-soft), transparent); }
.entity-row.active i { background: var(--mint); box-shadow: 0 0 6px rgba(8,117,92,.25); }
.entity-row.active b { color: var(--mint); }
.entity-row.quiet:not(.active) { color: var(--muted-2); }
.category-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.category-chip { min-width: 0; border: 1px solid var(--line); border-radius: 3px; background: #fff; color: var(--muted); padding: 7px 8px; text-align: left; font-size: 9px; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.category-chip i { display: inline-block; width: 15px; color: var(--muted-2); font-style: normal; }
.category-chip:hover { color: var(--ink); border-color: var(--line-strong); }
.category-chip.active { color: var(--mint); border-color: rgba(8,117,92,.32); background: var(--mint-soft); }
.category-chip.active i { color: var(--mint); }
.severity-legend { display: flex; flex-wrap: wrap; gap: 6px; }
.severity { border: 1px solid transparent; background: transparent; color: var(--muted); padding: 5px 6px; border-radius: 3px; display: flex; align-items: center; gap: 5px; font-family: var(--font-mono); font-size: 8px; cursor: pointer; }
.severity:hover, .severity.active { border-color: var(--line); background: rgba(8,117,92,.055); color: var(--ink); }
.dot { width: 5px; height: 5px; border-radius: 50%; }
.dot.all { background: var(--mint); } .dot.critical { background: var(--red); } .dot.high { background: var(--orange); } .dot.medium { background: var(--yellow); }
.scope-note { margin-top: 19px; padding: 11px; border: 1px solid rgba(8,117,92,.16); background: rgba(8,117,92,.045); display: grid; grid-template-columns: 18px 1fr; gap: 6px; color: var(--muted); }
.scope-note > span { color: var(--mint); }
.scope-note p { margin: 0; font-size: 9px; line-height: 1.5; }
.scope-note strong { display: block; color: #34473f; font-weight: 600; margin-bottom: 2px; }

.map-stage { min-width: 0; min-height: 0; position: relative; background: #dce8e3; overflow: hidden; }
#map { width: 100%; height: 100%; background: #dce8e3; }
.leaflet-tile-pane { filter: saturate(.72) brightness(1.03) contrast(.96); }
.leaflet-container img.leaflet-tile { mix-blend-mode: normal; }
.leaflet-control-zoom { border: 1px solid var(--line-strong) !important; border-radius: 3px !important; box-shadow: none !important; margin: 0 0 18px 16px !important; }
.leaflet-control-zoom a { color: var(--muted) !important; background: rgba(255,255,255,.95) !important; border-bottom-color: var(--line) !important; }
.leaflet-control-zoom a:hover { color: var(--mint) !important; background: var(--panel-2) !important; }
.leaflet-control-attribution { margin: 0 0 4px 16px !important; padding: 2px 4px !important; color: #65776f !important; background: rgba(255,255,255,.88) !important; font-family: var(--font-mono); font-size: 7px !important; }
.leaflet-control-attribution a { color: #40564d !important; }
.map-stage::after { content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 400; box-shadow: inset 0 0 38px rgba(18,55,43,.08); }
.map-toolbar { position: absolute; z-index: 500; top: 13px; left: 13px; display: flex; gap: 6px; }
.tool-button { min-height: 32px; border: 1px solid var(--line-strong); border-radius: 3px; background: rgba(255,255,255,.94); color: #40534b; padding: 0 10px; display: flex; gap: 6px; align-items: center; cursor: pointer; font-family: var(--font-mono); font-size: 8px; letter-spacing: .05em; text-transform: uppercase; backdrop-filter: blur(8px); box-shadow: 0 2px 8px rgba(18,55,43,.08); }
.tool-button span { color: var(--mint); font-size: 13px; }
.tool-button:hover { border-color: rgba(8,117,92,.4); color: var(--mint); }
.tool-button.spinning span { animation: spin .8s linear infinite; }
.mobile-filter { display: none; }
.map-key { position: absolute; z-index: 500; right: 13px; bottom: 13px; display: flex; gap: 10px; border: 1px solid var(--line); border-radius: 3px; padding: 7px 9px; background: rgba(255,255,255,.92); color: var(--muted); font-family: var(--font-mono); font-size: 7px; text-transform: uppercase; backdrop-filter: blur(8px); box-shadow: 0 2px 8px rgba(18,55,43,.07); }
.map-key span { display: flex; align-items: center; gap: 4px; }
.map-key i { width: 5px; height: 5px; border-radius: 50%; }
.map-key i.critical { background: var(--red); } .map-key i.high { background: var(--orange); } .map-key i.medium { background: var(--yellow); } .map-key i.low { background: var(--green); }
.map-attribution-note { position: absolute; z-index: 500; left: 50%; bottom: 11px; transform: translateX(-50%); padding: 4px 7px; border: 1px solid var(--line); border-radius: 3px; color: #40534b; background: rgba(255,255,255,.92); font-family: var(--font-mono); font-size: 7px; white-space: nowrap; box-shadow: 0 2px 8px rgba(18,55,43,.06); }
.signal-marker { transition: fill-opacity .2s, stroke-width .2s; }
.signal-marker:hover { fill-opacity: .65; stroke-width: 3; }
.marker-critical { animation: markerPulse 2.4s infinite; }
.signal-tooltip { min-width: 180px; max-width: 260px; padding: 9px 11px !important; border: 1px solid var(--line-strong) !important; border-radius: 3px !important; background: rgba(255,255,255,.98) !important; color: var(--ink) !important; box-shadow: 0 10px 35px rgba(18,55,43,.18) !important; }
.signal-tooltip::before { border-top-color: rgba(255,255,255,.98) !important; }
.leaflet-tooltip.signal-tooltip { white-space: normal; overflow-wrap: anywhere; }
.signal-tooltip strong { display: block; font-size: 11px; line-height: 1.3; }
.signal-tooltip span { display: block; color: var(--muted); font-family: var(--font-mono); font-size: 8px; margin-top: 5px; }

.feed-header { flex: 0 0 auto; padding: 17px 16px 13px; display: flex; align-items: end; justify-content: space-between; border-bottom: 1px solid var(--line); }
.feed-header h2 span { color: var(--mint); }
.select-wrap select { appearance: none; border: 1px solid var(--line); border-radius: 3px; outline: 0; background-color: #fff; color: var(--muted); padding: 6px 23px 6px 8px; font-family: var(--font-mono); font-size: 8px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 10px) 10px, calc(100% - 7px) 10px; background-size: 3px 3px, 3px 3px; background-repeat: no-repeat; }
.active-filter { margin: 9px 12px 0; border: 1px solid rgba(8,117,92,.24); background: var(--mint-soft); color: var(--mint); padding: 6px 8px; font-family: var(--font-mono); font-size: 8px; display: flex; justify-content: space-between; align-items: center; }
.active-filter[hidden] { display: none; }
.active-filter button { border: 0; background: none; color: var(--mint); cursor: pointer; }
.feed-list { min-height: 0; overflow-y: auto; padding: 7px 8px 18px; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
.event-card { padding: 14px 11px 12px; border: 1px solid transparent; border-bottom-color: var(--line); cursor: pointer; transition: background .18s, border-color .18s, transform .18s; outline: 0; }
.event-card:hover, .event-card:focus-visible { background: rgba(8,117,92,.045); border-color: var(--line-strong); transform: translateX(-2px); }
.card-meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.card-meta time { color: var(--muted-2); font-family: var(--font-mono); font-size: 8px; }
.priority-label { display: inline-flex; align-items: center; gap: 5px; text-transform: uppercase; font-family: var(--font-mono); font-size: 7px; letter-spacing: .11em; }
.priority-label i { width: 5px; height: 5px; border-radius: 50%; }
.priority-label.critical { color: var(--red); } .priority-label.critical i { background: var(--red); box-shadow: 0 0 7px rgba(196,43,73,.3); }
.priority-label.high { color: var(--orange); } .priority-label.high i { background: var(--orange); }
.priority-label.medium { color: var(--yellow); } .priority-label.medium i { background: var(--yellow); }
.priority-label.low { color: var(--green); } .priority-label.low i { background: var(--green); }
.event-card h3 { margin: 0; color: var(--ink); font-size: 13px; line-height: 1.32; letter-spacing: -.012em; }
.event-card > p { margin: 7px 0 9px; color: var(--muted); font-size: 10px; line-height: 1.52; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.place-line { display: flex; align-items: center; gap: 5px; color: #64766e; font-family: var(--font-mono); font-size: 8px; }
.place-line span { color: var(--mint); }
.place-line i { color: var(--muted-2); font-style: normal; }
.card-footer { margin-top: 10px; padding-top: 8px; border-top: 1px dotted var(--line); display: flex; align-items: center; gap: 6px; min-width: 0; }
.category-tag, .people-tag { padding: 3px 5px; border-radius: 2px; background: rgba(8,117,92,.06); color: var(--muted); font-family: var(--font-mono); font-size: 7px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.people-tag { max-width: 110px; }
.source-tag { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; color: var(--muted-2); font-family: var(--font-mono); font-size: 7px; white-space: nowrap; }
.source-tag i { width: 4px; height: 4px; border-radius: 50%; background: var(--mint); }
.feed-skeleton { padding: 8px; display: grid; gap: 8px; }
.feed-skeleton i { display: block; height: 118px; background: linear-gradient(90deg, rgba(24,65,52,.035), rgba(24,65,52,.085), rgba(24,65,52,.035)); background-size: 200% 100%; animation: shimmer 1.6s infinite; }
.empty-state, .feed-error { margin: auto; padding: 30px; text-align: center; color: var(--muted); }
.empty-state > span { color: var(--mint); font-size: 28px; }
.empty-state h3 { color: var(--ink); margin: 8px 0 5px; font-size: 14px; }
.empty-state p { font-size: 10px; }
.empty-state button { border: 1px solid var(--line-strong); background: var(--panel-2); color: var(--mint); padding: 7px 10px; border-radius: 3px; font-size: 9px; cursor: pointer; }
.feed-error { display: grid; gap: 5px; }

.statusbar { display: grid; grid-template-columns: 1fr 1fr 1fr; align-items: center; padding: 0 13px; border-top: 1px solid var(--line); background: #f8faf9; color: var(--muted-2); font-family: var(--font-mono); font-size: 7px; letter-spacing: .09em; position: relative; z-index: 800; }
.statusbar > div { display: flex; align-items: center; gap: 6px; }
.status-center { justify-self: center; }
.statusbar > div:last-child { justify-self: end; }
.status-ok { width: 5px; height: 5px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 6px rgba(8,117,92,.25); }

.event-dialog { width: min(560px, calc(100% - 28px)); max-height: calc(100% - 40px); overflow-y: auto; border: 1px solid var(--line-strong); border-radius: 4px; padding: 26px; color: var(--ink); background: #fff; box-shadow: 0 30px 100px rgba(18,55,43,.24); }
.event-dialog::backdrop { background: rgba(16,32,26,.28); backdrop-filter: blur(4px); }
.dialog-close { position: absolute; top: 10px; right: 10px; border: 0; background: transparent; color: var(--muted); font-size: 22px; cursor: pointer; }
.dialog-kicker { display: flex; align-items: center; gap: 12px; color: var(--muted); font-family: var(--font-mono); font-size: 8px; text-transform: uppercase; }
.event-dialog h2 { margin: 12px 30px 8px 0; font-size: 25px; line-height: 1.15; letter-spacing: -.035em; }
.dialog-location { color: var(--mint); font-family: var(--font-mono); font-size: 9px; }
.dialog-summary { color: var(--muted); line-height: 1.65; font-size: 13px; margin: 18px 0; }
.event-dialog dl { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.event-dialog dl div { padding: 10px; background: #f7faf8; }
.event-dialog dt { color: var(--muted-2); font-family: var(--font-mono); font-size: 7px; text-transform: uppercase; letter-spacing: .1em; }
.event-dialog dd { margin: 4px 0 0; color: #3f514a; font-size: 10px; }
.verification-note { margin: 14px 0; padding: 11px; border-left: 2px solid var(--yellow); background: rgba(128,96,0,.055); }
.verification-note strong { color: var(--yellow); font-family: var(--font-mono); font-size: 8px; text-transform: uppercase; }
.verification-note p { margin: 5px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.correction-note { margin: 14px 0; padding: 11px; border-left: 2px solid var(--coral); background: rgba(196,43,73,.055); }
.correction-note strong { color: var(--coral); font-family: var(--font-mono); font-size: 8px; text-transform: uppercase; }
.correction-note p { margin: 5px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.source-list { margin-top: 14px; border: 1px solid var(--line); border-radius: 3px; overflow: hidden; }
.source-list-heading { display: flex; justify-content: space-between; padding: 8px 10px; color: var(--muted-2); background: #f2f6f4; font-family: var(--font-mono); font-size: 8px; text-transform: uppercase; }
.source-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 12px; color: var(--ink); background: #fff; border-top: 1px solid var(--line); }
.source-row:hover { background: #eff7f3; }
.source-row span { display: grid; gap: 3px; min-width: 0; }
.source-row b { font-size: 10px; }
.source-row small { color: var(--muted); font-size: 9px; }
.source-row em { color: var(--mint); font-family: var(--font-mono); font-size: 8px; font-style: normal; white-space: nowrap; text-transform: uppercase; }
.source-button { display: flex; justify-content: space-between; align-items: center; padding: 11px 13px; background: var(--mint); color: #fff; font-family: var(--font-mono); font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; border-radius: 3px; }
.source-button:hover { background: #065e4a; }
.icon-button { border: 0; background: transparent; font-size: 22px; cursor: pointer; }
.mobile-only { display: none; }
.noscript { position: fixed; inset: auto 20px 40px; z-index: 9999; padding: 14px; background: var(--red); color: white; text-align: center; }

@keyframes pulse { 70% { box-shadow: 0 0 0 7px rgba(196,43,73,0); } 100% { box-shadow: 0 0 0 0 rgba(196,43,73,0); } }
@keyframes markerPulse { 50% { fill-opacity: .58; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { to { background-position: -200% 0; } }

@media (max-width: 1120px) {
    .workspace { grid-template-columns: 242px minmax(320px, 1fr) 328px; }
    .topbar { grid-template-columns: 230px 1fr 230px; }
    .map-attribution-note { display: none; }
}

@media (max-width: 900px) {
    body { overflow: auto; }
    .app-shell { min-height: 100%; height: auto; grid-template-rows: 56px 32px minmax(0, 1fr) 25px; }
    .topbar { grid-template-columns: 1fr auto; padding: 0 13px; }
    .live-state { display: none; }
    .top-actions a:not(.admin-link) { display: none; }
    .workspace { min-height: calc(100vh - 113px); grid-template-columns: 1fr; grid-template-rows: 52vh auto; }
    .control-panel { position: fixed; z-index: 1200; left: 0; top: 0; bottom: 0; width: min(330px, 90vw); transform: translateX(-102%); transition: transform .25s ease; border-right-color: var(--line-strong); box-shadow: 20px 0 80px rgba(18,55,43,.2); }
    .control-panel.open { transform: translateX(0); }
    .mobile-only, .mobile-filter { display: flex; }
    .map-stage { grid-row: 1; }
    .feed-panel { grid-row: 2; border-left: 0; border-top: 1px solid var(--line); min-height: 45vh; }
    .feed-list { overflow: visible; }
    .signal-strip { grid-template-columns: 130px 1fr; }
    .source-health { display: none; }
    .ticker span:not(:first-child) { display: none; }
    .status-center { display: none !important; }
    .statusbar { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
    .top-actions { gap: 8px; }
    .admin-link { padding: 6px 8px; }
    .signal-strip { grid-template-columns: 112px 1fr; }
    .signal-label { padding-left: 12px; font-size: 8px; }
    .ticker { padding: 0 11px; }
    .workspace { grid-template-rows: 54vh auto; }
    .map-toolbar { top: 9px; left: 9px; }
    .tool-button { padding: 0 8px; }
    .map-key { left: 9px; right: auto; bottom: 9px; gap: 7px; }
    .map-key span:last-child { display: none; }
    .event-dialog { padding: 21px 17px; }
    .event-dialog h2 { font-size: 21px; }
    .event-dialog dl { grid-template-columns: 1fr; }
}

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

/* Reader audit: retain the map layout, with legible text and truthful fallback states. */
[hidden] { display: none !important; }
body { font-size: 16px; }
.app-shell { grid-template-rows: auto auto 40px minmax(0, 1fr) 38px; }
.place-menu { display: flex; align-items: center; gap: 16px; min-width: 0; padding: 10px 18px; background: var(--panel); border-bottom: 1px solid var(--line); }
.place-menu .view-switcher { flex: 0 0 auto; }
.place-menu .view-tab { padding: 8px 12px; font-family: var(--font-sans); font-size: 14px; }
.place-shortcuts { display: flex; align-items: center; gap: 6px; min-width: 0; flex: 1; overflow-x: auto; scrollbar-width: thin; padding: 3px; }
.place-shortcut { flex: 0 0 auto; min-height: 44px; padding: 8px 12px; border: 1px solid transparent; border-radius: 4px; background: transparent; color: var(--mint); font-size: 16px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.place-shortcut:hover { background: var(--mint-soft); }
.place-shortcut.active { background: var(--mint); color: #fff; }
.place-picker { flex: 0 1 260px; min-width: 160px; }
.place-picker select { width: 100%; min-height: 44px; border: 1px solid var(--line-strong); border-radius: 4px; padding: 8px; background: #fff; color: var(--ink); font-size: 16px; cursor: pointer; }
.topbar { min-height: 76px; grid-template-columns: 185px 1fr auto; gap: 16px; }
.brand em, .eyebrow, .live-state, .top-actions, .signal-strip, .filter-section h2,
.view-tab, .category-chip, .severity, .section-title button, .entity-row b,
.scope-note p, .tool-button, .map-key, .select-wrap select, .active-filter,
.statusbar, .priority-label, .place-line, .category-tag, .people-tag, .source-tag,
.source-row small, .source-row em, .source-list-heading, .review-date { font-size: 12px; }
.live-state { flex-wrap: wrap; justify-content: center; letter-spacing: 0; gap: 4px 10px; }
.top-actions { gap: 14px; letter-spacing: 0; text-transform: none; }
.workspace { grid-template-columns: 272px minmax(280px, 1fr) 440px; }
.panel-heading h1, .feed-header h2 { font-size: 20px; line-height: 1.25; }
.view-tab, .entity-row, .category-chip, .severity, .section-title button { min-height: 40px; font-size: 14px; }
.entity-row span { text-align: left; }
.entity-list { max-height: 210px; }
.category-chip { white-space: normal; }
.search-box { height: 44px; }
.search-box input { font-size: 16px; }
.search-box kbd { display: none; }
.scope-note p { line-height: 1.6; }
.feed-header { align-items: center; gap: 12px; }
.feed-status { margin: 0; padding: 12px 16px; background: var(--panel-2); border-bottom: 1px solid var(--line); color: #40534b; font-size: 14px; line-height: 1.5; }
.map-status { position: absolute; z-index: 550; top: 58px; left: 12px; right: 12px; margin: 0; padding: 12px; background: #fff; border: 1px solid var(--line-strong); font-size: 14px; line-height: 1.5; }
.map-toolbar .tool-button { min-height: 40px; }
.map-key { flex-wrap: wrap; }
.map-attribution-note { display: none; }
.leaflet-control-attribution { font-size: 10px !important; }
.event-card { padding: 18px 12px; cursor: auto; overflow-wrap: anywhere; }
.event-card h3 { font-size: 18px; line-height: 1.4; }
.story-link:hover, .story-link:focus-visible, .source-tag:hover { text-decoration: underline; }
.event-card > time { display: block; font-size: 12px; line-height: 1.6; margin-top: 6px; color: var(--muted); }
.event-card > p { display: block; font-size: 16px; line-height: 1.6; overflow: visible; }
.event-card > .evidence-label { font-size: 13px; color: #40534b; }
.event-card.selected { background: var(--mint-soft); border-color: var(--mint); }
.card-footer { flex-wrap: wrap; gap: 8px; }
.source-tag { white-space: normal; text-align: right; line-height: 1.5; }
.event-dialog { max-width: 680px; width: calc(100% - 28px); }
.event-dialog h2 { font-size: 26px; line-height: 1.3; }
.dialog-summary, .verification-note p, .correction-note p, .event-dialog dd { font-size: 16px; line-height: 1.6; }
.event-dialog dt, .verification-note strong, .correction-note strong, .dialog-kicker, .dialog-location { font-size: 13px; line-height: 1.6; }
.source-row b { font-size: 14px; }
.source-row { overflow-wrap: anywhere; }
.event-dialog p > a { text-decoration: underline; color: var(--mint); }
.empty-state { padding: 28px 20px; }
.empty-state h3 { font-size: 20px; }
.empty-state p, .empty-state button { font-size: 16px; }
.no-js { overflow: auto; }
.no-js .app-shell { height: auto; min-height: 100%; grid-template-rows: auto 40px minmax(0, 1fr) auto; }
.no-js .place-menu { display: none; }
.no-js .workspace { display: block; }
.no-js .control-panel, .no-js .map-stage, .no-js .select-wrap { display: none; }
.no-js .feed-panel { max-width: 900px; margin: 0 auto; }
.no-js .feed-list { overflow: visible; }
.noscript { position: static; margin: 0; padding: 16px; background: var(--panel-2); color: var(--ink); }
.no-js .noscript { position: relative; }
@media (max-width: 1150px) {
    .workspace { grid-template-columns: 230px minmax(240px, 1fr) 370px; }
    .topbar { grid-template-columns: 150px 1fr; }
    .live-state { display: none; }
}
@media (max-width: 900px) {
    .app-shell { grid-template-rows: auto auto 40px minmax(0, 1fr) auto; }
    .place-menu { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 10px; padding: 8px 12px; }
    .place-menu .view-tab { padding: 8px; }
    .place-picker { min-width: 0; grid-column: 2; grid-row: 1; }
    .place-shortcuts { grid-column: 1 / -1; grid-row: 2; }
    .topbar { padding: 12px; min-height: 72px; }
    .top-actions { gap: 12px; flex-wrap: wrap; }
    .top-actions a:not(.admin-link) { display: inline; }
    .top-actions a[href='/about.php'], .top-actions a[href='/methodology.php'] { display: none; }
    .workspace { display: flex; flex-direction: column; min-height: 0; }
    .map-stage { height: 32vh; min-height: 245px; max-height: 340px; flex: none; }
    .feed-panel { min-height: 40vh; }
    .control-panel { width: min(350px, 94vw); visibility: hidden; }
    .control-panel.open { visibility: visible; }
    .entity-list { max-height: 28vh; }
    .feed-list { padding: 4px 8px 20px; }
    .event-card { padding: 18px 12px; }
    .statusbar { min-height: 44px; gap: 12px; padding: 10px 16px; }
    .map-key span:last-child { display: flex; }
    .leaflet-control-zoom { margin-bottom: 44px !important; }
}
@media (max-width: 460px) {
    .place-menu { grid-template-columns: minmax(0, 1fr); }
    .place-picker { grid-column: 1; grid-row: 2; }
    .place-shortcuts { grid-row: 3; }
    .place-menu .view-tab { min-height: 40px; }
    .place-shortcut { min-height: 40px; font-size: 14px; }
    .map-stage { height: 26vh; min-height: 200px; }
}

/* Phone/tablet reading: controls outside the map and persistent section access. */
.site-menu-toggle, .mobile-reader-nav, .controls-backdrop { display: none; }
@media (max-width: 900px) {
    html { scroll-padding-bottom: 80px; }
    .js .app-shell { grid-template-rows: auto auto minmax(0, 1fr) auto; padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
    .js .signal-strip { display: none; }
    .topbar { min-height: 64px; grid-template-columns: 1fr auto; gap: 12px; padding: 8px 16px; }
    .js .site-menu-toggle { display: block; min-height: 44px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--mint); font-size: 16px; cursor: pointer; }
    .js .top-actions { display: none; position: absolute; top: 100%; left: 8px; right: 8px; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: 0 12px 30px rgba(18,55,43,.16); }
    .js .top-actions.open { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
    .js .top-actions a[href] { display: flex; align-items: center; min-height: 44px; padding: 10px 12px; font: 16px var(--font-sans); }
    .js .top-actions .admin-link { border: 0; }
    .place-menu { gap: 6px 8px; padding: 8px 12px; }
    .place-menu .view-tab { min-height: 44px; }
    .place-picker select { min-height: 44px; border-radius: 6px; }
    .place-shortcuts { padding: 0; scrollbar-width: none; }
    .place-shortcut { min-height: 44px; }
    .map-stage { display: grid; grid-template-rows: 56px minmax(280px, 42svh) auto; height: auto; min-height: 0; max-height: none; overflow: hidden; scroll-margin-top: 8px; }
    #map { grid-row: 2; min-height: 0; }
    .map-toolbar { position: static; grid-row: 1; grid-column: 1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: center; gap: 6px; padding: 6px 8px; background: var(--panel-2); }
    .map-toolbar .tool-button { min-height: 44px; justify-content: center; padding: 6px; font: 14px var(--font-sans); text-transform: none; letter-spacing: 0; border-color: var(--line); border-radius: 8px; box-shadow: none; }
    .map-toolbar .tool-button span { font-size: 18px; }
    .map-toolbar .tool-button[aria-pressed="true"] { background: var(--mint); color: #fff; }
    .scrollable-map #map { touch-action: pan-y; }
    .map-key { position: static; grid-row: 3; grid-column: 1; border: 0; border-radius: 0; justify-content: center; gap: 10px; padding: 10px 6px; font-size: 11px; background: var(--panel-2); box-shadow: none; }
    .map-stage::after { display: none; }
    .map-status { top: 64px; max-height: calc(100% - 108px); overflow-y: auto; }
    .leaflet-control-zoom { margin: 0 0 10px 12px !important; }
    .leaflet-control-zoom a { width: 44px !important; height: 44px !important; line-height: 44px !important; }
    .leaflet-control-attribution { margin: 0 !important; font-size: 10px !important; }
    .feed-header { padding: 18px 16px; }
    .select-wrap select { min-height: 44px; font-size: 16px; background-position: calc(100% - 12px) 20px, calc(100% - 9px) 20px; }
    .feed-panel { scroll-margin-top: 8px; }
    .event-card { padding: 20px 8px; }
    .event-card:hover, .event-card:focus-visible { transform: none; }
    .source-tag { min-height: 44px; align-items: center; }
    .active-filter { font-size: 14px; gap: 8px; }
    .active-filter button { flex-shrink: 0; min-width: 44px; min-height: 44px; font-size: 24px; }
    .js .mobile-reader-nav { position: fixed; z-index: 900; bottom: 0; left: 0; right: 0; display: grid; grid-template-columns: repeat(3, 1fr); padding: 6px 12px calc(6px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: #fff; box-shadow: 0 -4px 20px rgba(18,55,43,.06); }
    .mobile-reader-nav a, .mobile-reader-nav button { display: flex; align-items: center; justify-content: center; min-height: 48px; border: 0; border-radius: 8px; background: #fff; color: var(--mint); font: 600 16px var(--font-sans); cursor: pointer; }
    .mobile-reader-nav button { background: var(--mint-soft); }
    .controls-backdrop { display: block; position: fixed; inset: 0; z-index: 1100; width: 100%; height: 100%; border: 0; background: rgba(16,32,26,.4); }
    .control-panel { width: min(380px, calc(100vw - 32px)); padding: max(16px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom)); overscroll-behavior: contain; }
    .control-panel .panel-heading { position: sticky; top: -16px; z-index: 2; padding: 12px 0; align-items: center; background: #fff; }
    .icon-button, .dialog-close { min-width: 44px; min-height: 44px; flex-shrink: 0; }
    .category-chip, .severity { min-height: 44px; }
    html.filters-open, .filters-open body { overflow: hidden; }
    .filters-open body { position: fixed; width: 100%; }
    .event-dialog { width: calc(100% - 16px); max-height: calc(100dvh - 16px); padding: 0 18px 24px; border-radius: 14px; overscroll-behavior: contain; }
    .dialog-close { position: sticky; top: 0; display: block; margin: 4px 0 0 auto; z-index: 2; background: #fff; border: 1px solid var(--line); border-radius: 50%; }
    .event-dialog h2 { font-size: 23px; margin-right: 0; }
    .dialog-kicker { flex-wrap: wrap; gap: 6px 12px; }
    .event-dialog dl { grid-template-columns: 1fr; }
    .source-row { min-height: 48px; }
    .statusbar { padding-bottom: 18px; }
    .no-js .top-actions { flex-wrap: wrap; }
}
@media (max-width: 360px) {
    .map-toolbar .tool-button { font-size: 13px; }
    .map-toolbar .tool-button span { display: none; }
    .feed-header { gap: 8px; padding: 16px 12px; }
    .feed-header h2 { font-size: 18px; }
    .select-wrap select { max-width: 148px; }
    .map-key { gap: 7px; font-size: 10px; }
}
