/* Accuraat — generated from tokens.json */
:root, [data-theme="light"] {
  --bg: #e9f0ed;
  --surface: #ffffff;
  --surface-2: #f1f6f4;
  --line: #d9e4e0;
  --line-strong: #7b8f8a;
  --ink: #0f272c;
  --ink-muted: #4c625d;
  --brand: #0d3b44;
  --brand-2: #185562;
  --on-brand: #eef8f6;
  --on-brand-muted: #a9cdc8;
  --accent: #0e6670;
  --on-accent: #ffffff;
  --accent-soft: #d8eeeb;
  --accent-ink: #0a4b52;
  --focus: #0e6670;
  --zon: #b57d00;
  --zon-soft: #fdf0cf;
  --net: #4c55c9;
  --net-terug: #a8adef;
  --net-soft: #e6e8fb;
  --batterij: #13896b;
  --batterij-in: #8fd8bf;
  --batterij-soft: #dcf3ea;
  --verbruik: #0f272c;
  --verbruik-soft: #e3ecea;
  --gas: #a2468a;
  --airco: #2f7fd0;
  --actie-zelfverbruik: #c7d5d0;
  --actie-laden: #4c55c9;
  --actie-vasthouden: #13896b;
  --actie-terugleveren: #d23f6f;
  --prijs-1: #cfe2df;
  --prijs-2: #9cc4be;
  --prijs-3: #5f9790;
  --prijs-4: #2c6670;
  --prijs-5: #0d3b44;
  --ok: #18764a;
  --ok-soft: #dcf2e5;
  --ok-ink: #105a37;
  --warn: #9a5a00;
  --warn-soft: #fdf0d3;
  --warn-ink: #683d00;
  --err: #c0322a;
  --err-soft: #fbe3e0;
  --err-ink: #8a1d18;
  --shadow-card: 0 1px 2px rgba(20,24,22,0.06);
  --shadow-pop: 0 8px 24px rgba(20,24,22,0.14);
}
[data-theme="dark"] {
  --bg: #0a1618;
  --surface: #102226;
  --surface-2: #172e33;
  --line: #22393e;
  --line-strong: #62807b;
  --ink: #e8f3f1;
  --ink-muted: #9fb8b3;
  --brand: #123f48;
  --brand-2: #1b5561;
  --on-brand: #eef8f6;
  --on-brand-muted: #a9cdc8;
  --accent: #5ccbcc;
  --on-accent: #062327;
  --accent-soft: #143c41;
  --accent-ink: #a8e6e4;
  --focus: #7fe0df;
  --zon: #f5c242;
  --zon-soft: #3a2f10;
  --net: #8f97f5;
  --net-terug: #3d438f;
  --net-soft: #1f2350;
  --batterij: #3fcf9f;
  --batterij-in: #18694f;
  --batterij-soft: #123b30;
  --verbruik: #e8f3f1;
  --verbruik-soft: #1b3237;
  --gas: #e08ccb;
  --airco: #78b4f2;
  --actie-zelfverbruik: #3a524d;
  --actie-laden: #8f97f5;
  --actie-vasthouden: #3fcf9f;
  --actie-terugleveren: #f47aa0;
  --prijs-1: #1d3c40;
  --prijs-2: #2f5d61;
  --prijs-3: #5f9790;
  --prijs-4: #9cc4be;
  --prijs-5: #d4ece8;
  --ok: #5dd193;
  --ok-soft: #123321;
  --ok-ink: #9ce6bc;
  --warn: #f3b54a;
  --warn-soft: #36290d;
  --warn-ink: #f8d58d;
  --err: #ff7f76;
  --err-soft: #3d1715;
  --err-ink: #ffb5ae;
  --shadow-card: 0 1px 2px rgba(0,0,0,0.4);
  --shadow-pop: 0 8px 24px rgba(0,0,0,0.55);
}
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) {
    --bg: #0a1618;
    --surface: #102226;
    --surface-2: #172e33;
    --line: #22393e;
    --line-strong: #62807b;
    --ink: #e8f3f1;
    --ink-muted: #9fb8b3;
    --brand: #123f48;
    --brand-2: #1b5561;
    --on-brand: #eef8f6;
    --on-brand-muted: #a9cdc8;
    --accent: #5ccbcc;
    --on-accent: #062327;
    --accent-soft: #143c41;
    --accent-ink: #a8e6e4;
    --focus: #7fe0df;
    --zon: #f5c242;
    --zon-soft: #3a2f10;
    --net: #8f97f5;
    --net-terug: #3d438f;
    --net-soft: #1f2350;
    --batterij: #3fcf9f;
    --batterij-in: #18694f;
    --batterij-soft: #123b30;
    --verbruik: #e8f3f1;
    --verbruik-soft: #1b3237;
    --gas: #e08ccb;
    --airco: #78b4f2;
    --actie-zelfverbruik: #3a524d;
    --actie-laden: #8f97f5;
    --actie-vasthouden: #3fcf9f;
    --actie-terugleveren: #f47aa0;
    --prijs-1: #1d3c40;
    --prijs-2: #2f5d61;
    --prijs-3: #5f9790;
    --prijs-4: #9cc4be;
    --prijs-5: #d4ece8;
    --ok: #5dd193;
    --ok-soft: #123321;
    --ok-ink: #9ce6bc;
    --warn: #f3b54a;
    --warn-soft: #36290d;
    --warn-ink: #f8d58d;
    --err: #ff7f76;
    --err-soft: #3d1715;
    --err-ink: #ffb5ae;
    --shadow-card: 0 1px 2px rgba(0,0,0,0.4);
    --shadow-pop: 0 8px 24px rgba(0,0,0,0.55);
  }
}
:root {
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-tap: 44px;
  --radius-s: 6px;
  --radius-m: 10px;
  --radius-l: 20px;
  --radius-xl: 28px;
  --radius-pill: 999px;
  --page-narrow: 1200px;
  --page-wide: 2200px;
  --topbar-h: 56px;
  --tabbar-h: 56px;
  --font-sans: system-ui, -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-display: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
.num-xl { font-family: var(--font-display); font-size: 40px; line-height: 44px; font-weight: 700; letter-spacing: -0.02em; }
.num-l { font-family: var(--font-display); font-size: 28px; line-height: 32px; font-weight: 650; letter-spacing: -0.01em; }
.num-m { font-family: var(--font-display); font-size: 20px; line-height: 26px; font-weight: 600; }
.title { font-family: var(--font-sans); font-size: 22px; line-height: 28px; font-weight: 650; }
.heading { font-family: var(--font-sans); font-size: 17px; line-height: 24px; font-weight: 600; }
.body { font-family: var(--font-sans); font-size: 15px; line-height: 22px; font-weight: 400; }
.body-strong { font-family: var(--font-sans); font-size: 15px; line-height: 22px; font-weight: 600; }
.small { font-family: var(--font-sans); font-size: 13px; line-height: 18px; font-weight: 400; }
.label { font-family: var(--font-sans); font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 0.02em; }

/* Accuraat — componenten. Leunt volledig op de variabelen uit tokens.css.
   Geen inline style nodig: alles via klassen (CSP-vriendelijk).
   Breekpunt telefoon: 760px. Grote schermen: vanaf 1600px meer kolommen. */

/* ───────────── basis ───────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font-sans); font-size: 15px; line-height: 22px;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p { margin: 0; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.num, .kpi__value, .table td, .flow__value { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-muted); }
.sprite { display: none; }
.ico { width: 20px; height: 20px; flex: none; display: inline-block; vertical-align: -4px; }
.ico--s { width: 16px; height: 16px; vertical-align: -3px; }
.ico--l { width: 24px; height: 24px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: var(--radius-s); }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ───────────── app-schil ───────────── */
.app { min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; height: 64px;
  display: flex; align-items: center; gap: var(--space-5); padding: 0 var(--space-5);
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.brand { display: flex; align-items: center; gap: var(--space-2); font-weight: 700; font-size: 17px; color: var(--ink); }
.brand__mark { width: 32px; height: 32px; border-radius: 10px; background: var(--brand); color: var(--on-brand); display: grid; place-items: center; }
.brand__mark .ico { width: 20px; height: 20px; }
.nav { display: flex; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 6px; padding: 0 14px; height: 38px; border-radius: var(--radius-pill);
  color: var(--ink-muted); font-weight: 500;
}
.nav a:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }
.nav a[aria-current="page"] { background: var(--brand); color: var(--on-brand); font-weight: 600; }
.topbar__end { margin-left: auto; display: flex; align-items: center; gap: var(--space-3); color: var(--ink-muted); font-size: 13px; }
.topbar__end .btn { height: 36px; }
.clock { font-variant-numeric: tabular-nums; color: var(--ink); font-weight: 600; }
.mode-pill {
  display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px 0 10px;
  border-radius: var(--radius-pill); background: var(--surface-2); border: 1px solid var(--line);
  font-size: 13px; font-weight: 600; color: var(--ink); white-space: nowrap;
}
.mode-pill__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px transparent; } }
.mode-pill--watch .mode-pill__dot { background: var(--ink-muted); box-shadow: none; }
.mode-pill--think .mode-pill__dot { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.apphead { display: none; }
.tabbar { display: none; }

.page { width: 100%; max-width: var(--page-narrow); margin: 0 auto; padding: var(--space-6) var(--space-5) var(--space-8); display: flex; flex-direction: column; gap: var(--space-6); }
.app.is-vol .page { max-width: var(--page-wide); }
.page-head { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; }
.page-head h1 { font-size: 22px; line-height: 28px; font-weight: 650; }
.page-head__sub { color: var(--ink-muted); font-size: 13px; }
.page-head__end { margin-left: auto; display: flex; gap: var(--space-2); align-items: center; flex-wrap: wrap; }
.footer { color: var(--ink-muted); font-size: 12px; line-height: 16px; padding-top: var(--space-4); }

.section { display: flex; flex-direction: column; gap: var(--space-3); }
.section__head { display: flex; align-items: baseline; gap: var(--space-3); }
.section__head h2 { font-size: 17px; line-height: 24px; font-weight: 600; }
.section__meta { margin-left: auto; color: var(--ink-muted); font-size: 13px; text-align: right; }

/* rasters */
.grid { display: grid; gap: var(--space-4); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--auto { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.grid--hero { grid-template-columns: minmax(0, 8fr) minmax(0, 5fr); }
.grid--side { grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); align-items: start; }
@media (min-width: 1700px) {
  .app.is-vol .grid--hero { grid-template-columns: minmax(0, 10fr) minmax(0, 4fr); }
}

/* ───────────── kaart ───────────── */
.card {
  background: var(--surface); border: 1px solid transparent; border-radius: var(--radius-l);
  box-shadow: var(--shadow-card); padding: var(--space-5); min-width: 0;
  display: flex; flex-direction: column; gap: var(--space-4);
}
.card--flush { padding: 0; gap: 0; overflow: hidden; }
.card--flush > .card__head { padding: var(--space-4) var(--space-5) var(--space-3); }
.card--flush > .card__foot { padding: var(--space-3) var(--space-5) var(--space-4); }
.card__head { display: flex; align-items: baseline; gap: var(--space-3); flex-wrap: wrap; }
.card__head h2, .card__head h3 { font-size: 17px; line-height: 24px; font-weight: 600; display: flex; gap: 8px; align-items: center; }
.card__meta { margin-left: auto; color: var(--ink-muted); font-size: 13px; }
.card__meta b { color: var(--ink); font-size: 15px; font-variant-numeric: tabular-nums; }
.card__foot { color: var(--ink-muted); font-size: 13px; line-height: 18px; }
.card__foot a { font-weight: 600; }
.divider { height: 1px; background: var(--line); border: 0; margin: 0; }

/* ───────────── kerncijfers (max. 4) + compacte cijfers ───────────── */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-4); }
.kpi { background: var(--surface); border: 1px solid transparent; border-radius: var(--radius-l); padding: var(--space-4) var(--space-5); box-shadow: var(--shadow-card); min-width: 0; }
.kpi__label { display: flex; align-items: center; gap: 6px; color: var(--ink-muted); font-size: 13px; line-height: 18px; font-weight: 500; }
.kpi__value { font-family: var(--font-display); font-size: 32px; line-height: 38px; font-weight: 700; letter-spacing: -0.01em; margin-top: 4px; }
.kpi__value small { font-size: 15px; font-weight: 500; color: var(--ink-muted); letter-spacing: 0; }
.kpi__sub { color: var(--ink-muted); font-size: 13px; line-height: 18px; margin-top: 2px; }
.kpi__sub .up { color: var(--ok); font-weight: 600; }
.kpi__sub .down { color: var(--err); font-weight: 600; }
.kpi--hero { grid-column: span 1; }
.kpi--hero .kpi__value { font-size: 44px; line-height: 44px; font-weight: 700; letter-spacing: -0.02em; }

.facts { display: flex; flex-wrap: wrap; gap: 6px 20px; padding: 0; margin: 0; list-style: none; font-size: 13px; line-height: 18px; color: var(--ink-muted); }
.facts li { display: flex; align-items: center; gap: 6px; }
.facts b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }

/* ───────────── badges, sleutels (legenda) ───────────── */
.badge {
  display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 8px; border-radius: var(--radius-s);
  font-size: 12px; line-height: 16px; font-weight: 600; white-space: nowrap;
  background: var(--surface-2); color: var(--ink); border: 1px solid var(--line);
}
.badge .ico { width: 14px; height: 14px; vertical-align: 0; }
.badge--ok { background: var(--ok-soft); color: var(--ok-ink); border-color: transparent; }
.badge--warn { background: var(--warn-soft); color: var(--warn-ink); border-color: transparent; }
.badge--err { background: var(--err-soft); color: var(--err-ink); border-color: transparent; }
.badge--info { background: var(--accent-soft); color: var(--accent-ink); border-color: transparent; }
.badge--solid { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.status { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13px; }
.status .ico { width: 16px; height: 16px; }
.status--ok { color: var(--ok); } .status--warn { color: var(--warn); } .status--err { color: var(--err); }

/* reeks-/actiestaal: altijd naast een label */
.sw { width: 12px; height: 12px; border-radius: 3px; flex: none; display: inline-block; background: var(--line-strong); }
.sw--line { height: 3px; width: 16px; border-radius: 2px; }
.sw--dash { height: 0; width: 16px; border-top: 2px dashed var(--prijs-3); background: none; border-radius: 0; }
.sw--zon { background: var(--zon); } .sw--net { background: var(--net); } .sw--net-terug { background: var(--net-terug); }
.sw--batterij { background: var(--batterij); } .sw--batterij-in { background: var(--batterij-in); }
.sw--verbruik { background: var(--verbruik); } .sw--gas { background: var(--gas); } .sw--prijs { background: var(--prijs-3); }
.sw--zelfverbruik { background: var(--actie-zelfverbruik); }
.sw--laden { background: var(--actie-laden); }
.sw--vasthouden { background: repeating-linear-gradient(135deg, var(--actie-vasthouden) 0 3px, var(--surface) 3px 5px); }
.sw--terugleveren { background: radial-gradient(circle at 3px 3px, var(--surface) 1.2px, transparent 1.6px) 0 0/6px 6px, var(--actie-terugleveren); }
.sw--ink { background: var(--ink); } .sw--airco { background: var(--airco); } .sw--ok { background: var(--ok); } .sw--err { background: var(--err); }
.sw--was { background: var(--accent-soft); border: 1.5px solid var(--accent); }
.sw--nu { width: 2px; height: 14px; border-radius: 1px; background: var(--ink); }
.sw--doel { background: var(--accent-soft); border: 1px solid var(--accent); }
.sw--aan { background: var(--actie-laden); opacity: .35; }
.keys { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; line-height: 16px; color: var(--ink-muted); margin: 0; padding: 0; list-style: none; }
.keys li, .key { display: inline-flex; align-items: center; gap: 6px; }

/* actie-chip: icoon + label + kleur */
.act { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; white-space: nowrap; }
.act .sw { width: 10px; height: 10px; }
.act--l { font-size: 20px; line-height: 26px; }
.act--l .sw { width: 14px; height: 14px; border-radius: 4px; }

/* ───────────── knoppen ───────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 38px; padding: 0 16px;
  border-radius: var(--radius-pill); border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
  font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap; text-decoration: none;
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn--primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn--onbrand { background: var(--brand-2); border-color: transparent; color: var(--on-brand); }
.btn--primary:hover { background: var(--accent); filter: brightness(1.08); }
.btn--quiet { border-color: transparent; background: transparent; color: var(--ink-muted); }
.btn--quiet:hover { color: var(--ink); }
.btn--danger { color: var(--err); }
.btn--icon { width: 38px; padding: 0; }
.btn[disabled], .btn.is-disabled { opacity: .45; cursor: not-allowed; }
.btn.is-busy::after { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }
@media (pointer: coarse) { .btn { height: 44px; } .btn--icon { width: 44px; } }

/* segment (week/maand/…, per maand/per week) */
.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-m); }
.seg button, .seg a {
  height: 30px; padding: 0 12px; border: 0; border-radius: 7px; background: transparent; color: var(--ink-muted);
  font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center;
}
.seg [aria-pressed="true"], .seg [aria-current="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-card); outline: 1px solid var(--line); }
@media (pointer: coarse) { .seg button, .seg a { height: 38px; } }

/* stepper: − 21 °C + */
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line-strong); border-radius: var(--radius-m); height: 38px; overflow: hidden; }
.stepper button { width: 38px; height: 100%; border: 0; background: transparent; color: var(--ink); cursor: pointer; display: grid; place-items: center; }
.stepper button:hover { background: var(--surface-2); }
.stepper output { min-width: 58px; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }
@media (pointer: coarse) { .stepper { height: 44px; } .stepper button { width: 44px; } }

/* schakelaar (aan/uit) */
.switch { position: relative; display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; cursor: pointer; }
.switch input { appearance: none; margin: 0; width: 42px; height: 26px; border-radius: 13px; background: var(--line-strong); position: relative; cursor: pointer; transition: background .15s; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--surface); transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.25); }
.switch input:checked { background: var(--accent); }
.switch input:checked::after { transform: translateX(16px); }
@media (pointer: coarse) { .switch { min-height: 44px; } }

/* ───────────── formulieren ───────────── */
.form { display: flex; flex-direction: column; gap: var(--space-4); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field__label { font-weight: 600; font-size: 14px; }
.field__help { color: var(--ink-muted); font-size: 13px; line-height: 18px; }
.field__error { color: var(--err); font-size: 13px; display: flex; gap: 6px; align-items: center; }
.field--row { flex-direction: row; align-items: center; justify-content: space-between; gap: var(--space-4); }
.input, .select {
  height: 40px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-m);
  background: var(--surface); color: var(--ink); font: inherit; width: 100%; min-width: 0;
}
.input--s { width: 140px; } .input--num { text-align: right; font-variant-numeric: tabular-nums; max-width: 140px; }
.select { appearance: none; padding-right: 34px; background-image: linear-gradient(45deg, transparent 50%, var(--ink-muted) 50%), linear-gradient(135deg, var(--ink-muted) 50%, transparent 50%); background-position: calc(100% - 17px) 17px, calc(100% - 12px) 17px; background-size: 5px 5px; background-repeat: no-repeat; }
.select--auto { width: auto; }
.input[aria-invalid="true"] { border-color: var(--err); }
.input-group { display: flex; align-items: center; gap: var(--space-2); }
.input-unit { color: var(--ink-muted); font-size: 14px; }
@media (pointer: coarse) { .input, .select { height: 44px; } }
.choices { display: flex; flex-direction: column; gap: 2px; border: 0; padding: 0; margin: 0; }
.choices legend { font-weight: 600; font-size: 14px; margin-bottom: 6px; padding: 0; }
.choice { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border-radius: var(--radius-m); cursor: pointer; }
.choice:hover { background: var(--surface-2); }
.choice input { appearance: none; margin: 2px 0 0; width: 20px; height: 20px; flex: none; border: 1.5px solid var(--line-strong); background: var(--surface); display: grid; place-items: center; cursor: pointer; }
.choice input[type="radio"] { border-radius: 50%; }
.choice input[type="checkbox"] { border-radius: 5px; }
.choice input:checked { border-color: var(--accent); background: var(--accent); }
.choice input[type="radio"]:checked { background: var(--surface); border-width: 6px; }
.choice input[type="checkbox"]:checked::after { content: ""; width: 10px; height: 6px; border: 2px solid var(--on-accent); border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.choice__text b { display: block; font-weight: 600; }
.choice__text span { color: var(--ink-muted); font-size: 13px; line-height: 18px; }
.choice--card { border: 1px solid var(--line); }
.choice--card:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.form-actions { display: flex; gap: var(--space-2); align-items: center; }

/* ───────────── tabellen ───────────── */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 20px; }
.table th { text-align: left; font-size: 12px; line-height: 16px; font-weight: 600; color: var(--ink-muted); background: var(--surface-2); padding: 8px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table th button { all: unset; cursor: pointer; display: inline-flex; gap: 4px; align-items: center; }
.table th[aria-sort] { color: var(--ink); }
.table td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--surface-2); }
.table .r { text-align: right; white-space: nowrap; }
.cellbar > span { white-space: nowrap; } .table .c { text-align: center; }
.table .is-today td { background: var(--accent-soft); }
.table .note { display: block; color: var(--ink-muted); font-size: 12px; line-height: 16px; }
.table tfoot td { font-weight: 650; border-top: 1px solid var(--line-strong); border-bottom: 0; }

/* balkje in de cel: <span class="cellbar"> waarde + <svg> met <rect width="…"> (geen inline style nodig) */
.cellbar { display: grid; grid-template-columns: 1fr 72px; gap: 10px; align-items: center; justify-items: end; }
.cellbar svg { width: 72px; height: 10px; overflow: visible; }
.cellbar__track { fill: var(--surface-2); }
.cellbar__fill { fill: var(--prijs-3); }
.cellbar__fill--ok { fill: var(--ok); } .cellbar__fill--err { fill: var(--err); }
.cellbar__fill--net { fill: var(--net); } .cellbar__fill--zon { fill: var(--zon); }
.cellbar__fill--verbruik { fill: var(--verbruik); } .cellbar__fill--batterij { fill: var(--batterij); }
.cellbar__fill--hanchu { fill: var(--prijs-3); } .cellbar__fill--accuraat { fill: var(--accent); }
.cellbar__axis { stroke: var(--ink-muted); stroke-width: 1; }
.cellbar--wide { grid-template-columns: 1fr 120px; } .cellbar--wide svg { width: 120px; }
/* soc-balkje (batterij aan het eind) */
.socbar { display: inline-flex; align-items: center; gap: 8px; }
.socbar svg { width: 44px; height: 12px; }
.socbar__track { fill: none; stroke: var(--line-strong); stroke-width: 1; }
.socbar__fill { fill: var(--batterij); }

/* ───────────── meldingen ───────────── */
.alerts { display: flex; flex-direction: column; gap: var(--space-2); }
.alert {
  display: grid; grid-template-columns: 20px 1fr auto; gap: 4px 12px; align-items: start;
  padding: 12px 14px; border-radius: var(--radius-m); background: var(--accent-soft); color: var(--accent-ink);
  font-size: 14px; line-height: 20px;
}
.alert .ico { width: 20px; height: 20px; margin-top: 0; }
.alert__title { font-weight: 650; }
.alert__time { color: inherit; opacity: .85; font-size: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.alert__text { grid-column: 2 / -1; }
.alert__actions { grid-column: 2 / -1; display: flex; gap: 12px; font-weight: 600; }
.alert__actions a { color: inherit; text-decoration: underline; }
.alert--warn { background: var(--warn-soft); color: var(--warn-ink); }
.alert--err { background: var(--err-soft); color: var(--err-ink); }
.alert--ok { background: var(--ok-soft); color: var(--ok-ink); }
.alert--inline { background: transparent; padding: 0; color: var(--ink-muted); }
.alert--inline.alert--warn { color: var(--warn); }

/* ───────────── lege en ladende toestand ───────────── */
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: var(--space-8) var(--space-4); color: var(--ink-muted); }
.empty .ico { width: 32px; height: 32px; color: var(--line-strong); }
.empty b { color: var(--ink); font-size: 15px; }
.skeleton { background: linear-gradient(90deg, var(--surface-2) 0, var(--line) 50%, var(--surface-2) 100%) 0 0/200% 100%; border-radius: var(--radius-s); animation: shimmer 1.4s linear infinite; }
.skeleton--line { height: 12px; } .skeleton--num { height: 30px; width: 60%; } .skeleton--chart { height: 160px; border-radius: var(--radius-m); }
.skeleton--w40 { width: 40%; } .skeleton--w70 { width: 70%; }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .skeleton, .btn.is-busy::after, .flow__line--on, .mode-pill__dot { animation: none !important; } }

/* ───────────── grafieken (ECharts-houders: hoogte via klasse) ───────────── */
.chart { width: 100%; min-width: 0; position: relative; }
.chart--plan-compact { height: 230px; }
.chart--plan { height: 400px; }
.chart--day { height: 640px; }
.chart--period { height: 560px; }
.chart--heat { height: 360px; }
.chart--heatcall { height: 230px; }
.chart--heatenergy { height: 220px; }
.chart--heatsig { height: 360px; }
/* "Wat de gegevens zeggen": the layout of "Waarom dit plan", a line of explanation under each point */
.story__item b { display: block; font-weight: 650; }
.story__item p { margin: 2px 0 0; color: var(--ink-muted); font-size: 13px; line-height: 19px; }
.story__item--ok .story__icon { color: var(--ok); }
.story__item--warn .story__icon { color: var(--warn); }
.story__item--info .story__icon { color: var(--accent); }
.story.story--plain { grid-template-columns: minmax(0, 1fr); }   /* over .story's two columns, further down */
.heat-range { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); }
.heat-range .input { width: auto; min-width: 0; }
.heat-cmp-note { padding: 0 var(--space-5) var(--space-4); }
#heat-compare td, #heat-compare th { font-variant-numeric: tabular-nums; white-space: nowrap; }
#heat-compare tr.is-chosen td, #heat-compare tr.is-chosen th { font-weight: 650; background: var(--accent-soft); }
#costs-months tr.is-ahead td, #costs-months tr.is-ahead th { color: var(--ink-muted); font-style: italic; }
.pagetabs { align-self: flex-start; }
#costs-scen td .muted { font-size: 12px; }
#costs-scen-story { padding: var(--space-4) var(--space-5); }
.chart--savings { height: 320px; }
.chart--spark { height: 72px; }
.chart-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.chart-note { color: var(--ink-muted); font-size: 12px; line-height: 17px; }
/* tooltip (ECharts className: 'a-tip') */
.a-tip:empty { display: none !important; }
.a-tip { background: var(--surface) !important; border: 1px solid var(--line) !important; border-radius: var(--radius-m) !important; box-shadow: var(--shadow-pop) !important; color: var(--ink) !important; font: 13px/18px var(--font-sans) !important; padding: 10px 12px !important; }
.a-tip__t { font-weight: 650; margin-bottom: 4px; }
.a-tip__r { display: flex; align-items: center; gap: 8px; }
.a-tip__r b { margin-left: auto; padding-left: 16px; font-variant-numeric: tabular-nums; }
.a-tip__act { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--line); display: flex; gap: 6px; align-items: center; font-weight: 600; }

/* ───────────── plan: nu + volgende ───────────── */
.plan-now { display: grid; grid-template-columns: auto 1fr; gap: 4px 24px; align-items: center; }
.plan-now__label { font-size: 12px; font-weight: 600; color: var(--ink-muted); text-transform: uppercase; letter-spacing: .04em; }
.plan-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--space-3) var(--space-5); align-items: start; }
.plan-strip__item { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.plan-strip__item .act { font-size: 17px; line-height: 24px; white-space: normal; align-items: flex-start; }
.plan-strip__item .act .sw { margin-top: 6px; }
.plan-strip__why { color: var(--ink-muted); font-size: 13px; line-height: 18px; }

/* ───────────── energiestroom "Nu" ───────────── */
.flow { display: grid; grid-template-columns: 1fr; gap: var(--space-3); }
.flow > svg { width: 100%; max-width: 440px; margin: 0 auto; height: auto; display: block; overflow: visible; }
.flow__node { fill: var(--surface); stroke-width: 2; }
.flow__node--zon { stroke: var(--zon); } .flow__node--net { stroke: var(--net); }
.flow__node--batterij { stroke: var(--batterij); } .flow__node--huis { stroke: var(--verbruik); }
.flow__icon--zon { color: var(--zon); } .flow__icon--net { color: var(--net); }
.flow__icon--batterij { color: var(--batterij); } .flow__icon--huis { color: var(--verbruik); }
.flow__line { fill: none; stroke: var(--line); stroke-width: 3; stroke-linecap: round; }
.flow__line--on { stroke-dasharray: 2 8; stroke-width: 3.5; animation: flow 1s linear infinite; }
.flow__line--zon { stroke: var(--zon); } .flow__line--net { stroke: var(--net); } .flow__line--batterij { stroke: var(--batterij); }
.flow__line--rev { animation-direction: reverse; }
@keyframes flow { to { stroke-dashoffset: -10; } }
.flow__value { font: 650 17px/1 var(--font-sans); fill: var(--ink); }
.flow__label { font: 500 12px/1 var(--font-sans); fill: var(--ink-muted); }
.flow__soc-track { fill: none; stroke: var(--surface-2); stroke-width: 5; }
.flow__soc { fill: none; stroke: var(--batterij); stroke-width: 5; stroke-linecap: round; }
.flow__stale { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--warn); font-weight: 600; }

/* ───────────── klimaatkaart ───────────── */
.climate { gap: var(--space-3); }
.climate__head { display: flex; align-items: center; gap: 8px; }
.climate__head h3 { font-size: 15px; font-weight: 600; display: flex; gap: 8px; align-items: center; }
.climate__head .badge { margin-left: auto; }
.climate__now { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.climate__temp { font-family: var(--font-display); font-size: 34px; line-height: 38px; font-weight: 700; font-variant-numeric: tabular-nums; }
.climate__meta { color: var(--ink-muted); font-size: 13px; line-height: 18px; }
.seg--icons button { padding: 0 9px; }
.seg--icons [aria-pressed="true"] { color: var(--accent); }
.climate__controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.climate__controls-wrap { display: flex; flex-direction: column; gap: var(--space-2); }
.climate__more > summary { font-size: 13px; color: var(--ink-muted); }
.climate__more[open] > summary { margin-bottom: var(--space-2); }
.climate__more-body { display: flex; flex-direction: column; gap: 10px; }
.climate__option { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.climate__option-label { font-size: 13px; color: var(--ink-muted); min-width: 72px; }
.climate__option .seg { flex-wrap: wrap; }
.climate__flags { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.climate__flags .switch { font-weight: 500; }
.climate__verdict { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; }
.climate__verdict--ok { color: var(--ok); } .climate__verdict--warn { color: var(--warn); }

/* ───────────── opbrengst-blok ───────────── */
.earn { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: var(--space-5); align-items: center; }
.earn__big { font-family: var(--font-display); font-size: 56px; line-height: 60px; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.earn__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.earn__list li { display: grid; grid-template-columns: 1fr auto; gap: 0 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.earn__list li:first-child { border-top: 0; }
.earn__list b { font-variant-numeric: tabular-nums; text-align: right; }
.earn__list span { color: var(--ink-muted); font-size: 12px; grid-column: 1 / -1; }

/* ───────────── beslissingen ───────────── */
.decisions { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.decision { display: grid; grid-template-columns: 112px 1fr auto; gap: 2px 16px; padding: 12px 0; border-top: 1px solid var(--line); align-items: center; }
.decision:first-child { border-top: 0; }
.decision__time { font-variant-numeric: tabular-nums; font-weight: 600; }
.decision__why { grid-column: 2 / -1; color: var(--ink-muted); font-size: 13px; line-height: 18px; }
.decision__count { color: var(--ink-muted); font-size: 13px; text-align: right; }
.decision--sent { background: var(--accent-soft); margin: 0 calc(-1 * var(--space-3)); padding: 12px var(--space-3); border-radius: var(--radius-m); border-top-color: transparent; }
.decision--sent + .decision { border-top-color: transparent; }
.decision--sent + .decision--sent { margin-top: 4px; }
.card { container-type: inline-size; }
@container (max-width: 520px) {
  .decision { grid-template-columns: 1fr auto; }
  .decision__time { grid-column: 1 / -1; font-size: 13px; color: var(--ink-muted); }
  .decision__why { grid-column: 1 / -1; }
}
.decision--sent .decision__why { color: var(--accent-ink); }

/* ───────────── instellingen ───────────── */
.settings { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: var(--space-6); align-items: start; }
.subnav { position: sticky; top: calc(var(--topbar-h) + 24px); display: flex; flex-direction: column; gap: 2px; }
.subnav a { display: flex; align-items: center; gap: 10px; padding: 0 12px; height: 38px; border-radius: var(--radius-m); color: var(--ink-muted); font-weight: 500; }
.subnav a:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }
.subnav a[aria-current="true"] { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.subnav .badge { margin-left: auto; }
.setlist { list-style: none; margin: 0; padding: 0; }
.setlist a, .setlist__row { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px var(--space-4); border-top: 1px solid var(--line); color: var(--ink); }
.setlist li:first-child > * { border-top: 0; }
.setlist a:hover { background: var(--surface-2); text-decoration: none; }
.setlist__icon { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; background: var(--surface-2); color: var(--ink-muted); flex: none; }
.setlist__text { display: flex; flex-direction: column; min-width: 0; }
.setlist__text span { color: var(--ink-muted); font-size: 13px; line-height: 18px; }
.setlist__end { margin-left: auto; display: flex; align-items: center; gap: 8px; color: var(--ink-muted); font-size: 13px; }
.statuslist { list-style: none; margin: 0; padding: 0; }
.statuslist li { display: grid; grid-template-columns: 200px 110px 1fr; gap: 4px 16px; padding: 10px 0; border-top: 1px solid var(--line); align-items: baseline; }
.statuslist li:first-child { border-top: 0; }
.statuslist__name { font-weight: 600; }
.statuslist__info { color: var(--ink-muted); font-size: 13px; line-height: 18px; }
.statuslist li.is-err .statuslist__info { color: var(--err-ink); }
.userrow { display: flex; align-items: center; gap: 12px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--line); display: grid; place-items: center; font-weight: 650; font-size: 13px; color: var(--ink-muted); flex: none; }

/* ───────────── inloggen ───────────── */
.login { min-height: 100vh; display: grid; place-items: center; padding: var(--space-5); }
.login__card { width: 100%; max-width: 380px; }

/* ───────────── telefoon ───────────── */
@media (max-width: 760px) {
  body { font-size: 15px; }
  .topbar { display: none; }
  .apphead {
    display: flex; position: sticky; top: 0; z-index: 20; align-items: center; gap: var(--space-3);
    padding: calc(env(safe-area-inset-top) + 10px) var(--space-4) 10px; background: var(--bg);
    border-bottom: 1px solid transparent;
  }
  .apphead h1 { font-family: var(--font-display); font-size: 28px; line-height: 34px; font-weight: 800; letter-spacing: -0.01em; }
  .apphead .mode-pill { margin-left: auto; height: 28px; font-size: 12px; }
  .tabbar {
    display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: var(--surface); border-top: 1px solid var(--line);
    padding-bottom: env(safe-area-inset-bottom); height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  }
  .tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 44px; font-size: 11px; line-height: 14px; font-weight: 600; color: var(--ink-muted); }
  .tabbar a:hover { text-decoration: none; }
  .tabbar a[aria-current="page"] { color: var(--ink); }
  .tabbar .ico { padding: 3px 12px; box-sizing: content-box; width: 22px; height: 22px; border-radius: 999px; }
  .tabbar a[aria-current="page"] .ico { background: var(--brand); color: var(--on-brand); }
  .tabbar .ico { width: 24px; height: 24px; }
  .page { padding: var(--space-2) var(--space-3) calc(var(--tabbar-h) + env(safe-area-inset-bottom) + var(--space-6)); gap: var(--space-4); }
  .page-head h1 { display: none; }
  .page-head__end { margin-left: 0; width: 100%; }
  .grid--2, .grid--3, .grid--hero, .grid--side, .grid--auto { grid-template-columns: minmax(0, 1fr); gap: var(--space-3); }
  .card { padding: var(--space-4); border-radius: 14px; gap: var(--space-3); }
  .card--flush { padding: 0; }
  .card--flush > .card__head { padding: var(--space-4) var(--space-4) 0; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2); }
  .kpi { padding: 12px 14px; border-radius: 14px; }
  .kpi__value { font-size: 22px; line-height: 28px; }
  .kpi--hero { grid-column: 1 / -1; }
  .kpi--hero .kpi__value { font-size: 34px; line-height: 40px; }
  .chart--plan-compact { height: 210px; }
  .chart--plan { height: 340px; }
  .chart--day { height: 560px; }
  .chart--period { height: 480px; }
  .chart--savings { height: 260px; }
  .earn { grid-template-columns: 1fr; gap: var(--space-3); }
  .decision { grid-template-columns: 1fr auto; }
  .decision__time { grid-column: 1 / -1; font-size: 13px; color: var(--ink-muted); }
  .decision__why { grid-column: 1 / -1; }
  .settings { grid-template-columns: 1fr; }
  .subnav { display: none; }
  .statuslist li { grid-template-columns: 1fr auto; }
  .statuslist__info { grid-column: 1 / -1; }
  .table--stack thead { display: none; }
  .table--stack tr { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
  .table--stack td { padding: 0; border: 0; }
  .table--stack td[data-k] { display: flex; align-items: center; gap: 6px; min-width: 0; }
  .table--stack td[data-k]::before { content: attr(data-k); color: var(--ink-muted); font-size: 12px; }
  .table--stack td.r[data-k] { justify-content: flex-start; }
  .table--stack .cellbar { grid-template-columns: auto 44px; gap: 6px; }
  .table--stack .cellbar svg { width: 44px; }
  .table--stack .stack-full { grid-column: 1 / -1; }
  .hide-phone { display: none !important; }
  .section__meta { font-size: 12px; }
  .plan-strip { grid-template-columns: 1fr 1fr; gap: var(--space-3); }
  .grid--scroll { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 86%; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 calc(-1 * var(--space-3)); padding: 0 var(--space-3) 4px; scrollbar-width: none; }
  .grid--scroll > * { scroll-snap-align: start; }
  .plan-strip--3 > :first-child { grid-column: 1 / -1; }
}
@media (min-width: 761px) { .only-phone { display: none !important; } }

/* ───────────── rol Kijken: server laat bedieningselementen weg; deze klasse is de vangrail ───────────── */
.is-kijker .can-edit, .is-kijker .nav-admin, .only-kijker, .nav-account { display: none !important; }
.is-kijker .only-kijker { display: inline-flex !important; }
@media (max-width: 760px) { .is-kijker .nav-account { display: flex !important; } }
.viewer-note { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-muted); font-size: 13px; }


/* ═════════════ HUISSTIJL: merkvlak, getinte tegels, display-cijfers ═════════════ */
.page-head h1, .section__head h2, .card__head h2, .card__head h3 { font-family: var(--font-display); letter-spacing: -0.01em; }
.page-head h1 { font-size: 30px; line-height: 36px; font-weight: 800; }
.section__head h2 { font-size: 20px; line-height: 26px; font-weight: 750; }
.num-xl, .num-l, .num-m { font-family: var(--font-display); }

/* icoon in een gekleurde cirkel */
.dot-ico { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--surface-2); color: var(--ink); }
.dot-ico .ico { width: 20px; height: 20px; vertical-align: 0; }
.dot-ico--zon { background: var(--zon); color: #2b1d00; }
.dot-ico--net { background: var(--net); color: #fff; }
.dot-ico--batterij { background: var(--batterij); color: #fff; }
.dot-ico--huis { background: var(--ink); color: var(--surface); }
.dot-ico--gas { background: var(--gas); color: #fff; }
.dot-ico--euro { background: var(--accent); color: var(--on-accent); }
.dot-ico--prijs { background: var(--prijs-4); color: var(--surface); }
.dot-ico--s { width: 28px; height: 28px; } .dot-ico--s .ico { width: 16px; height: 16px; }
.dot-ico--l { width: 52px; height: 52px; } .dot-ico--l .ico { width: 28px; height: 28px; }

/* getinte kerncijfers */
.kpi--zon { background: var(--zon-soft); } .kpi--net { background: var(--net-soft); }
.kpi--batterij { background: var(--batterij-soft); } .kpi--huis { background: var(--verbruik-soft); }
.kpi--brand { background: var(--brand); color: var(--on-brand); }
.kpi--brand .kpi__label, .kpi--brand .kpi__sub, .kpi--brand .kpi__value small { color: var(--on-brand-muted); }
.kpi .kpi__label .dot-ico { margin-right: 4px; }

/* merkvlak "Nu": herdefinieert de tokens, dus grafieken en tekst erin kleuren vanzelf mee */
.hero {
  --ink: var(--on-brand); --ink-muted: var(--on-brand-muted); --line: rgba(238,248,246,.14); --line-strong: rgba(238,248,246,.4);
  --surface: var(--brand); --surface-2: var(--brand-2); --actie-zelfverbruik: #5d8a8f; --prijs-3: #8fbcb6; --prijs-4: #cfe6e2;
  --batterij: #4fd6a8; --accent: #7fe0df; --focus: #7fe0df;
  background: var(--brand); color: var(--on-brand); border-radius: var(--radius-xl); padding: var(--space-6);
  display: grid; grid-template-columns: minmax(250px, 300px) minmax(0, 1fr); gap: var(--space-6); position: relative; overflow: hidden;
}
.hero a { color: var(--accent); }
.hero__now { display: flex; flex-direction: column; gap: var(--space-4); }
.hero__eyebrow { font-size: 12px; line-height: 16px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--on-brand-muted); }
.hero__act { display: flex; align-items: center; gap: 12px; font-family: var(--font-display); font-size: 26px; line-height: 30px; font-weight: 800; }
.hero__act .act-ico { width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; background: var(--brand-2); flex: none; }
.hero__act .act-ico .ico { width: 26px; height: 26px; }
.hero__why { color: var(--on-brand-muted); font-size: 14px; line-height: 20px; }
.hero__batt { display: flex; align-items: center; gap: 6px; margin: 4px 0 0; color: var(--on-brand); font-size: 14px; line-height: 20px; }
.hero__batt b { font-weight: 700; }
.hero__price { display: flex; align-items: baseline; gap: 6px; font-family: var(--font-display); }
.hero__price b { font-size: 64px; line-height: 64px; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.hero__price span { font-size: 20px; font-weight: 700; color: var(--on-brand-muted); }
.hero__next { display: grid; gap: 8px; }
.hero__next li { list-style: none; display: grid; grid-template-columns: 64px 1fr; white-space: nowrap; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 14px; background: var(--brand-2); font-size: 14px; line-height: 18px; }
.hero__next li b { font-variant-numeric: tabular-nums; }
.hero__next ul { margin: 0; padding: 0; display: grid; gap: 6px; }
.hero__next .act { font-size: 14px; }
.hero__plan { display: flex; flex-direction: column; gap: var(--space-3); min-width: 0; }
.hero__plan-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.hero__plan-head h2 { font-family: var(--font-display); font-size: 20px; line-height: 26px; font-weight: 750; }
.hero__plan-head .card__meta { color: var(--on-brand-muted); }
.hero .keys { color: var(--on-brand-muted); }
/* waarom dit plan: de winst apart, de zinnen als blokjes met een icoon die de breedte vullen */
.story { display: grid; grid-template-columns: minmax(180px, 230px) minmax(0, 1fr); gap: var(--space-5); align-items: stretch; }
.story__profit { background: var(--accent-soft); border-radius: var(--radius-m); padding: var(--space-4) var(--space-5); display: flex; flex-direction: column; justify-content: center; gap: 2px; }
.story__profit b { font-family: var(--font-display); font-size: 32px; line-height: 38px; font-weight: 700; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; color: var(--accent-ink); }
.story__profit span { color: var(--ink-muted); font-size: 13px; line-height: 18px; }
.story__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--space-4) var(--space-5); align-content: center; }
.story__item { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; align-items: start; font-size: 15px; line-height: 22px; }
.story__icon { width: 34px; height: 34px; border-radius: 10px; background: var(--surface-2); color: var(--ink-muted); display: grid; place-items: center; }
.story__icon .ico { width: 18px; height: 18px; }
.story__item--laden .story__icon { color: var(--actie-laden); }
.story__item--terugleveren .story__icon { color: var(--actie-terugleveren); }
.story__item--vasthouden .story__icon { color: var(--actie-vasthouden); }
.story__item--zon .story__icon { color: var(--zon); }
@container (max-width: 620px) {
  .story { grid-template-columns: minmax(0, 1fr); gap: var(--space-4); }
  .story__profit { flex-direction: row; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; padding: var(--space-3) var(--space-4); }
  .story__profit b { font-size: 26px; line-height: 32px; }
  .story__list { grid-template-columns: minmax(0, 1fr); gap: var(--space-3); }
}
.hero__wash { display: flex; gap: 10px; align-items: center; font-size: 14px; color: var(--on-brand); background: var(--brand-2); border-radius: 14px; padding: 10px 14px; }
.hero .chart--plan-compact { height: 250px; }
.hero__strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: var(--space-3); }   /* alle blokken op één regel */
@media (min-width: 761px) and (max-width: 1023px) { .hero__strip { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.hero__strip > div { background: var(--brand-2); border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.hero__strip .act { font-size: 18px; line-height: 24px; white-space: normal; align-items: flex-start; }
.hero__strip .act .sw { margin-top: 6px; }
.hero--plan { grid-template-columns: 1fr; }

/* batterijmeter (groot) */
.gauge { position: relative; width: 112px; height: 112px; flex: none; }
.gauge svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.gauge__track { fill: none; stroke: var(--brand-2); stroke-width: 12; }
.gauge__fill { fill: none; stroke: var(--batterij); stroke-width: 12; stroke-linecap: round; }
.gauge__label { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.gauge__label b { font-family: var(--font-display); font-size: 28px; line-height: 30px; font-weight: 800; }
.gauge__label span { font-size: 11px; color: var(--ink-muted); }
.hero__row { display: flex; align-items: center; gap: var(--space-4); }

/* bronnen nu: vier getinte tegels + stroomverdeling */
.sources { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-3); }
.source { border-radius: var(--radius-l); padding: 16px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.source--zon { background: var(--zon-soft); } .source--net { background: var(--net-soft); }
.source--batterij { background: var(--batterij-soft); } .source--huis { background: var(--verbruik-soft); }
.source__value { font-family: var(--font-display); font-size: 30px; line-height: 32px; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.source__value small { font-size: 15px; font-weight: 700; color: var(--ink-muted); }
.source__label { font-size: 13px; line-height: 18px; color: var(--ink-muted); }
.source__label b { color: var(--ink); font-weight: 650; display: block; font-size: 14px; }
.source__state { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 650; padding: 3px 8px; border-radius: 999px; background: var(--surface); color: var(--ink); align-self: flex-start; }
.mix { display: flex; flex-direction: column; gap: 6px; }
.mix svg { width: 100%; height: 14px; display: block; border-radius: 7px; }
.mix__zon { fill: var(--zon); } .mix__net { fill: var(--net); } .mix__bat { fill: var(--batterij); } .mix__track { fill: var(--surface-2); }
.mix__legend { font-size: 13px; color: var(--ink-muted); }
.mix__legend b { color: var(--ink); }

/* opbrengst: groot bedrag + staafjes per dag */
.earn-chart { position: relative; }
.earn-bars { width: 100%; height: 72px; display: block; cursor: pointer; }
.earn-bars .is-hover { filter: brightness(.8); }
.earn-bars.is-pointing rect:not(.is-hover) { opacity: .5; }
.earn-tip { position: absolute; bottom: calc(100% + 6px); left: 0; z-index: 5; pointer-events: none; white-space: nowrap; }
.earn-bars .pos { fill: var(--ok); } .earn-bars .neg { fill: var(--err); } .earn-bars .fut { fill: var(--surface-2); } .earn-bars .axis { stroke: var(--line); }
.earn-compare { display: grid; gap: 8px; }
.earn-compare__row { display: grid; grid-template-columns: 130px 1fr auto; gap: 10px; align-items: center; font-size: 13px; }
.earn-compare__row svg { width: 100%; height: 12px; border-radius: 6px; }
.earn-compare__row b { font-variant-numeric: tabular-nums; font-size: 14px; }
.bar-hanchu { fill: var(--prijs-2); } .bar-accuraat { fill: var(--accent); } .bar-track { fill: var(--surface-2); }

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; padding: var(--space-4); border-radius: 24px; gap: var(--space-4); }
  .hero__price b { font-size: 52px; line-height: 52px; }
  .hero__strip { grid-auto-flow: row; grid-template-columns: 1fr; }
  .sources { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .source__value { font-size: 26px; }
  .earn__big { font-size: 46px; line-height: 50px; }
  .page-head h1 { display: none; }
  .gauge { width: 96px; height: 96px; }
}



/* ═════════════ APP: wat de huisstijl niet zelf meebrengt ═════════════ */
[hidden] { display: none !important; }
body:not([data-role="admin"]) .needs-admin { display: none !important; }
pre { font-family: var(--font-mono); font-size: 13px; line-height: 18px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 10px 12px; margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.linkbtn { all: unset; cursor: pointer; text-decoration: underline; font-weight: 600; color: inherit; }
.linkbtn:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: var(--radius-s); }
.topbar .userrow { color: var(--ink-muted); gap: 6px; }
.topbar .userrow:hover { color: var(--ink); text-decoration: none; }
.topbar form { display: contents; }
.form-status { font-size: 13px; line-height: 18px; color: var(--ink-muted); }
.form-actions { flex-wrap: wrap; }
.chart.is-loading { opacity: .5; }
.chart-wrap { position: relative; }
.settings section[id], .settings h2[id] { scroll-margin-top: calc(var(--topbar-h) + 24px); }
.table tr[tabindex] { cursor: pointer; }
.table td.partial { color: var(--ink-muted); }
.table th button .ico { opacity: .7; }
.table td .select, .table td .btn { height: 34px; }
.hero__next ul:empty { display: none; }
.hero .empty b { color: var(--on-brand); }
.source__state .ico { width: 14px; height: 14px; vertical-align: 0; }
.climate__sched { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 13px; line-height: 18px; color: var(--ink-muted); }
.climate.is-busy { opacity: .6; pointer-events: none; }
.kpi__value--s { font-size: 22px; line-height: 30px; }
.input--grow { flex: 1 1 240px; }
.input-group--wrap { flex-wrap: wrap; }
.page-head__sub { font-variant-numeric: tabular-nums; }
details > summary { cursor: pointer; font-weight: 600; font-size: 14px; }
details[open] > summary { margin-bottom: var(--space-3); }
h3.subhead { font-size: 14px; line-height: 20px; font-weight: 650; margin-top: var(--space-2); }

/* lijsten met een naam, uitleg en een knop (passkeys, apparaten, logboek, afwezig) */
.seclist { list-style: none; margin: 0; padding: 0; font-size: 14px; line-height: 20px; }
.seclist li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.seclist li:first-child { border-top: 0; }
.seclist .name { min-width: 150px; font-weight: 600; font-variant-numeric: tabular-nums; }
.seclist .muted { font-size: 13px; }
.seclist .end { margin-left: auto; display: flex; flex-wrap: wrap; gap: 6px; }
.seclist .btn, .btn--s { height: 32px; padding: 0 12px; font-size: 13px; }
@media (pointer: coarse) { .seclist .btn, .btn--s { height: 40px; } }

/* opnieuw bevestigen en uitnodiging */
.confirm { background: var(--warn-soft); color: var(--warn-ink); border-radius: var(--radius-m); padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; line-height: 20px; }
.confirm .input-group { flex-wrap: wrap; }
.confirm .input { max-width: 260px; }
.invite { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; padding: var(--space-4) var(--space-5); border-top: 1px solid var(--line); }

/* formulieren die het script opbouwt (agenda's, airco-schema's): kale velden krijgen de vorm van .input */
.form :where(input[type="text"], input[type="url"], input[type="number"], input[type="time"], input[type="date"], input[type="password"]):not(.input),
.form :where(select):not(.select) {
  height: 40px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-m);
  background: var(--surface); color: var(--ink); font: inherit; min-width: 0;
}
.form :where(input[type="checkbox"]):not(.choice input, .switch input) { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); flex: none; }
.form > label, .form .check { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; }
.form > label + input { margin-top: -10px; }
.form > label.field { align-items: stretch; }
.form > input[type="text"] { width: 100%; }
.form h3 { font-size: 15px; line-height: 22px; font-weight: 650; }
.form > p, .form .help { color: var(--ink-muted); font-size: 13px; line-height: 18px; }
.rows { display: flex; flex-direction: column; }
.period-row, .link-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.period-row:first-child, .link-row:first-child, .cal-row:first-child { border-top: 0; }
.period-row input[type="time"] { width: 116px; }
.period-row input[type="number"] { width: 84px; }
.period-row__note { flex: 1 1 220px; min-width: 0; }
.link-row input { flex: 1 1 200px; }
.days { display: inline-flex; gap: 3px; }
.days label { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: var(--radius-s); font-size: 12px; font-weight: 600; background: var(--surface-2); color: var(--ink-muted); cursor: pointer; position: relative; }
.days input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.days label:has(input:checked) { background: var(--accent); color: var(--on-accent); }
.days label:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
/* airco schedule: one panel per unit, a switch and a line on top, the rest in named parts */
.sched { border: 1px solid var(--line); border-radius: var(--radius-m); padding: var(--space-4); gap: var(--space-3); }
.sched__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2) var(--space-4); }
.sched__head h3 { display: inline-flex; align-items: center; gap: 8px; }
.sched__sum { color: var(--ink-muted); font-size: 14px; line-height: 20px; }
.sched__body { display: flex; flex-direction: column; gap: var(--space-5); padding-top: var(--space-4); border-top: 1px solid var(--line); }
.sched__part { display: flex; flex-direction: column; gap: var(--space-2); align-items: flex-start; }
.sched__part > .rows, .sched__part > .field__help { align-self: stretch; }
.sched__title { font-size: 12px; line-height: 16px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-muted); }
.sched__empty { color: var(--ink-muted); font-size: 14px; }
.sched__more { border-top: 1px solid var(--line); padding-top: var(--space-4); }
.sched__more[open] { display: flex; flex-direction: column; gap: var(--space-3); }
.sched .period-row { gap: 8px 16px; }
.period-row__time, .period-row__temp { display: inline-flex; align-items: center; gap: 8px; }
.period-row .btn--icon { margin-left: auto; }
.days--names { flex-wrap: wrap; gap: 6px; }
.tado-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 240px); gap: 8px 16px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.tado-row:first-child { border-top: 0; }
.tado-row__name { display: flex; flex-direction: column; gap: 2px; font-size: 14px; min-width: 0; overflow-wrap: anywhere; }
.tado-row .switch { min-width: 0; font-weight: 400; }
.tado-row .switch input { flex: none; }
.tado-row.is-off .tado-row__name b { color: var(--ink-muted); font-weight: 500; }
@media (max-width: 640px) { .tado-row { grid-template-columns: minmax(0, 1fr); } }
.days--names label { width: auto; padding: 0 12px; font-size: 13px; text-transform: capitalize; }
.schedule-opts { display: flex; flex-wrap: wrap; gap: 10px 18px; font-size: 14px; }
.schedule-opts label { display: inline-flex; align-items: center; gap: 6px; }
.schedule-opts input[type="number"] { width: 84px; }
/* een agenda: schakelaar en van wie bovenaan, daaronder wanneer een afspraak 'weg' betekent en wat dat nu oplevert */
.cal-row { display: flex; flex-direction: column; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); font-size: 14px; }
.cal-row__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; min-height: 40px; }
.cal-row .switch { min-width: 0; overflow-wrap: anywhere; }
.cal-row.is-off .switch { color: var(--ink-muted); font-weight: 500; }
.cal-row__body { display: flex; flex-direction: column; gap: 10px; padding-left: 50px; }
.cal-row__which { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; }
.cal-field { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-muted); }
.cal-field select, .cal-field .input { color: var(--ink); }
.cal-field--wide { flex: 1 1 340px; }
.cal-field--wide .input { flex: 1 1 160px; min-width: 0; }
.cal-row__seen { margin: 0; color: var(--ink-muted); font-size: 13px; line-height: 18px; }
.away-list { list-style: none; margin: 0; padding: 0; font-size: 14px; line-height: 20px; display: grid; gap: 4px; }
.away-list .muted { font-size: 13px; }
.stack { display: flex; flex-direction: column; gap: var(--space-5); }
.stack > form + form { border-top: 1px solid var(--line); padding-top: var(--space-5); }

/* inloggen, welkom en passkey */
.login__card .brand { align-self: flex-start; }
.login__card .btn { align-self: stretch; }
.login__card .btn--quiet { align-self: center; }
.login__links { display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: space-between; font-size: 13px; }

@media (max-width: 760px) {
  .cal-row__body { padding-left: 0; }
  .cal-field--wide { flex-direction: column; align-items: stretch; gap: 4px; }
  .cal-field--wide .input { flex: none; }
  .seclist .name { min-width: 0; flex: 1 1 100%; }
  .invite { padding: var(--space-4); }
  .settings section[id] { scroll-margin-top: 64px; }
}
.ico--flip { transform: rotate(180deg); }
.kpi--brand .kpi__sub .up, .kpi--brand .kpi__sub .down { color: var(--on-brand); }
