/* De Hardloopkalender
 *
 * Rustig en licht: warm gebroken wit met bijna-zwart, Raleway voor koppen en
 * Lato voor tekst, strakke hoeken. Eén accent: amber #fdba41. Amber haalt maar
 * 1,6:1 op de achtergrond, dus alleen als vlak gebruiken (met bijna-zwarte tekst
 * erop, 9,8:1) en nooit als tekst- of lijnkleur; daarvoor is --accent-line.
 */

:root {
  color-scheme: light;

  --bg: #f6f6f3;
  --bg-raised: #ffffff;
  --bg-raised-2: #efefeb;
  --border: #e2e2dc;
  --border-strong: #cdcdc5;

  --text: #1e1e1e;
  --text-muted: #575757;
  --text-faint: #757574;

  --accent: #fdba41;
  --accent-hover: #efa518;
  --accent-line: #9a6100;
  --accent-tint: #fff7e8;

  --hart: #e23b4e;
  --ok: #2f7d4f;
  --warn: #9a4c07;

  --kids: #5b3fb8;
  --walk: #1f6b75;

  --radius: 2px;
  --shadow: 0 14px 40px -20px rgba(30, 30, 30, 0.35);
  --max: 1200px;
  --font-kop: 'Raleway', ui-sans-serif, system-ui, 'Segoe UI', sans-serif;
  --font-tekst: 'Lato', ui-sans-serif, system-ui, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
[id], #resultaten .card { scroll-margin-top: 90px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.65 var(--font-tekst);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  font-variant-numeric: lining-nums; /* Raleway: geen cijfers die onder de regel zakken ("H3O") */
}
.num, .chip .n, .dists li, .date .year { font-variant-numeric: lining-nums tabular-nums; }
a { color: var(--text); text-decoration: none; text-underline-offset: 3px; }
@media (hover: hover) { a:hover { text-decoration: underline; } }
svg { width: 1.1em; height: 1.1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--text); color: #fff; padding: 8px 14px; z-index: 20; }
.skip:focus { left: 8px; }
.wrap { width: min(var(--max), 100% - 32px); margin-inline: auto; }

/* Kleine kapitalen: sectiekoppen, meta-regels, knoppen. */
.caps, .section-head h2, .kicker, .cta, .fav-toggle, .filter-label, .field > span, .status, .views button, .more-btn {
  font-family: var(--font-tekst);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
}

/* ---------- Logo ---------- */
.logo { display: inline-flex; align-items: center; gap: 10px; }
.logo:hover { text-decoration: none; }
/* Logo: beeldmerk (loper + kalender) met woordmerk in twee even brede regels. */
.lockup { display: block; height: auto; stroke: none; fill: none; overflow: visible; }
.lockup text { font-family: 'Archivo', var(--font-kop); font-weight: 800; fill: var(--text); }
.lockup--bar { height: 42px; width: auto; }
.lockup--foot { height: 30px; width: auto; }

/* ---------- Kop ---------- */
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: rgba(246, 246, 243, 0.92);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border);
}
.bar { display: flex; align-items: center; justify-content: space-between; min-height: 68px; }
.fav-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--bg-raised); border: 1px solid var(--border-strong); border-radius: 999px;
  padding: 7px 16px; font-size: .74rem;
}
@media (hover: hover) { .fav-toggle:hover { border-color: var(--text); } }
.fav-toggle svg { width: 17px; height: 17px; }
.fav-toggle[aria-pressed="true"] { background: var(--text); color: #fff; border-color: var(--text); }
.fav-toggle[aria-pressed="true"] svg { color: var(--hart); fill: currentColor; stroke: none; }
.badge { font-size: .7rem; letter-spacing: 0; min-width: 1.7em; padding: 0 6px; border-radius: 999px; background: var(--accent); color: var(--text); text-align: center; }
.badge:empty, .badge[data-n="0"] { display: none; }

/* ---------- Hero ---------- */
.hero { text-align: center; padding: clamp(72px, 11vw, 120px) 0 clamp(56px, 8vw, 88px); border-bottom: 1px solid var(--border); }
h1 { font: 600 clamp(1.5rem, 3.2vw, 1.95rem)/1.25 var(--font-kop); margin: 0 0 12px; letter-spacing: -.005em; }
.lead { font-weight: 300; color: var(--text-muted); max-width: 760px; margin: 0 auto 30px; text-wrap: balance; }

/* De knop vult de hoogte van het veld, met rondom dezelfde marge van 6px. */
.search {
  display: flex; align-items: stretch; gap: 10px; max-width: 620px; margin: 0 auto;
  background: var(--bg-raised); border: 1px solid var(--border-strong); border-radius: var(--radius);
  padding: 6px 6px 6px 16px; box-shadow: var(--shadow);
}
.search:focus-within { border-color: var(--text); }
.search > svg { color: var(--text-faint); width: 20px; height: 20px; align-self: center; }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; padding: 0; height: 46px; font-size: 1rem; }
.search input::placeholder { color: var(--text-faint); font-weight: 300; }
.near {
  flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap;
  border: 0; border-radius: var(--radius); padding: 0 18px;
  background: var(--bg-raised-2); font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .12em;
}
@media (hover: hover) { .near:hover { background: var(--border); } }
.near[aria-pressed="true"] { background: var(--accent); }
.near svg { width: 16px; height: 16px; }
.near:focus-visible { outline-offset: -2px; }

.steps { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 30px; padding: 0; margin: 30px 0 0; font-size: .9rem; color: var(--text-muted); }
.steps li { display: inline-flex; align-items: center; gap: 10px; }
.steps span { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: var(--text); font-size: .7rem; font-weight: 700; }

/* ---------- Sectiekop ---------- */
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 56px 0 26px; }
.section-head h2 { margin: 0; font-size: .86rem; letter-spacing: .2em; position: relative; padding-bottom: 12px; }
.section-head h2::after { content: ""; position: absolute; left: 0; bottom: 0; width: 28px; height: 2px; background: var(--accent); }
.section-head p { margin: 0; font-size: .82rem; font-weight: 300; color: var(--text-faint); }

/* ---------- Filters ---------- */
.filters {
  display: grid; gap: 14px; padding: 20px 22px;
  background: var(--bg-raised); border: 1px solid var(--border); border-radius: var(--radius);
}
.filters > *, .chips, .card > *, .toolbar > * { min-width: 0; }
.filter-row { display: flex; gap: 14px; align-items: baseline; }
.filter-row--inline { flex-wrap: wrap; align-items: end; gap: 14px 22px; border-top: 1px solid var(--border); padding-top: 16px; }
.filter-label { font-size: .68rem; color: var(--text-faint); width: 72px; flex: none; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  border: 1px solid var(--border); background: var(--bg); border-radius: var(--radius);
  padding: 5px 11px; font-size: .88rem; line-height: 1.35;
  transition: background .12s, border-color .12s;
}
@media (hover: hover) { .chip:hover { border-color: var(--text); } }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); font-weight: 700; }
.chip .n { color: var(--text-faint); font-size: .78em; margin-left: 5px; font-variant-numeric: tabular-nums; font-weight: 400; }
.chip[aria-pressed="true"] .n { color: var(--text); }

.field { display: grid; gap: 6px; }
.field > span { font-size: .68rem; color: var(--text-faint); }
.field select {
  -webkit-appearance: none; appearance: none;
  height: 42px; min-width: 200px; padding: 0 40px 0 14px;
  font: 400 .95rem/1 var(--font-tekst); color: var(--text);
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231e1e1e' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E")
      no-repeat right 12px center / 16px,
    var(--bg-raised);
  border: 1px solid var(--border-strong); border-radius: var(--radius);
  cursor: pointer;
  transition: border-color .12s, background-color .12s, box-shadow .12s;
}
@media (hover: hover) { .field select:hover { border-color: var(--text); } }
.field select:focus { outline: none; border-color: var(--text); box-shadow: 0 0 0 3px var(--accent-soft, rgba(253, 186, 65, 0.4)); }
/* Een gekozen waarde valt op, net als een actieve filterknop. */
.field select.is-set { background-color: var(--accent-tint); border-color: var(--text); font-weight: 700; }
.field select option { font-weight: 400; color: var(--text); background: #fff; }
.field--range input { accent-color: var(--text); width: 180px; }
.field output { color: var(--text); letter-spacing: 0; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; height: 42px; font-size: .95rem; }
.switch input { position: absolute; opacity: 0; }
.switch .track { width: 36px; height: 20px; border-radius: 999px; background: var(--border-strong); position: relative; transition: background .15s; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch input:checked + .track { background: var(--text); }
.switch input:checked + .track::after { transform: translateX(16px); background: var(--accent); }
.switch input:focus-visible + .track { outline: 2px solid var(--text); outline-offset: 3px; }
.reset {
  margin-left: auto; display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 14px;
  border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--bg-raised); color: var(--text);
  font: 700 .72rem/1 var(--font-tekst); text-transform: uppercase; letter-spacing: .12em; cursor: pointer;
  transition: border-color .12s, background-color .12s;
}
.reset svg { width: 14px; height: 14px; stroke-width: 2.4; }
.reset-n { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); display: inline-grid; place-items: center; font-size: .68rem; letter-spacing: 0; }
.reset-n:empty { display: none; }
@media (hover: hover) { .reset:hover { border-color: var(--text); background: var(--accent-tint); } }

/* ---------- Werkbalk ---------- */
.toolbar { scroll-margin-top: 84px; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 22px 0 6px; flex-wrap: wrap; }
.count { display: inline-flex; align-items: center; margin: 0; font-weight: 700; }
/* Alles op één middenlijn: het amber vakje, de link en de legenda zijn verschillend hoog. */
.toolbar-info { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 24px; }
/* Legenda: hetzelfde tegeltje als een weekend-datum in de lijst. */
.legend { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 4px 16px; margin: 0; font-size: .82rem; font-weight: 300; color: var(--text-muted); }
.legend-item { display: inline-flex; align-items: center; gap: 8px; }
.legend .swatch { width: 16px; height: 16px; border-radius: var(--radius); }
.swatch--weekend { background: var(--accent-tint); box-shadow: inset 0 -2px 0 var(--accent), inset 0 0 0 1px rgba(253, 186, 65, 0.45); }
.swatch--week { background: var(--bg-raised-2); box-shadow: inset 0 0 0 1px var(--border); }
.views { display: inline-flex; border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--bg-raised); }
.views button { display: inline-flex; align-items: center; gap: 7px; border: 0; background: none; padding: 8px 16px; font-size: .72rem; color: var(--text-muted); }
.views button + button { border-left: 1px solid var(--border); }
.views button[aria-selected="true"] { background: var(--text); color: #fff; }

/* ---------- Lijst ---------- */
.month-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 44px 0 22px; }
.month-head h2 {
  margin: 0; position: relative; padding-bottom: 12px;
  font: 700 .86rem/1.2 var(--font-tekst); text-transform: uppercase; letter-spacing: .2em;
}
.month-head h2::after { content: ""; position: absolute; left: 0; bottom: 0; width: 28px; height: 2px; background: var(--accent); }
.month-head span { font-size: .82rem; font-weight: 300; color: var(--text-faint); }

.cards { background: var(--bg-raised); border: 1px solid var(--border); border-radius: var(--radius); }

.card {
  display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; gap: 18px; align-items: center;
  padding: 14px 18px; border-top: 1px solid var(--border);
  transition: background .12s;
}
.card:first-child { border-top: 0; }
@media (hover: hover) { .card:hover { background: #fcfcfa; } }

/* Datumtegel: elke regel wordt op de hoofdletterhoogte afgesneden (text-box), zodat de
   ruimte tussen alle regels precies gelijk is, ongeacht lettergrootte of lettertype. */
.date {
  display: grid; justify-items: center; align-content: center; gap: 5px; line-height: 1;
  width: 58px; height: 62px; border-radius: var(--radius); background: var(--bg-raised-2);
}
.card.is-weekend .date { background: var(--accent-tint); box-shadow: inset 0 -2px 0 var(--accent); }
.date > span { text-box: trim-both cap alphabetic; }
.date .dow { font-size: .6rem; font-weight: 700; text-transform: uppercase; letter-spacing: .14em; color: var(--text-faint); }
.date .day { font: 700 1.45rem/1 var(--font-kop); font-variant-numeric: lining-nums; }
.date .mon { font-size: .62rem; font-weight: 700; text-transform: uppercase; letter-spacing: .16em; }
.date .year { font-size: .58rem; letter-spacing: .08em; color: var(--text-faint); font-variant-numeric: lining-nums tabular-nums; }
/* Browsers zonder text-box: de lege ruimte boven en onder de letters met kleinere regels opvangen. */
@supports not (text-box: trim-both cap alphabetic) {
  .date { gap: 0; }
  .date > span { line-height: .95; }
  .date .day { line-height: .9; margin: 1px 0 2px; }
}

.body { min-width: 0; }
.kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 0; margin: 0 0 2px; font-size: .64rem; color: var(--text-faint); }
.kicker .place::before { content: "\00a0·\00a0"; }
.kicker .km-away { color: var(--accent-line); }
.status { margin-left: 10px; font-size: .58rem; padding: 2px 6px; border-radius: var(--radius); background: var(--text); color: #fff; letter-spacing: .1em; }
.status:empty { display: none; }
.status.open { background: var(--accent); color: var(--text); }
.status.gesloten { background: var(--bg-raised-2); color: var(--text-muted); }
.card h3 { margin: 0 0 6px; font: 600 1.02rem/1.3 var(--font-kop); }
.card h3 a:hover { text-decoration: underline; }

.dists { display: flex; flex-wrap: wrap; gap: 4px; list-style: none; margin: 0; padding: 0; }
.dists li {
  font-size: .76rem; font-weight: 700; padding: 1px 7px; border-radius: var(--radius);
  background: var(--bg-raised); border: 1px solid var(--border-strong); font-variant-numeric: tabular-nums;
}
.dists li.kids { color: var(--kids); border-color: color-mix(in srgb, var(--kids) 35%, transparent); }
.dists li.wandel { color: var(--walk); border-color: color-mix(in srgb, var(--walk) 35%, transparent); }
.dists li.other { color: var(--text-muted); }
.dists li.guess { border-style: dashed; background: transparent; }
.dists li.unknown { border: 0; background: none; padding: 0; font-weight: 300; color: var(--text-faint); }

.more { margin-top: 6px; font-size: .86rem; }
.more summary { cursor: pointer; color: var(--text-faint); font-size: .78rem; width: fit-content; }
.more summary:hover { color: var(--text); }
.onderdelen { margin: 6px 0 4px; padding-left: 18px; color: var(--text-muted); font-weight: 300; columns: 2 240px; }
.onderdelen li { break-inside: avoid; }
.bron { font-size: .78rem; color: var(--text-faint); margin: 4px 0 0; }
.bron a { color: var(--text-muted); text-decoration: underline; }

.actions { display: flex; align-items: center; gap: 8px; }
.cta { display: inline-flex; align-items: center; gap: 6px; font-size: .68rem; border: 0; background: none; padding: 0; white-space: nowrap; }
.cta:hover { text-decoration: none; }
.cta.signup { background: var(--accent); padding: 7px 11px; border-radius: var(--radius); }
.cta--quiet { color: var(--text); padding: 7px 0; }
@media (hover: hover) {
  .cta.signup:hover { background: var(--accent-hover); }
  .cta--quiet:hover { color: var(--accent-line); }
}
/* In de lijst: alle knoppen even hoog (34px, zoals het hartje); Website en Agenda met een rand. */
.actions .cta { height: 34px; padding: 0 12px; border-radius: var(--radius); }
.actions .cta--quiet { border: 1px solid var(--border-strong); background: var(--bg-raised); }
@media (hover: hover) { .actions .cta--quiet:hover { color: var(--text); border-color: var(--text); } }
.fav { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--border); background: var(--bg-raised); color: var(--text); }
@media (hover: hover) { .fav:hover { border-color: var(--text); } }
.fav svg { width: 17px; height: 17px; }
.fav[aria-pressed="true"] { color: var(--hart); border-color: #f3c2c8; background: #fdf1f2; }
.fav[aria-pressed="true"] svg { fill: currentColor; stroke: none; }


.more-btn {
  display: block; margin: 40px auto 0; padding: 12px 24px; border-radius: var(--radius);
  border: 1px solid var(--text); background: var(--bg-raised); font-size: .74rem;
}
@media (hover: hover) { .more-btn:hover { background: var(--accent); border-color: var(--accent); } }
.empty { grid-column: 1 / -1; text-align: center; padding: 60px 16px; color: var(--text-muted); font-weight: 300; background: var(--bg-raised); border: 1px solid var(--border); }
.empty strong { display: block; font: 600 1.3rem var(--font-kop); color: var(--text); margin-bottom: 6px; }

/* ---------- Kalender ---------- */
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 30px 0 14px; }
.cal-head h2 { margin: 0; font: 600 1.5rem var(--font-kop); text-transform: capitalize; }
.cal-nav { display: flex; gap: 6px; }
.cal-nav button { border: 1px solid var(--border-strong); background: var(--bg-raised); border-radius: var(--radius); padding: 6px 12px; font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; }
@media (hover: hover) { .cal-nav button:hover { border-color: var(--text); } }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-dow { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .16em; color: var(--text-faint); padding: 4px 6px; }
.cal-day {
  min-height: 116px; background: var(--bg-raised); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 6px; text-align: left; display: flex; flex-direction: column; gap: 3px; overflow: hidden;
}
@media (hover: hover) { .cal-day:not([disabled]):hover { border-color: var(--text); } }
.cal-day.out { opacity: .45; }
.cal-day.today { box-shadow: inset 0 3px 0 var(--accent); }
.cal-day.sel { background: var(--accent-tint); border-color: var(--text); }
.cal-day .num { font: 600 .92rem var(--font-kop); display: flex; justify-content: space-between; align-items: center; }
.cal-day .num .c { font: 700 .68rem/1.6 var(--font-tekst); background: var(--accent); color: var(--text); border-radius: 999px; padding: 0 7px; }
.cal-day .ev { font-size: .75rem; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 1px 5px; background: var(--bg); border-left: 2px solid var(--border-strong); }
.cal-day .ev.open { border-left-color: var(--accent); }
.cal-day .plus { font-size: .72rem; color: var(--text-faint); padding-left: 5px; }
.cal-day[disabled] { cursor: default; }
.cal-list > h3 { margin: 44px 0 22px; font: 700 .86rem/1.2 var(--font-tekst); text-transform: uppercase; letter-spacing: .2em; position: relative; padding-bottom: 12px; }
.cal-list > h3::after { content: ""; position: absolute; left: 0; bottom: 0; width: 28px; height: 2px; background: var(--accent); }

/* ---------- Kaart ---------- */
#view-kaart { margin-top: 22px; }
#map { height: min(72vh, 680px); border: 1px solid var(--border); background: var(--bg-raised-2); z-index: 0; }
.map-note { font-size: .82rem; font-weight: 300; color: var(--text-faint); margin: 10px 0 0; }
.leaflet-container { font: 14px/1.5 var(--font-tekst); }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { border-radius: var(--radius) !important; }
.leaflet-popup-content { margin: 14px 16px; }
.leaflet-popup-content h4 { margin: 0 0 2px; font: 600 15px/1.3 var(--font-kop); }
.leaflet-popup-content p { margin: 0 0 6px; color: var(--text-muted); }
.leaflet-popup-content a { color: var(--text); font-weight: 700; text-decoration: underline; }
.leaflet-popup-content .dists li { font-size: 12px; }
.pin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--text); background: var(--accent); }
.marker-cluster-small, .marker-cluster-medium, .marker-cluster-large { background: rgba(253, 186, 65, 0.4) !important; }
.marker-cluster-small div, .marker-cluster-medium div, .marker-cluster-large div { background: var(--accent) !important; color: var(--text); font: 700 12px var(--font-tekst); }

/* ---------- Uitleg ---------- */
.how { margin-top: 70px; }
.how-list { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px; padding: 0; margin: 0; }
.how-list li { display: flex; gap: 16px; align-items: center; }
.how-list h3 { margin: 0 0 4px; font: 700 .98rem var(--font-kop); }
.how-list p { margin: 0; font-size: .92rem; font-weight: 300; color: var(--text-muted); }
.how-icon { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--accent); font-weight: 700; }
.how-icon--heart { background: #fbe3e6; color: var(--hart); }
.how-icon--heart svg { fill: currentColor; stroke: none; width: 18px; height: 18px; }

/* ---------- Voet ---------- */
/* ---------- Voettekst: logo + uitleg, kolommen met links, onderaan één balk ---------- */
.footer { margin-top: 70px; padding: 48px 0 28px; border-top: 1px solid var(--border); background: var(--bg-raised); font-size: .85rem; font-weight: 300; color: var(--text-muted); }
.footer p { margin: 0; }
.footer-grid { display: grid; grid-template-columns: minmax(220px, 1.1fr) 3.4fr; gap: 40px 56px; align-items: start; }
.footer-brand p { margin-top: 14px; line-height: 1.6; max-width: 34ch; }
.footer-small { font-size: .78rem; color: var(--text-faint); }
.footer-logo { display: inline-block; }
.footer-logo .lockup--foot { height: 34px; }
.footer-links { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px 32px; }
.footer-col h2 { margin: 0 0 12px; font: 700 .68rem var(--font-tekst); text-transform: uppercase; letter-spacing: .16em; color: var(--text); }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.footer-col a, .footer-col span { color: var(--text-muted); text-decoration: none; }
.footer-col [aria-current] { font-weight: 700; color: var(--text); }
@media (hover: hover) { .footer-col a:hover { color: var(--text); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; } }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 24px; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--border); font-size: .78rem; color: var(--text-faint); }
.footer-bottom p:last-child { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.footer-bottom a { color: var(--text-muted); text-decoration: none; }
@media (hover: hover) { .footer-bottom a:hover { color: var(--text); text-decoration: underline; } }
@media (max-width: 1000px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-brand p { max-width: 60ch; }
}
@media (max-width: 640px) {
  .footer { padding-top: 36px; }
  .footer-links { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 20px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* ---------- Tablet & mobiel ---------- */
@media (max-width: 980px) {
  .how-list { grid-template-columns: 1fr; gap: 20px; }
}
@media (max-width: 640px) {
  .hero { padding: 64px 0 52px; }
  .lockup--bar { height: 36px; }
  .near { width: 46px; padding: 0; }
  .near span { display: none; }
  .steps { display: grid; justify-content: start; width: fit-content; margin-inline: auto; text-align: left; }
  .section-head { flex-direction: column; gap: 6px; margin-top: 40px; }
  .filters { padding: 16px; }
  .filter-row { flex-direction: column; gap: 8px; }
  .chips { flex-wrap: nowrap; overflow-x: auto; width: 100%; scrollbar-width: none; padding-bottom: 2px; }
  .chips::-webkit-scrollbar { display: none; }
  .chip { white-space: nowrap; }
  .filter-row--inline { display: grid; grid-template-columns: 1fr 1fr; }
  .field select { min-width: 0; width: 100%; }
  .field--range input { width: 100%; }
  .switch { white-space: nowrap; font-size: .9rem; }
  .reset { margin-left: 0; grid-column: 1 / -1; justify-content: center; }
  .views { width: 100%; }
  .views button { flex: 1; justify-content: center; padding: 9px 6px; }
  /* Soort + plaats lopen als gewone tekst door; de inschrijfstatus altijd op een eigen regel,
     zodat hij niet soms achter de plaats en soms ingesprongen op de volgende regel staat. */
  .card .kicker { display: block; line-height: 1.5; }
  .card .kicker .status:not(:empty) { display: table; margin: 3px 0 1px; }
  .card { grid-template-columns: 50px minmax(0, 1fr); gap: 12px 14px; padding: 14px; align-items: start; }
  .date { width: 50px; height: 60px; }
  .actions { grid-column: 1 / -1; gap: 8px 6px; flex-wrap: wrap; padding-top: 2px; }
  .cta span[aria-hidden] { display: none; }
  .actions .cta { flex: 1 1 auto; justify-content: center; padding: 0 8px; }
  .fav { flex: none; }
  .fav { margin-left: auto; }
  .cal-day { min-height: 56px; padding: 4px; }
  .cal-day .ev, .cal-day .plus { display: none; }
  .cal-day .num { flex-direction: column; align-items: flex-start; gap: 4px; }
  .cal-dow { font-size: .6rem; letter-spacing: .08em; padding: 2px; text-align: center; }
}

/* ---------- Favorieten: accountregel en inlogvenster ---------- */
.account { margin: 0; font-size: .82rem; font-weight: 300; color: var(--text-muted); flex-basis: 100%; }
.account b { font-weight: 700; color: var(--text); }
.linklike {
  border: 0; background: none; padding: 0; font: inherit; color: var(--text-muted);
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
@media (hover: hover) { .linklike:hover { color: var(--text); } }

.auth {
  width: min(460px, calc(100% - 32px)); padding: 36px 32px 30px; border: 0; border-radius: var(--radius);
  background: var(--bg-raised); color: var(--text); box-shadow: 0 30px 80px -20px rgba(30, 30, 30, 0.45);
  text-align: center;
}
.auth::backdrop { background: rgba(30, 30, 30, 0.45); backdrop-filter: blur(2px); }
.auth h2 { margin: 12px 0 8px; font: 600 1.35rem/1.25 var(--font-kop); }
.auth p { text-wrap: balance; margin: 0 0 18px; font-weight: 300; color: var(--text-muted); font-size: .95rem; }
/* E-mailadres op een eigen regel; alleen afbreken als het echt niet past. */
.auth p b { display: block; margin: 4px 0; font-weight: 700; color: var(--text); overflow-wrap: anywhere; }
.auth-icon { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: #fbe3e6; color: var(--hart); }
.auth-icon svg { width: 24px; height: 24px; }
.auth-step[data-step="email"] .auth-icon svg { fill: currentColor; stroke: none; }
.auth-step[data-step="code"] .auth-icon { background: var(--accent-tint); color: var(--accent-line); }
.auth-close { position: absolute; top: 8px; right: 8px; margin: 0; }
.auth-close button { width: 36px; height: 36px; border: 0; background: none; font-size: 1.6rem; line-height: 1; color: var(--text-faint); cursor: pointer; }
.auth-close button:hover { color: var(--text); }
.auth-form { text-align: left; margin-bottom: 14px; }
.auth-form label { display: block; margin-bottom: 6px; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--text-faint); }
.auth-row { display: flex; gap: 8px; }
.auth-row input {
  flex: 1; min-width: 0; height: 46px; padding: 0 14px; font-size: 1rem;
  border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--bg-raised);
}
.auth-row input:focus { outline: none; border-color: var(--text); box-shadow: 0 0 0 3px rgba(253, 186, 65, 0.4); }
.auth-row .cta { height: 46px; padding: 0 16px; justify-content: center; }
.auth-row :disabled { opacity: .6; cursor: progress; }
.auth-code { font-size: 1.4rem !important; letter-spacing: .4em; font-variant-numeric: tabular-nums; text-align: center; }
.auth-note { font-size: .8rem !important; margin: 0 !important; }
.auth-note a { color: var(--text-muted); text-decoration: underline; }
.auth-error { margin: 16px 0 0 !important; padding: 10px 12px; border-radius: var(--radius); background: #fdecec; color: #8f1d1d !important; font-weight: 400 !important; font-size: .9rem !important; text-align: left; }
@media (max-width: 640px) {
  .auth { padding: 30px 20px 24px; }
  .auth-row { flex-direction: column; }
  /* Onder elkaar: flex: 1 zou de hoogte op 0 zetten. */
  .auth-row input { flex: none; width: 100%; }
}

/* ---------- Melding (bv. na het inloggen) ---------- */
.toast {
  position: fixed; z-index: 1000; top: 84px; left: 50%; width: min(420px, calc(100% - 32px));
  display: flex; align-items: flex-start; gap: 12px; padding: 14px 12px 14px 16px;
  background: var(--bg-raised); color: var(--text); border-left: 4px solid var(--accent);
  border-radius: var(--radius); box-shadow: 0 18px 50px -18px rgba(30, 30, 30, 0.45);
  opacity: 0; visibility: hidden; transform: translate(-50%, -12px);
  transition: opacity .25s ease, transform .25s ease, visibility 0s linear .25s;
}
.toast.is-visible { opacity: 1; visibility: visible; transform: translate(-50%, 0); transition: opacity .25s ease, transform .25s ease; }
.toast p { flex: 1; margin: 0; font-size: .9rem; font-weight: 300; color: var(--text-muted); line-height: 1.45; }
.toast p b { display: block; font-weight: 700; color: var(--text); }
.toast-icon { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--accent-tint); color: var(--accent-line); }
.toast-icon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.toast-close { flex: none; width: 28px; height: 28px; margin: -4px 0 0; border: 0; background: none; font-size: 1.4rem; line-height: 1; color: var(--text-faint); cursor: pointer; }
.toast-close:hover { color: var(--text); }
@media (prefers-reduced-motion: reduce) { .toast, .toast.is-visible { transition: none; } }

/* ---------- Afgelopen wedstrijden ---------- */
.status.afgelopen { background: var(--bg-raised-2); color: var(--text-muted); }
.card.is-past .date { opacity: .7; }
.card.is-past h3 a { color: var(--text-muted); }
.cal-day .ev.past { color: var(--text-faint); border-left-color: var(--border); }

.past-link {
  border: 0; background: none; padding: 0; cursor: pointer;
  font: 700 .72rem/1.4 var(--font-tekst); text-transform: uppercase; letter-spacing: .12em; color: var(--text);
  /* Onderstreping i.p.v. een rand: dan telt de streep niet mee in de hoogte en staat de tekst in het midden. */
  text-decoration: underline 2px var(--accent); text-underline-offset: 5px;
}
@media (hover: hover) { .past-link:hover { color: var(--accent-line); } }

/* ---------- Plaatssuggesties onder de zoekbalk ---------- */
.search { position: relative; }
.suggest {
  position: absolute; left: -1px; right: -1px; top: calc(100% + 6px); z-index: 20;
  list-style: none; margin: 0; padding: 6px; text-align: left;
  background: var(--bg-raised); border: 1px solid var(--border-strong); border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.suggest li { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: var(--radius); cursor: pointer; }
.suggest li[aria-selected="true"], .suggest li:hover { background: var(--accent-tint); }
.suggest svg { width: 18px; height: 18px; color: var(--accent-line); }
.suggest b { display: block; font-weight: 700; font-size: .95rem; }
.suggest small { display: block; font-size: .8rem; font-weight: 300; color: var(--text-muted); }
.search input.is-place { font-weight: 700; }
.field--range em { font-style: normal; color: var(--text); letter-spacing: 0; text-transform: none; }

/* Eigen wisknop in het zoekveld i.p.v. het kruisje van de browser. */
.search input::-webkit-search-cancel-button,
.search input::-webkit-search-decoration { -webkit-appearance: none; appearance: none; display: none; }
.search-clear {
  flex: none; align-self: center; display: grid; place-items: center; width: 28px; height: 28px; padding: 0;
  border: 0; border-radius: 50%; background: var(--bg-raised-2); color: var(--text-muted); cursor: pointer;
  transition: background-color .12s, color .12s;
}
.search-clear svg { width: 14px; height: 14px; stroke-width: 2.4; }
@media (hover: hover) { .search-clear:hover { background: var(--border); color: var(--text); } }
.search-clear:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }

/* Geanimeerde aantallen: vaste cijferbreedte, zodat de tekst ernaast niet heen en weer schuift. */
.num { font-variant-numeric: tabular-nums; }

/* ---------- Detailpagina van een wedstrijd ---------- */
.back-link { font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; border-bottom: 2px solid var(--accent); }
.back-link:hover { text-decoration: none; color: var(--accent-line); }
.detail { padding-bottom: 20px; }
.crumbs { margin: 28px 0 0; font-size: .82rem; color: var(--text-faint); }
.crumbs a { color: var(--text-muted); }
.crumbs span { color: var(--text-muted); }
.detail-head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 28px; align-items: start; margin: 26px 0 10px; }
.date--xl { width: 96px; height: 104px; gap: 8px; }
.date--xl .dow { font-size: .8rem; }
.date--xl .day { font-size: 2.5rem; }
.date--xl .mon { font-size: .82rem; }
.date--xl .year { font-size: .76rem; }
.date--xl.is-past { opacity: .7; }
.detail-head h1 { margin: 4px 0 8px; font: 600 clamp(1.6rem, 3.6vw, 2.3rem)/1.15 var(--font-kop); max-width: none; text-align: left; }
.detail-head .kicker { font-size: .7rem; }
.detail-when { margin: 0; font-size: 1.05rem; }
.detail-place { margin: 2px 0 0; color: var(--text-muted); font-weight: 300; }
.detail-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 18px; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 40px; align-items: start; }
.detail-grid .section-head { margin-top: 40px; }
.dists--lg li { font-size: .92rem; padding: 4px 11px; }
.detail-sub { margin: 22px 0 6px; font: 700 .68rem var(--font-tekst); text-transform: uppercase; letter-spacing: .14em; color: var(--text-faint); }
.onderdelen--detail { columns: 1; padding-left: 18px; margin: 0; }
.detail-map { height: 300px; border: 1px solid var(--border); background: var(--bg-raised-2); z-index: 0; }
@media (max-width: 760px) {
  .detail-head { grid-template-columns: 1fr; gap: 16px; }
  .date--xl { width: 84px; height: 92px; }
  .date--xl .day { font-size: 2.1rem; }
  .detail-grid { grid-template-columns: 1fr; }
}

/* De "font:"-verkorting in de kopregels hierboven zet font-variant-numeric terug; daarom hier
   nogmaals, ná die regels: gewone (lining) cijfers in alle koppen ("H3O", "Olympia'18"). */
h1, h2, h3, h4, .detail-head h1, .card h3, .cal-head h2, .month-head h2, .section-head h2, .wordmark { font-variant-numeric: lining-nums; }

/* Detailpagina: favorietenlink in de navigatie en een hartje-knop met tekst. */
.bar-links { display: flex; align-items: center; gap: 18px; }
.bar-links .fav-toggle:hover { text-decoration: none; }
.fav--detail {
  width: auto; height: 38px; padding: 0 14px 0 12px; gap: 8px; display: inline-flex; align-items: center;
  border-radius: 999px; font: 700 .72rem/1 var(--font-tekst); text-transform: uppercase; letter-spacing: .12em;
}
.fav--detail svg { width: 16px; height: 16px; }
.detail-actions .fav--detail { margin-left: 0; } /* niet naar rechts zoals het hartje in de lijst */
@media (max-width: 640px) {
  .bar-links .back-link { display: none; } /* het kruimelpad ("Kalender ›") staat er al */
}

/* Grote knoppen (detailpagina, landingspagina's, cookiebanner): allemaal 38px hoog, zoals het
   hartje op de detailpagina; Website/Agenda/Weigeren met een rand, net als in de lijst. */
.detail-actions .cta, .region-links .cta, .cookie-actions .cta { height: 38px; padding: 0 16px; border-radius: var(--radius); font-size: .72rem; }
.detail-actions .cta--quiet, .region-links .cta--quiet, .cookie-actions .cta--quiet { border: 1px solid var(--border-strong); background: var(--bg-raised); }
@media (hover: hover) {
  .detail-actions .cta--quiet:hover, .region-links .cta--quiet:hover, .cookie-actions .cta--quiet:hover { color: var(--text); border-color: var(--text); }
}

/* ---------- Provinciepagina's ---------- */
.region-intro { margin: 26px 0 10px; max-width: 820px; }
.region-intro h1 { margin: 0 0 14px; font: 600 clamp(1.7rem, 4vw, 2.5rem)/1.15 var(--font-kop); max-width: none; text-align: left; }
.lead-left { font-weight: 300; color: var(--text-muted); font-size: 1.05rem; margin: 0 0 18px; }
.lead-left strong { color: var(--text); font-weight: 700; }
.lead-left a { text-decoration: underline; }
.region-links { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0; }
.place-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.place-list li { display: flex; justify-content: space-between; gap: 10px; padding: 10px 14px; background: var(--bg-raised); border: 1px solid var(--border); border-radius: var(--radius); }
.place-list a { font-weight: 700; }
.place-list span { color: var(--text-faint); font-variant-numeric: tabular-nums; }
.faq details { background: var(--bg-raised); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 8px; }
.faq summary { cursor: pointer; font-weight: 700; }
.faq p { margin: 10px 0 0; color: var(--text-muted); font-weight: 300; }
/* Voettekst: links naar alle provinciepagina's */


/* ---------- Cookiemelding (Google Analytics alleen met toestemming) ---------- */
.cookie-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 50; margin: 0 auto; max-width: 760px;
  display: flex; align-items: center; gap: 16px 24px; padding: 16px 20px;
  background: var(--bg-raised); border: 1px solid var(--border-strong); border-radius: var(--radius);
  box-shadow: 0 20px 50px -20px rgba(30, 30, 30, 0.45);
}
.cookie-banner p { margin: 0; font-size: .9rem; font-weight: 300; color: var(--text-muted); }
.cookie-banner strong { color: var(--text); font-weight: 700; }
.cookie-banner a { text-decoration: underline; }
.cookie-banner .cookie-more { display: block; width: fit-content; margin-top: 8px; }
.cookie-actions { display: flex; align-items: center; gap: 10px; flex: none; }
@media (max-width: 640px) {
  .cookie-banner { flex-direction: column; align-items: stretch; }
  .cookie-actions { justify-content: flex-end; }
}

/* Aantal wedstrijden in een amber vakje (werkbalk boven de lijst en de intro bovenaan). */
#countNum, #lead .num {
  display: inline-block; min-width: 2.2em; padding: 1px 8px; margin-right: 4px;
  background: var(--accent); color: var(--text); border-radius: var(--radius);
  font-weight: 800; text-align: center;
}
#countNum:empty { display: none; }
#lead .num { padding: 0 7px; font-weight: 700; }

/* Detailpagina: tekst "Over deze loop". */
.story { max-width: 760px; }
.story p { margin: 0 0 14px; font-weight: 300; color: var(--text-muted); line-height: 1.7; }
.story a { color: var(--text); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }

/* Afstand die niet meer op het inschrijfformulier staat (mogelijk vol): doorgestreept. */
.dists li.vol { text-decoration: line-through; text-decoration-thickness: 1.5px; color: var(--text-faint); border-style: dashed; }
.onderdelen li.vol { color: var(--text-faint); }
.vol-note { font-size: .82em; font-style: italic; color: var(--text-faint); }
