:root {
  --bg: #f6f5f1; --surface: #ffffff; --ink: #1d2126; --muted: #69707a; --line: #e4e2dc;
  --accent: #d24f1c; --accent-soft: #fbe7dd; --band: rgba(210,79,28,.13); --bar: #e2622f;
  --good: #2f7d4f; --good-soft: #e1f2e7; --warn: #a3650d; --warn-soft: #fbefd9;
  --bad: #b23b3b; --bad-soft: #f8e1e1; --over: #8f2d56; --chip-muted: #eceae4;
  --radius: 14px; --shadow: 0 1px 2px rgba(20,20,20,.05), 0 4px 16px rgba(20,20,20,.04);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16181c; --surface: #1f2228; --ink: #e9eaec; --muted: #9aa1ab; --line: #30343b;
    --accent: #ff8a5c; --accent-soft: #3a261d; --band: rgba(255,138,92,.16); --bar: #ff8a5c;
    --good: #78cf98; --good-soft: #20352a; --warn: #f0b85a; --warn-soft: #3a2f1c;
    --bad: #f08a8a; --bad-soft: #3d2324; --over: #e58bd0; --chip-muted: #2b2f36;
    --shadow: none; color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--accent); text-decoration: none; } a:hover { text-decoration: underline; }
code { font-size: .9em; background: var(--chip-muted); padding: .1em .35em; border-radius: 4px; }
.muted { color: var(--muted); } .small { font-size: .85rem; }

.top { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px;
  max-width: 960px; margin: 0 auto; }
.brand { display: flex; gap: 8px; align-items: center; color: var(--ink); font-weight: 650; }
.logout { margin: 0; }
button.link { background: none; border: 0; color: var(--muted); font: inherit; cursor: pointer; padding: 4px; }
button.link:hover { color: var(--ink); }

main { max-width: 960px; margin: 0 auto; padding: 0 16px 48px; display: grid; gap: 16px; }
.hero { padding: 8px 4px 0; }
.hero h1 { margin: 2px 0; font-size: clamp(1.8rem, 6vw, 2.4rem); line-height: 1.1; letter-spacing: -.01em; }
.eyebrow { margin: 0; color: var(--muted); font-size: .9rem; }
.sub { margin: 4px 0 0; color: var(--muted); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; box-shadow: var(--shadow); min-width: 0; }
.card h2 { font-size: 1.05rem; margin: 0; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.card-head .muted { font-size: .85rem; }

.sessions { list-style: none; margin: 0; padding: 0; }
.session { display: grid; grid-template-columns: 4.8rem 1fr auto; gap: 4px 12px; padding: 12px 0;
  border-top: 1px solid var(--line); align-items: start; }
.session:first-child { border-top: 0; }
.when { color: var(--muted); font-size: .9rem; padding-top: 1px; }
.title { font-weight: 600; }
.detail { font-size: .92rem; }
.notes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.note { font-size: .8rem; color: var(--muted); background: var(--chip-muted); padding: 1px 8px; border-radius: 999px; }
.note.flag, .flag { color: var(--over); }
.note.flag { background: transparent; border: 1px solid currentColor; }
.state { display: grid; gap: 6px; justify-items: end; }
.chip { font-size: .78rem; font-weight: 600; padding: 2px 10px; border-radius: 999px; white-space: nowrap;
  background: var(--chip-muted); color: var(--muted); }
.chip.good { background: var(--good-soft); color: var(--good); }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.bad { background: var(--bad-soft); color: var(--bad); }
.chip.accent { background: var(--accent-soft); color: var(--accent); }
@media (max-width: 520px) {
  .session { grid-template-columns: 1fr auto; }
  .when { grid-column: 1 / -1; }
}

.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 8px; }
@media (max-width: 520px) {
  .stats { gap: 8px; }
  .stat { padding: 8px; }
  .stat .value { font-size: 1.3rem; }
  .stat .label, .stat .hint { font-size: .74rem; }
}
.stat .value.text { font-size: 1.1rem; padding-top: .25rem; }
.caption { font-size: .8rem; color: var(--muted); margin: 4px 0 0; }
.stat { background: var(--bg); border-radius: 10px; padding: 10px 12px; }
.stat .label { font-size: .82rem; color: var(--muted); }
.stat .value { font-size: 1.6rem; font-weight: 650; line-height: 1.2; font-variant-numeric: tabular-nums; }
.stat .value small { font-size: .85rem; font-weight: 500; color: var(--muted); }
.stat .hint { font-size: .8rem; color: var(--muted); }

.chart { position: relative; height: 200px; margin-top: 8px; }
.chart.small { height: 150px; } .chart.tall { height: 260px; }
.legend { font-size: .82rem; color: var(--muted); margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; }
.sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; margin-right: 4px; }
.sw.band { background: var(--band); border: 1px solid var(--accent); }
.sw.bar { background: var(--bar); } .sw.over { background: var(--over); }

.table-wrap { overflow-x: auto; margin: 0 -16px; padding: 0 16px; }
table.weeks { width: 100%; border-collapse: collapse; font-size: .92rem; font-variant-numeric: tabular-nums; }
.weeks th { text-align: left; font-weight: 600; color: var(--muted); font-size: .8rem; padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.weeks td { padding: 8px; border-bottom: 1px solid var(--line); white-space: nowrap; vertical-align: top; }
.weeks tr.current td { background: var(--accent-soft); }

.pager { display: flex; justify-content: space-between; padding: 4px; font-size: .95rem; }

.login { max-width: 380px; margin: 8vh auto 0; width: 100%; }
.login h1 { margin-top: 0; font-size: 1.4rem; }
form label { display: grid; gap: 4px; margin-bottom: 12px; font-size: .9rem; color: var(--muted); }
input { font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 12px; }
input:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button.primary { width: 100%; font: inherit; font-weight: 600; color: #fff; background: var(--accent);
  border: 0; border-radius: 10px; padding: 11px; cursor: pointer; }
@media (prefers-color-scheme: dark) { button.primary { color: #1c0f09; } }
button.small { font: inherit; font-size: .8rem; border: 1px solid var(--line); background: var(--surface);
  color: var(--ink); border-radius: 8px; padding: 3px 9px; cursor: pointer; }
.state form { margin: 0; }
.error { background: var(--bad-soft); color: var(--bad); padding: 8px 12px; border-radius: 10px; }

/* Coach (stap 5) */
.coach p { margin: 0 0 10px; line-height: 1.5; }
.coach .coach-kop { font-size: 1.08rem; font-weight: 650; margin-bottom: 8px; }
.coach .label { font-size: .82rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.coach .next { background: var(--bg); border-radius: 10px; padding: 10px 12px; margin: 12px 0; }
.coach .next p { margin: 6px 0 0; }
.coach .next-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.coach .points { margin: 0 0 10px; padding-left: 1.2em; }
.coach .points li { margin: 2px 0; }
.coach .questions { border-left: 3px solid var(--accent); padding: 2px 0 2px 10px; margin: 0 0 10px; }
.coach .questions p { margin: 4px 0 0; }
.coach .questions { border-left: 3px solid var(--accent); padding: 2px 0 2px 10px; margin: 0 0 10px; }
.coach .questions p { margin: 4px 0 0; }
.coach .next-head, .next-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.label { font-size: .82rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
details.more { margin: 4px 0 10px; }
details > summary { cursor: pointer; color: var(--accent); font-size: .95rem; list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details.more[open] > summary { margin-bottom: 8px; }

/* Stap 6: menu onderaan (iPhone: boven de thuisbalk) */
body.with-tabs main { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
.top { padding-top: max(12px, env(safe-area-inset-top)); }
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  background: var(--surface); border-top: 1px solid var(--line);
  padding: 6px max(8px, env(safe-area-inset-left)) calc(6px + env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-right)); }
.tabs a { display: grid; justify-items: center; gap: 2px; font-size: .7rem; color: var(--muted); padding: 4px 0;
  text-decoration: none; border-radius: 10px; }
.tabs a svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tabs a.on { color: var(--accent); font-weight: 600; }
.tabs a.on svg { stroke-width: 2.2; }
@media (min-width: 900px) {
  .tabs { position: sticky; top: 0; bottom: auto; max-width: 960px; margin: 0 auto 8px; border: 1px solid var(--line);
    border-radius: var(--radius); grid-template-columns: repeat(5, auto); justify-content: center; gap: 28px; padding: 6px 16px; }
  body.with-tabs { display: flex; flex-direction: column; }
  body.with-tabs .tabs { order: 1; } body.with-tabs main { order: 2; padding-bottom: 48px; }
  .tabs a { grid-auto-flow: column; gap: 6px; font-size: .9rem; }
}
a.plain { color: inherit; } a.plain:hover { text-decoration: none; }
.chev { color: var(--muted); font-weight: 400; }
.plainlist { list-style: none; margin: 0; padding: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Meldingen */
.checkins li { display: flex; justify-content: space-between; gap: 12px; align-items: start; padding: 8px 0; border-top: 1px solid var(--line); }
.checkins li:first-child { border-top: 0; }
.checkins p { margin: 4px 0 0; }
.checkins form { margin: 0; }

/* Schema */
.phase details.week { border-top: 1px solid var(--line); }
.phase details.week:first-of-type { border-top: 0; }
.phase summary { display: grid; grid-template-columns: auto 1fr auto; gap: 4px 10px; align-items: baseline; padding: 10px 0; color: var(--ink); }
.phase summary .wk { font-weight: 600; }
.phase summary .km { font-size: .9rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.phase details.current summary { color: var(--accent); }
@media (max-width: 520px) { .phase summary { grid-template-columns: 1fr auto; } .phase summary .muted.small { grid-row: 2; } }
ul.sess li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 0 8px 8px; border-left: 2px solid var(--line); }
ul.sess a { display: grid; min-width: 0; }
ul.sess .t { font-weight: 550; }

/* Sessie */
ol.steps { margin: 8px 0 0; padding-left: 1.4em; display: grid; gap: 8px; }
ol.steps ol { padding-left: 1.2em; margin-top: 6px; display: grid; gap: 6px; }
.step-head { display: flex; gap: 8px; flex-wrap: wrap; align-items: baseline; }
.step-sub { font-size: .88rem; }
li.repeat { background: var(--bg); border-radius: 10px; padding: 8px 10px; margin-left: -.4em; }
dl.legend-list { margin: 8px 0 0; display: grid; gap: 2px 0; }
dl.legend-list dt { font-weight: 600; margin-top: 6px; } dl.legend-list dd { margin: 0; font-size: .9rem; color: var(--muted); }
table.exec { width: 100%; border-collapse: collapse; font-size: .9rem; font-variant-numeric: tabular-nums; }
.exec th { text-align: left; font-weight: 600; color: var(--muted); font-size: .78rem; padding: 6px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.exec td { padding: 7px 6px; border-bottom: 1px solid var(--line); white-space: nowrap; }

/* Voortgang */
ul.cats > li { border-top: 1px solid var(--line); padding: 4px 0; }
ul.cats > li:first-child { border-top: 0; }
ul.cats summary { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; align-items: center; padding: 8px 0; color: var(--ink); }
ul.cats summary .t { font-weight: 600; }
ul.cats summary .muted { grid-row: 2; }
ul.cats summary .chip { grid-row: 1 / span 2; grid-column: 2; }
svg.bar { width: 100%; height: 10px; border-radius: 5px; overflow: hidden; display: block; margin: 4px 0 6px; background: var(--chip-muted); }
svg.bar .good { fill: var(--good); } svg.bar .slow { fill: var(--accent); opacity: .45; }
svg.bar .warn { fill: var(--warn); } svg.bar .none { fill: var(--line); }
ul.recent li { display: flex; gap: 8px; align-items: center; padding: 4px 0; font-size: .9rem; }
ul.recent li a { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Chat */
.chat-hero { display: flex; justify-content: space-between; align-items: center; }
.chat-hero form { margin: 0; }
.chat { display: grid; gap: 10px; }
.msg { max-width: 88%; padding: 10px 12px; border-radius: 16px; line-height: 1.45; }
.msg p { margin: 0 0 8px; } .msg p:last-of-type { margin-bottom: 2px; }
.msg.user { justify-self: end; background: var(--accent); color: #fff; border-bottom-right-radius: 4px; }
@media (prefers-color-scheme: dark) { .msg.user { color: #1c0f09; } }
.msg.assistant { justify-self: start; background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.msg.error-msg { border-color: var(--bad); color: var(--bad); }
.msg .meta { display: block; font-size: .7rem; opacity: .7; text-align: right; }
.composer { position: sticky; bottom: calc(64px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: 1fr auto;
  gap: 8px; align-items: end; background: var(--bg); padding: 8px 0; margin: 0; }
.composer textarea { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; padding: 10px 12px; resize: none; min-height: 44px; }
.composer button.primary { width: auto; padding: 11px 16px; }
.composer button:disabled { opacity: .6; }
.composer .thinking { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: .9rem; }
@media (min-width: 900px) { .composer { bottom: 0; } }
ul.exec li { padding: 10px 0; border-top: 1px solid var(--line); }
ul.exec li:first-child { border-top: 0; }
.exec-head { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.exec-head .t { font-weight: 600; }
.exec-nums { display: flex; flex-wrap: wrap; gap: 4px 14px; font-variant-numeric: tabular-nums; margin: 2px 0; }
.exec-nums b { font-size: 1.1rem; }

/* Uitleg: kracht en voeding */
.guide h3 { font-size: .95rem; margin: 14px 0 4px; }
.guide ul { margin: 0; padding-left: 1.2em; } .guide li { margin: 3px 0; }
.guide details { border-top: 1px solid var(--line); padding: 8px 0; }
.guide details:first-of-type { border-top: 0; }
.guide summary { display: grid; gap: 2px; color: var(--ink); }
.guide summary .t { font-weight: 600; }
.guide summary .dose { color: var(--accent); font-size: .9rem; }
.guide details p { margin: 6px 0; }
.guide .rules { margin-top: 10px; font-size: .9rem; color: var(--muted); }
.h2like { font-size: 1.05rem; font-weight: 650; color: var(--ink); }
.review .points.good li::marker { color: var(--good); }
.review .points.warn li::marker { color: var(--warn); }
.review .label { display: block; margin-top: 6px; }
.gear { color: var(--muted); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; }
.gear svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.gear.on, .gear:hover { color: var(--accent); }
.pk-login { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 12px; }
.pk-login svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.divider { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .85rem; margin: 4px 0 14px; }
.divider::before, .divider::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.keys li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.keys li:first-child { border-top: 0; } .keys form { margin: 0; }
.pk-add { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 12px; }
.pk-add .primary { width: auto; padding: 10px 14px; }

/* Voorstellen */
ul.changes li { padding: 10px 0; border-top: 1px solid var(--line); }
ul.changes li:first-child { border-top: 0; }
ul.changes .t { font-weight: 600; }
.was, .wordt { margin-top: 4px; }
.was { color: var(--muted); }
.was .label, .wordt .label { display: inline-block; min-width: 3.6em; }
table.compact { margin-top: 10px; }
.decide form { margin: 0 0 10px; }
.reject { display: grid; gap: 8px; margin-top: 8px; }
.reject textarea, .ask textarea { font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 12px; resize: vertical; width: 100%; }
.ask { display: grid; gap: 10px; margin-top: 8px; }
ul.props li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
ul.props li:first-child { border-top: 0; }
ul.props a { display: grid; min-width: 0; } ul.props .t { font-weight: 600; }
ul.props form { margin: 0; }
.proposal-card { border-color: var(--accent); }
.summary ul.sum li { display: grid; grid-template-columns: 5.2rem 1fr; gap: 8px; padding: 6px 0; border-top: 1px solid var(--line); }
.summary ul.sum li:first-child { border-top: 0; padding-top: 0; }
.summary .d { color: var(--muted); font-size: .9rem; padding-top: 1px; }
.summary .wk { margin: 10px 0 0; font-variant-numeric: tabular-nums; }
.summary .why { margin: 10px 0 0; color: var(--muted); font-size: .92rem; }

/* Loop-details, kaart en routes */
.stats.six { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.map { height: 280px; border-radius: 10px; overflow: hidden; background: var(--bg); z-index: 0; }
.map.tall { height: 360px; }
.leaflet-container { font: inherit; font-size: .75rem; }
ul.acts li a { display: grid; gap: 1px; padding: 9px 0; border-top: 1px solid var(--line); }
ul.acts li:first-child a { border-top: 0; }
ul.acts .t { font-weight: 600; } ul.acts .nums { font-size: .9rem; font-variant-numeric: tabular-nums; }
ul.acts .pin { color: var(--accent); font-size: .75rem; }
.route-form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: end; }
.route-form .check { grid-column: 1 / -1; display: flex; gap: 8px; align-items: center; color: var(--ink); }
.route-form button { grid-column: 1 / -1; }
.route-form input[type=number] { width: 100%; }
ul.routes li { display: grid; grid-template-columns: auto 1fr auto; gap: 2px 10px; align-items: center; padding: 9px 6px;
  border-top: 1px solid var(--line); cursor: pointer; border-radius: 8px; }
ul.routes li .muted { grid-column: 2; } ul.routes li a { grid-row: 1 / span 2; grid-column: 3; }
ul.routes li .sw { grid-row: 1 / span 2; width: 14px; height: 14px; border-radius: 4px; }
ul.routes li.on { background: var(--accent-soft); }
.sw.r0 { background: #d24f1c; } .sw.r1 { background: #2f6fb0; } .sw.r2 { background: #2f7d4f; }
.sw.r3 { background: #8f2d56; } .sw.r4 { background: #a3650d; } .sw.r5 { background: #5b5bd6; }

/* Subnavigatie binnen een onderdeel */
.subnav { max-width: 960px; margin: 0 auto 12px; padding: 0 16px; display: flex; gap: 6px; overflow-x: auto;
  scrollbar-width: none; }
.subnav::-webkit-scrollbar { display: none; }
.subnav a { flex: none; padding: 7px 14px; border-radius: 999px; font-size: .92rem; font-weight: 550; color: var(--muted);
  background: var(--chip-muted); text-decoration: none; }
.subnav a.on { background: var(--accent); color: #fff; }
@media (prefers-color-scheme: dark) { .subnav a.on { color: #1c0f09; } }
@media (min-width: 900px) { body.with-tabs .subnav { order: 2; } body.with-tabs main { order: 3; } }

/* 1.0: Garmin ophalen, kracht invullen, krachtoverzicht */
.ok { background: var(--good-soft); color: var(--good); padding: 8px 12px; border-radius: 10px; }
.ok a { color: inherit; text-decoration: underline; }
form.fetch { margin: 8px 0 0; }
form.fetch button.small { padding: 6px 12px; font-size: .88rem; }
.spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid var(--line); border-top-color: var(--accent);
  border-radius: 50%; vertical-align: -2px; animation: spin 1s linear infinite; margin-right: 4px; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }
.logform fieldset { border: 0; border-top: 1px solid var(--line); margin: 0; padding: 10px 0 6px; min-width: 0; }
.logform fieldset:first-of-type { border-top: 0; }
.logform legend { font-weight: 600; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; }
.logform legend .muted { font-weight: 400; }
.logfields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 6px; }
.logfields label { margin: 0; font-size: .8rem; }
.logfields input { width: 100%; padding: 8px 10px; }
.feel { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 8px 0 4px; }
.feel label { margin: 0; display: block; }
.feel input { position: absolute; opacity: 0; pointer-events: none; }
.feel span { display: block; text-align: center; padding: 7px 4px; border: 1px solid var(--line); border-radius: 9px;
  color: var(--ink); font-size: .88rem; cursor: pointer; background: var(--bg); }
.feel input:checked + span { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.feel input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.logform label.skip { display: flex; gap: 8px; align-items: center; margin: 4px 0 0; font-size: .82rem; }
.logform label.skip input { width: auto; }
.logform button.primary { margin-top: 12px; }
.kr .card-head h2 { font-size: 1rem; margin: 0; }
.spark { color: var(--accent); flex: none; }
ul.krlog li { display: grid; grid-template-columns: 5.5em 1fr auto; gap: 8px; align-items: center; padding: 5px 0;
  border-top: 1px solid var(--line); }
ul.krlog li:first-child { border-top: 0; }

/* Testomgeving (MC_ENVIRONMENT=test): altijd zichtbaar bovenaan, zodat je hem niet met de echte verwart */
.testbanner { position: sticky; top: 0; z-index: 100; padding: 4px 12px; text-align: center; font-weight: 600;
  font-size: .85rem; letter-spacing: .04em; background: var(--warn); color: #fff; }

/* Voeding */
.voeding-dag { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.voeding-dag h1 { margin: 0; text-align: center; flex: 1; }
.dagpijl { font-size: 1.8rem; line-height: 1; padding: 4px 12px; min-width: 2.5rem; text-align: center; }
.totalen { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px 16px; margin: 0; }
.totalen div { display: grid; gap: 2px; } .totalen dt { font-size: .8rem; color: var(--muted); }
.totalen dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.logregels li a, .producten li a { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0;
  color: var(--ink); border-top: 1px solid var(--line); }
.logregels li:first-child a, .producten li:first-child a { border-top: 0; }
a.button.small { display: inline-block; margin-top: 8px; padding: 6px 12px; border: 1px solid var(--line);
  border-radius: 8px; background: var(--surface); color: var(--ink); font-size: .88rem; }
.fout { color: var(--bad); font-size: .85rem; }
select { font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
label.check { display: flex; gap: 8px; align-items: center; color: var(--ink); }
.scanbeeld { position: relative; border-radius: 12px; overflow: hidden; background: #000; aspect-ratio: 4 / 3; margin: 8px 0; }
.scanbeeld video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scanbeeld .kader { position: absolute; inset: 30% 10%; border: 2px solid var(--accent); border-radius: 8px; }
