/* Site styles of the LB Omgevingsadvies tools, taken from the NIBM-check (2026-11-20) and trimmed
   to what the starter uses. Hand-written CSS, self-hosted variable font, no framework. */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("../fonts/bricolage-grotesque-latin.477b564b86e0.woff2") format("woff2");
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-style: normal;
  font-display: swap;
}


/* ---------- Tokens ---------- */
:root {
  --paper: #f6f6f2;
  --ground: #ffffff;
  --ink: #16201a;
  --ink-2: #3d4a42;
  --muted: #5f6c65;
  --line: #dcdfd8;
  --line-2: #c3c9c0;
  --n2k-deep: #1f5c38;
  --n2k-soft: #e3efe6;
  --signal: #bf3a1d;
  --signal-2: #a3301a;
  --signal-soft: #fbe9e4;
  --font: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --r: 4px;
  --shadow-panel: 0 24px 48px -28px rgba(22, 32, 26, 0.38), 0 3px 8px -3px rgba(22, 32, 26, 0.14);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --header-h: 72px;
  --container: 1240px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --shadow-label: 0 6px 14px -8px rgba(22, 32, 26, 0.4), 0 1px 2px rgba(22, 32, 26, 0.12);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scrollbar-color: var(--line-2) var(--paper); }
body {
  margin: 0; font-family: var(--font); font-optical-sizing: auto; font-size: 17px; line-height: 1.6; color: var(--ink); background: var(--paper);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; font-variant-numeric: tabular-nums; caret-color: var(--signal);
}
h1, h2, h3 { margin: 0 0 0.5em; font-weight: 600; line-height: 1.1; letter-spacing: -0.02em; color: var(--ink); text-wrap: balance; }
h1, h2 { font-stretch: 100%; letter-spacing: -0.008em; font-variation-settings: "opsz" 96; }
h1 { font-size: clamp(1.9rem, 2.6vw, 2.5rem); }
h2 { font-size: clamp(1.55rem, 2.4vw, 2.1rem); }
h3 { font-size: 1.12rem; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
a { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em; text-decoration-color: var(--line-2); transition: text-decoration-color 0.2s; }
a:hover { text-decoration-color: var(--signal); }
ol, ul { margin: 0; padding: 0; }
strong { font-weight: 650; }
img, svg { max-width: 100%; }
::selection { background: var(--signal-soft); color: var(--signal-2); }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; border-radius: 2px; }
.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.container.narrow { max-width: 820px; }
.muted { color: var(--muted); }
.small { font-size: 0.9rem; }
.lead { font-size: clamp(1.05rem, 1.3vw, 1.2rem); line-height: 1.55; color: var(--ink-2); max-width: 38rem; }
.eyebrow { display: block; font-size: 0.85rem; font-weight: 600; color: var(--muted); margin: 0 0 0.5rem; }
.page-title { font-size: clamp(1.9rem, 3.2vw, 2.6rem); }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 100; padding: 0.6rem 0.9rem; background: var(--ink); color: #fff; border-radius: var(--r); }
.skip-link:focus { top: 1rem; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 30; height: var(--header-h); background: rgba(246, 246, 242, 0.92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); transition: box-shadow 0.4s var(--ease); }
.nav { display: flex; align-items: center; gap: 2rem; height: 100%; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--ink); }
.brand-mark { width: 26px; height: 26px; fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linejoin: round; flex: none; }
.brand-mark circle { fill: var(--signal); stroke: none; }
.brand-name { font-size: 1.08rem; font-weight: 650; letter-spacing: -0.015em; white-space: nowrap; }
.brand-name span { font-weight: 400; }
.nav-links { display: flex; gap: 1.6rem; margin-left: auto; }
.nav-links a { white-space: nowrap; color: var(--ink-2); font-size: 0.95rem; font-weight: 500; text-decoration: none; padding: 0.3rem 0; border-bottom: 1.5px solid transparent; transition: border-color 0.25s var(--ease), color 0.25s; }
.nav-links a:hover { color: var(--ink); border-color: var(--signal); }
.nav-links a[aria-current] { color: var(--ink); border-color: var(--signal); }
/* The tools domain (stikstoftool.nl): its own wordmark, the same system */
.brand-stack { display: flex; flex-direction: column; line-height: 1.05; }
.brand-tools .brand-name { font-size: 1.2rem; font-weight: 700; letter-spacing: -0.025em; }
.brand-by { margin-top: 0.2rem; font-size: 0.72rem; font-weight: 500; color: var(--muted); white-space: nowrap; }
/* A link that leaves for the company site: a small outward arrow after its text */
.link-out svg { width: 0.72em; height: 0.72em; margin-left: 0.3em; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.85rem 1.35rem; border: 1px solid transparent; border-radius: var(--r); font: inherit; font-size: 1rem; font-weight: 600; line-height: 1.2; text-decoration: none; cursor: pointer; white-space: nowrap; transition: background 0.2s var(--ease), border-color 0.2s, color 0.2s, box-shadow 0.25s var(--ease), transform 0.25s var(--ease); }
.btn-primary { background: var(--signal); color: #fff; box-shadow: 0 8px 18px -12px rgba(191, 58, 29, 0.9); }
.btn-primary:hover { background: var(--signal-2); box-shadow: 0 12px 22px -12px rgba(163, 48, 26, 0.9); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); box-shadow: none; }
.btn-secondary { background: #fff; color: var(--ink); border-color: var(--line-2); }
.btn-secondary:hover { border-color: var(--ink); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--ink); }
.btn[disabled] { opacity: 0.45; pointer-events: none; }

/* ---------- Footer ---------- */
.site-footer { background: var(--paper); border-top: 1px solid var(--line); padding: 3.5rem 0 1.5rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 3rem; }
.footer-about p { margin: 1rem 0 0; font-size: 0.95rem; color: var(--ink-2); max-width: 36rem; }
.footer-title { font-size: 0.95rem; font-weight: 650; margin: 0 0 0.6rem; }
.footer-grid p { font-size: 0.95rem; color: var(--ink-2); }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem 1.5rem; margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); font-size: 0.85rem; color: var(--muted); }
.footer-attrib { flex-basis: 100%; }
.site-footer-slim { padding-top: 2rem; }
.footer-slim { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2.5rem; }
.footer-owner { display: inline-flex; align-items: center; gap: 0.6rem; margin: 0; font-size: 0.95rem; color: var(--ink-2); }
.footer-owner .brand-mark { width: 22px; height: 22px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; font-size: 0.95rem; }
.footer-links a { color: var(--ink-2); }
.site-footer-slim .footer-bottom { margin-top: 1.5rem; }

/* ---------- Forms ---------- */
.form-section { background: var(--paper); }
.form-head { max-width: 40rem; margin-bottom: 2rem; }
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-weight: 600; font-size: 0.93rem; margin-bottom: 0.35rem; }
.field input[type="text"], .field input[type="email"], .field input[type="tel"], .field input[type="number"], .field input[type="url"], .field select, .field textarea { width: 100%; padding: 0.72rem 0.85rem; font: inherit; font-size: 1rem; color: var(--ink); background: #fff; border: 1px solid var(--line-2); border-radius: var(--r); transition: border-color 0.2s, box-shadow 0.2s; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(22, 32, 26, 0.12); }
.field .help { font-size: 0.85rem; color: var(--muted); margin: 0.3rem 0 0; }
.field .error { font-size: 0.85rem; color: var(--signal-2); margin: 0.3rem 0 0; font-weight: 600; }
.field-error input, .field-error select, .field-error textarea { border-color: var(--signal); }
.field-checkbox label { display: flex; gap: 0.6rem; align-items: flex-start; font-weight: 500; }
.field-checkbox input { margin-top: 0.3rem; accent-color: var(--signal); }
.form-actions { display: grid; gap: 0.75rem; }
.form-foot { margin-top: 2rem; }
.form-switch { margin: 0.9rem 0 0; font-size: 0.95rem; color: var(--ink-2); }
.alert { padding: 1rem 1.25rem; border-radius: var(--r); margin-bottom: 1.5rem; border: 1px solid; }
.alert-error { background: var(--signal-soft); color: #7a2a1b; border-color: #efc6bb; }
.alert-success { background: var(--n2k-soft); color: var(--n2k-deep); border-color: #bcd9c6; }
.card { background: #fff; border: 1px solid var(--line-2); border-radius: 6px; padding: 1.5rem 1.75rem; margin: 1.5rem 0; }
.card ol { padding-left: 1.2rem; }
.card li { margin-bottom: 0.5rem; }


/* ---------- The tool page ---------- */
main > .form-section { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.field textarea { font-family: var(--font); }
.result { margin-top: 2.5rem; padding: 1.5rem clamp(1.25rem, 3vw, 2rem); background: var(--ground); border: 1px solid var(--line-2); border-radius: 6px; box-shadow: var(--shadow-panel); }
.result h2 { font-size: 1.2rem; }
.result-value { margin: 0 0 0.5rem; font-size: 1.2rem; color: var(--ink-2); }
.result-number { font-size: clamp(2.6rem, 6vw, 3.6rem); font-weight: 700; letter-spacing: -0.03em; color: var(--ink); line-height: 1; }
/* The notice: what the answer is not. A note in the legend language (a hairline frame on paper),
   as natuurnetwerk-check has it: the signal colour is for the action and the address. */
.notice { margin: 1.25rem 0 0; padding: 0.8rem 1rem; background: var(--paper); border: 1px solid var(--line-2); border-radius: var(--r); font-size: 0.95rem; line-height: 1.5; color: var(--ink-2); }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .nav { gap: 1.25rem; }
  .nav-links { gap: 1.15rem; }
}
@media (max-width: 760px) {
  :root { --header-h: 62px; }
  body { font-size: 16px; }
  .nav { gap: 1rem; }
  .nav-links { gap: 0.9rem; }
  .nav-links a { font-size: 0.88rem; }
  .nav-links a:last-child { display: none; } /* the footer holds the company link too */
  .brand-by { display: none; }
}
/* A phone: "Bureaus vergelijken" ran off the screen at 390 px; the footer holds it too */
@media (max-width: 480px) {
  .nav-links a:nth-child(2) { display: none; }
}

/* ---------- Hitte op adres: result table and choices ---------- */
.table-wrap { margin: 1rem 0 0; }
.values { width: 100%; border-collapse: collapse; font-size: 0.97rem; }
.values caption { text-align: left; font-size: 0.9rem; font-weight: 500; line-height: 1.45; color: var(--ink-2); padding-bottom: 0.6rem; }
.values th, .values td { text-align: left; padding: 0.55rem 0.6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.values thead th { font-size: 0.85rem; line-height: 1.3; color: var(--muted); border-bottom-color: var(--line-2); }
.values td.num { font-variant-numeric: tabular-nums; }
.values .cells { display: block; margin-top: 0.1rem; font-size: 0.8rem; line-height: 1.35; color: var(--muted); }
.values-means th[scope="row"] { width: 34%; }
.values-point th[scope="row"] { width: 34%; }
.values strong { white-space: nowrap; }
/* A phone: three narrow columns that fit (the map year moved into the caption), not a scroll */
@media (max-width: 640px) {
  .values { font-size: 0.92rem; }
  .values th, .values td { padding: 0.5rem 0.4rem; }
  .values th:first-child, .values td:first-child { padding-left: 0; }
  .values-means th[scope="row"] { width: 32%; }
}
/* The section under the map, or the choice and the message without a map: close under the
   search, and room above the footer */
.result-values { padding: 0 0 clamp(2rem, 5vw, 3.5rem); }
.result-values .result { margin-top: 0; }
.choices { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: 0.5rem; }
.choices form { margin: 0; }
.choices .btn { white-space: normal; text-align: left; justify-content: flex-start; width: 100%; }
.result .small { font-size: 0.9rem; }
.result .fold { margin-top: 1rem; }
.result .fold summary { cursor: pointer; font-weight: 600; }

/* ---------- Hitte op adres: the map (templates/tool/_map.html, static/js/hittekaart.js) ----------
   The company's map conventions (the stikstofkaart, LBO-website DESIGN.md): a white legend panel
   over the left of the map on wide screens and under it on phones, white controls with a strong
   hairline and the label shadow, stickers for labels, the credit on the map. The map itself: the
   grey BRT Achtergrondkaart, and one RIVM map (heat or cooling) over it in the RIVM's own class colours,
   multiplied, so street names and buildings stay readable through the colour. CSS never changes
   a class colour; the swatches below are the legend's colours (tests/test_tiles.py checks them). */

/* The RIVM legend colours, per class: the heat map (hc0..hc10) and the cooling map (kc0..kc9),
   verbatim from GetLegendGraphic (calc.py; tests/test_calc.py checks every one of them). */
.hc0 { --c: #0000ff; }
.hc1 { --c: #3661ff; }
.hc2 { --c: #38acff; }
.hc3 { --c: #00ffff; }
.hc4 { --c: #91ffb4; }
.hc5 { --c: #d2ff69; }
.hc6 { --c: #ffff00; }
.hc7 { --c: #ffb700; }
.hc8 { --c: #ff6e00; }
.hc9 { --c: #ff0000; }
.hc10 { --c: #cb0000; }
.kc0 { --c: #ffff80; }
.kc1 { --c: #bef75c; }
.kc2 { --c: #81ed39; }
.kc3 { --c: #38e009; }
.kc4 { --c: #3ec74e; }
.kc5 { --c: #37ab7e; }
.kc6 { --c: #1a93ab; }
.kc7 { --c: #22639c; }
.kc8 { --c: #1d388a; }
.kc9 { --c: #0c1078; }

/* What the answer is not: right under it, quiet */
.hk-not { margin: 0.8rem 0 0; font-size: 0.85rem; line-height: 1.5; color: var(--ink-2); max-width: 40rem; }

/* The two scales (templates/tool/_scales.html, apps/tool/figure.py): one panel per map, each with
   the map's own classes as a band and its own axis, so the cooling effect never reads as the
   minus of the heat. The band takes the RIVM's colours (they are the map's legend); the markers
   and the numbers are ink, the red stays with the address on the map. */
.hk-figs { display: grid; gap: 0.6rem; margin: 1rem 0 0; }
.hk-fig { margin: 0; min-width: 0; padding: 0.8rem 0.9rem 0.85rem; background: var(--ground); border: 1px solid var(--line-2); border-radius: 6px; }
.hk-fig-cap { margin: 0 0 0.55rem; font-size: 0.84rem; line-height: 1.4; color: var(--ink-2); }
.hk-fig-name { display: block; font-size: 0.95rem; font-weight: 650; color: var(--ink); }
.hk-fig-svg { display: block; width: 100%; max-width: 25rem; height: auto; overflow: visible; font-family: var(--font); font-variant-numeric: tabular-nums; } /* drawn for 360 px: 1:1 on a phone */
.hk-fig-band rect { fill: var(--c); }
.hk-fig-here { fill: none; stroke: var(--ink); stroke-width: 1.5; } /* the address's class, as the map legend marks it */
.hk-fig-grid { stroke: var(--line); stroke-width: 1; }
.hk-fig-tick { font-size: 10.5px; font-stretch: 90%; fill: var(--muted); }
.hk-fig-lane { font-size: 12px; font-stretch: 90%; fill: var(--ink-2); }
.hk-fig-lane.is-punt { font-weight: 650; fill: var(--ink); }
.hk-fig-track { stroke: var(--line-2); stroke-width: 1; }
.hk-fig-drop { stroke: var(--ink); stroke-width: 1; stroke-dasharray: 2 2; stroke-opacity: 0.6; }
.hk-fig-mark.is-punt { fill: var(--ink); stroke: #ffffff; stroke-width: 2; }
.hk-fig-mark.is-cirkel { fill: #ffffff; stroke: var(--ink); stroke-width: 1.8; }
.hk-fig-val { font-size: 13px; font-weight: 650; fill: var(--ink); }
.hk-fig-val.is-none { font-size: 11px; font-weight: 400; fill: var(--muted); }
.hk-fig-past { fill: none; stroke: var(--ink); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; } /* a value past the end of the axis */
.hk-fig-note, .hk-fig-foot { margin: 0.5rem 0 0; font-size: 0.8rem; line-height: 1.45; color: var(--ink-2); max-width: 34rem; }
.hk-fig-foot { color: var(--muted); }
.hk-fig-why { display: flex; align-items: flex-start; gap: 0.6rem; margin: 0.15rem 0 0; font-size: 0.9rem; line-height: 1.45; color: var(--ink-2); max-width: 34rem; }
.hk-fig-why .hk-sw { flex: none; margin-top: 0.3rem; }

/* With a map on the page the search steps back, so the map starts high on the screen */
.form-section.has-map { padding: clamp(1.25rem, 3vw, 2rem) 0 clamp(1rem, 2.5vw, 1.5rem); }
.has-map .form-head { margin-bottom: 0.9rem; }
.has-map .page-title { margin-bottom: 0.2rem; font-size: clamp(1.45rem, 2.2vw, 1.85rem); }
.has-map .lead { margin: 0; font-size: 1rem; }
.has-map .lookup .field { margin-bottom: 0.75rem; }
#resultaat { scroll-margin-top: calc(var(--header-h) + 0.75rem); }

.hk-section { padding: 0 0 clamp(1.75rem, 4vw, 3rem); }
.hk { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); }

/* The head: what this is and where */
.hk-head { padding: 0 0 0.8rem; }
.hk-head h2 { margin: 0 0 0.2rem; font-size: clamp(1.45rem, 5.4vw, 1.75rem); }
.hk-answer { margin: 0.7rem 0 0; max-width: 46rem; font-size: clamp(1.05rem, 3.4vw, 1.25rem); line-height: 1.4; font-weight: 600; color: var(--ink); }
.hk-place { margin: 0; font-size: 0.95rem; line-height: 1.4; color: var(--ink-2); }

/* The sheet: the map, live or drawn by the server */
.hk-sheet { position: relative; height: clamp(320px, 58svh, 520px); height: round(down, clamp(320px, 58svh, 520px), 1px); overflow: hidden; isolation: isolate; background: #f1f1ee; border: 1px solid var(--line-2); border-radius: 6px 6px 0 0; }
.hk-map { position: absolute; inset: 0; background: #f1f1ee; }
.hk-credit { position: absolute; z-index: 1000; right: 0; bottom: 0; max-width: 100%; margin: 0; padding: 2px 7px; background: rgba(255, 255, 255, 0.86); border-top-left-radius: 3px; font-size: 0.68rem; font-stretch: 90%; line-height: 1.4; color: var(--ink-2); }

/* The body of the panel: layers, legend, hint */
.hk-body { padding: 1rem 1rem 1.1rem; background: var(--ground); border: 1px solid var(--line-2); border-top: 0; border-radius: 0 0 6px 6px; }
.hk-body fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }

/* The layers: legend rows, the shown one pressed */
.hk-label { display: block; padding: 0; margin: 0 0 0.35rem; font-size: 0.85rem; font-weight: 600; color: var(--muted); }
.hk-rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-2); }
.hk-rows li { border-bottom: 1px solid var(--line); }
.hk-src { position: relative; display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; align-items: center; column-gap: 0.7rem; min-height: 2.75rem; padding: 0.4rem 0.55rem; font-size: 0.95rem; line-height: 1.3; color: var(--ink-2); cursor: pointer; transition: background 0.15s; }
.hk-src input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: inherit; }
.hk-src:hover { background: var(--paper); color: var(--ink); }
.hk-src:has(input:checked) { background: var(--paper); color: var(--ink); font-weight: 650; }
.hk-src:has(input:checked) .hk-sw { box-shadow: 0 0 0 2px var(--ground), 0 0 0 3.5px var(--ink); }
.hk-src:has(input:focus-visible) { outline: 2px solid var(--signal); outline-offset: -2px; }
.hk-src:has(input:disabled) { cursor: default; }
.hk.is-live .hk-src:has(input:disabled) { color: var(--muted); background: none; }
.hk.is-live .hk-src:has(input:disabled) .hk-sw { opacity: 0.35; }
.hk-src-name { min-width: 0; }
.hk-src-note { display: block; font-size: 0.78rem; font-weight: 400; color: var(--muted); }
.hk-src-val { font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }

/* A swatch: the class colour the map paints at the address, a legend patch (not a box to tick) */
.hk-sw { display: inline-block; justify-self: center; width: 24px; height: 12px; border-radius: 2px; background: var(--c); box-shadow: inset 0 0 0 1px rgba(22, 32, 26, 0.16); }
.hk-sw.hk-cx { background: transparent; box-shadow: none; border: 1.5px dashed var(--line-2); }

/* The legend: the RIVM's classes as one strip that never wraps, the limits under the edges, the
   address's class marked from above on its own chip (at every width: one row) */
.hk-legend { margin: 0; }
.hk-legend-title { margin: 0 0 0.85rem; font-size: 0.9rem; font-weight: 650; line-height: 1.35; color: var(--ink); }
.hk-legend-year { font-weight: 500; color: var(--muted); }
.hk-scale { list-style: none; margin: 0; padding: 0 0.75rem 0 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 2px; }
.hk-scale[hidden] { display: none; }
.hk-scale li { position: relative; display: grid; grid-template-rows: 14px 0.95rem; row-gap: 0.25rem; }
.hk-scale-chip { display: block; height: 14px; background: var(--c); box-shadow: inset 0 0 0 1px rgba(22, 32, 26, 0.12); }
.hk-scale li:first-child .hk-scale-chip { border-radius: 2px 0 0 2px; }
.hk-scale li:last-child .hk-scale-chip { border-radius: 0 2px 2px 0; }
.hk-scale-limit { grid-row: 2; justify-self: end; transform: translateX(calc(50% + 1px)); font-size: 0.7rem; font-stretch: 82%; line-height: 1.2; white-space: nowrap; color: var(--ink-2); }
.hk-scale li.is-here::before { content: ""; position: absolute; top: -7px; left: 50%; border: 5px solid transparent; border-bottom: 0; border-top-color: var(--ink); transform: translateX(-50%); }
.hk-scale li.is-here .hk-scale-chip { position: relative; z-index: 1; box-shadow: inset 0 0 0 1px rgba(22, 32, 26, 0.3), 0 0 0 1.5px var(--ink); }
.hk-hint { margin: 0.9rem 0 0; font-size: 0.88rem; color: var(--ink-2); }
.hk-src-note .hk-src-val { font-weight: 600; color: var(--ink-2); text-align: left; white-space: normal; }
.hk-src-note .hk-src-val.is-none { font-weight: 400; color: var(--muted); }
/* The two 5 m maps behind a fold: they read one cell at the address, not the circles */
.hk-more { border-bottom: 1px solid var(--line); }
.hk-more summary { display: flex; align-items: center; gap: 0.5rem; min-height: 2.6rem; padding: 0.35rem 0.55rem; font-size: 0.9rem; font-weight: 600; color: var(--ink-2); cursor: pointer; list-style: none; }
.hk-more summary::-webkit-details-marker { display: none; }
.hk-more summary::before { content: ""; flex: none; width: 0.42rem; height: 0.42rem; margin: 0 0.55rem 0 0.45rem; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); transition: transform 0.2s var(--ease); }
.hk-more[open] summary::before { transform: translateY(-0.15rem) rotate(45deg); }
.hk-more summary:hover { color: var(--ink); background: var(--paper); }
.hk-more .hk-rows { border-top: 1px solid var(--line); }
.hk-more .hk-rows li:last-child { border-bottom: 0; }
/* The key: the two circles and what no colour means */
.hk-key { list-style: none; margin: 0.75rem 0 0; padding: 0; display: grid; gap: 0.3rem; font-size: 0.82rem; line-height: 1.4; color: var(--ink-2); }
.hk-key li { display: grid; grid-template-columns: 24px minmax(0, 1fr); column-gap: 0.5rem; align-items: center; }
.hk-key li[hidden] { display: none; }
.hk-key-sym { width: 24px; height: 24px; overflow: visible; }
.hk-key .hk-sw { width: 24px; }
.hk-sources { margin-top: 1rem; }
.hk-note { max-width: 46rem; margin: 0.85rem 0 0; font-size: 0.82rem; line-height: 1.5; color: var(--muted); }

/* Without script there is nothing to switch: the drawn map, the list and the legend remain */
@media (scripting: none) {
  .hk-hint { display: none; }
}

/* Leaflet, in the company's map chrome. leaflet.css loads before this file. */
.hk .leaflet-container { font-family: var(--font); background: #f1f1ee; }
/* Leaflet focuses the map from script on every click, so the ring and the crosshair follow the
   keyboard (hittekaart.js sets .is-keys) rather than :focus-visible */
.hk .leaflet-container:focus { outline: none; }
.hk .leaflet-container.is-keys:focus { outline: 2px solid var(--signal); outline-offset: -2px; }
/* the keyboard reads the values in the middle of the map: show where that is */
.hk .leaflet-container.is-keys:focus::after { content: ""; position: absolute; z-index: 1000; left: calc(50% + var(--hk-free, 0px) / 2); top: 50%; width: 22px; height: 22px; margin: -11px 0 0 -11px; pointer-events: none; background: linear-gradient(var(--ink), var(--ink)) center / 2px 100% no-repeat, linear-gradient(var(--ink), var(--ink)) center / 100% 2px no-repeat; filter: drop-shadow(0 0 1.5px #fff) drop-shadow(0 0 1.5px #fff); }
.hk .leaflet-top.leaflet-right { top: 2px; right: 2px; }
.hk .leaflet-bar, .hk .leaflet-touch .leaflet-bar { border: 1px solid var(--line-2); border-radius: var(--r); box-shadow: var(--shadow-label); background-clip: border-box; }
.hk .leaflet-bar a, .hk .leaflet-touch .leaflet-bar a { width: 34px; height: 34px; line-height: 32px; color: var(--ink); font: 500 19px/32px var(--font); border-bottom-color: var(--line); }
.hk .leaflet-bar a:hover { background: var(--paper); color: var(--ink); }
.hk .leaflet-bar a:focus-visible { outline: 2px solid var(--signal); outline-offset: 1px; }
.hk .leaflet-bar a.leaflet-disabled { color: var(--line-2); background: var(--ground); }
.hk .leaflet-control-scale { margin: 0 0 10px 10px; }
.hk .leaflet-control-scale-line { border-color: var(--ink); border-width: 0 1.5px 1.5px; color: var(--ink); background: rgba(255, 255, 255, 0.82); font: 600 11px/1.4 var(--font); text-shadow: none; }

/* The RIVM map lies over the grey map, multiplied: a white street stays the class colour, a
   grey building or a black name darkens it, so the sheet stays legible through the colour. */
.leaflet-hk-data-pane { z-index: 250; mix-blend-mode: multiply; }
.leaflet-hk-data-pane .leaflet-layer { transition: opacity 0.25s var(--ease); }
.hk-data img.leaflet-tile { image-rendering: pixelated; } /* a cell of the grid stays a cell */
/* leaflet.css adds plus-lighter to every tile against seams; over this map's backdrop a tile edge
   on half a device pixel then turned into a white line. Plain painting keeps the edge grey. */
.hk .hk-bg img.leaflet-tile { mix-blend-mode: normal; }

/* The two circles of the means: ink on a white halo, readable on every class colour */
.hk-ring { fill: none; stroke: var(--ink); stroke-width: 1.5; }
.hk-ring-halo { fill: none; stroke: #ffffff; stroke-width: 4.5; stroke-opacity: 0.8; }
.hk-static-rings .hk-ring { stroke-width: 2.4; }
.hk-static-rings .hk-ring-halo { stroke-width: 7; }
.hk-ring-tag { fill: #ffffff; stroke: var(--line-2); stroke-width: 1.5; }
.hk-ring-text { font: 650 17px var(--font); fill: var(--ink); }
.hk-ring-label { width: 0; height: 0; }
.hk-ring-label span { position: absolute; left: 0; top: 0; transform: translate(-50%, -50%); padding: 1px 6px; background: #fff; border: 1px solid var(--line-2); border-radius: 3px; box-shadow: var(--shadow-label); font: 650 12px/1.3 var(--font); color: var(--ink); white-space: nowrap; pointer-events: none; }
.hk-ring-label.is-hidden span { display: none; }

/* The address, and the spot a visitor reads */
.leaflet-tooltip.hk-label { padding: 4px 9px; background: #fff; color: var(--signal-2); border: 1px solid var(--line-2); border-radius: 3px; box-shadow: var(--shadow-label); font: 650 13px/1.25 var(--font); white-space: nowrap; }
.leaflet-tooltip-top.hk-label::before { border-top-color: var(--line-2); }

/* The values at a spot: a small panel on the map */
.hk .hk-pop .leaflet-popup-content-wrapper { padding: 0; border: 1px solid var(--line-2); border-radius: 4px; box-shadow: var(--shadow-panel); }
.hk .hk-pop .leaflet-popup-content { width: auto !important; min-width: 15rem; margin: 0.75rem 0.9rem 0.8rem; font: 400 0.88rem/1.35 var(--font); color: var(--ink-2); }
.hk .hk-pop .leaflet-popup-tip { border: 1px solid var(--line-2); box-shadow: none; }
.hk .hk-pop a.leaflet-popup-close-button { top: 4px; right: 4px; width: 28px; height: 28px; color: var(--muted); font: 400 20px/26px var(--font); }
.hk .hk-pop a.leaflet-popup-close-button:hover { color: var(--ink); }
.hk-pop-title { margin: 0 2rem 0.45rem 0; font-size: 0.95rem; font-weight: 650; color: var(--ink); }
.hk-pop-title span { display: block; font-size: 0.8rem; font-weight: 500; color: var(--muted); }
.hk-pop-rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-2); }
.hk-pop-rows li { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; align-items: center; column-gap: 0.55rem; padding: 0.3rem 0.1rem; border-bottom: 1px solid var(--line); }
.hk-pop-rows .hk-sw { width: 20px; height: 10px; }
.hk-pop-rows b { max-width: 10rem; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; text-align: right; }
.hk-pop-rows .is-shown { color: var(--ink); font-weight: 650; }
.hk-pop-rows .is-none b { font-weight: 400; color: var(--muted); }
.hk-pop-note { margin: 0.5rem 0 0; font-size: 0.78rem; line-height: 1.4; color: var(--muted); }
.hk-pop-wait { margin: 0; color: var(--muted); }

/* Stickers on the sheet: the way back, a status, the touch hint */
.hk-topbar { position: absolute; z-index: 1000; top: 12px; right: 52px; display: flex; pointer-events: none; }
.hk-topbar > * { pointer-events: auto; }
.hk-home { min-height: 34px; padding: 0.35rem 0.75rem; background: #fff; border: 1px solid var(--line-2); border-radius: var(--r); box-shadow: var(--shadow-label); font: inherit; font-size: 0.85rem; font-weight: 600; color: var(--ink); cursor: pointer; }
.hk-home:hover { border-color: var(--ink); }
.hk-status { position: absolute; z-index: 1000; left: 50%; bottom: 14px; max-width: calc(100% - 2rem); margin: 0; padding: 5px 10px; transform: translateX(-50%); background: #fff; border: 1px solid var(--line-2); border-radius: 3px; box-shadow: var(--shadow-label); font-size: 0.85rem; color: var(--ink-2); text-align: center; }
.hk-status.is-wait { animation: hk-appear 0.2s var(--ease) 0.5s both; }
.hk-touch { position: absolute; z-index: 1001; left: 50%; top: 50%; margin: 0; padding: 7px 12px; transform: translate(-50%, -50%); background: #fff; border: 1px solid var(--line-2); border-radius: 3px; box-shadow: var(--shadow-label); font-size: 0.9rem; font-weight: 600; color: var(--ink); pointer-events: none; }
@keyframes hk-appear { from { opacity: 0; } to { opacity: 1; } }

/* The drawn map for a page without script: the same tiles, stacked by the server */
.hk-static { position: absolute; inset: 0; }
.hk-static-svg { display: block; width: 100%; height: 100%; }
.hk-static-paper { fill: #f1f1ee; }
.hk-static-data { mix-blend-mode: multiply; }
.hk-mark-halo { fill: none; stroke: #fff; stroke-width: 9; stroke-opacity: 0.9; }
.hk-mark-ring { fill: none; stroke: var(--ink); stroke-width: 3.5; }
.hk-mark-dot { fill: var(--signal); stroke: #fff; stroke-width: 3; }
.hk-static-label { position: absolute; left: 50%; top: 50%; transform: translate(-50%, calc(-100% - 26px)); padding: 4px 9px; background: #fff; color: var(--signal-2); border: 1px solid var(--line-2); border-radius: 3px; box-shadow: var(--shadow-label); font-size: 13px; font-weight: 650; line-height: 1.25; white-space: nowrap; }

/* Phones: the map and the two scales from edge to edge, the panel under the map */
@media (max-width: 760px) {
  .hk-sheet, .hk-body, .hk-fig { margin-inline: calc(-1 * var(--gutter)); border-left: 0; border-right: 0; border-radius: 0; }
  .hk-fig { padding-inline: var(--gutter); }
  .hk-body { padding-inline: var(--gutter); border-bottom: 1px solid var(--line-2); }
  .hk .leaflet-control-scale { display: none; }
  /* the values at a spot stay small enough to leave the spot's surroundings in view */
  .hk .hk-pop .leaflet-popup-content { min-width: 13rem; margin: 0.55rem 0.7rem 0.6rem; font-size: 0.8rem; }
  .hk-pop-title { margin-bottom: 0.3rem; font-size: 0.86rem; }
  .hk-pop-title span { font-size: 0.76rem; }
  .hk-pop-rows li { padding: 0.18rem 0.1rem; }
  .hk-pop-note { margin-top: 0.35rem; font-size: 0.72rem; }
}
/* A tablet: the panel under the map has two columns, the legend and its key left, the list of maps right */
@media (min-width: 640px) and (max-width: 899px) {
  .hk-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto 1fr; column-gap: 2rem; }
  .hk-legend { grid-column: 1; grid-row: 1; }
  .hk-body .hk-sources { grid-column: 2; grid-row: 1 / span 2; margin-top: 0; }
  .hk-hint { grid-column: 1; grid-row: 2; }
}
/* Touch: the controls at the company's 40px */
@media (pointer: fine) and (min-width: 900px) {
  .hk-src { min-height: 2.45rem; padding-block: 0.3rem; }
}
@media (pointer: coarse) {
  .hk .leaflet-touch .leaflet-bar a { width: 40px; height: 40px; line-height: 38px; }
  .hk-topbar { right: 58px; }
  .hk-home { min-height: 40px; }
  .hk-src { min-height: 3rem; }
  .hk .hk-pop a.leaflet-popup-close-button { width: 36px; height: 36px; line-height: 34px; top: 0; right: 0; }
}

/* Wide screens: the answer above the map; the legend panel lies over the left of the map, as on
   the stikstofkaart. (On a phone the same order: the answer, the map, the panel under it.) The
   head is not in the panel here, as it is in the sister tools (docs/decisions.md). */
/* Two scales side by side once each has room for its drawing (about 330 px) */
@media (min-width: 800px) {
  .hk-figs { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
}
@media (min-width: 900px) {
  .hk { grid-template-columns: minmax(360px, 34%) minmax(0, 1fr); grid-template-rows: auto auto minmax(0, 1fr); }
  .hk-head { grid-row: 1; grid-column: 1 / -1; padding: 0 0 1.25rem; }
  .hk-head-text { max-width: 46rem; }
  .hk-head h2 { font-size: clamp(1.5rem, 2vw, 1.85rem); }
  /* The map stage is at least a window high less the head (up to 720 px) and grows with the
     panel on a short window, so the legend and the list are never behind a scroll */
  .hk-sheet { grid-column: 1 / -1; grid-row: 2 / -1; height: auto; min-height: clamp(560px, calc(100svh - var(--header-h) - 14rem), 700px); min-height: round(down, clamp(560px, calc(100svh - var(--header-h) - 14rem), 700px), 1px); border-radius: 6px; }
  .hk-body { position: relative; z-index: 2; grid-column: 1; grid-row: 2; align-self: start; margin: 1rem 0 1rem 1rem; padding: 1.05rem 1.35rem 1.2rem; background: var(--ground); border: 1px solid var(--line-2); border-radius: 6px; box-shadow: var(--shadow-panel); }
  .hk-credit { right: 6px; bottom: 6px; border-radius: 3px; font-size: 0.7rem; }
  .hk .leaflet-bottom.leaflet-right { bottom: 22px; } /* the scale bar, above the credit */
  .hk .leaflet-control-scale { margin: 0 8px 6px 0; }
}
/* Wide: the answer beside its two scales, so the map still starts on the first screen */
@media (min-width: 1100px) {
  .hk-head { display: grid; grid-template-columns: minmax(16rem, 0.85fr) minmax(0, 2.15fr); column-gap: clamp(1.5rem, 3vw, 2.5rem); align-items: start; }
  .hk-figs { margin-top: 0.15rem; }
}
@media (min-width: 761px) {
  .has-map .lookup { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 0.75rem; align-items: start; }
  .has-map .lookup > .alert, .has-map .lookup > .error { grid-column: 1 / -1; }
  .has-map .lookup .form-actions { padding-top: calc(0.93rem * 1.6 + 0.35rem); }
}
@media (prefers-reduced-motion: reduce) {
  .leaflet-hk-data-pane .leaflet-layer { transition: none; }
}
