/* Ludus-huisstijl. Wordt na style.css geladen. Kleuren en lettertype: zie branding/README.md. */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url(/static/fonts/Inter-Regular.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap; src: url(/static/fonts/Inter-Medium.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url(/static/fonts/Inter-SemiBold.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 700; font-display: swap; src: url(/static/fonts/Inter-Bold.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 800; font-display: swap; src: url(/static/fonts/Inter-ExtraBold.woff2) format("woff2"); }
:root {
  --bg: #ffffff; --fg: #111111; --muted: #6b6b6b; --line: #ecece8; --soft: #f5f5f3; --soft2: #ecece8;
  --kcal: #111111; --carbs: #f74e45; --protein: #fdb63a; --fat: #9a8fcc;
  --accent: #f74e45; --accent-soft: rgba(247,78,69,.12); --ok: #1a8a3a; --ok-soft: #e6f3ea; --warn-soft: #fff3dc; --warn-fg: #8a5300;
  --track: #ecece8; --card: #f5f5f3;
  --radius: 14px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --bg: #0f0f0f; --fg: #f2f2f2; --muted: #a0a0a0; --line: #242424; --soft: #1a1a1a; --soft2: #262626; --kcal: #f2f2f2; --ok: #3bb463; --ok-soft: #14301d; --warn-soft: #33270f; --warn-fg: #f2c46b; --track: #2a2a2a; --card: #1a1a1a; color-scheme: dark; }
}
:root[data-theme="dark"] { --bg: #0f0f0f; --fg: #f2f2f2; --muted: #a0a0a0; --line: #242424; --soft: #1a1a1a; --soft2: #262626; --kcal: #f2f2f2; --ok: #3bb463; --ok-soft: #14301d; --warn-soft: #33270f; --warn-fg: #f2c46b; --track: #2a2a2a; --card: #1a1a1a; color-scheme: dark; }
html, body { font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-feature-settings: "cv11", "ss01", "tnum"; -webkit-font-smoothing: antialiased; background: var(--bg); color: var(--fg); }
h1, h2, .topbar .title { letter-spacing: -.025em; font-weight: 800; }
h1 { font-size: 24px; }
.topbar .title .muted, .topbar .title small { font-weight: 500; letter-spacing: 0; }
.iconbtn { color: var(--fg); border-radius: 50%; }

/* knoppen */
.btn { background: var(--soft); border: 0; color: var(--fg); border-radius: 10px; font-weight: 700; padding: 9px 14px; }
.btn.primary { background: var(--accent); color: #fff; }
.btn.danger { background: var(--accent-soft); color: var(--accent); border: 0; }
.chip, .qty, .plus { background: var(--soft); border: 0; color: var(--fg); }

/* kaarten en lijsten */
.card, .act, .day { background: var(--card); border: 0; border-radius: var(--radius); }
.day.today { box-shadow: inset 0 0 0 2px var(--fg); }
.mealhead { background: transparent; border-top: 1px solid var(--line); font-weight: 600; }
.mealhead.train { background: var(--warn-soft); }
.mealrow { border-bottom-color: var(--line); }
.act.done .ic { background: var(--ok-soft); } .act.planned .ic { background: var(--warn-soft); }
.tag { background: var(--soft2); color: var(--muted); }
.pill { background: var(--warn-soft); color: var(--warn-fg); }
.src { background: var(--soft2); color: var(--muted); } .src.custom { background: var(--ok-soft); color: var(--ok); }
.infobox { background: var(--card); border-radius: 12px; }
.lockbanner { background: var(--ok-soft); color: var(--ok); }
.section-label { font-weight: 700; letter-spacing: .08em; font-size: 12px; }

/* balken */
.track { background: var(--track); }
.mark { background: var(--fg); }
.zone { color: var(--muted); }

/* formulieren */
input, select { background: var(--soft); border: 1.5px solid transparent; border-radius: 10px; color: var(--fg); }
input:focus, select:focus { outline: none; border-color: var(--accent); background: var(--bg); }
label { color: var(--muted); font-weight: 500; }

/* segmenten (zoals iOS) */
.seg { background: var(--soft); border: 0; border-radius: 10px; padding: 3px; gap: 3px; }
.seg a { border-radius: 8px; font-weight: 600; color: var(--muted); }
.seg a.on { background: var(--bg); color: var(--fg); box-shadow: 0 1px 3px rgba(0,0,0,.12); }

/* tabbalk */
.tabbar { background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px); border-top: 1px solid var(--line); }
.tabbar a { color: var(--muted); border-bottom: 0; font-weight: 600; padding-top: 7px; }
.tabbar svg { width: 44px; height: 26px; padding: 3px 11px; border-radius: 13px; stroke-width: 2; box-sizing: border-box; }
.tabbar a.on { color: var(--fg); }
.tabbar a.on svg { background: var(--accent-soft); color: var(--accent); }

/* modaal, toast */
.modal { background: var(--bg); border-radius: 22px 22px 0 0; }
.toast { background: var(--fg); color: var(--bg); border-radius: 12px; }

/* inlogscherm */
html:has(body.loggedout), body.loggedout { background: #111; color: #f2f2f2; }
body.loggedout main { padding-top: 120px; }
body.loggedout h1 { font-size: 34px; letter-spacing: -.03em; }
body.loggedout h1::after { content: "Train als een pro. Eet als een pro."; display: block; font-size: 16px; font-weight: 500; color: #a0a0a0; letter-spacing: 0; margin: 8px 0 18px; }
body.loggedout input { background: #1c1c1c; color: #f2f2f2; }
body.loggedout label { color: #a0a0a0; }
body.loggedout .btn.primary { padding: 14px; font-size: 16px; border-radius: 12px; }

/* restjes met hardgecodeerd wit (nodig voor donkere modus) */
.why, .rep .rep, .wtip, .ftip, .goal, .ucard { background: var(--card); border-color: var(--line); color: var(--fg); }
.goal.on { border-color: var(--fg); box-shadow: 0 0 0 1.5px var(--fg) inset; }
.why { color: var(--muted); }
.b-ok { background: var(--ok-soft); color: var(--ok); } .b-draft { background: var(--warn-soft); color: var(--warn-fg); }
.b-add { background: var(--soft2); color: var(--muted); } .b-done { background: var(--soft2); color: var(--muted); }
.b-sent { background: var(--soft2); color: var(--muted); } .b-miss { background: transparent; color: var(--muted); border: 1px dashed var(--line); }
.b-score-ok { background: var(--ok-soft); color: var(--ok); } .b-score-mid { background: var(--warn-soft); color: var(--warn-fg); }
.b-score-low { background: var(--accent); color: #fff; }
.pitem .donel { color: var(--ok); margin-top: 2px; }
.donebox { background: var(--soft2); border-radius: 12px; padding: 10px 12px; margin: 10px 0; }
.donebox .ptop { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 4px; }
.pitem.race { background: var(--warn-soft); }
/* doelwaarde onder de energiebalk botste met .goal van de planwizard */
.ticks .goal { background: none; border: 0; padding: 0; box-shadow: none; font-weight: 700; display: block; }
.progbanner { background: var(--card); border-color: var(--line); }
a.btn { text-decoration: none; }

/* hoeveelheid (stepper) */
.stepper { background: var(--bg); border-color: var(--fg); }
.st-btn, .st-unit { color: var(--fg); }
.st-unit { border-left-color: var(--fg); }
.stepper .st-val { color: var(--fg); }
.stepper .st-val:focus { background: var(--soft); }
.eswipe > .card { background: var(--card); }
@keyframes eflash { from { background: var(--warn-soft); } }

/* merkbalk bovenaan de dag */
.ludus-head { display: flex; align-items: center; gap: 8px; padding: 10px 0 0; }
.ludus-head .ic { width: 28px; height: 28px; border-radius: 7px; display: block; }
.ludus-head .wm { height: 20px; width: auto; display: block; }
.ludus-head .wm.w { display: none; }
[data-theme="dark"] .ludus-head .wm.z { display: none; }
[data-theme="dark"] .ludus-head .wm.w { display: block; }
.ludus-head .av { margin-left: auto; width: 32px; height: 32px; border-radius: 50%; background: var(--soft2); color: var(--fg);
  display: grid; place-items: center; font-weight: 700; font-size: 14px; text-decoration: none; }
.loginlogo { width: 76px; height: 76px; border-radius: 18px; display: block; margin-bottom: 22px; }
body.loggedout main { padding-top: 0; }
[data-theme="dark"] .tabbar a.on { color: var(--fg); }
[data-theme="dark"] .seg a.on { background: var(--soft2); color: var(--fg); border-color: transparent; }

/* ---- Ludus eigen macrokleuren (niet die van Foodcoach) ---- */
:root, :root[data-theme="dark"] { --carbs: #3d7bff; --protein: #12b5a5; --fat: #ee5fa0; --warn: #f59f00; }
:root[data-theme="dark"] { --carbs: #5a8fff; --protein: #2cc9b8; --fat: #f47bb3; }

/* ---- dagscherm zoals de mock-up ---- */
.dhead { display: flex; align-items: flex-end; justify-content: space-between; margin: 14px 0 14px; }
.dhead h1 { margin: 0; font-size: 34px; letter-spacing: -.03em; }
.dsub { color: var(--muted); font-size: 15px; font-weight: 500; }
.dnav { display: flex; gap: 8px; padding-bottom: 4px; }
.dnav a { width: 40px; height: 40px; border-radius: 50%; background: var(--soft); color: var(--fg); display: grid; place-items: center;
  text-decoration: none; font-size: 22px; font-weight: 600; line-height: 1; }
.hero { background: #111; color: #fff; border-radius: 22px; padding: 18px; display: flex; gap: 16px; align-items: center; }
[data-theme="dark"] .hero { background: #1a1a1a; box-shadow: inset 0 0 0 1px #2a2a2a; }
.hring { position: relative; flex: none; width: 112px; height: 112px; }
.hring .ring { display: block; }
.hnum { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.hnum b { font-size: 28px; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.hnum span { font-size: 9.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #bdbdbd; margin-top: 4px; }
.hmac { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.hl { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; color: #bdbdbd; gap: 6px; }
.hl b { color: #fff; font-weight: 700; white-space: nowrap; } .hl b span { color: #bdbdbd; font-weight: 500; }
.htrack { position: relative; height: 6px; border-radius: 3px; background: rgba(255,255,255,.12); margin-top: 6px; }
.htrack i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; }
.htrack u { position: absolute; top: -3px; width: 2px; height: 12px; background: #8a8a8a; border-radius: 1px; text-decoration: none; }
.hwhy { margin: 10px 2px 0; }
.hwhy summary { color: var(--muted); font-size: 13px; cursor: pointer; list-style: none; }
.hwhy summary::-webkit-details-marker { display: none; }
.hwhy summary::after { content: " ›"; } .hwhy[open] summary::after { content: " ⌄"; }
.hwhy[open] { padding-bottom: 6px; }
.sech { display: flex; justify-content: space-between; align-items: center; margin: 24px 0 10px; }
.sech h2 { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -.025em; }
.lnk { background: none; border: 0; padding: 4px 6px; font: inherit; font-weight: 700; font-size: 16px; color: var(--muted); cursor: pointer; }
.lnk.red { color: var(--accent); } #syncIc { display: inline-block; font-size: 18px; }
.aswipe { margin-bottom: 10px; }
.aswipe > .act { display: block; padding: 14px 16px; border-radius: var(--radius); }
.act .arow { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.act .name { font-size: 17px; font-weight: 800; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.act .kc { color: var(--accent); font-weight: 800; font-size: 17px; }
.act .ameta { color: var(--muted); font-size: 14px; margin-top: 3px; }
.act .ameta.small { font-size: 12px; }
.dempty { margin-bottom: 8px; }
.mlist .swipe { margin: 0 -16px; }
.mlist .mealrow { gap: 14px; padding: 12px 16px; border-bottom: 1px solid var(--line); align-items: center; }
.mlist .swipe:last-child .mealrow { border-bottom: 0; }
.mring { position: relative; flex: none; width: 44px; height: 44px; }
.mring .ring { display: block; }
.mlock { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); }
.mealrow .mt { font-size: 17px; font-weight: 800; letter-spacing: -.01em; }
.mealrow .names { font-size: 14px; color: var(--muted); -webkit-line-clamp: 1; }
.mealrow .mk { flex: none; color: var(--muted); font-size: 14px; white-space: nowrap; }
.mealrow .mk b { color: var(--fg); font-size: 17px; font-weight: 800; }
.btag { display: inline-block; vertical-align: 2px; margin-left: 6px; padding: 2px 7px; border-radius: 6px; font-size: 10.5px; font-weight: 800;
  letter-spacing: .06em; text-transform: uppercase; color: var(--accent); background: var(--accent-soft); }
.btag.soft { color: var(--muted); background: var(--soft2); }
.mealrow.locked { padding-left: 16px !important; }

/* kaart rustiger: groot enkel wat je at, doelen klein onder de streepjes */
.hmac { gap: 4px; }
.hl b small { font-size: 12px; font-weight: 500; color: #9a9a9a; }
.htrack { height: 5px; margin-top: 5px; }
.htrack u { top: -2px; height: 9px; width: 1.5px; background: #777; }
.hticks { position: relative; height: 13px; }
.hticks em { position: absolute; top: 2px; transform: translateX(-50%); font-style: normal; font-size: 9.5px; color: #8a8a8a; white-space: nowrap; letter-spacing: .01em; }
.stex { line-height: 1.5; }
.fitbtn { display: block; text-align: center; margin-top: 12px; cursor: pointer; }


/* ---------- startpagina (cloud); uitgelogd is altijd donker ---------- */
.lp { max-width: 400px; margin: 0 auto; padding: 8vh 4px 40px; }
body.loggedout h1.lp-title { font-size: 30px; line-height: 1.1; margin: 0 0 12px; }
body.loggedout h1.lp-title::after { content: none; }
.lp-sub { color: #a0a0a0; font-size: 16px; line-height: 1.45; margin: 0 0 14px; }
.lp-points { list-style: none; padding: 0; margin: 0 0 16px; }
.lp-points li { padding: 5px 0 5px 26px; position: relative; font-weight: 500; }
.lp-points li::before { content: ""; position: absolute; left: 4px; top: 11px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.lp-price { background: rgba(247,78,69,.16); border-radius: 12px; padding: 10px 12px; margin: 0 0 20px; font-size: 14px; }
.lp-actions { display: flex; flex-direction: column; gap: 10px; }
.lp-btn { display: flex; align-items: center; justify-content: center; gap: 10px; height: 48px; border-radius: 12px;
  font-weight: 600; font-size: 16px; text-decoration: none; box-sizing: border-box; }
.lp-apple { background: #fff; color: #000; }
.lp-google { background: #fff; color: #1f1f1f; border: 1px solid #dadce0; }
.lp-strava { background: #fc4c02; color: #fff; }
.lp-or { display: flex; align-items: center; gap: 10px; color: #a0a0a0; font-size: 13px; margin: 6px 0 0; }
.lp-or::before, .lp-or::after { content: ""; flex: 1; height: 1px; background: #2a2a2a; }
.lp-mail { display: flex; flex-direction: column; gap: 10px; }
.lp-mail input { height: 48px; box-sizing: border-box; font-size: 16px; }
.lp-mail .btn { height: 48px; font-size: 16px; }
.lp-sent { background: #14301d; color: #3bb463; border-radius: 12px; padding: 12px; line-height: 1.4; }
.lp-links { display: flex; justify-content: space-between; gap: 12px; margin-top: 6px; font-size: 14px; }
.lp-links a { color: #a0a0a0; }
.lp-legal { margin-top: 26px; text-align: center; color: #a0a0a0; }

/* ---------- naar een event (v16) ---------- */
.modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 2px 0 12px; }
.mode { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 10px 9px; border-radius: 12px; background: var(--card);
  border: 1.5px solid var(--line); color: var(--fg); text-decoration: none; min-width: 0; }
.mode .mi { font-size: 20px; } .mode b { font-size: 13.5px; line-height: 1.2; }
.mode small { color: var(--muted); font-size: 11px; line-height: 1.25; overflow-wrap: anywhere; }
.mode.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.mode .mcheck { position: absolute; top: 7px; right: 9px; color: var(--accent); font-weight: 800; font-size: 13px; }
.evcard { display: block; background: var(--card); border-radius: 14px; padding: 12px; margin: 4px 0 10px; color: var(--fg); text-decoration: none; }
.evtop { display: flex; align-items: center; gap: 10px; } .evtop > div { flex: 1; min-width: 0; }
.evic { font-size: 26px; } .evgoal { font-size: 12.5px; font-weight: 700; text-align: right; color: var(--fg); }
.evstrip { display: flex; align-items: center; gap: 3px; margin: 10px 0 4px; }
.evstrip i { flex: 1; height: 10px; border-radius: 3px; opacity: .55; } .evstrip i.cur { opacity: 1; height: 16px; box-shadow: 0 0 0 2px var(--fg); }
.evstrip span { font-size: 14px; margin-left: 2px; }
.evlegend { margin: 0 0 2px; font-size: 11px; }
.evfood { background: var(--card); border-radius: 12px; padding: 10px 12px; font-size: 13px; margin-top: 8px; display: grid; gap: 4px; }
.evday { border-radius: 12px; padding: 10px 12px; margin: 10px 0 2px; font-size: 13px; background: var(--accent-soft); color: var(--fg); }
.evday b { display: block; margin-bottom: 2px; font-size: 14px; }
.evday.race { background: var(--accent); color: #fff; }
.badge.b-race { background: var(--accent); color: #fff; }
.pitem.race .dtitle { font-weight: 800; }
.ph-taper { background: #a07ad6; } .ph-race { background: var(--accent); }
#terr .tgoal { margin-bottom: 6px; }
@media (max-width: 360px) { .modes { gap: 6px; } .mode { padding: 9px 7px; } .mode b { font-size: 12.5px; } }

/* veelgestelde vragen onder de uitlegvideo's */
details.faq { margin-top: 22px; border-top: 1px solid var(--line); padding-top: 6px; }
details.faq > summary { font-weight: 800; font-size: 1.15rem; padding: 10px 0; cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; }
details.faq > summary::after, details.faqq > summary::after { content: '›'; color: var(--muted); font-size: 1.3em; transition: transform .15s; }
details.faq[open] > summary::after, details.faqq[open] > summary::after { transform: rotate(90deg); }
details.faq > summary span { font-weight: 500; font-size: .85rem; margin-left: 6px; margin-right: auto; }
details.faqq { background: var(--soft); border-radius: 12px; margin: 8px 0; padding: 0 14px; }
details.faqq > summary { font-weight: 600; padding: 12px 0; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 10px; }
details.faq summary::-webkit-details-marker { display: none; }
details.faqq p { margin: 0 0 14px; color: var(--fg); line-height: 1.45; font-size: .95rem; }

/* doeltijd: uren en minuten apart (v27) */
.durin { display: flex; align-items: center; gap: 8px; }
.durin input { width: 72px; text-align: center; font-size: 18px; font-weight: 700; }
.durin span { color: var(--muted); font-weight: 600; }
.evweeks { display: grid; gap: 4px; margin: 4px 0 10px; }
.evw { display: grid; grid-template-columns: 92px 86px 1fr 62px; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 10px;
  background: var(--card); color: var(--fg); text-decoration: none; font-size: 12.5px; }
.evw.cur { box-shadow: 0 0 0 1.5px var(--accent) inset; font-weight: 700; }
.evw .d { color: var(--muted); white-space: nowrap; } .evw.cur .d { color: var(--accent); }
.evw .phase { margin: 0; text-align: center; }
.evw .bar { height: 8px; background: var(--track); border-radius: 4px; overflow: hidden; } .evw .bar i { display: block; height: 100%; border-radius: 4px; }
.evw .h { text-align: right; font-weight: 700; white-space: nowrap; }

/* vocht (v29) */
.water { background: var(--card); border-radius: 14px; padding: 12px 14px; margin: 12px 0 2px; }
.water .wtop { display: flex; justify-content: space-between; align-items: baseline; }
.water .wt { font-weight: 700; }
.water .wtop b { font-size: 14px; }
.water .wdrops { display: flex; flex-wrap: wrap; gap: 4px; margin: 8px 0; }
.water .wdrops i svg { display: block; fill: rgba(59, 143, 217, .22); }
.water .wdrops i.on svg { fill: #3b8fd9; }
.water .wbtns { display: flex; gap: 8px; }
.water .wbtns .btn:first-child { width: 52px; flex: none; font-size: 20px; background: transparent; border: 1.5px solid rgba(127, 127, 127, .35); }
.water .wbtns .btn.primary { flex: 1; }
.water .hwhy { margin-top: 8px; }
.infobox.fluid { line-height: 1.55; }

/* ---------- abonnement kiezen (cloud) ---------- */
.lp-proof { font-size: 14px; color: #a0a0a0; margin: 0 0 10px; }
.lp-proof b { color: #fff; }
.plans { display: flex; flex-direction: column; gap: 10px; }
.plan { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; text-align: left; width: 100%;
  padding: 14px; border-radius: 14px; border: 2px solid rgba(128,128,128,.35); background: transparent; color: inherit; font: inherit; cursor: pointer; }
.plan.on { border-color: var(--accent); background: rgba(247,78,69,.08); }
.plan-name { font-weight: 600; font-size: 16px; }
.plan-price { font-weight: 700; font-size: 18px; text-align: right; }
.plan-price small { font-weight: 400; font-size: 13px; opacity: .7; }
.plan-note { grid-column: 1 / -1; font-size: 13px; opacity: .7; }
.plan-badge { position: absolute; top: -10px; right: 12px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em; padding: 3px 8px; border-radius: 999px; }
