:root {
    --bg: #11151b;        /* lifted off pure-black to reduce halation/harshness */
    --panel: #161b22;
    --panel-2: #1c232d;
    --border: #2a313c;
    --text: #e6edf3;
    --muted: #a7b0bb;     /* brighter secondary text for legibility */
    --accent: #3b82f6;
    --collision: #e5484d;
    --hazard: #f5a623;
    --closure: #8e6cef;
    --fire: #e5484d;
    --other: #3b82f6;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
    background: var(--bg);
    color: var(--text);
    font: 15px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* Top bar */
.topbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 18px;
    background: var(--panel);
    border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand h1 { font-size: 17px; margin: 0; font-weight: 650; letter-spacing: .2px; }
.dot {
    width: 10px; height: 10px; border-radius: 50%;
    background: var(--collision);
    box-shadow: 0 0 0 0 rgba(229,72,77,.6);
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0%   { box-shadow: 0 0 0 0 rgba(229,72,77,.55); }
    70%  { box-shadow: 0 0 0 8px rgba(229,72,77,0); }
    100% { box-shadow: 0 0 0 0 rgba(229,72,77,0); }
}
.meta { display: flex; gap: 16px; font-size: 13px; color: var(--muted); }
.meta strong { color: var(--text); }
.live strong { color: var(--collision); }

/* Filters */
.filters {
    display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
    padding: 10px 18px;
    background: var(--panel);
    border-bottom: 1px solid var(--border);
}
.filters input[type=search], .filters select {
    background: var(--panel-2);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 8px;
    padding: 7px 11px;
    font-size: 14px;
    outline: none;
}
.filters input[type=search] { flex: 1; min-width: 180px; }
.filters input[type=search]:focus, .filters select:focus { border-color: var(--accent); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
    background: var(--panel-2);
    border: 1px solid var(--border);
    color: var(--muted);
    border-radius: 999px;
    padding: 6px 13px;
    font-size: 13px;
    cursor: pointer;
    transition: .12s;
}
.chip:hover { color: var(--text); }
.chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.toggle { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); cursor: pointer; }

/* Layout */
.layout { flex: 1; display: flex; min-height: 0; }
#map { flex: 1.4; min-width: 0; background: #0a0d11; }
.listwrap { flex: 1; min-width: 340px; max-width: 460px; display: flex; flex-direction: column; border-left: 1px solid var(--border); }
.listhead { padding: 10px 16px; font-size: 13px; color: var(--muted); border-bottom: 1px solid var(--border); }
.listhead span { color: var(--text); font-weight: 600; }
.list { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; }

/* Incident rows */
.item {
    padding: 11px 16px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    border-left: 3px solid transparent;
}
.item:hover { background: var(--panel-2); }
.item.active { background: var(--panel-2); border-left-color: var(--accent); }
.item.closed { opacity: .55; }
.item .type { font-weight: 600; font-size: 14px; }
.item .where { color: var(--muted); font-size: 13px; margin-top: 2px; }
.item .row2 { display: flex; justify-content: space-between; align-items: center; margin-top: 5px; font-size: 12px; color: var(--muted); }
.badge { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 11px; font-weight: 600; color: #fff; }
.badge.collision { background: var(--collision); }
.badge.hazard    { background: var(--hazard); color: #1a1205; }
.badge.closure   { background: var(--closure); }
.badge.fire      { background: var(--fire); }
.badge.other     { background: var(--other); }
.closed-tag { color: var(--muted); font-style: italic; }

.empty { padding: 40px 16px; text-align: center; color: var(--muted); }

/* Lift road + street-label legibility on the dark map tiles. Brightness raises
   the dark-gray roads/labels into a readable range while the background stays
   dark; saturation aids orientation (water/parks). NB: do NOT use contrast() — on
   these mostly-dark tiles it pushes roads darker, not lighter. Tune to taste:
   raise brightness if still too dark, lower it toward 1.4 if it looks washed. */
.leaflet-tile-pane { filter: brightness(2.0) saturate(1.3); }

/* Map popup (Leaflet) */
.leaflet-popup-content { font: 13px/1.4 -apple-system, sans-serif; }
.leaflet-popup-content .ptype { font-weight: 700; }
.leaflet-popup-content .pwhere { color: #444; }

/* Fatality — prominent red badge, row accent, pulsing map marker */
.fatal-tag {
    display: inline-block;
    background: var(--collision);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .5px;
    padding: 1px 6px;
    border-radius: 4px;
    vertical-align: middle;
    text-transform: uppercase;
}
.item.fatal { border-left-color: var(--collision); }
.item.fatal .type { color: #ff6b6f; }
.fatal-marker {
    display: block; width: 18px; height: 18px; border-radius: 50%;
    background: var(--collision); border: 2px solid #fff;
    box-shadow: 0 0 0 2px var(--collision);
    animation: fatalpulse 1.6s infinite;
}
@keyframes fatalpulse {
    0%   { box-shadow: 0 0 0 0 rgba(229,72,77,.7); }
    70%  { box-shadow: 0 0 0 10px rgba(229,72,77,0); }
    100% { box-shadow: 0 0 0 0 rgba(229,72,77,0); }
}

/* Motorcycle tag + experimental label */
.moto-tag { font-size: 12px; color: var(--hazard); white-space: nowrap; }
.exp { font-size: 10px; text-transform: uppercase; letter-spacing: .3px; color: var(--hazard); border: 1px solid var(--hazard); border-radius: 4px; padding: 0 4px; margin-left: 2px; }

/* Per-incident permanent page — bold hero header + body */
.ix-hero {
    border-top: 5px solid var(--ix-accent);
    border-bottom: 1px solid var(--border);
    background:
        radial-gradient(820px 260px at 10% -50%, color-mix(in srgb, var(--ix-accent) 42%, transparent), transparent),
        var(--panel);
}
.ix-hero-inner { max-width: 880px; margin: 0 auto; padding: 24px 18px 30px; }
.ix-crumbs { font-size: 12.5px; color: var(--muted); margin: 0 0 18px; }
.ix-crumbs a { color: var(--accent); text-decoration: none; }
.ix-crumbs span { opacity: .5; }
.ix-badges { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.ix-title { font-size: 30px; line-height: 1.15; font-weight: 750; letter-spacing: -.3px; margin: 0 0 12px; }
.ix-loc { font-size: 15px; color: var(--text); margin: 0 0 5px; }
.ix-time { font-size: 13px; color: var(--muted); margin: 0; }
.pill { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; padding: 4px 12px; border-radius: 999px; }
.pill-active { background: rgba(63,185,80,.16); color: #3fb950; border: 1px solid #3fb950; }
.pill-closed { background: var(--panel-2); color: var(--muted); border: 1px solid var(--border); }

.ix-body { max-width: 880px; margin: 0 auto; padding: 22px 18px 56px; }
.ix-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.ix-stat { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; }
.ix-stat .k { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); margin-bottom: 5px; }
.ix-stat .v { font-size: 14px; font-weight: 600; }
.ix-map-section { margin-top: 18px; }
.ix-map { height: 300px; border-radius: 14px; border: 1px solid var(--border); }
.ip-maplink { display: inline-block; font-size: 12px; color: var(--accent); text-decoration: none; margin-top: 8px; }
.ix-logs { margin-top: 8px; }
.ix-h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); margin: 28px 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }

/* History archive + search */
.history-page { max-width: 880px; margin: 0 auto; padding: 8px 18px 56px; }
.hist-filters { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; margin-bottom: 14px; }
.hf-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 10px; }
.hf-row:last-child { margin-bottom: 0; }
.hist-filters label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.hist-filters input[type=date], .hist-filters input[type=datetime-local], .hist-filters select, .hist-filters input[type=search] { background: var(--panel-2); border: 1px solid var(--border); color: var(--text); border-radius: 8px; padding: 8px 10px; font-size: 14px; font-family: inherit; outline: none; color-scheme: dark; }
.hist-filters input[type=search] { flex: 1; min-width: 200px; }
.hist-filters input:focus, .hist-filters select:focus { border-color: var(--accent); }
.hist-filters .sub-check { flex-direction: row; align-items: center; }
.hist-count { font-size: 13px; color: var(--muted); margin: 6px 2px 12px; }
.hist-list { list-style: none; margin: 0; padding: 0; }
.hist-list li { border: 1px solid var(--border); border-radius: 10px; margin-bottom: 8px; background: var(--panel); }
.hist-list li.fatal { border-left: 3px solid var(--collision); }
.hist-list a { display: block; padding: 11px 14px; text-decoration: none; color: var(--text); }
.hist-list a:hover { background: var(--panel-2); }
.hist-type { display: block; font-weight: 600; font-size: 14px; }
.hist-where { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.hist-meta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); margin-top: 6px; flex-wrap: wrap; }
.hist-pager { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; font-size: 13px; color: var(--muted); }
.hist-pager a { color: var(--accent); text-decoration: none; }

/* Stats / trends page */
.stats-page { max-width: 880px; margin: 0 auto; padding: 8px 18px 56px; }
.stats-window { display: flex; gap: 8px; margin: 8px 0 18px; }
.stats-window a { padding: 5px 14px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--border); color: var(--muted); font-size: 13px; text-decoration: none; }
.stats-window a.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 22px; }
.statcard { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; font-size: 12px; color: var(--muted); }
.statcard .n { display: block; font-size: 24px; font-weight: 700; color: var(--text); margin-bottom: 3px; }
.statcard .n.bad { color: var(--collision); }
.stats-block { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; margin-bottom: 16px; }
.stats-block h2 { font-size: 14px; margin: 0 0 14px; }
.stats-2col { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 680px) { .stats-2col { grid-template-columns: 1fr 1fr; } }
.vbars { display: flex; align-items: flex-end; gap: 2px; height: 130px; }
.vbars.hours { gap: 3px; margin-bottom: 22px; }
.vbar { flex: 1; background: var(--accent); border-radius: 2px 2px 0 0; min-height: 2px; position: relative; }
.vbar i { position: absolute; bottom: -18px; left: 50%; transform: translateX(-50%); font-size: 10px; color: var(--muted); font-style: normal; white-space: nowrap; }
.vbar:hover { filter: brightness(1.35); z-index: 30; }  /* lift above neighbor bars so the tooltip is never covered */
.vbar.moto { background: #a371f7; }   /* distinct hue for the motorcycle chart */
.vbar[data-tip]:hover::after {
    content: attr(data-tip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 6px;
    background: var(--panel-2);
    color: var(--text);
    border: 1px solid var(--border);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    line-height: 1.2;
    white-space: nowrap;
    pointer-events: none;
    z-index: 20;
}
.vbars-axis { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: 6px; }
.hbar-row { display: flex; align-items: center; gap: 10px; margin: 5px 0; font-size: 13px; }
.hbar-label { width: 140px; flex: none; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbar-track { flex: 1; background: var(--panel-2); border-radius: 5px; height: 16px; overflow: hidden; }
.hbar-fill { display: block; height: 100%; background: var(--accent); border-radius: 5px; }
.hbar-fill.collision { background: var(--collision); }
.hbar-fill.hazard { background: var(--hazard); }
.hbar-fill.closure { background: var(--closure); }
.hbar-fill.fire { background: var(--collision); }
.hbar-val { width: 48px; flex: none; text-align: right; color: var(--text); font-variant-numeric: tabular-nums; }

/* Fatality blog/archive page */
.bloglist { max-width: 760px; margin: 0 auto; padding: 10px 18px 50px; }
.blogcard { background: var(--panel); border: 1px solid var(--border); border-left: 3px solid var(--collision);
    border-radius: 10px; padding: 16px 18px; margin: 14px 0; }
.blog-headline { font-size: 17px; line-height: 1.3; margin: 0 0 6px; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.blog-headline a { color: var(--text); text-decoration: none; }
.blog-headline a:hover { color: var(--accent); text-decoration: underline; }
.blog-meta { font-size: 12.5px; color: var(--muted); }
.blog-excerpt { font-size: 13.5px; color: var(--text); margin: 8px 0 6px; }
.blog-more { font-size: 13px; color: var(--accent); text-decoration: none; }
.blog-more:hover { text-decoration: underline; }

/* Glossary page */
.glossary { max-width: 820px; margin: 0 auto; padding: 8px 18px 50px; }
.gloss-group { margin-top: 22px; }
.gloss-group h2 { font-size: 15px; color: var(--text); border-bottom: 1px solid var(--border); padding-bottom: 6px; }
.gloss-group dl { display: grid; grid-template-columns: 1fr; gap: 0; margin: 0; }
.gloss-group dl > div { display: flex; gap: 14px; padding: 7px 0; border-bottom: 1px solid var(--border); }
.gloss-group dt { flex: 0 0 90px; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.gloss-group dd { margin: 0; color: var(--text); }
@media (min-width: 620px) { .gloss-group dl { grid-template-columns: 1fr 1fr; column-gap: 28px; } }

/* SEO intro — visible but understated; gives crawlers/AI real text */
.seo-intro {
    margin: 0; padding: 8px 18px; font-size: 12.5px; line-height: 1.4;
    color: var(--muted); background: var(--panel); border-bottom: 1px solid var(--border);
}

/* Slide-over detail panel */
.scrim {
    position: fixed; inset: 0; background: rgba(0,0,0,.5);
    opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 1000;
}
.scrim.open { opacity: 1; pointer-events: auto; }
.panel {
    position: fixed; top: 0; right: 0; height: 100%; width: 420px; max-width: 92vw;
    background: var(--panel); border-left: 1px solid var(--border);
    transform: translateX(100%); transition: transform .22s ease;
    z-index: 1001; display: flex; flex-direction: column;
    box-shadow: -8px 0 30px rgba(0,0,0,.4);
}
.panel.open { transform: translateX(0); }
.panel-head {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
    padding: 16px 18px; border-bottom: 1px solid var(--border);
}
.p-type { font-size: 16px; font-weight: 650; line-height: 1.25; }
.p-where { color: var(--muted); font-size: 13px; margin-top: 4px; }
.p-close {
    background: none; border: none; color: var(--muted); font-size: 26px;
    line-height: 1; cursor: pointer; padding: 0 4px;
}
.p-close:hover { color: var(--text); }
.panel-body { overflow-y: auto; padding: 16px 18px; flex: 1; }
.panel-body h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); margin: 20px 0 8px; }
.facts { display: flex; flex-direction: column; gap: 7px; }
.fact { display: flex; justify-content: space-between; gap: 16px; font-size: 13px; }
.fact > span:first-child { color: var(--muted); }
.fact > span:last-child { text-align: right; }
.link { color: var(--accent); text-decoration: none; }
.muted { color: var(--muted); }
.small { font-size: 11px; font-weight: 400; text-transform: none; letter-spacing: 0; }

/* Update timeline */
.timeline { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--border); }
.timeline li { position: relative; padding: 0 0 12px 16px; }
.timeline li::before {
    content: ''; position: absolute; left: -5px; top: 5px;
    width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
}
.timeline .t { display: block; font-size: 11px; color: var(--muted); }
.timeline .x { display: block; font-size: 13px; margin-top: 2px; }

/* Hoverable/tappable CHP code in dispatch-log text */
.codehint {
    text-decoration: underline dotted;
    text-underline-offset: 2px;
    text-decoration-color: var(--accent);
    cursor: help;
    outline: none;
}
.codehint:focus { background: rgba(59,130,246,.18); border-radius: 3px; }
.codehint-tip {
    position: absolute;
    z-index: 2000;
    max-width: 240px;
    background: #f5f7fa;
    color: #111827;
    border: 1px solid var(--border);
    border-radius: 7px;
    padding: 6px 9px;
    font-size: 12.5px;
    line-height: 1.35;
    box-shadow: 0 6px 20px rgba(0,0,0,.45);
    pointer-events: none;
}

.foot { padding: 9px 18px; font-size: 12px; color: var(--muted); background: var(--panel); border-top: 1px solid var(--border); }
.foot a { color: var(--accent); text-decoration: none; }
.foot-btn {
    background: var(--panel-2); border: 1px solid var(--border); color: var(--text);
    border-radius: 6px; padding: 4px 10px; font-size: 12px; cursor: pointer; margin-right: 10px;
}
.foot-btn:hover { border-color: var(--accent); }

/* Modal (report a problem) */
.modal {
    position: fixed; inset: 0; background: rgba(0,0,0,.55);
    display: none; align-items: center; justify-content: center; z-index: 1100; padding: 16px;
}
.modal.open { display: flex; }
.modal-card {
    position: relative; background: var(--panel); border: 1px solid var(--border);
    border-radius: 12px; padding: 22px; width: 440px; max-width: 100%;
    box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.modal-card h2 { margin: 0 0 4px; font-size: 18px; }
.modal-card .p-close { position: absolute; top: 12px; right: 14px; }
#reportForm { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
#reportForm textarea, #reportForm input[type=email] {
    background: var(--panel-2); border: 1px solid var(--border); color: var(--text);
    border-radius: 8px; padding: 9px 11px; font-size: 14px; font-family: inherit; outline: none; resize: vertical;
}
#reportForm textarea:focus, #reportForm input[type=email]:focus { border-color: var(--accent); }
.btn-primary {
    background: var(--accent); border: none; color: #fff; border-radius: 8px;
    padding: 9px 16px; font-size: 14px; font-weight: 600; cursor: pointer;
}
.btn-primary:hover { filter: brightness(1.08); }
.btn-primary:disabled { opacity: .6; cursor: default; }
#subForm { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
#subForm input[type=email], #subForm select {
    background: var(--panel-2); border: 1px solid var(--border); color: var(--text);
    border-radius: 8px; padding: 9px 11px; font-size: 14px; font-family: inherit; outline: none;
}
#subForm input[type=email]:focus, #subForm select:focus { border-color: var(--accent); }
#subForm select[multiple] { padding: 4px; }
#subForm select[multiple] option { padding: 4px 7px; border-radius: 4px; }
#subForm select[multiple] option:checked { background: var(--accent); color: #fff; }
.sub-label { font-size: 12px; color: var(--text); margin-top: 2px; }
.sub-check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }

.report-msg { font-size: 13px; min-height: 1em; }
.report-msg.ok  { color: #3fb950; }
.report-msg.err { color: var(--collision); }

@media (max-width: 760px) {
    /* Desktop is a fixed 100vh shell with an internally-scrolling list. On mobile
       let the whole page scroll as a normal document, so the region nav + footer
       sit below the content instead of overlapping a clipped viewport. */
    body { height: auto; min-height: 100vh; }
    .layout { flex-direction: column; flex: 1 0 auto; min-height: 0; }
    #map { flex: 0 0 auto; height: 40vh; }
    .listwrap { flex: 0 0 auto; max-width: none; min-width: 0; border-left: none; border-top: 1px solid var(--border); }
    .list { flex: 0 0 auto; overflow: visible; }
    .home-regions { line-height: 2.1; }
}

/* --- Map UX: Near-me button, freeway select, you-are-here marker, distance --- */
.near-btn {
    background: var(--panel-2); border: 1px solid var(--border); color: var(--text);
    border-radius: 8px; padding: 7px 12px; font-size: 13px; cursor: pointer; white-space: nowrap;
}
.near-btn:hover { border-color: var(--accent); }
.near-btn.active { border-color: var(--accent); color: var(--accent); }
.near-btn:disabled { opacity: .6; cursor: default; }
.dist { color: var(--accent); font-variant-numeric: tabular-nums; font-size: 12px; }
.me-marker {
    display: block; width: 14px; height: 14px; border-radius: 50%;
    background: #2f81f7; border: 3px solid #fff; box-shadow: 0 0 0 4px rgba(47,129,247,.35);
}

/* Expandable list (e.g. felony incidents on /stats) */
.fel-detail > summary { cursor: pointer; color: var(--accent); font-size: 14px; padding: 8px 0; list-style: revert; }
.fel-detail[open] > summary { margin-bottom: 6px; }

/* Prominent "back to live map" pill (header link) */
.live-link {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--accent); color: #fff; font-weight: 600; font-size: 13px;
    padding: 7px 14px; border-radius: 999px; text-decoration: none; white-space: nowrap;
}
.live-link:hover { filter: brightness(1.12); }

/* "Sign up for email alerts" call-to-action pill (incident page + detail panel) */
.alert-cta {
    display: inline-flex; align-items: center; gap: 7px;
    background: var(--accent); color: #fff; font-weight: 600; font-size: 14px;
    padding: 9px 16px; border-radius: 999px; text-decoration: none; cursor: pointer;
    border: 0; font-family: inherit;
}
.alert-cta:hover { filter: brightness(1.12); }
.ix-cta { margin: 6px 0 12px; }
/* Detail-panel CTA blocks (Follow this incident / area alerts) — each labelled
   and divided so the two are clearly different. */
.p-cta-block { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); }
.p-cta-label { font-weight: 700; font-size: 14px; }
.p-cta-sub { color: var(--muted); font-size: 12px; margin: 3px 0 9px; }
.p-alert-cta { margin: 0; }

/* "Follow this incident" forms (incident page + detail panel) */
.ix-follow { margin-top: 24px; }
.follow-form, .p-follow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.follow-form input[type=email], .p-follow input[type=email] {
    flex: 1; min-width: 200px;
    background: var(--panel-2); border: 1px solid var(--border); color: var(--text);
    border-radius: 8px; padding: 10px 12px; font-size: 14px; outline: none;
}
.follow-form input[type=email]:focus, .p-follow input[type=email]:focus { border-color: var(--accent); }
.follow-form .report-msg, .p-follow .report-msg { flex-basis: 100%; }

/* --- Donate page --- */
.donate-page { max-width: 640px; margin: 0 auto; padding: 32px 18px 60px; }
.donate-card {
    background: var(--panel); border: 1px solid var(--border); border-radius: 14px;
    padding: 32px 28px; text-align: center;
}
.donate-heart { font-size: 40px; line-height: 1; margin-bottom: 6px; }
.donate-card h2 { margin: 0 0 14px; font-size: 22px; }
.donate-card p { color: var(--text); font-size: 15px; line-height: 1.6; }
.donate-btn {
    display: inline-block; margin: 22px 0 8px; padding: 14px 34px;
    background: var(--accent); color: #fff; font-size: 17px; font-weight: 700;
    border-radius: 999px; text-decoration: none; transition: filter .12s;
}
.donate-btn:hover { filter: brightness(1.12); }
.donate-fineprint {
    margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border);
    text-align: left; font-size: 14px;
}
.donate-fineprint p { margin: 8px 0; }

/* --- Regional pages + daily recap --- */
.region-cats { display: flex; flex-wrap: wrap; gap: 8px; }
.region-cats .badge { font-size: 13px; padding: 4px 10px; }
.region-links { display: flex; flex-wrap: wrap; gap: 8px 14px; line-height: 1.9; }
.region-links a { color: var(--accent); font-size: 14px; }
.region-links a.here { color: var(--text); font-weight: 700; text-decoration: underline; }
.home-regions {
    max-width: 1100px; margin: 8px auto 0; padding: 14px 18px;
    border-top: 1px solid var(--border); font-size: 13px;
}
.home-regions .rl-label { color: var(--muted); margin-right: 6px; }
.daily-nav {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    margin-bottom: 14px; font-size: 14px;
}
.daily-nav a { color: var(--accent); }
.daily-nav strong { color: var(--text); }

/* --- Ad slots (horizontal banners on History / Stats / Fatalities) --- */
.ad-slot {
    display: block;
    margin: 24px auto;
    padding: 10px;
    max-width: 970px;
    text-align: center;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}
.ad-slot .ad-label {
    display: block;
    font-size: 10px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 6px;
}
.ad-slot img { max-width: 100%; height: auto; display: block; margin: 0 auto; }
.ad-slot ins.adsbygoogle { display: block; }
/* When the middle slot sits inside the history list, strip the list-item chrome. */
.hist-list .hist-ad { list-style: none; padding: 0; border: 0; background: none; }
