/* ============================================================
   Solaranlage — Garagendach
   Farbrollen identisch zu [[Homelab-Status]], damit beide Seiten
   als ein System lesen. Serien-Slots sind dort bereits validiert:
     dark  #3987e5 / #d95926 / #199e70 → alle Checks PASS (all-pairs)
     light #2a78d6 / #eb6834 / #1baf7a → PASS, Contrast-WARN auf Aqua
                                          → Relief: Legende + Direktlabels + Tabelle
   Hier unverändert übernommen, keine neuen Hues eingeführt.
   ============================================================ */

/* ---------- Farbrollen: DARK (Standard) ---------- */
:root,
:root[data-theme="dark"] {
  color-scheme: dark;

  --plane:        #0d0d0d;
  --surface-1:    #1a1a19;
  --surface-2:    #232322;

  --text-primary:   #ffffff;
  --text-secondary: #c3c2b7;
  --text-muted:     #898781;

  --grid:     #2c2c2a;
  --axis:     #383835;
  --border:   rgba(255,255,255,.10);

  --series-1: #3987e5;
  --series-2: #d95926;
  --series-3: #199e70;

  --seq-track: #0d366b;
  --dial-track: #232322;
}

/* ---------- Farbrollen: LIGHT ---------- */
:root[data-theme="light"] {
  color-scheme: light;

  --plane:        #f9f9f7;
  --surface-1:    #fcfcfb;
  --surface-2:    #f2f2ee;

  --text-primary:   #0b0b0b;
  --text-secondary: #52514e;
  --text-muted:     #898781;

  --grid:     #e1e0d9;
  --axis:     #c3c2b7;
  --border:   rgba(11,11,11,.10);

  --series-1: #2a78d6;
  --series-2: #eb6834;
  --series-3: #1baf7a;

  --seq-track: #cde2fb;
  --dial-track: #e8e7e1;
}

/* ---------- Statusfarben: fest, nie thematisiert ---------- */
:root {
  --status-good:     #0ca30c;
  --status-warning:  #fab219;
  --status-critical: #d03b3b;

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --wrap: 1180px;
  --e: cubic-bezier(.4, 0, .2, 1);
}

/* ============================================================
   BASIS
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--plane);
  color: var(--text-primary);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* ============================================================
   HINTERGRUND — feste Ebene unter dem Inhalt

   Ebene 1 (::before): Himmelsverlauf, folgt der echten Tageszeit.

   Sie ist BEWUSST zurückgenommen. Karten bleiben vollständig
   deckend — Charts brauchen eine definierte Flächenfarbe für die
   2px-Ringe an den Endmarkern, und Text darf nie auf einem Foto
   liegen. Der Hintergrund wirkt nur an den Rändern.
   ============================================================ */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
}
body::before {
  z-index: -2;
  background: var(--sky, transparent);
  opacity: var(--sky-opacity);
  transition: background 2.5s var(--e);
}
.top, main, .wrap { position: relative; z-index: 1; }

/* ============================================================
   WETTEREBENE

   Liegt zwischen Himmel (::before) und Inhalt. Wird aus den
   Live-Daten von Open-Meteo gesetzt (data-weather auf <body>).
   Alles rein dekorativ und stark zurueckgenommen — die Karten
   darueber bleiben vollstaendig deckend.

   Faellt der Wetterdienst aus, bleibt die Ebene leer und die
   Seite zeigt schlicht den Tageszeit-Verlauf wie bisher.
   ============================================================ */
.wx {
  position: fixed; inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

/* Graue Waesche bei truebem Wetter — nimmt dem Himmel die Farbe,
   so wie ein bedeckter Tag es real auch tut. */
.wx::before {
  content: '';
  position: absolute; inset: 0;
  background: var(--wx-wash, transparent);
  transition: background 2.5s var(--e);
}
body[data-weather="cloudy"] { --wx-wash: linear-gradient(180deg, rgba(118,124,134,.46) 0%, rgba(110,116,126,.34) 100%); }
body[data-weather="fog"]    { --wx-wash: linear-gradient(180deg, rgba(150,152,155,.52) 0%, rgba(140,142,146,.42) 100%); }
body[data-weather="rain"]   { --wx-wash: linear-gradient(180deg, rgba(84,94,110,.58) 0%, rgba(74,84,100,.46) 100%); }
body[data-weather="snow"]   { --wx-wash: linear-gradient(180deg, rgba(170,180,194,.44) 0%, rgba(160,170,186,.34) 100%); }
body[data-weather="storm"]  { --wx-wash: linear-gradient(180deg, rgba(52,56,70,.66) 0%, rgba(44,48,62,.54) 100%); }

:root[data-theme="light"] body[data-weather="cloudy"] { --wx-wash: linear-gradient(180deg, rgba(146,152,162,.40) 0%, rgba(158,164,174,.30) 100%); }
:root[data-theme="light"] body[data-weather="fog"]    { --wx-wash: linear-gradient(180deg, rgba(176,178,182,.46) 0%, rgba(186,188,192,.36) 100%); }
:root[data-theme="light"] body[data-weather="rain"]   { --wx-wash: linear-gradient(180deg, rgba(112,124,142,.44) 0%, rgba(124,136,152,.34) 100%); }
:root[data-theme="light"] body[data-weather="snow"]   { --wx-wash: linear-gradient(180deg, rgba(190,196,206,.40) 0%, rgba(200,206,214,.30) 100%); }
:root[data-theme="light"] body[data-weather="storm"]  { --wx-wash: linear-gradient(180deg, rgba(88,92,106,.48) 0%, rgba(100,104,118,.38) 100%); }

/* Wolken als erkennbare Form statt weicher Flecken. Runde Kleckse
   liessen sich nicht als Wolke lesen — das war die Hauptkritik. */
.wx__cloud {
  position: absolute;
  /* Der Weichzeichner sitzt jetzt IM SVG-Filter, nicht mehr hier —
     doppelt weichzeichnen fraesse die Struktur des Rauschens weg. */
  opacity: .8;
  animation: wx-drift linear infinite;
  will-change: transform;
}
.wx__cloud svg { width: 100%; height: 100%; display: block; }
:root[data-theme="light"] .wx__cloud { opacity: .95; }
body[data-weather="storm"] .wx__cloud { opacity: .55; }
:root[data-theme="light"] body[data-weather="storm"] .wx__cloud { opacity: .7; }
@keyframes wx-drift {
  from { transform: translateX(-22vw); }
  to   { transform: translateX(122vw); }
}

/* Regen/Schnee: duenne Striche bzw. Punkte, die nach unten fallen. */
.wx__drop {
  position: absolute;
  width: 1px; height: 16px;
  background: linear-gradient(180deg, rgba(174,196,224,0), rgba(174,196,224,.55));
  animation: wx-fall linear infinite;
  will-change: transform;
}
.wx__flake {
  position: absolute;
  width: 3px; height: 3px;
  border-radius: 50%;
  background: rgba(226,232,240,.7);
  animation: wx-fall linear infinite;
  will-change: transform;
}
:root[data-theme="light"] .wx__drop  { background: linear-gradient(180deg, rgba(90,115,150,0), rgba(90,115,150,.45)); }
:root[data-theme="light"] .wx__flake { background: rgba(140,160,190,.65); }
@keyframes wx-fall {
  from { transform: translateY(-12vh); }
  to   { transform: translateY(112vh); }
}

/* Bewegung ist Dekoration: bei reduzierter Bewegung bleibt nur die
   Faerbung, die Partikel verschwinden ganz. */
@media (prefers-reduced-motion: reduce) {
  .wx__cloud, .wx__drop, .wx__flake { display: none; }
}

/* Wetterzeile: Icon + Klartext. Der Hintergrund allein kann bei 10 %
   Deckkraft nie eindeutig sein — die Beschriftung traegt die Aussage,
   der Hintergrund nur die Stimmung. */
.sun__wx {
  display: flex; align-items: center; justify-content: center; gap: .45rem;
  font-size: .84rem; color: var(--text-secondary);
  margin-top: .35rem;
}
.sun__wx svg { width: 17px; height: 17px; flex: none; color: var(--text-primary); }
.sun__wx b { font-weight: 600; color: var(--text-primary); }
.sun__wx .dim { color: var(--text-muted); }

/* Himmelsstimmungen, gesetzt per data-sky auf <body> in app.js */
:root                     { --sky-opacity: .55; }
:root[data-theme="light"] { --sky-opacity: .38; }

/* Durchgehend bis unten. Vorher endeten die Verlaeufe auf `transparent`,
   dadurch schien die schwarze Grundflaeche durch und es entstand ein
   harter Uebergang ins Schwarze im unteren Drittel. */
body[data-sky="night"] { --sky: linear-gradient(180deg, #0a1430 0%, #101f42 45%, #16294f 100%); }
body[data-sky="dawn"]  { --sky: linear-gradient(180deg, #17264f 0%, #4a3a5e 40%, #a8623a 78%, #c47a45 100%); }
body[data-sky="day"]   { --sky: linear-gradient(180deg, #17406e 0%, #2a6ea8 45%, #4d95ca 100%); }
body[data-sky="dusk"]  { --sky: linear-gradient(180deg, #1a2145 0%, #543a55 40%, #b0603a 78%, #c9784a 100%); }

/* Helles Theme: eigene, luftige Verläufe statt der dunklen abgedimmt —
   abgedunkelte Nachtfarben auf hellem Grund wirken nur schmutzig. */
:root[data-theme="light"] body[data-sky="night"] { --sky: linear-gradient(180deg, #aab7d2 0%, #c9d2e2 50%, #dde3ed 100%); }
:root[data-theme="light"] body[data-sky="dawn"]  { --sky: linear-gradient(180deg, #b8c2e0 0%, #e2c6b0 55%, #f0d8c4 100%); }
:root[data-theme="light"] body[data-sky="day"]   { --sky: linear-gradient(180deg, #8fbbe6 0%, #c3dcf2 50%, #ddebf8 100%); }
:root[data-theme="light"] body[data-sky="dusk"]  { --sky: linear-gradient(180deg, #b6bad8 0%, #e8c6ae 55%, #f2d9c2 100%); }

h1, h2 { margin: 0; font-weight: 600; letter-spacing: -.01em; }
p { margin: 0; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(1rem, 3vw, 2rem);
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: -9999px;
  background: var(--surface-1); color: var(--text-primary);
  padding: .7rem 1rem; border-radius: var(--r-sm); z-index: 99;
}
.skip:focus { left: 1rem; top: 1rem; }

:focus-visible {
  outline: 2px solid var(--series-1);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ============================================================
   KOPFZEILE
   ============================================================ */
.top {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--plane) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.top__in {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
  padding-block: .9rem;
}
.top__id { display: flex; align-items: center; gap: .8rem; }
.top__mark {
  display: grid; place-items: center;
  width: 38px; height: 38px; flex: none;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--series-2);
}
.top__mark svg { width: 21px; height: 21px; }
.top__id h1 { font-size: 1.24rem; }
.top__sub { font-size: .8rem; color: var(--text-muted); }
.top__act { display: flex; align-items: center; gap: .6rem; }
.stamp { font-size: .8rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }

.iconbtn {
  display: grid; place-items: center;
  width: 34px; height: 34px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color .2s var(--e), border-color .2s var(--e);
}
.iconbtn:hover { color: var(--text-primary); border-color: var(--text-muted); }
.iconbtn svg { width: 17px; height: 17px; }
:root[data-theme="dark"]  .ic-sun  { display: block; }
:root[data-theme="dark"]  .ic-moon { display: none; }
:root[data-theme="light"] .ic-sun  { display: none; }
:root[data-theme="light"] .ic-moon { display: block; }

.errorbar {
  margin-top: 1rem;
  padding: .7rem 1rem;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--status-warning);
  font-size: .85rem;
  color: var(--text-secondary);
}

/* ============================================================
   ZUSTANDSBANNER — Farbe trägt nie allein, immer Icon + Text
   ============================================================ */
.banner {
  margin: 1.4rem 0;
  padding: .95rem 1.2rem;
  display: flex; align-items: center; gap: .9rem;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--surface-1);
  border-left: 3px solid var(--text-muted);
}
.banner[data-state="good"]     { border-left-color: var(--status-good); }
.banner[data-state="warning"]  { border-left-color: var(--status-warning); }
.banner[data-state="critical"] { border-left-color: var(--status-critical); }
/* "schläft" ist kein Fehler → bewusst neutral, keine Statusfarbe */
.banner[data-state="asleep"]   { border-left-color: var(--text-muted); }

.banner__icon { display: grid; place-items: center; flex: none; color: var(--text-muted); }
.banner__icon svg { width: 22px; height: 22px; }
.banner[data-state="good"]     .banner__icon { color: var(--status-good); }
.banner[data-state="warning"]  .banner__icon { color: var(--status-warning); }
.banner[data-state="critical"] .banner__icon { color: var(--status-critical); }

.banner__txt { display: flex; flex-direction: column; }
.banner__txt strong { font-weight: 600; font-size: .95rem; }
.banner__txt span { font-size: .84rem; color: var(--text-secondary); }

/* ============================================================
   SONNENBOGEN
   ============================================================ */
/* Die einzige halbtransparente Karte der Seite. Sie zeigt den Himmel —
   also darf das Wetter hier auch durchscheinen. Sie enthaelt bewusst
   keinen Chart: die 2px-Ringe an Endmarkern brauchen eine definierte
   Flaechenfarbe, hier gibt es keine. Der Blur haelt die Partikel weich
   genug, dass die Uhrzeiten darauf sicher lesbar bleiben. */
.suncard {
  background: color-mix(in srgb, var(--surface-1) 70%, transparent);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1rem 1.35rem .9rem;
  margin-bottom: 1rem;
}
.sun { display: flex; align-items: flex-end; gap: 1rem; }
.sun__edge {
  display: flex; flex-direction: column; align-items: center;
  flex: none; min-width: 62px; padding-bottom: .1rem;
}
.sun__t { font-size: .95rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.sun__l { font-size: .72rem; color: var(--text-muted); }
.sun__arc { flex: 1; height: 84px; min-width: 0; }
.sun__note {
  font-size: .8rem; color: var(--text-secondary);
  text-align: center; margin-top: .5rem;
}
@media (max-width: 480px) {
  .sun__arc { height: 66px; }
  .sun__edge { min-width: 54px; }
}

/* ============================================================
   HERO: Ringanzeige + Kacheln
   ============================================================ */
.hero {
  display: grid;
  grid-template-columns: minmax(230px, .8fr) 2fr;
  gap: 1rem;
  margin-bottom: 1rem;
}
@media (max-width: 820px) { .hero { grid-template-columns: 1fr; } }

.dial {
  position: relative;
  margin: 0;
  display: grid; place-items: center;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1.1rem;
}
.dial__svg { width: 100%; max-width: 230px; height: auto; display: block; }
.dial__track { stroke: var(--dial-track); stroke-width: 14; }
.dial__fill {
  stroke: var(--series-2);
  stroke-width: 14;
  transition: stroke-dashoffset .6s var(--e), stroke .3s var(--e);
}
/* Schläft: Ring bleibt sichtbar, aber zurückgenommen */
.dial[data-state="asleep"] .dial__fill { stroke: var(--text-muted); }

.dial__mid {
  position: absolute;
  top: 52%; left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  display: flex; flex-direction: column; align-items: center;
}
.dial__val {
  font-size: clamp(2.4rem, 5.5vw, 3.1rem);
  font-weight: 600; line-height: 1; letter-spacing: -.03em;
  display: flex; align-items: baseline; gap: .18em;
}
.dial__unit { font-size: .32em; font-weight: 500; color: var(--text-secondary); letter-spacing: 0; }
.dial__cap { font-size: .8rem; color: var(--text-muted); margin-top: .45rem; }

/* Feste 2×2-Anordnung. auto-fit brach je nach Breite in 3+1 um und
   liess eine Kachel verwaist stehen. */
.tiles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
/* Zweispaltig bis 360 px: bei 375/390 (iPhone SE / iPhone 14) passen zwei
   Kacheln bequem nebeneinander und sparen ~350 px Scrollweg. */
@media (max-width: 360px) { .tiles { grid-template-columns: 1fr; } }
.tile {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1.05rem 1.15rem;
  display: flex; flex-direction: column; justify-content: center;
}
.tile__k { font-size: .8rem; color: var(--text-secondary); margin-bottom: .3rem; }
.tile__v {
  font-size: 1.85rem; font-weight: 600; line-height: 1.1; letter-spacing: -.02em;
  display: flex; align-items: baseline; gap: .22em;
}
.tile--lead .tile__v { font-size: 2.25rem; }
.tile__u { font-size: .46em; font-weight: 500; color: var(--text-secondary); }
.tile__s { font-size: .76rem; color: var(--text-muted); margin-top: .25rem; }

/* Handy: Ring und Kacheln kompakter, sonst frisst das Hero den halben
   Bildschirm, bevor ueberhaupt eine Zahl kommt. */
@media (max-width: 560px) {
  .dial { padding: .7rem; }
  .dial__svg { max-width: 168px; }
  .dial__val { font-size: 2rem; }
  .dial__cap { font-size: .74rem; margin-top: .3rem; }
  .tile { padding: .8rem .85rem; }
  .tile__v { font-size: 1.45rem; }
  .tile--lead .tile__v { font-size: 1.6rem; }
  .tile__k { font-size: .74rem; }
  .tile__s { font-size: .7rem; }
  .hero, .tiles { gap: .7rem; }
  .card { padding: 1rem 1rem; }
}

/* ============================================================
   KARTEN & CHARTS
   ============================================================ */
.card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1.25rem 1.35rem;
  margin-bottom: 1rem;
}
.card__hd {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
  margin-bottom: 1rem;
}
.card__hd h2 { font-size: 1.02rem; }
.card__sub { font-size: .82rem; color: var(--text-muted); margin-top: .15rem; max-width: 60ch; }
.card__note { font-size: .82rem; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.yield-head {
  display: flex; flex-direction: column; align-items: flex-end;
  gap: .5rem;
}
.card__ft {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
  margin-top: .8rem;
}
.card__hint { font-size: .76rem; color: var(--text-muted); }

.chart { position: relative; width: 100%; height: 260px; }
.chart--bars { height: 210px; }
.chart.is-stale { opacity: .55; transition: opacity .2s var(--e); }
.chart__empty {
  display: grid; place-items: center;
  height: 100%;
  font-size: .85rem; color: var(--text-muted);
  text-align: center;
}
.chart svg { display: block; }
.bar-group { outline: none; }
.bar-group:focus-visible .bar { filter: brightness(1.18); }

.segmented {
  display: inline-flex;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 3px;
}
.segmented button {
  appearance: none; border: 0; background: none;
  color: var(--text-secondary);
  font: inherit; font-size: .8rem; font-weight: 500;
  padding: .35rem .8rem;
  border-radius: 99px;
  cursor: pointer;
  transition: background .2s var(--e), color .2s var(--e);
}
.segmented button:hover { color: var(--text-primary); }
.segmented button.is-active {
  background: var(--surface-1);
  color: var(--text-primary);
  box-shadow: 0 1px 3px rgba(0,0,0,.25);
}

@media (max-width: 560px) {
  .yield-head { width: 100%; align-items: stretch; }
  .yield-head .segmented { align-self: flex-start; }
  .yield-head .card__note { text-align: left; }
}

.legend { display: flex; gap: 1rem; flex-wrap: wrap; }
.legend__item {
  display: inline-flex; align-items: center; gap: .42rem;
  font-size: .8rem; color: var(--text-secondary);
}
.legend__key { width: 10px; height: 10px; border-radius: 3px; flex: none; }

.linkbtn {
  appearance: none; background: none; border: 0;
  color: var(--text-muted);
  font: inherit; font-size: .78rem;
  cursor: pointer; padding: .2rem 0;
  text-decoration: underline; text-underline-offset: 3px;
}
.linkbtn:hover { color: var(--text-primary); }

/* Tooltip */
.tip {
  position: absolute;
  pointer-events: none;
  opacity: 0;
  transition: opacity .12s var(--e);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: .5rem .65rem;
  font-size: .78rem;
  box-shadow: 0 6px 20px rgba(0,0,0,.32);
  white-space: nowrap;
  z-index: 5;
}
.tip.is-on { opacity: 1; }
.tip__time { color: var(--text-muted); margin-bottom: .3rem; font-variant-numeric: tabular-nums; }
.tip__row { display: flex; align-items: center; gap: .45rem; }
.tip__key { width: 9px; height: 9px; border-radius: 2px; flex: none; }
.tip__name { color: var(--text-secondary); }
.tip__val { margin-left: auto; font-weight: 600; font-variant-numeric: tabular-nums; }

/* Tabellen-Zwilling */
.tablewrap { margin-top: .9rem; max-height: 300px; overflow: auto; border-radius: var(--r-sm); }
.tablewrap table { width: 100%; border-collapse: collapse; font-size: .8rem; }
.tablewrap th, .tablewrap td {
  padding: .4rem .6rem; text-align: right;
  border-bottom: 1px solid var(--border);
  font-variant-numeric: tabular-nums;
}
.tablewrap th:first-child, .tablewrap td:first-child { text-align: left; }
.tablewrap thead th {
  position: sticky; top: 0;
  background: var(--surface-2);
  color: var(--text-secondary); font-weight: 500;
}

/* ============================================================
   AMORTISATION (Fortschritt gegen ein bekanntes Ziel → Meter)
   ============================================================ */
.meter__top {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1rem; margin-bottom: .45rem;
}
.meter__name { font-size: .88rem; color: var(--text-secondary); }
.meter__val {
  font-size: 1.15rem; font-weight: 600;
  font-variant-numeric: tabular-nums;
}
/* Spur bewusst neutral, NICHT der sequenzielle Blau-Ton: ein gesättigter
   Track liest sich als gefüllte Leiste. Die Füllung muss die einzige
   farbige Fläche sein. */
.meter__track {
  height: 12px;
  border-radius: 99px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  overflow: hidden;
}
.meter__fill {
  height: 100%;
  border-radius: 99px;
  background: var(--series-1);
  transition: width .6s var(--e);
}

/* ============================================================
   ANLAGEN-FAKTEN
   ============================================================ */
.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: .9rem 1.4rem;
  margin: 0;
}
.fact dt { font-size: .78rem; color: var(--text-muted); margin-bottom: .15rem; }
.fact dd { margin: 0; font-size: .92rem; font-weight: 500; }
.fact__value { display: block; font: inherit; color: inherit; }
.fact dd span { display: block; font-size: .78rem; font-weight: 400; color: var(--text-muted); }

.pill {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .82rem; font-weight: 500;
}
.pill svg { width: 14px; height: 14px; flex: none; }
.pill[data-state="good"]     { color: var(--status-good); }
.pill[data-state="critical"] { color: var(--status-critical); }
.pill[data-state="idle"]     { color: var(--text-muted); }

.foot {
  font-size: .78rem; color: var(--text-muted);
  margin: 1.6rem 0 2.4rem;
  max-width: 75ch;
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
