/* Randstad. F13: one set of tokens for both themes (light on :root, dark
   under [data-theme="dark"], set by theme-boot.js before the first paint).
   Discipline colours follow the Okabe-Ito palette (colour-blind safe) and
   always come with an icon and a text label. test/theme.test.js checks the
   text/background pairs of both sets for 4.5:1. */

:root {
  --bg: #eef1f5;
  --card: #ffffff;
  --surface: #f4f6f9;
  --fg: #172231;
  --muted: #566272;
  --line: #d6dde6;
  --accent: #1d5fc4;
  --accent-fg: #ffffff;
  --accent-soft: #e4edfb;
  --c-ambulance: #f0c400;  --t-ambulance: #1b1b1b;
  --c-brandweer: #d55e00;  --t-brandweer: #ffffff;  --cb-brandweer: #b85000; /* badge: white text needs >= 4.5:1 */
  --c-politie: #0072b2;    --t-politie: #ffffff;
  --c-knrm: #e69f00;       --t-knrm: #1b1b1b;
  --c-info: #707070;       --t-info: #ffffff;
  --c-unknown: #a0a0a0;    --t-unknown: #1b1b1b;
  --live: #16713a;
  --warn: #8a5300;
  --off: #c62828;
  /* E6 map: the PDOK grey tiles get a cool blue tint by a CSS filter. */
  --map-bg: #e4ecf3;
  --map-tint: grayscale(1) sepia(.22) hue-rotate(172deg) saturate(1.9) brightness(1.03) contrast(.94);
  --sec-line: #2a62a3;
  /* 0.12.1: one brightness for every border line (region, wijk, buurt, Rijnmond area): half the old dimmest (.25). */
  --border-line-opacity: .125;
  --area-label: #183a5e;
  --ch-1: #d4e6f6; --ch-2: #a5cbea; --ch-3: #6aa6d8; --ch-4: #3479bb; --ch-5: #0e4a8a;
  --sec-alpha: .5;
  --heat-filter: none;
  --flash-bg: #f7f8fa; --flash-panel: #ffffff; --flash-fg: #121a26; --flash-muted: #4e5a69; --flash-line: #d6dde6;
  --flash-red: #c62828; --flash-red-fg: #ffffff; --flash-bar: #121a26; --flash-bar-fg: #ffffff;
  /* Shape and type */
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgb(16 32 56 / .06);
  --shadow: 0 4px 14px rgb(16 32 56 / .12);
  --shadow-lg: 0 12px 40px rgb(16 32 56 / .24);
  --lead: 48px;
  --foot-h: 52px;
  --gutter: 16px;
  font-family: var(--font);
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #0e131a;
  --card: #171e28;
  --surface: #1e2733;
  --fg: #e7ecf2;
  --muted: #9ba7b6;
  --line: #2b3542;
  --accent: #6ea8ff;
  --accent-fg: #0e131a;
  --accent-soft: #1c2b42;
  --c-politie: #3a8fd0;
  --t-politie: #0e131a;
  --c-info: #8a8a8a;
  --t-info: #0e131a;
  --live: #3fb950;
  --warn: #e3a008;
  --off: #ff6b63;
  /* Dark map: the tiles are inverted and dimmed; lines, labels and heat are lifted. */
  --map-bg: #132030;
  --map-tint: grayscale(1) invert(.9) sepia(.3) hue-rotate(178deg) saturate(1.7) brightness(.78) contrast(1.05);
  --sec-line: #8cc2f0;
  --area-label: #e3f0fb;
  --ch-1: #1d3a57; --ch-2: #23517d; --ch-3: #2b6aa6; --ch-4: #3a87cc; --ch-5: #6fb2ee;
  --sec-alpha: .55;
  --heat-filter: brightness(1.2) saturate(1.15);
  --flash-bg: #0a0f16; --flash-panel: #141c27; --flash-fg: #eef2f7; --flash-muted: #a3afbe; --flash-line: #2a3646;
  --flash-red: #c62828; --flash-red-fg: #ffffff; --flash-bar: #000000; --flash-bar-fg: #ffffff;
  --shadow-sm: 0 1px 2px rgb(0 0 0 / .3);
  --shadow: 0 4px 14px rgb(0 0 0 / .4);
  --shadow-lg: 0 12px 40px rgb(0 0 0 / .55);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--fg); }
body { line-height: 1.4; }
a { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.skip { position: absolute; left: 8px; top: -48px; z-index: 50; padding: 8px 12px; border-radius: var(--radius-sm); background: var(--card); color: var(--accent); }
.skip:focus { top: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.muted { color: var(--muted); }
.page { padding: var(--gutter); }
.prose { max-width: 42rem; margin: 0 auto; }

/* F13.1: the page is header / panes / footer; only the panes scroll (T12.1.4). */
html, body { height: 100%; overflow: hidden; }
body:has(.panes) { display: flex; flex-direction: column; }
body:not(:has(.panes)) { overflow: auto; } /* about page */

/* Buttons (T13.4.2: one set on the tokens) */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; padding: 4px 16px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--fg); font-weight: 600; cursor: pointer;
  transition: background-color .15s, border-color .15s; }
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.btn.primary:hover { background: color-mix(in srgb, var(--accent) 88%, var(--fg)); }
.btn:disabled { opacity: .6; cursor: default; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 38px; min-height: 38px; padding: 0 8px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--fg); cursor: pointer; }
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }
.link { background: none; border: 0; padding: 4px; color: var(--accent); text-decoration: underline; cursor: pointer; }

/* F13.1 header: logo mark, wordmark, live indicator; settings and language on the right. */
.app-head { flex: none; display: flex; align-items: center; gap: 8px 14px; min-height: 56px; padding: 8px var(--gutter);
  background: var(--card); border-bottom: 1px solid var(--line); position: relative; z-index: 10; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--fg); text-decoration: none; }
.logo { flex: none; display: block; }
.logo-bg { fill: var(--accent); }
.logo-fg { fill: var(--accent-fg); }
.wordmark { margin: 0; font-size: 1.3rem; font-weight: 800; letter-spacing: -.02em; }
.head-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
/* F17.1: the one "Wanneer" control (period of every view, replay). */
.wanneer { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.wanneer[hidden], .wanneer [hidden] { display: none; }
.wanneer-open { min-height: 34px; padding: 4px 12px; display: inline-flex; align-items: center; gap: 6px; }
.wanneer-kicker { font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.wanneer-label { font-weight: 700; white-space: nowrap; }
/* F17.2: the area filter chip next to Wanneer. */
.area-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; max-width: 260px; padding: 2px 4px 2px 12px; border: 1px solid var(--line, currentColor); border-radius: 999px; }
.area-chip[hidden] { display: none; }
.area-chip-kicker { font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.area-chip-name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.area-chip-clear { min-width: 28px; min-height: 28px; border: 0; border-radius: 999px; background: transparent; color: inherit; font-size: 1.1rem; line-height: 1; cursor: pointer; }
.area-chip-clear:hover, .area-chip-clear:focus-visible { background: var(--hover, rgba(127,127,127,.15)); }
.wanneer[data-range="live"] .wanneer-label::before { content: ''; display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: var(--live); vertical-align: middle; }
.wanneer-play, .wanneer-stop { width: 34px; height: 34px; font-size: 1rem; }
.wanneer-play:disabled { opacity: .45; cursor: default; }
.wanneer-replay { display: flex; align-items: center; gap: 6px; }
.wanneer-scrubber { flex: 1 1 140px; min-width: 110px; }
.wanneer-time { min-width: 6.5em; font-size: .85rem; font-variant-numeric: tabular-nums; }
.wanneer-pop { position: absolute; top: calc(100% + 6px); left: 0; z-index: 40; display: grid; gap: 10px; min-width: 250px; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow-sm); }
.wanneer-presets { display: flex; flex-wrap: wrap; gap: 6px; }
.wanneer-presets .seg-btn, .wanneer-presets .seg-btn:first-of-type, .wanneer-presets .seg-btn:last-of-type { border: 1px solid var(--line); border-radius: 999px; }
.wanneer-presets .seg-btn[aria-pressed="true"] { border-color: var(--accent); }
@media (max-width: 760px) { .wanneer-kicker, .wanneer-time { display: none; } .wanneer-scrubber { min-width: 80px; } }
.lang { min-width: 44px; padding: 4px 10px; }

.conn { display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 3px 10px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); font-size: .8rem; font-weight: 600; white-space: nowrap; }
.conn .dot { position: relative; width: 9px; height: 9px; border-radius: 50%; background: var(--warn); }
.conn[data-state="live"] .dot { background: var(--live); }
.conn[data-state="live"] .dot::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: var(--live); animation: live-pulse 1.8s ease-out infinite; }
@keyframes live-pulse { from { transform: scale(1); opacity: .7; } to { transform: scale(2.6); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .conn[data-state="live"] .dot::after { animation: none; } }
.conn[data-state="offline"] .dot { background: var(--off); }
.conn[data-state="offline"] { color: var(--off); }

.notices { flex: none; }
.lag { margin: 0; padding: 6px var(--gutter); border-left: 4px solid var(--warn); background: color-mix(in srgb, var(--warn) 12%, var(--card)); font-size: .85rem; }
.lag[hidden] { display: none; }

/* F13.1 footer: padlock, about, "Vraag het de data". */
.app-foot { flex: none; display: flex; align-items: center; gap: 12px; height: var(--foot-h); box-sizing: border-box; padding: 6px var(--gutter);
  background: var(--card); border-top: 1px solid var(--line); font-size: .8rem; color: var(--muted); position: relative; z-index: 10; }
.foot-about { white-space: nowrap; }
.ask-open { margin-left: auto; white-space: nowrap; }
.lock { gap: 6px; color: var(--muted); }
.lock[data-admin="true"] { color: var(--accent); border-color: var(--accent); font-weight: 600; }
.lock-label[hidden] { display: none; }

/* F13.1: the chat docked at the bottom, above the footer, over the map. */
.ask-dock { position: fixed; z-index: 30; right: var(--gutter); bottom: calc(var(--foot-h) + 10px);
  width: min(560px, calc(100vw - 2 * var(--gutter))); height: min(70dvh, 640px);
  display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; overflow: hidden;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg);
  animation: dock-up .18s ease-out; }
.ask-dock[hidden] { display: none; }
@keyframes dock-up { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .ask-dock { animation: none; } }
.ask-dock [hidden] { display: none !important; } /* .chat-form/.chips set display */
.ask-head { display: flex; align-items: center; gap: 8px; }
.ask-head h2 { margin: 0; font-size: 1.05rem; }
.ask-close { margin-left: auto; font-size: 1.3rem; line-height: 1; }
.chat-state { margin: 0; color: var(--muted); }
.chat-log { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; flex: 1 1 auto; min-height: 0; }
.turn { padding: 8px 12px; border-radius: var(--radius); border: 1px solid var(--line); overflow-wrap: anywhere; white-space: pre-wrap; }
.turn.user { align-self: flex-end; max-width: 85%; background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.turn.assistant { white-space: normal; background: var(--surface); }
.turn.assistant[aria-busy="true"] { white-space: pre-wrap; }
.turn.error { color: var(--warn); border-color: var(--warn); }
.turn .answer p { margin: 0 0 8px; }
.turn .answer ul, .turn .answer ol { margin: 0 0 8px; padding-left: 20px; }
.turn .cost { display: block; color: var(--muted); font-size: .8em; text-align: right; }
.chat-activity { margin: 0; font-size: .9em; }
.chat-suggest .chip { cursor: pointer; text-align: left; }
.chat-form { display: flex; gap: 8px; align-items: flex-end; }
.chat-form textarea { flex: 1; min-width: 0; resize: vertical; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--fg); }
.ask-login { display: flex; flex-direction: column; gap: 8px; }
.ask-login-fields { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.ask-login .field { display: flex; flex-direction: column; gap: 4px; }
.ask-login input { min-height: 38px; padding: 6px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.ask-login .error { color: var(--off); margin: 0; }
.ask-login .notice { color: var(--warn); margin: 0; }

/* Chips, groups, segmented buttons (list filters in the settings modal). */
.group { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.group-label { font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 4px; min-height: 32px; padding: 2px 12px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--fg); cursor: pointer; }
.chip:hover { border-color: var(--accent); }
.chip[aria-pressed="true"] { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.chip .icon { font-size: .85em; }
.chip.cite { padding: 0 6px; min-height: 0; font-size: .85em; cursor: pointer; vertical-align: baseline; }
.chip.cite.news { cursor: default; font-style: italic; text-decoration: none; }
a.chip.cite.news { cursor: pointer; color: var(--accent); }
a.chip.cite.news::after { content: ' ↗'; font-style: normal; }
.seg { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 0; }
.seg .group-label { margin-right: 8px; }
.seg-btn { min-height: 32px; padding: 2px 12px; border: 1px solid var(--line); background: var(--card); color: var(--fg); cursor: pointer; }
.seg-btn:first-of-type { border-radius: 999px 0 0 999px; }
.seg-btn:last-of-type { border-radius: 0 999px 999px 0; border-left: 0; }
.seg-btn[aria-pressed="true"] { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.history { display: flex; flex-wrap: wrap; gap: 8px 12px; }
.history .field { display: inline-flex; flex-direction: column; gap: 2px; }
.history select, .history input, .map-settings select { min-height: 34px; padding: 2px 8px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--card); color: var(--fg); }
.custom { display: inline-flex; gap: 6px 12px; flex-wrap: wrap; }
.custom[hidden] { display: none; }

/* Sidebars (F12.4) on the F13 tokens: a head, a compact search, the cards. */
/* F15.8 (T15.8.3): the sidebar header (title, count, collapse) stays put while the list scrolls under it. */
.side-head { display: flex; align-items: center; gap: 8px; padding: 12px var(--gutter) 6px; position: sticky; top: 0; z-index: 5; background: var(--bg); }
.side-head h2 { margin: 0; font-size: 1.05rem; font-weight: 700; }
.side-head .count { margin: 0; font-size: .8rem; color: var(--muted); }
.side-head .icon-btn { margin-left: auto; min-width: 34px; min-height: 34px; }
.side-search { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 0 var(--gutter) 8px; }
.side-search input { flex: 1 1 auto; min-width: 0; min-height: 36px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); }
main { padding: 0 var(--gutter); }
.empty { padding: 24px; text-align: center; color: var(--muted); background: var(--card); border: 1px dashed var(--line); border-radius: var(--radius); }
.empty[hidden] { display: none; }
.more { display: block; margin: 12px auto; min-height: 36px; padding: 4px 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--fg); cursor: pointer; }
.more[hidden] { display: none; }
.side-rail, .side-min { display: none; }
.side-rail { flex-direction: column; align-items: center; gap: 10px; width: 100%; height: 100%; padding: 14px 0; border: 0; background: var(--card); color: var(--fg); cursor: pointer; }
.side-rail:hover { background: var(--accent-soft); }
.rail-icon { font-size: 1.1rem; }
.rail-title { writing-mode: vertical-rl; font-weight: 700; }
.rail-count { min-width: 22px; padding: 1px 6px; border-radius: 999px; background: var(--accent); color: var(--accent-fg); font-size: .75rem; font-weight: 700; text-align: center; }
.rail-count:empty { display: none; }
.side-min { align-items: center; justify-content: center; min-width: 32px; min-height: 32px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--fg); cursor: pointer; }
.news-head .side-min, .side-head .side-min { margin-left: 0; }
/* F18.1: the Verkenner head (title, collapse, tabs) stays put; the active tab scrolls under it. */
.vk-head { flex-wrap: wrap; padding-bottom: 0; }
.vk-head h2 { margin-right: auto; }
.vk-tabs { display: flex; flex: 1 0 100%; border-bottom: 1px solid var(--line); }
.vk-tab { flex: 1; min-height: 38px; padding: 4px 6px; border: 0; border-bottom: 3px solid transparent; background: none; color: var(--muted); font-weight: 600; cursor: pointer; }
.vk-tab[aria-selected="true"] { color: var(--fg); border-bottom-color: var(--accent); }
.vk-tab-count { font-weight: 500; font-size: .8em; }
/* 0.12.3: the "Filters" section: a full-width header row in the sticky panel-header style (F15.8), collapsed by default. */
.vk-filters-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-height: 40px; padding: 8px var(--gutter); border: 0; border-bottom: 1px solid var(--line); background: var(--bg); color: var(--fg); font: inherit; font-size: 1.05rem; font-weight: 700; text-align: left; cursor: pointer; }
.vk-filters-head:hover { background: var(--accent-soft); }
.vk-filters-head:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.vk-filters-tri { flex: none; color: var(--muted); transition: transform .15s ease; }
.vk-filters-head[aria-expanded="true"] .vk-filters-tri { transform: rotate(180deg); }
@media (prefers-reduced-motion: reduce) { .vk-filters-tri { transition: none; } }
.vk-filters[hidden] { display: none; }
.vk-filters { display: grid; gap: 8px; padding: 10px var(--gutter) 8px; border-bottom: 1px solid var(--line); }
.vk-filters .group-label { display: block; margin-bottom: 4px; font-size: .78rem; color: var(--muted); }
.vk-filters .chip { min-height: 28px; padding: 2px 10px; font-size: .85rem; }
.vk-filters .history { align-items: flex-end; }
.vk-clear { min-height: 34px; }
.vk-clear[hidden] { display: none; }
.side-search .count { margin: 0; font-size: .8rem; color: var(--muted); }
.news-pane { padding-top: 8px; }
.news-attr { margin: 0 var(--gutter) 8px; font-size: .78rem; }
.news-pane .empty { margin: 0 var(--gutter); }

/* F13.4 (T13.4.1): one card for incident rows and news items: a lead tile
   (discipline icon + priority, or the news thumbnail), a meta line, a title,
   the text; pills for region, category, count and match. */
.list, .news-list { list-style: none; margin: 0 0 var(--gutter); padding: 0; display: grid; gap: 8px; }
.news-list { padding: 0 var(--gutter) var(--gutter); }
.card { display: grid; grid-template-columns: var(--lead) minmax(0, 1fr); gap: 4px 12px; align-items: start; padding: 10px 12px;
  background: var(--card); color: var(--fg); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm);
  transition: border-color .15s, box-shadow .15s; }
.card:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); box-shadow: var(--shadow); }
.card.selected { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent); }
.card[data-incident-id], .news-card { cursor: pointer; }
.card-lead { width: var(--lead); height: var(--lead); border-radius: var(--radius-sm); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; font-weight: 700; }
.lead-icon { font-size: 1.05rem; line-height: 1; }
.card-lead .prio { font-size: .7rem; line-height: 1.1; letter-spacing: .02em; }
.card-body { min-width: 0; display: grid; gap: 4px; }
.card-body > p { margin: 0; }
.card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; margin: 0; font-size: .78rem; color: var(--muted); }
.clock { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--fg); }
.age, .news-age, .news-src { color: var(--muted); }
.disc { font-weight: 600; }
.pill { display: inline-flex; align-items: center; padding: 0 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--muted); font-size: .72rem; font-weight: 600; line-height: 1.6; }
.also { font-size: .75rem; color: var(--muted); font-style: italic; }
.incident, .news-title { margin: 0; font-size: .95rem; font-weight: 650; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; overflow-wrap: anywhere; }
.news-title a { color: var(--fg); text-decoration: none; }
.news-title a:hover { color: var(--accent); text-decoration: underline; }
.text { margin: 0; font-size: .9rem; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; white-space: pre-wrap; }
.units summary, .earlier summary { cursor: pointer; font-size: .8rem; color: var(--muted); }
.caps { margin: 4px 0 0; padding-left: 18px; font-size: .82rem; }
.caps code { font-variant-numeric: tabular-nums; }
.cap-label { color: var(--muted); }
.earlier-list { margin: 4px 0 0; padding-left: 18px; display: grid; gap: 4px; }
.earlier-list .text { font-size: .82rem; }
/* Badge colours: the lead tile, map card badges. */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 999px; font-size: .78rem; font-weight: 600; }
.b-ambulance { background: var(--c-ambulance); color: var(--t-ambulance); }
.b-brandweer { background: var(--cb-brandweer, var(--c-brandweer)); color: var(--t-brandweer); }
.b-politie { background: var(--c-politie); color: var(--t-politie); }
.b-knrm { background: var(--c-knrm); color: var(--t-knrm); }
.b-info { background: var(--c-info); color: var(--t-info); }
.b-unknown { background: var(--c-unknown); color: var(--t-unknown); }
.prio { font-size: .78rem; font-weight: 700; }
.card-meta .prio, .ds-meta .prio { padding: 0 6px; border: 1px solid currentColor; border-radius: 999px; }
.prio.u1 { text-decoration: underline; text-underline-offset: 2px; }
/* T10.3: older rows are dimmed by colour, not opacity, so muted text keeps 4.5:1. */
.row.old { color: color-mix(in srgb, var(--fg) 80%, var(--bg)); }
.row.fresh { animation: slide-in .45s ease-out; }
@keyframes slide-in { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .row.fresh { animation: none; } }
.row.news-linked { box-shadow: inset 0 0 0 2px var(--live); }
/* News card: the thumbnail is the lead tile. */
.news-thumb { width: var(--lead); height: var(--lead); object-fit: cover; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); }
.news-thumb.empty { display: block; }
.news-links { display: flex; flex-wrap: wrap; gap: 4px; font-size: .78rem; }
.news-chips { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.news-chip { color: var(--fg); }
.news-more { font-size: .78rem; }
.news-more > summary { display: inline-flex; cursor: pointer; list-style: none; }
.news-more > summary::-webkit-details-marker { display: none; }
.news-more[open] > summary { border-color: var(--accent); color: var(--accent); }
.news-more-list { list-style: none; margin: 4px 0 0; padding: 0 0 0 8px; border-left: 3px solid var(--line); display: grid; gap: 4px; }
.news-more-list a { color: var(--fg); }
.news-icon { display: inline-flex; align-items: center; gap: 2px; min-height: 24px; padding: 0 6px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--fg); font-size: .78rem; line-height: 1; cursor: pointer; }
.news-icon:hover, .news-icon:focus-visible { border-color: var(--accent); }
.news-icon-count { font-weight: 700; }
/* F15.7: the Journaal icon and its one-item modal. */
.journaal-icon { display: inline-flex; align-items: center; min-height: 24px; padding: 0 6px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--fg); font-size: .78rem; line-height: 1; cursor: pointer; }
.journaal-icon:hover, .journaal-icon:focus-visible { border-color: var(--accent); }
.jitem-photo { margin: 0 0 10px; }
.jitem-photo img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius-sm); background: var(--line); }
.jitem-photo figcaption { font-size: .75rem; color: var(--muted); margin-top: 4px; }
.jitem-lower { display: flex; flex-wrap: wrap; align-items: stretch; margin: 0 44px 10px 0; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.jitem-strip { background: var(--svc); color: var(--svc-fg); font-weight: 800; text-transform: uppercase; letter-spacing: .05em; padding: 4px 10px; font-size: .8rem; }
.jitem-where { padding: 4px 10px; font-size: .85rem; align-self: center; }
.jitem-headline { margin: 0 0 8px; font-size: 1.05rem; font-weight: 700; }
.ds-jitem .jitem-lower { margin-right: 0; }
.jitem-text { margin: 0 0 10px; line-height: 1.5; }
.jitem-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; }
.jitem-chips .chip { text-decoration: none; color: var(--fg); }
.jitem-chips .chip.muted { color: var(--muted); cursor: default; }
.jitem-ai { margin: 0 0 8px; font-size: .8rem; color: var(--muted); }
.news-inc { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 2px 4px 2px 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--fg); font-size: .78rem; text-align: left; cursor: pointer; }
.news-inc:hover { border-color: var(--accent); }
.news-pct { color: var(--accent); background: var(--card); }
.news-inc.llm .news-pct { color: var(--live); }

/* E6/F12.4 layout. Phone: tabs; desktop: F18.1 one left panel (the Verkenner), the map takes the rest. */
.tabs { display: none; }
.panes { flex: 1 1 auto; min-height: 0; position: relative; }
.map-pane { display: none; }
.vk-panel[hidden] { display: none; }
@media (min-width: 960px) {
  .panes { display: grid; grid-template-columns: var(--vk-w, 400px) minmax(0, 1fr) var(--ds-w, 0px); grid-template-rows: minmax(0, 1fr); }
  .panes[data-dossier="open"] { --ds-w: 380px; }
  .dossier { grid-column: 3; grid-row: 1; min-width: 0; height: 100%; overflow-y: auto; overscroll-behavior: contain; border-left: 1px solid var(--line); background: var(--bg); }
  .panes[data-vk-min="true"] { --vk-w: 44px; }
  .verkenner, .map-pane { grid-row: 1; min-width: 0; height: 100%; }
  .verkenner { grid-column: 1; overflow-y: auto; overscroll-behavior: contain; border-right: 1px solid var(--line); background: var(--bg); }
  .map-pane { grid-column: 2; display: block; position: relative; }
  .side[data-min="true"] { overflow: hidden; }
  .side[data-min="true"] > :not(.side-rail) { display: none !important; }
  .side[data-min="true"] > .side-rail { display: flex; }
  .side .side-min { display: inline-flex; }
}
@media (max-width: 959px) {
  .tabs { flex: none; display: flex; background: var(--card); border-bottom: 1px solid var(--line); }
  .tab { flex: 1; min-height: 44px; border: 0; border-bottom: 3px solid transparent; background: none; color: var(--muted); font-weight: 600; cursor: pointer; }
  .tab[aria-selected="true"] { color: var(--fg); border-bottom-color: var(--accent); }
  .panes > * { height: 100%; }
  .verkenner { overflow-y: auto; overscroll-behavior: contain; }
  .panes[data-tab="map"] .verkenner { display: none; }
  .panes[data-tab="map"] .map-pane { display: block; }
  .app-foot { gap: 8px; }
  .wordmark { font-size: 1.15rem; }
  .conn { padding: 2px 8px; }
}
@media (max-width: 430px) {
  .foot-about { display: none; }
  .head-actions { gap: 6px; }
}

/* E6 map (F6.1–F6.3) */
.map { position: relative; width: 100%; height: 100%; overflow: hidden; background: var(--map-bg); touch-action: none; user-select: none; -webkit-user-select: none; cursor: grab; }
.map.dragging { cursor: grabbing; }
.map:focus-visible { outline-offset: -3px; }
.map-tiles { position: absolute; inset: 0; filter: var(--map-tint); }
.tile-level { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; }
.tile { position: absolute; width: 256px; height: 256px; max-width: none; pointer-events: none; }
.tile[data-state="failed"] { visibility: hidden; }
.map-overlay { position: absolute; left: 0; top: 0; overflow: visible; }
.mk:focus-visible { outline: none; }
.mk:focus-visible .halo { stroke: var(--accent); stroke-opacity: 1; stroke-width: 5; }

.sec { fill: transparent; stroke: none; fill-opacity: var(--sec-alpha); }
.sec.c1 { fill: var(--ch-1); } .sec.c2 { fill: var(--ch-2); } .sec.c3 { fill: var(--ch-3); }
.sec.c4 { fill: var(--ch-4); } .sec.c5 { fill: var(--ch-5); }
.lvl-buurt .sec { stroke: var(--sec-line); stroke-opacity: calc(var(--border-line-opacity) * var(--border-k, 1)); stroke-width: .75; vector-effect: non-scaling-stroke; }
.sec:hover { stroke: var(--sec-line); stroke-opacity: .9; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.sec.sel { stroke: var(--accent); stroke-opacity: 1; stroke-width: 2.5; vector-effect: non-scaling-stroke; fill-opacity: calc(var(--sec-alpha) + .15); }
/* Region lines at half weight (operator, 0.4.0): widths keep area > wijk > buurt apart;
   0.12.1: all at one stroke colour and opacity (--border-line-opacity). */
.wijk-line, .area-line { fill: none; stroke: var(--sec-line); vector-effect: non-scaling-stroke; pointer-events: none; stroke-linejoin: round; }
.wijk-line, .area-line { stroke-opacity: calc(var(--border-line-opacity) * var(--border-k, 1)); }
.wijk-line { stroke-width: 1; }
.lvl-buurt .wijk-line { stroke-width: 1.5; }
.area-line { stroke-width: 2.25; }
/* F12.4 (T12.4.4): "Regiogrenzen uit" hides the border lines (a selection stays visible). */
.map.no-borders .wijk-line:not(.sel), .map.no-borders .area-line { display: none; }
.map.no-borders .lvl-buurt .sec:not(.sel):not(:hover) { stroke: none; }
.wijk-line.sel { stroke: var(--accent); stroke-opacity: 1; stroke-width: 2.5; }
.area-label { font: 600 12px var(--font); fill: var(--area-label); paint-order: stroke; stroke: var(--map-bg); stroke-width: 3px; stroke-linejoin: round; pointer-events: none; }

.mk { cursor: pointer; --mk-c: var(--c-info); }
.mk.d-ambulance { --mk-c: var(--c-ambulance); }
.mk.d-brandweer { --mk-c: var(--c-brandweer); }
.mk.d-politie { --mk-c: var(--c-politie); }
.mk .halo { fill: none; stroke: rgba(12, 32, 56, .38); stroke-width: 3.5; }
.mk .ring { fill: color-mix(in srgb, var(--mk-c) 35%, transparent); stroke: #fff; stroke-width: 2.25; }
.mk .ring.dashed { fill: color-mix(in srgb, var(--mk-c) 18%, transparent); stroke-dasharray: 3 2.5; }
.mk .needle { fill: var(--mk-c); stroke: rgba(12, 32, 56, .45); stroke-width: .6; }
.mk.sel .halo { stroke: var(--accent); stroke-opacity: .9; stroke-width: 5; }
.mk .pulse-ring { fill: none; stroke: #fff; stroke-width: 2; transform-box: fill-box; transform-origin: center; animation: mk-pulse 1.6s ease-out infinite; pointer-events: none; }
@keyframes mk-pulse { from { transform: scale(1); opacity: .9; } to { transform: scale(2.6); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .mk .pulse-ring { display: none; } }
.mk-cluster { cursor: zoom-in; }
.mk-cluster .halo { fill: none; stroke: rgba(12, 32, 56, .3); stroke-width: 3; }
.mk-cluster .badge { fill: var(--accent); stroke: #fff; stroke-width: 2; }
.mk-count { fill: var(--accent-fg); font: 700 11px var(--font); pointer-events: none; }

.map-panel { position: absolute; top: 10px; left: 10px; right: 96px; z-index: 5; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; pointer-events: none; }
.map-panel > * { pointer-events: auto; }
.map-chip { min-height: 30px; padding: 2px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--fg); font-size: .85rem; cursor: pointer; }
.map-legend, .map-selected { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 0; padding: 4px 10px; border-radius: var(--radius-sm); background: color-mix(in srgb, var(--card) 92%, transparent); box-shadow: var(--shadow-sm); font-size: .8rem; }
.map-selected[hidden], .map-legend[hidden] { display: none; }
.legend-none { color: var(--muted); }
.swatch { display: inline-block; width: 12px; height: 12px; margin-right: 4px; border-radius: 3px; vertical-align: -1px; border: 1px solid color-mix(in srgb, var(--sec-line) 40%, transparent); }
.swatch.c1 { background: var(--ch-1); } .swatch.c2 { background: var(--ch-2); } .swatch.c3 { background: var(--ch-3); }
.swatch.c4 { background: var(--ch-4); } .swatch.c5 { background: var(--ch-5); }
.map-zoom { position: absolute; top: 10px; right: 10px; z-index: 5; display: flex; flex-direction: column; gap: 4px; }
.map-btn { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--card); color: var(--fg); font-size: 1.25rem; line-height: 1; cursor: pointer; box-shadow: var(--shadow-sm); }
.map-btn:hover { border-color: var(--accent); color: var(--accent); }
.map-attr { position: absolute; right: 0; bottom: 0; z-index: 5; max-width: 100%; margin: 0; padding: 2px 6px; font-size: .7rem; color: var(--muted); background: color-mix(in srgb, var(--card) 85%, transparent); }
.map-tip { position: absolute; left: 0; top: 0; z-index: 6; max-width: 260px; padding: 4px 8px; border-radius: 6px; background: var(--fg); color: var(--bg); font-size: .8rem; pointer-events: none; }
.map-tip[hidden] { display: none; }
/* T12.4.2: news thumbnails on the map (squares; incidents are rings). */
.nw { cursor: pointer; }
.nw-frame { fill: var(--card); stroke: #fff; stroke-width: 2; filter: drop-shadow(0 1px 2px rgb(0 0 0 / .4)); }
.nw.sel .nw-frame { stroke: var(--accent); stroke-width: 3; }
.nw-leader { stroke: var(--fg); stroke-opacity: .6; stroke-width: 1; }
.nw-glyph { fill: var(--muted); font: 700 13px var(--font); pointer-events: none; }
.nw-badge { fill: var(--accent); stroke: #fff; stroke-width: 1.5; }
.nw-cluster { cursor: zoom-in; }
.map.no-news [data-testid="map-news"] { display: none; }
/* E6 F6.4: replay bar; F12.1b: the heat canvas (the choropleth fades under it). */
.map-heat-canvas { position: absolute; left: 0; top: 0; pointer-events: none; filter: var(--heat-filter); }
.map.heat-on .sec:not(.sel) { fill-opacity: calc(var(--sec-alpha) * .35); }
.map-scrubber { flex: 1 1 160px; min-width: 120px; accent-color: var(--accent); }
.map-cog { position: absolute; top: 10px; right: 52px; z-index: 5; font-size: 1.1rem; }
/* F16.1: the layer switcher (button left of the cog, popout below it; phone: bottom sheet). */
.map-layers-btn { position: absolute; top: 10px; right: 94px; z-index: 5; display: inline-grid; place-items: center; }
.map.layers-open .map-layers-btn { border-color: var(--accent); color: var(--accent); }
.map-layers { position: absolute; top: 56px; right: 10px; z-index: 8; width: min(300px, calc(100% - 20px)); max-height: calc(100% - 66px); overflow: auto;
  padding: 10px 14px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); color: var(--fg); box-shadow: var(--shadow-lg); }
.map-layers[hidden] { display: none; }
.map-layers-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.map-layers-head h2 { margin: 0; font-size: 1rem; }
.map-layers-close { min-width: 32px; min-height: 32px; font-size: 1.3rem; line-height: 1; }
.map-layers-group { margin: 8px 0 0; padding: 0; border: 0; }
.map-layers-group .group-label { margin: 0 0 4px; padding: 0; }
.map-layers .opt { display: flex; align-items: center; gap: 8px; min-height: 36px; }
.map-layers .opt:has(input:disabled) { color: var(--muted); }
.map-layers-opt { align-items: flex-start; padding: 4px 0; }
.map-layers-opt input { margin-top: 3px; }
.map-layers-text { display: flex; flex-direction: column; }
.map-layers-name { font-weight: 600; }
.map-layers-hint { color: var(--muted); font-size: .8rem; }
/* F16.2 route mode: the vehicle panel on the left of the map (phone: bottom sheet). */
.map-route-panel { position: absolute; top: 10px; left: 10px; bottom: 30px; z-index: 6; width: min(340px, calc(100% - 70px)); display: flex; flex-direction: column; gap: 8px;
  padding: 10px 12px; overflow: auto; overscroll-behavior: contain; border: 1px solid var(--line); border-radius: var(--radius);
  background: color-mix(in srgb, var(--card) 96%, transparent); box-shadow: var(--shadow-sm); font-size: .88rem; }
.map-route-panel[hidden] { display: none; }
.map-route-panel h2 { margin: 0; font-size: 1rem; }
/* F18.1: on a desktop the route panel is the Verkenner's Voertuigen tab, not a card on the map. */
.vk-panel .map-route-panel { position: static; width: auto; padding: 10px var(--gutter) 14px; overflow: visible; border: 0; border-radius: 0; background: none; box-shadow: none; }
.vk-panel .map-route-panel > h2 { display: none; }
.map-route-panel h3 { margin: 6px 0 4px; font-size: .85rem; color: var(--muted); font-weight: 600; }
.rt-controls { display: flex; gap: 6px; }
.rt-controls input { min-height: 34px; min-width: 0; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--fg); }
.rt-search { flex: 1 1 auto; }
.rt-date { flex: 0 0 auto; }
.rt-note, .rt-police { margin: 0; color: var(--muted); font-size: .8rem; }
.rt-note:empty { display: none; }
.rt-units > summary { cursor: pointer; font-weight: 600; min-height: 28px; }
.rt-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.rt-unit { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 34px; padding: 4px 8px; border: 1px solid transparent; border-radius: var(--radius-sm);
  background: none; color: var(--fg); text-align: left; cursor: pointer; }
.rt-unit:hover, .rt-unit[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.rt-unit-name { font-weight: 700; font-variant-numeric: tabular-nums; }
.rt-unit-calls { color: var(--muted); }
.rt-unit-a1 { margin-left: auto; }
.rt-detail { display: flex; flex-direction: column; gap: 6px; }
.rt-detail[hidden] { display: none; }
.rt-detail-head { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.rt-detail-head h3 { margin: 0; font-size: 1rem; color: var(--fg); font-weight: 700; }
.rt-figures { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 10px; margin: 0; }
.rt-fig dt { color: var(--muted); font-size: .75rem; }
.rt-fig dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.rt-fig:last-child:nth-child(odd) { grid-column: 1 / -1; }
.rt-timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.rt-row { border-radius: var(--radius-sm); }
.rt-row.sel { background: var(--accent-soft); }
.rt-row-btn { display: grid; grid-template-columns: 26px 3em 2.4em minmax(0, 1fr) auto; align-items: center; gap: 6px; width: 100%; min-height: 34px; padding: 3px 6px;
  border: 0; background: none; color: var(--fg); text-align: left; cursor: pointer; font-size: .82rem; }
.rt-time { font-variant-numeric: tabular-nums; }
.rt-what { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rt-gap { color: var(--muted); font-size: .75rem; white-space: nowrap; }
.rt-open { margin: 2px 0 6px 38px; }
.rt-num { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; color: #fff; font-size: .72rem; font-weight: 700; background: var(--rt-c, #5f6b78); }
.rt-num.u1, .rt-stop.u1 { --rt-c: #c62828; }
.rt-num.u2, .rt-stop.u2 { --rt-c: #b35900; }
.rt-num.u3, .rt-stop.u3 { --rt-c: #2a6db5; }
.rt-num.ux, .rt-stop.ux { --rt-c: #5f6b78; }
.route-layer .rt-line { stroke: var(--fg); stroke-opacity: .7; stroke-width: 2.5; stroke-dasharray: 7 6; stroke-linecap: round; }
.rt-stop { cursor: pointer; --rt-c: #5f6b78; }
.rt-stop .rt-dot { fill: var(--rt-c); stroke: #fff; stroke-width: 2.5; }
.rt-stop .rt-mark { fill: none; stroke: var(--fg); stroke-width: 2; }
.rt-stop .rt-n { fill: #fff; font-size: 11px; font-weight: 700; pointer-events: none; }
.rt-stop.sel .rt-dot { stroke: var(--accent); stroke-width: 4; }
.rt-stop:focus-visible { outline: none; }
.rt-stop:focus-visible .rt-dot { stroke: var(--accent); stroke-width: 4; }
.route-legend { position: absolute; right: 10px; bottom: 26px; z-index: 5; display: flex; align-items: center; gap: 6px; margin: 0; padding: 3px 10px; border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--card) 92%, transparent); box-shadow: var(--shadow-sm); font-size: .78rem; }
.route-legend[hidden] { display: none; }
.route-legend-line { display: inline-block; width: 26px; border-top: 2.5px dashed var(--fg); opacity: .7; }
.map[data-mode="route"] .map-panel { display: none; }
.map:not([data-mode="route"]) .route-layer, .map:not([data-mode="route"]) .route-legend { display: none; }
.map[data-mode="route"] [data-testid="map-markers"] { display: none; }
.unit-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.unit-chip { min-height: 28px; padding: 1px 9px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--fg); font-size: .78rem;
  font-variant-numeric: tabular-nums; cursor: pointer; }
.unit-chip:hover { border-color: var(--accent); color: var(--accent); }
.map[data-mode="route"] [data-testid="map-news"] { display: none; }
/* 0.12.1: "Alleen kaart": tiles and border lines only; no markers, news, heat, area shading, labels or legend. */
.map[data-mode="bare"] [data-testid="map-markers"], .map[data-mode="bare"] [data-testid="map-news"],
.map[data-mode="bare"] .area-labels, .map[data-mode="bare"] .map-panel { display: none; }
.map[data-mode="bare"] .sec { fill-opacity: 0; }
@media (max-width: 760px) {
  .map-layers { position: fixed; top: auto; right: 0; bottom: 0; left: 0; width: auto; max-height: 70dvh; z-index: 60;
    border-radius: var(--radius) var(--radius) 0 0; padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
  .map-route-panel { top: auto; right: 0; bottom: 0; left: 0; width: auto; max-height: 48dvh; border-radius: var(--radius) var(--radius) 0 0;
    padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px)); }
  .route-legend { top: 10px; bottom: auto; left: 10px; right: auto; }
}
.map.no-labels .area-labels { display: none; }

/* Modals (E5 admin, F12.1/F13.2 settings) on the same tokens. */
.modal { width: min(440px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; background: var(--card); color: var(--fg); box-shadow: var(--shadow-lg); }
.modal.wide, .modal.map-settings { width: min(720px, calc(100vw - 32px)); }
.modal::backdrop { background: rgb(8 16 28 / .5); }
.modal h2 { margin: 0 0 12px; font-size: 1.2rem; }
.modal h3 { margin: 16px 0 6px; font-size: 1rem; }
.modal .field { display: flex; flex-direction: column; gap: 4px; }
.modal input[type="password"] { min-height: 40px; padding: 6px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.modal .error { color: var(--off); margin: 8px 0 0; }
.modal .notice { color: var(--warn); margin: 0 0 12px; }
.modal .actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.plain { list-style: none; padding: 0; margin: 0; font-size: .9rem; }
.plain li { padding: 2px 0; overflow-wrap: anywhere; }
.unparsed li { border-bottom: 1px solid var(--line); padding: 4px 0; }
/* F13.2: theme toggle and the sub-tabs "Kaart" / "Meldingen". */
.theme-row { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; }
.theme-icon { display: inline-flex; }
.settings-tabs { display: flex; gap: 4px; margin: 0 0 12px; padding: 4px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
.settings-tab { flex: 1; min-height: 36px; border: 0; border-radius: 999px; background: none; color: var(--muted); font-weight: 700; cursor: pointer; }
.settings-tab[aria-selected="true"] { background: var(--card); color: var(--fg); box-shadow: var(--shadow-sm); }
.settings-panel[hidden] { display: none; }
.map-settings fieldset { border: 1px solid var(--line); border-radius: var(--radius-sm); margin: 0 0 10px; padding: 6px 12px 10px; }
.map-settings legend { font-weight: 700; padding: 0 4px; }
.map-settings .opt { display: inline-flex; align-items: center; gap: 4px; min-height: 32px; margin-right: 12px; }
.map-settings .opt:has(input:disabled) { color: var(--muted); }
.map-settings .map-settings-switch { display: flex; margin: 8px 0 0; font-weight: 600; }
.map-settings input[type="radio"], .map-settings input[type="checkbox"] { accent-color: var(--accent); }

/* F15.3 "112 Flash": the daily bulletin as a full-screen news-flash overlay */
.flash-opener { min-height: 34px; padding: 4px 12px; font-weight: 700; }
/* F15.9 (T15.9.2): grey until a Journaal is known, green when there is one; never red. */
.flash-opener-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.flash-opener[data-report="on"] .flash-opener-dot { background: var(--live); }
/* F15.9 (T15.9.1): "De koppen" strip under the header. 0.12.3: a seamless
   ticker (the list holds 2k copies of the headlines and moves by -50%, ~50 px/s,
   set by koppen.js); paused on hover/focus; static and hand-scrollable with
   prefers-reduced-motion. */
.koppen { flex: none; display: flex; align-items: center; gap: 10px; min-width: 0; padding: 4px var(--gutter); border-bottom: 1px solid var(--line); background: var(--bg); }
.koppen[hidden] { display: none; }
.koppen-tag { flex: none; font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.koppen-view { flex: 1; min-width: 0; overflow: hidden; }
.koppen-list { display: flex; width: max-content; margin: 0; padding: 2px 0; list-style: none; }
.koppen-list > li { flex: none; padding-right: 6px; }
.koppen-list.moving { animation: koppen-tick var(--koppen-dur, 40s) linear infinite; }
.koppen:hover .koppen-list, .koppen:focus-within .koppen-list { animation-play-state: paused; }
@keyframes koppen-tick { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .koppen-list.moving { animation: none; }
  .koppen-view { overflow-x: auto; scrollbar-width: thin; overscroll-behavior-x: contain; }
}
.koppen-item { display: inline-flex; align-items: center; gap: 6px; max-width: 32em; min-height: 30px; padding: 3px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); color: var(--fg); font: inherit; font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.koppen-item:hover { border-color: var(--accent); }
.koppen-item .flash-swatch { flex: none; }
.map-settings .page-switch { margin: 0 0 10px; }
html.flash-on, html.flash-on body { overflow: hidden; }
/* 0.12.3: the Journaal is a view below the header (journaal.js sets `top` to the
   header's bottom); the header stays above it, its popover included, and the
   Journaal replaces the koppen strip (it has its own headlines and ticker). */
html.flash-on .app-head { z-index: 1001; }
html.flash-on .koppen { visibility: hidden; }
.flash-opener-map { display: none; }
.flash-opener[data-view="journaal"] { gap: 6px; }
.flash-opener[data-view="journaal"] .flash-opener-map { display: block; }
.flash-opener[data-view="journaal"] .flash-opener-icon, .flash-opener[data-view="journaal"] .flash-opener-dot { display: none; }
.flash { position: fixed; inset: 0; z-index: 1000; display: grid; grid-template-rows: auto 1fr auto auto; background: var(--flash-bg); color: var(--flash-fg); font-family: var(--font); }
.flash[hidden] { display: none; }
.flash-top { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: var(--flash-bar); color: var(--flash-bar-fg); min-width: 0; }
.flash-badge { background: var(--flash-red); color: var(--flash-red-fg); font-weight: 800; letter-spacing: .06em; padding: 4px 10px; border-radius: 4px; white-space: nowrap; }
.flash-date { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.flash-updated { font-size: .9rem; opacity: .85; white-space: nowrap; }
.flash-new { display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 4px; font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; background: var(--flash-red); color: var(--flash-red-fg); vertical-align: middle; }
.flash-lower .flash-new { align-self: center; }
.flash-count { font-variant-numeric: tabular-nums; opacity: .85; white-space: nowrap; }
.flash-spacer { flex: 1; }
.flash-tool, .flash-close { background: transparent; color: inherit; border: 1px solid rgb(255 255 255 / .35); border-radius: var(--radius-sm); min-height: 34px; padding: 2px 10px; font: inherit; cursor: pointer; white-space: nowrap; }
.flash-tool[aria-pressed="true"] { background: var(--flash-red); border-color: var(--flash-red); color: var(--flash-red-fg); }
.flash-close { font-size: 1.4rem; line-height: 1; min-width: 38px; }
.flash-stage { overflow-y: auto; padding: 16px; outline: none; }
.flash-page { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 11fr) minmax(0, 9fr); gap: 20px; align-items: start; }
.flash-none { display: block; max-width: 640px; padding-top: 10vh; text-align: center; }
.flash-empty { text-align: center; color: var(--flash-muted); padding-top: 10vh; }
.flash-media { position: relative; margin: 0; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--radius); background: var(--map-bg); }
.flash-media > img { width: 100%; height: 100%; object-fit: cover; display: block; }
.flash-media figcaption { position: absolute; right: 8px; bottom: 8px; background: rgb(0 0 0 / .66); color: #ffffff; font-size: .75rem; padding: 2px 8px; border-radius: 4px; }
.flash-map { position: absolute; inset: 0; }
.flash-tile { position: absolute; filter: var(--map-tint); }
.flash-marker { position: absolute; left: 50%; top: 50%; width: 24px; height: 24px; transform: translate(-50%, -50%); border-radius: 50%; background: var(--svc, var(--c-unknown)); border: 3px solid #ffffff; box-shadow: 0 0 0 6px color-mix(in srgb, var(--svc, var(--c-unknown)) 35%, transparent), var(--shadow); }
.svc-ambulance { --svc: var(--c-ambulance); --svc-fg: var(--t-ambulance); }
.svc-brandweer { --svc: var(--cb-brandweer); --svc-fg: var(--t-brandweer); }
.svc-politie { --svc: var(--c-politie); --svc-fg: var(--t-politie); }
.svc-knrm { --svc: var(--c-knrm); --svc-fg: var(--t-knrm); }
.svc-info { --svc: var(--c-info); --svc-fg: var(--t-info); }
.svc-unknown { --svc: var(--c-unknown); --svc-fg: var(--t-unknown); }
.flash-body { min-width: 0; }
.flash-kicker { margin: 0 0 6px; color: var(--flash-muted); font-weight: 600; }
.flash-headline { margin: 4px 0 10px; font-size: clamp(1.35rem, 2.6vw, 2.1rem); line-height: 1.15; }
.flash-text { margin: 0 0 14px; font-size: 1.05rem; line-height: 1.5; }
.flash-lower { display: flex; align-items: stretch; flex-wrap: wrap; border-radius: var(--radius-sm); overflow: hidden; background: var(--flash-panel); border: 1px solid var(--flash-line); }
.flash-strip { background: var(--svc); color: var(--svc-fg); font-weight: 800; text-transform: uppercase; letter-spacing: .05em; padding: 6px 12px; }
.flash-where { padding: 6px 12px; font-weight: 600; }
.flash-counters { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.flash-counter { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--flash-panel); border: 1px solid var(--flash-line); font-weight: 600; }
.flash-counter.total { background: var(--flash-red); border-color: var(--flash-red); color: var(--flash-red-fg); }
.flash-swatch { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--svc, var(--c-unknown)); flex: none; }
.flash-tool-icon { display: none; }
.flash-play .i-pause, .flash-play[aria-pressed="true"] .i-play { display: none; }
.flash-play[aria-pressed="true"] .i-pause { display: inline; }
/* 0.12.3: "De koppen (n)" on the summary page, collapsed on every open. */
.flash-heads-box > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; min-height: 36px; }
.flash-heads-box > summary::-webkit-details-marker { display: none; }
.flash-heads-box > summary::before { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform .15s; }
.flash-heads-box[open] > summary::before { transform: rotate(45deg); }
.flash-heads-box > summary:focus-visible { outline: 2px solid var(--flash-red); outline-offset: 2px; }
.flash-heads-box > .flash-heads { margin-top: 6px; }
.flash-sub { margin: 6px 0; font-size: .95rem; text-transform: uppercase; letter-spacing: .05em; color: var(--flash-muted); }
.flash-heads { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 4px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.flash-foot { grid-column: 1 / -1; min-width: 0; } /* F15.9 (T15.9.4): full width under the summary */
.flash-head { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; background: var(--flash-panel); color: var(--flash-fg); border: 1px solid var(--flash-line); border-radius: var(--radius-sm); padding: 8px 10px; font: inherit; cursor: pointer; }
.flash-head:hover { border-color: var(--flash-red); }
.flash-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.flash-chips .chip { display: inline-block; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--flash-line); background: var(--flash-panel); color: var(--flash-fg); font-size: .85rem; text-decoration: none; }
.flash-chips .chip.muted { color: var(--flash-muted); }
.flash-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.flash-ai { margin: 8px 0 0; font-size: .8rem; color: var(--flash-muted); }
.flash-nav { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 6px 12px; }
.flash-nav[hidden] { display: none; }
.flash-arrow { min-width: 44px; min-height: 40px; border-radius: var(--radius-sm); border: 1px solid var(--flash-line); background: var(--flash-panel); color: var(--flash-fg); font-size: 1.5rem; line-height: 1; cursor: pointer; }
.flash-arrow:disabled { opacity: .4; cursor: default; }
.flash-dots { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; max-width: 70vw; }
.flash-dot { width: 22px; height: 22px; padding: 0; border: 0; background: transparent; cursor: pointer; position: relative; }
.flash-dot::after { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: var(--flash-line); }
.flash-dot[aria-current="page"]::after { background: var(--flash-red); inset: 5px; }
.flash-ticker { display: flex; align-items: center; overflow: hidden; background: var(--flash-bar); color: var(--flash-bar-fg); min-height: 34px; }
.flash-ticker-tag { position: relative; z-index: 1; flex: none; background: var(--flash-red); color: var(--flash-red-fg); font-weight: 800; padding: 7px 10px; text-transform: uppercase; font-size: .8rem; letter-spacing: .05em; }
.flash-ticker-track { display: inline-flex; white-space: nowrap; gap: 32px; padding-left: 16px; }
.flash-ticker-track.moving { animation: flash-tick 90s linear infinite; }
.flash-ticker-item::before { content: "■ "; color: var(--flash-red); }
@keyframes flash-tick { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .flash-ticker-track.moving { animation: none; } .flash-ticker { overflow-x: auto; } }
@media (max-width: 760px) {
  .flash-page { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .flash-stage { padding: 10px; }
  .flash-top { gap: 6px; padding: 6px 8px; }
  .flash-tool { padding: 2px 6px; font-size: .85rem; }
}
@media (max-width: 430px) {
  .flash-opener { padding: 4px 8px; }
  .koppen { gap: 6px; padding: 3px 8px; }
  .koppen-tag { display: none; }
  .koppen-item { max-width: 80vw; }
  .flash-date { display: none; }
  .flash-updated { font-size: .8rem; }
  .flash-badge { padding: 3px 6px; font-size: .85rem; }
}

/* F18.3: the Dossier (right column on a desktop; a bottom sheet over the page on a phone until E20). */
.dossier[hidden] { display: none; }
.ds-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--line); background: var(--bg); }
.ds-kicker { flex: 1 1 auto; margin: 0; font-size: .8rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.ds-close { width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--fg); font-size: 1.2rem; line-height: 1; cursor: pointer; }
.ds-close:hover, .ds-close:focus-visible { border-color: var(--accent); }
.ds-body { padding: 0 12px 16px; }
.ds-sec { padding: 12px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 56px; }
.ds-sec:last-child { border-bottom: 0; }
.ds-sec p { margin: 0 0 4px; }
.ds-h { margin: 0 0 8px; font-size: .85rem; font-weight: 700; }
.ds-title { font-size: 1.05rem; font-weight: 700; }
.ds-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ds-where .approx, .ds-time, .ds-note, .ds-story-src { color: var(--muted); font-size: .85rem; }
.ds-msgs { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ds-msgs li { font-size: .88rem; overflow-wrap: anywhere; }
.ds-msgs .clock { font-variant-numeric: tabular-nums; color: var(--muted); }
.ds-news { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ds-story { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 10px; align-items: start; }
.ds-story:not(:has(img:not([hidden]))) { grid-template-columns: minmax(0, 1fr); }
.ds-story-img { width: 72px; height: 54px; object-fit: cover; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); }
.ds-story-text { display: grid; gap: 2px; }
.ds-story-link { font-weight: 600; color: var(--fg); }
.ds-vehicle { border-bottom: 0; }
.ds-vehicle .rt-detail { margin: 0; }
@media (max-width: 959px) {
  .panes > .dossier { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; height: auto; max-height: 70vh; overflow-y: auto; overscroll-behavior: contain;
    border-top: 1px solid var(--line); border-radius: var(--radius) var(--radius) 0 0; background: var(--card); box-shadow: var(--shadow); }
  .ds-head { background: var(--card); }
}

/* 0.12.2 phone header (<= 640 px): one compact row (logo, live dot, Wanneer,
   play, Journaal icon, settings) plus, only when needed, one thin row for the
   area chip and the replay scrubber. No koppen strip; the language button
   moves into the settings. Desktop is unchanged. */
.flash-opener-icon { display: none; }
.settings-lang { display: none; }
.wanneer-short { display: none; }
@media (max-width: 640px) {
  /* 0.12.3: the Journaal's top bar stays one row: Afspelen is an icon (40 px), the update time shrinks. */
  .flash-top > * { flex: none; }
  .flash-top > .flash-spacer { flex: 1 1 0; min-width: 0; }
  .flash-top > .flash-updated { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .flash-tool { min-height: 40px; white-space: nowrap; }
  .flash-play { position: relative; display: inline-grid; place-items: center; width: 40px; padding: 0; }
  .flash-play .flash-tool-icon { display: block; }
  .flash-play .flash-tool-text { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .koppen, .koppen:not([hidden]) { display: none !important; }
  .map-settings .koppen-switch { display: none; }
  .settings-lang { display: inline-flex; margin-left: auto; }
  .app-head { flex-wrap: wrap; gap: 6px; min-height: 52px;
    padding: calc(6px + env(safe-area-inset-top, 0px)) calc(8px + env(safe-area-inset-right, 0px)) 6px calc(8px + env(safe-area-inset-left, 0px)); }
  .brand { flex: none; gap: 6px; min-height: 40px; }
  .wordmark { font-size: 1.05rem; }
  .conn { flex: none; width: 22px; height: 40px; justify-content: center; padding: 0; border: 0; background: none; }
  #conn-label { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .wanneer { display: contents; }
  .wanneer-open { flex: 0 1 auto; min-width: 0; min-height: 40px; padding: 4px 10px; }
  .wanneer-label { display: block; overflow: hidden; text-overflow: ellipsis; }
  .wanneer-long { display: none; }
  .wanneer-short { display: inline; }
  .wanneer-play { flex: none; width: 40px; height: 40px; }
  .wanneer-pop { top: calc(100% + 4px); left: 8px; right: 8px; min-width: 0; max-height: calc(100dvh - 140px); overflow-y: auto; }
  .wanneer-presets .seg-btn { min-height: 40px; flex: 1 1 auto; }
  .head-actions { flex: none; margin-left: auto; gap: 6px; }
  .head-actions .icon-btn { min-width: 40px; min-height: 40px; }
  .head-actions .lang { display: none; }
  .flash-opener { position: relative; width: 40px; min-height: 40px; padding: 0; }
  .flash-opener-icon { display: block; }
  .flash-opener-text { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .flash-opener-dot { position: absolute; top: 5px; right: 5px; width: 9px; height: 9px; box-shadow: 0 0 0 2px var(--card); }
  /* Second row: half the width each, so neither ever fits on the first row. */
  .area-chip { order: 30; flex: 1 1 100%; min-width: 0; max-width: none; min-height: 40px; padding: 1px 2px 1px 12px; }
  .area-chip-clear { min-width: 40px; min-height: 36px; }
  .wanneer-replay { order: 31; flex: 1 1 100%; min-width: 0; }
  .app-head:has(.wanneer.replaying) .area-chip:not([hidden]) { flex-basis: calc(50% - 3px); }
  .app-head:has(.area-chip:not([hidden])) .wanneer-replay { flex-basis: calc(50% - 3px); }
  .wanneer-stop { flex: none; width: 40px; height: 40px; }
  /* The Dossier sheet always leaves the header (and a row of the page) in view. */
  .panes > .dossier { max-height: min(70dvh, calc(100dvh - 150px)); }
}
@media (max-width: 419px) {
  .wordmark { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
