/* Weerbare Buurten – toegankelijke basisstijl (WCAG 2.2 AA).
   Grote letters, hoog contrast, ruime klikvlakken, geen verborgen menu's. */

:root {
  --tekst: #1a1a1a;
  --tekst-zacht: #4a4a4a;
  --achtergrond: #ffffff;
  --vlak: #f4f2ee;
  --rand: #8a8a8a;
  --accent: #b23a0e;        /* contrast 6.1:1 op wit */
  --accent-donker: #8a2c0a;
  --link: #0b4f8a;          /* contrast 8.3:1 op wit */
  --goed: #1e6b34;
  --let-op: #8a5a00;
  --fout: #a4161a;
  --focus: #ffbf47;
  --radius: 6px;
  font-size: 118.75%;       /* 19px */
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.55;
  color: var(--tekst);
  background: var(--achtergrond);
}

a { color: var(--link); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 3px; }

:focus-visible {
  outline: 4px solid var(--focus);
  outline-offset: 2px;
  box-shadow: 0 0 0 6px var(--tekst);
}

.skiplink { position: absolute; left: -9999px; }
.skiplink:focus { left: 1rem; top: 1rem; background: var(--focus); color: #000; padding: .5rem 1rem; z-index: 1000; }

.wrap { max-width: 62rem; margin: 0 auto; padding: 0 1.25rem; }

header.site {
  border-bottom: 4px solid var(--accent);
  background: var(--vlak);
}
header.site .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; padding-top: .75rem; padding-bottom: .75rem; }
.merk { font-weight: 700; font-size: 1.3rem; color: var(--tekst); text-decoration: none; }
.merk span { color: var(--accent); }

nav.hoofd ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem .5rem; }
nav.hoofd a, nav.hoofd button {
  display: inline-block; padding: .55rem .8rem; border-radius: var(--radius);
  text-decoration: none; color: var(--tekst); font: inherit; background: none; border: 2px solid transparent; cursor: pointer;
}
nav.hoofd a:hover, nav.hoofd button:hover { border-color: var(--tekst); }
nav.hoofd a[aria-current="page"] { background: var(--tekst); color: #fff; }

main { padding: 1.5rem 0 3rem; }

h1 { font-size: 1.9rem; line-height: 1.2; margin: .5rem 0 1rem; }
h2 { font-size: 1.45rem; line-height: 1.25; margin: 2rem 0 .75rem; }
h3 { font-size: 1.2rem; margin: 1.5rem 0 .5rem; }
p, ul, ol { margin: 0 0 1rem; }
.intro { font-size: 1.15rem; max-width: 42rem; }
.zacht { color: var(--tekst-zacht); }

/* Meldingen */
.melding { border-left: 6px solid var(--link); background: #eef4fa; padding: .9rem 1.1rem; margin: 0 0 1.25rem; border-radius: var(--radius); }
.melding.success { border-color: var(--goed); background: #edf6ef; }
.melding.error, .melding.fout { border-color: var(--fout); background: #fbeeee; }
.melding.warning, .melding.let-op { border-color: var(--let-op); background: #fdf5e6; }

/* Knoppen */
.knop, button[type="submit"], input[type="submit"] {
  display: inline-block; min-height: 3rem; padding: .7rem 1.4rem;
  font: inherit; font-weight: 600; line-height: 1.3;
  color: #fff; background: var(--accent); border: 2px solid var(--accent); border-radius: var(--radius);
  text-decoration: none; cursor: pointer;
}
.knop:hover, button[type="submit"]:hover { background: var(--accent-donker); border-color: var(--accent-donker); }
.knop.tweede { background: #fff; color: var(--tekst); border-color: var(--tekst); }
.knop.tweede:hover { background: var(--vlak); }
.knop.gevaar { background: var(--fout); border-color: var(--fout); }
.knop.klein { min-height: 2.5rem; padding: .4rem .9rem; font-size: .95rem; }
.knoppen { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin: 1.5rem 0; }
.link-knop { background: none; border: none; padding: 0; color: var(--link); text-decoration: underline; font: inherit; cursor: pointer; }

/* Formulieren */
form .veld { margin: 0 0 1.25rem; }
label, legend { display: block; font-weight: 600; margin-bottom: .35rem; }
.hulptekst { display: block; color: var(--tekst-zacht); font-size: .95rem; margin: -.15rem 0 .4rem; font-weight: normal; }
input[type="text"], input[type="email"], input[type="tel"], input[type="number"], input[type="date"], input[type="search"], select, textarea {
  width: 100%; max-width: 32rem; min-height: 3rem; padding: .55rem .75rem;
  font: inherit; color: var(--tekst); background: #fff;
  border: 2px solid var(--tekst); border-radius: var(--radius);
}
textarea { min-height: 6rem; max-width: 42rem; }
input.code-invoer { font-size: 1.8rem; letter-spacing: .3em; max-width: 14rem; text-align: center; font-variant-numeric: tabular-nums; }
.veld.heeft-fout input, .veld.heeft-fout select, .veld.heeft-fout textarea { border-color: var(--fout); border-width: 3px; }
.foutmelding, .errorlist { color: var(--fout); font-weight: 600; list-style: none; padding: 0; margin: .25rem 0; }
fieldset { border: 2px solid #d8d4cc; border-radius: var(--radius); padding: 1rem 1.25rem 1.25rem; margin: 0 0 1.5rem; }
fieldset > legend { font-size: 1.2rem; padding: 0 .4rem; }
.keuzes { list-style: none; padding: 0; margin: 0; }
.keuzes li, .keuze { display: flex; gap: .65rem; align-items: flex-start; padding: .35rem 0; }
.keuzes input[type="radio"], .keuzes input[type="checkbox"], .keuze input { width: 1.5rem; height: 1.5rem; margin-top: .15rem; flex: none; accent-color: var(--accent); }
.keuzes label, .keuze label { font-weight: normal; margin: 0; }
.kolommen { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 0 2rem; }

/* Kaarten / blokken */
.blokken { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1rem; margin: 1rem 0 2rem; }
.blok { background: var(--vlak); border-radius: var(--radius); padding: 1.1rem 1.25rem; border: 1px solid #e2ded6; }
.blok h2, .blok h3 { margin-top: 0; font-size: 1.2rem; }
.blok a.groot { font-size: 1.1rem; font-weight: 600; }
.getal { font-size: 2.2rem; font-weight: 700; line-height: 1.1; display: block; }

/* Tabellen */
.tabel-wrap { overflow-x: auto; margin: 0 0 1.5rem; }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: .55rem .6rem; border-bottom: 1px solid #cfcac0; vertical-align: top; }
thead th { border-bottom: 3px solid var(--tekst); white-space: nowrap; }
tbody tr:hover { background: #faf8f4; }
table.matrix th.draai { writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; font-weight: 600; font-size: .9rem; padding: .4rem .2rem; }
table.matrix td.vink { text-align: center; font-weight: 700; }

.label { display: inline-block; padding: .1rem .55rem; border-radius: 999px; font-size: .85rem; font-weight: 600; background: #e7e3db; color: var(--tekst); }
.label.goed { background: #d7ecdc; color: #11421f; }
.label.let-op { background: #fbe6bf; color: #4d3200; }
.label.fout { background: #f6d3d3; color: #5e0b0d; }

.status-knoppen { display: flex; flex-wrap: wrap; gap: .4rem; }
.status-knoppen button { min-height: 2.75rem; padding: .4rem .8rem; font-size: .95rem; }
.status-knoppen button[aria-pressed="true"] { outline: 4px solid var(--tekst); }

dl.gegevens { display: grid; grid-template-columns: minmax(10rem, 16rem) 1fr; gap: .4rem 1.25rem; margin: 0 0 1.5rem; }
dl.gegevens dt { font-weight: 600; }
dl.gegevens dd { margin: 0; }

.kaart { height: 32rem; border: 2px solid var(--tekst); border-radius: var(--radius); margin: 1rem 0; }
.kaart.klein { height: 22rem; }

.qr img { display: block; max-width: 100%; height: auto; image-rendering: pixelated; background: #fff; border: 1px solid var(--rand); margin: .5rem 0; }
.geheim { font-family: ui-monospace, monospace; font-size: 1.3rem; letter-spacing: .05em; font-weight: 700; }
.reservecodes { font-family: ui-monospace, monospace; font-size: 1.3rem; columns: 2; list-style: none; padding: 0; }

footer.site { border-top: 1px solid #d8d4cc; padding: 1.5rem 0 2.5rem; color: var(--tekst-zacht); font-size: .95rem; }

@media (max-width: 40rem) {
  :root { font-size: 112.5%; }
  dl.gegevens { grid-template-columns: 1fr; }
  dl.gegevens dd { margin-bottom: .6rem; }
  h1 { font-size: 1.6rem; }
}

@media print {
  header.site, footer.site, nav, .knoppen, .niet-printen { display: none !important; }
  body { font-size: 11pt; }
  a { color: inherit; text-decoration: none; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

nav.hoofd form { margin: 0; }
nav.hoofd button.nav-knop { min-height: 0; font-weight: normal; color: var(--tekst); background: none; border: 2px solid transparent; }
nav.hoofd button.nav-knop:hover { border-color: var(--tekst); background: none; }
fieldset.kaal { border: 0; padding: 0; margin: 0; }
fieldset.kaal > legend { font-size: 1rem; padding: 0; }
.inline { display: inline; }

/* Kaartmarkeringen */
.marker-verzamel span { display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; background: var(--goed); color: #fff; font-weight: 700; border: 3px solid #fff; box-shadow: 0 0 0 2px var(--tekst); }
.marker-huis { background: var(--link); border: 2px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px var(--tekst); }
.marker-huis.hulp { background: var(--fout); color: #fff; font-weight: 700; text-align: center; line-height: 18px; font-size: 14px; }
.leaflet-container { font: inherit; font-size: 1rem; }
.leaflet-popup-content { font-size: 1rem; line-height: 1.45; }
.legenda { display: flex; flex-wrap: wrap; gap: 1.25rem; list-style: none; padding: 0; }
.legenda span.stip { display: inline-block; width: 1rem; height: 1rem; border-radius: 50%; vertical-align: middle; margin-right: .35rem; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--tekst); }
.stip.verzamel { background: var(--goed); } .stip.huis { background: var(--link); } .stip.hulp { background: var(--fout); }

/* Ingesloten kaart (iframe op een buurtwebsite) */
body.ingesloten { margin: 0; padding: .5rem; font-size: .95rem; }
body.ingesloten .kaart { height: calc(100vh - 6rem); min-height: 16rem; margin: 0 0 .5rem; }
body.ingesloten details { margin: 0 0 .25rem; }
body.ingesloten summary { cursor: pointer; font-weight: 600; }
.klein-tekst { font-size: .85rem; margin: 0; }
