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

/* ---------- 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 clamp(1.25rem, 4vw, 2.5rem); }
.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); }
/* The result panel, the answer and the notice: see the warmtepomp-geluid section below. */

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

/* ---------- warmtepomp-geluid ---------- */
/* The page: the form on the left, the panel with the drawing (or the result) on the right; on a
   phone the panel comes first, so the answer is the first thing after a calculation. */
main > .tool { padding: clamp(2rem, 5vw, 4rem) 0 clamp(3rem, 6vw, 5rem); }
.tool-wrap { max-width: 1140px; }
.tool .form-head { margin-bottom: 1.75rem; }
.tool-grid { display: grid; gap: 2rem; }
@media (min-width: 900px) {
  .tool-grid { grid-template-columns: minmax(0, 24rem) minmax(0, 1fr); gap: 2rem 3rem; align-items: start; }
  .tool-form { grid-column: 1; grid-row: 1; }
  .tool-panel { grid-column: 2; grid-row: 1; }
  .tool-panel-sticky { position: sticky; top: calc(var(--header-h) + 1.25rem); }
}
#uitkomst { scroll-margin-top: calc(var(--header-h) + 1rem); }

/* Error summary: every message, with a link to its field */
.error-summary { margin-bottom: 1.75rem; }
.error-summary-title { margin: 0 0 0.35rem; font-weight: 650; }
.error-summary ul { list-style: none; display: grid; gap: 0.2rem; font-size: 0.95rem; }
.error-summary a { color: inherit; text-decoration-color: currentColor; }

/* The form: three small groups between hairlines, then the folds */
.group { border: 0; border-top: 1px solid var(--line-2); padding: 1rem 0 0.35rem; margin: 0; min-width: 0; }
.tool-form > .group:first-of-type { border-top: 0; padding-top: 0; }
.group legend { float: left; width: 100%; padding: 0; margin: 0 0 0.75rem; font-size: 1.12rem; font-weight: 650; letter-spacing: -0.01em; }
.group legend + * { clear: both; }
.field label { display: flex; gap: 0.5rem; align-items: flex-start; }
.key { display: inline-grid; place-items: center; flex: none; width: 1.3rem; height: 1.3rem; margin-top: 0.02rem; border-radius: 50%; background: var(--ink); color: #fff; font-size: 0.72rem; font-weight: 700; line-height: 1; }
.input-row { display: flex; align-items: center; gap: 0.55rem; }
.field .input-row input[type="text"] { width: 9rem; flex: none; }
.unit { color: var(--ink-2); font-size: 0.95rem; }
.field-error .unit { color: var(--signal-2); }
.form-actions { margin-top: 1.25rem; }
.tool-form .btn-primary { width: 100%; }

.fold { margin: 0; border: 0; border-top: 1px solid var(--line-2); padding: 0; }
.fold:last-of-type { border-bottom: 1px solid var(--line-2); }
.fold summary { cursor: pointer; display: grid; grid-template-columns: 1rem 1fr; column-gap: 0.4rem; padding: 0.8rem 0; list-style: none; }
.fold summary::-webkit-details-marker { display: none; }
.fold summary::before { content: ""; grid-row: 1 / span 2; width: 0.5rem; height: 0.5rem; margin-top: 0.5rem; border-right: 1.6px solid var(--ink); border-bottom: 1.6px solid var(--ink); transform: rotate(-45deg); transition: transform 0.2s var(--ease); }
.fold[open] > summary::before { transform: rotate(45deg); margin-top: 0.35rem; }
.fold summary:hover .fold-title { text-decoration: underline; text-decoration-color: var(--signal); text-underline-offset: 0.18em; }
.fold-title { font-weight: 650; }
.fold-sub { grid-column: 2; font-size: 0.85rem; color: var(--muted); line-height: 1.4; }
.fold[open] { padding-bottom: 0.75rem; }
.fold > .help { margin: 0 0 1rem; }
.subgroup { border-top: 1px solid var(--line); margin-top: 1rem; padding-top: 0.85rem; }
.subtitle { font-weight: 650; margin: 0 0 0.6rem; }
.help { font-size: 0.85rem; color: var(--muted); }

.choice { border: 0; padding: 0; margin: 0 0 1.1rem; min-width: 0; }
.choice legend { font-weight: 600; font-size: 0.93rem; padding: 0; margin-bottom: 0.35rem; }
.choice-row { display: flex; gap: 1.25rem; }
.choice-opt { display: inline-flex; gap: 0.45rem; align-items: center; font-weight: 500; cursor: pointer; }
.choice-opt input { width: 1.05rem; height: 1.05rem; margin: 0; accent-color: var(--ink); }
.sides { border: 0; padding: 0; margin: 0 0 1.1rem; min-width: 0; }
.sides > legend { font-weight: 600; font-size: 0.93rem; padding: 0; margin-bottom: 0.4rem; }
.sides .choice-row-group { display: grid; grid-template-columns: 5rem auto; align-items: center; margin: 0; padding: 0.35rem 0; border-top: 1px solid var(--line); }
.sides .choice-row-group legend { float: left; margin: 0; font-weight: 500; font-size: 0.95rem; }
.sides .help { margin-top: 0.4rem; }

/* The panel: a white sheet with a hairline, like the legend panel on the company site */
.panel { position: relative; background: var(--ground); border: 1px solid var(--line-2); border-radius: 6px; box-shadow: var(--shadow-panel); padding: clamp(1.1rem, 2.6vw, 1.75rem); }
.panel-title { font-size: 1.12rem; letter-spacing: -0.01em; margin: 0 0 1rem; font-variation-settings: normal; }
.panel-note { margin: 0.9rem 0 0; font-size: 0.9rem; color: var(--ink-2); }
.stamp { position: absolute; top: -0.85rem; right: clamp(1rem, 3vw, 1.75rem); margin: 0; padding: 4px 10px; border: 1px solid var(--line-2); border-radius: 3px; background: #fff; font-size: 0.85rem; font-weight: 500; color: var(--ink-2); box-shadow: 0 6px 14px -8px rgba(22, 32, 26, 0.4), 0 1px 2px rgba(22, 32, 26, 0.12); }
.stamp-key { font-weight: 650; color: var(--signal-2); }

/* The answer: a value next to the limit, and which is higher */
.period + .period { margin-top: 1.75rem; padding-top: 1.5rem; border-top: 1px solid var(--line-2); }
.period-name { font-size: 1rem; margin: 0 0 0.75rem; }
.answer { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.5rem 0.85rem; }
.answer p { margin: 0; }
.answer-figure { display: grid; gap: 0.2rem; }
.answer-caption { font-size: 0.85rem; font-weight: 500; line-height: 1.3; color: var(--muted); }
.answer-value { font-size: 1.15rem; font-weight: 600; color: var(--ink-2); line-height: 1; white-space: nowrap; }
.result-number, .limit-number { font-size: clamp(2.35rem, 7vw, 3.4rem); font-weight: 700; letter-spacing: -0.03em; line-height: 0.95; }
.result-number { color: var(--ink); }
.limit-number { color: var(--ink-2); font-weight: 600; }
.answer-cmp { padding-bottom: 0.35rem; font-size: 1.05rem; color: var(--ink-2); }
.answer-cmp strong { color: var(--ink); }
.answer-sum { margin: 0.75rem 0 0; font-size: 0.95rem; color: var(--ink-2); }
.where { margin: 0.35rem 0 0; font-size: 0.95rem; font-weight: 600; }
.allowed-howto { margin: 0.5rem 0 0.75rem; color: var(--ink-2); }

/* The drawing (apps/tool/plan.py). Stroke widths of bars come from attributes, not from here. */
.plan { margin: 1rem 0 0; }
.plan-svg { display: block; width: 100%; max-width: 460px; height: auto; margin: 0 auto; overflow: visible; font-family: var(--font); }
.plan-svg text { font-size: 12px; fill: var(--ink-2); }
.garden { fill: var(--paper); }
.edge { stroke: var(--ink-2); stroke-width: 1.4; }
.edge-off { stroke: var(--muted); stroke-width: 1.8; stroke-dasharray: 0.1 3.6; stroke-linecap: round; }
.edge-base { stroke: var(--line-2); stroke-width: 1; }
.house { fill: #e6e9e2; }
.plan-svg .house-label { fill: var(--muted); font-size: 11px; text-anchor: middle; }
.facade { stroke: var(--ink); stroke-width: 3; }
.screen { stroke: #aeb7b0; stroke-width: 6; }
.unit { fill: var(--signal); stroke: #fff; stroke-width: 2; }
.limit { stroke: var(--ink); stroke-width: 1.2; stroke-dasharray: 5 3; fill: none; }
.plan-svg .limit-tag { fill: var(--ink); font-size: 11.5px; font-weight: 650; text-anchor: middle; }
.bar { stroke: #9aa59e; }
.bar-over { stroke: var(--ink); }
.hit { stroke: transparent; }
.pt:hover .bar { stroke: var(--ink-2); }
.pt:hover .bar-over { stroke: var(--signal-2); }
.ring { fill: none; stroke: var(--ink); stroke-width: 1.6; }
.dim line { stroke: var(--ink); stroke-width: 1.3; stroke-dasharray: 4 3; }
.dim .tick { stroke-dasharray: none; }
.dim-bg { fill: #fff; stroke: var(--line-2); stroke-width: 1; }
.key-mark { fill: var(--ink); }
.plan-svg .key-letter { fill: #fff; font-size: 10.5px; font-weight: 700; text-anchor: middle; }
.plan-svg .dim-value { fill: var(--ink); font-size: 12.5px; font-weight: 600; }
.plan-svg .name { fill: var(--muted); font-size: 11.5px; text-anchor: middle; }
.plan-svg .name-off { fill: #8b968f; }
.position rect { fill: #fff; stroke: var(--ink); stroke-width: 1.3; }
.position-outside rect { stroke-dasharray: 2 2; }
.plan-svg .position text { fill: var(--ink); font-size: 9px; font-weight: 700; text-anchor: middle; }
.tag rect { fill: #fff; stroke: var(--line-2); stroke-width: 1; }
.plan-svg .tag text { fill: var(--ink); font-size: 13px; font-weight: 600; text-anchor: middle; }
.tag-strong rect { stroke: var(--ink); stroke-width: 1.2; }
.plan-svg .tag-strong text { font-weight: 700; }

/* The legend under the drawing, in the site's legend language */
.plan-legend { margin-top: 0.9rem; }
.legend-list { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); column-gap: 1.25rem; border-top: 1px solid var(--line); }
.legend-row { display: grid; grid-template-columns: 22px 1fr; gap: 0.6rem; align-items: start; padding: 0.4rem 0; border-bottom: 1px solid var(--line); font-size: 0.85rem; line-height: 1.35; color: var(--ink-2); }
.legend-symbol { width: 22px; height: 14px; margin-top: 0.1rem; overflow: visible; }

/* Details under the drawing */
.spots { border-collapse: collapse; width: 100%; font-size: 0.9rem; margin: 1rem 0 0; }
.spots th, .spots td { text-align: left; padding: 0.4rem 0.5rem 0.4rem 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.spots th { font-weight: 600; color: var(--muted); font-size: 0.82rem; border-bottom-color: var(--line-2); }
.spots td + td, .spots th + th { text-align: right; white-space: nowrap; padding-right: 0; padding-left: 0.75rem; }
.facts { margin: 1.5rem 0 0; border-top: 1px solid var(--line-2); }
.fact-row { display: grid; grid-template-columns: minmax(0, 12rem) minmax(0, 1fr); gap: 0.25rem 1.25rem; padding: 0.6rem 0; border-bottom: 1px solid var(--line); font-size: 0.9rem; }
.fact-row dt { color: var(--muted); }
.fact-row dd { margin: 0; color: var(--ink); }
.assumed { list-style: none; display: grid; gap: 0.1rem; }
.caution { margin: 1.25rem 0 0; padding: 0.75rem 1rem; border: 1px solid var(--ink-2); border-radius: var(--r); font-size: 0.93rem; color: var(--ink); }
.notice { margin: 1.25rem 0 0; padding: 0.8rem 1rem; border: 1px solid var(--line-2); background: var(--paper); border-radius: var(--r); font-size: 0.88rem; line-height: 1.5; color: var(--ink-2); }
.scope { margin: 1rem 0 0; font-size: 0.88rem; line-height: 1.5; color: var(--ink-2); }

/* Under the two columns: the source line and the explanation */
.about { max-width: 46rem; margin-top: clamp(2.5rem, 5vw, 3.5rem); }
.about .source { font-size: 0.88rem; line-height: 1.5; }
.about .fold { border-bottom: 1px solid var(--line-2); }
.about .fold p { font-size: 0.95rem; color: var(--ink-2); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (max-width: 760px) {
  /* The tool's name is long: on a phone the header keeps the name and one link */
  .nav-links a:not(:first-child) { display: none; }
  .brand-tools .brand-name { font-size: 1.02rem; white-space: normal; }
}
@media (max-width: 520px) {
  /* The answer reads top to bottom as a sentence: the value, "is hoger dan", the limit */
  .answer { flex-direction: column; align-items: flex-start; gap: 0.3rem; }
  .answer-figure { max-width: none; }
  .answer-cmp { padding: 0; }
  /* The drawing is scaled down to the phone's width: its small words a step larger */
  .plan-svg .name, .plan-svg .house-label { font-size: 13px; }
  .plan-svg .limit-tag { font-size: 12.5px; }
  .fact-row { grid-template-columns: 1fr; }
  .legend-list { grid-template-columns: 1fr; }
}

/* ---------- Address first: the lookup, the choices, the fallback ---------- */
.lookup { max-width: 34rem; margin: 0 0 1.5rem; }
.lookup .field .input-row input[type="text"] { width: 100%; flex: 1 1 auto; min-width: 0; }
.lookup .input-row .btn { flex: none; width: auto; }
.lookup label { align-items: center; }
.choices { max-width: 34rem; margin: 0 0 1.5rem; }
.choices-title { margin: 0 0 0.5rem; font-weight: 650; }
.choice-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; }
.choice-button { width: 100%; text-align: left; font: inherit; padding: 0.65rem 0.9rem; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--ground); color: var(--ink); cursor: pointer; }
.choice-button:hover, .choice-button:focus-visible { border-color: var(--ink); }
.alert-info { background: var(--ground); color: var(--ink-2); border-color: var(--line-2); }
.manual-fold { margin-top: 1rem; max-width: 60rem; }
.manual-fold > .tool-grid { padding-top: 1rem; }
.btn-sm { padding: 0.55rem 0.95rem; font-size: 0.92rem; }

/* The address could not be fitted: not an error, the next step (type the sizes) */
.fallback { max-width: 44rem; margin: 0 0 1.75rem; padding: 1.05rem 1.25rem 1.15rem; background: var(--ground); border: 1px solid var(--line-2); border-radius: 6px; }
.fallback-title { margin: 0 0 0.35rem; font-size: 1.2rem; letter-spacing: -0.01em; font-variation-settings: normal; }
.fallback-place { margin: 0 0 0.5rem; font-size: 0.95rem; font-weight: 650; color: var(--ink-2); }
.fallback-reason { margin: 0 0 0.35rem; color: var(--ink); }
.fallback-next { margin: 0; font-size: 0.92rem; color: var(--ink-2); }

/* The two steps, in the route language of the company site: a numbered station, filled when done */
.station { display: inline-grid; place-items: center; flex: none; width: 1.5rem; height: 1.5rem; border: 2px solid var(--ink); border-radius: 50%; background: var(--ground); color: var(--ink); font-size: 0.74rem; font-weight: 700; line-height: 1; letter-spacing: 0; }
.station.is-done { background: var(--ink); color: #fff; }

/* With a map on the page the search steps back, so the map starts high on the screen */
.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 { margin-bottom: 1.4rem; }
.has-map .lookup .field { margin-bottom: 0; }
.has-map .lookup .help { display: none; }

/* ---------- The sheet: the map with its panel (templates/tool/_sheet.html) ----------
   The family's map (geluid-op-adres, the stikstofkaart): on a phone the head above the map and
   the panel right under it, the map from edge to edge; on a wide screen the panel lies over the
   left of the map. Overlays are Ink on a white halo, the unit is the one Signal Brick dot; the
   map raster is never tinted. */
:root { --shadow-label: 0 6px 14px -8px rgba(22, 32, 26, 0.4), 0 1px 2px rgba(22, 32, 26, 0.12); --gutter: clamp(1.25rem, 4vw, 2.5rem); }
.sheet-form { margin: 0; }
.sheet { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); margin: 0 0 clamp(1.75rem, 4vw, 2.75rem); scroll-margin-top: calc(var(--header-h) + 0.75rem); }
.sheet-head { padding: 0 0 0.75rem; }
.sheet-title { display: flex; align-items: center; gap: 0.6rem; margin: 0; font-size: clamp(1.25rem, 4.6vw, 1.5rem); letter-spacing: -0.012em; }
.sheet-place { margin: 0.2rem 0 0 2.1rem; font-size: 0.95rem; line-height: 1.4; color: var(--ink-2); }
.sheet-map { position: relative; height: clamp(300px, 52svh, 500px); overflow: hidden; isolation: isolate; background: #e9e9e4; border: 1px solid var(--line-2); border-radius: 6px 6px 0 0; }
.plaatskaart-map { position: absolute; inset: 0; z-index: 0; background: #e9e9e4; }
.sheet-body { padding: 1rem 1.1rem 1.15rem; background: var(--ground); border: 1px solid var(--line-2); border-top: 0; border-radius: 0 0 6px 6px; }

/* Stickers on the sheet: the background switch, the invitation, the status, the credit */
.plaatskaart-switch { position: absolute; z-index: 1000; top: 10px; right: 54px; display: flex; background: var(--ground); border: 1px solid var(--line-2); border-radius: var(--r); box-shadow: var(--shadow-label); overflow: hidden; }
.plaatskaart-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; }
.plaatskaart-switch button + button { border-left: 1px solid var(--line); }
.plaatskaart-switch button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.plaatskaart-switch button:focus-visible { outline: 2px solid var(--signal); outline-offset: -2px; }
.plaatskaart-invite, .plaatskaart-status { position: absolute; z-index: 1000; left: 50%; bottom: 1.9rem; width: max-content; max-width: calc(100% - 2rem); margin: 0; transform: translateX(-50%); background: #fff; border: 1px solid var(--line-2); border-radius: 3px; box-shadow: var(--shadow-label); color: var(--ink); text-align: center; pointer-events: none; }
.plaatskaart-invite { padding: 0.45rem 0.85rem; font-size: 0.98rem; font-weight: 650; }
.plaatskaart-invite::before { content: ""; display: inline-block; width: 0.7rem; height: 0.7rem; margin-right: 0.5rem; border-radius: 50%; background: var(--signal); box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px var(--ink); vertical-align: -0.05rem; }
.plaatskaart-status { padding: 0.3rem 0.7rem; font-size: 0.85rem; font-weight: 500; color: var(--ink-2); }
.plaatskaart-status.is-warn { border-color: var(--ink-2); color: var(--ink); font-weight: 600; }
.plaatskaart-status.is-busy { font-weight: 650; color: var(--ink); }
.plaatskaart-status.is-own { border-color: var(--ink-2); font-weight: 600; color: var(--ink); }
.plaatskaart-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); }

/* Leaflet in the company's map chrome. leaflet.css loads after this file: two classes deep. */
.sheet .leaflet-container { font-family: var(--font); background: #e9e9e4; cursor: crosshair; }
.sheet .leaflet-container:focus { outline: none; }
.sheet .leaflet-container:focus-visible { outline: 2px solid var(--signal); outline-offset: -2px; }
/* with the keyboard, Enter places the unit in the middle of the free part of the view: show where */
.sheet .leaflet-container:focus-visible::after { content: ""; position: absolute; z-index: 1000; left: calc((100% + var(--free-left, 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); }
.sheet .leaflet-container .leaflet-control-container .leaflet-top.leaflet-right { top: 0; right: 0; }
.sheet .leaflet-container .leaflet-bar { border: 1px solid var(--line-2); border-radius: var(--r); box-shadow: var(--shadow-label); background-clip: border-box; }
.sheet .leaflet-container .leaflet-bar a { width: 34px; height: 34px; line-height: 32px; color: var(--ink); font: 500 19px/32px var(--font); border-bottom-color: var(--line); }
.sheet .leaflet-container .leaflet-bar a:hover { background: var(--paper); color: var(--ink); }
.sheet .leaflet-container .leaflet-bar a:focus-visible { outline: 2px solid var(--signal); outline-offset: 1px; }
.sheet .leaflet-container .leaflet-bar a.leaflet-disabled { color: var(--line-2); background: var(--ground); }
.sheet .leaflet-container .leaflet-control-scale { margin: 0 0 1.9rem 10px; }
.sheet .leaflet-container .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; }

/* What is drawn: Ink on a white halo, so it reads on a dark roof, a bright lawn and the grey map */
.sheet .leaflet-container .plaats-veil { fill: #fff; fill-opacity: 0.3; stroke: none; }
.sheet .leaflet-container .plaats-halo { fill: none; stroke: #fff; stroke-opacity: 0.95; stroke-linejoin: round; }
.sheet .leaflet-container .plaats-perceel { fill: none; stroke: var(--ink); stroke-linejoin: round; }
.sheet .leaflet-container .plaats-woning { fill: #fff; fill-opacity: 0.5; stroke: var(--ink); stroke-opacity: 0.85; }
.sheet .leaflet-container .plaats-rechthoek-vlak { fill: #fff; fill-opacity: 0.24; stroke: none; }
.sheet .leaflet-container .plaats-rechthoek { fill: none; stroke: var(--ink); stroke-dasharray: 7 5; stroke-linecap: butt; }
.sheet .leaflet-container .plaats-ring { fill: none; stroke: var(--ink); }
.sheet .leaflet-container .plaats-geweigerd { fill: #fff; fill-opacity: 0.4; stroke: var(--ink); stroke-dasharray: 3 3; }
/* the unit: the one red dot, with a white ring and an ink edge; a 40px target */
.sheet .plaats-unit { background: transparent; border: 0; cursor: grab; }
.sheet .plaats-unit span { display: block; width: 24px; height: 24px; margin: 8px; border-radius: 50%; background: var(--signal); border: 3px solid #fff; box-shadow: 0 0 0 2px var(--ink), 0 3px 10px rgba(22, 32, 26, 0.45); transition: transform 0.2s var(--ease); }
.sheet .plaats-unit:hover span { transform: scale(1.1); }
.sheet .leaflet-dragging .plaats-unit, .sheet .leaflet-dragging .plaats-unit span { cursor: grabbing; }
.sheet .leaflet-dragging .plaats-unit span { transform: scale(1.18); }
/* labels: a sticker for the answer, plain words on a halo for the sides */
.sheet .leaflet-tooltip.plaats-sticker { padding: 4px 9px 5px; background: #fff; border: 1px solid var(--line-2); border-radius: 3px; box-shadow: var(--shadow-label); color: var(--muted); font: 500 12px/1.3 var(--font); white-space: nowrap; }
.sheet .leaflet-tooltip.plaats-sticker b { display: block; color: var(--ink); font-size: 20px; font-weight: 700; letter-spacing: -0.015em; line-height: 1.1; }
.sheet .leaflet-tooltip.plaats-sticker b small { margin-left: 0.2em; font-size: 13px; font-weight: 600; letter-spacing: 0; color: var(--ink-2); }
.sheet .leaflet-tooltip.plaats-sticker.is-small b { font-size: 14px; }
.sheet .leaflet-tooltip-right.plaats-sticker::before { border-right-color: var(--line-2); }
.sheet .leaflet-tooltip-left.plaats-sticker::before { border-left-color: var(--line-2); }
.sheet .leaflet-tooltip-top.plaats-sticker::before { border-top-color: var(--line-2); }
.sheet .leaflet-tooltip-bottom.plaats-sticker::before { border-bottom-color: var(--line-2); }
.sheet .leaflet-tooltip.plaats-sticker.is-askew::before { display: none; }
.sheet .leaflet-tooltip.plaats-side { padding: 0; background: none; border: 0; box-shadow: none; color: var(--ink); font: 650 12px/1.2 var(--font); white-space: nowrap; text-shadow: 0 0 2px #fff, 0 0 2px #fff, 0 0 3px #fff, 0 0 5px #fff; }
.sheet .leaflet-tooltip.plaats-side::before { display: none; }

/* The panel: the answer, the next step, the sound power, the key */
.sheet.is-live [data-tik-melding] { display: none; } /* the map says it, on the spot */
.sheet-note { margin: 0 0 0.9rem; padding: 0.6rem 0.8rem; background: var(--paper); border: 1px solid var(--line-2); border-radius: var(--r); font-size: 0.95rem; line-height: 1.45; color: var(--ink); }
.sheet-lead { margin: 0.35rem 0 0; font-size: 1rem; line-height: 1.5; color: var(--ink-2); }
.sheet-answer { margin: 0.4rem 0 0; }
.sheet-answer .period + .period { margin-top: 1rem; padding-top: 0.9rem; }
.sheet .result-number, .sheet .limit-number { font-size: clamp(2.5rem, 9vw, 3.25rem); }
.sheet .answer { flex-direction: column; align-items: flex-start; gap: 0.3rem; }
.sheet .answer-cmp { padding: 0; }
.sheet .answer-sum { margin-top: 0.55rem; font-size: 0.88rem; }
.sheet .allowed-howto { margin: 0.6rem 0 0; font-size: 0.95rem; line-height: 1.5; color: var(--ink); }
.answer-was { display: inline-block; margin: 0.5rem 0 0; padding: 1px 8px; background: var(--paper); border: 1px solid var(--line-2); border-radius: 3px; font-size: 0.82rem; font-weight: 600; color: var(--ink-2); }
.sheet-own-key { font-weight: 700; color: var(--signal-2); }
.sheet-next { margin: 0.9rem 0 0; padding-top: 0.8rem; border-top: 1px solid var(--line); font-size: 0.92rem; line-height: 1.45; color: var(--ink-2); }
.sheet-next strong { color: var(--ink); }
.sheet-lw { margin: 0.9rem 0 0; padding-top: 0.85rem; border-top: 1px solid var(--line-2); }
.sheet-lw .input-row input[type="text"] { width: 6.5rem; flex: none; }
.sheet-lw .btn { margin-left: auto; }
.sheet-key { list-style: none; margin: 1rem 0 0; padding: 0; border-top: 1px solid var(--line-2); }
.sheet-key li { display: grid; grid-template-columns: 22px minmax(0, 1fr); column-gap: 0.7rem; align-items: start; padding: 0.45rem 0; border-bottom: 1px solid var(--line); font-size: 0.9rem; line-height: 1.35; color: var(--ink-2); }
.sheet-key strong { font-weight: 650; color: var(--ink); }
.key-symbol { width: 22px; height: 14px; margin-top: 0.12rem; overflow: visible; }
.key-note { display: block; margin-top: 0.15rem; font-size: 0.84rem; line-height: 1.4; color: var(--ink-2); }
.key-measure { margin-top: 0.35rem; color: var(--ink); font-weight: 500; }
.key-src { color: var(--muted); }
.mk-unit-ring { fill: var(--ink); }
.mk-unit { fill: var(--signal); stroke: #fff; stroke-width: 1.6; }
.mk-halo { stroke: var(--line); stroke-width: 6; stroke-linecap: round; }
.mk-parcel { stroke: var(--ink); stroke-width: 2.4; stroke-linecap: round; }
.mk-house { fill: #eceee8; stroke: var(--ink); stroke-width: 1.3; }
.mk-rect-fill { fill: var(--paper); stroke: var(--line-2); stroke-width: 1; }
.mk-rect-halo { fill: none; stroke: #fff; stroke-width: 3.4; }
.mk-rect { fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-dasharray: 3.2 2.4; }
.mk-halo-ring { fill: none; stroke: var(--line); stroke-width: 4.5; }
.mk-ring { fill: none; stroke: var(--ink); stroke-width: 2; }

/* Recalculating: the old answer steps back at once, the new one rises in after the post */
.sheet.is-busy .sheet-answer, .sheet.is-busy .answer-was { opacity: 0.35; transition: opacity 0.15s; }
.answer.is-new .answer-value { animation: answer-rise 0.5s var(--ease) both; }
@keyframes answer-rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Under the sheet: the sizes and options (the same form), and the detail of the answer */
.below { display: grid; gap: 2rem; }
.below-form .form-actions { margin-top: 1.25rem; }
.below-form .btn-primary { width: 100%; }
.detail { position: relative; background: var(--ground); border: 1px solid var(--line-2); border-radius: 6px; padding: clamp(1.1rem, 2.6vw, 1.75rem); }
.detail-title { margin: 0 0 0.35rem; font-size: 1.2rem; letter-spacing: -0.01em; font-variation-settings: normal; }
.detail-lead { margin: 0 0 0.5rem; max-width: 40rem; font-size: 0.92rem; line-height: 1.5; color: var(--ink-2); }
.period-at { margin: 0.75rem 0 0; font-size: 0.92rem; color: var(--ink-2); }

/* The estimates: one line that states them, a fold to change them */
.estimates summary { grid-template-columns: 1rem minmax(0, 1fr) auto; }
.estimates summary::before { grid-row: 1 / span 2; }
.estimates-values { display: flex; flex-wrap: wrap; gap: 0.25rem 0.85rem; margin-top: 0.35rem; font-size: 0.88rem; color: var(--ink); }
.estimate { display: inline-flex; align-items: center; gap: 0.35rem; white-space: nowrap; }
.estimate .key { width: 1.15rem; height: 1.15rem; font-size: 0.64rem; }
.estimates-edit { grid-column: 3; grid-row: 1 / span 2; align-self: start; padding: 0.3rem 0.7rem; background: var(--ground); border: 1px solid var(--line-2); border-radius: var(--r); font-size: 0.85rem; font-weight: 600; color: var(--ink); }
.estimates summary:hover .estimates-edit { border-color: var(--ink); }
.estimates[open] .estimates-edit { display: none; }
.estimates-help { margin: 0 0 1rem; font-size: 0.9rem; color: var(--ink-2); }
.estimates.is-own .fold-title { color: var(--signal-2); }

/* Without script: no map to tap, the panel tells how to go on and the sizes are typed */
.no-script { display: none; }
@media (scripting: none) {
  .sheet-map, .needs-script { display: none; }
  .no-script { display: inline; }
  .sheet-head { padding-bottom: 0.6rem; }
  .sheet-body { border-top: 1px solid var(--line-2); border-radius: 6px; }
}

/* Phones: the map from edge to edge, the panel under it */
@media (max-width: 760px) {
  .sheet-map, .sheet-body { margin-inline: calc(-1 * var(--gutter)); border-left: 0; border-right: 0; border-radius: 0; }
  .sheet-body { padding-inline: var(--gutter); border-bottom: 1px solid var(--line-2); }
  .sheet .leaflet-container .leaflet-control-scale { display: none; }
  .has-map .lead { display: none; }
}
@media (pointer: coarse) {
  .sheet .leaflet-container .leaflet-bar a { width: 40px; height: 40px; line-height: 38px; }
  .plaatskaart-switch { right: 60px; }
  .plaatskaart-switch button { min-height: 40px; }
}

/* Wide screens: the panel lies over the left of the map, as on the stikstofkaart */
@media (min-width: 900px) and (scripting: enabled) {
  .sheet { height: clamp(560px, calc(100svh - var(--header-h) - 2.5rem), 740px); grid-template-columns: min(400px, 40%) minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .sheet-map { grid-column: 1 / -1; grid-row: 1 / -1; height: auto; border-radius: 6px; }
  .sheet-head, .sheet-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); }
  .sheet-head { grid-row: 1; margin-top: 1rem; padding: 1.15rem 1.35rem 0.3rem; border-bottom: 0; border-radius: 6px 6px 0 0; }
  .sheet-body { grid-row: 2; align-self: start; max-height: 100%; margin-bottom: 1rem; overflow-y: auto; padding: 0.5rem 1.35rem 1.2rem; border-top: 0; border-radius: 0 0 6px 6px; scrollbar-width: thin; }
  .plaatskaart-invite, .plaatskaart-status { left: calc((min(400px, 40%) + 1rem + 100%) / 2); max-width: calc(100% - min(400px, 40%) - 3rem); }
  .plaatskaart-credit { right: 6px; bottom: 6px; border-radius: 3px; font-size: 0.7rem; }
  .sheet .leaflet-container .leaflet-control-scale { display: none; }
  /* the comparison on one row again, the captions wrap instead: the key stays in view */
  .sheet .answer { flex-direction: row; flex-wrap: nowrap; align-items: flex-end; gap: 0.75rem; }
  .sheet .answer-level, .sheet .answer-limit { max-width: 7.6rem; }
  .sheet .answer-allowed .answer-level { max-width: none; }
  .sheet .answer-cmp { padding-bottom: 0.3rem; white-space: nowrap; }
  .sheet .result-number, .sheet .limit-number { font-size: 2.6rem; }
}
@media (min-width: 900px) {
  .below.has-result { grid-template-columns: minmax(0, 22rem) minmax(0, 1fr); gap: 2rem 3.5rem; align-items: start; }
  .below:not(.has-result) .below-form { max-width: 30rem; }
}
@media (prefers-reduced-motion: reduce) {
  .answer.is-new .answer-value { animation: none; }
  .sheet .plaats-unit span, .sheet.is-busy .sheet-answer { transition: none; }
}
