/* IncidentLive 2026 UI — dark-first design system */
:root {
    --bg-primary: #070b14;
    --bg-secondary: #0d1424;
    --bg-card: #121a2c;
    --bg-card-hover: #172238;
    --bg-elevated: #1a2438;
    --border: #243049;
    --border-strong: #334463;
    --text-primary: #eef3ff;
    --text-secondary: #9aabcb;
    --text-muted: #6f82a6;
    --text-label: #8094b5;
    --accent-blue: #3b82f6;
    --accent-blue-soft: rgba(59, 130, 246, 0.16);
    --priority-red: #ef4444;
    --priority-orange: #f59e0b;
    --priority-yellow: #eab308;
    --service-blue: #38bdf8;
    --success-green: #22c55e;
    --purple: #a855f7;
    --brandweer: #ef4444;
    --ambulance: #f59e0b;
    --politie: #6366f1;
    --mmt: #0d9488;
    --overig: #22c55e;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
    --radius: 16px;
    --radius-sm: 12px;
    --radius-pill: 999px;
    --max: 1240px;
    --header-h: 68px;
    --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color-scheme: dark;
}

html[data-theme="light"] {
    --bg-primary: #f4f6fb;
    --bg-secondary: #eef2f8;
    --bg-card: #ffffff;
    --bg-card-hover: #f8faff;
    --bg-elevated: #ffffff;
    --border: #d7dfec;
    --border-strong: #b7c4da;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --text-label: #556378;
    --accent-blue: #2563eb;
    --accent-blue-soft: rgba(37, 99, 235, 0.1);
    --shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
    color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.45;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--accent-blue); }
button, input, select, textarea { font: inherit; color: inherit; }
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--accent-blue);
    color: #fff;
    padding: 8px 12px;
    z-index: 100;
}
.skip-link:focus { left: 12px; top: 12px; }
.icon { width: 18px; height: 18px; flex: 0 0 auto; fill: currentColor; }
.icon-disc { fill: none; }
.icon-muted { opacity: 0.75; }
.muted { color: var(--text-muted); }
.empty { color: var(--text-secondary); padding: 20px 4px; }
.mono { font-variant-numeric: tabular-nums; }

/* —— Header —— */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(14px);
    background: color-mix(in srgb, var(--bg-primary) 88%, transparent);
    border-bottom: 1px solid var(--border);
}
.header-inner {
    max-width: var(--max);
    margin: 0 auto;
    min-height: var(--header-h);
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 16px;
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-primary);
    min-width: 0;
}
.brand-mark {
    width: 28px;
    height: 28px;
    color: var(--accent-blue);
    flex: 0 0 auto;
}
.brand-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.brand-name { font-weight: 750; font-size: 1.15rem; letter-spacing: -0.03em; line-height: 1.1; }
.brand-incident { color: var(--text-primary); }
.brand-live { color: var(--accent-blue); }
.brand-tagline {
    font-size: 0.72rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 220px;
}
.nav {
    display: none;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}
.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 44px;
    padding: 8px 12px;
    text-decoration: none;
    color: var(--text-secondary);
    border-radius: 10px;
    border-bottom: 2px solid transparent;
    font-weight: 550;
    font-size: 0.92rem;
}
.nav-link .nav-icon { opacity: 0.85; }
.nav-link:hover { color: var(--text-primary); background: var(--bg-secondary); }
.nav-link.is-active {
    color: var(--text-primary);
    border-bottom-color: var(--accent-blue);
    background: transparent;
}
.header-actions { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav + .header-actions { margin-left: 0; }
.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
}
.icon-btn:hover, .icon-btn:focus-visible {
    color: var(--text-primary);
    background: var(--bg-secondary);
    border-color: var(--border);
}
/* Icoon = doelthema: donkere site → zon, lichte site → maan */
html[data-theme="dark"] .js-theme .icon-moon,
html:not([data-theme]) .js-theme .icon-moon { display: none; }
html[data-theme="light"] .js-theme .icon-sun { display: none; }
.js-nav-toggle { display: inline-flex; }
.nav.is-open {
    display: flex;
    position: absolute;
    left: 12px;
    right: 12px;
    top: calc(var(--header-h) + 4px);
    flex-direction: column;
    align-items: stretch;
    padding: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

main {
    max-width: var(--max);
    margin: 0 auto;
    padding: 16px;
}

/* —— Region hero —— */
.region-hero {
    display: grid;
    gap: 14px;
    padding: 16px;
    margin-bottom: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.region-hero-main {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: stretch;
    justify-content: space-between;
}
.region-current {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-width: min(100%, 260px);
    max-width: 320px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.region-current:hover,
.region-current:focus-within {
    background: var(--bg-secondary);
    border-color: var(--border);
}
.region-current-btn {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    width: 100%;
    margin: 0;
    padding: 10px 12px 2px;
    border: 0;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
    font: inherit;
}
.region-current-btn:focus-visible,
.region-change-btn:focus-visible {
    outline: 2px solid var(--accent-blue);
    outline-offset: 2px;
    background: var(--bg-card-hover);
}
.region-current-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: var(--accent-blue-soft);
    color: var(--accent-blue);
    flex: 0 0 46px;
    overflow: hidden;
}
.region-current-icon .nl-province-map {
    width: 32px;
    height: 40px;
}
.region-current-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
}
.region-current-label {
    margin: 0;
    font-size: 0.78rem;
    color: var(--text-muted);
}
.region-current-name {
    display: block;
    margin: 2px 0 4px;
    font-size: 1.35rem;
    letter-spacing: -0.03em;
    font-weight: 750;
    line-height: 1.2;
    color: var(--text-primary);
}
.region-change-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    width: 100%;
    margin: 0;
    padding: 2px 12px 10px 70px;
    border: 0;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    background: transparent;
    color: var(--accent-blue);
    font: inherit;
    font-weight: 600;
    font-size: 0.88rem;
    min-height: 32px;
    cursor: pointer;
    text-align: left;
    text-decoration: none;
    transition: color 0.15s ease;
}
.region-current:hover .region-change-btn,
.region-change-btn:hover {
    color: #60a5fa;
    text-decoration: underline;
    text-underline-offset: 3px;
}
html[data-theme="light"] .region-current:hover .region-change-btn,
html[data-theme="light"] .region-change-btn:hover {
    color: #1d4ed8;
}
.region-change-btn .icon {
    width: 14px;
    height: 14px;
    transition: transform 0.15s ease;
}
.region-current:hover .region-change-btn .icon {
    transform: translateX(2px);
}
.region-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(88px, 1fr));
    gap: 10px;
    flex: 1 1 280px;
}
.stat-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px;
    min-width: 0;
}
.stat-card-top {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}
.stat-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: grid;
    place-items: center;
}
.stat-icon .icon { width: 16px; height: 16px; }
.stat-icon-red { background: rgba(239, 68, 68, 0.14); color: var(--priority-red); }
.stat-icon-orange { background: rgba(245, 158, 11, 0.14); color: var(--priority-orange); }
.stat-icon-green { background: rgba(34, 197, 94, 0.14); color: var(--success-green); }
.stat-value {
    font-size: 1.55rem;
    font-weight: 780;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}
.stat-label {
    margin: 4px 0 0;
    font-size: 0.75rem;
    color: var(--text-label);
    line-height: 1.3;
}
.nl-map {
    display: none;
    width: 120px;
    flex: 0 0 auto;
    align-self: center;
}
.nl-map-svg { width: 100%; height: auto; }
.nl-province-map {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;
}
.nl-province-map .province {
    fill: #4a6282;
    stroke: var(--bg-primary);
    stroke-width: 0.9;
    stroke-linejoin: round;
    stroke-linecap: round;
    transition: fill 0.16s ease, stroke 0.16s ease;
}
.nl-province-map.has-selection .province {
    fill: #2a3648;
}
.nl-province-map .province.is-selected {
    fill: #3b82f6;
    stroke: color-mix(in srgb, #3b82f6 55%, #fff);
}
.nl-province-map--icon .province {
    stroke-width: 2.4;
    stroke: color-mix(in srgb, var(--accent-blue) 18%, var(--bg-primary));
    fill: var(--accent-blue);
}
.nl-province-map--icon.has-selection .province {
    fill: color-mix(in srgb, var(--accent-blue) 38%, var(--bg-primary));
}
.nl-province-map--icon .province.is-selected {
    fill: var(--accent-blue);
    stroke: color-mix(in srgb, var(--accent-blue) 40%, #fff);
}
html[data-theme="light"] .nl-province-map .province {
    fill: #b7c9e4;
    stroke: #f4f6fb;
}
html[data-theme="light"] .nl-province-map.has-selection .province {
    fill: #d9e3f2;
}
html[data-theme="light"] .nl-province-map .province.is-selected {
    fill: #2563eb;
    stroke: #1d4ed8;
}
html[data-theme="light"] .nl-province-map--icon .province {
    fill: var(--accent-blue);
    stroke: #dbe7f8;
}
html[data-theme="light"] .nl-province-map--icon.has-selection .province {
    fill: #93b4e8;
}
html[data-theme="light"] .nl-province-map--icon .province.is-selected {
    fill: #2563eb;
    stroke: #dbe7f8;
}

.info-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    margin-bottom: 14px;
    border-radius: var(--radius-sm);
    border: 1px solid color-mix(in srgb, var(--accent-blue) 35%, var(--border));
    background: linear-gradient(90deg, var(--accent-blue-soft), transparent 70%);
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.4;
}
.info-banner--site {
    margin: 8px 0 0;
    padding: 8px 12px;
    min-height: 0;
    border: 1px solid var(--border);
    background: color-mix(in srgb, var(--bg-secondary) 88%, transparent);
    color: var(--text-muted);
    font-size: 0.78rem;
    line-height: 1.45;
    box-shadow: none;
}
.info-banner .icon {
    color: var(--accent-blue);
    flex: 0 0 auto;
}
.info-banner--site .icon {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    opacity: 0.85;
}
.info-banner a {
    margin-left: auto;
    white-space: nowrap;
    font-weight: 650;
    text-decoration: none;
    color: var(--accent-blue);
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    line-height: inherit;
}
.info-banner--site a {
    min-height: 36px;
    font-weight: 600;
    font-size: 0.78rem;
    color: var(--text-secondary);
}
.info-banner--site a:hover,
.info-banner--site a:focus-visible {
    color: var(--text-primary);
    text-decoration: underline;
}
.info-banner p {
    margin: 0;
    flex: 1 1 auto;
    min-width: 0;
    line-height: inherit;
}

.nl-province-map .province.is-warning-yellow { fill: #d4a017; }
.nl-province-map .province.is-warning-orange { fill: #d4650a; }
.nl-province-map .province.is-warning-red { fill: #c62828; }
.nl-province-map .province.is-selected.is-warning-yellow,
.nl-province-map .province.is-selected.is-warning-orange,
.nl-province-map .province.is-selected.is-warning-red {
    stroke: #f8fafc;
    stroke-width: 2;
}
.nl-province-map--icon .province.is-warning-yellow { fill: #e0b422; }
.nl-province-map--icon .province.is-warning-orange { fill: #e07012; }
.nl-province-map--icon .province.is-warning-red { fill: #d32f2f; }
html[data-theme="light"] .nl-province-map .province.is-warning-yellow { fill: #e8b923; }
html[data-theme="light"] .nl-province-map .province.is-warning-orange { fill: #e36a10; }
html[data-theme="light"] .nl-province-map .province.is-warning-red { fill: #c62828; }
html[data-theme="light"] .nl-province-map .province.is-selected.is-warning-yellow,
html[data-theme="light"] .nl-province-map .province.is-selected.is-warning-orange,
html[data-theme="light"] .nl-province-map .province.is-selected.is-warning-red {
    stroke: #1e3a8a;
    stroke-width: 2.1;
}

.weather-urgent {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0 0 12px;
}
.weather-urgent[hidden] { display: none !important; }
.weather-urgent-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-card);
    text-decoration: none;
    color: inherit;
    min-width: 0;
}
.weather-urgent-item--orange {
    border-color: color-mix(in srgb, #e07012 65%, var(--border));
    background: color-mix(in srgb, #e07012 14%, var(--bg-card));
}
.weather-urgent-item--red {
    border-color: color-mix(in srgb, #d32f2f 70%, var(--border));
    background: color-mix(in srgb, #d32f2f 16%, var(--bg-card));
}
.weather-urgent-icon {
    flex: 0 0 auto;
    margin-top: 1px;
}
.weather-urgent-item--orange .weather-urgent-icon { color: #ff9a3c; }
.weather-urgent-item--red .weather-urgent-icon { color: #ff6b6b; }
.weather-urgent-copy {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}
.weather-urgent-code {
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    font-size: 0.76rem;
}
.weather-urgent-line {
    font-size: 0.84rem;
    color: var(--text-secondary);
    overflow-wrap: anywhere;
}
.weather-urgent-more {
    font-size: 0.78rem;
    font-weight: 650;
    color: var(--accent-blue);
}

.weather-home {
    margin: 0;
}
.sidebar-stack .weather-home.is-empty {
    padding-top: 12px;
    padding-bottom: 12px;
}
.sidebar-stack .weather-home.is-empty .weather-home-head,
.sidebar-stack .weather-home.is-empty .sidebar-card-head {
    margin-bottom: 4px;
}
.weather-home-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}
.weather-home-head h2 {
    margin: 0;
    font-size: 0.95rem;
}
.weather-home-quiet,
.weather-home-note {
    margin: 0;
    font-size: 0.86rem;
    color: var(--text-secondary);
}
.weather-home-note--stale { color: var(--text-primary); }
.weather-alert {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0 0 8px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-card);
}
.weather-alert:last-child { margin-bottom: 0; }
.weather-alert--yellow {
    border-color: color-mix(in srgb, #e6b800 55%, var(--border));
    background: color-mix(in srgb, #e6b800 12%, var(--bg-card));
}
.weather-alert--orange {
    border-color: color-mix(in srgb, #e07012 65%, var(--border));
    background: color-mix(in srgb, #e07012 16%, var(--bg-card));
}
.weather-alert--red {
    border-color: color-mix(in srgb, #d32f2f 70%, var(--border));
    background: color-mix(in srgb, #d32f2f 20%, var(--bg-card));
}
.weather-alert-main {
    display: flex;
    gap: 10px;
    text-decoration: none;
    color: inherit;
}
.weather-alert-icon {
    flex: 0 0 auto;
    color: currentColor;
}
.weather-alert--yellow .weather-alert-icon { color: #e6b800; }
.weather-alert--orange .weather-alert-icon { color: #ff9a3c; }
.weather-alert--red .weather-alert-icon { color: #ff6b6b; }
.weather-alert-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.weather-alert-code {
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: 0.78rem;
}
.weather-alert-area,
.weather-alert-valid,
.weather-alert-meta {
    font-size: 0.82rem;
    color: var(--text-secondary);
}
.weather-alert-title {
    font-weight: 650;
}
.weather-alert-desc { margin: 0; }
.weather-alert-more summary {
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 650;
}
.weather-alert-more p { margin: 8px 0 0; }
.weather-page .weather-list { margin: 18px 0; }
.weather-page .weather-map-wrap {
    max-width: 420px;
    margin: 0 0 18px;
}
.weather-quiet { margin: 22px 0; color: var(--text-secondary); }

@media (max-width: 640px) {
    .weather-urgent { margin-bottom: 10px; }
    .weather-urgent-item { padding: 7px 9px; }
    .weather-urgent-line { font-size: 0.8rem; }
    .weather-alert { padding: 8px 10px; }
    .weather-alert-code { font-size: 0.74rem; }
    .weather-alert-title { font-size: 0.92rem; }
}

/* —— Filter bar —— */
.filter-bar {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    margin-bottom: 16px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}
.filter-chip {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 42px;
    padding: 0 14px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-secondary);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.88rem;
}
.filter-chip:hover { border-color: var(--border-strong); color: var(--text-primary); }
.filter-chip.is-active {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
    color: #fff;
}
.filter-chip .icon { width: 16px; height: 16px; }
.filter-chip .icon-disc { fill: none; }
.filter-chip-more { margin-left: auto; }

.filter-bar--legend {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
        "chips more"
        "legend legend";
    align-items: center;
    column-gap: 16px;
    row-gap: 8px;
    overflow: visible;
}
.filter-bar--legend .filter-bar-chips {
    grid-area: chips;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
}
.filter-bar--legend .filter-bar-legend {
    grid-area: legend;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 12px;
    justify-self: start;
    min-width: 0;
    max-width: 100%;
}
.filter-bar--legend .filter-chip-more {
    grid-area: more;
    margin-left: 0;
    justify-self: end;
}
.map-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-label);
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
}
.map-legend-swatch {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex: 0 0 auto;
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--text-label) 28%, transparent);
}
.map-legend-swatch.is-select { background: var(--accent-blue); }
.map-legend-swatch.is-yellow { background: var(--priority-yellow); }
.map-legend-swatch.is-orange { background: var(--priority-orange); }
.map-legend-swatch.is-red { background: var(--priority-red); }

@media (min-width: 1100px) {
    .filter-bar--legend {
        grid-template-columns: minmax(0, auto) minmax(0, 1fr) auto;
        grid-template-areas: "chips legend more";
    }
    .filter-bar--legend .filter-bar-legend {
        justify-self: end;
        padding-right: 12px;
    }
}

/* —— Filters sheet / popover —— */
.sheet-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 18, 0.55);
    z-index: 60;
}
.filters-pane {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    max-height: 86vh;
    z-index: 70;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 18px 18px 0 0;
    padding: 16px;
    transform: translateY(110%);
    transition: transform 0.2s ease;
    overflow: auto;
}
.filters-pane.is-open { transform: translateY(0); }
.filters-pane-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.filters-pane-head h2 {
    margin: 0;
    font-size: 1rem;
    letter-spacing: 0.02em;
}
.filter-form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 0.8rem; color: var(--text-muted); }
.field select,
.field input,
.search-wrap input {
    font-size: 16px;
    color: var(--text-primary);
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 10px;
    min-height: 44px;
    padding: 10px 12px;
}
.search-wrap { position: relative; }
.search-wrap .search-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}
.my-region {
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
}
.my-region-title { margin: 0 0 8px; font-size: 0.85rem; color: var(--text-muted); }
.my-region-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    width: 100%;
    justify-content: center;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-primary);
    cursor: pointer;
    font-weight: 600;
}
.my-region-btn:disabled { opacity: 0.7; cursor: wait; }
.my-region-status { min-height: 1.2em; margin: 8px 0 0; font-size: 0.85rem; color: var(--text-secondary); }
.my-region-result { margin-top: 10px; cursor: pointer; }
.my-region-found {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 10px;
    align-items: center;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg-card);
}
.my-region-found-label { display: block; font-size: 0.75rem; color: var(--text-muted); }
.my-region-check { color: var(--success-green); font-weight: 700; }
.multiselect { border: 0; margin: 0; padding: 0; }
.multiselect-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 8px;
}
.multiselect-head legend {
    padding: 0;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
}
.multiselect-count { font-size: 0.8rem; color: var(--text-muted); }
.multiselect-actions { display: flex; gap: 12px; margin-bottom: 8px; }
.text-btn {
    border: 0;
    background: none;
    color: var(--accent-blue);
    cursor: pointer;
    padding: 0;
    min-height: 36px;
    font-weight: 600;
    text-decoration: none;
}
.multiselect-options {
    display: grid;
    gap: 4px;
    max-height: 240px;
    overflow: auto;
    padding-right: 4px;
}
.region-options { max-height: none; }
.check {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 40px;
    padding: 6px 8px;
    border-radius: 8px;
    cursor: pointer;
}
.check:hover { background: var(--bg-secondary); }
.check input { width: 18px; height: 18px; accent-color: var(--accent-blue); }
.filter-submit { display: flex; gap: 12px; align-items: center; }

/* —— Main layout —— */
.incident-layout {
    display: grid;
    gap: 16px;
}
.incident-feed,
.sidebar-stack {
    min-width: 0;
}
.feed-panel,
.sidebar-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.feed-panel { padding: 14px; }
.feed-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
}
.feed-title-wrap {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}
.feed-title-wrap h1,
.feed-title-wrap h2 {
    margin: 0;
    font-size: 1.15rem;
    letter-spacing: -0.02em;
}
.feed-sub { margin: 2px 0 0; font-size: 0.82rem; color: var(--text-muted); }
.live-meta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
}
.live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success-green);
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.45);
    animation: pulse 2s infinite;
}
.live-dot.is-error {
    background: var(--priority-orange);
    animation: none;
}
@keyframes pulse {
    50% { box-shadow: 0 0 0 6px transparent; }
}
@media (prefers-reduced-motion: reduce) {
    .live-dot { animation: none; }
    .filters-pane { transition: none; }
}

.incident-list { display: flex; flex-direction: column; gap: 6px; }

/* —— Incident cards (fixed 4-column grid) —— */
.incident-card {
    display: grid;
    grid-template-columns: 6px 90px minmax(0, 1fr) 24px;
    column-gap: 14px;
    align-items: center;
    padding: 8px 10px 8px 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s ease, background 0.15s ease;
}
.incident-card:hover,
.incident-card:focus-visible {
    background: var(--bg-card-hover);
    border-color: var(--border-strong);
}
.incident-accent {
    width: 6px;
    align-self: stretch;
    border-radius: 6px 0 0 6px;
    background: var(--border-strong);
    margin: 0;
}
.incident-card.tone-p1 .incident-accent { background: var(--priority-red); }
.incident-card.tone-p2 .incident-accent { background: var(--priority-orange); }
.incident-card.tone-p3 .incident-accent { background: var(--priority-yellow); }
.incident-card.disc-brandweer .incident-icon { background: rgba(239, 68, 68, 0.14); color: var(--brandweer); }
.incident-card.disc-ambulance .incident-icon { background: rgba(245, 158, 11, 0.14); color: var(--ambulance); }
.incident-card.disc-politie .incident-icon { background: rgba(99, 102, 241, 0.16); color: var(--politie); }
.incident-card.disc-overig .incident-icon,
.incident-card.disc-knrm .incident-icon { background: rgba(34, 197, 94, 0.14); color: var(--overig); }
.incident-card.disc-mmt .incident-icon { background: rgba(13, 148, 136, 0.16); color: var(--mmt); }

.incident-meta {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    width: 90px;
    min-width: 90px;
}
.incident-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    flex: 0 0 32px;
}
.incident-icon .icon { width: 18px; height: 18px; }
.incident-time {
    margin: 0;
    font-weight: 750;
    font-variant-numeric: tabular-nums;
    font-size: 0.85rem;
    line-height: 1.2;
    min-height: 1.2em;
    text-align: center;
}
.incident-ago {
    display: block;
    width: 100%;
    font-size: 0.68rem;
    color: var(--text-label);
    text-align: center;
    line-height: 1.15;
    min-height: 1.15em;
}

.incident-content {
    min-width: 0;
    display: grid;
    grid-template-rows: auto auto auto auto;
    row-gap: 2px;
    align-content: center;
}
.incident-title-row {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    column-gap: 8px;
    align-items: baseline;
    margin: 0;
}
.priority-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 20px;
    padding: 0 6px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    border: 1px solid var(--border);
    background: var(--bg-card);
    box-sizing: border-box;
}
.priority-badge.is-empty {
    visibility: hidden;
    pointer-events: none;
}
.priority-badge.tone-p1 { color: var(--priority-red); border-color: color-mix(in srgb, var(--priority-red) 40%, var(--border)); }
.priority-badge.tone-p2 { color: var(--priority-orange); border-color: color-mix(in srgb, var(--priority-orange) 40%, var(--border)); }
.priority-badge.tone-p3 { color: var(--priority-yellow); border-color: color-mix(in srgb, var(--priority-yellow) 40%, var(--border)); }
.incident-headline {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.25;
}
.incident-address {
    margin: 0;
    min-height: 1.2em;
    color: var(--text-secondary);
    font-size: 0.82rem;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.incident-address.is-empty { visibility: hidden; }
.incident-region {
    margin: 0;
    min-height: 1.2em;
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--text-muted);
    font-size: 0.75rem;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.incident-region.is-empty { visibility: hidden; }
.incident-region .icon { width: 12px; height: 12px; flex: 0 0 12px; }
.incident-tags,
.incident-badges {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    margin: 2px 0 0;
    min-height: 22px;
}
.service-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 22px;
    padding: 2px 6px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}
.service-badge .icon { width: 13px; height: 13px; fill: none; }
.service-badge.disc-brandweer { color: var(--brandweer); }
.service-badge.disc-ambulance { color: var(--ambulance); }
.service-badge.disc-politie { color: var(--politie); }
.service-badge.disc-mmt { color: var(--mmt); }
.service-badge-meta {
    font-weight: 600;
    text-transform: none;
    color: var(--text-muted);
    max-width: 12rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.incident-chevron {
    display: grid;
    place-items: center;
    align-self: center;
    width: 24px;
    color: var(--text-muted);
}
.incident-chevron .icon { width: 16px; height: 16px; }
.load-more-wrap { display: flex; justify-content: center; margin-top: 14px; }
.load-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    padding: 0 16px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    cursor: pointer;
    font-weight: 650;
}
.load-more-btn:hover { color: var(--text-primary); border-color: var(--border-strong); }
.load-more-btn[hidden] { display: none !important; }

/* —— Sidebar —— */
.sidebar-stack { display: flex; flex-direction: column; gap: 14px; }
.sidebar-card { padding: 14px; }
.sidebar-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}
.sidebar-card-head h2 {
    margin: 0;
    font-size: 1rem;
    letter-spacing: -0.02em;
}
.sidebar-link {
    color: var(--accent-blue);
    text-decoration: none;
    font-weight: 650;
    font-size: 0.85rem;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
}
.region-active-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.region-active-list a {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
    min-height: 42px;
    padding: 8px 10px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--text-primary);
    border: 1px solid transparent;
}
.region-active-list a:hover,
.region-active-list a.is-current {
    background: var(--bg-secondary);
    border-color: var(--border);
}
.region-active-count {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-muted);
    white-space: nowrap;
}
.region-active-count strong { color: var(--accent-blue); font-weight: 800; }

.news-side-empty { margin: 0; padding: 0.75rem 1rem 1rem; }
.news-side-summary {
    margin: 4px 0 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.incident-feed-more[hidden],
.incident-more[hidden] { display: none; }
.incident-more { margin: 0; }
.incident-more summary {
    cursor: pointer;
    font-weight: 650;
    min-height: 44px;
    display: flex;
    align-items: center;
    color: var(--text-primary);
    list-style-position: outside;
}
.incident-more summary::-webkit-details-marker { color: var(--text-secondary); }
.incident-more .incident-list { margin-top: 10px; }
.news-side-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.news-side-item {
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: 10px;
    text-decoration: none;
    color: inherit;
    padding: 8px;
    border-radius: 12px;
    border: 1px solid transparent;
}
.news-side-item:hover {
    background: var(--bg-secondary);
    border-color: var(--border);
}
.news-thumb {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: var(--accent-blue-soft);
    color: var(--accent-blue);
}
.news-thumb .icon { width: 22px; height: 22px; }
.news-side-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}
.news-cat {
    display: inline-flex;
    padding: 2px 6px;
    border-radius: 6px;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    color: var(--service-blue);
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid color-mix(in srgb, var(--service-blue) 30%, var(--border));
}
.news-side-time { font-size: 0.75rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.news-side-title {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}
.news-side-place {
    margin: 4px 0 0;
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* —— Detail —— */
.detail-wrap { max-width: 860px; }
.detail-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 44px;
    text-decoration: none;
    color: var(--text-muted);
}
.back-link:hover { color: var(--text-primary); }
.detail-id { margin: 0; color: var(--text-muted); font-size: 0.85rem; }
.detail-hero {
    padding: 18px;
    margin-bottom: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-card);
    border-left: 4px solid var(--border-strong);
    box-shadow: var(--shadow);
}
.detail-hero.tone-p1 { border-left-color: var(--priority-red); }
.detail-hero.tone-p2 { border-left-color: var(--priority-orange); }
.detail-hero.tone-p3 { border-left-color: var(--priority-yellow); }
.detail-hero-top { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.detail-hero-tags { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.detail-services-note {
    margin: 10px 0 0;
    color: var(--text-muted);
    font-size: 0.82rem;
    line-height: 1.4;
}
.timeline-notice {
    margin: 0 0 12px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.45;
}
.timeline-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.timeline-item {
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--bg-secondary);
}
.timeline-item-head {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    margin-bottom: 6px;
}
.timeline-times {
    list-style: none;
    margin: 0 0 8px;
    padding: 0;
    color: var(--text-muted);
    font-size: 0.8rem;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.timeline-body {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.45;
    white-space: pre-wrap;
}
.timeline-units {
    margin: 8px 0 0;
    color: var(--text-muted);
    font-size: 0.82rem;
}
.timeline-fold > summary {
    cursor: pointer;
    min-height: 44px;
    display: flex;
    align-items: center;
    font-weight: 500;
    color: var(--text-primary);
}
.timeline-fold[open] > summary {
    margin-bottom: 8px;
    color: var(--text-muted);
}
.news-source-inline {
    margin-left: 6px;
    font-size: 0.82rem;
    font-weight: 650;
}
.detail-message { margin: 12px 0 10px; font-size: 1.25rem; letter-spacing: -0.02em; font-weight: 700; }
.detail-meta { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; color: var(--text-secondary); font-size: 0.9rem; }
.detail-meta li { display: flex; align-items: center; gap: 6px; }
.card.section,
.section.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: var(--shadow);
}
.section h2 { margin: 0 0 12px; font-size: 1rem; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.section-head h2 { margin: 0; }
.facts { display: grid; gap: 10px; margin: 0; }
.fact { display: grid; gap: 2px; }
.fact dt { color: var(--text-muted); font-size: 0.78rem; }
.fact dd { margin: 0; font-weight: 600; }
.incident-map,
#incident-map {
    width: 100%;
    height: 360px;
    min-height: 300px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    z-index: 1;
}
.map-disclaimer, .map-unavailable, .detail-disclaimer {
    margin: 10px 0 0;
    color: var(--text-muted);
    font-size: 0.85rem;
}
.detail-disclaimer { margin-top: 24px; }
.detail-disclaimer a { color: var(--text-muted); }
.vehicle-list, .plain-list, .related-news-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.vehicle {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 10px;
    align-items: center;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--bg-secondary);
}
.vehicle-id { font-weight: 750; font-variant-numeric: tabular-nums; }
.vehicle-name { margin: 0; font-weight: 650; }
.vehicle-station { margin: 2px 0 0; color: var(--text-muted); font-size: 0.85rem; }
.fold > summary {
    cursor: pointer;
    font-weight: 700;
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 7px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border);
}
.badge-live { color: var(--success-green); }
.badge-muted { color: var(--text-muted); }
.badge-source { color: var(--service-blue); }
.badge-category { color: var(--text-secondary); }
.badge-cat-fire { color: #f87171; }
.badge-cat-traffic_accident { color: #f59e0b; }
.badge-cat-shooting,
.badge-cat-stabbing { color: #fb7185; }
.badge-cat-explosion { color: #fb923c; }
.badge-cat-medical { color: #eab308; }
.badge-cat-missing_person { color: #60a5fa; }
.badge-cat-water_rescue { color: #38bdf8; }
.badge-cat-robbery { color: #c084fc; }
.badge-cat-other { color: var(--text-secondary); }
html[data-theme="light"] .badge-cat-fire { color: #dc2626; }
html[data-theme="light"] .badge-cat-traffic_accident { color: #d97706; }
html[data-theme="light"] .badge-cat-shooting,
html[data-theme="light"] .badge-cat-stabbing { color: #b91c1c; }
html[data-theme="light"] .badge-cat-explosion { color: #c2410c; }
html[data-theme="light"] .badge-cat-medical { color: #ca8a04; }
html[data-theme="light"] .badge-cat-missing_person { color: #2563eb; }
html[data-theme="light"] .badge-cat-water_rescue { color: #0369a1; }
html[data-theme="light"] .badge-cat-robbery { color: #7c3aed; }
.badge-p1 { color: var(--priority-red); }
.badge-p2 { color: var(--priority-orange); }
.badge-p3 { color: var(--priority-yellow); }
.disc { display: inline-flex; align-items: center; gap: 6px; font-size: 0.85rem; color: var(--text-muted); }
.banner {
    padding: 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-card);
}
.banner.error { border-color: var(--priority-red); }
.banner.success { border-color: var(--success-green); }

/* —— News pages —— */
.news-page { max-width: 860px; }
.news-sub { margin: 6px 0 0; color: var(--text-muted); }
.news-filters {
    display: grid;
    gap: 12px;
    padding: 14px;
    margin: 14px 0 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.news-filter-actions { display: flex; align-items: center; gap: 12px; }
.news-filter-submit,
.btn-primary,
.news-source-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 16px;
    border: 0;
    border-radius: 10px;
    background: var(--accent-blue);
    color: #fff;
    font-weight: 650;
    text-decoration: none;
    cursor: pointer;
}
.news-list { display: flex; flex-direction: column; gap: 10px; }
.news-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.news-card-link {
    display: block;
    padding: 14px 16px;
    text-decoration: none;
    color: inherit;
    min-height: 44px;
}
.news-card:hover { border-color: var(--border-strong); }
.news-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
    min-width: 0;
}
.news-card-badges {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
    flex: 1 1 auto;
}
.news-card-badges .badge {
    max-width: 100%;
    overflow-wrap: anywhere;
}
.news-card-time {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-variant-numeric: tabular-nums;
    flex: 0 0 auto;
    margin-left: auto;
    white-space: nowrap;
}
@media (max-width: 699px) {
    .news-card-top {
        flex-wrap: wrap;
        align-items: flex-start;
    }
    .news-card-time {
        margin-left: 0;
        white-space: normal;
    }
}
.news-card-title { margin: 0 0 8px; font-size: 1.05rem; }
.news-card-summary {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.92rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.news-card-meta {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    color: var(--text-muted);
    font-size: 0.82rem;
}
.news-card-place, .news-card-external { display: inline-flex; align-items: center; gap: 5px; }
.news-hero { border-left-color: var(--service-blue); }
.news-detail-summary { margin: 0 0 12px; line-height: 1.5; }
.news-source-note { color: var(--text-muted); font-size: 0.9rem; }
.news-related-note { margin: 0 0 10px; font-size: 0.9rem; color: var(--text-muted); }
.related-news-list a { text-decoration: none; font-weight: 650; }
.eyebrow { margin: 0; color: var(--text-muted); font-size: 0.8rem; }

/* —— Legal / contact —— */
.legal, .contact-wrap { max-width: 720px; }
.legal h1, .contact-wrap h1 { margin: 0 0 12px; letter-spacing: -0.03em; }
.legal p, .legal ul { margin: 0 0 12px; color: var(--text-secondary); }
.legal ul { padding-left: 1.2rem; }
.contact-form { display: flex; flex-direction: column; gap: 14px; max-width: 560px; margin-top: 8px; }
.contact-form .field label { font-weight: 600; color: var(--text-primary); }
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form select,
.contact-form textarea {
    width: 100%;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-primary);
    border-radius: 10px;
    padding: 10px 12px;
    min-height: 44px;
}
.contact-form textarea { min-height: 160px; resize: vertical; }
.form-privacy { margin: 0; color: var(--text-muted); font-size: 0.88rem; }
.turnstile-wrap { min-height: 65px; }
.hp-field {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
.contact-ticket-number {
    margin: 10px 0;
    font-size: 1.25rem;
    letter-spacing: 0.02em;
}
.contact-ticket-number code {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 8px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    font-weight: 700;
}

/* —— Footer —— */
.site-footer {
    margin-top: 40px;
    border-top: 1px solid var(--border);
    background: var(--bg-secondary);
}
.footer-inner {
    max-width: var(--max);
    margin: 0 auto;
    padding: 28px 16px 36px;
    display: grid;
    gap: 24px;
}
.footer-brand-link { margin-bottom: 8px; }
.footer-tagline { margin: 8px 0 0; color: var(--text-muted); font-size: 0.88rem; }
.footer-cols {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}
.footer-col h2 {
    margin: 0 0 10px;
    font-size: 0.85rem;
    color: var(--text-primary);
}
.footer-col a {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    min-height: 34px;
    padding: 4px 0;
}
.footer-col a:hover { color: var(--accent-blue); }
.footer-copy {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.82rem;
}

/* —— Responsive —— */
@media (min-width: 640px) {
    .brand-tagline { display: block; }
    .region-stats { grid-template-columns: repeat(3, minmax(110px, 1fr)); }
    .nl-map { display: block; }
    .news-filters { grid-template-columns: 1fr 1fr; }
    .news-filters .field-search,
    .news-filter-actions { grid-column: 1 / -1; }
}

@media (min-width: 768px) {
    .header-inner, main, .footer-inner { padding-left: 24px; padding-right: 24px; }
    .detail-meta { flex-direction: row; flex-wrap: wrap; gap: 14px; }
    .facts { grid-template-columns: 1fr 1fr; }
    .filters-pane {
        left: auto;
        right: 24px;
        bottom: auto;
        top: calc(var(--header-h) + 12px);
        width: min(420px, calc(100vw - 48px));
        max-height: min(80vh, 720px);
        border-radius: var(--radius);
        transform: translateY(-8px) scale(0.98);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.15s ease, transform 0.15s ease;
    }
    .filters-pane.is-open {
        transform: translateY(0) scale(1);
        opacity: 1;
        pointer-events: auto;
    }
}

@media (min-width: 1024px) {
    .nav { display: flex; margin-left: auto; }
    .js-nav-toggle { display: none; }
    .nav.is-open {
        position: static;
        flex-direction: row;
        padding: 0;
        border: 0;
        background: transparent;
        box-shadow: none;
    }
    .incident-layout {
        grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr);
        align-items: start;
    }
    .region-incident-layout > .incident-feed {
        grid-column: 1;
        grid-row: 1;
    }
    .region-incident-layout > .sidebar-stack {
        grid-column: 2;
        grid-row: 1 / span 2;
    }
    .region-incident-layout > .incident-feed-more {
        grid-column: 1;
        grid-row: 2;
    }
    .region-hero-main { align-items: center; }
}

@media (max-width: 767px) {
    .incident-card {
        grid-template-columns: 4px 64px minmax(0, 1fr);
        column-gap: 10px;
        padding: 8px 8px 8px 0;
    }
    .incident-meta {
        width: 64px;
        min-width: 64px;
    }
    .incident-chevron { display: none; }
    .incident-title-row {
        grid-template-columns: 36px minmax(0, 1fr);
        column-gap: 6px;
    }
    .priority-badge { min-width: 36px; }
    .incident-address,
    .incident-region { white-space: normal; }
    .service-badge { min-height: 28px; padding: 4px 8px; }
}

@media (max-width: 429px) {
    .brand-tagline { display: none; }
    .brand-name { font-size: 1.05rem; }
    .stat-value { font-size: 1.3rem; }
    .info-banner,
    .info-banner--site { flex-wrap: wrap; }
    .info-banner a,
    .info-banner--site a { margin-left: 28px; }
}

@media (max-width: 359px) {
    .header-inner, main, .footer-inner { padding-left: 10px; padding-right: 10px; }
    .region-stats { grid-template-columns: 1fr; }
}

/* —— Admin panel —— */
.admin-body { background: var(--bg-primary); overflow-x: hidden; }
.admin-header {
    border-bottom: 1px solid var(--border);
    background: var(--bg-secondary);
    position: sticky;
    top: 0;
    z-index: 20;
}
.admin-header-inner,
.admin-main,
.admin-footer {
    width: min(1480px, calc(100% - 2rem));
    max-width: 1480px;
    margin: 0 auto;
}
.admin-header-inner {
    padding: 12px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    align-items: center;
}
.admin-brand {
    font-weight: 750;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.02em;
}
.admin-brand span { color: var(--text-muted); font-weight: 600; }
.admin-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    flex: 1 1 240px;
}
.admin-nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.9rem;
}
.admin-nav-link:hover,
.admin-nav-link.is-active {
    background: var(--accent-blue-soft);
    color: var(--text-primary);
}
.admin-nav-badge {
    display: inline-block;
    min-width: 1.35em;
    padding: 0 6px;
    margin-left: 2px;
    border-radius: 999px;
    background: #f59e0b;
    color: #111;
    font-size: 0.72rem;
    font-weight: 750;
    line-height: 1.35;
    text-align: center;
    vertical-align: 1px;
}
.admin-user {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}
.admin-main {
    padding: 28px 0 56px;
}
.admin-footer {
    padding: 8px 0 32px;
    text-align: center;
}
.admin-footer-copy,
.admin-login-footer .admin-footer-copy {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 500;
}
.admin-login-footer {
    width: 100%;
    flex: 0 0 auto;
    padding: 20px 0 8px;
    text-align: center;
}
.admin-main > h1 {
    margin: 0 0 0.35rem;
    font-size: 1.45rem;
    letter-spacing: -0.02em;
}

.admin-dash-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem 2rem;
    margin: 0 0 2rem;
}
.admin-dash-head h1 {
    margin: 0;
    font-size: clamp(1.35rem, 1.2rem + 0.4vw, 1.5rem);
    font-weight: 750;
    letter-spacing: -0.025em;
    line-height: 1.2;
}
.admin-dash-sub {
    margin: 0.4rem 0 0;
    color: var(--text-muted);
    max-width: 40rem;
    font-size: 0.95rem;
}
.admin-global-status {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0.15rem 0 0;
    padding: 0.38rem 0.72rem;
    border-radius: 999px;
    border: 1px solid rgba(34, 197, 94, 0.22);
    background: rgba(34, 197, 94, 0.08);
    color: #86efac;
    font-size: 0.8rem;
    font-weight: 650;
    line-height: 1.2;
    white-space: nowrap;
}
.admin-global-status.is-warn {
    border-color: rgba(245, 158, 11, 0.28);
    background: rgba(245, 158, 11, 0.08);
    color: #fde68a;
}

.admin-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin: 0 0 1.75rem;
    align-items: stretch;
}
.admin-card,
.admin-section {
    background: var(--bg-card);
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 15px;
    padding: 16px;
    margin: 16px 0 0;
    min-width: 0;
}
.admin-card { margin: 0; }
.admin-cards .admin-card {
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 18px 18px 20px;
    transition: border-color 0.16s ease, background-color 0.16s ease;
}
.admin-cards .admin-card:hover {
    border-color: rgba(148, 163, 184, 0.3);
    background: var(--bg-card-hover);
}
a.admin-card-link {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}
a.admin-card-link:focus-visible {
    outline: 2px solid #38bdf8;
    outline-offset: 2px;
}
.admin-card h2,
.admin-section h2 {
    margin: 0 0 10px;
    font-size: 1.05rem;
}
.admin-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem 1rem;
    margin: 0 0 1.1rem;
}
.admin-card-head h2 {
    margin: 0;
    font-size: 1.28rem;
    font-weight: 750;
    letter-spacing: -0.02em;
    line-height: 1.2;
}
.admin-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0;
    padding: 0.22rem 0.62rem 0.22rem 0.48rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 0.78rem;
    font-weight: 650;
    line-height: 1.2;
    white-space: nowrap;
}
.admin-pill.is-ok {
    color: #86efac;
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.18);
}
.admin-pill.is-warn {
    color: #fde68a;
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.2);
}
.admin-pill.is-err {
    color: #fecaca;
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.22);
}
.admin-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    flex: 0 0 auto;
    background: currentColor;
    box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 22%, transparent);
}
.admin-metric-block {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem 1rem;
    margin: 0 0 0.7rem;
}
.admin-metric {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
    line-height: 1.15;
}
.admin-metric span {
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 550;
}
.admin-progress-label {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.92rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.api-usage-progress {
    display: block;
    width: 100%;
    height: 14px;
    min-height: 14px;
    flex: 0 0 auto;
    margin: 14px 0 20px;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: 999px;
    overflow: hidden;
}
.api-usage-progress__fill {
    display: block;
    height: 14px;
    min-height: 14px;
    min-width: 2px;
    max-width: 100%;
    border-radius: inherit;
}
.api-usage-progress__fill--safe {
    background: #22c55e;
}
.api-usage-progress__fill--warning {
    background: #f59e0b;
}
.api-usage-progress__fill--critical {
    background: #ef4444;
}
.admin-stats {
    display: grid;
    gap: 0.62rem 1rem;
    margin: 0;
}
.admin-stats-day {
    margin-top: 0.9rem;
    padding-top: 0.8rem;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
}
.admin-stat-subtle dt,
.admin-stat-subtle dd {
    font-size: 0.8rem;
    font-weight: 550;
    opacity: 0.82;
}
.admin-stats > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-width: 0;
}
.admin-stats dt {
    color: var(--text-muted);
    font-size: 0.86rem;
    font-weight: 500;
    min-width: 0;
    flex: 1 1 auto;
}
.admin-stats dd {
    margin: 0;
    font-variant-numeric: tabular-nums;
    font-size: 0.98rem;
    font-weight: 720;
    text-align: right;
    flex: 0 0 auto;
}
.admin-stats-status dt {
    color: #8ea4c8;
}
.admin-stats-status dd {
    display: inline-flex;
    align-items: center;
    gap: 0.42rem;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 550;
}
.admin-stats-status dd.is-warn { color: #f59e0b; }
.admin-stats-status dd.is-err { color: #ef4444; }
.admin-stats-status dd.is-unknown { color: #94a3b8; }
.admin-card-note {
    margin: 0.95rem 0 0;
    color: var(--text-muted);
    font-size: 0.82rem;
    line-height: 1.45;
    max-width: 42rem;
}
.admin-system-alerts {
    list-style: none;
    margin: 12px 0 0;
    padding: 0;
    display: grid;
    gap: 8px;
}
.admin-system-alerts li {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    margin: 0;
    color: #f59e0b;
    font-size: 0.82rem;
    line-height: 1.4;
}
.admin-system-alerts li.is-err { color: #ef4444; }
.admin-system-alert-mark {
    flex: 0 0 auto;
    width: 1.15rem;
    height: 1.15rem;
    border-radius: 999px;
    border: 1.5px solid currentColor;
    font-size: 0.7rem;
    font-weight: 800;
    line-height: 1.1;
    text-align: center;
}
.admin-system-alerts a {
    color: inherit;
    font-weight: 650;
}
.admin-when-full { display: none; }
.admin-when-short { display: inline; }

.admin-facts { margin: 16px 0; }
.admin-facts dt { color: var(--text-muted); font-size: 0.78rem; }
.admin-facts dd { margin: 0 0 10px; }
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}
.admin-table th,
.admin-table td {
    text-align: left;
    vertical-align: top;
    padding: 8px 8px 8px 0;
    border-bottom: 1px solid var(--border);
}
.admin-table th { color: var(--text-muted); font-weight: 600; font-size: 0.78rem; }
.admin-filters,
.admin-form {
    display: grid;
    gap: 12px;
    margin: 16px 0;
}
.admin-form-narrow { max-width: 420px; }
.admin-filters label,
.admin-form label { display: grid; gap: 4px; }
.admin-filters input,
.admin-filters select,
.admin-form input,
.admin-form select,
.admin-form textarea {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 8px 10px;
}
.admin-btn {
    appearance: none;
    border: 0;
    border-radius: 999px;
    background: var(--accent-blue);
    color: #fff;
    padding: 8px 14px;
    font-weight: 650;
    cursor: pointer;
}
.admin-btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
}
.admin-inline-form { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; margin: 0 6px 6px 0; }
.admin-filters .field-grow { min-width: 12rem; }
.admin-filters .field-actions {
    display: flex;
    gap: 8px;
    align-items: end;
    padding-bottom: 2px;
}
.admin-row-link { cursor: pointer; }
.admin-table tr.is-ticket-new td { background: rgba(245, 158, 11, 0.08); }
.admin-ticket-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}
.admin-ticket-head h1 { margin: 0; }
.admin-ticket-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    margin: 0 0 16px;
}
.admin-note-form { display: grid; gap: 8px; max-width: 40rem; }
.admin-note-form textarea {
    width: 100%;
    min-height: 110px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 8px 10px;
    color: var(--text-primary);
}
.admin-ticket-history {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 14px;
}
.admin-ticket-history li {
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}
.admin-ticket-history p { margin: 4px 0 0; }
.admin-ticket-note {
    white-space: pre-wrap;
    color: var(--text-secondary);
}
.admin-tabs { display: flex; flex-wrap: wrap; gap: 12px; }
.admin-tabs a[aria-current="page"] { font-weight: 700; }
.admin-plain { margin: 0; padding-left: 18px; }
.admin-login-page {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px;
    box-sizing: border-box;
    overflow-x: hidden;
}
.admin-login-toolbar {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
}
.admin-login-main {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1 0 auto;
    min-width: 0;
}
.admin-login {
    width: 100%;
    max-width: 420px;
    margin: auto;
    display: grid;
    gap: 14px;
    justify-items: center;
    text-align: center;
}
.admin-login-brand {
    margin: 0;
    font-weight: 750;
    font-size: 1.35rem;
    letter-spacing: -0.03em;
    color: var(--text-primary);
}
.admin-login-kicker {
    margin: -8px 0 2px;
    font-size: 0.72rem;
    font-weight: 650;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.admin-login-panel {
    width: 100%;
    text-align: left;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 22px 22px 24px;
    min-width: 0;
}
.admin-login-panel h1 {
    margin: 0 0 0.35rem;
    font-size: 1.28rem;
    letter-spacing: -0.02em;
}
.admin-login-panel .muted {
    margin: 0 0 1rem;
    font-size: 0.86rem;
}
.admin-login-panel .banner {
    margin: 0 0 12px;
    overflow-wrap: anywhere;
}
.admin-login-panel .admin-form {
    margin: 0;
}
.admin-login-panel .admin-btn {
    width: 100%;
    min-height: 44px;
}
.admin-login-back {
    margin: 4px 0 0;
    font-size: 0.86rem;
}
.admin-login-back a {
    color: var(--text-secondary);
    text-decoration: none;
}
.admin-login-back a:hover,
.admin-login-back a:focus-visible {
    color: var(--text-primary);
    text-decoration: underline;
}

.analytics-split {
    display: grid;
    gap: 24px;
    margin: 16px 0 8px;
}
@media (min-width: 900px) {
    .analytics-split { grid-template-columns: 1.2fr 0.8fr; align-items: start; }
}
.analytics-trend {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 140px;
    padding: 8px 0 0;
    overflow-x: auto;
}
.analytics-trend-col {
    flex: 1 1 0;
    min-width: 18px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    gap: 6px;
}
.analytics-trend-bar {
    width: 100%;
    max-width: 22px;
    background: #38bdf8;
    border-radius: 4px 4px 0 0;
    min-height: 0;
}
.analytics-trend-col span {
    color: var(--text-muted);
    font-size: 0.68rem;
    white-space: nowrap;
}
.analytics-periods {
    margin: 0 0 1.25rem;
}

@media (min-width: 768px) {
    .admin-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 22px;
    }
    .admin-cards .admin-card {
        padding: 24px 26px 26px;
    }
    .admin-filters { grid-template-columns: repeat(4, minmax(0, 1fr)) auto; align-items: end; }
    .admin-facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; }
    .admin-facts dd { margin: 0; }
}
@media (min-width: 1200px) {
    .admin-cards {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .analytics-today-cards,
    .analytics-period-cards {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}
@media (min-width: 1024px) {
    .admin-main { padding-top: 32px; }
    .admin-card-head h2 { font-size: 1.35rem; }
    .admin-when-full { display: inline; }
    .admin-when-short { display: none; }
}
@media (max-width: 767px) {
    .admin-header-inner,
    .admin-main,
    .admin-footer {
        width: min(1480px, calc(100% - 1.5rem));
    }
    .admin-main { padding: 18px 0 40px; }
    .admin-dash-head {
        flex-direction: column;
        margin-bottom: 1.25rem;
    }
    .admin-cards { gap: 12px; margin-bottom: 1.15rem; }
    .admin-cards .admin-card { padding: 16px; }
    .admin-card-head { margin-bottom: 0.85rem; }
    .admin-card-head h2 { font-size: 1.15rem; }
    .admin-metric { font-size: 1.28rem; }
    .admin-table { display: block; overflow-x: auto; }
    .admin-user { width: 100%; justify-content: space-between; margin-left: 0; }
}
@media (max-width: 699px) {
    .admin-cards { grid-template-columns: 1fr; }
}

/* —— Traffic —— */
.traffic-page { max-width: 960px; }
.traffic-list { display: flex; flex-direction: column; gap: 10px; }
.traffic-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    border-left: 4px solid var(--border-strong);
}
.traffic-card--congestion { border-left-color: #f59e0b; }
.traffic-card--incident { border-left-color: #ef4444; }
.traffic-card--roadworks { border-left-color: #fb923c; }
.traffic-card--closure { border-left-color: #8b5cf6; }
.traffic-card-link { display: block; padding: 14px 16px; }
.traffic-card-top { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.traffic-type {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.traffic-card-time { color: var(--text-muted); font-size: 0.85rem; font-variant-numeric: tabular-nums; }
.traffic-card-title { margin: 0 0 8px; font-size: 1.05rem; }
.traffic-card-summary {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.92rem;
}
.traffic-card-meta {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    color: var(--text-muted);
    font-size: 0.82rem;
}
.traffic-card-place { display: inline-flex; align-items: center; gap: 5px; }
.traffic-card-source { margin: 10px 0 0; color: var(--text-muted); font-size: 0.78rem; }
.traffic-map {
    height: 280px;
    margin: 0 0 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-card);
}
.traffic-map-note { margin: 0 0 16px; color: var(--text-muted); font-size: 0.82rem; }
.traffic-thumb--congestion { color: #f59e0b; }
.traffic-thumb--incident { color: #ef4444; }
.traffic-thumb--roadworks { color: #fb923c; }
.traffic-thumb--closure { color: #8b5cf6; }
@media (max-width: 699px) {
    .traffic-map { height: 220px; }
}

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

:focus-visible { outline: 2px solid var(--accent-blue); outline-offset: 2px; }

.crumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 8px;
    margin: 0 0 14px;
    font-size: 0.82rem;
    color: var(--text-label, var(--text-muted));
}
.crumbs a { color: var(--text-secondary); text-decoration: none; }
.crumbs a:hover { color: var(--text-primary); }
.crumbs-sep { opacity: 0.65; }

.region-page-head { margin-bottom: 16px; }
.region-page-head h1 {
    margin: 0 0 8px;
    font-size: 1.45rem;
    letter-spacing: -0.03em;
}
.region-page-lead {
    margin: 0 0 12px;
    color: var(--text-secondary);
    max-width: 62ch;
}
.region-page-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
}

.region-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.region-grid a {
    display: block;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    color: inherit;
    text-decoration: none;
    font-weight: 600;
}
.region-grid a:hover,
.region-grid a:focus-visible {
    background: var(--bg-card-hover);
    border-color: var(--border-strong);
}

.feed-note {
    margin: 12px 0 0;
    font-size: 0.85rem;
}
.feed-note a { color: var(--accent-blue); }

.about-lead { color: var(--text-secondary); }
.about-wrap .card p { color: var(--text-secondary); }
.about-list {
    margin: 0;
    padding-left: 1.15rem;
    color: var(--text-secondary);
}
.about-list li { margin: 0 0 8px; }
.about-more { margin: 16px 0 0; color: var(--text-secondary); }

.glossary-toolbar { display: flex; flex-direction: column; gap: 10px; }
.glossary-search label {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}
.glossary-search input[type="search"] {
    width: 100%;
    font-size: 16px;
    color: var(--text-primary);
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 10px;
    min-height: 44px;
    padding: 10px 12px;
}
.glossary-search input[type="search"]:focus {
    outline: 2px solid var(--accent-blue);
    outline-offset: 2px;
    border-color: var(--border-strong);
}
.glossary-search-help {
    margin: 8px 0 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
}
.glossary-empty {
    margin: 0;
    color: var(--text-primary);
    font-weight: 600;
}
.glossary-empty[hidden] { display: none; }
.glossary { margin: 12px 0 0; }
.glossary-item {
    padding: 14px 0;
    border-top: 1px solid var(--border);
    scroll-margin-top: calc(var(--header-h) + 16px);
}
.glossary-item:first-child {
    border-top: 0;
    padding-top: 0;
}
.glossary-item dt {
    margin: 0 0 6px;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.05rem;
}
.glossary-item dt a {
    color: inherit;
    text-decoration: none;
}
.glossary-item dt a:hover,
.glossary-item dt a:focus-visible {
    color: var(--accent-blue);
    text-decoration: underline;
}
.glossary-full {
    display: block;
    margin-top: 2px;
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-secondary);
}
.glossary-item dd { margin: 0; }
.glossary-item dd p { margin: 0 0 8px; }
.glossary-item dd p:last-child { margin-bottom: 0; }
.glossary-note { font-size: 0.95rem; }
.glossary-source { font-size: 0.9rem; color: var(--text-secondary); }
.glossary-item:target {
    outline: 2px solid var(--accent-blue);
    outline-offset: 8px;
    border-radius: 8px;
}
.glossary-group[hidden] { display: none; }
.glossary-item[hidden] { display: none; }

/* —— Public status page —— */
.status-page { max-width: 52rem; min-width: 0; }
.status-intro h1 { margin: 0 0 10px; }
.status-overall {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    margin: 18px 0 10px;
}
.status-overall-summary {
    color: var(--text-primary);
    font-weight: 650;
}
.status-updated {
    margin: 0;
    color: var(--text-label);
    font-size: 0.92rem;
}
.status-refresh-error {
    margin: 12px 0 0;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid color-mix(in srgb, var(--priority-orange) 45%, var(--border));
    background: color-mix(in srgb, var(--priority-orange) 12%, var(--bg-secondary));
    color: var(--text-primary);
    font-weight: 600;
}
.status-refresh-error[hidden] { display: none; }
.status-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    margin: 16px 0;
    min-width: 0;
}
.status-grid > .status-card {
    margin-bottom: 0;
}
.status-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto auto;
    align-content: start;
    gap: 10px;
    min-width: 0;
}
.status-card-head {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin: 0;
    min-width: 0;
}
.status-card-head h2 {
    margin: 0;
    font-size: 1.15rem;
    line-height: 1.25;
    min-width: 0;
    overflow-wrap: anywhere;
}
.status-card-head .status-badge {
    flex-shrink: 0;
    max-width: 100%;
}
.status-card-detail {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.45;
    min-width: 0;
    overflow-wrap: anywhere;
}
.status-card-meta {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: subgrid;
    grid-row: span 2;
    gap: 8px;
    margin: 0;
    min-width: 0;
}
.status-card-meta-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 2px 12px;
    align-items: start;
    min-width: 0;
}
.status-card-meta-row dt {
    color: var(--text-label);
    font-size: 0.88rem;
    line-height: 1.35;
    min-width: 0;
    overflow-wrap: anywhere;
}
.status-card-meta-row dd {
    margin: 0;
    font-variant-numeric: tabular-nums;
    font-weight: 650;
    line-height: 1.35;
    text-align: left;
    min-width: 0;
    overflow-wrap: anywhere;
}
.status-limitation {
    margin: 8px 0 0;
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.45;
}
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.28rem 0.7rem 0.28rem 0.5rem;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border);
    font-size: 0.86rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
    background: var(--bg-secondary);
}
.status-badge.is-large { font-size: 0.95rem; padding: 0.38rem 0.85rem 0.38rem 0.55rem; }
.status-badge-icon { display: inline-flex; }
.status-badge-icon .icon { width: 16px; height: 16px; }
.status-badge.is-ok {
    color: #86efac;
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.28);
}
.status-badge.is-delayed,
.status-badge.is-partial {
    color: #fde68a;
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.3);
}
.status-badge.is-down {
    color: #fecaca;
    background: rgba(239, 68, 68, 0.14);
    border-color: rgba(239, 68, 68, 0.32);
}
.status-badge.is-unknown {
    color: #cbd5e1;
    background: rgba(148, 163, 184, 0.12);
    border-color: rgba(148, 163, 184, 0.28);
}
html[data-theme="light"] .status-badge.is-ok {
    color: #166534;
    background: rgba(22, 101, 52, 0.1);
    border-color: rgba(22, 101, 52, 0.28);
}
html[data-theme="light"] .status-badge.is-delayed,
html[data-theme="light"] .status-badge.is-partial {
    color: #92400e;
    background: rgba(146, 64, 14, 0.1);
    border-color: rgba(146, 64, 14, 0.28);
}
html[data-theme="light"] .status-badge.is-down {
    color: #991b1b;
    background: rgba(153, 27, 27, 0.1);
    border-color: rgba(153, 27, 27, 0.28);
}
html[data-theme="light"] .status-badge.is-unknown {
    color: #334155;
    background: rgba(51, 65, 85, 0.08);
    border-color: rgba(51, 65, 85, 0.22);
}
.admin-pill.is-unknown {
    color: #cbd5e1;
    background: rgba(148, 163, 184, 0.12);
    border-color: rgba(148, 163, 184, 0.28);
}
html[data-theme="light"] .admin-pill.is-ok { color: #166534; }
html[data-theme="light"] .admin-pill.is-warn { color: #92400e; }
html[data-theme="light"] .admin-pill.is-err { color: #991b1b; }
html[data-theme="light"] .admin-pill.is-unknown { color: #334155; }

@media (min-width: 720px) {
    .status-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: stretch;
    }

    .status-card-head {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: flex-start;
        gap: 8px 12px;
    }

    .status-card-head h2 {
        flex: 1 1 8rem;
        min-width: 0;
    }

    .status-card-meta-row {
        grid-template-columns: minmax(0, 1fr) auto;
        column-gap: 12px;
        row-gap: 2px;
    }

    .status-card-meta-row dd {
        text-align: right;
        white-space: nowrap;
    }
}

@supports (grid-template-rows: subgrid) {
    @media (min-width: 720px) {
        .status-card {
            grid-template-rows: subgrid;
            grid-row: span 4;
            align-items: stretch;
        }
    }
}

@media (min-width: 1024px) and (max-width: 1219px) {
    .nav-link { padding-left: 8px; padding-right: 8px; font-size: 0.86rem; gap: 5px; }
    .nav-link .nav-icon { display: none; }
}
