:root {
  --bg: #f6f7f9; --flaeche: #fff; --text: #1b1f24; --leise: #5b6572; --rand: #d5d9df;
  --akzent: #1f5fbf; --akzent-text: #fff; --ok: #1d7a3c; --fehler: #b3261e; --hinweis: #8a5a00;
  --ok-bg: #e6f4ea; --fehler-bg: #fce8e6; --hinweis-bg: #fff4d6;
  --serie-1: #2a78d6; --serie-2: #eb6834; --serie-3: #1baf7a;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14171b; --flaeche: #1d2228; --text: #e6e9ed; --leise: #9aa4b0; --rand: #323a44;
    --akzent: #6aa4ff; --akzent-text: #0b1220; --ok: #6fd08c; --fehler: #ff8a80; --hinweis: #f2c14e;
    --ok-bg: #16301f; --fehler-bg: #3a1c1a; --hinweis-bg: #3a2f12;
    --serie-1: #3987e5; --serie-2: #d95926; --serie-3: #199e70;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 system-ui, sans-serif; }
header { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; padding: 12px 16px;
  background: var(--flaeche); border-bottom: 1px solid var(--rand); }
header .topic { color: var(--gedaempft, #667); font-size: 0.85em; font-family: monospace; }
header nav { display: flex; flex-wrap: wrap; gap: 4px 16px; }
header .rechts { margin-left: auto; display: flex; gap: 12px; align-items: center; }
main { max-width: 1000px; margin: 0 auto; padding: 16px; }
h1 { font-size: 1.5rem; margin: 8px 0 16px; }
h2 { font-size: 1.15rem; margin: 24px 0 8px; }
a { color: var(--akzent); }
.zahl { color: var(--leise); font-weight: 400; }
.mono { font-family: ui-monospace, Consolas, monospace; }
.klein, .hinweis-klein { color: var(--leise); font-size: .875rem; }
.tabelle { overflow-x: auto; background: var(--flaeche); border: 1px solid var(--rand); border-radius: 8px; }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--rand); vertical-align: middle; }
tr:last-child td, tr:last-child th { border-bottom: 0; }
th { color: var(--leise); font-weight: 600; font-size: .875rem; }
tr.inaktiv td { color: var(--leise); }
table.stand { background: var(--flaeche); border: 1px solid var(--rand); border-radius: 8px; }
table.stand th { width: 14rem; }
.diagramm-rahmen { margin: 0 0 16px; padding: 12px 16px; background: var(--flaeche); border: 1px solid var(--rand); border-radius: 8px; }
.diagramm-rahmen figcaption { color: var(--leise); font-size: .875rem; margin-bottom: 4px; }
svg.diagramm { display: block; width: 100%; height: auto; }
.dg-text { fill: var(--text); font-size: 13px; }
.dg-leise { fill: var(--leise); font-size: 12px; }
.dg-raster { stroke: var(--rand); stroke-width: 1; }
.dg-spur { fill: var(--rand); opacity: .45; }
.serie-1 { fill: var(--serie-1); }
.serie-2 { fill: var(--serie-2); }
.serie-3 { fill: var(--serie-3); }
a.sortierung { color: inherit; text-decoration: none; white-space: nowrap; }
a.sortierung:hover { text-decoration: underline; }
tfoot th { border-top: 1px solid var(--rand); color: var(--text); }
button, .knopf { font: inherit; padding: 8px 16px; border-radius: 6px; border: 1px solid var(--akzent);
  background: var(--akzent); color: var(--akzent-text); cursor: pointer; text-decoration: none; display: inline-block; }
button:disabled { opacity: .5; cursor: not-allowed; }
.knopf.zweit { background: transparent; color: var(--akzent); }
button.link { background: none; border: 0; padding: 0; color: var(--akzent); text-decoration: underline; }
button.warnung { background: var(--fehler); border-color: var(--fehler); color: var(--bg); }
button.schalter { padding: 2px 10px; font-size: .875rem; background: transparent; }
button.schalter.an { color: var(--ok); border-color: var(--ok); }
button.schalter.aus { color: var(--fehler); border-color: var(--fehler); }
.formular { display: flex; flex-direction: column; gap: 12px; background: var(--flaeche); border: 1px solid var(--rand);
  border-radius: 8px; padding: 16px; margin-bottom: 16px; }
.formular.schmal { max-width: 360px; }
.formular.gefahr { border-color: var(--fehler); }
label { display: flex; flex-direction: column; gap: 4px; font-size: .9rem; color: var(--leise); }
label.check { flex-direction: row; align-items: center; gap: 8px; color: var(--text); font-size: 1rem; }
input[type=text], input[type=password], input[type=date], input[type=datetime-local], select { font: inherit; padding: 8px; border: 1px solid var(--rand); border-radius: 6px;
  background: var(--bg); color: var(--text); width: 100%; }
fieldset { border: 1px solid var(--rand); border-radius: 6px; display: flex; flex-wrap: wrap; gap: 4px 20px; }
legend { color: var(--leise); font-size: .9rem; padding: 0 6px; }
.zeile { display: flex; flex-wrap: wrap; gap: 12px; }
.zeile > label { flex: 1 1 140px; }
.meldung { padding: 8px 12px; border-radius: 6px; margin: 8px 0; border: 1px solid transparent; }
.meldung.ok { background: var(--ok-bg); color: var(--ok); border-color: var(--ok); }
.meldung.fehler { background: var(--fehler-bg); color: var(--fehler); border-color: var(--fehler); }
.meldung.hinweis { background: var(--hinweis-bg); color: var(--hinweis); border-color: var(--hinweis); }
ul.diff { list-style: none; padding: 0; margin: 0 0 16px; }
ul.diff li { padding: 4px 8px; border-left: 4px solid var(--rand); margin-bottom: 4px; background: var(--flaeche); }
ul.diff li.hinzu { border-color: var(--ok); }
ul.diff li.weg { border-color: var(--fehler); }
ul.diff li.geaendert { border-color: var(--hinweis); }
@media (max-width: 600px) { main { padding: 12px; } }
.raster { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 0 16px; }
.raster table.stand th { width: 45%; }
code { font-family: ui-monospace, Consolas, monospace; font-size: .9em; }
