/* 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; }
.notice { margin: 1.25rem 0 0; padding: 0.8rem 1rem; border-left: 3px solid var(--signal); background: var(--signal-soft); border-radius: 0 var(--r) var(--r) 0; font-size: 0.95rem; 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; }
}


/* A phone: the tool's name is long; it may take two lines rather than push the menu off */
@media (max-width: 480px) {
  .brand-tools .brand-name { white-space: normal; font-size: 1.02rem; line-height: 1.12; }
  .brand-stack { min-width: 0; }
}

/* ---------- Perceel en bebouwing op adres: the tables under the map, and the choices ---------- */
.table-wrap { overflow-x: auto; margin: 1.25rem 0 0; }
.values { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.values caption { text-align: left; font-weight: 600; padding-bottom: 0.5rem; }
.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.82rem; font-weight: 600; color: var(--muted); border-bottom-color: var(--line-2); }
.values tbody th { font-weight: 600; }
.values td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.values tr.is-out th, .values tr.is-out td { color: var(--muted); }
.values tr.is-hi th, .values tr.is-hi td { background: var(--paper); }
.values tr.is-live { cursor: pointer; }
.values tr.is-live:focus-visible { outline: 2px solid var(--signal); outline-offset: -2px; }
.values-total th, .values-total td { border-top: 1px solid var(--line-2); font-weight: 600; }
.pk-cell-note { display: block; margin-top: 0.1rem; font-size: 0.82rem; font-weight: 400; line-height: 1.35; color: var(--muted); white-space: normal; }
.pk-table .pk-table-nr { width: 2.4rem; padding-right: 0; }
.pk-table td[data-label="Telt mee"] { min-width: 9rem; }
.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; }

/* The tables on a phone: one block per row, the label before each value; the buildings keep
   their number in a column of its own */
@media (max-width: 760px) {
  .values-stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .values-stack, .values-stack tbody { display: block; }
  .values-stack caption { display: block; }
  .values-stack tr { display: block; padding: 0.7rem 0; border-bottom: 1px solid var(--line); }
  .values-stack th, .values-stack td { display: block; padding: 0; border: 0; }
  .values-stack th[scope="row"] { margin-bottom: 0.25rem; }
  .values-stack td[data-label] { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr); column-gap: 0.6rem; padding: 0.12rem 0; font-size: 0.92rem; }
  .values-stack td[data-label]::before { content: attr(data-label); color: var(--muted); font-size: 0.82rem; }
  .values-stack td.num { white-space: normal; }
  .values-stack td[data-label] .pk-cell-note { grid-column: 2; }
  .values-stack .values-total th, .values-stack .values-total td { border-top: 0; }
  .values-stack tr.values-total { border-top: 1px solid var(--line-2); }
  .pk-table.values-stack tr { display: grid; grid-template-columns: 2.2rem minmax(0, 1fr); column-gap: 0.6rem; }
  .pk-table.values-stack .pk-table-nr { grid-row: 1 / span 4; width: auto; }
  .pk-table.values-stack td[data-label] { grid-column: 2; }
}
.pk-cell-id { font-size: 0.78rem; }

/* ---------- Perceel en bebouwing op adres: the answer and the map (templates/tool/_map.html, static/js/perceelkaart.js) ----------
   The family's map ("geluid op adres"): a white panel over the left of the map on wide screens
   and dissolved around it on phones, white controls with a strong hairline and the label shadow,
   stickers for labels, the credit on the map. This tool's panel holds the answer and the key.
   The map: the aerial photo (or the grey BRT map), the Kadaster's parcels faint, and drawn from
   the page's data the parcel's boundary bands, the buildings and the parcel's outline. Ink with a
   white halo for every shape; Signal Brick only for the address (DESIGN-ADDRESS-TOOL.md). */

/* With a map on the page the search steps back, so the answer 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); }

.pk-section { padding: 0 0 clamp(1.75rem, 4vw, 3rem); }
.pk { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); }
/* A phone: the panel dissolves; the answer, then the map, then the key */
.pk-panel { display: contents; }
.pk-head { order: 1; padding: 0 0 1rem; }
.pk-sheet { order: 2; }
.pk-body { order: 3; }

/* The head: where, the answer, the share */
.pk-head h2 { margin: 0 0 0.15rem; font-size: clamp(1.45rem, 5.4vw, 1.75rem); }
.pk-place { margin: 0; font-size: 0.95rem; line-height: 1.4; color: var(--ink-2); }
.pk-answer { margin: 0.75rem 0 0; font-size: 1.02rem; line-height: 1.5; color: var(--ink); max-width: 40rem; }
.pk-answer-note { margin: 0.5rem 0 0; font-size: 0.9rem; line-height: 1.45; color: var(--ink-2); }

/* The share: one number, the bar to scale, the two numbers that make it, the limits; it comes
   right under the title, the sentence after it */
.pk-figure { margin: 0.9rem 0 0; padding: 0 0 1rem; border-bottom: 1px solid var(--line); }
.pk-share { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 0.7rem; row-gap: 0.15rem; margin: 0; }
.pk-share-num { font-size: clamp(3rem, 9vw, 3.6rem); font-weight: 700; line-height: 0.95; letter-spacing: -0.035em; color: var(--ink); font-variation-settings: "opsz" 96; }
.pk-share-unit { font-size: 0.55em; font-weight: 650; letter-spacing: 0; }
.pk-share-of { font-size: 1rem; font-weight: 500; line-height: 1.3; color: var(--ink-2); }
.pk-share-none { font-size: 1.35rem; font-weight: 650; line-height: 1.2; color: var(--ink); }
.pk-share-why { margin: 0.4rem 0 0; font-size: 0.92rem; line-height: 1.45; color: var(--ink-2); }
.pk-bars { display: grid; gap: 0.55rem; margin: 0.85rem 0 0; }
.pk-bar { display: block; width: 100%; height: 12px; overflow: visible; }
.pk-bar-row.is-total .pk-bar, .pk-bars > .pk-bar-row:only-child .pk-bar { height: 20px; }
.pk-bar-parcel { fill: var(--paper); stroke: var(--ink-2); stroke-width: 1; vector-effect: non-scaling-stroke; }
.pk-bar-built { fill: var(--ink-2); }
.pk-bar-tick { stroke: var(--ink); stroke-width: 2; stroke-dasharray: 3 2; }
.pk-bar-name { display: flex; justify-content: space-between; gap: 1rem; margin: 0 0 0.2rem; font-size: 0.85rem; line-height: 1.3; color: var(--ink-2); }
.pk-bar-row.is-total .pk-bar-name { font-weight: 650; color: var(--ink); }
.pk-bar-pct { font-weight: 650; color: var(--ink); }
.pk-bar-row.is-hi .pk-bar-parcel { stroke: var(--ink); stroke-width: 2; }
.pk-share-sum { margin: 0.6rem 0 0; font-size: 0.92rem; line-height: 1.5; color: var(--ink-2); }
.pk-share-sum strong { color: var(--ink); font-weight: 650; }
.pk-share-note { margin: 0.45rem 0 0; font-size: 0.88rem; line-height: 1.45; color: var(--ink-2); }
.pk-key { display: inline-block; width: 0.8em; height: 0.8em; margin: 0 0.3em 0 0; vertical-align: -0.04em; border-radius: 1px; }
.pk-key-built { background: var(--ink-2); }
.pk-key-parcel { background: var(--paper); border: 1px solid var(--ink-2); }
.pk-key-tick { width: 0; height: 1em; margin-right: 0.45em; border-left: 2px dashed var(--ink); border-radius: 0; vertical-align: -0.15em; }
.pk-limits { margin: 0.75rem 0 0; font-size: 0.88rem; line-height: 1.45; color: var(--ink-2); }
.pk-purpose { margin: 0.45rem 0 0; font-size: 0.88rem; line-height: 1.45; color: var(--ink-2); }
.pk-purpose a { font-weight: 600; color: var(--ink); }

/* The sheet: the map, live or drawn by the server */
.pk-sheet { position: relative; height: clamp(340px, 62svh, 540px); height: round(down, clamp(340px, 62svh, 540px), 1px); overflow: hidden; isolation: isolate; background: #e9ebe6; border: 1px solid var(--line-2); border-radius: 6px 6px 0 0; }
.pk-map { position: absolute; inset: 0; background: #e9ebe6; }
.pk-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: the numbered buildings, the key, the hint */
.pk-body { padding: 1rem 1rem 1.1rem; background: var(--ground); border: 1px solid var(--line-2); border-top: 0; border-radius: 0 0 6px 6px; }
.pk-legend { margin: 0; }
.pk-legend-title { margin: 0 0 0.6rem; font-size: 0.9rem; font-weight: 650; color: var(--ink); }
.pk-legend-note { margin: 0.7rem 0 0; font-size: 0.82rem; line-height: 1.45; color: var(--muted); }
.pk-hint { margin: 0.85rem 0 0; font-size: 0.85rem; line-height: 1.45; color: var(--ink-2); }
.pk:not(.is-live) .pk-hint { display: none; } /* nothing lights up without the script */
.pk-note { max-width: 46rem; margin: 0.85rem 0 0; font-size: 0.82rem; line-height: 1.5; color: var(--muted); }

/* The numbered buildings: the same sticker as on the map */
.pk-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.pk-item { display: grid; grid-template-columns: 26px minmax(0, 1fr); column-gap: 0.7rem; padding: 0.55rem 0.35rem; margin: 0 -0.35rem; border-bottom: 1px solid var(--line); border-radius: 3px; transition: background 0.2s; }
.pk-item.is-live { cursor: pointer; }
.pk-item.is-hi { background: var(--paper); }
.pk-item.is-live:focus-visible { outline: 2px solid var(--signal); outline-offset: -2px; }
.pk-item-text { display: grid; gap: 0.05rem; min-width: 0; }
.pk-item-title { display: flex; justify-content: space-between; gap: 0.75rem; font-size: 0.93rem; font-weight: 650; line-height: 1.3; color: var(--ink); }
.pk-item-m2 { flex: none; font-weight: 600; font-variant-numeric: tabular-nums; }
.pk-item-facts { font-size: 0.85rem; line-height: 1.35; color: var(--ink-2); overflow-wrap: anywhere; }
.pk-item-why { font-size: 0.85rem; line-height: 1.35; color: var(--ink); font-weight: 500; }
.pk-item.is-out .pk-item-title { font-weight: 600; color: var(--ink-2); }
.pk-item.is-out .pk-item-m2 { color: var(--muted); font-weight: 500; text-decoration: line-through; text-decoration-thickness: 1px; text-decoration-color: var(--muted); }

.pk-nr { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; width: 24px; height: 24px; border-radius: 50%; font-size: 0.78rem; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; background: var(--ink); color: #fff; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--ink); }
.pk-nr-pand_niet_meegeteld, .pk-nr-pand_grenzend { background: #fff; color: var(--ink); box-shadow: none; border: 1.5px dashed var(--ink); }
.pk-item .pk-nr { margin-top: 0.05rem; }

/* The key to the lines and the other shapes */
.pk-keys { list-style: none; margin: 0.8rem 0 0; padding: 0; display: grid; gap: 0.45rem; }
.pk-keys li { display: grid; grid-template-columns: 28px minmax(0, 1fr); align-items: center; column-gap: 0.7rem; padding: 0.05rem 0.35rem; margin: 0 -0.35rem; border-radius: 3px; font-size: 0.88rem; line-height: 1.3; color: var(--ink-2); }
.pk-keys li.is-hi { background: var(--paper); }
.pk-sw { display: inline-block; justify-self: center; box-sizing: border-box; width: 26px; height: 14px; border-radius: 1px; }
.pk-sw-perceel { border: 2.5px solid var(--ink); box-shadow: 0 0 0 1.5px #fff, 0 0 0 2.5px var(--line-2); }
.pk-sw-pand_op_perceel { background: repeating-linear-gradient(-45deg, var(--ink) 0 1.5px, transparent 1.5px 3.6px), rgba(22, 32, 26, 0.06); border: 1.5px solid var(--ink); }
.pk-sw-pand_niet_meegeteld { background: #fff; border: 1.5px dashed var(--ink); }
.pk-sw-pand_grenzend { border: 2px dotted var(--ink); }
.pk-sw-buren { height: 16px; border: 1px solid var(--ink-2); border-right: 0; border-bottom: 0; }
.pk-sw-adres { width: 14px; height: 14px; border-radius: 50%; border: 3px solid var(--ink); background: var(--signal); }
/* A band: the line in the middle, the margin on both sides, its height in proportion */
.pk-sw-band { width: 28px; background: linear-gradient(var(--ink), var(--ink)) center / 100% 2px no-repeat, rgba(22, 32, 26, 0.16); border-radius: 0; }
.pk-sw-band-B { height: 4px; }
.pk-sw-band-C { height: 6px; }
.pk-sw-band-D { height: 10px; }
.pk-sw-band-E { height: 18px; }
.pk-sw-band-unknown { height: 10px; background: linear-gradient(var(--ink), var(--ink)) center / 100% 2px no-repeat, repeating-linear-gradient(90deg, rgba(22, 32, 26, 0.28) 0 2px, transparent 2px 6px); }

/* ---------- The shapes, on the live map (Leaflet paths) and in the no-script picture ----------
   Leaflet writes stroke and fill as attributes; these rules win over them. The bands get their
   width from the script (to scale at each zoom) or from the server (stroke-width). */
.pk-halo { fill: none; stroke: #fff; stroke-opacity: 0.85; stroke-width: 4; stroke-linejoin: round; }
.pk-halo-perceel { stroke-width: 4; stroke-opacity: 0.9; } /* thin, so a band reads as a band */
.pk-halo-pand_grenzend { stroke-width: 3.5; stroke-opacity: 0.7; }
.pk-shape { stroke: var(--ink); stroke-linejoin: round; transition: stroke-width 0.15s, fill 0.15s; }
.pk-shape-perceel { fill: none; stroke-width: 2.5; }
.pk-shape-perceel.is-hi { stroke-width: 4; }
/* A building that counts: the outline in full, the fill only where it lies on the parcel (a
   clip to the parcel's outline), so the filled area is the built area the answer adds up */
.pk-shape-pand_op_perceel { fill: rgba(22, 32, 26, 0.1); stroke-width: 1.5; }
.pk-fill { stroke: none; pointer-events: none; } /* fill: the hatch pattern, set as an attribute */
.pk-hatch-ground { fill: #fff; fill-opacity: 0.34; }
.pk-hatch-line { stroke: var(--ink); stroke-width: 2.2; stroke-opacity: 0.85; }
.pk-shape-pand_niet_meegeteld { fill: none; stroke-width: 1.5; stroke-dasharray: 6 4; }
.pk-shape-pand_grenzend { fill: rgba(255, 255, 255, 0.12); stroke-width: 1.6; stroke-dasharray: 0.5 4; stroke-linecap: round; }
.pk-shape.is-hi { stroke-width: 3.5; }
.pk-shape-pand_op_perceel.is-hi { fill: rgba(22, 32, 26, 0.3); }
.pk-shape-pand_niet_meegeteld.is-hi, .pk-shape-pand_grenzend.is-hi { fill: rgba(255, 255, 255, 0.45); }
.pk-band { fill: none; stroke: #fff; stroke-opacity: 0.55; stroke-linecap: butt; stroke-linejoin: round; transition: stroke-opacity 0.15s; }
.pk-band.is-hi { stroke-opacity: 0.85; }
.pk-band-unknown { fill: none; stroke: #fff; stroke-opacity: 0.8; stroke-width: 8; stroke-dasharray: 2 5; }
.pk.is-grey .pk-band { stroke: var(--ink); stroke-opacity: 0.16; }
.pk.is-grey .pk-band.is-hi { stroke-opacity: 0.32; }
.pk.is-grey .pk-band-unknown { stroke: var(--ink); stroke-opacity: 0.35; }
.pk-hit { fill: transparent; }

/* The other parcels: the Kadaster's black lines and numbers, faint on the grey map and turned
   white on the photo, so they read as a hairline net under the parcel of the address */
.pk .pk-parcels { opacity: 0.5; }
.pk.is-photo .pk-parcels, .pk-static-parcels { filter: invert(1); opacity: 0.5; }

/* The numbers on the map: stickers like the ones in the list */
.pk-num-icon { background: none; border: 0; }
.pk-num-icon .pk-num { display: flex; align-items: center; justify-content: center; box-sizing: border-box; width: 24px; height: 24px; border-radius: 50%; font: 700 0.78rem/1 var(--font); font-variant-numeric: tabular-nums; background: var(--ink); color: #fff; border: 2px solid #fff; box-shadow: 0 1px 3px rgba(22, 32, 26, 0.45); cursor: pointer; transition: transform 0.15s var(--ease); }
.pk-num-icon .pk-num-pand_niet_meegeteld, .pk-num-icon .pk-num-pand_grenzend { background: #fff; color: var(--ink); border: 1.5px dashed var(--ink); }
.pk-num-icon.is-hi .pk-num { transform: scale(1.2); }
.pk-num-icon.is-hidden { display: none; }
.pk-num circle { fill: var(--ink); stroke: #fff; stroke-width: 2; }
.pk-num text { fill: #fff; font: 700 13px var(--font); text-anchor: middle; }
.pk-num-pand_niet_meegeteld circle, .pk-num-pand_grenzend circle { fill: #fff; stroke: var(--ink); stroke-width: 1.5; stroke-dasharray: 3 2; }
.pk-num-pand_niet_meegeteld text, .pk-num-pand_grenzend text { fill: var(--ink); }

/* Leaflet, in the company's map chrome. leaflet.css loads before this file. */
.pk .leaflet-container { font-family: var(--font); background: #e9ebe6; }
/* Leaflet focuses the map from script on every click, so the ring follows the keyboard */
.pk .leaflet-container:focus { outline: none; }
.pk .leaflet-container:focus-visible { outline: 2px solid var(--signal); outline-offset: -2px; }
.pk .leaflet-top.leaflet-right { top: 2px; right: 2px; }
.pk .leaflet-bar, .pk .leaflet-touch .leaflet-bar { border: 1px solid var(--line-2); border-radius: var(--r); box-shadow: var(--shadow-label); background-clip: border-box; }
.pk .leaflet-bar a, .pk .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); }
.pk .leaflet-bar a:hover { background: var(--paper); color: var(--ink); }
.pk .leaflet-bar a:focus-visible { outline: 2px solid var(--signal); outline-offset: 1px; }
.pk .leaflet-bar a.leaflet-disabled { color: var(--line-2); background: var(--ground); }
.pk .leaflet-control-scale { margin: 0 0 10px 10px; }
.pk .leaflet-control-scale-line { border-color: var(--ink); border-width: 0 1.5px 1.5px; color: var(--ink); background: rgba(255, 255, 255, 0.86); font: 600 11px/1.4 var(--font); text-shadow: none; }
/* 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. */
.pk .pk-bg img.leaflet-tile, .pk .pk-parcels img.leaflet-tile { mix-blend-mode: normal; }

/* The address */
.leaflet-tooltip.pk-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.pk-label::before { border-top-color: var(--line-2); }

/* The facts of a shape: a small panel on the map */
.pk .pk-pop .leaflet-popup-content-wrapper { padding: 0; border: 1px solid var(--line-2); border-radius: 4px; box-shadow: var(--shadow-panel); }
.pk .pk-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); }
.pk .pk-pop .leaflet-popup-tip { border: 1px solid var(--line-2); box-shadow: none; }
.pk .pk-pop a.leaflet-popup-close-button { top: 4px; right: 4px; width: 28px; height: 28px; color: var(--muted); font: 400 20px/26px var(--font); }
.pk .pk-pop a.leaflet-popup-close-button:hover { color: var(--ink); }
.pk-pop-title { margin: 0 2rem 0.45rem 0; font-size: 0.95rem; font-weight: 650; color: var(--ink); }
.pk-pop-line { margin: 0.25rem 0 0; }

/* Stickers on the sheet: the background switch, the way back, a status, the touch hint */
.pk-topbar { position: absolute; z-index: 1000; top: 12px; right: 52px; left: 12px; display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; pointer-events: none; }
.pk-topbar > * { pointer-events: auto; }
.pk-switch { display: flex; background: #fff; border: 1px solid var(--line-2); border-radius: var(--r); box-shadow: var(--shadow-label); overflow: hidden; }
.pk-switch[hidden] { display: none; }
.pk-switch button { min-height: 34px; padding: 0.3rem 0.75rem; border: 0; background: transparent; font: inherit; font-size: 0.85rem; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.pk-switch button + button { border-left: 1px solid var(--line); }
.pk-switch button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.pk-switch button:focus-visible { outline: 2px solid var(--signal); outline-offset: -2px; }
.pk-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; }
.pk-home:hover { border-color: var(--ink); }
.pk-status { position: absolute; z-index: 1000; left: 50%; bottom: 26px; 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; }
.pk-status.is-warn { background: var(--signal-soft); border-color: #efc6bb; color: #7a2a1b; }
.pk-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; }

/* The drawn map for a page without script: the same tiles, stacked by the server */
.pk-static { position: absolute; inset: 0; }
.pk-static-svg { display: block; width: 100%; height: 100%; }
.pk-static-paper { fill: #e9ebe6; }
.pk-mark-halo { fill: none; stroke: #fff; stroke-width: 9; stroke-opacity: 0.9; }
.pk-mark-ring { fill: none; stroke: var(--ink); stroke-width: 3.5; }
.pk-mark-dot { fill: var(--signal); stroke: #fff; stroke-width: 3; }
.pk-static-label rect { fill: #fff; stroke: var(--line-2); stroke-width: 1; }
.pk-static-label text { fill: var(--signal-2); font: 650 13px var(--font); text-anchor: middle; }

/* Phones: the map from edge to edge, the key under it */
@media (max-width: 760px) {
  .pk-sheet, .pk-body { margin-inline: calc(-1 * var(--gutter)); border-left: 0; border-right: 0; border-radius: 0; }
  .pk-body { padding-inline: var(--gutter); border-bottom: 1px solid var(--line-2); }
  .pk .leaflet-control-scale { display: none; }
  .pk-topbar { top: 10px; left: 10px; right: 50px; }
  .pk .pk-pop .leaflet-popup-content { min-width: 13rem; margin: 0.55rem 0.7rem 0.6rem; font-size: 0.8rem; }
  .pk-pop-title { margin-bottom: 0.3rem; font-size: 0.86rem; }
}
/* Touch: the controls at the company's 40px */
@media (pointer: coarse) {
  .pk .leaflet-touch .leaflet-bar a { width: 40px; height: 40px; line-height: 38px; }
  .pk-topbar { right: 58px; }
  .pk-home, .pk-switch button { min-height: 40px; }
  .pk .pk-pop a.leaflet-popup-close-button { width: 36px; height: 36px; line-height: 34px; top: 0; right: 0; }
}

/* Wide screens: the panel lies over the left of the map, as on the stikstofkaart */
@media (min-width: 900px) {
  .pk { height: clamp(600px, calc(100svh - var(--header-h) - 2rem), 780px); height: round(down, clamp(600px, calc(100svh - var(--header-h) - 2rem), 780px), 1px); grid-template-columns: minmax(380px, 36%) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
  .pk-sheet { grid-column: 1 / -1; grid-row: 1; height: auto; border-radius: 6px; }
  .pk-panel { display: block; position: relative; z-index: 2; grid-column: 1; grid-row: 1; align-self: start; max-height: calc(100% - 2rem); margin: 1rem 0 1rem 1rem; overflow-y: auto; background: var(--ground); border: 1px solid var(--line-2); border-radius: 6px; box-shadow: var(--shadow-panel); scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
  .pk-head { padding: 1.2rem 1.35rem 0.2rem; }
  .pk-head h2 { font-size: clamp(1.4rem, 1.8vw, 1.7rem); }
  .pk-body { padding: 1rem 1.35rem 1.2rem; background: none; border: 0; border-radius: 0; }
  .pk-body .pk-legend { padding-top: 1rem; border-top: 1px solid var(--line-2); }
  .pk-body { padding-top: 0.8rem; }
  .pk-credit { right: 6px; bottom: 6px; border-radius: 3px; font-size: 0.7rem; }
  .pk .leaflet-bottom.leaflet-right { bottom: 22px; } /* the scale bar, above the credit */
  .pk .leaflet-control-scale { margin: 0 8px 6px 0; }
  .pk-topbar { left: auto; }
}
@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) {
  .pk-shape, .pk-band, .pk-item, .pk-num-icon .pk-num { transition: none; }
}
