/* HAAS — atletiekpiste als beeldtaal: tartanrood, asfaltzwart, krijtwit, alles onder 12 graden.
   Lettertype Barlow Condensed (SIL Open Font License) staat bij de app zelf; er wordt niets
   van een ander adres geladen. */
@font-face { font-family: "Barlow Condensed"; font-style: italic; font-weight: 600; font-display: swap;
  src: url("fonts/barlow-condensed-latin-600-italic.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-style: italic; font-weight: 800; font-display: swap;
  src: url("fonts/barlow-condensed-latin-800-italic.woff2") format("woff2"); }

:root {
  --asfalt: #0E0F12; --asfalt2: #1B1D22; --krijt: #F4F1EA; --papier: #FFFFFF;
  --tartan: #F0452A; --tartan-d: #C2331B; --inkt: #111317; --grijs: #62666D; --lijn: #D9D4C8;
  --groen: #188A5C; --amber: #D99700;
  --kop: "Barlow Condensed", "Avenir Next Condensed", "DIN Condensed", "Roboto Condensed", "Arial Narrow", sans-serif;
  --tekst: -apple-system, system-ui, "Segoe UI", Roboto, sans-serif;
  --schuin: polygon(9px 0, 100% 0, calc(100% - 9px) 100%, 0 100%);
  --tabs-h: 64px;
}
* { box-sizing: border-box; }
html, body { margin: 0; overflow-x: hidden; }
body {
  background: var(--krijt); color: var(--inkt); font-family: var(--tekst);
  font-size: 16px; line-height: 1.5; -webkit-text-size-adjust: 100%;
  padding-bottom: calc(var(--tabs-h) + env(safe-area-inset-bottom));
}

/* ── Kop ── */
.kop {
  background: var(--asfalt); color: var(--krijt);
  padding: calc(14px + env(safe-area-inset-top)) 16px 14px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.merk { color: var(--krijt); display: block; line-height: 0; }
.logo { height: 24px; width: auto; display: block; }
.kop-status { font-family: var(--kop); font-style: italic; font-weight: 600; font-size: 15px;
  letter-spacing: .06em; text-transform: uppercase; color: rgba(244,241,234,.66); text-align: right; }

main { max-width: 640px; margin: 0 auto; padding: 0 16px 16px; outline: none; }
h1 { font-family: var(--kop); font-style: italic; font-weight: 800; text-transform: uppercase;
  font-size: 46px; line-height: .95; letter-spacing: .005em; margin: 22px 0 16px;
  display: flex; align-items: center; gap: 12px; }
h1::before { content: ""; width: 12px; height: .78em; background: var(--tartan); transform: skewX(-12deg); flex: none; }
h2 { font-family: var(--kop); font-style: italic; font-weight: 800; text-transform: uppercase;
  font-size: 26px; line-height: 1; margin: 0 0 10px; letter-spacing: .01em; }
p { margin: 0 0 10px; }

/* ── Paneel: vlak, met een zwarte bovenlijn, geen zwevende kaartjes ── */
.kaart { background: var(--papier); border-top: 4px solid var(--inkt); padding: 16px 16px 14px; margin-bottom: 16px; }
.label { font-family: var(--kop); font-style: italic; font-weight: 800; font-size: 15px; letter-spacing: .09em;
  text-transform: uppercase; color: var(--tartan-d); }
.sub { color: var(--grijs); font-size: 14px; }
.rij { display: flex; gap: 0; flex-wrap: wrap; }
.rij > * { flex: 1 1 140px; min-width: 0; padding-right: 14px; }
.rij > * + * { border-left: 2px solid var(--lijn); padding-left: 14px; }
.getal { font-family: var(--kop); font-style: italic; font-weight: 800; font-size: 46px; line-height: 1;
  font-variant-numeric: tabular-nums; margin: 2px 0 6px; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.getal small { font-family: var(--kop); font-weight: 600; font-size: 18px; color: var(--grijs); letter-spacing: .02em; }

/* ── Hero: een stuk piste ── */
.hero { margin: 0 -16px 22px; padding: 22px 16px 46px; color: #fff; position: relative;
  background-color: var(--tartan);
  background-image: repeating-linear-gradient(102deg, rgba(255,255,255,.13) 0 2px, transparent 2px 54px);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 26px), 0 100%); }
.hero .label { color: rgba(255,255,255,.86); }
.hero .groot { font-family: var(--kop); font-style: italic; font-weight: 800; font-size: 128px; line-height: .8;
  letter-spacing: -.01em; font-variant-numeric: tabular-nums; margin: 8px 0 10px; display: flex; align-items: flex-end; gap: 10px; }
.hero .groot small { font-size: 30px; font-weight: 600; line-height: 1; padding-bottom: 8px; }
.hero .tempo { font-family: var(--kop); font-style: italic; font-weight: 800; font-size: 28px; line-height: 1; text-transform: uppercase; }
.hero .sub { color: rgba(255,255,255,.9); font-size: 14.5px; margin-top: 6px; }
.banen { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 18px; border-top: 2px solid rgba(255,255,255,.9); }
.baan { padding: 10px 10px 0 12px; border-left: 2px solid rgba(255,255,255,.9); font-size: 12.5px; position: relative; }
.baan:first-child { border-left: 0; padding-left: 0; }
.baan .nr { font-family: var(--kop); font-style: italic; font-weight: 800; font-size: 15px; letter-spacing: .08em; text-transform: uppercase; opacity: .85; }
.baan b { display: block; font-family: var(--kop); font-style: italic; font-weight: 800; font-size: 30px; line-height: 1; font-variant-numeric: tabular-nums; }

/* ── Etiketten en meldingen ── */
.pil { display: inline-block; font-family: var(--kop); font-style: italic; font-weight: 800; font-size: 15px;
  letter-spacing: .07em; text-transform: uppercase; padding: 3px 14px; clip-path: var(--schuin); color: #fff; background: var(--grijs); line-height: 1.2; }
.pil.groen { background: var(--groen); }
.pil.oranje { background: var(--amber); color: var(--inkt); }
.pil.rood { background: var(--tartan-d); }
.pil.grijs { background: var(--inkt); }
.melding { padding: 12px 14px; font-size: 14.5px; margin-bottom: 14px; border-left: 6px solid var(--grijs); background: var(--papier); }
.melding.rood { border-color: var(--tartan); background: #FDECE8; }
.melding.oranje { border-color: var(--amber); background: #FBF2DA; }

/* ── Pasmaat ── */
.balk { height: 14px; position: relative; margin: 14px 0 8px;
  background: linear-gradient(90deg, var(--groen) 0 37.5%, var(--amber) 37.5% 62.5%, var(--tartan) 62.5% 100%);
  clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%); }
.balk-wijzer { position: relative; height: 0; }
.balk-wijzer i { position: absolute; top: -6px; width: 0; height: 0; border: 7px solid transparent; border-top: 11px solid var(--inkt);
  transform: translateX(-7px); }

/* ── Zones als banen op één snelheidsschaal ── */
.zone { display: grid; grid-template-columns: 44px 1fr; gap: 4px 10px; padding: 12px 0; border-top: 2px solid var(--lijn); align-items: center; }
.zone:first-of-type { border-top: 0; padding-top: 2px; }
.zone-id { font-family: var(--kop); font-style: italic; font-weight: 800; font-size: 20px; text-align: center; padding: 2px 0;
  clip-path: var(--schuin); color: var(--inkt); grid-row: span 2; align-self: start; }
.zone-kop { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.zone-kop b { font-family: var(--kop); font-style: italic; font-weight: 800; font-size: 22px; text-transform: uppercase; line-height: 1; }
.zone-kop span { font-family: var(--kop); font-style: italic; font-weight: 800; font-size: 22px; font-variant-numeric: tabular-nums; white-space: nowrap; line-height: 1; }
.spoor { height: 12px; background: #ECE8DE; position: relative; overflow: hidden; }
.spoor i { position: absolute; top: 0; bottom: 0; clip-path: polygon(5px 0, 100% 0, calc(100% - 5px) 100%, 0 100%);
  transform-origin: left; animation: groei .55s cubic-bezier(.2,.8,.2,1) both; }
.spoor i.open { clip-path: polygon(5px 0, 100% 0, 100% 100%, 0 100%); -webkit-mask-image: linear-gradient(90deg, #000 40%, transparent); mask-image: linear-gradient(90deg, #000 40%, transparent); }
.zone .sub { grid-column: 2; font-size: 13px; }
@keyframes groei { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ── Training: het verloop van de sessie ── */
.verloop { display: block; width: 100%; height: 64px; margin: 12px 0 4px; }
.verloop rect { transform-origin: bottom; transform-box: fill-box; animation: rijs .5s cubic-bezier(.2,.8,.2,1) both; }
@keyframes rijs { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.stappen { margin: 10px 0 0; padding: 0; list-style: none; font-size: 14.5px; counter-reset: stap; }
.stappen li { counter-increment: stap; padding: 6px 0 6px 34px; border-top: 1px solid var(--lijn); position: relative; }
.stappen li::before { content: counter(stap); position: absolute; left: 0; top: 5px; width: 24px; text-align: center;
  font-family: var(--kop); font-style: italic; font-weight: 800; font-size: 17px; background: var(--inkt); color: var(--krijt); clip-path: var(--schuin); }

/* ── Formulier ── */
label.veld { display: block; margin-bottom: 14px; font-size: 14px; font-weight: 700; color: var(--inkt); }
label.veld span.hulp { display: block; font-weight: 400; color: var(--grijs); font-size: 13px; }
input, select { width: 100%; font: inherit; padding: 11px 12px; border: 2px solid var(--inkt); border-radius: 0;
  background: #fff; color: var(--inkt); margin-top: 5px; min-height: 48px; -webkit-appearance: none; appearance: none; }
select { background-image: linear-gradient(45deg, transparent 50%, var(--inkt) 50%), linear-gradient(135deg, var(--inkt) 50%, transparent 50%);
  background-position: calc(100% - 20px) 21px, calc(100% - 14px) 21px; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 36px; }
input:focus, select:focus { outline: 0; border-color: var(--tartan); box-shadow: 0 0 0 3px rgba(240,69,42,.25); }
button:focus-visible, summary:focus-visible, a:focus-visible { outline: 3px solid var(--tartan); outline-offset: 2px; }
input[type=checkbox] { -webkit-appearance: auto; appearance: auto; width: auto; min-height: 0; margin: 0 8px 0 0; transform: scale(1.3); accent-color: var(--tartan); }
.test-rij { display: grid; grid-template-columns: 52px minmax(0, 1fr) minmax(0, 1.2fr); gap: 8px; align-items: end; margin-bottom: 12px; }
.test-rij input { min-width: 0; padding-left: 10px; padding-right: 8px; }
.test-rij > b { font-family: var(--kop); font-style: italic; font-weight: 800; font-size: 40px; line-height: 1; padding-bottom: 4px; color: var(--tartan); }
.test-rij > b small { display: block; font-size: 13px; letter-spacing: .08em; color: var(--grijs); text-transform: uppercase; }
.test-rij label { font-size: 12px; color: var(--grijs); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
button.knop { font-family: var(--kop); font-style: italic; font-weight: 800; font-size: 23px; letter-spacing: .04em; text-transform: uppercase;
  border: 0; padding: 13px 22px; background: var(--inkt); color: var(--krijt); width: 100%; min-height: 54px; cursor: pointer;
  clip-path: polygon(14px 0, 100% 0, calc(100% - 14px) 100%, 0 100%); transition: background .15s; }
button.knop:hover, button.knop:active { background: var(--tartan); color: #fff; }
button.link { font: inherit; background: none; border: 0; padding: 6px 0; color: var(--inkt); font-weight: 700;
  text-decoration: underline; text-decoration-color: var(--tartan); text-decoration-thickness: 2px; text-underline-offset: 3px; cursor: pointer; }
button.link.gevaar { color: var(--tartan-d); }
details { margin-bottom: 4px; }
summary { cursor: pointer; font-family: var(--kop); font-style: italic; font-weight: 800; font-size: 22px; text-transform: uppercase; padding: 2px 0; }
ul.kort { margin: 8px 0 0; padding-left: 20px; }
ul.kort li { margin-bottom: 6px; }
ul.kort li::marker { color: var(--tartan); }
.testen-3 { display: grid; grid-template-columns: repeat(3, 1fr); margin: 12px 0 6px; border-top: 2px solid var(--inkt); border-bottom: 2px solid var(--inkt); }
.testen-3 div { padding: 8px 0 8px 12px; border-left: 2px solid var(--inkt); font-size: 13px; color: var(--grijs); text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
.testen-3 div:first-child { border-left: 0; padding-left: 0; }
.testen-3 b { display: block; font-family: var(--kop); font-style: italic; font-weight: 800; font-size: 44px; line-height: .9; color: var(--inkt); letter-spacing: 0; }
.reeks { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 12px 0; border-top: 2px solid var(--lijn); }
.reeks:first-of-type { border-top: 0; }
.reeks .acties { display: flex; gap: 14px; flex-shrink: 0; }
.voet { color: var(--grijs); font-size: 12.5px; margin: 18px 0 8px; }

/* ── Tabbalk ── */
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; display: flex; background: var(--asfalt);
  padding-bottom: env(safe-area-inset-bottom); }
.tabs button { flex: 1; font-family: var(--kop); font-style: italic; font-weight: 800; font-size: 19px; letter-spacing: .05em;
  text-transform: uppercase; color: rgba(244,241,234,.55); background: none; border: 0; height: var(--tabs-h); cursor: pointer; padding: 0 4px; }
.tabs button span { display: inline-block; padding: 5px 12px; clip-path: var(--schuin); }
.tabs button[aria-current="page"] span { background: var(--tartan); color: #fff; }

@media (prefers-reduced-motion: reduce) { .spoor i, .verloop rect { animation: none; } button.knop { transition: none; } }
@media (min-width: 700px) { .hero { margin-left: 0; margin-right: 0; } }
