/* Eerst lokken. Dan afrekenen. — campagnestijl */

:root {
  --groen: #123d2a;
  --rood: #c9342f;
  --geel: #f5c542;
  --wit: #f8f5ed;
  --inkt: #1c1c1a;
  --lijn: #d9d2c0;
  --radius: 12px;
  --schaduw: 0 2px 8px rgba(18, 61, 42, 0.08);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--wit);
  color: var(--inkt);
  line-height: 1.55;
  font-size: 1.0625rem;
  /* ruimte voor de sticky balk onderaan */
  padding-bottom: 5.5rem;
}

h1, h2, h3 { line-height: 1.2; color: var(--groen); }
h1 { font-size: clamp(1.8rem, 5vw, 2.8rem); }
h2 { font-size: clamp(1.4rem, 4vw, 1.9rem); margin-top: 0; }
h3 { font-size: 1.15rem; }

a { color: var(--groen); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid var(--geel);
  outline-offset: 2px;
}

.wrap { max-width: 1060px; margin: 0 auto; padding: 0 1rem; }
.tekst { max-width: 720px; }

/* ---------- Hero ---------- */
.hero {
  background: var(--groen);
  color: var(--wit);
  padding: 1.5rem 0 2.5rem;
}
.hero h1 { color: var(--wit); margin: 1rem 0 0.5rem; }
.hero .sub { font-size: 1.2rem; max-width: 720px; }
.hero img {
  width: 100%;
  max-width: 720px;
  height: auto;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  display: block;
}
.betrouwbaar { color: var(--geel); font-size: 0.95rem; margin-top: 1rem; }

/* ---------- Knoppen ---------- */
.knop {
  display: inline-block;
  padding: 0.85rem 1.5rem;
  min-height: 44px;
  border-radius: 999px;
  border: 2px solid transparent;
  font-size: 1.05rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  text-align: center;
}
.knop-primair { background: var(--geel); color: var(--groen); }
.knop-primair:hover { background: #ffd75e; }
.knop-secundair { background: transparent; color: var(--wit); border-color: var(--geel); }
.hoofd .knop-secundair { color: var(--groen); border-color: var(--groen); }
.knop-klein { padding: 0.45rem 0.9rem; font-size: 0.95rem; font-weight: 600; }
.knoppenrij { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.25rem; }

/* ---------- Kaarten ---------- */
.kaarten {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  margin: 1.5rem 0;
}
.kaart {
  background: #fff;
  border: 1px solid var(--lijn);
  border-left: 6px solid var(--rood);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  box-shadow: var(--schaduw);
}
.kaart h3 { margin: 0 0 0.5rem; }
.kaart p { margin: 0; font-size: 0.98rem; }

/* ---------- Calculators ---------- */
.calc {
  background: #fff;
  border: 1px solid var(--lijn);
  border-radius: var(--radius);
  box-shadow: var(--schaduw);
  padding: 1.25rem;
  margin: 2rem 0;
}
.calc-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}
@media (min-width: 800px) {
  .calc-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 4fr); align-items: start; }
}

.veld { margin-bottom: 0.9rem; }
.veld label { display: block; font-weight: 600; font-size: 0.95rem; margin-bottom: 0.25rem; }
.veld .hint { font-weight: 400; color: #555; font-size: 0.85rem; }
.veld input[type="text"], .veld input[type="number"], .veld select {
  width: 100%;
  min-height: 44px;
  padding: 0.5rem 0.75rem;
  font-size: 1.05rem;
  border: 1.5px solid #a9a190;
  border-radius: 8px;
  background: #fffdf7;
  font-variant-numeric: tabular-nums;
}
.veldrij { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
@media (max-width: 480px) { .veldrij { grid-template-columns: 1fr; } }

details.geavanceerd {
  border: 1px dashed var(--lijn);
  border-radius: 8px;
  padding: 0.5rem 0.9rem;
  margin: 0.75rem 0;
  background: #fdfbf4;
}
details.geavanceerd summary { cursor: pointer; font-weight: 600; color: var(--groen); min-height: 44px; display: flex; align-items: center; }

/* ---------- Resultaten ---------- */
.resultaat {
  background: var(--wit);
  border: 1px solid var(--lijn);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
}
.resultaat h3 { margin-top: 0; }
.groot {
  font-size: clamp(1.6rem, 5vw, 2.2rem);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--rood);
}
.groot.positief { color: var(--groen); }
.resultaat table { width: 100%; border-collapse: collapse; font-size: 0.98rem; }
.resultaat td { padding: 0.35rem 0; border-bottom: 1px solid var(--lijn); vertical-align: top; }
.resultaat td:last-child { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; }
.resultaat tr.totaalrij td { border-top: 2px solid var(--groen); border-bottom: none; font-weight: 800; }

.disclaimer {
  font-size: 0.85rem;
  color: #5a5a55;
  margin-top: 0.75rem;
}

.infoblok {
  background: #fdf6df;
  border: 1px solid var(--geel);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  margin: 0.75rem 0;
}

.aanname {
  display: inline-block;
  background: var(--geel);
  color: var(--groen);
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.05rem 0.4rem;
  vertical-align: middle;
}
.officieel {
  display: inline-block;
  background: var(--groen);
  color: var(--wit);
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.05rem 0.4rem;
  vertical-align: middle;
}

/* ---------- Grafieken ---------- */
.grafiek { margin: 1rem 0; }
.grafiek svg { width: 100%; height: auto; }
.grafiek-alt { font-size: 0.9rem; color: #555; }

/* ---------- Sticky balk ---------- */
.sticky-balk {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: var(--groen);
  color: var(--wit);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.25);
  z-index: 50;
  padding: 0.6rem 0;
}
.sticky-balk .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.sticky-balk .bedrag {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  font-size: 1.15rem;
}
.sticky-balk .bedrag small { font-weight: 400; font-size: 0.8rem; display: block; }

/* ---------- Verzoek ---------- */
.verzoek { background: var(--groen); color: var(--wit); border-radius: var(--radius); padding: 1.5rem; margin: 2.5rem 0; }
.verzoek h2 { color: var(--geel); }
.verzoek ol { padding-left: 1.25rem; }
.verzoek li { margin-bottom: 0.6rem; }

/* ---------- Footer ---------- */
footer { border-top: 1px solid var(--lijn); margin-top: 3rem; padding: 1.5rem 0; font-size: 0.9rem; color: #555; }
footer nav { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 0.75rem; }

/* ---------- Subpagina's ---------- */
.pagina { padding: 1.5rem 0; }
.pagina pre {
  background: #f2ede0;
  border-radius: 8px;
  padding: 0.9rem;
  overflow-x: auto;
  font-size: 0.85rem;
}
.bron { background: #fff; border: 1px solid var(--lijn); border-radius: 8px; padding: 0.9rem 1.1rem; margin-bottom: 0.9rem; }
.bron .meta { font-size: 0.85rem; color: #555; }

.skiplink {
  position: absolute; left: -9999px; top: 0;
  background: var(--geel); color: var(--groen); padding: 0.5rem 1rem; z-index: 100;
}
.skiplink:focus { left: 0; }

.checkboxveld { display: flex; align-items: flex-start; gap: 0.5rem; margin: 0.75rem 0; }
.checkboxveld input { width: 22px; height: 22px; min-height: 22px; margin-top: 2px; }
.checkboxveld label { font-weight: 400; font-size: 0.95rem; }
