/* 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: #2f7d4f;
  --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: a note in a hairline frame, not a red-edged alert (the signal colour is for the
   action and the address; a red box at the end of thirteen answers read as an error) */
.notice { margin: 1.25rem 0 0; padding: 0.8rem 1rem; background: var(--ground); 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; }
}

/* ---------- Locatiescan: the answers (templates/tool/_result.html) ----------
   Set like the tools page of the company site (LBO-website DESIGN.md, "Tools page"): an index of
   the subjects as clusters of their tools' marks, then a legend table with a strong hairline
   above every subject, the subject in a rail and one row per tool. A row: the tool's mark, its
   name as the way to the tool, its key numbers large, then its own sentences. No card, no panel,
   no colour that means good or bad. */
.btn-sm { padding: 0.55rem 0.95rem; font-size: 0.9rem; }

/* The wait: the line under the button, and the busy state the script adds on submit */
.lookup-wait { margin: 0.65rem 0 0; font-size: 0.85rem; line-height: 1.45; color: var(--muted); }
form.is-busy button[type="submit"] { cursor: progress; opacity: 0.72; box-shadow: none; transform: none; }
.lookup.is-busy .lookup-wait { color: var(--ink); font-weight: 600; }

/* The head of the result (over the map): how many tools answered, the one retry */
.scan-count { margin: 0.3rem 0 0; font-size: 0.95rem; line-height: 1.45; color: var(--ink-2); }
.scan-count strong { font-weight: 650; color: var(--ink); }
.retry { display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem 0.8rem; margin: 0.75rem 0 0; }
.retry-note { font-size: 0.85rem; line-height: 1.4; color: var(--muted); }

.scan { padding: clamp(2rem, 4vw, 3rem) 0 clamp(3rem, 6vw, 4.5rem); }
.scan-head h2 { margin: 0 0 clamp(1.25rem, 2.6vw, 1.75rem); }

/* The index: one cluster of marks per subject, one link to its block. The marks nest like the
   cells of a honeycomb: up to two side by side, three in two rows with the lower one half a cell
   in, four in two rows of two with the lower two half a cell in. Placed by class (the company page uses inline styles, which this page's policy refuses). */
.tool-index { --s: 56px; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 1.5rem clamp(1.5rem, 3vw, 2.6rem); list-style: none; margin: 0; padding: 0; }
.tool-cluster { display: flex; flex-direction: column; align-items: center; text-align: center; text-decoration: none; color: var(--ink); }
.cluster-marks { --px: calc(var(--s) * 0.9); --py: calc(var(--s) * 0.786); position: relative; display: block; width: var(--s); height: var(--s); margin-bottom: 0.5rem; transition: transform 0.25s var(--ease); }
.cluster-marks.is-2 { width: calc(var(--px) + var(--s)); }
.cluster-marks.is-3 { width: calc(var(--px) + var(--s)); height: calc(var(--py) + var(--s)); }
.cluster-marks.is-4 { width: calc(var(--px) * 1.5 + var(--s)); height: calc(var(--py) + var(--s)); }
.cluster-marks img { position: absolute; left: 0; top: 0; width: var(--s); height: var(--s); }
.cluster-marks img:nth-child(2) { left: var(--px); }
.cluster-marks img:nth-child(3) { left: calc(var(--px) / 2); top: var(--py); }
.cluster-marks img:nth-child(4) { left: calc(var(--px) * 1.5); top: var(--py); }
.cluster-name { font-size: 1rem; font-weight: 600; line-height: 1.2; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; text-decoration-color: transparent; transition: text-decoration-color 0.2s; }
.cluster-count { margin-top: 0.15rem; font-size: 0.85rem; font-weight: 500; line-height: 1.3; color: var(--muted); }
.tool-cluster:hover .cluster-name, .tool-cluster:focus-visible .cluster-name { text-decoration-color: var(--signal); }
.tool-cluster:hover .cluster-marks { transform: translateY(-2px); }

/* The way on to the tools: said once, with the address ready to copy */
.scan-onward { display: grid; gap: 0.65rem; max-width: 46rem; margin: clamp(1.75rem, 3.5vw, 2.5rem) 0 clamp(1.5rem, 3vw, 2.25rem); font-size: 0.95rem; line-height: 1.5; color: var(--ink-2); }
.scan-onward p { margin: 0; }
.scan-copy { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.scan-copy-field { flex: 1 1 15rem; max-width: 25rem; min-width: 0; padding: 0.55rem 0.75rem; font: inherit; font-size: 0.95rem; color: var(--ink); background: var(--ground); border: 1px solid var(--line-2); border-radius: var(--r); }
.scan-copy-field:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(22, 32, 26, 0.12); }
.scan-key { font-size: 0.88rem; }

/* "op dit adres": the tool itself says the address lies in an area or zone, or a register ties it.
   Ink only, as a badge (2px corners): a fact about the place, not a warning and not a grade. */
.scan-tag { display: inline-block; padding: 0 0.4rem; border: 1.5px solid var(--ink); border-radius: 2px; font-size: 0.78rem; font-weight: 650; line-height: 1.45; letter-spacing: 0; color: var(--ink); white-space: nowrap; vertical-align: 0.15em; }

/* The table: a block per subject */
.scan-table { border-bottom: 1px solid var(--line-2); }
.scan-group { display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: 0 clamp(1.5rem, 3vw, 2.5rem); border-top: 1px solid var(--line-2); scroll-margin-top: calc(var(--header-h) + 0.75rem); }
.scan-subject { margin: 0; padding: 1.55rem 0; font-size: clamp(1.3rem, 1.8vw, 1.5rem); font-stretch: 100%; letter-spacing: -0.008em; font-variation-settings: "opsz" 96; }
.scan-rows { list-style: none; margin: 0; padding: 0; }
.scan-row { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 0.35rem clamp(1rem, 2vw, 1.5rem); align-items: start; padding: 1.5rem 0; }
.scan-row + .scan-row { border-top: 1px solid var(--line); }
.scan-mark { display: block; width: 48px; height: 48px; margin-top: -0.2rem; }
.scan-name { margin: 0 0 0.6rem; font-size: 1.22rem; font-weight: 600; line-height: 1.2; letter-spacing: -0.01em; }
.scan-name a { text-decoration: none; }
.scan-name a:hover, .scan-name a:focus-visible { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 0.16em; text-decoration-color: var(--signal); }

/* The key numbers: the value first and large, its label under it, the tool's notes small */
.scan-figures { display: flex; flex-wrap: wrap; gap: 0.85rem 2.25rem; margin: 0 0 0.8rem; }
.scan-fig { display: flex; flex-direction: column; min-width: 0; max-width: 16rem; }
.scan-fig dt { order: 2; margin: 0.15rem 0 0; font-size: 0.86rem; line-height: 1.3; color: var(--ink-2); }
.scan-value { order: 1; margin: 0; line-height: 1.05; color: var(--ink); }
.scan-value b { font-size: 1.6rem; font-weight: 650; letter-spacing: -0.02em; }
/* a value that is a long name (a water board), not a number: set as text, so it does not shout */
.scan-value.is-long { line-height: 1.25; }
.scan-value.is-long b { font-size: 1.05rem; font-weight: 600; letter-spacing: 0; }
.scan-unit { font-size: 0.95rem; font-weight: 500; color: var(--ink-2); }
.scan-notes { order: 3; display: flex; flex-direction: column; margin: 0.1rem 0 0; font-size: 0.78rem; line-height: 1.4; color: var(--muted); }
.scan-zin { max-width: 64ch; margin: 0 0 0.5rem; font-size: 0.98rem; line-height: 1.55; color: var(--ink-2); text-wrap: pretty; }
.scan-zin:last-child, .scan-melding:last-child { margin-bottom: 0; }
.scan-melding { max-width: 64ch; margin: 0; font-size: 0.98rem; color: var(--ink-2); }
.scan-melding strong { color: var(--ink); }
/* A tool that did not answer: its row stays, quieter, and says so */
.scan-row.is-niet_bereikbaar .scan-mark { opacity: 0.4; }
.scan-row.is-niet_bereikbaar .scan-name a { color: var(--ink-2); }

/* After the table: the notice, the fold with every tool's own notice, the sources */
.scan-after { max-width: 52rem; margin-top: clamp(1.75rem, 3.5vw, 2.5rem); }
.scan-after .notice { margin-top: 0; }
.scan-after .fold { margin-top: 1.25rem; }
.scan-after .fold summary { cursor: pointer; font-weight: 600; }
.fold-notices { margin: 0.5rem 0 0; }
.fold-notices > div { padding: 0.6rem 0; border-top: 1px solid var(--line); font-size: 0.9rem; color: var(--ink-2); }
.fold-notices dt { font-weight: 650; color: var(--ink); }
.fold-notices dd { margin: 0.1rem 0 0; }
.scan-sources { margin: 1.25rem 0 0; font-size: 0.85rem; color: var(--muted); }

.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; }

/* The sticky subject bar: phones only */
.scan-jump { display: none; }
@media (max-width: 1000px) {
  .scan-group { grid-template-columns: 8.5rem minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .tool-index { --s: 40px; gap: 1.15rem 1.4rem; }
  .cluster-name { font-size: 0.92rem; }
  .cluster-count { font-size: 0.8rem; }
  .scan-group { display: block; scroll-margin-top: calc(var(--header-h) + 3rem); }
  .scan-jump { display: block; position: sticky; z-index: 20; top: var(--header-h); margin: 0 calc(-1 * var(--gutter)); background: rgba(246, 246, 242, 0.94); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
  .scan-jump ul { display: flex; gap: 0.2rem; overflow-x: auto; list-style: none; margin: 0; padding: 0.35rem var(--gutter); scrollbar-width: none; }
  .scan-jump a { display: block; padding: 0.45rem 0.6rem; font-size: 0.88rem; font-weight: 600; white-space: nowrap; color: var(--ink-2); text-decoration: none; border-radius: var(--r); }
  .scan-jump a:hover, .scan-jump a:focus-visible { color: var(--ink); background: var(--ground); }
  .scan-subject { padding: 1.35rem 0 0.15rem; font-size: 1.3rem; }
  .scan-row { grid-template-columns: 40px minmax(0, 1fr); gap: 0.3rem 0.9rem; padding: 1.2rem 0; }
  .scan-mark { width: 40px; height: 40px; margin-top: -0.1rem; }
  .scan-name { font-size: 1.12rem; }
  .scan-figures { display: grid; grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); gap: 0.75rem 1rem; }
  .scan-value b { font-size: 1.4rem; }
  .scan-value.is-long b { font-size: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  .tool-cluster:hover .cluster-marks { transform: none; }
}

/* ---------- Locatiescan: the map (templates/tool/_map.html, static/js/locatiekaart.js) ----------
   The company's map conventions (the stikstofkaart, LBO-website DESIGN.md): a white panel over
   the top left of the map on wide screens and above 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 the address. The design pass adds the layers. */

/* 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); }

.gk-section { padding: 0 0 clamp(1.75rem, 4vw, 3rem); }
.gk { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); scroll-margin-top: calc(var(--header-h) + 0.75rem); }

/* The head: what this is and where */
.gk-head { padding: 0 0 0.8rem; }
.gk-head h2 { margin: 0 0 0.2rem; font-size: clamp(1.45rem, 5.4vw, 1.75rem); }
.gk-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 */
.gk-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; }
.gk-map { position: absolute; inset: 0; background: #f1f1ee; }
.gk-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 subject on the map, its legend, the hint (the family's, from geluid
   op adres: there the sources switch the map, here the subjects do) */
.gk-body { padding: 1rem 1rem 1.1rem; background: var(--ground); border: 1px solid var(--line-2); border-top: 0; border-radius: 0 0 6px 6px; }
.gk-body fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.gk-label { display: block; padding: 0; margin: 0 0 0.35rem; font-size: 0.85rem; font-weight: 600; color: var(--muted); }
.gk-rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-2); }
.gk-rows li { border-bottom: 1px solid var(--line); }
.gk-src { position: relative; display: grid; grid-template-columns: 70px minmax(0, 1fr); align-items: center; column-gap: 0.6rem; min-height: 2.6rem; padding: 0.3rem 0.55rem; font-size: 0.95rem; line-height: 1.3; color: var(--ink-2); cursor: pointer; transition: background 0.15s; }
.gk-src input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: inherit; }
.gk-src:hover { background: var(--paper); color: var(--ink); }
.gk-src:has(input:checked) { background: var(--paper); color: var(--ink); font-weight: 650; }
.gk-src:has(input:focus-visible) { outline: 2px solid var(--signal); outline-offset: -2px; }
.gk-src:has(input:disabled) { cursor: default; }
.gk-src-name { min-width: 0; }
.ls-src-marks { display: flex; gap: 2px; }
.ls-src-marks img { width: 22px; height: 22px; }
.gk-legend-title { margin: 1rem 0 0.5rem; font-size: 0.9rem; font-weight: 650; color: var(--ink); }
.ls-keys { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; }
.ls-keys li { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; column-gap: 0.6rem; font-size: 0.88rem; line-height: 1.3; color: var(--ink-2); }
.ls-keys b { font-weight: 650; color: var(--ink); white-space: nowrap; }
.ls-sym { display: block; width: 30px; height: 16px; overflow: visible; }
.ls-legend-none { margin: 1rem 0 0; font-size: 0.88rem; color: var(--ink-2); }
.gk-hint { margin: 0.9rem 0 0; font-size: 0.85rem; color: var(--muted); }
.gk-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 first subject and its legend remain */
@media (scripting: none) {
  .ls-switch, .gk-hint, .ls-legend-none { display: none; }
  .ls-legend .gk-legend-title { margin-top: 0; }
}

/* What the tools found, one style per kind (apps/tool/mapview.py, _kind): the live map's paths
   (.ls-<kind>), the legend's symbols and the picture without script (.ls-s-<kind>). Ink, Natura
   Green for the two kinds of nature area, and Signal Brick only for the parcel (the address's
   own place). CSS wins over the attributes Leaflet writes. */
.ls-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.ls-hatch-n2k-bg { fill: var(--n2k); fill-opacity: 0.1; }
.ls-hatch-n2k-line { stroke: var(--n2k); stroke-width: 1.6; stroke-opacity: 0.55; }
.ls-hatch-ink-line { stroke: var(--ink); stroke-width: 1; stroke-opacity: 0.22; }
.ls-parcel, .ls-s-parcel { stroke: var(--signal); stroke-width: 2.5; stroke-opacity: 1; fill: var(--signal); fill-opacity: 0.14; }
.ls-building, .ls-s-building { stroke: var(--ink); stroke-width: 1.6; stroke-opacity: 1; fill: var(--ink); fill-opacity: 0.16; }
.ls-building-near, .ls-s-building-near { stroke: var(--ink); stroke-width: 1; stroke-opacity: 0.5; fill: var(--ink); fill-opacity: 0.05; }
.ls-n2k, .ls-s-n2k { stroke: var(--n2k); stroke-width: 2; stroke-opacity: 0.9; fill: url(#ls-hatch-n2k); fill-opacity: 1; }
/* the network's shapes are cut at 2 km by their tool: no outline, so the cut never reads as a
   boundary (natuurnetwerk-check draws only the real edges); the fill shows where the parts lie */
.ls-nnn, .ls-s-nnn { stroke: none; fill: var(--n2k); fill-opacity: 0.2; }
.ls-s-nnn { stroke: var(--n2k); stroke-width: 1; stroke-opacity: 0.5; }
.ls-zone, .ls-s-zone, .ls-quiet, .ls-s-quiet, .ls-dike-zone, .ls-s-dike-zone { stroke: var(--ink); stroke-width: 1.6; stroke-opacity: 0.85; stroke-dasharray: 7 4; fill: var(--ink); fill-opacity: 0.06; }
.ls-protected, .ls-s-protected { stroke: var(--ink); stroke-width: 1.8; stroke-opacity: 0.85; stroke-dasharray: 11 4 2 4; fill: var(--ink); fill-opacity: 0.02; }
.ls-terrain, .ls-s-terrain { stroke: var(--ink); stroke-width: 1.4; stroke-opacity: 0.85; fill: url(#ls-hatch-ink); fill-opacity: 1; }
.ls-contour, .ls-s-contour, .ls-dike-body, .ls-s-dike-body { stroke: var(--ink); stroke-width: 1; stroke-opacity: 0.9; fill: var(--ink); fill-opacity: 0.12; }
.ls-plan, .ls-s-plan { stroke: var(--ink); stroke-width: 1.1; stroke-opacity: 0.6; fill: var(--ink); fill-opacity: 0.03; }
.ls-buurt, .ls-s-buurt { stroke: var(--ink); stroke-width: 2; stroke-opacity: 0.8; stroke-dasharray: 0.5 5; stroke-linecap: round; fill: var(--ink); fill-opacity: 0.015; }
.ls-other, .ls-s-other { stroke: var(--ink); stroke-width: 1; stroke-opacity: 0.7; fill: var(--ink); fill-opacity: 0.05; }
/* a railway: ink with white ties, thin enough that a station's many tracks stay lines; a dike is
   the same line without the ties */
.ls-rail, .ls-s-rail, .ls-dike, .ls-s-dike { stroke: var(--ink); stroke-width: 3; stroke-opacity: 0.85; stroke-linecap: butt; fill: none; }
.ls-rail-ties, .ls-s-rail-ties { stroke: #fff; stroke-width: 1.2; stroke-opacity: 1; stroke-dasharray: 5 5; stroke-linecap: butt; fill: none; }
.ls-monument, .ls-s-monument { stroke: var(--ink); stroke-width: 1.6; stroke-opacity: 1; fill: #fff; fill-opacity: 1; }
.ls-monument-tied, .ls-s-monument-tied { stroke: #fff; stroke-width: 2; stroke-opacity: 1; fill: var(--ink); fill-opacity: 1; }
.ls-report, .ls-s-report, .ls-bro, .ls-s-bro { stroke: var(--ink); stroke-width: 1.1; stroke-opacity: 0.75; fill: #fff; fill-opacity: 0.6; }
.ls-station, .ls-s-station { stroke: #fff; stroke-width: 2; stroke-opacity: 1; fill: var(--ink); fill-opacity: 1; }
.ls-crossing, .ls-s-crossing { stroke: var(--ink); stroke-width: 1.6; stroke-opacity: 1; fill: #fff; fill-opacity: 1; }
.ls-measure, .ls-s-measure { stroke: var(--ink); stroke-width: 2.5; stroke-opacity: 1; stroke-dasharray: 9 7; stroke-linecap: round; fill: none; }
.ls-s-measure { stroke-dasharray: 4 3; stroke-width: 1.8; }
.ls-measure-halo, .ls-s-measure-halo { stroke: #fff; stroke-width: 6.5; stroke-opacity: 0.85; stroke-linecap: round; fill: none; }
/* hover: the shape a click would explain */
.gk .is-hover { stroke-width: 3; fill-opacity: 0.24; }
.gk .ls-n2k.is-hover, .gk .ls-terrain.is-hover { stroke-width: 3; }
.gk .ls-monument.is-hover, .gk .ls-report.is-hover, .gk .ls-bro.is-hover, .gk .ls-crossing.is-hover { fill: var(--paper); stroke-width: 2.4; }

/* The measured line's length: a sticker by the line's middle */
.leaflet-tooltip.ls-dist { padding: 4px 9px 5px; background: #fff; color: var(--ink-2); border: 1px solid var(--line-2); border-radius: 3px; box-shadow: var(--shadow-label); font: 500 12px/1.3 var(--font); white-space: nowrap; }
.ls-dist b { display: block; font-size: 15px; font-weight: 700; color: var(--ink); }
.leaflet-tooltip-right.ls-dist::before { border-right-color: var(--line-2); }

/* The click panel: what a shape is and which tool names it */
.gk .gk-pop .leaflet-popup-content-wrapper { padding: 0; border: 1px solid var(--line-2); border-radius: 4px; box-shadow: var(--shadow-panel); }
.gk .gk-pop .leaflet-popup-content { margin: 0.75rem 0.9rem 0.8rem; font: 400 0.88rem/1.4 var(--font); color: var(--ink-2); }
.gk .gk-pop .leaflet-popup-tip { border: 1px solid var(--line-2); box-shadow: none; }
.gk .gk-pop a.leaflet-popup-close-button { top: 4px; right: 4px; width: 28px; height: 28px; color: var(--muted); font: 400 20px/26px var(--font); }
.gk .gk-pop a.leaflet-popup-close-button:hover { color: var(--ink); }
.gk-pop-title { margin: 0 2rem 0.35rem 0; font-size: 0.95rem; font-weight: 650; line-height: 1.3; color: var(--ink); }
.ls-pop-line { margin: 0 0 0.2rem; }
.gk .gk-pop a.ls-pop-link { display: inline-block; margin-top: 0.25rem; font-weight: 600; color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 0.18em; }
.gk .gk-pop a.ls-pop-link:hover { text-decoration-color: var(--signal); }
.gk-pop-note { margin: 0.5rem 0 0; padding-top: 0.4rem; border-top: 1px solid var(--line); font-size: 0.78rem; line-height: 1.4; color: var(--muted); }

/* A block of the answers puts its subject on the map (shown by the script) */
.scan-show { display: inline-flex; align-items: center; gap: 0.4rem; margin: -0.9rem 0 1.2rem; padding: 0.35rem 0; background: none; border: 0; font: inherit; font-size: 0.9rem; font-weight: 600; color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; text-decoration-color: var(--line-2); cursor: pointer; }
.scan-show:hover { text-decoration-color: var(--signal); }
.scan-show[hidden] { display: none; }

/* Leaflet, in the company's map chrome. leaflet.css loads before this file. */
.gk .leaflet-container { font-family: var(--font); background: #f1f1ee; }
/* Leaflet focuses the map from script on every click, so the ring is not drawn on the map */
.gk .leaflet-container:focus { outline: none; }
.gk .leaflet-top.leaflet-right { top: 2px; right: 2px; }
.gk .leaflet-bar, .gk .leaflet-touch .leaflet-bar { border: 1px solid var(--line-2); border-radius: var(--r); box-shadow: var(--shadow-label); background-clip: border-box; }
.gk .leaflet-bar a, .gk .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); }
.gk .leaflet-bar a:hover { background: var(--paper); color: var(--ink); }
.gk .leaflet-bar a:focus-visible { outline: 2px solid var(--signal); outline-offset: 1px; }
.gk .leaflet-bar a.leaflet-disabled { color: var(--line-2); background: var(--ground); }
.gk .leaflet-control-scale { margin: 0 0 10px 10px; }
.gk .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; }

/* 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. */
.gk .gk-bg img.leaflet-tile { mix-blend-mode: normal; }

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


/* Stickers on the sheet: the way back, a status, the touch hint */
.gk-topbar { position: absolute; z-index: 1000; top: 12px; right: 52px; display: flex; pointer-events: none; }
.gk-topbar > * { pointer-events: auto; }
.gk-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; }
.gk-home:hover { border-color: var(--ink); }
.gk-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 */
.gk-static { position: absolute; inset: 0; }
.gk-static-svg { display: block; width: 100%; height: 100%; }
.gk-static-paper { fill: #f1f1ee; }
.gk-mark-halo { fill: none; stroke: #fff; stroke-width: 9; stroke-opacity: 0.9; }
.gk-mark-ring { fill: none; stroke: var(--ink); stroke-width: 3.5; }
.gk-mark-dot { fill: var(--signal); stroke: #fff; stroke-width: 3; }
.gk-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 from edge to edge */
@media (max-width: 760px) {
  .gk-sheet, .gk-body { margin-inline: calc(-1 * var(--gutter)); border-left: 0; border-right: 0; border-radius: 0; }
  .gk-body { padding-inline: var(--gutter); border-bottom: 1px solid var(--line-2); }
  .gk .leaflet-control-scale { display: none; }
  .scan-rail { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; column-gap: 1rem; }
  .scan-show { margin: 0; }
}
/* Touch: the controls at the company's 40px */
@media (pointer: coarse) {
  .gk .leaflet-touch .leaflet-bar a { width: 40px; height: 40px; line-height: 38px; }
  /* the family's 40 px for every target on a touch screen */
  .gk-src { min-height: 3rem; }
  .scan-show { min-height: 40px; }
  .scan-jump a { min-height: 40px; display: flex; align-items: center; }
  .gk .gk-pop a.leaflet-popup-close-button { width: 36px; height: 36px; line-height: 34px; top: 0; right: 0; }
  .gk-topbar { right: 58px; }
  .gk-home { min-height: 40px; }
}

/* Wide screens: the head panel lies over the top left of the map, as on the stikstofkaart */
@media (min-width: 900px) {
  .gk { height: clamp(580px, calc(100svh - var(--header-h) - 3rem), 760px); height: round(down, clamp(580px, calc(100svh - var(--header-h) - 3rem), 760px), 1px); grid-template-columns: minmax(360px, 37%) minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; }
  .gk-sheet { grid-column: 1 / -1; grid-row: 1 / -1; height: auto; border-radius: 6px; }
  .gk-head, .gk-body { position: relative; z-index: 2; grid-column: 1; margin-left: 1rem; background: var(--ground); border: 1px solid var(--line-2); box-shadow: var(--shadow-panel); }
  .gk-head { grid-row: 1; margin-top: 1rem; padding: 1.2rem 1.35rem 0.9rem; border-bottom: 0; border-radius: 6px 6px 0 0; }
  .gk-head h2 { font-size: clamp(1.45rem, 1.9vw, 1.8rem); }
  .gk-body { grid-row: 2; align-self: start; max-height: 100%; margin-bottom: 1rem; overflow-y: auto; padding: 0.4rem 1.35rem 1.2rem; border-top: 0; border-radius: 0 0 6px 6px; scrollbar-width: thin; }
  .gk-credit { right: 6px; bottom: 6px; border-radius: 3px; font-size: 0.7rem; }
  .gk .leaflet-bottom.leaflet-right { bottom: 22px; } /* the scale bar, above the credit */
  .gk .leaflet-control-scale { margin: 0 8px 6px 0; }
}
@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, .has-map .lookup > .lookup-wait { grid-column: 1 / -1; }
  .has-map .lookup .form-actions { padding-top: calc(0.93rem * 1.6 + 0.35rem); }
}
