/* =====================================================================
   De Mooiste voor Mama — nieuw ontwerp
   Een laag bovenop style.css: zelfde selectors (later geladen, dus die winnen),
   zodat alle racestanden (hamer, finish, volledig scherm, app, vrienden) blijven werken.
   ===================================================================== */

:root[data-theme="dark"] {
  --bg: #0A0908;
  --card: #14110F;
  --card-2: #1B1714;
  --text: #F6F0E6;
  --muted: #9A9185;
  --line: rgba(246, 240, 230, .09);
  --line-strong: rgba(246, 240, 230, .16);
  --orange-2: #FF8A4C;
  --radius: 28px;
  --wrap: 1180px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

body.nieuw {
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(255, 90, 31, .10), transparent 60%),
    radial-gradient(900px 500px at -10% 40%, rgba(255, 90, 31, .05), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  font-size: 17px;
}
/* Fijne korrel over alles, voor een warmer, minder digitaal zwart. */
body.nieuw::after {
  content: ""; position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: .05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
::selection { background: var(--orange); color: var(--ink); }

.wrap { max-width: var(--wrap); padding: 0 24px; }
@media (max-width: 600px) { .wrap { padding: 0 16px; } }
.section { --sec-pad: clamp(88px, 11vw, 150px); padding-top: var(--sec-pad); }
/* Menulinks landen op de titel van een sectie, net onder de balk en de sponsorbanner (hoogte gemeten in nieuw.js),
   en niet bovenaan de witruimte van de sectie. */
html { scroll-padding-top: calc(var(--sticky-h, 135px) + 28px); }
main > section.section { scroll-margin-top: calc(-1 * var(--sec-pad)); }

/* ---------- typografie ---------- */
h2 { font-size: clamp(42px, 6.4vw, 84px); line-height: .92; letter-spacing: -.015em; max-width: 17ch; text-wrap: balance; }
h2 em { color: var(--orange); font-style: italic; font-weight: 900; }
h3 { font-size: 28px; }
.lead, .small-lead { font-size: 18px; line-height: 1.55; max-width: 38em; margin: 18px 0 32px; }
.eyebrow { font-size: 12px; letter-spacing: .16em; }
.big-number { font-size: clamp(64px, 9vw, 108px); }

.n-label { display: inline-flex; align-items: center; gap: 12px; margin-bottom: 22px; color: var(--text); }
.n-num {
  display: inline-grid; place-items: center; min-width: 34px; height: 34px; padding: 0 8px; border-radius: 999px;
  border: 1px solid var(--line-strong); color: var(--orange); font: 800 15px/1 "Barlow Condensed", sans-serif; letter-spacing: .04em;
}

/* ---------- bovenbalk ---------- */
.topbar {
  padding-left: max(24px, calc((100vw - var(--wrap)) / 2 + 24px));
  padding-right: max(24px, calc((100vw - var(--wrap)) / 2 + 24px));
  background: color-mix(in srgb, var(--bg) 62%, transparent);
  border-bottom-color: transparent;
  transition: background .3s, border-color .3s;
}
body.n-scrolled .topbar { background: color-mix(in srgb, var(--bg) 86%, transparent); border-bottom-color: var(--line); }
.wordmark { font-size: 21px; }
.wordmark .logo { border-radius: 9px; box-shadow: 0 4px 18px rgba(255, 90, 31, .35); }
.n-nav { display: none; gap: 4px; margin-left: auto; }
.n-nav a {
  position: relative; padding: 8px 14px; border-radius: 999px; color: var(--muted); text-decoration: none;
  font-size: 14px; font-weight: 600; transition: color .2s, background .2s;
}
.n-nav a:hover { color: var(--text); background: rgba(255, 255, 255, .05); }
.n-nav a.is-active { color: var(--text); }
.n-nav a.is-active::after {
  content: ""; position: absolute; left: 50%; bottom: 2px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--orange);
}
.n-nav-cta {
  display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 16px; border-radius: 10px; text-decoration: none;
  background: var(--orange); color: var(--ink); font: 600 14px/1 Inter, system-ui, sans-serif; letter-spacing: -.005em;
  transition: background .2s;
}
.n-nav-cta:hover { background: #FF7240; }
.n-nav-cta svg { width: 15px; height: 15px; fill: currentColor; }
@media (min-width: 960px) { .n-nav { display: flex; } .n-nav-cta { margin-left: 12px; } }
body.app .n-nav, body.app .n-nav-cta, body.fs-open .n-nav-cta { display: none; }
.topbar:has(.friend-me:not([hidden])) .n-nav, .topbar:has(.friend-me:not([hidden])) .n-nav-cta { display: none; }

/* ---------- knoppen & kaarten ---------- */
.btn {
  min-height: 52px; padding: 0 24px; border-radius: 14px;
  font: 600 16px/1.2 Inter, system-ui, sans-serif; letter-spacing: -.01em; text-transform: none;
  transition: background .2s, border-color .2s, color .2s, transform .15s;
}
.btn:active:not(:disabled) { transform: scale(.98); }
.btn-primary { background: var(--orange); color: var(--ink); box-shadow: none; }
.btn-primary:hover:not(:disabled) { background: #FF7240; }
.btn-ghost { background: rgba(255, 255, 255, .05); border: 1px solid var(--line-strong); color: var(--text); }
.btn-ghost:hover:not(:disabled) { background: rgba(255, 255, 255, .09); border-color: rgba(255, 255, 255, .28); }
/* Hoofdknoppen krijgen een pijltje dat bij hover meeschuift. */
.btn-hero:not(.btn-wall)::after, .raised .btn::after, .n-foot-cta::after {
  content: "→"; display: inline-block; margin-left: 2px; transition: transform .25s var(--ease);
}
.btn-hero:hover::after, .raised .btn:hover::after, .n-foot-cta:hover::after { transform: translateX(4px); }
.btn:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }

.card {
  background: linear-gradient(180deg, var(--card-2, var(--card)), var(--card));
  border-color: var(--line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04), 0 20px 60px rgba(0, 0, 0, .25);
  padding: 24px;
}
@media (max-width: 600px) { .card { padding: 20px; } }
.pill { background: rgba(255, 255, 255, .04); border-color: var(--line-strong); }

/* ---------- kop ---------- */
.hero h1 { letter-spacing: -.02em; }
body.hero-film .hero h1 { font-size: clamp(72px, 13.5vw, 184px); line-height: .84; }
.hero-top .eyebrow { color: var(--text); opacity: .8; }
.n-hero-sub { max-width: 30em; margin: 22px 0 0; font-size: clamp(17px, 1.6vw, 20px); line-height: 1.5; color: color-mix(in srgb, var(--text) 82%, transparent); text-shadow: 0 1px 18px rgba(0, 0, 0, .8); }
body:not(.pre-race) .n-hero-sub { display: none; }

.n-countdown { display: flex; gap: 10px; margin-top: 28px; }
.n-countdown div {
  min-width: 82px; padding: 12px 14px 10px; border-radius: 18px; text-align: center;
  background: rgba(15, 13, 11, .55); border: 1px solid var(--line-strong);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.n-countdown b { display: block; font: 800 clamp(32px, 4vw, 46px)/1 "Barlow Condensed", sans-serif; font-variant-numeric: tabular-nums; }
.n-countdown span { display: block; margin-top: 4px; font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.n-countdown div:first-child b { color: var(--orange); }
body:not(.pre-race) .n-countdown, body.pre-race #hero-count { display: none; }
@media (max-width: 480px) { .n-countdown { gap: 6px; } .n-countdown div { min-width: 0; flex: 1; padding: 10px 4px 8px; } }

.btn-hero { min-height: 56px; padding: 0 28px; font-size: 17px; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); }
.social-btn {
  height: 44px; padding: 0 16px 0 13px; border-radius: 12px; border: 1px solid var(--line-strong);
  background: rgba(15, 13, 11, .45); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: background .2s, border-color .2s, color .2s;
}
.social-btn:hover { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .28); color: var(--text); }
.chip { border-radius: 12px; border-width: 1px; }

/* ---------- verhaal ---------- */
.n-story { display: grid; gap: 48px; align-items: end; }
@media (min-width: 960px) { .n-story { grid-template-columns: 1.35fr 1fr; gap: 72px; } }
.story-quote { padding-left: 0; border-left: 0; margin: 0; }
.story-quote::before {
  content: "\201C"; display: block; height: .52em; margin-bottom: 8px; color: var(--orange);
  font: 900 140px/1 "Barlow Condensed", sans-serif;
}
.story-quote p { font-size: clamp(28px, 3vw, 42px); line-height: 1.12; font-style: normal; font-weight: 800; text-transform: none; max-width: 20em; }
.n-sign { margin: 22px 0 0; font: italic 800 24px/1 "Barlow Condensed", sans-serif; color: var(--orange); }
.n-facts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.n-facts li {
  display: grid; gap: 6px; padding: 20px; border-radius: 22px; border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(255, 255, 255, .035), transparent 70%);
}
.n-facts b { font: 800 clamp(36px, 3.6vw, 48px)/1 "Barlow Condensed", sans-serif; letter-spacing: -.01em; }
.n-facts li:nth-child(3) b { color: var(--orange); }
.n-facts span { font-size: 14px; line-height: 1.35; color: var(--muted); }

/* ---------- opgehaald ---------- */
.raised-section { --sec-pad: clamp(56px, 7vw, 96px); }
.raised.card {
  position: relative; overflow: hidden; padding: clamp(24px, 4vw, 48px);
  background:
    radial-gradient(700px 300px at 100% 0%, rgba(255, 90, 31, .22), transparent 65%),
    linear-gradient(180deg, var(--card-2, var(--card)), var(--card));
  border-color: color-mix(in srgb, var(--orange) 22%, var(--line));
}
.n-raised-glow {
  position: absolute; right: -120px; top: -120px; width: 360px; height: 360px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(255, 90, 31, .35), transparent 65%); filter: blur(20px);
  animation: n-breathe 6s ease-in-out infinite;
}
@keyframes n-breathe { 50% { transform: scale(1.15); opacity: .7; } }
.raised .big-number { color: var(--text); text-shadow: 0 6px 40px rgba(255, 90, 31, .25); }
.raised .bar { height: 18px; margin: 22px 0 12px; background: rgba(255, 255, 255, .06); box-shadow: inset 0 1px 3px rgba(0, 0, 0, .5); }
.raised .bar-fill {
  background: linear-gradient(90deg, #FF3D00, var(--orange) 45%, var(--orange-2, #FF8A4C));
  box-shadow: 0 0 24px rgba(255, 90, 31, .55);
  background-size: 200% 100%; animation: n-flow 4s linear infinite;
}
@keyframes n-flow { to { background-position: -200% 0; } }
.raised .btn { width: auto; justify-self: start; margin-top: 18px; }
@media (max-width: 600px) { .raised .btn { width: 100%; } }

/* ---------- zo help je ---------- */
.n-help-grid { display: grid; gap: 14px; margin-top: 40px; }
@media (min-width: 860px) { .n-help-grid { grid-template-columns: repeat(3, 1fr); } }
.n-help-card {
  position: relative; display: flex; flex-direction: column; gap: 12px; padding: 28px; border-radius: var(--radius);
  color: var(--text); text-decoration: none; overflow: hidden;
  background: linear-gradient(180deg, var(--card-2, var(--card)), var(--card)); border: 1px solid var(--line);
  transition: transform .35s var(--ease), border-color .35s, box-shadow .35s;
}
.n-help-card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .35s;
  background: radial-gradient(400px 200px at 0% 0%, rgba(255, 90, 31, .18), transparent 70%);
}
.n-help-card:hover { transform: translateY(-6px); border-color: color-mix(in srgb, var(--orange) 50%, transparent); box-shadow: 0 24px 60px rgba(0, 0, 0, .4); }
.n-help-card:hover::before { opacity: 1; }
.n-help-card h3 { font-size: 32px; text-transform: uppercase; }
.n-help-card p { margin: 0; color: var(--muted); line-height: 1.55; }
.n-help-ico {
  display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 18px; border-radius: 18px;
  background: color-mix(in srgb, var(--orange) 14%, transparent); color: var(--orange);
}
.n-help-ico svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.n-help-card:first-child .n-help-ico svg { fill: currentColor; stroke: none; }
.n-help-go { margin-top: auto; padding-top: 18px; font: 800 17px/1 "Barlow Condensed", sans-serif; letter-spacing: .06em; text-transform: uppercase; color: var(--orange); }
.n-help-go i { display: inline-block; font-style: normal; transition: transform .3s var(--ease); }
.n-help-card:hover .n-help-go i { transform: translateX(6px); }

/* ---------- route / tijdlijn ---------- */
.n-timeline { list-style: none; margin: 48px 0 0; padding: 0; display: grid; gap: 0; position: relative; }
.n-timeline li { position: relative; display: grid; grid-template-columns: 92px 1fr; gap: 18px; padding: 0 0 30px; }
.n-timeline li::before {
  content: ""; position: absolute; left: 45px; top: 34px; bottom: -2px; width: 2px;
  background: linear-gradient(var(--line-strong), var(--line));
}
.n-timeline li:last-child::before { display: none; }
.n-km {
  position: relative; z-index: 1; justify-self: center; display: grid; place-items: center; min-width: 64px; height: 36px; padding: 0 12px;
  border-radius: 999px; background: var(--bg); border: 1.5px solid var(--line-strong);
  font: 800 18px/1 "Barlow Condensed", sans-serif; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.n-timeline h3 { font-size: 26px; text-transform: uppercase; margin: 4px 0 6px; }
.n-timeline p { margin: 0; color: var(--muted); line-height: 1.5; max-width: 30em; }
.n-timeline .n-hammer .n-km { background: #C8102E; border-color: #C8102E; color: #fff; box-shadow: 0 0 26px rgba(200, 16, 46, .55); }
.n-timeline .n-hammer h3 { color: #FF4A3C; }
.n-timeline .n-finish .n-km { background: var(--orange); border-color: var(--orange); color: var(--ink); box-shadow: 0 0 26px rgba(255, 90, 31, .5); }

@media (min-width: 960px) {
  .n-timeline { grid-template-columns: repeat(5, 1fr); gap: 18px; }
  .n-timeline::before {
    content: ""; position: absolute; left: 0; right: 0; top: 18px; height: 2px;
    background: linear-gradient(90deg, var(--line-strong), var(--line-strong) 40%, #C8102E 46%, #C8102E 62%, var(--line-strong) 68%, var(--orange));
  }
  .n-timeline li { grid-template-columns: 1fr; gap: 20px; padding: 0; }
  .n-timeline li::before { display: none; }
  .n-km { justify-self: start; }
  .n-timeline h3 { font-size: 24px; }
  .n-timeline p { font-size: 15px; }
}

/* ---------- live ---------- */
#live .section-head h2 { max-width: none; }
.map-card { border-radius: var(--radius); }
@media (min-width: 900px) {
  body.nieuw:not(.app-live) .map-card:not(.is-fullscreen) #map { height: 540px; }
}
.stats { gap: 12px; margin-top: 14px; }
.stat {
  position: relative; padding: 18px 20px; border-radius: 22px; overflow: hidden;
  background: linear-gradient(180deg, var(--card-2, var(--card)), var(--card)); border-color: var(--line);
}
.stat::before { content: ""; position: absolute; left: 20px; right: 20px; top: 0; height: 2px; background: var(--orange); opacity: .7; border-radius: 0 0 2px 2px; }
.stat .mid-number { font-size: 38px; margin-top: 6px; }

/* Voor de racedag: geen rij nullen, maar wat je op de racedag hier gaat zien. */
.n-live-pre { display: none; }
body.pre-race .n-live-pre { display: grid; gap: 12px; margin: 0 0 14px; }
@media (min-width: 760px) { body.pre-race .n-live-pre { grid-template-columns: repeat(3, 1fr); } }
.n-live-pre div { display: flex; align-items: center; gap: 16px; padding: 18px 20px; border-radius: 22px; border: 1px solid var(--line); background: rgba(255, 255, 255, .02); }
.n-live-pre b { flex: none; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: color-mix(in srgb, var(--orange) 14%, transparent); color: var(--orange); font: 800 20px/1 "Barlow Condensed", sans-serif; }
.n-live-pre span { font-size: 15px; line-height: 1.4; color: var(--muted); }
body.pre-race #live .stats, body.pre-race #live > .bar, body.pre-race #progress-label, body.pre-race #s-updated { display: none; }

/* ---------- doneren ---------- */
/* Desktop: kop links en uitleg rechts, daaronder twee even hoge kaarten, en de supporters over de hele breedte. */
@media (min-width: 1000px) {
  #doneer {
    display: grid; grid-template-columns: 1fr 1fr; column-gap: 24px; align-items: stretch;
    grid-template-areas: "label label" "title lead" "card extra" "suptitle suptitle" "sup sup";
  }
  #doneer > .n-label { grid-area: label; }
  #doneer > h2 { grid-area: title; align-self: end; }
  #doneer > .lead { grid-area: lead; align-self: end; margin: 0 0 6px; }
  #doneer > .donate-card { grid-area: card; margin-top: 48px; }
  #doneer > .extras { grid-area: extra; margin-top: 48px; }
  #doneer > .extras > .extra { height: 100%; }
  #doneer > .supporters-title { grid-area: suptitle; margin-top: 56px; }
  #doneer > .supporters { grid-area: sup; gap: 16px; }
  #doneer > .supporters .sup-col { gap: 16px; }
  .donate-card { display: flex; flex-direction: column; justify-content: space-between; gap: 28px; }
  .donate-card .btn { width: 100%; }
}
.donate-card {
  padding: 32px;
  border-color: color-mix(in srgb, var(--orange) 30%, var(--line));
  background: radial-gradient(520px 260px at 0% 0%, rgba(255, 90, 31, .16), transparent 70%), linear-gradient(180deg, var(--card-2, var(--card)), var(--card));
}
.donate-card h3, .extra h3 { font-size: 34px; text-transform: uppercase; }
.n-donate-points { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 10px; }
.n-donate-points li { position: relative; padding-left: 30px; font-size: 15px; line-height: 1.45; }
.n-donate-points li::before {
  content: ""; position: absolute; left: 0; top: 1px; width: 20px; height: 20px; border-radius: 50%;
  background: color-mix(in srgb, var(--orange) 18%, transparent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FF5A1F' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.extra { gap: 14px; padding: 32px; }
.badge { padding: 5px 11px; }
.sup { padding: 18px 20px; border-radius: 22px; background: rgba(255, 255, 255, .02); }
.sup.has-note { background: radial-gradient(380px 170px at 0% 0%, rgba(255, 90, 31, .09), transparent 70%), rgba(255, 255, 255, .02); }

/* ---------- sponsoren ---------- */
.sponsor { border-radius: 24px; padding: 14px; }
.sponsor-ticker { border-color: var(--line); }

/* ---------- meldingen ---------- */
.install-grid { gap: 14px; }
.how h3 { font-size: 30px; text-transform: uppercase; }
.how ol { counter-reset: n; list-style: none; padding: 0; margin: 16px 0; display: grid; gap: 10px; }
.how li { counter-increment: n; position: relative; padding-left: 42px; margin: 0; line-height: 1.5; }
.how li::before {
  content: counter(n); position: absolute; left: 0; top: -1px; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  background: color-mix(in srgb, var(--orange) 16%, transparent); color: var(--orange); font: 800 15px/1 "Barlow Condensed", sans-serif;
}
.push-card { margin-top: 14px; padding: 28px; }
.push-card h3 { font-size: 30px; text-transform: uppercase; }
.segmented .opt { border-radius: 18px; padding: 16px 18px; border-color: var(--line-strong); }
@media (min-width: 760px) { #push-btn, #push-off { width: auto; justify-self: start; } }

/* ---------- vragen ---------- */
.faq { display: block; margin-top: 36px; max-width: 900px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 24px 4px; cursor: pointer; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary h3 { margin: 0; font-size: clamp(22px, 2.4vw, 30px); text-transform: uppercase; transition: color .2s; }
.faq summary::after {
  content: ""; flex: none; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line-strong);
  background:
    linear-gradient(var(--text), var(--text)) center / 14px 2px no-repeat,
    linear-gradient(var(--text), var(--text)) center / 2px 14px no-repeat;
  transition: transform .3s var(--ease), background-color .3s, border-color .3s;
}
.faq summary:hover h3 { color: var(--orange); }
.faq details[open] summary::after {
  transform: rotate(45deg); background-color: var(--orange); border-color: var(--orange);
  background-image: linear-gradient(var(--ink), var(--ink)), linear-gradient(var(--ink), var(--ink));
}
.faq details p { margin: 0; padding: 0 60px 26px 4px; font-size: 17px; line-height: 1.6; color: var(--muted); max-width: 46em; }
.faq details[open] p { animation: n-drop .35s var(--ease); }
@keyframes n-drop { from { opacity: 0; transform: translateY(-6px); } }
body.is-finished .faq details.hide-finished { display: none; }

/* ---------- footer ---------- */
.footer { position: relative; margin-top: clamp(96px, 12vw, 160px); padding-top: 56px; padding-bottom: 56px; border-top: 1px solid var(--line); }
.n-foot-top { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 40px; }
.n-foot-name {
  margin: 0; font: italic 900 clamp(56px, 10vw, 140px)/.82 "Barlow Condensed", sans-serif; text-transform: uppercase; letter-spacing: -.02em;
  color: var(--text);
}
.n-foot-name span { color: var(--orange); }
.n-foot-cta { width: auto; }
@media (max-width: 600px) { .n-foot-cta { width: 100%; } }
.footer p { max-width: 52em; line-height: 1.6; }

/* ---------- binnenkomen ---------- */
[data-reveal] { transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
[data-reveal].in { transform: none; }
@media (prefers-reduced-motion: reduce) {
  .n-raised-glow, .raised .bar-fill { animation: none; }
  [data-reveal] { transform: none; }
}

/* In de hamerstand en na de finish laten we de oorspronkelijke sfeer het overnemen. */
body.wall .n-help-card::before, body.wall .raised.card { background: var(--card); }

/* De aftelklok staat al groot in de kop; in de app (zonder kop op dit tabblad) blijft hij staan. */
body.pre-race:not(.app) #countdown { display: none; }
.footer .n-foot-name { margin: 0; line-height: .84; max-width: none; }
.section-head { align-items: flex-end; }

/* ---------- berichten: de hele race (tot 40 km) ---------- */
.n-span { margin-top: 28px; }
.n-span-bar {
  position: relative; display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: center; padding: 20px 22px; border-radius: 22px;
  border: 1px solid color-mix(in srgb, var(--orange) 30%, var(--line));
  background: linear-gradient(90deg, rgba(255, 90, 31, .14), rgba(255, 90, 31, .04));
}
.n-span-bar h3 { margin: 0 0 4px; font-size: 24px; text-transform: uppercase; }
.n-span-bar p { margin: 0; color: var(--muted); line-height: 1.5; font-size: 15px; }
.n-span-ico { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--orange); color: var(--ink); }
.n-span-ico svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.n-span-range { grid-column: 1 / -1; justify-self: start; font: 800 16px/1 "Barlow Condensed", sans-serif; letter-spacing: .06em; color: var(--orange); }
@media (min-width: 960px) {
  /* Loopt van de start tot het 40 km-punt in de tijdlijn erboven (vier van de vijf kolommen). */
  .n-span { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; }
  .n-span-bar { grid-column: 1 / 5; grid-template-columns: auto 1fr auto; margin-right: -18px; border-right: 3px solid var(--orange); border-radius: 22px 6px 6px 22px; }
  .n-span-range { grid-column: auto; justify-self: end; }
}

/* ---------- finish-animatie ---------- */
.finish-hit {
  position: fixed; inset: 0; z-index: 3000; display: grid; place-items: center; overflow: hidden; cursor: pointer;
  background: radial-gradient(circle at 50% 55%, rgba(255, 90, 31, .35), rgba(10, 9, 8, .96) 60%);
  opacity: 0;
}
.finish-hit[hidden] { display: none; }
.finish-hit.play { animation: fin-in .5s ease forwards; }
.finish-hit.leaving { animation: fin-out .7s ease forwards; }
@keyframes fin-in { to { opacity: 1; } }
@keyframes fin-out { from { opacity: 1; } to { opacity: 0; } }
.finish-flag {
  position: absolute; left: -10%; right: -10%; top: 50%; height: 120px; margin-top: -60px;
  background: conic-gradient(#15120F 25%, #F6F0E6 0 50%, #15120F 0 75%, #F6F0E6 0) 0 0 / 40px 40px;
  transform: translateX(-110%) skewY(-6deg); opacity: .9;
}
.finish-hit.play .finish-flag { animation: fin-flag 1.1s cubic-bezier(.7, 0, .2, 1) .1s forwards; }
@keyframes fin-flag { 0% { transform: translateX(-110%) skewY(-6deg); } 55% { transform: translateX(0) skewY(-6deg); } 100% { transform: translateX(110%) skewY(-6deg); } }
.finish-copy { position: relative; z-index: 2; text-align: center; padding: 0 16px; }
.finish-copy p { margin: 0; opacity: 0; }
.finish-eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.finish-title {
  font: italic 900 clamp(96px, 22vw, 260px)/.85 "Barlow Condensed", sans-serif; text-transform: uppercase; letter-spacing: -.02em;
  color: var(--orange); text-shadow: 0 10px 60px rgba(255, 90, 31, .55);
}
.finish-time { font: 800 clamp(48px, 9vw, 104px)/1 "Barlow Condensed", sans-serif; font-variant-numeric: tabular-nums; color: var(--text); margin-top: 6px !important; }
.finish-sub { font: italic 800 clamp(28px, 4vw, 44px)/1 "Barlow Condensed", sans-serif; text-transform: uppercase; color: var(--text); margin-top: 8px !important; }
.finish-hit.play .finish-eyebrow { animation: fin-up .6s var(--ease) .75s forwards; }
.finish-hit.play .finish-title { animation: fin-pop .8s cubic-bezier(.2, 1.4, .3, 1) .55s forwards; }
.finish-hit.play .finish-time { animation: fin-up .6s var(--ease) .8s forwards; }
.finish-hit.play .finish-sub { animation: fin-up .6s var(--ease) 2.3s forwards; }
@keyframes fin-pop { from { opacity: 0; transform: scale(.4) rotate(-4deg); } to { opacity: 1; transform: none; } }
@keyframes fin-up { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.finish-confetti { position: absolute; inset: 0; pointer-events: none; }
.finish-confetti i {
  position: absolute; top: -20px; left: var(--x); width: var(--w); height: calc(var(--w) * .45); background: var(--c); border-radius: 1px; opacity: 0;
}
.finish-hit.play .finish-confetti i { animation: fin-fall var(--d) cubic-bezier(.25, .6, .4, 1) var(--delay) forwards; }
@keyframes fin-fall {
  0% { opacity: 1; transform: translate(0, 0) rotate(0); }
  85% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--dx), 110vh) rotate(var(--r)); }
}
@media (prefers-reduced-motion: reduce) {
  .finish-hit.play .finish-flag, .finish-hit.play .finish-confetti i { animation: none; }
  .finish-hit.play .finish-copy p { animation: fin-in .3s forwards; }
}

/* ---------- debug (alleen localhost) ---------- */
.n-debug { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 4000; font: 500 14px/1.3 Inter, system-ui, sans-serif; }
body.app .n-debug { bottom: calc(96px + env(safe-area-inset-bottom)); }
.n-debug-btn {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; cursor: pointer;
  border: 1px solid var(--line-strong); background: rgba(20, 17, 15, .9); color: var(--text);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 8px 24px rgba(0, 0, 0, .4);
}
.n-debug-btn:hover { border-color: var(--orange); color: var(--orange); }
.n-debug-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.n-debug-panel {
  position: absolute; right: 0; bottom: 54px; width: 260px; padding: 8px; border-radius: 16px;
  background: rgba(20, 17, 15, .96); border: 1px solid var(--line-strong); box-shadow: 0 20px 50px rgba(0, 0, 0, .5);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.n-debug-panel[hidden] { display: none; }
.n-debug-panel p { margin: 6px 10px 8px; font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.n-debug-panel a {
  display: grid; grid-template-columns: 22px 1fr; gap: 8px; align-items: center; padding: 9px 10px; border-radius: 10px;
  color: var(--text); text-decoration: none;
}
.n-debug-panel a small { grid-column: 2; color: var(--muted); font-size: 12px; }
.n-debug-panel a b { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: rgba(255, 255, 255, .06); font-size: 11px; font-weight: 700; }
.n-debug-panel a:hover { background: rgba(255, 255, 255, .06); }
.n-debug-panel a[aria-current] { background: color-mix(in srgb, var(--orange) 16%, transparent); }
.n-debug-panel a[aria-current] b { background: var(--orange); color: var(--ink); }
@media (min-width: 1000px) { #doneer .extra > .locked:not([hidden]), #doneer .extra > .btn-start { margin-top: auto; } }
