:root {
  --flaeche: #fcfcfb;
  --karte: #ffffff;
  --text: #0b0b0b;
  --text-sekundaer: #52514e;
  --text-dezent: #7a7974;
  --linie: #e4e3df;
  --akzent: #2a78d6;
  --serie: #2a78d6;
  --ok: #008300;
  --fehler: #e34948;
}
@media (prefers-color-scheme: dark) {
  :root {
    --flaeche: #1a1a19;
    --karte: #232322;
    --text: #ffffff;
    --text-sekundaer: #c3c2b7;
    --text-dezent: #93928b;
    --linie: #3a3a38;
    --akzent: #3987e5;
    --serie: #3987e5;
    --fehler: #e66767;
  }
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--flaeche);
  color: var(--text);
  line-height: 1.55;
}
.inhalt { max-width: 56rem; margin: 0 auto; padding: 0 1.25rem; }

.kopf { border-bottom: 1px solid var(--linie); padding: 1.6rem 0 1.2rem; }
.kopf h1 { margin: 0; font-size: 1.45rem; }
.kopf h1 a { color: var(--text); text-decoration: none; }
.untertitel { margin: 0.25rem 0 0; color: var(--text-sekundaer); }

main { padding: 1.5rem 1.25rem 2.5rem; }
section { margin-bottom: 2.2rem; }
h2 { font-size: 1.1rem; margin: 0 0 0.8rem; }
a { color: var(--akzent); }

.status p { margin: 0; }
.badge { font-size: 0.85rem; padding: 0.1rem 0.55rem; border-radius: 1rem; margin-left: 0.5rem; white-space: nowrap; }
.badge.ok { color: var(--ok); border: 1px solid currentColor; }
.badge.fehler { color: var(--fehler); border: 1px solid currentColor; }

/* Diagramm */
.chart { margin: 0; position: relative; background: var(--karte); border: 1px solid var(--linie); border-radius: 8px; padding: 0.6rem; }
.chart svg { display: block; width: 100%; height: auto; }
/* SVG-Elemente kennen das HTML-hidden-Attribut nicht — per CSS erzwingen */
.chart svg [hidden] { display: none; }
.grid { stroke: var(--linie); stroke-width: 1; }
.tick { fill: var(--text-dezent); font-size: 11px; }
.serie { stroke: var(--serie); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.punkt-fix, .punkt-hover { fill: var(--serie); stroke: var(--karte); stroke-width: 2; }
.direktlabel { fill: var(--text-sekundaer); font-size: 11px; font-weight: 600; }
.kreuz { stroke: var(--text-dezent); stroke-width: 1; stroke-dasharray: 3 3; }
.tooltip {
  position: absolute; transform: translateX(-50%);
  background: var(--text); color: var(--flaeche);
  font-size: 0.8rem; padding: 0.15rem 0.5rem; border-radius: 4px;
  pointer-events: none; white-space: nowrap;
}

/* Tabellen */
table { border-collapse: collapse; width: 100%; margin: 0.6rem 0; }
th, td { text-align: left; padding: 0.45rem 0.7rem; border-bottom: 1px solid var(--linie); font-size: 0.95rem; }
th { color: var(--text-sekundaer); font-weight: 600; }
td.zahl, th.zahl { text-align: right; font-variant-numeric: tabular-nums; }

details { margin: 0.8rem 0; }
summary { cursor: pointer; color: var(--text-sekundaer); }
.monatsliste { columns: 3; list-style: none; padding: 0.5rem 0 0; margin: 0; }
.monatsliste li { padding: 0.15rem 0; }
.dezent { color: var(--text-dezent); font-size: 0.85rem; }

/* Gerenderte Markdown-Inhalte */
.beschreibung { border-top: 1px solid var(--linie); padding-top: 1.5rem; }
.beschreibung h1 { font-size: 1.3rem; }
.beschreibung h2 { font-size: 1.05rem; margin-top: 1.6rem; }
.beschreibung h3 { font-size: 0.95rem; margin-top: 1.2rem; }
.beschreibung code { background: var(--karte); border: 1px solid var(--linie); border-radius: 3px; padding: 0 0.25rem; font-size: 0.85em; }
.beschreibung table { display: block; overflow-x: auto; }

.fuss { border-top: 1px solid var(--linie); padding-top: 1rem; padding-bottom: 2rem; color: var(--text-dezent); font-size: 0.85rem; }

@media (max-width: 40rem) { .monatsliste { columns: 2; } }
