:root {
  --red: #FA0F0E;
  --red-dark: #c50b0a;
  --red-tint: #FFF0F0;
  --red-tint-2: #FFF5F5;
  --red-tint-3: #FFF7F7;
  --red-border: #FFD4D4;
  --ink: #1D1D1B;
  --body: #4B4B50;
  --grey-1: #3C3C41;
  --grey-2: #6E6E73;
  --grey-3: #8E8E93;
  --grey-4: #A1A1A6;
  --grey-5: #C7C7CC;
  --line: #E8E8EA;
  --line-2: #E1E1E4;
  --line-3: #EFEFF2;
  --surface: #F5F5F7;
  --max: 1080px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Nunito Sans', system-ui, sans-serif;
  color: var(--ink);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--red); }
a:hover { color: var(--red-dark); }
::selection { background: var(--red); color: #fff; }
img { max-width: 100%; }

.wrap { max-width: var(--max); margin: 0 auto; padding-left: 22px; padding-right: 22px; }
.section-white { background: #fff; }
.section-grey { background: var(--surface); }
.section-red { background: var(--red); color: #fff; }
.section > .wrap { padding-top: clamp(40px, 6vw, 72px); padding-bottom: clamp(40px, 6vw, 72px); }
.section-red > .wrap { padding-top: clamp(36px, 5vw, 56px); padding-bottom: clamp(36px, 5vw, 56px); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Buttons & links ---------- */
.btn {
  display: inline-block;
  font-weight: 800;
  font-size: 15.5px;
  text-decoration: none;
  padding: 14px 28px;
  border-radius: 999px;
  transition: background .18s ease, color .18s ease;
}
.btn-sm { font-size: 14.5px; padding: 11px 22px; white-space: nowrap; }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-dark); color: #fff; }
.btn-white { background: #fff; color: var(--red); font-size: 16px; padding: 15px 30px; }
.btn-white:hover { background: var(--ink); color: #fff; }

.link-underline {
  font-size: 15px;
  font-weight: 700;
  color: var(--grey-1);
  text-decoration: none;
  border-bottom: 2px solid var(--line);
  padding-bottom: 2px;
  transition: color .18s ease, border-color .18s ease;
}
.link-underline:hover { color: var(--red); border-bottom-color: var(--red); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  padding-top: 12px;
  padding-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: inherit; }
.brand-logo { height: 38px; width: auto; display: block; border-radius: 3px; }
.brand-logo-fallback {
  display: flex; align-items: center; justify-content: center;
  min-width: 58px; background: var(--red); color: #fff;
  font-weight: 900; font-size: 15px; letter-spacing: .02em;
}
.brand-text {
  display: flex; flex-direction: column; line-height: 1.2;
  padding-left: 14px; border-left: 1px solid var(--line);
}
.brand-title { font-weight: 800; font-size: 15.5px; letter-spacing: -.01em; }
.brand-sub { font-size: 12.5px; color: var(--grey-2); }

.nav { margin-left: auto; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.nav-link {
  font-size: 14.5px; font-weight: 600; color: var(--grey-1);
  text-decoration: none; white-space: nowrap; transition: color .18s ease;
}
.nav-link:hover { color: var(--red); }

/* ---------- Hero ---------- */
.hero {
  padding-top: clamp(36px, 6vw, 64px);
  padding-bottom: clamp(36px, 5vw, 56px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(28px, 4vw, 52px);
  align-items: center;
}
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--red-tint); color: var(--red);
  font-weight: 700; font-size: 13px; padding: 7px 14px;
  border-radius: 999px; margin-bottom: 20px;
}
.hero-title {
  font-weight: 900; font-size: clamp(34px, 4.8vw, 56px);
  line-height: 1.08; letter-spacing: -.025em; margin: 0;
}
.accent { color: var(--red); }
.hero-lead {
  font-size: 17px; line-height: 1.65; color: var(--body);
  max-width: 32em; margin: 20px 0 0;
}
.hero-actions { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-top: 26px; }
.hero-stats {
  display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
  margin-top: 34px; padding-top: 26px; border-top: 1px solid var(--line);
}
.stat-label {
  font-size: 12.5px; font-weight: 700; color: var(--grey-3);
  letter-spacing: .04em; text-transform: uppercase;
}
.stat-value { font-weight: 800; font-size: 20px; margin-top: 4px; }
.stat-divider { width: 1px; height: 38px; background: var(--line); }

.photo { margin: 0; border-radius: 16px; overflow: hidden; background: var(--line-3); }
.photo img { width: 100%; height: auto; display: block; }
.photo-empty { position: relative; }
.photo-hero.photo-empty { aspect-ratio: 4 / 3; }
.photo-story.photo-empty { aspect-ratio: 3 / 2; }
.photo-empty::after {
  content: 'foto volgt';
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: var(--grey-4);
}

/* ---------- Opgehaald ---------- */
.raised {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(24px, 3vw, 48px);
  align-items: center;
}
.eyebrow {
  font-size: 13px; font-weight: 800; letter-spacing: .06em;
  text-transform: uppercase; color: var(--red); margin-bottom: 12px;
}
.eyebrow-light { color: rgba(255, 255, 255, .85); margin-bottom: 0; }
.eyebrow-grey { color: var(--grey-3); margin-bottom: 0; }
.raised-amount { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-top: 10px; }
.raised-number {
  font-weight: 900; font-size: clamp(44px, 6vw, 68px);
  line-height: 1; letter-spacing: -.03em;
}
.raised-goal { font-size: 16px; color: rgba(255, 255, 255, .85); }
.raised-bar-wrap { margin-top: 20px; max-width: 460px; }
.raised-note { font-size: 13px; color: rgba(255, 255, 255, .85); margin-top: 8px; }
.raised-cta { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.raised-fineprint { font-size: 12.5px; color: rgba(255, 255, 255, .75); }

.bar { height: 10px; border-radius: 999px; overflow: hidden; }
.bar-light { background: rgba(255, 255, 255, .28); }
.bar-grey { flex: 1; min-width: 200px; height: 8px; background: var(--line-2); }
.bar-fill { height: 100%; border-radius: 999px; width: 0; transition: width .6s ease; }
.bar-fill-white { background: #fff; }
.bar-fill-red { background: var(--red); }

/* ---------- Verhaal ---------- */
.story {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
}
.h2 {
  font-weight: 900; font-size: clamp(26px, 3.2vw, 38px);
  line-height: 1.15; letter-spacing: -.02em; margin: 0 0 22px;
}
.h2-tight { margin-bottom: 0; }
.body-text { font-size: 16.5px; line-height: 1.75; color: var(--body); margin: 0 0 16px; }
.signoff { font-size: 16.5px; line-height: 1.7; color: var(--ink); font-weight: 700; margin: 24px 0 0; }
.signoff span { font-weight: 400; color: var(--body); }
.story-media { padding-top: 33px; }
.story-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.fact { background: var(--surface); border-radius: 12px; padding: 18px; }
.fact-number { font-weight: 900; font-size: 26px; color: var(--red); line-height: 1; }
.fact-label { font-size: 13px; color: var(--grey-2); margin-top: 6px; line-height: 1.4; }

/* ---------- Section heads ---------- */
.section-head-split {
  display: flex; align-items: end; justify-content: space-between;
  gap: 20px; flex-wrap: wrap; margin-bottom: 32px;
}
.section-head-note { font-size: 14px; color: var(--grey-2); max-width: 24em; line-height: 1.6; margin: 0; }
.section-head-center { text-align: center; margin-bottom: 32px; }
.section-head-center .h2 { margin-bottom: 10px; }
.section-head-center-tight { margin-bottom: 28px; }
.section-head-left { max-width: 680px; }
.section-head-left .h2 { margin-bottom: 24px; }
.section-lead {
  font-size: 15.5px; color: var(--grey-2); max-width: 40em;
  margin: 0 auto; line-height: 1.6;
}

/* ---------- Lopers ---------- */
/* Vijf lopers vallen lelijk uiteen in 4+1 als je het aan auto-fit overlaat.
   Daarom bewust: 2 op een telefoon, 3 op een tablet, 5 naast elkaar op groot. */
.runners { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 479px) { .runners { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .runners { grid-template-columns: repeat(5, 1fr); } }
.runner {
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  overflow: hidden; display: flex; flex-direction: column;
}
.runner-photo {
  aspect-ratio: 1 / 1; background: var(--line-3);
  display: flex; align-items: center; justify-content: center; position: relative;
}
.runner-initials { font-weight: 900; font-size: 30px; color: var(--grey-5); }
.runner-photo-note {
  position: absolute; bottom: 8px; left: 0; right: 0;
  text-align: center; font-size: 10.5px; color: var(--grey-4);
}
.runner-body { padding: 14px 14px 16px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.runner-name { font-weight: 800; font-size: 16px; letter-spacing: -.01em; }
.runner-km { font-size: 13px; color: var(--grey-3); margin-top: 3px; }
.strava-link {
  display: inline-block; margin-top: auto; font-size: 12.5px; font-weight: 800;
  color: var(--red); text-decoration: none; border: 1px solid var(--red-border);
  background: var(--red-tint-2); border-radius: 999px; padding: 7px 12px; text-align: center;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}
.strava-link:hover { background: var(--red); color: #fff; border-color: var(--red); }
.strava-link-off {
  font-weight: 700; color: var(--grey-4); border-color: var(--line);
  background: var(--surface); pointer-events: none;
}

.km-total {
  display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap;
  margin-top: 26px; padding-top: 24px; border-top: 1px solid var(--line-2);
}
.km-amount { display: flex; align-items: baseline; gap: 8px; }
.km-number { font-weight: 900; font-size: 34px; line-height: 1; letter-spacing: -.02em; }
.km-goal { font-size: 16px; color: var(--grey-2); }

/* ---------- Rondes tot nu toe ---------- */
.rondes { margin-top: 30px; padding-top: 26px; border-top: 1px solid var(--line-2); }
.rondes-kop {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 14px; flex-wrap: wrap; margin-bottom: 14px;
}
.rondes-aantal { font-size: 13px; color: var(--grey-2); }
.rondes-lijst { display: flex; flex-direction: column; gap: 8px; }
.ronde-rij {
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 13px 16px;
  display: grid; grid-template-columns: auto 1fr auto;
  align-items: baseline; gap: 4px 14px;
}
.ronde-tijd { font-size: 13px; color: var(--grey-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ronde-wie { font-weight: 800; font-size: 15.5px; }
.ronde-km { font-weight: 900; font-size: 15.5px; color: var(--red); white-space: nowrap; }
.ronde-notitie {
  grid-column: 1 / -1; font-size: 14px; color: var(--body);
  line-height: 1.5; margin-top: 2px;
}
.rondes-leeg { font-size: 14.5px; color: var(--grey-3); padding: 2px; }
.rondes-pager {
  display: flex; align-items: center; justify-content: flex-end;
  gap: 10px; margin-top: 14px;
}

/* ---------- Live ---------- */
.live-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.card { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; }
.card-live { padding: 26px 26px 28px; display: flex; flex-direction: column; }
.card-glyph {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--surface); color: var(--grey-2); margin-bottom: 16px;
}
.card-glyph-red { background: var(--red-tint); color: var(--red); }
.card-title { font-weight: 800; font-size: 17px; letter-spacing: -.01em; margin-bottom: 8px; }
.card-text { font-size: 15px; line-height: 1.65; color: var(--body); margin: 0; }
.card-cta {
  margin-top: 18px; font-size: 13.5px; font-weight: 800; color: var(--red);
}
.card-link {
  text-decoration: none; color: inherit;
  transition: border-color .18s ease, background .18s ease;
}
.card-link:hover { border-color: var(--red); background: var(--red-tint-2); color: inherit; }

/* ---------- Routes ---------- */
.routes { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.route-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.route-embed {
  min-height: 340px; background: var(--line-3);
  display: flex; align-items: center; justify-content: center;
}
.route-embed-link { font-size: 12.5px; font-weight: 700; color: var(--grey-3); text-decoration: none; }
.route-foot {
  padding: 14px 16px; display: flex; align-items: center;
  justify-content: space-between; gap: 12px; border-top: 1px solid var(--line-3);
}
.route-name { font-weight: 800; font-size: 15px; }
.route-strava {
  font-size: 12.5px; font-weight: 800; color: var(--red); text-decoration: none;
  border: 1px solid var(--red-border); background: var(--red-tint-2);
  border-radius: 999px; padding: 7px 12px; white-space: nowrap;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}
.route-strava:hover { background: var(--red); color: #fff; border-color: var(--red); }

/* ---------- Schema ---------- */
.schema-controls {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 16px;
}
.select {
  font-family: inherit; font-size: 14px; font-weight: 700; padding: 10px 14px;
  border: 1px solid var(--line); border-radius: 10px; background: #fff;
  color: var(--ink); cursor: pointer; min-width: 170px;
}
.pager { display: flex; align-items: center; gap: 10px; }
.btn-ghost {
  font-family: inherit; font-size: 13.5px; font-weight: 700; padding: 9px 16px;
  border-radius: 999px; border: 1px solid var(--line); background: #fff;
  color: var(--ink); cursor: pointer;
}
.btn-ghost:hover:not(:disabled) { border-color: var(--red); color: var(--red); }
.btn-ghost:disabled { opacity: .35; cursor: default; }
.page-label {
  font-size: 13.5px; font-weight: 700; color: var(--grey-2);
  min-width: 46px; text-align: center;
}
.table { border: 1px solid var(--line); border-radius: 14px; overflow-x: auto; }
.table-row {
  display: grid; grid-template-columns: 1.5fr 1.2fr 1fr 1fr;
  min-width: 520px; align-items: center;
}
.table-head {
  background: var(--surface); font-size: 12.5px; font-weight: 800;
  color: var(--grey-2); letter-spacing: .03em; text-transform: uppercase;
}
.table-head > div { padding: 13px 18px; }
.table-body-row { border-top: 1px solid var(--line-3); background: #fff; }
.table-body-row.is-team { background: var(--red-tint-3); }
.table-body-row > div { padding: 14px 18px; font-size: 14.5px; color: var(--body); }
.cell-wie { font-weight: 800; color: var(--ink) !important; }
.cell-start { font-weight: 700; color: var(--red) !important; }
.table-empty { padding: 18px; font-size: 14.5px; color: var(--grey-2); border-top: 1px solid var(--line-3); }

/* ---------- Regels ---------- */
.rules { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; }
.rule { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 22px 24px; }
.rule-title { font-weight: 800; font-size: 15.5px; margin-bottom: 8px; }
.rule-body { font-size: 15px; line-height: 1.65; color: var(--body); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #fff; }
.site-footer .wrap { padding-top: clamp(34px, 5vw, 48px); padding-bottom: 40px; }
.footer-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; flex-wrap: wrap; padding-bottom: 28px;
  border-bottom: 1px solid rgba(255, 255, 255, .14);
}
.footer-brand { display: flex; align-items: center; gap: 16px; }
.footer-brand-text { line-height: 1.35; }
.footer-title { font-weight: 800; font-size: 16px; }
.footer-sub { font-size: 13px; color: rgba(255, 255, 255, .6); }
.footer-note { font-size: 13px; color: rgba(255, 255, 255, .55); margin-top: 22px; }
.site-footer .btn-red { font-size: 15px; padding: 13px 26px; }

/* ---------- Mobiel ---------- */
@media (max-width: 700px) {
  /* Zonder dit wordt de sticky header drie regels hoog (~157px) en eet hij
     een vijfde van het scherm op. Nu: merk + Doneer op regel 1, de
     sectielinks op een horizontaal scrollbare regel 2. */
  .header-inner { row-gap: 8px; }
  .brand { flex: 1 1 auto; min-width: 0; }
  .brand-logo { height: 32px; }
  .brand-title { font-size: 14.5px; }
  .nav {
    order: 3;
    flex: 1 0 100%;
    margin-left: 0;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 16px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .nav::-webkit-scrollbar { display: none; }
  .btn-header {
    order: 2;
    margin-left: auto;
    padding: 9px 18px;
    font-size: 14px;
  }
  .hero-stats { gap: 18px; }
  .stat-divider { display: none; }
  .story-media { padding-top: 0; }
  .section-head-split { align-items: start; }
}

/* Het renschema is een tabel van vier kolommen; onder 560px past die niet
   zonder zijwaarts scrollen. Daar wordt elke regel een kaartje van twee
   regels: wie + starttijd boven, route + afstand eronder. Labels zijn niet
   nodig, want "Route 1", "16:40" en "5,0 km" spreken voor zich. */
@media (max-width: 560px) {
  .table { border: 0; overflow-x: visible; }
  .table-head { display: none; }
  .table-row {
    min-width: 0;
    grid-template-columns: 1fr auto;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    margin-bottom: 8px;
  }
  .table-body-row { border-top: 1px solid var(--line); }
  .table-body-row > div { padding: 12px 14px 2px; }
  .table-row > div:nth-child(1) { grid-area: 1 / 1; }
  .table-row > div:nth-child(3) { grid-area: 1 / 2; text-align: right; }
  .table-row > div:nth-child(2) { grid-area: 2 / 1; padding: 0 14px 12px; }
  .table-row > div:nth-child(4) { grid-area: 2 / 2; padding: 0 14px 12px; text-align: right; }
}

/* Tikbaar met een duim: losse tekstlinks zijn maar 19px hoog. */
@media (max-width: 700px) {
  .nav-link { padding: 6px 0; }
  .invoer-terug { padding: 5px 0; display: inline-block; }
}

/* Alleen echt smalle telefoons (iPhone SE, 320-359px). Daarboven past de
   merkregel gewoon; zonder deze regels wordt de sticky header daar drie
   regels hoog en eet hij een vijfde van het scherm. */
@media (max-width: 359px) {
  .brand-sub { display: none; }
  .brand-logo { height: 24px; }
  .brand-title { font-size: 13.5px; }
  .brand-text { padding-left: 10px; }
  .header-inner { gap: 10px; }
  .btn-header { padding: 9px 15px; font-size: 13.5px; }
  .wrap { padding-left: 16px; padding-right: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .bar-fill { transition: none; }
}
