/* ── Reset & variabelen ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Brandbook zelfstikstofberekenen.nl — primair donker blauwgrijs + mosgroen,
     secundair zacht zachtgroen. Oude --blauw-* aliases blijven bestaan zodat
     bestaande klassen door blijven werken zonder grote refactor. */
  --primair:      #30444e;   /* donker blauwgrijs — huiskleur 1 */
  --primair-hover:#243440;
  --accent:       #87b348;   /* mosgroen — huiskleur 2, call-to-action */
  --accent-hover: #71992f;
  --zacht:        #7ea68d;   /* zachtgroen — secundair 1 */
  --zacht-licht:  #c9dbc7;   /* zeer licht zachtgroen — secundair 2 */
  --bg-zacht:     #f1f6ed;   /* afgeleid: heel licht groen voor info-panels */

  /* Backward-compatible aliases — alle .btn/.kaart/etc. die nog --blauw-* gebruiken
     pakken nu vanzelf de huiskleur. Niet verwijderen tot we de hele CSS hebben
     omgezet. */
  --blauw:       var(--primair);
  --blauw-hover: var(--primair-hover);
  --blauw-licht: var(--bg-zacht);
  --blauw-rand:  var(--zacht-licht);

  --tekst:       #1a2332;
  --tekst-licht: #6b7280;
  --rand:        #e2e8f0;
  --bg:          #f8fafc;
  --wit:         #ffffff;
  --succes:      #16a34a;
  --succes-bg:   #f0fdf4;
  --succes-rand: #bbf7d0;
  --warn:        #d97706;
  --warn-bg:     #fffbeb;
  --warn-rand:   #fde68a;
  --fout:        #dc2626;
  --fout-bg:     #fef2f2;
  --fout-rand:   #fecaca;
  --term-bg:     #0f172a;
  --term-tekst:  #94a3b8;
  --font:        'Noto Sans', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  --mono:        'Cascadia Code', 'Consolas', monospace;
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--tekst);
  min-height: 100vh;
  display: flex; flex-direction: column;
  font-size: 15px; line-height: 1.6;
}

/* ── Header ─────────────────────────────────────────────────────────────── */
.header {
  background: var(--blauw);
  padding: 0 24px; height: 60px;
  display: flex; align-items: center;
  box-shadow: 0 2px 12px rgba(0,0,0,.18);
  flex-shrink: 0;
}
.header-inner {
  max-width: 860px; width: 100%;
  margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
}
.brand {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none; color: inherit;
}
.brand-logo {
  /* Brand-logo zonder achtergrond — staat direct op de header (donker blauwgrijs).
     Geen witte plate meer; lichte drop-shadow voor diepte zonder kader. */
  height: 46px; width: 46px; object-fit: contain;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.25));
}
.brand-tekst { display: flex; flex-direction: column; line-height: 1.15; }
.brand-naam  { font-size: 16px; font-weight: 700; color: #fff; letter-spacing: .01em; }
.brand-sub   { font-size: 11px; color: rgba(255,255,255,.78); }
.header-link { font-size: 13px; color: rgba(255,255,255,.8); text-decoration: none; }
.header-link:hover { color: #fff; text-decoration: underline; }

/* ── Wizard wrap ─────────────────────────────────────────────────────────── */
.wizard-wrap {
  max-width: 780px; width: 100%;
  margin: 0 auto; padding: 32px 20px 60px;
  flex: 1;
}

/* ── Stap-indicator ──────────────────────────────────────────────────────── */
.stap-indicator {
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 36px; gap: 0;
}
.stap-item {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  cursor: default;
}
.stap-nr {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--rand); color: var(--tekst-licht);
  font-size: 14px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  transition: all .2s;
}
.stap-lbl {
  font-size: 11.5px; font-weight: 600; color: var(--tekst-licht);
  text-transform: uppercase; letter-spacing: .5px;
  transition: color .2s;
}
.stap-item.actief .stap-nr   { background: var(--blauw); color: #fff; }
.stap-item.actief .stap-lbl  { color: var(--blauw); }
.stap-item.gedaan .stap-nr   { background: var(--succes); color: #fff; }
.stap-item.gedaan .stap-lbl  { color: var(--succes); }

.stap-lijn {
  flex: 1; height: 2px; background: var(--rand); min-width: 40px;
  margin: 0 8px; margin-bottom: 22px;
}

/* ── Stap-inhoud ──────────────────────────────────────────────────────────── */
.stap-inhoud { display: none; }
.stap-inhoud.actief { display: block; }

.stap-titel {
  font-size: 22px; font-weight: 700; color: var(--tekst);
  margin-bottom: 6px;
}
.stap-sub {
  font-size: 14px; color: var(--tekst-licht);
  margin-bottom: 28px;
}

/* ── Type kaarten ─────────────────────────────────────────────────────────── */
.type-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
  margin-bottom: 24px;
}
.type-kaart {
  background: var(--wit); border: 2px solid var(--rand);
  border-radius: 12px; padding: 20px;
  cursor: pointer; transition: all .15s;
  display: flex; flex-direction: column; gap: 6px;
}
.type-kaart:hover  { border-color: var(--blauw-rand); background: var(--blauw-licht); }
.type-kaart.actief { border-color: var(--blauw); background: var(--blauw-licht);
                     box-shadow: 0 0 0 3px rgba(26,95,168,.12); }
.type-ico   { font-size: 32px; }
.type-naam  { font-size: 16px; font-weight: 700; }
.type-omschr { font-size: 13px; color: var(--tekst-licht); line-height: 1.4; }

/* ── Contact melding ─────────────────────────────────────────────────────── */
.contact-melding {
  background: #f0f9ff; border: 1px solid #bae6fd;
  border-radius: 10px; padding: 24px 28px; text-align: center;
  margin-bottom: 24px;
}
.contact-ico { font-size: 36px; margin-bottom: 10px; }
.contact-melding h3 { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.contact-melding p  { font-size: 14px; color: var(--tekst-licht); line-height: 1.6; }
.contact-melding a  { color: var(--blauw); font-weight: 600; text-decoration: none; }
.contact-melding a:hover { text-decoration: underline; }

/* ── Formulier secties ───────────────────────────────────────────────────── */
.form-sectie {
  background: var(--wit); border: 1px solid var(--rand);
  border-radius: 10px; padding: 20px 22px; margin-bottom: 16px;
}
.sectie-kop-klein {
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .5px; color: var(--blauw); margin-bottom: 14px;
}
.veld-rij {
  display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 12px;
  align-items: flex-start;
}
.veld-rij:last-child { margin-bottom: 0; }

/* min-width:0 — zonder dit krijgt een flex-item de breedte van zijn inhoud als
   ondergrens. De datum-rij (drie selects naast elkaar) werd daardoor breder dan
   het scherm en liet de héle pagina horizontaal scrollen op een telefoon. */
.veld { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.veld-xs { flex: 0 0 90px; }
.veld-sm { flex: 0 0 170px; }
.veld-xl { flex: 1 1 220px; }

label { font-size: 12.5px; font-weight: 600; color: var(--tekst-licht); }
.req  { color: var(--fout); }

input[type="text"],
input[type="number"],
input[type="date"],
select {
  font-family: var(--font); font-size: 14px; color: var(--tekst);
  border: 1px solid var(--rand); border-radius: 6px;
  padding: 8px 10px; background: var(--wit);
  outline: none; transition: border-color .12s, box-shadow .12s;
  width: 100%;
}
input:focus, select:focus {
  border-color: var(--blauw);
  box-shadow: 0 0 0 3px rgba(26,95,168,.12);
}
.veld-hint {
  flex: 1 1 100%; font-size: 12.5px; color: var(--tekst-licht);
  padding-top: 4px; align-self: flex-end;
}
/* Uitkomstregel: een waarde die de app zelf heeft bepaald, met een link om
   hem alsnog aan te passen. Geen invulveld, want er valt niets in te vullen. */
.uitkomst-rij {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  margin-top: 10px; padding: 9px 12px;
  background: #f8f9fa; border: 1px solid var(--rand); border-radius: 6px;
}
.uitkomst-label { font-size: 12.5px; font-weight: 600; color: var(--tekst-licht); }
.uitkomst-waarde { font-size: 14px; font-weight: 600; color: var(--blauw); flex: 1 1 auto; min-width: 0; }
.uitkomst-waarde.uitkomst-leeg { font-weight: 400; color: #888; font-style: italic; }
.uitkomst-rij .btn-link { font-size: 12.5px; padding: 0; }

/* Detailblok: verantwoording die klopt maar die de klant niet hoeft te lezen
   voordat hij verder kan. Zelfde patroon als de coördinaten. */
.detail-blok > summary {
  cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--tekst-licht);
  padding: 6px 0;
}
.detail-blok > summary:hover { color: var(--blauw); }

.route-status-leeg { color: #a07000; font-weight: 600; }

/* Ingeklapte coördinaten: technisch, maar de klant hoeft er niets mee. */
.coord-blok > summary {
  cursor: pointer; font-size: 12.5px; color: var(--tekst-licht);
  padding: 6px 0; list-style-position: inside;
}
.coord-blok > summary:hover { color: var(--blauw); }

/* Woordmeter onder de omschrijvingsvelden — stuurt bij zonder te blokkeren. */
.woordmeter { transition: color .15s; }
.woordmeter-bezig { color: #a07000; }
.woordmeter-goed  { color: var(--accent, #87b348); font-weight: 600; }

.veld-hint a { color: var(--blauw); text-decoration: none; font-weight: 500; }
.veld-hint a:hover { text-decoration: underline; }

/* ── Preset kaarten ──────────────────────────────────────────────────────── */
.preset-grid {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px;
  margin-bottom: 6px;
}
.preset-kaart {
  background: var(--wit); border: 2px solid var(--rand);
  border-radius: 10px; padding: 16px;
  cursor: pointer; transition: all .15s;
}
.preset-kaart:hover  { border-color: var(--blauw-rand); background: var(--blauw-licht); }
.preset-kaart.actief { border-color: var(--blauw); background: var(--blauw-licht);
                       box-shadow: 0 0 0 3px rgba(26,95,168,.12); }
.preset-kop {
  display: flex; flex-direction: column; gap: 2px; margin-bottom: 10px;
}
.preset-label    { font-size: 16px; font-weight: 700; }
.preset-bezoekers { font-size: 12px; color: var(--tekst-licht); font-weight: 600; }
.preset-lijst    { font-size: 12.5px; color: var(--tekst-licht); padding-left: 16px; }
.preset-lijst li { margin-bottom: 3px; }

/* ── Navigatie knoppen ───────────────────────────────────────────────────── */
.nav-knoppen {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 28px; gap: 12px;
}

/* ── Knoppen ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 22px; border: none; border-radius: 7px;
  font-family: var(--font); font-size: 14.5px; font-weight: 600;
  cursor: pointer; transition: all .13s; text-decoration: none; white-space: nowrap;
  /* Lange knoplabels (welkomstmodal) mogen op smalle schermen wél afbreken,
     anders duwen ze de pagina breder dan het scherm. */
  max-width: 100%;
}
.btn-primair {
  /* Brand-CTA: mosgroene accentkleur i.p.v. blauw. Primaire actie staat hierdoor
     visueel los van neutraal/structureel groen (download/succes) hieronder. */
  background: var(--accent); color: #fff;
}
.btn-primair:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(135,179,72,.35); }
.btn-primair:disabled { background: #b4c6a0; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-ghost {
  background: transparent; color: var(--tekst-licht); border: 1px solid var(--rand);
}
.btn-ghost:hover { background: var(--bg); color: var(--tekst); }

.btn-download {
  background: var(--primair); color: #fff;
  font-size: 15px; padding: 12px 26px;
}
.btn-download:hover { background: var(--primair-hover); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(48,68,78,.25); }

/* ── Voortgang stappen ───────────────────────────────────────────────────── */
.voortgang-blok { margin-bottom: 24px; }
.voortgang-blok h2 { margin-bottom: 24px; }

.voortgang-stappen {
  display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px;
}
.vs-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px; background: var(--wit);
  border: 1px solid var(--rand); border-radius: 8px;
  font-size: 14px; color: var(--tekst-licht);
  transition: all .2s;
}
.vs-item.actief  { border-color: var(--blauw-rand); background: var(--blauw-licht); color: var(--blauw); }
.vs-item.gedaan  { border-color: var(--succes-rand); background: var(--succes-bg); color: var(--succes); }
.vs-item.fout    { border-color: var(--fout-rand); background: var(--fout-bg); color: var(--fout); }
.vs-ico { font-size: 18px; width: 24px; text-align: center; }

/* ── Compacte log ─────────────────────────────────────────────────────────── */
.log-compact {
  background: var(--term-bg); border-radius: 8px;
  padding: 10px 14px; max-height: 180px; overflow-y: auto;
}
.log-compact pre {
  font-family: var(--mono); font-size: 12px;
  color: var(--term-tekst); white-space: pre-wrap; word-break: break-all;
  line-height: 1.6;
}
.log-compact pre .log-fout { color: #f87171; }
.log-compact::-webkit-scrollbar       { width: 4px; }
.log-compact::-webkit-scrollbar-track { background: transparent; }
.log-compact::-webkit-scrollbar-thumb { background: #334155; border-radius: 2px; }

/* ── Resultaat kaart ─────────────────────────────────────────────────────── */
.resultaat-kaart {
  border-radius: 14px; overflow: hidden;
  border: 1px solid var(--rand);
  box-shadow: 0 4px 24px rgba(0,0,0,.08);
}

/* v1.5.6 — vergrendelde staat: zolang er niet betaald is mag alleen het
   slotscherm zichtbaar zijn. Als CSS-regel op de kaart i.p.v. per element,
   omdat ux-extras.js het uitlegblok (mét de uitkomst erin) achteraf inspuit;
   die zou anders alsnog verschijnen. */
.resultaat-kaart.vergrendeld > *:not(#resultaat-conclusie) { display: none !important; }

.resultaat-conclusie {
  padding: 32px 28px; text-align: center;
}
.resultaat-conclusie.geen-effect  { background: var(--succes-bg); }
.resultaat-conclusie.heeft-effect { background: var(--warn-bg); }
.resultaat-conclusie.fout         { background: var(--fout-bg); }

.res-ico       { font-size: 52px; margin-bottom: 12px; }
.res-hoofd     { font-size: 22px; font-weight: 800; margin-bottom: 8px; }
.res-waarde    { font-size: 36px; font-weight: 900; margin: 8px 0; }
.res-eenheid   { font-size: 15px; color: var(--tekst-licht); }
.res-conclusie { font-size: 15px; margin-top: 10px; max-width: 500px; margin-left: auto; margin-right: auto; line-height: 1.6; }

.geen-effect  .res-waarde { color: var(--succes); }
.heeft-effect .res-waarde { color: var(--warn); }

.resultaat-details {
  padding: 20px 28px;
  background: var(--wit); border-top: 1px solid var(--rand);
}
.resultaat-details h4 { font-size: 13px; font-weight: 700; color: var(--tekst-licht); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 10px; }

.detail-rij {
  display: flex; justify-content: space-between;
  font-size: 14px; padding: 6px 0;
  border-bottom: 1px solid var(--rand);
}
.detail-rij:last-child { border-bottom: none; }
.detail-lbl { color: var(--tekst-licht); }
.detail-val { font-weight: 600; }

.resultaat-acties {
  padding: 20px 28px; background: var(--bg);
  border-top: 1px solid var(--rand);
  display: flex; gap: 12px; flex-wrap: wrap;
}

.resultaat-disclaimer {
  padding: 14px 28px; background: #fffbf0;
  border-top: 1px solid #fde68a;
  font-size: 12.5px; color: #92400e; line-height: 1.6;
}
.resultaat-disclaimer a { color: #92400e; font-weight: 700; }

/* ── Fout kaart ──────────────────────────────────────────────────────────── */
.fout-kaart {
  background: var(--fout-bg); border: 1px solid var(--fout-rand);
  border-radius: 12px; padding: 32px; text-align: center;
}
.fout-ico { font-size: 40px; margin-bottom: 12px; }
.fout-kaart h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; color: var(--fout); }
.fout-kaart p  { font-size: 14px; color: var(--tekst-licht); margin-bottom: 20px; }

/* ── Footer ──────────────────────────────────────────────────────────────── */
.footer {
  background: var(--wit); border-top: 1px solid var(--rand);
  padding: 16px 24px;
}
.footer-inner {
  max-width: 860px; margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12.5px; color: var(--tekst-licht);
}
.footer-inner a { color: var(--blauw); text-decoration: none; }
.footer-inner a:hover { text-decoration: underline; }

/* ── Utilities ──────────────────────────────────────────────────────────── */
.verborgen { display: none !important; }

@keyframes draait {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
.draait { display: inline-block; animation: draait .8s linear infinite; }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .type-grid, .preset-grid { grid-template-columns: 1fr; }
  .wizard-wrap { padding: 20px 14px 40px; }
  .stap-lbl { display: none; }
  .stap-lijn { min-width: 20px; }
  /* Knoplabels mogen afbreken op een telefoon; nowrap duwt anders de pagina
     breder dan het scherm. */
  .btn { white-space: normal; }
}

/* ── Textarea ────────────────────────────────────────────────────────────── */
textarea {
  font-family: var(--font); font-size: 14px; color: var(--tekst);
  border: 1px solid var(--rand); border-radius: 6px;
  padding: 8px 10px; background: var(--wit);
  outline: none; transition: border-color .12s, box-shadow .12s;
  width: 100%; resize: vertical;
}
textarea:focus {
  border-color: var(--blauw);
  box-shadow: 0 0 0 3px rgba(26,95,168,.12);
}

/* ── Datum dropdowns ─────────────────────────────────────────────────────── */
/* 0 1 auto, niet 0 0 auto: met shrink 0 bleef de datumrij op smalle schermen
   op zijn inhoudsbreedte staan en scrollde de hele pagina horizontaal mee. */
.veld-datum { flex: 0 1 auto; }
.datum-dropdowns {
  display: flex; gap: 6px; align-items: center; flex-wrap: wrap;
}
.datum-dropdowns select { width: auto; min-width: 0; }
.datum-dropdowns select:first-child { flex: 0 1 74px; }
.datum-dropdowns select:nth-child(2) { flex: 1 1 120px; }
.datum-dropdowns select:last-child  { flex: 0 1 86px; }

/* ── Type grid compact ───────────────────────────────────────────────────── */
.type-grid-compact {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px;
}
.type-kaart-sm {
  background: var(--wit); border: 2px solid var(--rand);
  border-radius: 8px; padding: 7px 14px;
  cursor: pointer; transition: all .13s;
  font-size: 13.5px; font-weight: 600; white-space: nowrap;
}
.type-kaart-sm:hover  { border-color: var(--blauw-rand); background: var(--blauw-licht); }
.type-kaart-sm.actief {
  border-color: var(--blauw); background: var(--blauw-licht);
  box-shadow: 0 0 0 3px rgba(26,95,168,.12);
}

/* ── Analyseer knop ──────────────────────────────────────────────────────── */
.btn-analyse {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 20px; border: none; border-radius: 7px;
  background: var(--blauw-licht); color: var(--blauw);
  border: 1.5px solid var(--blauw-rand);
  font-family: var(--font); font-size: 14px; font-weight: 600;
  cursor: pointer; transition: all .13s;
}
.btn-analyse:hover:not(:disabled) { background: var(--blauw); color: #fff; border-color: var(--blauw); }
.btn-analyse:disabled { opacity: .45; cursor: not-allowed; }

/* ── AI aannames blok ────────────────────────────────────────────────────── */
.ai-blok {
  background: var(--wit); border: 1.5px solid var(--blauw-rand);
  border-radius: 12px; padding: 20px 22px; margin-bottom: 16px;
}
.analyse-output-container { margin-top: 12px; }
.ai-kop {
  display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px;
}
.ai-icon { font-size: 28px; flex-shrink: 0; margin-top: 1px; }
.ai-kop-tekst { flex: 1; }
.ai-titel { font-size: 15px; font-weight: 700; }
.ai-sub   { font-size: 12.5px; color: var(--tekst-licht); margin-top: 2px; }
.ai-redenering {
  font-size: 14px; line-height: 1.6; color: var(--tekst-licht);
  background: var(--bg); border-radius: 8px; padding: 12px 14px;
  margin-bottom: 14px;
}
.ai-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
  margin-bottom: 12px;
}
.ai-sectie-label {
  font-size: 11.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .4px; color: var(--blauw); margin-bottom: 6px;
}
.ai-lijst {
  font-size: 13px; color: var(--tekst-licht);
  padding-left: 16px; line-height: 1.8;
}
.ai-info {
  font-size: 12.5px; color: var(--warn);
  background: var(--warn-bg); border: 1px solid var(--warn-rand);
  border-radius: 7px; padding: 8px 12px;
}
@media (max-width: 600px) {
  .ai-grid { grid-template-columns: 1fr; }
}

/* ── Kaart (Leaflet) ─────────────────────────────────────────────────────── */
.kaart-blok {
  width: 100%; height: 300px; border-radius: 8px; margin-top: 10px;
  border: 1px solid var(--rand); overflow: hidden;
}
.kaart-groot { height: 380px; margin-top: 0; border-radius: 0; border: none; }

/* ── Kaart modal ─────────────────────────────────────────────────────────── */
.kaart-modal {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5); z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.kaart-modal.verborgen { display: none; }
.kaart-modal-inhoud {
  background: var(--wit); border-radius: 14px;
  width: 100%; max-width: 680px; max-height: 90vh;
  display: flex; flex-direction: column; overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
}
.kaart-modal-kop {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 20px; border-bottom: 1px solid var(--rand);
  font-size: 15px; font-weight: 700;
}
.kaart-modal-sluiten {
  background: none; border: none; font-size: 20px;
  cursor: pointer; color: var(--tekst-licht); line-height: 1;
  padding: 2px 6px;
}
.kaart-modal-sluiten:hover { color: var(--tekst); }
.kaart-modal-info {
  padding: 10px 20px; font-size: 13px;
  color: var(--tekst-licht); border-top: 1px solid var(--rand);
  background: var(--bg);
}
.kaart-modal-knoppen {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 12px 20px; border-top: 1px solid var(--rand);
  background: var(--bg);
}

/* ── Type badge rij (stap 3) ─────────────────────────────────────────────── */
.type-badge-rij {
  display: flex; align-items: center; gap: 10px; margin-bottom: 16px;
}
.type-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--blauw-licht); border: 1.5px solid var(--blauw-rand);
  color: var(--blauw); border-radius: 8px;
  padding: 5px 14px; font-size: 14px; font-weight: 700;
}
.type-schaal-lbl {
  font-size: 13px; color: var(--tekst-licht); font-weight: 500;
}

/* ── Machines tabel ──────────────────────────────────────────────────────── */
.tabel-wrap { overflow-x: auto; margin-bottom: 10px; }
.tabel-invoer {
  width: 100%; border-collapse: collapse; font-size: 13.5px;
}
.tabel-invoer th {
  text-align: left; font-size: 11.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .3px;
  color: var(--tekst-licht); padding: 0 8px 8px;
  border-bottom: 2px solid var(--rand);
}
.tabel-invoer td { padding: 5px 4px; border-bottom: 1px solid var(--rand); }
.tabel-invoer tr:last-child td { border-bottom: none; }
.tabel-input {
  font-family: var(--font); font-size: 13.5px; color: var(--tekst);
  border: 1px solid transparent; border-radius: 5px;
  padding: 5px 7px; background: transparent; width: 100%;
  transition: border-color .12s, background .12s;
}
.tabel-input:focus {
  outline: none; border-color: var(--blauw);
  background: var(--wit); box-shadow: 0 0 0 2px rgba(26,95,168,.1);
}
.tabel-num { text-align: right; max-width: 90px; }
.btn-verwijder {
  background: none; border: none; cursor: pointer;
  color: var(--fout); font-size: 14px; padding: 3px 6px;
  border-radius: 4px; opacity: .6;
}
.btn-verwijder:hover { opacity: 1; background: var(--fout-bg); }

/* ── Btn link ────────────────────────────────────────────────────────────── */
.btn-link {
  background: none; border: none; cursor: pointer;
  color: var(--blauw); font-size: 13.5px; font-weight: 600;
  padding: 6px 0; font-family: var(--font);
  text-decoration: none; display: inline-flex; align-items: center; gap: 4px;
}
.btn-link:hover { text-decoration: underline; }

/* ── Route kaart ─────────────────────────────────────────────────────────── */
.route-kaart {
  background: var(--bg); border: 1px solid var(--rand);
  border-radius: 9px; padding: 14px 16px; margin-bottom: 10px;
}
.route-kop {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 10px;
}
.route-nr { font-size: 13px; font-weight: 700; color: var(--blauw); }
.route-status { font-size: 12.5px; color: var(--succes); font-weight: 600; align-self: center; }

/* ── Timer ───────────────────────────────────────────────────────────────── */
.timer-rij {
  display: flex; align-items: baseline; gap: 10px; margin-bottom: 18px;
}
.timer-tekst {
  font-size: 15px; font-weight: 600; color: var(--blauw);
}
.timer-hint {
  font-size: 12.5px; color: var(--tekst-licht);
}

/* ── Drempelwaarde tabel ─────────────────────────────────────────────────── */
.drempel-tabel {
  border-top: 1px solid var(--rand); background: var(--wit);
}
.drempel-kop {
  padding: 12px 28px 8px;
  font-size: 11.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .4px; color: var(--tekst-licht);
}
.drempel-rij {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 28px; border-top: 1px solid var(--rand);
  font-size: 13.5px; transition: background .15s;
}
.drempel-bereik { font-weight: 700; font-variant-numeric: tabular-nums; min-width: 130px; }
.drempel-label  { color: var(--tekst-licht); }

.drempel-geen.actief   { background: var(--succes-bg); }
.drempel-nader.actief  { background: var(--warn-bg); }
.drempel-oordeel.actief { background: var(--fout-bg); }
.drempel-geen.actief   .drempel-bereik { color: var(--succes); }
.drempel-geen.actief   .drempel-label  { color: var(--succes); font-weight: 600; }
.drempel-nader.actief  .drempel-bereik { color: var(--warn); }
.drempel-nader.actief  .drempel-label  { color: var(--warn); font-weight: 600; }
.drempel-oordeel.actief .drempel-bereik { color: var(--fout); }
.drempel-oordeel.actief .drempel-label  { color: var(--fout); font-weight: 600; }

/* ── Deel sectie ─────────────────────────────────────────────────────────── */
.deel-sectie {
  padding: 16px 28px; background: var(--bg);
  border-top: 1px solid var(--rand);
}
.deel-rij {
  display: flex; gap: 8px; align-items: center; margin-top: 8px;
}
.deel-input {
  flex: 1; font-size: 13px; color: var(--tekst-licht);
  background: var(--wit); border: 1px solid var(--rand);
  border-radius: 6px; padding: 7px 10px; cursor: text;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.deel-kopiert {
  font-size: 13px; color: var(--succes); font-weight: 600;
  margin-top: 6px;
}

/* ── Email sectie ────────────────────────────────────────────────────────── */
.email-sectie {
  padding: 16px 28px; background: var(--wit);
  border-top: 1px solid var(--rand);
}
.email-status {
  margin-top: 8px; font-size: 13px; padding: 8px 10px;
  border-radius: 6px; font-weight: 500;
}
.email-ok  { background: var(--succes-bg); color: var(--succes); }
.email-fout { background: var(--fout-bg); color: var(--fout); }

/* ── Contact sectie ──────────────────────────────────────────────────────── */
.contact-sectie {
  padding: 20px 28px; background: var(--bg);
  border-top: 1px solid var(--rand);
}
.contact-sectie-kop {
  display: flex; gap: 12px; align-items: flex-start; margin-bottom: 16px;
  font-size: 15px;
}
.contact-sectie-kop > span { font-size: 22px; flex-shrink: 0; }
.contact-sub { font-size: 13px; color: var(--tekst-licht); margin-top: 3px; line-height: 1.5; }
.contact-form { display: flex; flex-direction: column; gap: 0; }

/* ── Hulpklasse tekst-licht ──────────────────────────────────────────────── */
.tekst-licht { color: var(--tekst-licht); font-weight: 400; }

/* ── Leaflet start-marker ────────────────────────────────────────────────── */
.start-marker { font-size: 20px; background: none; border: none; }

/* ── Kaart modal instructie ──────────────────────────────────────────────── */
.kaart-modal-instructie {
  padding: 10px 20px; font-size: 13.5px; line-height: 1.5;
  background: var(--blauw-licht); border-bottom: 1px solid var(--blauw-rand);
  color: var(--tekst);
}
.kaart-modal-instructie strong { color: var(--blauw); }

/* ── Machine toelichting reden ───────────────────────────────────────────── */
.machine-reden {
  font-size: 11.5px; color: var(--tekst-licht); margin-top: 3px;
  font-style: italic; line-height: 1.4; padding-left: 2px;
}
.brandstof-hint {
  font-size: 10.5px; color: var(--blauw); opacity: .7;
  text-align: right; margin-top: 2px; letter-spacing: .3px;
}

/* ── Brand-blok smaller tekst ────────────────────────────────────────────── */
.brand-naam { font-size: 14px !important; }

/* ── Geocoder zoekbalk ────────────────────────────────────────────────────── */
.geocoder-wrap {
  position: relative; margin-top: 10px;
}
.geocoder-modal {
  margin: 0; padding: 8px 20px 10px;
  background: var(--bg); border-bottom: 1px solid var(--rand);
}
.geocoder-input {
  width: 100%; font-size: 13.5px; padding: 8px 12px;
  border: 1px solid var(--rand); border-radius: 6px;
  background: var(--wit); color: var(--tekst);
  font-family: var(--font); outline: none;
  transition: border-color .12s, box-shadow .12s;
}
.geocoder-input:focus {
  border-color: var(--blauw);
  box-shadow: 0 0 0 3px rgba(26,95,168,.12);
}
.geocoder-dropdown {
  position: fixed; z-index: 2000;
  background: var(--wit); border: 1px solid var(--rand);
  border-radius: 0 0 7px 7px;
  box-shadow: 0 6px 20px rgba(0,0,0,.14);
  max-height: 220px; overflow-y: auto;
}
.geocoder-dropdown.verborgen { display: none; }
.geocoder-item {
  padding: 9px 14px; font-size: 13px; cursor: pointer;
  border-bottom: 1px solid var(--rand); color: var(--tekst);
  line-height: 1.4; transition: background .1s;
}
.geocoder-item:last-child { border-bottom: none; }
.geocoder-item:hover { background: var(--blauw-licht); color: var(--blauw); }

/* ── Atlas Leefomgeving uitleg ────────────────────────────────────────────── */
.atlas-uitleg {
  margin-top: 8px;
}
.atlas-uitleg summary {
  cursor: pointer; color: var(--blauw); font-weight: 600;
  font-size: 12px; user-select: none;
  display: inline-flex; align-items: center; gap: 4px;
  list-style: none;
}
.atlas-uitleg summary::-webkit-details-marker { display: none; }
.atlas-uitleg summary::before { content: '▶'; font-size: 9px; }
details[open].atlas-uitleg summary::before { content: '▼'; }
.atlas-uitleg ol {
  margin-top: 8px; padding-left: 20px;
  color: var(--tekst-licht); line-height: 1.9; font-size: 12px;
}
.atlas-uitleg strong { color: var(--tekst); font-weight: 600; }

/* ── Print stylesheet ─────────────────────────────────────────────────────── */
@media print {
  .header, .footer, .stap-indicator, .nav-knoppen, .voortgang-blok,
  .resultaat-acties, .email-sectie, .contact-sectie,
  .deel-sectie, #fout-kaart, .btn, .btn-link, .log-compact,
  #kaart-locatie, #kaart-route, #kaart-modal { display: none !important; }

  body { background: #fff; font-size: 12pt; }
  .wizard-wrap { max-width: 100%; padding: 0; margin: 0; }
  .stap-inhoud { display: block !important; }
  .stap-inhoud:not(#stap-4) { display: none !important; }
  .resultaat-kaart { box-shadow: none; border: 1px solid #ccc; }
  .resultaat-conclusie { padding: 20px; }
  .res-waarde { font-size: 28pt; }
  .drempel-tabel, .resultaat-details, .resultaat-disclaimer { display: block !important; }

  /* Print header: toon naam bovenaan */
  .wizard-wrap::before {
    content: 'zelfstikstofberekenen.nl — AERIUS Stikstofberekening';
    display: block; font-size: 10pt; color: #666;
    border-bottom: 1px solid #ccc; padding-bottom: 6px; margin-bottom: 16px;
  }
}

/* === Privacy/AVG block === */
.privacy-blok {
  background:#f7f9fc; border:1px solid #d8e1ec; border-radius:8px;
  padding:10px 14px; margin:10px 0 16px; font-size:13px; color:#3b4858;
}
.privacy-blok summary { cursor:pointer; font-weight:600; color:#2a3a4d; }
.privacy-blok p { margin:8px 0 0; line-height:1.55; }

/* === Concept-banner === */
.concept-banner {
  background:#fff8e1; border:1px solid #ffd980; border-radius:8px;
  padding:10px 14px; margin:8px 0 14px; font-size:14px; color:#6b4f00;
  display:flex; align-items:center; gap:10px; flex-wrap:wrap;
}
.btn-link {
  background:none; border:none; color:#1853a0; text-decoration:underline;
  cursor:pointer; padding:2px 6px; font-size:14px;
}
.btn-link:hover { color:#0b3a78; }

/* === Info-tooltip icoon === */
.info-tip {
  display:inline-block; cursor:help; color:#1853a0; font-size:12px;
  margin-left:4px; vertical-align:middle;
}

/* === Projecttype searchable combobox === */
.pt-combobox { position: relative; }
.pt-combobox input[type="text"] {
  width: 100%; padding: 9px 32px 9px 12px;
  border: 1px solid #c8d0dc; border-radius: 6px;
  font: inherit; background: #fff;
}
.pt-combobox input[type="text"]:focus {
  outline: none; border-color: #1853a0; box-shadow: 0 0 0 3px rgba(24,83,160,.15);
}
.pt-clear {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  background: transparent; border: none; cursor: pointer;
  font-size: 18px; line-height: 1; color: #6b7280; padding: 4px 8px;
}
.pt-clear:hover { color: #1853a0; }
.pt-dropdown {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 50;
  max-height: 380px; overflow-y: auto;
  background: #fff; border: 1px solid #c8d0dc; border-top: none;
  border-radius: 0 0 6px 6px; box-shadow: 0 6px 20px rgba(0,0,0,.08);
  margin-top: -1px;
}
.pt-cat-header {
  padding: 8px 12px 4px; background: #f3f5f9;
  font-weight: 600; font-size: 12px; color: #4a5568;
  text-transform: uppercase; letter-spacing: .04em;
  border-bottom: 1px solid #e5e9f2;
}
.pt-cat-tooltip {
  font-weight: 400; font-size: 11px; color: #6b7280;
  text-transform: none; letter-spacing: 0; margin-top: 2px;
}
.pt-item {
  padding: 8px 12px; cursor: pointer; border-bottom: 1px solid #f0f3f7;
  display: flex; flex-direction: column; gap: 2px;
}
.pt-item:hover, .pt-item.actief {
  background: #eef4fb;
}
.pt-item-titel {
  display: flex; align-items: center; gap: 8px;
  font-weight: 500; font-size: 14px; color: #1a202c;
}
.pt-item-titel .pt-pop { font-size: 11px; color: #b54300; }
.pt-item-tooltip {
  font-size: 12px; color: #6b7280; line-height: 1.35;
}
.pt-item mark {
  background: #fff3a3; color: inherit; padding: 0 1px; border-radius: 2px;
}
.pt-leeg {
  padding: 16px; text-align: center; color: #6b7280; font-size: 13px;
}
.pt-gekozen {
  margin-top: 8px; padding: 10px 12px; background: #f0f7ff;
  border: 1px solid #b8d4f0; border-radius: 6px;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.pt-gekozen-label { font-weight: 600; color: #1853a0; }
.pt-cat-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; background: #fff; border: 1px solid #b8d4f0;
  border-radius: 12px; font-size: 12px; color: #1853a0; font-weight: 500;
}
.pt-meta {
  font-size: 12px; color: #4a5568;
}
.pt-wijzig-btn {
  margin-left: auto; background: transparent; border: 1px solid #b8d4f0;
  color: #1853a0; padding: 4px 10px; border-radius: 4px; cursor: pointer;
  font-size: 12px;
}
.pt-wijzig-btn:hover { background: #1853a0; color: #fff; }
