:root {
  color-scheme: light;
  --pagina: #f3f5f1;
  --kaart: #ffffff;
  --gras: #1d5c40;
  --gras-2: #174a33;
  --kalk: #ffffff;
  --inkt: #16211b;
  --inkt-2: #4c5a52;
  --gedempt: #75827a;
  --lijn: #dfe5de;
  --raster: #e9ede8;
  --as: #c5ccc4;
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100; --s5: #e87ba4;
  --z1: #9ec5f4; --z2: #6da7ec; --z3: #3987e5; --z4: #256abf; --z5: #104281;
  --goed: #006300; --slecht: #c03030; --waarschuwing: #9a6a00; --neutraal: #75827a;
  --st-goed: #0ca30c; --st-waarsch: #fab219; --st-ernstig: #ec835a; --st-kritiek: #d03b3b; --st-neutraal: #b9c1ba;
  --focus: #2a78d6;
  --schaduw: 0 1px 0 rgba(22, 33, 27, 0.04);
  --font: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --pagina: #0e1411; --kaart: #18201b; --gras: #1f6b49; --gras-2: #185a3c; --kalk: #eef3ee;
    --inkt: #eaf0eb; --inkt-2: #b9c5bd; --gedempt: #87948c;
    --lijn: #2a332d; --raster: #232c26; --as: #3a453e;
    --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s5: #d55181;
    --z1: #184f95; --z2: #1c5cab; --z3: #2a78d6; --z4: #5598e7; --z5: #9ec5f4;
    --goed: #0ca30c; --slecht: #e66767; --waarschuwing: #fab219; --neutraal: #87948c;
    --st-neutraal: #4a554e; --focus: #6da7ec; --schaduw: none;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--pagina); color: var(--inkt);
  font-family: var(--font); font-size: 15px; line-height: 1.5;
  font-variation-settings: "wdth" 100;
}
button, input { font: inherit; color: inherit; }
a { color: var(--gras); text-underline-offset: 2px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }

.laden { padding: 3rem 1rem; text-align: center; color: var(--gedempt); }

/* ---------- inloggen ---------- */
.inlog { min-height: 100vh; display: grid; place-items: center; padding: 2rem 1rem;
  background:
    linear-gradient(var(--pagina), var(--pagina)) padding-box; }
.inlog-veld { text-align: center; }
.inlog-veld p { color: var(--inkt-2); margin: 0.25rem 0 1.5rem; }

/* ---------- kop ---------- */
.merk { margin: 0; font-size: 1.35rem; font-weight: 750; letter-spacing: -0.01em;
  font-stretch: 112%; font-variation-settings: "wdth" 112; }
.kop { background: var(--kaart); border-bottom: 1px solid var(--lijn); position: sticky; top: 0; z-index: 5; }
.kop-rij { max-width: 1180px; margin: 0 auto; padding: 0.9rem 1rem 0.4rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.kop-rechts { display: flex; align-items: center; gap: 0.9rem; }
.bijgewerkt { font-size: 0.82rem; color: var(--gedempt); text-align: right; }
.tabs { max-width: 1180px; margin: 0 auto; padding: 0 0.6rem; display: flex; gap: 0.15rem; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { background: none; border: 0; padding: 0.65rem 0.55rem 0.7rem; cursor: pointer; white-space: nowrap;
  color: var(--inkt-2); font-weight: 520; border-bottom: 3px solid transparent; }
.tabs button:hover { color: var(--inkt); }
.tabs button[aria-current="page"] { color: var(--inkt); border-bottom-color: var(--gras); font-weight: 650; }

/* ---------- filters ---------- */
.filterrij { max-width: 1180px; margin: 0 auto; padding: 1rem 1rem 0; display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1rem; }
.filterlabel { font-size: 0.85rem; color: var(--inkt-2); }
.knoppengroep { display: inline-flex; flex-wrap: wrap; background: var(--kaart); border: 1px solid var(--lijn); border-radius: 999px; padding: 3px; gap: 2px; }
.knoppengroep button { border: 0; background: none; padding: 0.3rem 0.8rem; border-radius: 999px; cursor: pointer; font-size: 0.88rem; color: var(--inkt-2); }
.knoppengroep button:hover { color: var(--inkt); }
.knoppengroep button[aria-pressed="true"] { background: var(--gras); color: #fff; }
.stip { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 0.4rem; vertical-align: 0.05em; }

/* ---------- inhoud ---------- */
.inhoud { max-width: 1180px; margin: 0 auto; padding: 1rem 1rem 4rem; }
.sectie { margin-top: 2rem; }
.sectie > h2 { font-size: 1.05rem; font-weight: 680; margin: 0 0 0.2rem; }
.sectie > p.uitleg { margin: 0 0 0.9rem; color: var(--inkt-2); font-size: 0.9rem; max-width: 70ch; }

/* ---------- scorebord (laatste voetbalsessie) ---------- */
.scorebord { position: relative; overflow: hidden; border-radius: 14px; color: #fff; padding: 1.4rem 1.5rem 1.3rem;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.035) 0 56px, rgba(0,0,0,0.035) 56px 112px),
    var(--gras); }
.scorebord::before { /* middenlijn en middencirkel, als krijtlijnen */
  content: ""; position: absolute; inset: 10px; border: 1.5px solid rgba(255,255,255,0.22); border-radius: 6px; pointer-events: none;
  background:
    radial-gradient(circle at 50% 50%, transparent 0 58px, rgba(255,255,255,0.22) 58px 59.5px, transparent 60px),
    linear-gradient(90deg, transparent calc(50% - 0.75px), rgba(255,255,255,0.22) calc(50% - 0.75px) calc(50% + 0.75px), transparent calc(50% + 0.75px));
}
.scorebord > * { position: relative; }
.scorebord .wat { font-size: 0.9rem; opacity: 0.85; margin: 0; }
.scorebord h2 { margin: 0.1rem 0 1rem; font-size: 1.5rem; font-weight: 720; font-variation-settings: "wdth" 112; }
.scorebord .cijfers { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 1rem 1.2rem; }
.scorebord .cijfer b { display: block; font-size: clamp(2rem, 5vw, 2.9rem); line-height: 1; font-weight: 760;
  font-variation-settings: "wdth" 72; letter-spacing: -0.01em; }
.scorebord .cijfer span { display: block; font-size: 0.82rem; opacity: 0.85; margin-top: 0.3rem; }
.scorebord .cijfer em { font-style: normal; display: block; font-size: 0.8rem; margin-top: 0.15rem; opacity: 0.95; }
.scorebord .leeg { opacity: 0.85; }

/* ---------- tegels ---------- */
.tegels { display: grid; grid-template-columns: repeat(auto-fill, minmax(205px, 1fr)); gap: 0.75rem; }
.tegel { background: var(--kaart); border: 1px solid var(--lijn); border-radius: 10px; padding: 0.85rem 0.95rem 0.7rem; box-shadow: var(--schaduw); display: flex; flex-direction: column; min-height: 132px; }
.tegel .naam { font-size: 0.85rem; color: var(--inkt-2); }
.tegel .waarde { font-size: 1.9rem; font-weight: 720; line-height: 1.15; margin-top: 0.15rem; font-variation-settings: "wdth" 88; }
.tegel .waarde small { font-size: 0.9rem; font-weight: 500; color: var(--inkt-2); margin-left: 0.2rem; font-variation-settings: "wdth" 100; }
.tegel .verschil { font-size: 0.8rem; margin-top: 0.1rem; }
.tegel .verschil.goed { color: var(--goed); }
.tegel .verschil.slecht { color: var(--slecht); }
.tegel .verschil.gelijk { color: var(--gedempt); }
.tegel .spark { height: 34px; margin-top: auto; }
.tegel.let-op { border-color: var(--st-ernstig); }

/* ---------- grafieken ---------- */
.grafieken { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 520px), 1fr)); gap: 0.75rem; }
.kaart { background: var(--kaart); border: 1px solid var(--lijn); border-radius: 10px; padding: 0.9rem 0.9rem 0.4rem; box-shadow: var(--schaduw); min-width: 0; }
.kaart.breed { grid-column: 1 / -1; }
.kaart h3 { margin: 0; font-size: 0.98rem; font-weight: 650; }
.kaart .sub { margin: 0.1rem 0 0.2rem; font-size: 0.84rem; color: var(--inkt-2); }
.grafiek { height: 270px; width: 100%; }
.grafiek.laag { height: 120px; }
.geen-data { padding: 2.5rem 0.5rem; text-align: center; color: var(--gedempt); font-size: 0.9rem; }

/* ---------- vergelijking za/wo ---------- */
.vergelijk { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.vergelijk th, .vergelijk td { padding: 0.45rem 0.5rem; text-align: right; border-bottom: 1px solid var(--raster); font-variant-numeric: tabular-nums; }
.vergelijk th:first-child, .vergelijk td:first-child { text-align: left; }
.vergelijk thead th { font-weight: 600; color: var(--inkt-2); font-size: 0.84rem; }

/* ---------- tabel ---------- */
.tabelvak { overflow-x: auto; }
.tabel { width: 100%; border-collapse: collapse; font-size: 0.86rem; min-width: 640px; }
.tabel th, .tabel td { padding: 0.4rem 0.5rem; border-bottom: 1px solid var(--raster); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tabel th { color: var(--inkt-2); font-weight: 600; position: sticky; top: 0; background: var(--kaart); }
.tabel td:first-child, .tabel th:first-child, .tabel td.tekst, .tabel th.tekst { text-align: left; }
.tabel button { background: none; border: 0; color: var(--slecht); cursor: pointer; padding: 0.1rem 0.3rem; }
details.tabelknop summary { cursor: pointer; color: var(--inkt-2); font-size: 0.86rem; padding: 0.5rem 0; }

/* ---------- formulieren ---------- */
.formulier { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: end; }
.formulier label { display: flex; flex-direction: column; font-size: 0.84rem; color: var(--inkt-2); gap: 0.2rem; }
.formulier input { border: 1px solid var(--as); background: var(--kaart); border-radius: 8px; padding: 0.45rem 0.6rem; min-width: 9rem; }
.knop { background: var(--gras); color: #fff; border: 0; border-radius: 8px; padding: 0.55rem 1rem; cursor: pointer; font-weight: 600; }
.knop:hover { background: var(--gras-2); }
.knop[disabled] { opacity: 0.6; cursor: progress; }
.melding { margin-top: 0.8rem; font-size: 0.9rem; }
.melding.fout { color: var(--slecht); }
.melding.goed { color: var(--goed); }

.dropzone { display: block; border: 2px dashed var(--as); border-radius: 12px; padding: 2.2rem 1rem; text-align: center; background: var(--kaart); cursor: pointer; }
.dropzone.erboven { border-color: var(--gras); background: color-mix(in srgb, var(--gras) 7%, var(--kaart)); }
.dropzone strong { display: block; font-size: 1.05rem; margin-bottom: 0.3rem; }
.dropzone span { color: var(--inkt-2); font-size: 0.9rem; }
.stappen { padding-left: 1.2rem; max-width: 70ch; color: var(--inkt-2); }
.stappen li { margin: 0.3rem 0; }

.legenda { display: flex; flex-wrap: wrap; gap: 0.3rem 1rem; font-size: 0.82rem; color: var(--inkt-2); margin: 0.3rem 0 0.2rem; }
.legenda .blok { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 0.35rem; vertical-align: -0.1em; }

@media (max-width: 560px) {
  .kop-rij { padding-top: 0.7rem; }
  .merk { font-size: 1.15rem; }
  .bijgewerkt { display: none; }
  .scorebord { padding: 1.1rem 1.1rem 1rem; }
  .scorebord h2 { font-size: 1.25rem; }
  .tegels { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; }
  .tegel { min-height: 0; padding: 0.7rem 0.75rem 0.5rem; }
  .tegel .waarde { font-size: 1.45rem; }
  .tegel .waarde small { display: block; margin-left: 0; font-size: 0.78rem; }
  .tegel .verschil { font-size: 0.74rem; line-height: 1.3; }
  .tegel .spark { height: 26px; margin-top: 0.4rem; }
  .scorebord::before { background: none; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
