/* Stil fuer Anmeldung und Oberflaeche. Handy zuerst, ab 960 px Seitenleiste.
   Farbschema: dunkel als Grundlage, hell per prefers-color-scheme oder fest per data-thema="hell" | "dunkel" (Seite Konto).
   Die hellen Werte stehen zweimal (Medienabfrage und data-thema), ein Test prueft, dass beide gleich sind.
   Diagrammfarben aus der geprueften Palette (Validator in beiden Modi), Text nie in Reihenfarbe.
   Kartenflaeche = Diagrammflaeche (#1a1a19 dunkel, #fcfcfb hell), damit die Pruefung der Palette gilt. */

/* ============================================================== Farben und Masse */
:root {
  color-scheme: dark;
  --grund: #111110;
  --karte: #1a1a19;
  --karte-2: #232322;
  --karte-3: #2d2d2b;
  --erhoben: #242423;
  --rand: rgba(255, 255, 255, 0.09);
  --rand-stark: rgba(255, 255, 255, 0.17);
  --text-1: #f0efec;
  --text-2: #c3c2b7;
  --text-3: #9b998f;
  --akzent: #3987e5;
  --akzent-weich: rgba(57, 135, 229, 0.16);
  --link: #7db1f0;
  --gut: #0ca30c;
  --warn: #fab219;
  --ernst: #ec835a;
  --krit: #d03b3b;
  --gut-text: #4cc94c;
  --warn-text: #f5b733;
  --ernst-text: #f3a07f;
  --krit-text: #f58080;
  --gefahr-voll: #c23434;
  --gefahr-voll-hover: #a92b2b;
  --stoer: #a42e2e;
  --tip: #262625;
  --raster: #2c2c2a;
  --achse: #383835;
  --s1: #3987e5;
  --s2: #d95926;
  --s3: #199e70;
  --s4: #c98500;
  --s5: #d55181;
  --s6: #008300;
  --s7: #9085e9;
  --s8: #e66767;
  --ss: #6f6e68;
  --so: #93928a;
  --wash: 0.42;
  --w0: #232322;
  --w1: #0d366b;
  --w2: #184f95;
  --w3: #256abf;
  --w4: #3987e5;
  --w5: #6da7ec;
  --w6: #9ec5f4;
  --w7: #cde2fb;
  --luecke: #262624;
  --log: #141413;
  --leiste: rgba(23, 23, 22, 0.88);
  --schatten-karte: none;
  --schatten: 0 12px 32px rgba(0, 0, 0, 0.55);
  --abdunkeln: rgba(0, 0, 0, 0.6);
}

@media (prefers-color-scheme: light) {
  :root:not([data-thema="dunkel"]) {
    /* hell:anfang */
    color-scheme: light;
    --grund: #f2f2ef;
    --karte: #fcfcfb;
    --karte-2: #f2f1ed;
    --karte-3: #e8e7e1;
    --erhoben: #ffffff;
    --rand: rgba(11, 11, 11, 0.10);
    --rand-stark: rgba(11, 11, 11, 0.19);
    --text-1: #0b0b0b;
    --text-2: #4a4946;
    --text-3: #67665f;
    --akzent: #2a78d6;
    --akzent-weich: rgba(42, 120, 214, 0.12);
    --link: #1c5cab;
    --warn: #e9a000;
    --ernst: #e0703f;
    --gut-text: #006b00;
    --warn-text: #835400;
    --ernst-text: #a3431b;
    --krit-text: #b02727;
    --stoer: #a42e2e;
    --tip: #ffffff;
    --raster: #e1e0d9;
    --achse: #c3c2b7;
    --s1: #2a78d6;
    --s2: #eb6834;
    --s3: #1baf7a;
    --s4: #eda100;
    --s5: #e87ba4;
    --s6: #008300;
    --s7: #6250d6;
    --s8: #e34948;
    --ss: #7d7c75;
    --so: #b4b3a9;
    --wash: 0.32;
    --w0: #efeee9;
    --w1: #cde2fb;
    --w2: #9ec5f4;
    --w3: #6da7ec;
    --w4: #3987e5;
    --w5: #256abf;
    --w6: #184f95;
    --w7: #0d366b;
    --luecke: #ecebe6;
    --log: #f6f5f2;
    --leiste: rgba(252, 252, 251, 0.9);
    --schatten-karte: 0 1px 2px rgba(20, 20, 10, 0.04);
    --schatten: 0 12px 32px rgba(20, 20, 10, 0.16);
    --abdunkeln: rgba(20, 20, 10, 0.4);
    /* hell:ende */
  }
}

:root[data-thema="hell"] {
  /* hell:anfang */
  color-scheme: light;
  --grund: #f2f2ef;
  --karte: #fcfcfb;
  --karte-2: #f2f1ed;
  --karte-3: #e8e7e1;
  --erhoben: #ffffff;
  --rand: rgba(11, 11, 11, 0.10);
  --rand-stark: rgba(11, 11, 11, 0.19);
  --text-1: #0b0b0b;
  --text-2: #4a4946;
  --text-3: #67665f;
  --akzent: #2a78d6;
  --akzent-weich: rgba(42, 120, 214, 0.12);
  --link: #1c5cab;
  --warn: #e9a000;
  --ernst: #e0703f;
  --gut-text: #006b00;
  --warn-text: #835400;
  --ernst-text: #a3431b;
  --krit-text: #b02727;
  --stoer: #a42e2e;
  --tip: #ffffff;
  --raster: #e1e0d9;
  --achse: #c3c2b7;
  --s1: #2a78d6;
  --s2: #eb6834;
  --s3: #1baf7a;
  --s4: #eda100;
  --s5: #e87ba4;
  --s6: #008300;
  --s7: #6250d6;
  --s8: #e34948;
  --ss: #7d7c75;
  --so: #b4b3a9;
  --wash: 0.32;
  --w0: #efeee9;
  --w1: #cde2fb;
  --w2: #9ec5f4;
  --w3: #6da7ec;
  --w4: #3987e5;
  --w5: #256abf;
  --w6: #184f95;
  --w7: #0d366b;
  --luecke: #ecebe6;
  --log: #f6f5f2;
  --leiste: rgba(252, 252, 251, 0.9);
  --schatten-karte: 0 1px 2px rgba(20, 20, 10, 0.04);
  --schatten: 0 12px 32px rgba(20, 20, 10, 0.16);
  --abdunkeln: rgba(20, 20, 10, 0.4);
  /* hell:ende */
}

:root {
  --schrift: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --r-s: 8px;
  --r-m: 12px;
  --r-l: 16px;
  --abstand: 16px;
  --seitenleiste: 236px;
}

/* ============================================================== Grundlagen */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; background: var(--grund); }
body {
  margin: 0;
  background: var(--grund);
  color: var(--text-1);
  font: 15px/1.5 var(--schrift);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
[hidden] { display: none !important; }
a { color: var(--link); text-underline-offset: 2px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3, p, dl, dd, ul, ol, figure, pre { margin: 0; }
ul { padding: 0; list-style: none; }
code { font-family: var(--mono); font-size: 0.9em; overflow-wrap: anywhere; }
b, strong { font-weight: 600; }
button, input, select, textarea { font: inherit; color: inherit; }
button { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--akzent); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--akzent-weich); }
.still { color: var(--text-3); }
p.still { font-size: 13.5px; }
.wert { font-weight: 600; font-variant-numeric: tabular-nums; }
.unsichtbar {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* ============================================================== Symbole und Zustand */
.sym { width: 1em; height: 1em; flex: none; display: inline-block; vertical-align: -0.14em; }
.sym-linie { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.sym-voll { fill: currentColor; }
.sym-ring { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.sym-innen { fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sym-innen.hell { stroke: #fff; }
.sym-innen.dunkel { stroke: #0b0b0b; }
.z-gut { color: var(--gut); }
.z-warnung { color: var(--warn); }
.z-ernst { color: var(--ernst); }
.z-fehler { color: var(--krit); }
.z-aus, .z-neutral { color: var(--text-3); }
.marke { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); white-space: nowrap; }
.marke .sym { width: 15px; height: 15px; }
.marke code { font-size: 12.5px; }

/* Pille: Zustand mit Form, Text und Toenung, nie Farbe allein */
.pille {
  gap: 5px; min-height: 24px; padding: 2px 9px 2px 6px; border-radius: 999px; font-size: 12.5px; font-weight: 500; line-height: 1.3;
  background: var(--karte-2); box-shadow: inset 0 0 0 1px var(--rand); color: var(--text-2);
}
.pille .sym { width: 14px; height: 14px; }
.pille-gut { color: var(--gut-text); background: color-mix(in srgb, var(--gut) 12%, var(--karte)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gut) 26%, transparent); }
.pille-warnung { color: var(--warn-text); background: color-mix(in srgb, var(--warn) 13%, var(--karte)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--warn) 32%, transparent); }
.pille-ernst { color: var(--ernst-text); background: color-mix(in srgb, var(--ernst) 13%, var(--karte)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ernst) 32%, transparent); }
.pille-fehler { color: var(--krit-text); background: color-mix(in srgb, var(--krit) 13%, var(--karte)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--krit) 36%, transparent); }
.pille-aus, .pille-neutral { color: var(--text-2); }

/* ============================================================== Anmeldung */
.anmeldung { min-height: 100dvh; display: grid; place-items: center; padding: 16px; background: var(--grund); }
.anmeldung-karte {
  width: min(100%, 380px); background: var(--karte); border-radius: var(--r-l); padding: 28px 24px 24px;
  box-shadow: 0 0 0 1px var(--rand), var(--schatten-karte);
}
.anmeldung-karte h1 { font-size: 1.4rem; font-weight: 650; letter-spacing: -0.015em; margin-bottom: 18px; }
.anmeldung-meldung {
  color: var(--krit-text); font-size: 14px; margin-bottom: 14px; padding: 10px 12px; border-radius: var(--r-s);
  background: color-mix(in srgb, var(--krit) 10%, var(--karte)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--krit) 30%, transparent);
}
.anmeldung-meldung:empty { display: none; }
.anmeldung-karte form { display: grid; gap: 14px; }
.anmeldung-karte .knopf { width: 100%; justify-content: center; margin-top: 6px; min-height: 44px; }

/* ============================================================== Felder und Knoepfe */
.feld { display: grid; gap: 5px; font-size: 13px; font-weight: 500; color: var(--text-2); min-width: 0; }
.feld input, .feld select {
  width: 100%; min-width: 0; min-height: 42px; padding: 8px 11px; color: var(--text-1); font-size: 16px; font-weight: 400;
  background: var(--karte); border: 1px solid var(--rand-stark); border-radius: var(--r-s);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.feld select { padding-right: 30px; }
.feld input:hover, .feld select:hover { border-color: var(--text-3); }
.feld input:focus-visible, .feld select:focus-visible { outline: none; border-color: var(--akzent); box-shadow: 0 0 0 3px var(--akzent-weich); }
@media (min-width: 960px) { .feld input, .feld select { font-size: 14.5px; min-height: 38px; } }

.knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; padding: 7px 14px;
  font-size: 14px; font-weight: 550; line-height: 1.2; white-space: nowrap;
  color: var(--text-1); background: var(--karte); border: 1px solid var(--rand-stark); border-radius: var(--r-s);
  text-decoration: none; cursor: pointer; transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.knopf:hover { background: var(--karte-2); text-decoration: none; }
.knopf:active { background: var(--karte-3); }
.knopf:disabled { opacity: 0.5; cursor: not-allowed; }
.knopf .sym { width: 16px; height: 16px; }
.knopf.klein { min-height: 34px; padding: 5px 11px; font-size: 13px; }
.knopf.klein .sym { width: 14px; height: 14px; }
/* Hauptknopf: ruhig umgekehrt, Text in Hintergrundfarbe */
.knopf.haupt { background: var(--text-1); color: var(--karte); border-color: transparent; }
.knopf.haupt:hover { background: var(--text-2); }
.knopf.haupt:disabled { background: var(--karte-3); color: var(--text-3); opacity: 1; }
/* Gefaehrlich: rot umrandet, im Dialog als Bestaetigung voll rot */
.knopf.knopf-gefahr { color: var(--krit-text); border-color: color-mix(in srgb, var(--krit) 55%, transparent); background: color-mix(in srgb, var(--krit) 7%, var(--karte)); }
.knopf.knopf-gefahr:hover:not(:disabled) { background: color-mix(in srgb, var(--krit) 14%, var(--karte)); }
.knopf.haupt.knopf-gefahr:not(:disabled) { background: var(--gefahr-voll); color: #fff; border-color: transparent; }
.knopf.haupt.knopf-gefahr:not(:disabled):hover { background: var(--gefahr-voll-hover); }
.knopf.haupt.knopf-gefahr:disabled { color: var(--text-3); border-color: transparent; background: var(--karte-3); }
.knopf-still { color: var(--text-2); }
.textknopf {
  padding: 0; background: none; border: 0; color: var(--link); text-decoration: underline; text-underline-offset: 2px;
  cursor: pointer; font-size: inherit; font-weight: 500;
}
.knopfreihe { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.haken { display: flex; gap: 10px; align-items: center; min-height: 36px; font-size: 14px; cursor: pointer; }
.haken input { width: 18px; height: 18px; flex: none; margin: 0; accent-color: var(--krit); }
.haken-klein { font-size: 13.5px; color: var(--text-2); padding: 0 2px; }
.haken-klein input { accent-color: var(--akzent); }

/* ============================================================== Rahmen der Anwendung */
.sprunglink {
  position: fixed; left: 8px; top: 8px; z-index: 60; padding: 10px 14px; background: var(--erhoben); color: var(--text-1);
  border-radius: var(--r-s); box-shadow: var(--schatten); transform: translateY(-160%);
}
.sprunglink:focus { transform: none; }
.rahmen { min-height: 100dvh; }
.spalte { min-width: 0; }

/* Handy: oben eine schmale Kopfzeile, unten die Leiste */
.kopfleiste {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 52px; padding: env(safe-area-inset-top) 16px 0;
}
.marke-name { display: inline-flex; align-items: center; gap: 10px; color: var(--text-1); font-weight: 650; font-size: 16px; letter-spacing: -0.01em; text-decoration: none; }
.marke-name:hover { text-decoration: none; }
.marke-name img { display: block; border-radius: 7px; }
.kopf-stand { color: var(--text-3); font-size: 12.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }

.haupt-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex;
  background: var(--leiste); border-top: 1px solid var(--rand);
  -webkit-backdrop-filter: blur(16px) saturate(1.4); backdrop-filter: blur(16px) saturate(1.4);
  padding: 0 max(4px, env(safe-area-inset-right)) env(safe-area-inset-bottom) max(4px, env(safe-area-inset-left));
}
.haupt-nav a, .haupt-nav button {
  position: relative; flex: 1 1 0; min-width: 0; min-height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  padding: 6px 0 5px; font-size: 11px; font-weight: 500; line-height: 1.2; color: var(--text-3); text-decoration: none;
  background: none; border: 0; cursor: pointer;
}
.haupt-nav a::before, .haupt-nav button::before {
  content: ""; position: absolute; top: 0; left: 50%; width: 28px; height: 2px; margin-left: -14px; border-radius: 0 0 2px 2px; background: transparent;
}
.haupt-nav [aria-current="page"], .haupt-nav button.aktiv { color: var(--text-1); }
.haupt-nav [aria-current="page"]::before, .haupt-nav button.aktiv::before { background: var(--akzent); }
.haupt-nav .nav-mehr { display: none; }
.nav-symbol { display: block; width: 22px; height: 22px; flex: none; }
.nav-symbol .sym { width: 22px; height: 22px; display: block; }
.nav-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.nav-zahl {
  min-width: 17px; height: 17px; padding: 0 5px; border-radius: 9px; font-size: 10.5px; font-weight: 650; line-height: 17px; text-align: center;
  background: var(--krit); color: #fff; font-variant-numeric: tabular-nums;
}
.nav-zahl.pflege-zahl { background: var(--warn); color: #0b0b0b; }
.haupt-nav .nav-zahl { position: absolute; top: 4px; left: calc(50% + 6px); }

.mehr-menue {
  position: fixed; right: 8px; bottom: calc(64px + env(safe-area-inset-bottom)); z-index: 31; width: 216px; padding: 6px;
  background: var(--erhoben); border-radius: var(--r-m); box-shadow: var(--schatten), 0 0 0 1px var(--rand);
}
.mehr-menue a {
  display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 8px 10px; color: var(--text-1); text-decoration: none; border-radius: var(--r-s); font-size: 14.5px;
}
.mehr-menue a:hover { background: var(--karte-2); }
.mehr-menue a[aria-current="page"] { background: var(--akzent-weich); }
.mehr-menue .nav-symbol, .mehr-menue .nav-symbol .sym { width: 19px; height: 19px; color: var(--text-2); }
.mehr-menue .nav-zahl { margin-left: auto; }

/* Baender unter der Kopfzeile */
.stoerband {
  position: sticky; top: 0; z-index: 25; display: flex; gap: 10px; align-items: flex-start; padding: 11px 16px; font-size: 14px; font-weight: 500;
  color: #fff; background: var(--stoer);
}
.stoerband .sym { width: 18px; height: 18px; margin-top: 1px; color: #fff; }
.stoerband .sym-innen.hell { stroke: var(--stoer); }
.band-still { display: flex; gap: 8px; align-items: center; padding: 8px 16px; font-size: 13.5px; color: var(--text-2); background: var(--karte-2); border-bottom: 1px solid var(--rand); }
.laufend { display: grid; gap: 1px; background: var(--rand); border-bottom: 1px solid var(--rand); }
.job-chip { display: flex; align-items: center; gap: 10px; padding: 9px 16px; font-size: 13.5px; background: var(--karte); }
.job-chip .sym { width: 16px; height: 16px; }
.job-chip-text { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

main { display: block; padding: 8px var(--abstand) calc(96px + env(safe-area-inset-bottom)); outline: none; max-width: 1240px; margin: 0 auto; }

/* ============================================================== Seite, Abschnitte, Karten */
.seite { display: grid; gap: 24px; min-width: 0; }
.seite > * { min-width: 0; }
.seite-inhalt { display: grid; gap: 24px; min-width: 0; }
.seite-inhalt > * { min-width: 0; }
.seiten-kopf { display: grid; gap: 4px; }
.seite-titel { font-size: 1.6rem; font-weight: 650; letter-spacing: -0.02em; line-height: 1.2; text-wrap: balance; }
.seite-unter { font-size: 14px; color: var(--text-2); max-width: 72ch; }
.seite-hinweis { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--text-2); }
.seite-hinweis .sym { width: 18px; height: 18px; margin-top: 1px; }
.seite-hinweis .kreisel { margin-top: 2px; }
/* Hinweisband im Inhalt: getoent nach Zustand, immer mit Symbol */
.hinweiskasten {
  padding: 12px 14px; border-radius: var(--r-m); color: var(--text-1); background: var(--karte); box-shadow: 0 0 0 1px var(--rand), var(--schatten-karte);
}
.hinweiskasten-gut { background: color-mix(in srgb, var(--gut) 8%, var(--karte)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gut) 28%, transparent); }
.hinweiskasten-warnung { background: color-mix(in srgb, var(--warn) 9%, var(--karte)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--warn) 34%, transparent); }
.hinweiskasten-fehler { background: color-mix(in srgb, var(--krit) 9%, var(--karte)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--krit) 36%, transparent); }
.hinweiskasten-info { background: var(--akzent-weich); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--akzent) 34%, transparent); }
.flaeche-karte.hinweis-karte { display: grid; gap: 4px; box-shadow: inset 3px 0 0 var(--warn), 0 0 0 1px var(--rand), var(--schatten-karte); }
.flaeche-karte.hinweis-karte-fehler { box-shadow: inset 3px 0 0 var(--krit), 0 0 0 1px var(--rand), var(--schatten-karte); }
.abschnitt { display: grid; gap: 12px; min-width: 0; align-content: start; }
.abschnitt > * { min-width: 0; }
.abschnitt-titel { display: flex; align-items: center; gap: 8px; font-size: 1.05rem; font-weight: 650; letter-spacing: -0.01em; line-height: 1.3; }
.abschnitt-titel .sym { width: 17px; height: 17px; }
.abschnitt-info { font-size: 13.5px; color: var(--text-2); max-width: 80ch; }
.abschnitt-info .sym { width: 15px; height: 15px; }
.flaeche-karte {
  background: var(--karte); border-radius: var(--r-m); padding: 16px; box-shadow: 0 0 0 1px var(--rand), var(--schatten-karte); min-width: 0;
}
.stand { font-size: 12.5px; color: var(--text-3); }

/* Leere Zustaende und Laden */
.leer {
  display: flex; gap: 10px; align-items: center; color: var(--text-2); font-size: 14px; padding: 16px; background: var(--karte);
  border-radius: var(--r-m); box-shadow: inset 0 0 0 1px var(--rand); border: 1px dashed var(--rand-stark);
}
.lade { border-style: solid; border-color: transparent; color: var(--text-3); }
.kreisel {
  flex: none; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--rand-stark); border-top-color: var(--akzent);
  animation: drehen 0.9s linear infinite;
}
@keyframes drehen { to { transform: rotate(360deg); } }
.lauf-text { animation: atmen 1.8s ease-in-out infinite; }
@keyframes atmen { 50% { opacity: 0.55; } }

/* Springe-zu-Leiste */
.sprung { display: flex; gap: 6px; overflow-x: auto; margin: -8px calc(-1 * var(--abstand)); padding: 2px var(--abstand); scrollbar-width: none; }
.sprung::-webkit-scrollbar { display: none; }
.sprung:empty { display: none; }
.sprung button {
  flex: none; min-height: 34px; padding: 4px 12px; font-size: 13px; font-weight: 500; color: var(--text-2);
  background: var(--karte-3); border: 0; border-radius: var(--r-s); cursor: pointer;
}
.sprung button:hover { color: var(--text-1); background: color-mix(in srgb, var(--text-1) 12%, var(--karte-3)); }

/* ============================================================== Uebersicht: Lage und Aufmerksamkeit */
.held {
  position: relative; overflow: hidden; padding: 18px 16px; border-radius: var(--r-l); background: var(--karte);
  box-shadow: 0 0 0 1px var(--rand), var(--schatten-karte);
}
.held::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--gut); }
.held-warnung::before { background: var(--warn); }
.held-fehler::before { background: var(--krit); }
.held-laedt::before { background: var(--rand-stark); }
.held-kopf { display: flex; gap: 12px; align-items: flex-start; }
.held-kopf > .sym { width: 28px; height: 28px; margin-top: 1px; }
.held-satz { font-size: clamp(1.2rem, 1.02rem + 0.9vw, 1.6rem); line-height: 1.25; font-weight: 650; letter-spacing: -0.018em; text-wrap: pretty; }
.held-unter { font-size: 13.5px; color: var(--text-2); margin-top: 4px; }
.aufmerksam { display: grid; gap: 0 28px; margin: 14px -6px 0; }
.aufmerksam-titel { margin: 16px 0 2px; font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-3); }
.aufmerksam-zeile {
  display: grid; grid-template-columns: 18px minmax(0, 1fr) 16px; gap: 10px; align-items: start; padding: 10px 6px; border-radius: var(--r-s);
  color: var(--text-2); font-size: 14px; text-decoration: none; border-top: 1px solid var(--rand);
}
li:first-child > .aufmerksam-zeile { border-top: 0; }
a.aufmerksam-zeile:hover { background: var(--karte-2); text-decoration: none; }
.aufmerksam-zeile > .sym { width: 18px; height: 18px; margin-top: 1px; }
.aufmerksam-zeile > .sym.pfeil { width: 16px; height: 16px; margin-top: 2px; color: var(--text-3); }
.aufmerksam-text { min-width: 0; overflow-wrap: anywhere; }
.aufmerksam-text b { display: block; color: var(--text-1); font-weight: 600; }
.held-fuss { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 12px; font-size: 13px; color: var(--text-3); }
.held-fuss .sym { width: 14px; height: 14px; }
.hinweis { display: inline-flex; gap: 6px; align-items: center; }

/* ============================================================== Kacheln mit Kennzahlen */
.kacheln { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.kachel {
  background: var(--karte); padding: 13px 14px 14px; min-width: 0; display: flex; flex-direction: column; gap: 2px;
  border-radius: var(--r-m); box-shadow: 0 0 0 1px var(--rand), var(--schatten-karte);
}
.kachel:last-child:nth-child(odd) { grid-column: 1 / -1; }
.kachel-titel { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 500; color: var(--text-2); }
.kachel-titel .sym { width: 14px; height: 14px; }
.kachel-wert { font-size: 1.45rem; font-weight: 650; letter-spacing: -0.02em; line-height: 1.2; font-variant-numeric: tabular-nums; }
.kachel-zusatz { display: grid; gap: 1px; font-size: 12.5px; color: var(--text-3); margin-top: 4px; line-height: 1.4; }
.kachel-zusatz .marke { font-size: 12.5px; }
.netzwert { display: grid; font-size: 0.68em; line-height: 1.35; font-weight: 500; letter-spacing: 0; color: var(--text-2); }
.netzwert b { color: var(--text-1); font-weight: 650; }
.meter { height: 6px; margin-top: 8px; border-radius: 3px; color: var(--akzent); background: color-mix(in srgb, currentColor 18%, transparent); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 3px; background: currentColor; transition: width 0.6s ease; }
.meter-warn { color: var(--warn); }
.meter-krit { color: var(--krit); }
.meter-schmal { margin: 0; }

/* ============================================================== Projektkarten */
.karten { display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); }
.karte {
  position: relative; display: flex; flex-direction: column; gap: 10px; padding: 14px 16px 12px; background: var(--karte);
  border-radius: var(--r-m); box-shadow: 0 0 0 1px var(--rand), var(--schatten-karte); transition: box-shadow 0.15s;
}
.karte:hover { box-shadow: 0 0 0 1px var(--rand-stark), var(--schatten-karte); }
.karte::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; border-radius: 0 3px 3px 0; background: transparent; }
.karte-fehler::before { background: var(--krit); }
.karte-warnung::before { background: var(--warn); }
.karte-aus { background: color-mix(in srgb, var(--karte) 60%, var(--grund)); }
.karte-kopf { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.karte-titel { display: grid; gap: 0; min-width: 0; }
.karte-name { color: var(--text-1); font-weight: 650; font-size: 15.5px; letter-spacing: -0.01em; text-decoration: none; min-width: 0; overflow-wrap: anywhere; }
.karte-name:hover { text-decoration: none; }
.karte-name:focus-visible { outline: none; }
.karte-name::after { content: ""; position: absolute; inset: 0; border-radius: var(--r-m); }
.karte-name:focus-visible::after { outline: 2px solid var(--akzent); outline-offset: 2px; }
.karte-art { font-size: 12.5px; color: var(--text-3); }
.karte-kopf .pille { flex: none; }
.karte-grund { font-size: 13.5px; color: var(--text-1); overflow-wrap: anywhere; }
.karte-zahlen { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; padding: 10px 0 0; border-top: 1px solid var(--rand); }
.karte-zahlen dt { font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.karte-zahlen dd { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.karte-kennzahlen { display: grid; gap: 3px; font-size: 13px; color: var(--text-2); }
.karte-kennzahlen li { display: flex; justify-content: space-between; gap: 10px; }
.karte-kennzahlen b { color: var(--text-1); display: inline-flex; gap: 5px; align-items: center; text-align: right; }
.karte-kennzahlen .sym { width: 14px; height: 14px; }
.karte-marken { display: flex; flex-wrap: wrap; gap: 6px; }
.minimarke { display: inline-flex; gap: 5px; align-items: center; font-size: 12.5px; color: var(--text-2); }
.minimarke .sym { width: 14px; height: 14px; }
.karte-sicherheit {
  position: relative; z-index: 1; display: inline-flex; gap: 7px; align-items: center; align-self: flex-start; min-height: 30px; padding: 4px 10px;
  font-size: 13px; font-weight: 600; color: var(--ernst-text); text-decoration: none; border-radius: var(--r-s);
  background: color-mix(in srgb, var(--ernst) 11%, var(--karte)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ernst) 30%, transparent);
}
.karte-sicherheit .sym { width: 15px; height: 15px; }
.karte-sicherheit:hover { text-decoration: underline; }
.karte-fuss { position: relative; z-index: 1; margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.karte-domains { flex: 1 1 140px; min-width: 0; font-size: 12.5px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.karte-knoepfe { display: flex; gap: 6px; margin-left: auto; }
.karte-knoepfe .knopf { min-height: 32px; padding: 4px 10px; }
.unverschluesselt { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--warn-text); white-space: nowrap; }
.unverschluesselt .sym { width: 12px; height: 12px; }

/* ============================================================== Einfache Listen */
.einfachliste { display: grid; gap: 0; }
.einfachliste li { display: flex; gap: 10px; align-items: flex-start; padding: 9px 0; border-bottom: 1px solid var(--rand); font-size: 14px; }
.einfachliste li:last-child { border-bottom: 0; }
.einfachliste + .einfachliste { border-top: 1px solid var(--rand); }
.einfachliste .sym { width: 16px; height: 16px; margin-top: 2px; }
.liste-haupt { display: grid; gap: 1px; flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.liste-neben { font-size: 13px; color: var(--text-3); overflow-wrap: anywhere; }
.einfachliste .textknopf { font-size: 13.5px; }

/* ============================================================== Tabellen, wo es eng wird Karten
   Ob eine Tabelle als Karten erscheint, entscheidet die Breite ihres Platzes (Container-Abfrage), nicht die des Fensters:
   So wird auch eine Tabelle in einer halben Spalte am Desktop zu Karten. Breite Tabellen (Klasse breit) schon unter 900 px. */
.tabelle-rahmen { min-width: 0; container-type: inline-size; }
.tabelle-flaeche { background: var(--karte); border-radius: var(--r-m); box-shadow: 0 0 0 1px var(--rand), var(--schatten-karte); overflow-x: auto; }
.tabelle { width: 100%; border-collapse: collapse; font-size: 14px; }
.tabelle th {
  font-size: 12px; font-weight: 600; color: var(--text-3); text-align: left; padding: 10px 12px; white-space: nowrap;
  letter-spacing: 0.02em; border-bottom: 1px solid var(--rand);
}
.tabelle td { padding: 11px 12px; border-top: 1px solid var(--rand); vertical-align: top; overflow-wrap: anywhere; }
.tabelle tbody tr:first-child td { border-top: 0; }
.tabelle .rechts { text-align: right; }
.tabelle td.rechts { font-variant-numeric: tabular-nums; white-space: nowrap; }
.tabelle td > .wert, .tabelle td > .still { white-space: nowrap; }
.tabelle .wert { font-weight: 550; }
.sortknopf { display: inline-flex; gap: 2px; align-items: center; padding: 4px 0; background: none; border: 0; color: inherit; font: inherit; letter-spacing: inherit; cursor: pointer; white-space: nowrap; }
.sortknopf:hover { color: var(--text-1); }
th[aria-sort] .sortknopf { color: var(--text-1); }
.sortpfeil { color: var(--akzent); }
.tabelle tbody tr:hover td { background: color-mix(in srgb, var(--karte-2) 55%, transparent); }
.tabelle th:first-child, .tabelle td:first-child { padding-left: 16px; }
.tabelle th:last-child, .tabelle td:last-child { padding-right: 16px; }
@container (max-width: 559px) {
  .tabelle-flaeche.als-karten { background: none; box-shadow: none; overflow: visible; border-radius: 0; }
  .tabelle.als-karten, .tabelle.als-karten tbody { display: block; }
  .tabelle.als-karten thead { display: none; }
  .tabelle.als-karten tr {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 10px 12px; padding: 13px 14px; margin-bottom: 8px;
    background: var(--karte); border-radius: var(--r-m); box-shadow: 0 0 0 1px var(--rand), var(--schatten-karte);
  }
  .tabelle.als-karten tr:last-child { margin-bottom: 0; }
  .tabelle.als-karten td, .tabelle.als-karten tbody tr:hover td { display: block; padding: 0; border: 0; text-align: left; min-width: 0; width: auto; white-space: normal; background: none; }
  .tabelle.als-karten td.kopfzelle, .tabelle.als-karten td.ganz, .tabelle.als-karten td.schmal-breit { grid-column: 1 / -1; }
  .tabelle.als-karten td.schmal-weg { display: none; }
  .tabelle.als-karten td .wert, .tabelle.als-karten td .still { white-space: normal; }
  .tabelle.als-karten td.ganz:empty, .tabelle.als-karten td.ganz:has(> .knopfreihe:empty) { display: none; }
  .tabelle.als-karten td[data-titel]::before {
    content: attr(data-titel); display: block; font-size: 12px; color: var(--text-3); margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
}
@container (max-width: 899px) {
  .tabelle-flaeche.als-karten.breit { background: none; box-shadow: none; overflow: visible; border-radius: 0; }
  .tabelle.als-karten.breit, .tabelle.als-karten.breit tbody { display: block; }
  .tabelle.als-karten.breit thead { display: none; }
  .tabelle.als-karten.breit tr {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 10px 12px; padding: 13px 14px; margin-bottom: 8px;
    background: var(--karte); border-radius: var(--r-m); box-shadow: 0 0 0 1px var(--rand), var(--schatten-karte);
  }
  .tabelle.als-karten.breit tr:last-child { margin-bottom: 0; }
  .tabelle.als-karten.breit td, .tabelle.als-karten.breit tbody tr:hover td { display: block; padding: 0; border: 0; text-align: left; min-width: 0; width: auto; white-space: normal; background: none; }
  .tabelle.als-karten.breit td.kopfzelle, .tabelle.als-karten.breit td.ganz, .tabelle.als-karten.breit td.schmal-breit { grid-column: 1 / -1; }
  .tabelle.als-karten.breit td.schmal-weg { display: none; }
  .tabelle.als-karten.breit td .wert, .tabelle.als-karten.breit td .still { white-space: normal; }
  .tabelle.als-karten.breit td.ganz:empty, .tabelle.als-karten.breit td.ganz:has(> .knopfreihe:empty) { display: none; }
  .tabelle.als-karten.breit td[data-titel]::before {
    content: attr(data-titel); display: block; font-size: 12px; color: var(--text-3); margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
}
@media (min-width: 1200px) { .nur-schmal-feld { display: none; } }
.dienst-kopf { display: grid; gap: 4px; justify-items: start; }
.dienst-name { font-size: 13px; font-weight: 600; color: var(--text-1); }
.dienst-rolle { font-size: 13px; color: var(--text-3); }
details > summary { list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details > summary::before {
  content: ""; display: inline-block; width: 6px; height: 6px; margin: 0 9px 2px 2px; flex: none;
  border-right: 1.6px solid var(--text-3); border-bottom: 1.6px solid var(--text-3); transform: rotate(-45deg); transition: transform 0.15s;
}
details[open] > summary::before { transform: rotate(45deg); margin-bottom: 4px; }
.dienst-mehr summary { display: inline-flex; align-items: center; min-height: 34px; padding: 4px 8px; color: var(--text-2); font-size: 13px; cursor: pointer; border-radius: var(--r-s); }
.dienst-mehr summary:hover { background: var(--karte-2); }
.dienst-mehr[open] { flex-basis: 100%; }
.dienst-details { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 3px 12px; font-size: 13px; padding: 6px 0 2px; }
.dienst-details dt { color: var(--text-3); }
.dienst-details dd { overflow-wrap: anywhere; }
.port-kopf { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.port-nummer { font-weight: 600; font-size: 14px; }
.res-kopf { display: grid; gap: 2px; min-width: 0; }
.res-kopf a { font-weight: 600; color: var(--text-1); text-decoration: none; }
.res-kopf a:hover { text-decoration: underline; }
.res-kopf .dienst-rolle a { font-weight: 400; color: var(--text-2); text-decoration: underline; text-decoration-color: var(--achse); }
.res-balken { height: 4px; margin-top: 4px; background: var(--karte-3); border-radius: 2px; overflow: hidden; }
.res-balken i { display: block; height: 100%; background: var(--akzent); border-radius: 0 2px 2px 0; transition: width 0.4s ease; }
@container (min-width: 900px) {
  .ressourcen td.kopfzelle { min-width: 180px; }
  .ressourcen th, .ressourcen td { padding-left: 8px; padding-right: 8px; }
  .dienste td.kopfzelle { min-width: 190px; }
  .dienste td.dienst-knoepfe { width: 1%; min-width: 196px; }
  .dienste th, .dienste td { padding-left: 9px; padding-right: 9px; }
  .dienste .knopfreihe { gap: 6px; }
}

/* ============================================================== Regler (Segmente) */
.verlauf { display: grid; gap: 12px; min-width: 0; }
.verlauf > * { min-width: 0; }
.regler { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.segment { display: flex; flex: 1 1 100%; padding: 3px; gap: 2px; background: var(--karte-2); border-radius: var(--r-s); box-shadow: inset 0 0 0 1px var(--rand); }
.segment button {
  flex: 1 1 auto; min-width: 0; min-height: 34px; padding: 4px 10px; font-size: 13px; font-weight: 500; color: var(--text-2);
  background: none; border: 0; border-radius: 6px; cursor: pointer; white-space: nowrap; transition: background 0.15s, color 0.15s;
}
.segment button:hover { color: var(--text-1); }
.segment button[aria-checked="true"] { background: var(--karte); color: var(--text-1); font-weight: 600; box-shadow: 0 0 0 1px var(--rand-stark), 0 1px 2px rgba(0, 0, 0, 0.12); }
.segment .sym { width: 15px; height: 15px; }
/* Kurzwort am Handy: Das lange Wort bleibt fuer Bildschirmleser da, das kurze ist nur zu sehen */
.nur-breit { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.nur-schmal { display: inline; }
.nur-schmal-feld { flex: 1 1 100%; }
@media (max-width: 359px) { .segment button { padding: 4px 6px; font-size: 12.5px; } }

/* ============================================================== Diagramme */
.diagramm { background: var(--karte); border-radius: var(--r-l); padding: 16px 14px 14px; box-shadow: 0 0 0 1px var(--rand), var(--schatten-karte); display: grid; gap: 12px; min-width: 0; }
.diagramm > * { min-width: 0; }
.dia-kopf { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.dia-titel { font-size: 1.02rem; font-weight: 650; letter-spacing: -0.01em; }
.dia-unter { font-size: 12.5px; color: var(--text-3); line-height: 1.4; margin-top: 2px; }
.dia-kopf .knopf { flex: none; }
.kennreihe { display: flex; flex-wrap: wrap; gap: 10px 26px; }
.flaeche-karte > .kennreihe { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 14px 20px; }
.kennwert { min-width: 0; }
.kennwert-titel { display: flex; align-items: center; gap: 0; font-size: 12.5px; color: var(--text-3); }
.kennwert-wert { font-size: 1.15rem; font-weight: 650; letter-spacing: -0.012em; display: flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; }
.kennwert-wert .sym { width: 16px; height: 16px; }
.kennwert-zusatz { font-size: 12.5px; color: var(--text-3); }
.plot { position: relative; min-height: 250px; touch-action: pan-y; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; border-radius: 4px; transition: opacity 0.2s; }
.plot.laedt { opacity: 0.55; }
.plot-waerme { min-height: 120px; cursor: crosshair; }
.plot svg { display: block; max-width: 100%; overflow: visible; }
.zeichnung { position: relative; }
.plot-leer { position: absolute; inset: 0; display: grid; place-items: center; padding: 16px; text-align: center; color: var(--text-2); font-size: 14px; }
.raster { stroke: var(--raster); stroke-width: 1; shape-rendering: crispEdges; }
.grundlinie { stroke: var(--achse); stroke-width: 1; shape-rendering: crispEdges; }
.y-text, .x-text, .spur-text { font-size: 11px; fill: var(--text-3); font-variant-numeric: tabular-nums; font-family: var(--schrift); }
.y-text, .spur-text { paint-order: stroke; stroke: var(--karte); stroke-opacity: 0.9; stroke-width: 3px; stroke-linejoin: round; }
.band { fill-opacity: var(--wash); stroke: none; }
.kante { fill: none; stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
.band-text { font-size: 11.5px; font-weight: 500; fill: var(--text-1); paint-order: stroke; stroke: var(--karte); stroke-opacity: 0.75; stroke-width: 3px; stroke-linejoin: round; font-family: var(--schrift); }
.band.r1 { fill: var(--s1); } .kante.r1 { stroke: var(--s1); }
.band.r2 { fill: var(--s2); } .kante.r2 { stroke: var(--s2); }
.band.r3 { fill: var(--s3); } .kante.r3 { stroke: var(--s3); }
.band.r4 { fill: var(--s4); } .kante.r4 { stroke: var(--s4); }
.band.r5 { fill: var(--s5); } .kante.r5 { stroke: var(--s5); }
.band.r6 { fill: var(--s6); } .kante.r6 { stroke: var(--s6); }
.band.r7 { fill: var(--s7); } .kante.r7 { stroke: var(--s7); }
.band.r8 { fill: var(--s8); } .kante.r8 { stroke: var(--s8); }
.band.rs { fill: var(--ss); } .kante.rs { stroke: var(--ss); }
.band.ro { fill: var(--so); } .kante.ro { stroke: var(--so); }
.farbfeld { width: 12px; height: 12px; border-radius: 3px; flex: none; }
.r1.farbfeld, .tip-zeile i.r1 { background: var(--s1); }
.r2.farbfeld, .tip-zeile i.r2 { background: var(--s2); }
.r3.farbfeld, .tip-zeile i.r3 { background: var(--s3); }
.r4.farbfeld, .tip-zeile i.r4 { background: var(--s4); }
.r5.farbfeld, .tip-zeile i.r5 { background: var(--s5); }
.r6.farbfeld, .tip-zeile i.r6 { background: var(--s6); }
.r7.farbfeld, .tip-zeile i.r7 { background: var(--s7); }
.r8.farbfeld, .tip-zeile i.r8 { background: var(--s8); }
.rs.farbfeld, .tip-zeile i.rs { background: var(--ss); }
.ro.farbfeld, .tip-zeile i.ro { background: var(--so); }
.luecke { fill: var(--luecke); }
.luecke-text { font-size: 11.5px; fill: var(--text-3); font-family: var(--schrift); }
.ausfall-linie { stroke: var(--krit); stroke-width: 1; stroke-opacity: 0.6; stroke-dasharray: 3 3; shape-rendering: crispEdges; }
.spitze { fill: var(--text-2); }
.spitze-text { font-size: 11px; fill: var(--text-2); paint-order: stroke; stroke: var(--karte); stroke-width: 3px; stroke-linejoin: round; font-variant-numeric: tabular-nums; font-family: var(--schrift); }
.spieler-flaeche { fill: var(--text-2); fill-opacity: 0.16; }
.spieler-linie { fill: none; stroke: var(--text-2); stroke-width: 1.5; stroke-linejoin: round; }
.m-lauf { stroke: var(--text-3); stroke-width: 1; stroke-opacity: 0.6; shape-rendering: crispEdges; fill: none; }
.m-start { fill: var(--text-2); }
.m-fehler { fill: var(--krit); stroke: var(--karte); stroke-width: 1.5; }
.m-aktion { fill: var(--akzent); stroke: var(--karte); stroke-width: 1.5; }
.m-erholt { fill: var(--gut); stroke: var(--karte); stroke-width: 1.5; }
.marken-legende { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 12.5px; color: var(--text-3); margin-top: -4px; }
.marken-legende:empty { display: none; }
.marken-legende li { display: inline-flex; align-items: center; gap: 6px; }
.faden { position: absolute; top: 6px; left: 0; width: 1px; background: var(--text-2); pointer-events: none; }
.tip {
  position: absolute; top: 6px; left: 0; z-index: 5; width: max-content; max-width: min(280px, 76%); padding: 9px 11px; font-size: 12.5px; line-height: 1.4;
  color: var(--text-1); background: var(--tip); border-radius: var(--r-s); box-shadow: var(--schatten), 0 0 0 1px var(--rand); pointer-events: none;
}
.tip-zeit { font-weight: 650; margin-bottom: 4px; }
.tip-still { color: var(--text-2); }
.tip-wert { font-weight: 650; margin-top: 2px; }
.tip-zeile { display: grid; grid-template-columns: 12px auto minmax(0, 1fr); gap: 8px; align-items: baseline; font-variant-numeric: tabular-nums; }
.tip-zeile i { display: block; width: 12px; height: 3px; border-radius: 2px; align-self: center; }
.tip-zeile span { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tip-summe { padding-bottom: 4px; margin-bottom: 4px; border-bottom: 1px solid var(--rand); }
.tip-extra { margin-top: 4px; padding-top: 4px; border-top: 1px solid var(--rand); }
.tip-ereignis { margin-top: 4px; padding-top: 4px; border-top: 1px solid var(--rand); color: var(--text-2); font-size: 12px; overflow-wrap: anywhere; }
.tip-ereignis + .tip-ereignis { border-top: 0; margin-top: 0; padding-top: 0; }
.legende { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 22px; }
.legende:empty { display: none; }
.legende-kopf { grid-column: 1 / -1; font-size: 12.5px; color: var(--text-3); padding: 0 6px 4px; }
.legende-eintrag {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 34px; padding: 4px 8px; font-size: 13.5px; text-align: left; color: var(--text-2);
  background: none; border: 0; border-radius: 6px; cursor: pointer;
}
.legende-eintrag:hover { background: var(--karte-2); }
.legende-eintrag[aria-pressed="true"] { background: var(--akzent-weich); color: var(--text-1); }
.legende-eintrag.gedimmt { opacity: 0.5; }
.legende-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.legende-wert { flex: none; color: var(--text-1); font-weight: 550; font-variant-numeric: tabular-nums; }
.dia-notiz { display: grid; gap: 4px; font-size: 12.5px; color: var(--text-3); }
.dia-notiz:empty { display: none; }
.dia-fehler { color: var(--krit-text); }
.dia-tabelle { display: grid; gap: 8px; }
.rolltabelle { max-height: 360px; overflow: auto; border-radius: var(--r-s); box-shadow: inset 0 0 0 1px var(--rand); }
.datentabelle { width: 100%; border-collapse: collapse; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.datentabelle th { position: sticky; left: 0; background: var(--karte); font-weight: 600; color: var(--text-2); text-align: left; white-space: nowrap; }
.datentabelle thead th { top: 0; z-index: 2; background: var(--karte-2); }
.datentabelle thead th:first-child { z-index: 3; }
.datentabelle th, .datentabelle td { padding: 5px 10px; border-bottom: 1px solid var(--raster); }
.datentabelle td { text-align: right; white-space: nowrap; }
.datentabelle thead th:not(:first-child) { position: sticky; left: auto; text-align: right; }
.w0 { fill: var(--w0); }
.w1 { fill: var(--w1); } .w2 { fill: var(--w2); } .w3 { fill: var(--w3); } .w4 { fill: var(--w4); }
.w5 { fill: var(--w5); } .w6 { fill: var(--w6); } .w7 { fill: var(--w7); }
.wl { fill: var(--luecke); }
.fw1 { background: var(--w1); } .fw2 { background: var(--w2); } .fw3 { background: var(--w3); } .fw4 { background: var(--w4); }
.fw5 { background: var(--w5); } .fw6 { background: var(--w6); } .fw7 { background: var(--w7); }
.fwl { background: var(--luecke); box-shadow: inset 0 0 0 1px var(--rand); }
.zeilen-text { font-size: 12px; fill: var(--text-2); font-family: var(--schrift); }
.zellrahmen { position: absolute; left: 0; top: 0; box-shadow: 0 0 0 2px var(--text-1); border-radius: 2px; pointer-events: none; }
.waerme-skala { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 12.5px; color: var(--text-3); }
.waerme-stufen { display: inline-flex; gap: 1px; }
.waerme-stufen i { display: block; width: 18px; height: 10px; }
.waerme-stufen i:first-child { border-radius: 3px 0 0 3px; }
.waerme-stufen i:last-child { border-radius: 0 3px 3px 0; }
.waerme-luecke { display: inline-flex; align-items: center; gap: 6px; margin-left: 10px; }
.waerme-luecke i { display: block; width: 14px; height: 10px; border-radius: 3px; }

/* Rangbalken (Platte) */
.platte-summe { font-size: 14px; color: var(--text-2); margin-bottom: 12px; }
.rangliste { display: grid; gap: 12px; }
.rang-kopf { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.rang-name { min-width: 0; overflow-wrap: anywhere; }
.rang-name a { color: var(--text-1); font-weight: 550; text-decoration: none; }
.rang-name a:hover { text-decoration: underline; }
.rang-wert { flex: none; font-variant-numeric: tabular-nums; }
.rang-spur { height: 8px; margin: 4px 0 3px; background: var(--karte-2); border-radius: 4px; overflow: hidden; }
.rang-spur i { display: block; height: 100%; background: var(--akzent); border-radius: 4px; transition: width 0.5s ease; }
.rang-unter { font: 12px/1.35 var(--mono); color: var(--text-3); overflow-wrap: anywhere; }
@media (min-width: 1100px) {
  /* Viele Projekte: zwei Spalten, die Rangfolge laeuft spaltenweise von oben nach unten */
  #res-platte .rangliste { display: block; columns: 2; column-gap: 40px; }
  #res-platte .rangliste > li { break-inside: avoid; margin-bottom: 12px; }
}

/* ============================================================== Projektseite */
.seite-projekt { gap: 20px; }
.zurueck {
  display: inline-flex; align-items: center; gap: 4px; min-height: 32px; color: var(--text-2); font-size: 14px; font-weight: 500;
  text-decoration: none; width: max-content; margin: -4px 0 -12px -4px; padding: 0 6px 0 2px; border-radius: var(--r-s);
}
.zurueck:hover { color: var(--text-1); background: var(--karte-2); text-decoration: none; }
.zurueck .sym { width: 16px; height: 16px; }
.projekt-kopf { display: grid; gap: 8px; }
.projekt-zeile { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
.projekt-grund { font-size: 14.5px; color: var(--text-1); max-width: 80ch; }
.projekt-lage { display: grid; gap: 14px; }
.projekt-text { font-size: 14.5px; color: var(--text-2); max-width: 75ch; }
.projekt-zahlen {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; padding: 14px 16px; background: var(--karte);
  border-radius: var(--r-m); box-shadow: 0 0 0 1px var(--rand), var(--schatten-karte);
}
.projekt-pruefzeile { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; }
.projekt-pruefung { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; font-size: 13.5px; color: var(--text-2); }
.projekt-pruefung .sym { width: 16px; height: 16px; }
.projekt-art { font-size: 13.5px; color: var(--text-3); }
.projekt-befunde { display: flex; flex-wrap: wrap; gap: 6px; }
.textlos { padding: 2px 0; background: none; border: 0; cursor: pointer; }
.projekt-befunde .minimarke {
  min-height: 30px; padding: 3px 10px 3px 7px; border-radius: 999px; background: var(--karte); box-shadow: inset 0 0 0 1px var(--rand);
}
.projekt-befunde .minimarke:hover { box-shadow: inset 0 0 0 1px var(--rand-stark); color: var(--text-1); }
.teil { min-width: 0; scroll-margin-top: 16px; }
.teil:empty { display: none; }
.spalten { display: grid; gap: 24px; min-width: 0; }
.spalten > * { min-width: 0; }

/* Reiter der Projektseite (Tabs mit Pfeiltasten) */
.reiter { display: flex; gap: 2px; overflow-x: auto; margin: -4px calc(-1 * var(--abstand)) 0; padding: 0 var(--abstand); border-bottom: 1px solid var(--rand); scrollbar-width: none; }
.reiter::-webkit-scrollbar { display: none; }
.reiter a {
  position: relative; flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 6px 10px; font-size: 14px; font-weight: 550;
  color: var(--text-3); text-decoration: none; border-radius: var(--r-s) var(--r-s) 0 0;
}
.reiter a::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: -1px; height: 2px; border-radius: 2px 2px 0 0; background: transparent; }
.reiter a:hover { color: var(--text-1); text-decoration: none; }
.reiter a[aria-selected="true"] { color: var(--text-1); }
.reiter a[aria-selected="true"]::after { background: var(--akzent); }
.reiter a:focus-visible { outline-offset: -2px; }
.reiter-zahl { min-width: 19px; padding: 0 6px; border-radius: 10px; background: var(--karte-3); color: var(--text-2); font-size: 11.5px; font-weight: 600; line-height: 19px; text-align: center; }
.reiter-inhalt { display: grid; gap: 24px; min-width: 0; }
.reiter-inhalt > * { min-width: 0; }

/* Handgriffe */
.handgriffe { display: grid; padding: 0 16px; }
.handgriff { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 14px 0; border-bottom: 1px solid var(--rand); }
.handgriff:last-child { border-bottom: 0; }
.handgriff-text { flex: 1 1 240px; min-width: 0; }
.handgriff-titel { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; font-weight: 600; font-size: 14.5px; }
.handgriff-gefahr { display: inline-flex; gap: 5px; align-items: center; font-weight: 500; font-size: 12.5px; color: var(--krit-text); }
.handgriff-gefahr .sym { width: 14px; height: 14px; }
.handgriff-info { font-size: 13.5px; color: var(--text-2); max-width: 72ch; margin-top: 2px; }

/* Befunde */
.befundliste { display: grid; gap: 8px; }
.befund { position: relative; padding: 14px 16px; background: var(--karte); border-radius: var(--r-m); box-shadow: 0 0 0 1px var(--rand), var(--schatten-karte); overflow: hidden; }
.befund::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--rand-stark); }
.befund-kritisch::before { background: var(--krit); }
.befund-hoch::before { background: var(--ernst); }
.befund-mittel::before { background: var(--warn); }
.befund-kopf { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-bottom: 6px; font-size: 13px; }
.befund-projekt { font-weight: 600; color: var(--text-1); text-decoration: none; }
.befund-projekt:hover { text-decoration: underline; }
.befund-datum { color: var(--text-3); font-size: 12.5px; margin-left: auto; }
.befund-text { font-size: 14px; color: var(--text-2); max-width: 85ch; overflow-wrap: anywhere; }

/* Links, Domains, Sicherungen */
.linkliste { display: grid; gap: 0; padding: 4px 16px; }
.linkliste li { padding: 12px 0; border-bottom: 1px solid var(--rand); }
.linkliste li:last-child { border-bottom: 0; }
.link-kopf { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.link-titel { font-weight: 600; display: inline-flex; gap: 6px; align-items: center; }
.link-titel .sym { width: 14px; height: 14px; }
.link-art { font-size: 12px; color: var(--text-3); margin-left: auto; }
.link-adresse { font-size: 12.5px; color: var(--text-3); overflow-wrap: anywhere; }
.link-zugang { font-size: 13.5px; color: var(--text-2); margin-top: 3px; overflow-wrap: anywhere; }
.domains { display: grid; gap: 8px; }
.domain { display: grid; gap: 6px; padding: 14px 16px; background: var(--karte); border-radius: var(--r-m); box-shadow: 0 0 0 1px var(--rand), var(--schatten-karte); min-width: 0; font-size: 14px; }
.domain-kopf { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; }
.domain-host { font-weight: 650; overflow-wrap: anywhere; }
.domain-kommentar { color: var(--text-2); }
.domain-ziele { display: grid; gap: 3px; }
.domain-ziele li { display: flex; gap: 8px; align-items: baseline; min-width: 0; }
.ziel-art { flex: none; min-width: 64px; font-size: 12px; color: var(--text-3); }
.domain-log, .domain-projekt { font-size: 13px; color: var(--text-2); overflow-wrap: anywhere; }
.block summary { display: inline-flex; align-items: center; min-height: 34px; font-size: 13px; color: var(--text-2); cursor: pointer; }
.block[open] { display: grid; gap: 6px; }
.block-text { font: 12px/1.55 var(--mono); padding: 10px 12px; background: var(--log); border-radius: var(--r-s); box-shadow: inset 0 0 0 1px var(--rand); overflow-x: auto; white-space: pre-wrap; overflow-wrap: anywhere; }
.sicherungen { display: grid; padding: 4px 16px; }
.sicherung { display: grid; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--rand); }
.sicherung:last-child { border-bottom: 0; }
.sicherung-kopf { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.sicherung-zahlen { border-top: 0; padding-top: 0; }
.sicherung-ort { font-size: 12.5px; overflow-wrap: anywhere; }
.hinweisliste { display: grid; gap: 8px; font-size: 14px; color: var(--text-2); padding-left: 18px; list-style: disc; }
.hinweisliste li { overflow-wrap: anywhere; }
.hinweisliste li::marker { color: var(--text-3); }
.quelle { font-size: 13px; margin-top: 12px; overflow-wrap: anywhere; }

/* Zeitlisten: Ereignisse, Protokoll, letzte Handgriffe */
.zeitliste { display: grid; }
.zeitzeile { display: grid; grid-template-columns: 64px 16px minmax(0, 1fr); gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--rand); font-size: 14px; align-items: start; }
.zeitzeile:last-child { border-bottom: 0; }
.zeitzeile-zeit { font-size: 12.5px; color: var(--text-3); font-variant-numeric: tabular-nums; padding-top: 1px; }
.zeitzeile .sym { width: 16px; height: 16px; margin-top: 2px; }
.zeitzeile-text { min-width: 0; overflow-wrap: anywhere; color: var(--text-1); }
.zeitzeile-link { font-size: 13px; }
.zeitzeile-meta { color: var(--text-3); font-size: 12.5px; }
.zeitzeile-meta a { color: var(--text-2); }
.mehr-laden { justify-self: start; margin-top: -10px; }

/* Pflege */
.pflege-block { display: grid; gap: 8px; align-content: start; }
.pflege-block .abschnitt-titel { font-size: 0.98rem; }
.pflege-knoepfe { margin-top: 2px; }
.pflege-laeuft .textknopf { white-space: nowrap; }
.dialog-liste { max-height: 34vh; overflow: auto; }
.dialog-details summary { display: inline-flex; align-items: center; min-height: 32px; cursor: pointer; font-size: 13.5px; color: var(--text-2); }
.dialog-details .job-ausgabe { margin-top: 6px; max-height: 24vh; }
.wort-eingabe { font-family: var(--mono); font-size: 16px; letter-spacing: 0.08em; text-transform: none; }

/* ============================================================== Logs */
.log { display: grid; gap: 10px; min-width: 0; }
.log-projekt { display: grid; }
.log-werkzeug { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-items: end; }
.feld-quelle { grid-column: 1 / -1; }
.log-rahmen { position: relative; min-width: 0; }
.log-box {
  height: 460px; height: min(62dvh, 580px); overflow: auto; padding: 10px 12px; font: 12.5px/1.55 var(--mono);
  background: var(--log); border-radius: var(--r-s); box-shadow: inset 0 0 0 1px var(--rand); transition: opacity 0.2s;
}
.log-box.laedt { opacity: 0.55; }
.log-zeile { white-space: pre-wrap; overflow-wrap: anywhere; padding: 1px 0; color: var(--text-2); }
.log-zeit { color: var(--text-3); margin-right: 8px; }
.log-stufe { margin-right: 7px; font-weight: 650; }
.log-zeile.p0, .log-zeile.p1, .log-zeile.p2, .log-zeile.p3 { color: var(--krit-text); }
.log-zeile.p4 { color: var(--warn-text); }
.log-zeile.p5 { color: var(--text-1); }
.log-zeile.p7 { color: var(--text-3); }
.log-leer { color: var(--text-3); font-family: var(--schrift); font-size: 14px; padding: 8px 2px; }
.log-pille {
  position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); min-height: 34px; padding: 4px 16px; font-size: 13px; font-weight: 600;
  color: var(--karte); background: var(--text-1); border: 0; border-radius: 999px; cursor: pointer; box-shadow: var(--schatten);
}
.log-fuss { display: flex; flex-wrap: wrap; gap: 2px 16px; font-size: 12.5px; color: var(--text-3); }
.log-status { color: var(--krit-text); }
.log-live { justify-content: center; }

/* ============================================================== Dialog: am Handy von unten, sonst mittig */
dialog {
  width: 100%; max-width: 100%; margin: auto 0 0; padding: 0; border: 0; color: var(--text-1); background: var(--karte);
  border-radius: var(--r-l) var(--r-l) 0 0; box-shadow: var(--schatten), 0 0 0 1px var(--rand); max-height: 90vh; max-height: 90dvh;
}
dialog:focus { outline: none; }
dialog::backdrop { background: var(--abdunkeln); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.dialog-innen, .job-wurzel { display: grid; gap: 12px; font-size: 14.5px; }
.dialog-innen { padding: 20px 18px calc(18px + env(safe-area-inset-bottom)); }
.dialog-titel { font-size: 1.18rem; font-weight: 650; letter-spacing: -0.012em; overflow-wrap: anywhere; padding-right: 8px; }
.dialog-frage { font-weight: 550; }
.dialog-klein { font-size: 13px; color: var(--text-3); }
.dialog-knoepfe { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 6px; padding-top: 14px; border-top: 1px solid var(--rand); }
.dialog-knoepfe .knopf { flex: 1 1 auto; min-height: 44px; }
.warnkasten {
  display: grid; gap: 8px; padding: 12px 14px; border-radius: var(--r-m);
  background: color-mix(in srgb, var(--krit) 9%, var(--karte)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--krit) 38%, transparent);
}
.warnkasten-titel { display: flex; gap: 8px; align-items: center; font-weight: 650; }
.warnkasten-titel .sym { width: 18px; height: 18px; }
.job-ausgabe {
  max-height: 40vh; overflow: auto; padding: 10px 12px; font: 12px/1.55 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere;
  color: var(--text-2); background: var(--log); border-radius: var(--r-s); box-shadow: inset 0 0 0 1px var(--rand);
}

/* ============================================================== Formulare, Konto */
.formular { display: grid; gap: 14px; }
.formular-meldung { font-size: 14px; color: var(--krit-text); }
.formular-meldung:empty { display: none; }
.formular-gut { color: var(--gut-text); }
.seite-konto { max-width: 640px; }
.konto-zahlen { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 14px; border-top: 0; padding-top: 0; }
.konto-zahlen dd { font-size: 15px; font-weight: 600; white-space: normal; }
.sitzungsliste { margin-bottom: 12px; }
.thema-wahl { display: grid; gap: 10px; }
.thema-wahl .segment { justify-self: start; }
.thema-wahl .segment button { display: inline-flex; align-items: center; gap: 7px; padding: 4px 14px; }

/* ============================================================== Dienst, Konfiguration, Doku */
.einblick { display: grid; gap: 14px; min-width: 0; }
.einblick-kopf { display: grid; gap: 10px; }
.einblick-stand { font-size: 12.5px; }
.einblick-liste { display: grid; gap: 10px; min-width: 0; }
.einblick-unit { display: grid; gap: 10px; }
.einblick-unit-kopf { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.einblick-datei { min-width: 0; }
.einblick-datei > summary { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; min-height: 34px; padding: 4px 0; font-size: 14px; cursor: pointer; }
.einblick-datei[open] > summary { margin-bottom: 8px; }
.einblick-art { font-size: 12px; font-weight: 600; color: var(--text-3); }
.einblick-pfad { font-size: 12.5px; color: var(--text-2); overflow-wrap: anywhere; }
.einblick-meta { font-size: 12.5px; color: var(--text-3); overflow-wrap: anywhere; }
summary .einblick-meta { flex-basis: 100%; padding-left: 19px; }
.einblick-hinweis { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; color: var(--text-2); }
.einblick-hinweis .sym { width: 16px; height: 16px; margin-top: 2px; }
.einblick-umgebung { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; font-size: 13.5px; color: var(--text-2); }
.einblick-umgebung .sym { width: 15px; height: 15px; color: var(--warn-text); }
.datei-text {
  max-height: min(70vh, 640px); overflow: auto; padding: 12px 14px; font: 12.5px/1.6 var(--mono); color: var(--text-1);
  background: var(--log); border-radius: var(--r-s); box-shadow: inset 0 0 0 1px var(--rand); white-space: pre-wrap; overflow-wrap: anywhere; tab-size: 4;
}
.dt-kommentar { color: var(--text-3); }
.dt-abschnitt { color: var(--link); font-weight: 650; }
.dt-schluessel { color: var(--text-2); }
mark.geschwaerzt {
  padding: 0 4px; border-radius: 4px; color: var(--warn-text); background: color-mix(in srgb, var(--warn) 15%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--warn) 40%, transparent);
}
.doku-datei { display: grid; gap: 14px; }
.doku-kopf { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--rand); }
.doku-kopf .knopf { flex: none; }

/* Markdown aus der Doku: nur eigene Knoten, Tabellen und Code scrollen in sich, nie die Seite */
.md { display: grid; gap: 12px; font-size: 15px; line-height: 1.6; color: var(--text-1); min-width: 0; max-width: 78ch; }
.md > * { min-width: 0; }
.md h3, .md h4, .md h5, .md h6 { font-weight: 650; letter-spacing: -0.01em; line-height: 1.3; margin-top: 8px; }
.md .md-h1 { font-size: 1.35rem; }
.md .md-h2 { font-size: 1.15rem; padding-bottom: 4px; border-bottom: 1px solid var(--rand); }
.md .md-h3 { font-size: 1.02rem; }
.md h5, .md h6 { font-size: 0.95rem; color: var(--text-2); }
.md ul, .md ol { padding-left: 1.4em; display: grid; gap: 4px; }
.md ul { list-style: disc; }
.md ol { list-style: decimal; }
.md ul ul { list-style: circle; }
.md li > p { margin: 0; }
.md li { overflow-wrap: anywhere; }
.md li::marker { color: var(--text-3); }
.md .md-aufgabe { list-style: none; margin-left: -1.2em; }
.md p { overflow-wrap: anywhere; }
.md code { padding: 1px 5px; border-radius: 5px; background: var(--karte-2); box-shadow: inset 0 0 0 1px var(--rand); }
.md pre { overflow-x: auto; padding: 12px 14px; background: var(--log); border-radius: var(--r-s); box-shadow: inset 0 0 0 1px var(--rand); }
.md pre code { padding: 0; background: none; box-shadow: none; font: 12.5px/1.55 var(--mono); white-space: pre; overflow-wrap: normal; }
.md blockquote { margin: 0; padding: 2px 0 2px 14px; border-left: 3px solid var(--rand-stark); color: var(--text-2); display: grid; gap: 8px; }
.md hr { border: 0; border-top: 1px solid var(--rand); margin: 6px 0; width: 100%; }
.md-tabelle { overflow-x: auto; border-radius: var(--r-s); box-shadow: inset 0 0 0 1px var(--rand); }
.md table { border-collapse: collapse; font-size: 13.5px; min-width: 100%; }
.md th, .md td { padding: 7px 11px; border-bottom: 1px solid var(--rand); text-align: left; vertical-align: top; }
.md th { font-weight: 650; color: var(--text-2); background: var(--karte-2); white-space: nowrap; }
.md .md-rechts { text-align: right; }
.md .md-mitte { text-align: center; }
.md a { overflow-wrap: anywhere; }

/* ============================================================== Ressourcen: Arbeitsspeicher und Platte */
.speicher-karte { display: grid; gap: 14px; }
.speicher-balken { display: flex; gap: 2px; height: 14px; border-radius: 7px; overflow: hidden; background: var(--karte-2); }
.speicher-balken i { display: block; height: 100%; transition: width 0.6s ease; }
.sb-belegt { background: var(--s1); }
.sb-cache { background: var(--ss); }
.sb-frei { background: var(--so); }
.speicher-werte { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 18px; }
.speicher-farbe { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 7px; }
.speicher-anteil { font-size: 12.5px; font-weight: 400; color: var(--text-3); }
.platte-gesamt { display: grid; gap: 10px; }
.platte-gesamt .meter { margin-top: 0; }
.benutzer-liste { display: grid; gap: 12px; }
@media (min-width: 720px) { .speicher-werte { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* ============================================================== Breitere Bildschirme */
@media (min-width: 520px) {
  .segment { flex: 0 1 auto; }
  .nur-schmal-feld { flex: 0 1 220px; }
  .dialog-knoepfe .knopf { flex: 0 0 auto; }
  .nur-breit { position: static; width: auto; height: auto; overflow: visible; clip: auto; clip-path: none; }
  .nur-schmal { display: none; }
  .projekt-zahlen { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
}
@media (min-width: 640px) {
  :root { --abstand: 24px; }
  .karten { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
  .legende { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
  /* Fuenf Kacheln: oben drei, unten zwei breitere, ohne Luecke */
  .kacheln { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .kachel, .kachel:last-child:nth-child(odd) { grid-column: span 2; }
  .kachel:nth-child(n+4) { grid-column: span 3; }
  dialog { width: min(100% - 48px, 540px); margin: auto; border-radius: var(--r-l); }
  .dialog-innen { padding: 22px 24px 20px; }
  .held { padding: 22px 24px; }
  .flaeche-karte { padding: 18px 20px; }
  .handgriffe, .linkliste, .sicherungen { padding-left: 20px; padding-right: 20px; }
  .diagramm { padding: 18px 20px 16px; }
}

/* Ab 960 px: Seitenleiste links, Inhalt rechts */
@media (min-width: 960px) {
  .rahmen { display: grid; grid-template-columns: var(--seitenleiste) minmax(0, 1fr); }
  .kopfleiste {
    position: sticky; top: 0; height: 100vh; height: 100dvh; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 18px;
    padding: 18px 12px 16px; background: var(--karte); border-right: 1px solid var(--rand); overflow-y: auto;
  }
  .marke-name { padding: 4px 10px 6px; }
  .haupt-nav {
    position: static; flex-direction: column; gap: 2px; padding: 0; background: none; border: 0; flex: 1 1 auto;
    -webkit-backdrop-filter: none; backdrop-filter: none;
  }
  .haupt-nav a {
    flex: none; flex-direction: row; justify-content: flex-start; gap: 11px; min-height: 40px; padding: 8px 10px; font-size: 14.5px; font-weight: 500;
    border-radius: var(--r-s); color: var(--text-2);
  }
  .haupt-nav a::before { top: 9px; bottom: 9px; left: -12px; width: 3px; height: auto; margin: 0; border-radius: 0 3px 3px 0; }
  .haupt-nav a:hover { background: var(--karte-2); color: var(--text-1); text-decoration: none; }
  .haupt-nav [aria-current="page"] { background: var(--akzent-weich); color: var(--text-1); font-weight: 600; }
  .haupt-nav .nav-mehr { display: flex; }
  .haupt-nav .nav-gruppe { margin-top: 14px; }
  .haupt-nav .nav-konto { margin-top: auto; }
  .nav-symbol, .nav-symbol .sym { width: 19px; height: 19px; }
  .haupt-nav .nav-zahl { position: static; margin-left: auto; }
  .nav-schmal, .mehr-menue { display: none !important; }
  .kopf-stand { padding: 10px 10px 0; border-top: 1px solid var(--rand); white-space: normal; }
  .stoerband, .band-still, .job-chip { padding-left: 32px; padding-right: 32px; }
  main { padding: 28px 32px 56px; }
  .seite { gap: 28px; }
  .seite-titel { font-size: 1.75rem; }
  .kacheln { gap: 12px; }
  .kachel { padding: 15px 16px 16px; }
  .sprung { margin: -10px 0; padding: 2px 0; }
  .reiter { margin: -6px 0 0; padding: 0; }
  .reiter a { padding: 6px 12px; font-size: 14.5px; }
  .log-werkzeug { grid-template-columns: minmax(200px, 2fr) minmax(150px, 1fr) minmax(150px, 1.4fr) auto; }
  .feld-quelle { grid-column: auto; }
  .log-projekt { max-width: 420px; }
  .regler { gap: 10px; }
}
@media (min-width: 1100px) {
  .aufmerksam { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  li:nth-child(2) > .aufmerksam-zeile { border-top: 0; }
  .spalten { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .domains { grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr)); align-items: start; }
}
@media (min-width: 1180px) {
  .kacheln { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .kachel, .kachel:last-child:nth-child(odd), .kachel:nth-child(n+4) { grid-column: auto; }
}
@media (min-width: 1400px) {
  :root { --seitenleiste: 256px; }
  main { padding-left: 40px; padding-right: 40px; }
}

/* ============================================================== Bewegung, Druck, erzwungene Farben */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

@media (forced-colors: active) {
  .band, .kante { stroke: CanvasText; }
  .band { fill: Canvas; fill-opacity: 1; stroke-width: 1; }
  .meter i, .res-balken i, .rang-spur i, .speicher-balken i { background: Highlight; forced-color-adjust: none; }
  .pille, .knopf, .segment button[aria-checked="true"], .reiter a[aria-selected="true"] { border: 1px solid CanvasText; }
  .haupt-nav [aria-current="page"] { outline: 2px solid Highlight; }
}
