/* Layout: bbzod.de-Sprache — helle Fläche, runde 2em-Karten, Navy-Schrift; Sonnen-Gelb als einziger lauter Akzent.
   Reihenfolge: Momentaufnahme → Energiefluss → Tageskurve → Erträge → Technik */

/* Source Sans 3 (SIL OFL 1.1), selbst gehostet — siehe fonts/OFL.txt. unicode-range wie in den Fontsource-Paketdaten (unicode.json). */
@font-face { font-family: 'Source Sans 3'; font-style: normal; font-display: swap; font-weight: 400; src: url(../fonts/source-sans-3-latin-ext-400-normal.woff2) format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Source Sans 3'; font-style: normal; font-display: swap; font-weight: 400; src: url(../fonts/source-sans-3-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Source Sans 3'; font-style: normal; font-display: swap; font-weight: 600; src: url(../fonts/source-sans-3-latin-ext-600-normal.woff2) format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Source Sans 3'; font-style: normal; font-display: swap; font-weight: 600; src: url(../fonts/source-sans-3-latin-600-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Source Sans 3'; font-style: normal; font-display: swap; font-weight: 700; src: url(../fonts/source-sans-3-latin-ext-700-normal.woff2) format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Source Sans 3'; font-style: normal; font-display: swap; font-weight: 700; src: url(../fonts/source-sans-3-latin-700-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Source Sans 3'; font-style: normal; font-display: swap; font-weight: 800; src: url(../fonts/source-sans-3-latin-ext-800-normal.woff2) format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Source Sans 3'; font-style: normal; font-display: swap; font-weight: 800; src: url(../fonts/source-sans-3-latin-800-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Source Sans 3'; font-style: normal; font-display: swap; font-weight: 900; src: url(../fonts/source-sans-3-latin-ext-900-normal.woff2) format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Source Sans 3'; font-style: normal; font-display: swap; font-weight: 900; src: url(../fonts/source-sans-3-latin-900-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

:root {
  --bg: #f4f5f8;
  --surface: #ffffff;
  --ink: #1c1f33;
  --muted: #565e72;
  --line: #e2e5ec;
  --blue: #1d4774;
  --sun: #ffc43d;
  --sun-ink: #8a5a00;
  --green: #3f7f02;
  --warn: #b0400f;
  --a: #2a6fc0;
  --b: #c78500;
  --seq-lo: #eef5e4;
  --seq-hi: #3f7f02;
  --bar-day: #499301;
  --gap: #8d97ad;
  --grad: linear-gradient(to right, #499301 0%, #007b8b 100%);
  --on-grad: #ffffff;
  --c-yellow: #ffc43d;
  --c-green: #499301;
  --c-red: #e51b1f;
  --shadow: 0 3px 20px rgba(0, 0, 0, .16);
  --font: 'Source Sans 3', 'Calibri', 'Segoe UI', system-ui, sans-serif;
  --radius: 2em;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1524; --surface: #152038; --ink: #e7ecf4; --muted: #a2adc2; --line: #26334f;
    --blue: #9cc0ee; --sun-ink: #ffd36e; --green: #8fcf4c; --warn: #ff9a6b;
    --a: #4f94e0; --b: #b5800c; --seq-lo: #1f2a3f; --seq-hi: #ffc43d; --bar-day: #ffd36e; --gap: #66728c;
    --grad: linear-gradient(to right, #3f7f02 0%, #00707f 100%); --c-green: #5aa311; --c-red: #e8474a; --shadow: 0 3px 20px rgba(0, 0, 0, .45);
    color-scheme: dark;
  }
  :root:not([data-theme="light"]) .brand .logo.light { display: none; }
  :root:not([data-theme="light"]) .brand .logo.dark { display: block; }
}
:root[data-theme="dark"] {
  --bg: #0d1524; --surface: #152038; --ink: #e7ecf4; --muted: #a2adc2; --line: #26334f;
  --blue: #9cc0ee; --sun-ink: #ffd36e; --green: #8fcf4c; --warn: #ff9a6b;
  --a: #4f94e0; --b: #b5800c; --seq-lo: #1f2a3f; --seq-hi: #ffc43d; --bar-day: #ffd36e; --gap: #66728c;
  --grad: linear-gradient(to right, #3f7f02 0%, #00707f 100%); --c-green: #5aa311; --c-red: #e8474a; --shadow: 0 3px 20px rgba(0, 0, 0, .45);
  color-scheme: dark;
}
:root[data-theme="dark"] .brand .logo.light { display: none; }
:root[data-theme="dark"] .brand .logo.dark { display: block; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { background: var(--bg); color: var(--ink); font: 400 1.0625rem/1.55 var(--font); margin: 0; transition: background-color .5s, color .5s; min-height: 100vh; }
@supports (height: 100dvh) { body { min-height: 100dvh; } }
/* Breite wie bbzod.de: max. 1550px, Rand 25–30px; Safe-Area für iPhone-Querformat */
.wrap { max-width: calc(1550px + 60px); margin: 0 auto; padding-inline: max(clamp(16px, 2.5vw, 30px), env(safe-area-inset-left)) max(clamp(16px, 2.5vw, 30px), env(safe-area-inset-right)); padding-block: 0 max(4rem, env(safe-area-inset-bottom)); }
.hint { display: inline-flex; align-items: center; gap: .45rem; font-size: .9rem; font-weight: 600; color: var(--ink); background: color-mix(in srgb, var(--c-green) 12%, transparent); padding: .35rem .85rem; border-radius: 999px; overflow-wrap: anywhere; }
.hint svg { width: 1.1rem; height: 1.1rem; flex: none; }
h1, h2, h3 { color: var(--ink); line-height: 1.2; text-wrap: balance; margin: 0; overflow-wrap: anywhere; }
h1 { font-weight: 900; font-size: clamp(1.9rem, 4.5vw, 3rem); letter-spacing: -0.01em; }
h2 { font-weight: 800; font-size: clamp(1.4rem, 3vw, 1.9rem); }
h2 u { text-decoration: none; background: linear-gradient(90deg, #499301, #007b8b) bottom / 100% 4px no-repeat; padding-bottom: 2px; }
h2.eyebrow { font-size: 1rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
h3 { font-weight: 700; font-size: 1.1rem; }
p { margin: 0; max-width: 65ch; overflow-wrap: anywhere; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.num { font-variant-numeric: tabular-nums; }
.stack { display: grid; gap: .6rem; min-width: 0; }

/* Kopfzeile mit Sonnen-Schalter */
.topbar { display: flex; flex-wrap: wrap; gap: .75rem 1rem; align-items: center; justify-content: space-between; padding-block: 1rem; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 1rem; text-decoration: none; color: var(--ink); min-width: 0; }
.brand .logo { display: block; height: clamp(56px, 7vw, 92px); width: auto; }
.brand .logo.dark { display: none; }
.brand .sub { font-size: clamp(1.05rem, 1.6vw, 1.35rem); font-weight: 800; padding-left: 1rem; border-left: 3px solid var(--c-green); line-height: 1.1; }
.brand:focus-visible { outline: 3px solid var(--sun); outline-offset: 4px; border-radius: 8px; }
.tools { display: flex; align-items: center; gap: .75rem 1.25rem; flex-wrap: wrap; }

/* Darstellung (Hell/Dunkel/Auto) und Sprache als Segment-Schalter */
.mode { display: inline-flex; align-items: center; gap: .5rem; }
.mode .lbl { font-size: .85rem; font-weight: 600; color: var(--muted); }
.seg { display: inline-flex; padding: .2rem; gap: .15rem; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.seg button { display: inline-flex; align-items: center; gap: .35rem; font: 700 .85rem var(--font); padding: .35rem .75rem; border: 0; border-radius: 999px; background: transparent; color: var(--muted); cursor: pointer; }
.seg button svg { width: 1rem; height: 1rem; flex: none; }
.seg button:hover { color: var(--ink); }
.seg button[aria-checked="true"] { background: var(--grad); color: var(--on-grad); }
.seg button:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }
@media (max-width: 480px) {
  .seg button span, .mode .lbl { display: none; }
  .topbar { flex-wrap: nowrap; gap: .5rem; padding-block: .75rem; }
  .brand { gap: .5rem; }
  .brand .logo { height: 38px; }
  .brand .sub { font-size: .9rem; padding-left: .5rem; border-left-width: 2px; }
  .tools { flex-wrap: nowrap; gap: .35rem; flex: none; }
  .seg { padding: .15rem; gap: 0; }
  .seg button { padding: .25rem .4rem; font-size: .72rem; min-height: 1.6rem; }
  .seg button svg { width: .85rem; height: .85rem; }
}

/* Hinweisbalken (veraltete Daten / offline) */
.banner { margin-top: 1rem; padding: .7rem 1.1rem; border-radius: 1.2em; font-weight: 600; background: color-mix(in srgb, var(--sun) 28%, var(--surface)); color: var(--ink); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--sun) 70%, transparent); overflow-wrap: anywhere; }

/* Aktualisierungs-Anzeige: Ring läuft in 60 s ab, Klick lädt sofort */
.when-row { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1rem; min-width: 0; }
.refresh { display: inline-flex; align-items: center; gap: .45rem; font: 600 .85rem var(--font); font-variant-numeric: tabular-nums; color: var(--muted); background: transparent; border: 0; border-radius: 999px; padding: .2rem .7rem .2rem .3rem; cursor: pointer; box-shadow: inset 0 0 0 1px var(--line); }
.refresh:hover { color: var(--ink); box-shadow: inset 0 0 0 2px var(--c-green); }
.refresh:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }
.refresh svg { width: 1.15rem; height: 1.15rem; transform: rotate(-90deg); flex: none; }
.refresh circle { fill: none; stroke-width: 3; }
.rf-track { stroke: var(--line); }
.rf-ring { stroke: var(--c-green); stroke-linecap: round; stroke-dasharray: 56.55; transition: stroke-dashoffset 1s linear; }
.refresh.busy svg { animation: rf-spin 1s linear infinite; }
@keyframes rf-spin { to { transform: rotate(270deg); } }
.hero { display: grid; gap: 1rem; padding-block: 2.5rem 1.5rem; }
.hero p.lead { font-size: 1.15rem; color: var(--muted); }

section { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.25rem; padding-block: 2.25rem 0; min-width: 0; }
.card { background: var(--surface); border-radius: var(--radius); padding: 1.5rem; display: grid; gap: 1rem; min-width: 0; transition: background-color .5s; }
.head { display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; align-items: end; justify-content: space-between; }

/* Kacheln wie auf bbzod.de: weiß, rund, zentriert, Icon im Farbkreis, mittlere Kachel hervorgehoben */
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.25rem; align-items: center; padding-block: 1.25rem 2.75rem; width: 100%; max-width: 75rem; margin-inline: auto; }
.tile { background: var(--surface); border-radius: var(--radius); padding: 1.6rem 1.25rem; display: grid; justify-items: center; text-align: center; gap: .3rem; min-width: 0; transition: background-color .5s; }
.tile.hi { box-shadow: var(--shadow); transform: scale(1.08); position: relative; z-index: 1; }
.tile h3 { font-size: 1.15rem; }
.tile .ic { width: 4.4rem; height: 4.4rem; border-radius: 50%; display: grid; place-items: center; margin-block: .4rem; }
.tile .ic svg { width: 2.4rem; height: 2.4rem; fill: #fff; }
.ic.yellow { background: var(--c-yellow); } .ic.green { background: var(--c-green); } .ic.red { background: var(--c-red); }
.tile .big { font-size: clamp(2.2rem, 5vw, 3rem); font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; }
.tile .unit { font-size: 1.6rem; line-height: 1.1; }
.tile .diff { font-size: 1rem; font-variant-numeric: tabular-nums; }
.tile .diff.up { color: var(--green); } .tile .diff.down { color: var(--warn); } .tile .diff.flat { color: var(--blue); }
.tile small { color: var(--muted); font-size: .85rem; overflow-wrap: anywhere; }
.gauge { width: 100%; max-width: 12rem; height: .55rem; border-radius: 999px; background: var(--line); overflow: hidden; margin-top: .3rem; }
.gauge i { display: block; height: 100%; width: 0; background: var(--c-yellow); border-radius: 999px; transition: width .3s; }
@media (max-width: 760px) { .tiles { grid-template-columns: minmax(0, 1fr); gap: 1.25rem; padding-block: .5rem 1.5rem; } .tile.hi { transform: none; } }
.facts { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); width: 100%; max-width: 75rem; margin-inline: auto; }
.fact { background: var(--surface); border-radius: 1.4em; padding: 1rem 1.25rem; display: grid; gap: .1rem; align-content: start; min-width: 0; transition: background-color .5s; }
.fact .k { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.fact .v { font-size: 1.6rem; font-weight: 900; font-variant-numeric: tabular-nums; line-height: 1.15; overflow-wrap: anywhere; }
.fact .v small { font-size: .9rem; font-weight: 600; color: var(--muted); margin-left: .2rem; }
.fact .s { font-size: .85rem; color: var(--muted); overflow-wrap: anywhere; }

/* Energiefluss: Dach, Schule, Netz */
.flow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; align-items: stretch; }
.flow-node { background: var(--bg); border-radius: 1.4em; padding: 1rem 1.25rem; display: grid; gap: .1rem; justify-items: center; text-align: center; min-width: 0; }
.flow-node .k { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.flow-node .v { font-size: 1.6rem; font-weight: 900; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.flow-kpis { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(8rem, 100%), 1fr)); }
@media (max-width: 480px) { .card { padding: 1.1rem; } .flow-kpis .fact { padding: .75rem 1rem; } .flow-kpis .fact .v { font-size: 1.35rem; } }
.flow.has-svg { display: block; padding: 0; background: none; }
.fv-svg { display: block; width: 100%; height: auto; max-height: 20rem; }
.fv-box { fill: var(--bg); }
.fv-node.dim { opacity: .4; }
.fv-ic { fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.fv-k { fill: var(--muted); font-size: 13px; font-weight: 600; letter-spacing: .08em; }
.fv-v { fill: var(--ink); font-size: 26px; font-weight: 900; font-variant-numeric: tabular-nums; }
.fv-lbl { fill: var(--ink); font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
/* Leitung: blasse Bahn + laufende Punkte; Punktabstand und Animation (SVG-<animate>) setzt flowview.js */
.fv-track { stroke: var(--fv-c); stroke-opacity: .22; }
.fv-dots { stroke: var(--fv-c); }
.fv-pill rect { fill: color-mix(in srgb, var(--fv-c) 18%, var(--surface)); }
.fv-tall { display: none; max-height: none; max-width: 22rem; margin-inline: auto; }
@media (max-width: 600px) { .fv-wide { display: none; } .fv-tall { display: block; } }
@media (max-width: 760px) { .flow { grid-template-columns: minmax(0, 1fr); } }

/* Tabs und Auswahl */
/* Buttons wie auf bbzod.de: Pille, fett, grün-türkiser Verlauf */
.tabs { display: flex; flex-wrap: wrap; gap: .5rem; }
.tab { font: 800 1rem var(--font); min-height: 3em; padding: .1em 1.4em .2em; border-radius: var(--radius); border: 0; background: var(--surface); color: var(--ink); cursor: pointer; box-shadow: inset 0 0 0 1px var(--line); }
.tab:hover { box-shadow: inset 0 0 0 2px var(--c-green); }
.tab[aria-selected="true"] { background: var(--grad); background-size: 100%; color: var(--on-grad); box-shadow: none; transition: background-size .5s ease-in-out; }
.tab[aria-selected="true"]:hover { background-size: 300%; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; min-width: 0; }
.chip-btn { font: 700 .9rem var(--font); min-height: 2.3em; padding: .1em 1em; border-radius: var(--radius); border: 0; box-shadow: inset 0 0 0 1px var(--line); background: transparent; color: var(--ink); cursor: pointer; }
.chip-btn:hover { box-shadow: inset 0 0 0 2px var(--c-green); }
.chip-btn[aria-pressed="true"] { background: var(--grad); color: var(--on-grad); box-shadow: none; }
.tab:focus-visible, .chip-btn:focus-visible, .step:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }
.sum { display: flex; flex-wrap: wrap; gap: .25rem 1.75rem; font-size: 1rem; color: var(--muted); min-width: 0; }
.sum b { color: var(--ink); font-variant-numeric: tabular-nums; font-size: 1.15rem; }
.delta.up { color: var(--green); } .delta.down { color: var(--warn); }
.chart { width: 100%; height: 340px; min-width: 0; }
.chart.tall { height: 420px; }
.split { display: grid; gap: 1.25rem; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
@media (max-width: 860px) { .split { grid-template-columns: minmax(0, 1fr); } }
.gap-legend { display: flex; flex-wrap: wrap; gap: .4rem 1.5rem; font-size: .9rem; color: var(--muted); margin: 0; min-width: 0; }
.gap-legend > span { display: inline-flex; align-items: center; gap: .5rem; min-width: 0; overflow-wrap: anywhere; }
.gap-legend > span::before { content: ""; width: 1rem; height: .7rem; border-radius: 3px; flex: none; }
.gl-hatch::before { background: repeating-linear-gradient(135deg, var(--gap) 0 3px, transparent 3px 6px); box-shadow: inset 0 0 0 1px var(--gap); }
.gl-pale::before { background: var(--a); opacity: .55; }

/* Tageskurve: Tag blättern */
.stepper { display: inline-flex; align-items: center; gap: .75rem; }
.step { font: 800 1.1rem var(--font); width: 2.6rem; height: 2.6rem; border-radius: 50%; border: 0; background: var(--surface); color: var(--ink); cursor: pointer; box-shadow: inset 0 0 0 1px var(--line); }
.step:hover:not(:disabled) { box-shadow: inset 0 0 0 2px var(--c-green); }
.step:disabled { opacity: .4; cursor: default; }
#day .head { position: relative; }
.day-pick { display: contents; }
#day-label { font: 700 1rem var(--font); min-width: 8rem; min-height: 2.6rem; padding: .1rem .5rem; text-align: center; font-variant-numeric: tabular-nums; color: var(--ink); background: transparent; border: 0; border-radius: var(--radius); cursor: pointer; text-decoration: underline dotted; text-underline-offset: .25em; }
#day-label::after { content: " ▾"; text-decoration: none; display: inline-block; color: var(--muted); }
#day-label:hover, #day-label[aria-expanded="true"] { box-shadow: inset 0 0 0 2px var(--c-green); }

/* Kalender-Popover der Tageskurve */
#day-cal { position: absolute; top: calc(100% + .4rem); right: 0; z-index: 20; box-sizing: border-box; width: 21rem; max-width: calc(100vw - 32px); background: var(--surface); color: var(--ink); border-radius: var(--radius); padding: .75rem; box-shadow: var(--shadow), inset 0 0 0 1px var(--line); display: grid; gap: .5rem; min-width: 0; }
#day-cal[hidden] { display: none; }
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.cal-title { font-weight: 800; text-align: center; min-width: 0; overflow-wrap: anywhere; }
.cal-nav { font: 800 1.1rem var(--font); width: 2.4rem; height: 2.4rem; flex: none; border-radius: 50%; border: 0; background: transparent; color: var(--ink); cursor: pointer; box-shadow: inset 0 0 0 1px var(--line); }
.cal-nav:hover:not(:disabled) { box-shadow: inset 0 0 0 2px var(--c-green); }
.cal-nav:disabled { opacity: .4; cursor: default; }
.cal-grid { display: grid; gap: 2px; min-width: 0; }
.cal-row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
.cal-row > span { display: block; min-width: 0; }
.cal-wd span { text-align: center; font-size: .75rem; font-weight: 600; color: var(--muted); text-transform: uppercase; }
.cal-day { position: relative; width: 100%; min-width: 0; min-height: 2.5rem; padding: .1rem 0 .3rem; display: grid; place-items: center; font: 600 .95rem var(--font); font-variant-numeric: tabular-nums; color: var(--ink); background: transparent; border: 0; border-radius: .6rem; cursor: pointer; }
.cal-day:hover:not([aria-disabled="true"]) { box-shadow: inset 0 0 0 2px var(--c-green); }
.cal-day[aria-disabled="true"] { cursor: default; color: var(--muted); }
.cal-day.st-none, .cal-day.st-future { opacity: .45; }
.cal-day.st-daily { opacity: .8; }
.cal-day.out { opacity: .3; }
.cal-day.today { box-shadow: inset 0 0 0 1px var(--muted); }
.cal-day.sel { background: color-mix(in srgb, var(--c-green) 22%, transparent); box-shadow: inset 0 0 0 2px var(--c-green); font-weight: 800; opacity: 1; }
.cal-day:focus-visible, #day-label:focus-visible, .cal-nav:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.dot { display: inline-block; width: .45rem; height: .45rem; border-radius: 50%; background: transparent; }
.cal-day .dot { position: absolute; bottom: .3rem; left: 50%; transform: translateX(-50%); }
.st-curve.dot, .st-curve .dot { background: var(--c-green); }
.st-pv.dot, .st-pv .dot { background: var(--c-yellow); }
.cal-legend { display: flex; flex-wrap: wrap; gap: .25rem 1rem; margin: 0; }
.cal-key { display: inline-flex; align-items: center; gap: .4rem; }
.cal-error { margin: 0; color: var(--muted); overflow-wrap: anywhere; }

/* Technik */
.tablewrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { text-align: left; padding: .55rem .6rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
td.r, th.r { text-align: right; font-variant-numeric: tabular-nums; }
.bar { display: inline-block; height: .55rem; border-radius: 0 4px 4px 0; background: var(--blue); vertical-align: middle; }
.chip { display: inline-flex; align-items: center; gap: .3rem; font-size: .8rem; font-weight: 600; padding: .1rem .55rem; border-radius: 999px; border: 1px solid currentColor; }
.chip.low { color: var(--warn); } .chip.ok { color: var(--green); }

footer { margin-top: 3rem; padding-top: 1.25rem; border-top: 1px solid var(--line); font-size: .9rem; color: var(--muted); display: grid; gap: .4rem; overflow-wrap: anywhere; }
footer nav { display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; }
footer a { color: var(--blue); }
footer a:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) { *, *::before { transition: none !important; animation: none !important; } }
