/* SolarBeat Stufe 1: Gestaltung nach dem Entwurf „SMB SolarBeat“ (Handy Main.dc.html, Desktop
   Desktop.dc.html) mit dem SMB-Design-System (Lime, Anthrazit, Space Grotesk, Inter).
   Klassen: VERTRAG.md §12a. Schmal = Tableiste unten, breit (ab 900px) = dunkle Kopfleiste.
   Keine Inline-Stile, kein Skript: alles Aussehen steht hier. Symbole als CSS-Maske (sym-*.svg). */

/* ---------------------------------------------------------------- Schriften (SIL OFL 1.1) */
@font-face {
  font-family: "Inter SB";
  src: url(inter-latin-wght.woff2) format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk SB";
  src: url(space-grotesk-latin-wght.woff2) format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

/* ---------------------------------------------------------------- Token */
:root {
  --lime: hsl(63 86% 49%);
  --lime-hover: hsl(63 86% 45%);
  --lime-600: hsl(63 86% 42%);
  --lime-700: hsl(63 86% 34%);
  --lime-rand: hsl(63 86% 38%);
  --lime-tief: hsl(63 86% 30%);
  --lime-text: hsl(63 86% 20%);
  --lime-hell: hsl(63 86% 86%);
  --lime-dunkel: hsl(63 86% 15%);
  --a50: hsl(210 29% 95%);
  --a85: hsl(210 29% 85%);
  --a72: hsl(210 29% 72%);
  --a55: hsl(210 29% 55%);
  --a400: hsl(210 29% 40%);
  --a500: hsl(210 29% 25%);
  --a600: hsl(210 29% 20%);
  --a700: hsl(210 29% 16%);
  --text: hsl(210 29% 20%);
  --leise: hsl(210 29% 40%);
  --grund: hsl(210 15% 96%);
  --karte: #fff;
  --linie: hsl(210 15% 90%);
  --linie-stark: hsl(210 15% 82%);
  --grau-89: hsl(210 15% 89%);
  --grau-84: hsl(210 15% 84%);
  --grau-97: hsl(210 15% 97%);
  --lauf-punkt: hsl(210 55% 62%);
  --lauf-rand: hsl(210 55% 50%);
  --lauf-grund: hsl(210 60% 94%);
  --lauf-text: hsl(210 60% 28%);
  --stopp-punkt: hsl(24 92% 50%);
  --stopp-rand: hsl(22 90% 40%);
  --stopp-grund: hsl(24 95% 91%);
  --stopp-hell: hsl(24 95% 95%);
  --stopp-linie: hsl(24 80% 66%);
  --stopp-text: hsl(20 85% 26%);
  --gefahr: hsl(0 72% 42%);
  --gefahr-hell: hsl(0 85% 96%);
  --radius-sm: .25rem;
  --radius-md: .375rem;
  --radius-lg: .5rem;
  --radius-xl: .75rem;
  --schatten: 0 2px 16px -4px rgba(0, 0, 0, .08);
  --schatten-hoch: 0 8px 32px -8px rgba(0, 0, 0, .12);
  --schatten-lime: 0 0 30px -8px hsl(63 86% 49% / .35);
  --schrift: "Inter SB", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --titel: "Space Grotesk SB", "Space Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --tab-hoehe: 60px;
  color-scheme: light;
}

/* ---------------------------------------------------------------- Grundlagen */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; background: var(--grund); color: var(--text);
  font-family: var(--schrift); font-size: 14px; line-height: 1.4; overflow-wrap: anywhere;
}
a { color: var(--a500); text-underline-offset: 2px; }
a:hover { color: var(--a700); }
h1, h2, h3, h4 { font-family: var(--titel); letter-spacing: -.02em; line-height: 1.2; margin: 0; color: var(--text); }
h1 { font-size: 22px; font-weight: 700; }
h2 { font-size: 18px; font-weight: 700; }
h3, h4 { font-size: 15px; font-weight: 600; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
img { max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--a500); outline-offset: 2px; border-radius: 2px; }
.sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.klein { font-size: 12.5px; color: var(--leise); }
.leer { color: var(--leise); }
.ueber { font-family: var(--schrift); font-size: 11px; font-weight: 600; letter-spacing: .05em;
  text-transform: uppercase; color: var(--leise); }
.anzahl { display: inline-block; min-width: 1.7em; padding: 0 .45em; border-radius: var(--radius-sm);
  background: var(--grau-89); color: var(--a600); font-family: var(--schrift); font-size: 12px; font-weight: 600;
  letter-spacing: 0; text-align: center; vertical-align: middle; line-height: 1.6; }
.abzeichen { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 9999px;
  background: var(--a500); color: #fff; font-size: 12px; font-weight: 600; line-height: 1.5; white-space: nowrap; }
.sprung { position: absolute; left: 8px; top: -60px; z-index: 50; padding: 10px 14px; background: var(--a600);
  color: #fff; border-radius: var(--radius-md); }
.sprung:focus { top: 8px; color: #fff; }

/* Symbole: SVG als Maske, Farbe folgt dem Text */
.sym { display: inline-block; flex-shrink: 0; width: 18px; height: 18px; background-color: currentColor;
  -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; }
.sym-freigaben { --m: url(sym-freigaben.svg); }
.sym-projekte { --m: url(sym-projekte.svg); }
.sym-protokoll { --m: url(sym-protokoll.svg); }
.sym-betrieb { --m: url(sym-betrieb.svg); }
.sym-konto { --m: url(sym-konto.svg); }
.sym-links { --m: url(sym-links.svg); }
.sym-rechts { --m: url(sym-rechts.svg); }
.sym-runter { --m: url(sym-runter.svg); }
.sym-haken { --m: url(sym-haken.svg); }
.sym-dokument { --m: url(sym-dokument.svg); }
.sym-suche { --m: url(sym-suche.svg); }
.sym-prozess { --m: url(sym-prozess.svg); }

/* ---------------------------------------------------------------- Kopf (schmal: hell) */
.kopf { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 52px;
  padding: 0 16px; padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right));
  background: #fff; border-bottom: 1px solid var(--linie); }
.kopf-links { display: flex; align-items: center; gap: 20px; min-width: 0; }
.marke { display: flex; align-items: center; gap: 10px; min-height: 44px; text-decoration: none; min-width: 0; }
.marke-logo { display: block; height: 22px; width: auto; }
.marke-logo-hell { display: none; }
.marke-name { font-family: var(--titel); font-size: 13px; font-weight: 600; color: var(--a500); white-space: nowrap; }
.kopf-benutzer { display: flex; align-items: center; gap: 8px; min-width: 0; }
.benutzer { display: flex; align-items: center; gap: 8px; min-height: 44px; text-decoration: none; color: var(--text); min-width: 0; }
.benutzer-text { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.2; min-width: 0; }
.benutzer-name { font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 9rem; }
.benutzer-rolle { display: none; font-size: 11.5px; }
.avatar { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; flex-shrink: 0;
  border-radius: 9999px; background: var(--a500); color: #fff; font-size: 12px; font-weight: 600; }
.kopf-status { display: none; }
.abmelden { display: none; }
.kopfleiste { display: none; }
nav ul { list-style: none; }

/* ---------------------------------------------------------------- Tableiste (schmal) */
.tableiste { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: #fff;
  border-top: 1px solid var(--linie); padding-bottom: env(safe-area-inset-bottom); }
.tableiste ul { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); }
.tableiste a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  min-height: var(--tab-hoehe); padding: 4px 2px 6px; border-top: 3px solid transparent; text-decoration: none;
  color: var(--a400); font-size: 11.5px; font-weight: 500; }
.tableiste a[aria-current="page"] { border-top-color: var(--lime); color: var(--a700); font-weight: 600; }
.nav-oben { display: flex; align-items: center; gap: 4px; }
.nav-text { white-space: nowrap; }
.zahl { display: inline-block; min-width: 18px; padding: 0 4px; border-radius: var(--radius-sm); background: var(--lime);
  color: var(--a700); font-size: 11.5px; font-weight: 700; line-height: 18px; text-align: center; }

/* ---------------------------------------------------------------- Inhalt */
.inhalt { display: flex; flex-direction: column; gap: 12px; width: 100%; max-width: 1640px; margin: 0 auto;
  padding: 14px 16px calc(var(--tab-hoehe) + 28px + env(safe-area-inset-bottom)); }
.ohne-navigation .inhalt { padding-bottom: 32px; }
.seitenkopf { display: flex; flex-direction: column; gap: 6px; }
.seitenkopf h1 .anzahl { margin-left: 4px; font-size: 13px; }
.tafel { background: var(--karte); border: 1px solid var(--linie); border-radius: var(--radius-xl); padding: 14px; }
.tafel-kopf { font-family: var(--schrift); font-size: 11px; font-weight: 600; letter-spacing: .05em;
  text-transform: uppercase; color: var(--leise); margin-bottom: 6px; }
.tafel-leer { padding: 4px 0; }
.leerkarte { display: flex; flex-direction: column; gap: 6px; padding: 20px 16px; background: var(--karte);
  border: 1px solid var(--linie); border-radius: var(--radius-xl); }
.leerkarte h2 { font-size: 20px; }
.leerkarte p { font-size: 13.5px; }
.leer-unsicher { border-color: var(--stopp-linie); background: var(--stopp-hell); }
.knopfreihe { display: flex; flex-direction: column; gap: 8px; }
.nur-breit { display: none !important; }

/* ---------------------------------------------------------------- Meldungen */
.meldung { padding: 10px 12px; border-radius: var(--radius-md); border: 1px solid transparent; font-size: 13.5px; }
.meldung ul { padding-left: 1.1em; }
.hinweisblock h2, .hinweisblock h3, .hinweisblock h4 { font-family: var(--schrift); font-size: 13.5px; font-weight: 700;
  letter-spacing: 0; color: inherit; margin: 0 0 4px; }
.hinweisblock p { margin: 0; font-weight: 500; }
.meldung-info { background: var(--lauf-grund); color: var(--lauf-text); }
.meldung-erfolg { background: hsl(63 86% 93%); border-color: hsl(63 60% 70%); color: var(--lime-dunkel); }
.meldung-fehler { background: var(--gefahr-hell); border-color: hsl(0 70% 80%); color: var(--gefahr); font-weight: 600; }
.meldung-warnung { background: var(--stopp-hell); border-color: hsl(24 80% 72%); color: var(--stopp-text); font-weight: 600; }
.unlesbar, .quellenhinweis { padding: 12px 14px; border-radius: var(--radius-lg); border: 1px solid hsl(24 80% 72%);
  background: var(--stopp-hell); color: var(--stopp-text); }
.unlesbar h2 { font-size: 16px; color: var(--stopp-text); margin-bottom: 4px; }
.unlesbar ul, .quellenhinweis ul { padding-left: 1.1em; margin-top: 4px; font-size: 13px; }

/* ---------------------------------------------------------------- Knöpfe (Design-System: Button) */
.knopf { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px;
  padding: 8px 16px; border: 1px solid transparent; border-radius: var(--radius-md); background: transparent;
  color: var(--text); font-family: var(--schrift); font-size: 14px; font-weight: 600; line-height: 1.25;
  text-align: center; text-decoration: none; cursor: pointer; transition: background-color .15s, box-shadow .15s; }
.knopf:hover { color: var(--text); }
.knopf-haupt { background: linear-gradient(135deg, hsl(63 86% 49%) 0%, hsl(65 90% 52%) 50%, hsl(68 85% 48%) 100%);
  color: var(--a500); box-shadow: var(--schatten-lime); border-color: var(--lime-rand); }
.knopf-haupt:hover { background: var(--lime-hover); color: var(--a700); box-shadow: var(--schatten-hoch); }
.knopf-rand { background: #fff; border-color: var(--linie-stark); }
.knopf-rand:hover { background: hsl(66 60% 45% / .12); }
.knopf-schlicht { background: transparent; }
.knopf-schlicht:hover { background: hsl(66 60% 45% / .12); }
.knopf-gefahr { background: var(--gefahr); color: #fff; }
.knopf-gefahr:hover { background: hsl(0 72% 36%); color: #fff; }
.knopf-klein { min-height: 44px; padding: 6px 12px; font-size: 13px; }
label { display: block; margin: 0 0 4px; font-size: 13px; font-weight: 600; }
input, select, textarea { width: 100%; min-height: 44px; padding: 8px 10px; border: 1px solid var(--linie-stark);
  border-radius: var(--radius-sm); background: #fff; font-size: 16px; }
textarea { resize: vertical; min-height: 88px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--lime-700); outline-offset: 0; }

/* ---------------------------------------------------------------- Zustände (acht, VERTRAG §7, Entwurf 4c) */
.punkt { display: inline-block; flex-shrink: 0; width: 10px; height: 10px; border-radius: 2px;
  border: 1px solid var(--grau-84); background: hsl(210 15% 92%); }
.punkt-ok { background: var(--a500); border-color: var(--a500); }
.punkt-frei { background: var(--lime); border-color: var(--lime-700); }
.punkt-vor { background: #fff; border-color: var(--lime-tief); }
.punkt-lauf { background: var(--lauf-punkt); border-color: var(--lauf-rand); }
.punkt-stopp { background: var(--stopp-punkt); border-color: var(--stopp-rand); }
.punkt-hand { background: #fff; border: 1px dashed var(--a400); }
.punkt-leer { background: hsl(210 15% 92%); border-color: hsl(210 15% 86%); }
.punkt-weg { background: #fff; border: 1px dotted hsl(210 15% 75%); }
/* Statuswort mit Punkt davor (Text bleibt in Textfarbe, Kontrast unabhängig vom Zustand) */
.zustand { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 500; color: var(--leise); }
.zustand::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 2px; flex-shrink: 0;
  border: 1px solid hsl(210 15% 86%); background: hsl(210 15% 92%); }
.zustand.zustand-ok::before { background: var(--a500); border-color: var(--a500); }
.zustand.zustand-frei { color: var(--a700); font-weight: 600; }
.zustand.zustand-frei::before { background: var(--lime); border-color: var(--lime-700); }
.zustand.zustand-vor { color: var(--lime-text); font-weight: 600; }
.zustand.zustand-vor::before { background: #fff; border-color: var(--lime-tief); }
.zustand.zustand-lauf { color: var(--lauf-text); }
.zustand.zustand-lauf::before { background: var(--lauf-punkt); border-color: var(--lauf-rand); }
.zustand.zustand-stopp { color: var(--stopp-text); font-weight: 600; }
.zustand.zustand-stopp::before { background: var(--stopp-punkt); border-color: var(--stopp-rand); }
.zustand.zustand-hand::before { background: #fff; border: 1px dashed var(--a400); }
.zustand.zustand-weg::before { background: #fff; border: 1px dotted hsl(210 15% 75%); }

/* ---------------------------------------------------------------- Freigaben (Startseite) */
.fortschritt { display: flex; gap: 4px; }
.fortschritt span { flex: 1 1 0; height: 6px; border-radius: 2px; background: var(--grau-84); }
.fortschritt span.an { background: var(--lime-hover); }
.karten { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.karten-platz { display: none; }
.karten-platz.karte-aktuell { display: block; }

/* Karte (Vorgang) */
.karte { display: flex; flex-direction: column; background: var(--karte); border: 1px solid var(--linie);
  border-radius: var(--radius-xl); box-shadow: var(--schatten); min-width: 0; }
.karte-oben { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 36px;
  padding: 10px 16px 0; }
.karte-oben:has(.blaettern) { padding: 4px 6px 0 16px; }
.karte-art { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.blaettern { display: flex; align-items: center; }
.blaettern-knopf { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px;
  color: var(--a400); border-radius: var(--radius-md); }
.blaettern-knopf:hover { color: var(--a700); background: var(--grund); }
.blaettern-text { font-size: 12.5px; font-weight: 500; color: var(--a400); white-space: nowrap; }
.karte-rumpf { display: flex; flex-direction: column; gap: 12px; padding: 6px 16px 16px; min-width: 0; }
.vorgang-kopf { display: flex; flex-direction: column; gap: 2px; }
.karte-name { font-size: 24px; font-weight: 700; }
.karte-name a { color: inherit; text-decoration: none; }
.karte-name a:hover { text-decoration: underline; }
.karte-ort, .vorgang-ort { font-size: 13px; color: var(--leise); }
.vorgang-titel { font-size: 12.5px; color: var(--leise); }
.vorgang-sub { font-size: 13px; color: var(--leise); }
.gross { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: var(--radius-lg); background: var(--grund); }
.gross-label { font-size: 12px; font-weight: 500; color: var(--leise); }
.gross-wert { font-family: var(--titel); font-size: 34px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }
.gross-sub { font-size: 12.5px; color: var(--leise); }
.warnungen, .achtung { padding: 10px 12px; border-radius: var(--radius-md); border: 1px solid hsl(0 70% 80%);
  background: var(--gefahr-hell); color: hsl(0 72% 32%); }
.achtung { border-color: hsl(42 80% 62%); background: hsl(45 95% 92%); color: hsl(32 80% 22%); }
.warnungen h2, .warnungen h3, .warnungen h4 { font-family: var(--schrift); font-size: 13.5px; font-weight: 700;
  letter-spacing: 0; color: inherit; margin-bottom: 4px; }
.achtung h2, .achtung h3, .achtung h4 { font-family: var(--schrift); font-size: 11px; font-weight: 700;
  letter-spacing: .05em; text-transform: uppercase; color: inherit; margin-bottom: 4px; }
.warnungen ul, .achtung ul { padding-left: 1.1em; font-size: 13.5px; font-weight: 600; }
.pruefungen { display: flex; flex-direction: column; gap: 6px; }
.pruefungen ul { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.pruefung { display: flex; align-items: flex-start; gap: 8px; font-size: 13.5px; }
.pruefung-zeichen { width: 16px; height: 16px; margin-top: 2px; flex-shrink: 0; background-color: var(--lime-tief);
  -webkit-mask: url(sym-haken.svg) center / contain no-repeat; mask: url(sym-haken.svg) center / contain no-repeat; }
.pruefung-schlecht { color: var(--stopp-text); font-weight: 600; }
.pruefung-schlecht .pruefung-zeichen { background-color: var(--stopp-punkt); -webkit-mask: none; mask: none;
  border-radius: 9999px; position: relative; }
.pruefung-schlecht .pruefung-zeichen::after { content: "!"; position: absolute; inset: 0; color: #fff; font-size: 11px;
  font-weight: 700; line-height: 16px; text-align: center; }
.pruefung-details { list-style: disc; padding-left: 1.1em; margin-top: 2px; color: var(--leise); font-size: 12.5px; font-weight: 400; }

/* „Details und Unterlagen“ */
.mehr { border: 1px solid var(--linie); border-radius: var(--radius-md); background: #fff; }
.mehr > summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px;
  padding: 0 12px; font-size: 13.5px; font-weight: 500; cursor: pointer; list-style: none; border-radius: var(--radius-md); }
.mehr > summary::-webkit-details-marker { display: none; }
.mehr > summary .sym { width: 16px; height: 16px; transition: transform .15s; }
.mehr[open] > summary { border-bottom: 1px solid var(--linie); border-radius: var(--radius-md) var(--radius-md) 0 0; }
.mehr[open] > summary .sym { transform: rotate(180deg); }
.mehr-zahl { color: var(--leise); font-weight: 400; }
.mehr-inhalt { display: flex; flex-direction: column; gap: 12px; padding: 10px; }
.zeilen, .block-zeilen { margin: 0; border: 1px solid var(--linie); border-radius: var(--radius-md); }
.zeile { display: flex; flex-wrap: wrap; gap: 2px 10px; padding: 7px 10px; border-bottom: 1px solid var(--linie); font-size: 13px; }
.zeile:last-child { border-bottom: 0; }
.zeile dt { flex: 0 0 auto; min-width: 34%; max-width: 100%; color: var(--leise);
  overflow-wrap: break-word; word-break: normal; hyphens: manual; }
.zeile dd { flex: 1 1 9rem; min-width: 0; margin: 0; font-weight: 500; white-space: pre-line; }
.zeile-ohne-bezeichnung dd { font-weight: 400; }
.hinweise { padding: 10px 12px; border-radius: var(--radius-md); background: var(--lauf-grund); color: var(--lauf-text); }
.hinweise h2, .hinweise h3, .hinweise h4, .block h2, .block h3, .block h4 { font-family: var(--schrift); font-size: 11px;
  font-weight: 600; letter-spacing: .05em; text-transform: uppercase; margin-bottom: 4px; color: inherit; }
.hinweise ul { padding-left: 1.1em; font-size: 13px; }
.block { display: flex; flex-direction: column; gap: 4px; }
.block h2, .block h3, .block h4 { color: var(--leise); }
.block-text { font-size: 13px; white-space: pre-line; padding: 8px 10px; border-radius: var(--radius-md); background: var(--grund); }
.dateien { display: flex; flex-direction: column; gap: 8px; }
.dateiliste { list-style: none; display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.datei-vorschau { display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: var(--text);
  padding: 4px; border: 1px solid var(--linie); border-radius: var(--radius-md); background: var(--grund); min-height: 44px; }
.datei-vorschau img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: contain; background: #fff;
  border-radius: var(--radius-sm); }
.datei-vorschau:hover { border-color: var(--a55); }
.datei-titel { font-size: 12.5px; font-weight: 500; padding: 0 2px 2px; }
.dokumentknoepfe { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.datei-oeffnen { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px;
  border: 1px solid var(--linie); border-radius: var(--radius-sm); background: var(--grund); color: var(--text);
  font-size: 12.5px; font-weight: 500; text-decoration: none; }
.datei-oeffnen .sym { width: 14px; height: 14px; }

/* Entscheidung */
.aktionen { display: flex; flex-direction: column; gap: 8px; }
.aktion { display: flex; flex-direction: column; gap: 8px; margin: 0; }
.aktion .knopf, .rueckfrage .knopf, .knopfreihe .knopf { width: 100%; }
.aktion-ortsteil { padding: 10px; border: 1px solid var(--linie); border-radius: var(--radius-md); background: var(--grund); }
.aktion-ortsteil label { margin: 0; }
.korrektur > summary { list-style: none; width: 100%; }
.korrektur > summary::-webkit-details-marker { display: none; }
.korrektur[open] > summary { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.korrektur .aktion { padding: 10px; border: 1px solid var(--linie); border-top: 0; border-radius: 0 0 var(--radius-md) var(--radius-md);
  background: var(--grund); }
.korrektur .aktion label { margin: 0; }
.korrektur .aktion .knopf { background: var(--a500); color: #fff; border-color: var(--a500); }
.korrektur .aktion .knopf:hover { background: var(--a600); }
.kein-recht { padding: 10px 12px; border-radius: var(--radius-md); background: var(--grund); color: var(--leise); font-size: 13.5px; }
.frist { font-size: 12px; color: var(--leise); }
.ausfuehrung { font-size: 12px; color: var(--leise); }
.rueckfrage { display: flex; flex-direction: column; gap: 12px; }
.rueckfrage h2, .rueckfrage h3, .rueckfrage h4 { font-size: 18px; font-weight: 700; }
.rueckfrage p { font-size: 13.5px; }
.rueckfrage .aktion { margin: 0; }

/* Vermerkt, nicht mehr offen */
.vermerkt { display: flex; flex-direction: column; gap: 12px; }
.vermerkt-titel { font-size: 13px; color: var(--leise); }
.vermerkt-kopf { display: flex; align-items: center; gap: 10px; }
.vermerkt-kopf h1 { font-size: 20px; }
.vermerkt-haken { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; flex-shrink: 0;
  border-radius: var(--radius-sm); background: var(--lime); color: var(--a700); }
.vermerkt-was { font-weight: 600; font-size: 15px; }
.stand { display: flex; align-items: flex-start; gap: 10px; }
.stand .punkt { margin-top: 5px; }
.stand .zustand::before { display: none; }
.stand-schritt { font-weight: 600; }
.notiz { font-size: 12.5px; color: var(--leise); }

/* Zurück-Leiste */
.zurueck { display: flex; flex-wrap: wrap; align-items: center; gap: 0 16px; }
.zurueck a { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; font-size: 13px; font-weight: 600;
  color: var(--a500); text-decoration: none; }
.zurueck a:hover { text-decoration: underline; }

/* Klärungen */
.klaerungen { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.klaerungen .anzahl { font-size: 11px; }
.klaerungsliste { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.klaerung a { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; min-height: 44px; background: var(--karte);
  border: 1px solid var(--linie); border-left: 3px solid var(--stopp-punkt); border-radius: var(--radius-md);
  text-decoration: none; color: var(--text); }
.klaerung a:hover { border-color: var(--stopp-linie); border-left-color: var(--stopp-punkt); }
.klaerung-kopf { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 8px; }
.klaerung-name { font-family: var(--titel); font-size: 15px; font-weight: 600; }
.klaerung-schritt { font-size: 12px; color: var(--leise); }
.klaerung-grund { font-size: 13px; font-weight: 600; color: var(--stopp-text); }
.leer-karte { padding: 10px 12px; background: var(--karte); border: 1px solid var(--linie); border-radius: var(--radius-md); }

/* ---------------------------------------------------------------- Projekte */
.projektliste-alter { margin-top: 2px; }
.kacheln ul { list-style: none; display: grid; gap: 8px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kachel a { display: flex; flex-direction: column; justify-content: center; gap: 2px; height: 100%; min-height: 56px;
  padding: 8px 10px; border: 2px solid var(--linie); border-radius: var(--radius-lg); background: #fff;
  text-decoration: none; color: var(--a700); box-shadow: var(--schatten); }
.kachel-frei a { background: var(--lime); border-color: var(--lime); }
.kachel-stopp a { background: var(--stopp-grund); border-color: var(--stopp-grund); }
.kachel-lauf a { background: var(--lauf-grund); border-color: var(--lauf-grund); }
.kachel a[aria-current="true"] { border-color: var(--a600); }
.kachel-zahl { font-family: var(--titel); font-size: 20px; font-weight: 700; line-height: 1; letter-spacing: -.02em; }
.kachel-worte { display: flex; flex-direction: column; min-width: 0; }
.kachel-text { font-size: 12px; font-weight: 600; line-height: 1.25; }
.kachel-unter { display: none; font-size: 12px; color: var(--a500); }
.suche { display: flex; gap: 8px; }
.suche-feld { position: relative; flex: 1 1 auto; min-width: 0; }
.suche-feld .sym { position: absolute; left: 12px; top: 13px; width: 18px; height: 18px; color: var(--leise); }
.suche-feld input { padding-left: 38px; }
.suche .knopf { flex-shrink: 0; }
.projektliste { list-style: none; background: var(--karte); border: 1px solid var(--linie); border-radius: var(--radius-xl); overflow: hidden; }
.projekt-eintrag a { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 8px 14px;
  border-bottom: 1px solid var(--linie); text-decoration: none; color: var(--text); }
.projekt-eintrag:last-child a { border-bottom: 0; }
.projekt-eintrag a:hover { background: var(--grau-97); }
.projekt-eintrag .sym { width: 16px; height: 16px; color: var(--a400); }
.projekt-mitte { display: flex; flex-direction: column; flex: 1 1 0; min-width: 0; }
.projekt-zeile1 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px; }
.projekt-name { font-family: var(--titel); font-size: 15px; font-weight: 600; min-width: 0; }
.projekt-meta { font-size: 12px; color: var(--leise); white-space: nowrap; }
.projekt-naechstes { font-size: 12.5px; color: var(--leise); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.projekt-fertig { font-size: 12px; font-weight: 500; color: var(--leise); white-space: nowrap; }

/* Matrix (breit) */
.matrix-karte { display: flex; flex-direction: column; min-width: 0; background: var(--karte); border: 1px solid var(--linie);
  border-radius: var(--radius-lg); box-shadow: var(--schatten); }
.matrix-kopf { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px;
  padding: 12px 16px; border-bottom: 1px solid var(--linie); }
.matrix-kopf h2 { font-size: 17px; }
.legende { list-style: none; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px 14px; font-size: 12px; color: var(--leise); }
.legende li { display: flex; align-items: center; gap: 5px; }
.matrix-rahmen { overflow-x: auto; padding: 0 8px 8px; }
.matrix-tabelle { width: 100%; min-width: 1010px; table-layout: fixed; border-collapse: separate; border-spacing: 4px 0; }
.col-projekt { width: 196px; }
.col-spalt { width: 14px; }
.matrix-tabelle th, .matrix-tabelle td { padding: 0; text-align: left; vertical-align: middle; }
.matrix-ecke { padding: 10px 0 6px 8px !important; font-size: 11px; font-weight: 600; color: var(--leise); vertical-align: bottom !important; }
.strang-kopf { padding: 10px 0 4px 6px !important; border-bottom: 2px solid var(--a500); font-size: 11px; font-weight: 600;
  letter-spacing: .05em; text-transform: uppercase; color: var(--a600); }
.matrix-schritte th { padding: 6px 0 6px 6px; font-size: 11.5px; font-weight: 500; color: var(--leise); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; }
.matrix-tabelle tbody th, .matrix-tabelle tbody td { border-top: 1px solid var(--linie); padding: 3px 0; }
.matrix-tabelle tbody td.spalt { border-top-color: transparent; }
.matrix-tabelle tbody tr.gewaehlt-zeile > * { background: var(--grau-97); }
.matrix-tabelle tbody th a { display: flex; flex-direction: column; justify-content: center; min-height: 36px; padding: 2px 8px;
  text-decoration: none; color: var(--text); }
.matrix-tabelle tbody th a:hover .matrix-name { text-decoration: underline; }
.matrix-name { font-family: var(--titel); font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.matrix-ort { font-size: 11.5px; font-weight: 400; color: var(--leise); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zelle a { display: flex; align-items: center; gap: 4px; height: 34px; min-width: 0; padding: 0 5px; overflow: hidden;
  border: 1px solid transparent; border-radius: var(--radius-sm); font-size: 12px; text-decoration: none; color: var(--a400);
  outline: 2px solid transparent; outline-offset: 1px; }
.zelle-zeichen { font-weight: 700; }
.zelle-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zelle.zustand-ok a { color: var(--a400); padding: 0 6px; }
.zelle.zustand-ok .zelle-zeichen { display: flex; align-items: center; justify-content: center; width: 19px; height: 19px;
  border-radius: 9999px; background: var(--a50); border: 1px solid var(--a72); color: var(--a600); font-size: 10px; }
.zelle.zustand-frei a { background: var(--lime); border-color: var(--lime-rand); color: var(--a700); font-weight: 600; }
.zelle.zustand-vor a { background: #fff; border-color: var(--lime-700); color: var(--lime-text); font-weight: 600; }
.zelle.zustand-lauf a { background: var(--lauf-grund); border-color: var(--lauf-grund); color: var(--lauf-text); font-weight: 500; }
.zelle.zustand-stopp a { background: var(--stopp-grund); border-color: var(--stopp-linie); color: var(--stopp-text); font-weight: 600; }
.zelle.zustand-hand a { background: #fff; border: 1px dashed var(--a55); color: hsl(210 29% 30%); font-weight: 500; }
.zelle.zustand-leer a { background: var(--grau-97); border-color: var(--grau-97); }
.zelle.zustand-weg a { background: #fff; border: 1px dotted hsl(210 15% 75%); color: var(--a400); }
.zelle a:hover { border-color: var(--a55); }
.zelle.gewaehlt a { outline-color: var(--a600); }
.zelle a:focus-visible { outline: 3px solid var(--a500); outline-offset: 1px; }
.matrix-leer { padding: 16px; }

/* Detailspalte */
.detail { display: flex; flex-direction: column; min-width: 0; background: var(--karte); border: 1px solid var(--linie);
  border-radius: var(--radius-lg); box-shadow: var(--schatten-hoch); }
.detail-leer { padding: 16px; color: var(--leise); }
.detail-kopf { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px 10px; border-bottom: 1px solid var(--linie); }
.detail-kopf h2 { font-size: 20px; }
.detail-rumpf { display: flex; flex-direction: column; gap: 12px; padding: 12px 16px 16px; }
.detail-stand { display: flex; align-items: center; gap: 8px; }
.detail-stand .zustand { font-size: 14px; font-weight: 600; color: var(--text); }
.detail-stand .zustand::before { display: none; }
.detail-stand .punkt { width: 14px; height: 14px; }
.klaerungsgrund { padding: 10px 12px; border: 1px solid hsl(24 80% 72%); border-radius: var(--radius-md);
  background: var(--stopp-hell); color: var(--stopp-text); font-size: 14px; font-weight: 600; }
.erklaerung { font-size: 12.5px; }
.detail .karte { border: 0; box-shadow: none; border-radius: 0; }
.detail .karte-oben { padding: 0; }
.detail .karte-rumpf { padding: 8px 0 0; }
.detail .karte-name { font-size: 17px; }
.detail .gross-wert { font-size: 28px; }

/* Automationen unter der Matrix */
.betrieb-uebersicht { display: flex; flex-direction: column; gap: 8px; }
.betrieb-kurzliste { list-style: none; display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.betrieb-kurz a { display: flex; flex-direction: column; gap: 3px; height: 100%; padding: 10px 12px; background: var(--karte);
  border: 1px solid var(--linie); border-radius: var(--radius-md); text-decoration: none; color: var(--text); }
.betrieb-kurz-kopf { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.betrieb-kurz-name { font-size: 13px; font-weight: 600; }
.betrieb-kurz-stoerung { font-size: 12px; font-weight: 600; color: var(--stopp-text); }
.betrieb-marke { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; white-space: nowrap; color: var(--leise); }
.betrieb-marke::before { content: ""; width: 8px; height: 8px; border-radius: 9999px; background: var(--grau-84); }
.betrieb-gruen .betrieb-marke { color: hsl(63 86% 22%); }
.betrieb-gruen .betrieb-marke::before { background: var(--lime-600); }
.betrieb-gelb .betrieb-marke { color: var(--stopp-text); }
.betrieb-gelb .betrieb-marke::before { background: var(--stopp-punkt); }
.betrieb-rot .betrieb-marke { color: var(--gefahr); }
.betrieb-rot .betrieb-marke::before { background: var(--gefahr); }

/* Projektdetail */
.projekt-kopf { display: flex; flex-direction: column; gap: 2px; }
.projekt-kopf h1 { font-size: 24px; }
.projekt-kopf .projekt-meta { font-size: 13px; white-space: normal; }
.projekt-stand { font-size: 13px; font-weight: 500; }
.projekt-kopf .meldung { margin-top: 8px; }
.projekt-raster { display: flex; flex-direction: column; gap: 12px; }
.projekt-schritte { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.notizen h2 { font-family: var(--schrift); font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: inherit; margin-bottom: 4px; }
.notizen ul { padding-left: 1.1em; }
.strang, .verlauf { display: flex; flex-direction: column; background: var(--karte); border: 1px solid var(--linie); border-radius: var(--radius-xl); }
.strang > h2, .verlauf > h2 { padding: 10px 14px 8px; }
.schritte { list-style: none; }
.schritt { display: flex; align-items: flex-start; gap: 10px; padding: 9px 14px; border-top: 1px solid var(--linie); }
.schritt > .punkt { margin-top: 5px; }
.schritt.gewaehlt { background: var(--grau-97); box-shadow: inset 3px 0 0 var(--a500); }
.schritt-inhalt { display: flex; flex-direction: column; gap: 2px; flex: 1 1 0; min-width: 0; }
.schritt-zeile1 { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 8px; }
.schritt-name { font-size: 13.5px; font-weight: 600; }
.schritt .zustand { font-size: 12px; }
.schritt .zustand::before { display: none; }
.schritt .notiz, .schritt .seit { font-size: 12.5px; color: var(--leise); }
.schritt .knopf { align-self: flex-start; margin-top: 4px; }
.verlauf > .leer { padding: 0 14px 12px; }
.verlaufsliste { list-style: none; }
.verlauf .verlaufsliste, .aktenverlauf .verlaufsliste { padding: 0 14px 4px; }
.verlaufsliste li { display: flex; flex-direction: column; gap: 2px; padding: 8px 0; border-top: 1px solid var(--linie); font-size: 13px; }
.verlauf-kopf { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.verlaufsliste time { font-size: 12px; color: var(--leise); }
.verlauf-schritt.abzeichen { background: var(--lauf-grund); color: var(--lauf-text); border-radius: var(--radius-sm);
  padding: 1px 7px; font-size: 11px; }
.detail .verlauf { border: 0; background: none; }
.detail .verlaufsliste { padding: 0; }

/* ---------------------------------------------------------------- Protokoll */
.filterzeilen { display: flex; flex-direction: column; gap: 6px; }
.filter ul { display: flex; flex-wrap: wrap; gap: 6px; }
.filter a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border: 1px solid var(--linie-stark);
  border-radius: var(--radius-md); background: #fff; color: var(--a500); font-size: 12.5px; font-weight: 600; text-decoration: none; }
.filter a[aria-current="true"] { background: var(--a500); border-color: var(--a500); color: #fff; }
.protokoll.tafel, .aktenverlauf.tafel { padding: 12px 0 4px; }
.protokoll .tafel-kopf, .aktenverlauf .tafel-kopf, .tafel-leer { padding-left: 14px; padding-right: 14px; }
.tafel-leer { padding-bottom: 10px; }
.protokoll-tabelle { width: 100%; border-collapse: collapse; font-size: 13px; }
.protokoll-tabelle thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.protokoll-tabelle tr { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; padding: 9px 14px; border-top: 1px solid var(--linie); }
.protokoll-tabelle td { display: block; padding: 0; }
.protokoll-tabelle .sp-zeit { font-size: 12px; color: var(--leise); flex: 1 1 auto; }
.protokoll-tabelle .sp-art { order: 1; }
.protokoll-tabelle .sp-benutzer { order: 2; flex-basis: 100%; font-weight: 600; }
.protokoll-tabelle .sp-vorgang, .protokoll-tabelle .sp-aktion, .protokoll-tabelle .sp-ergebnis { order: 3; }
.protokoll-tabelle .sp-vorgang { color: var(--leise); }
.protokoll-tabelle .sp-text, .protokoll-tabelle .sp-adresse { order: 4; flex-basis: 100%; color: var(--leise); }
.protokoll-tabelle .sp-text:empty, .protokoll-tabelle .sp-adresse:empty, .protokoll-tabelle .sp-vorgang:empty,
.protokoll-tabelle .sp-aktion:empty { display: none; }
.abzeichen-freigabe { background: var(--lime-hell); color: var(--lime-dunkel); border-radius: var(--radius-sm); padding: 1px 7px; font-size: 11px; }
.abzeichen-anmeldung, .abzeichen-betrieb { background: var(--lauf-grund); color: var(--lauf-text); border-radius: var(--radius-sm); padding: 1px 7px; font-size: 11px; }
.abzeichen-konto { background: hsl(210 15% 90%); color: hsl(210 29% 22%); border-radius: var(--radius-sm); padding: 1px 7px; font-size: 11px; }
.ergebnis { font-weight: 600; }
.ergebnis-abgelehnt .ergebnis { color: var(--stopp-text); }
.ergebnis-ok .ergebnis { color: var(--lime-text); }
.aktenverlauf .verlauf-text a { font-weight: 600; }

/* ---------------------------------------------------------------- Betrieb */
.betrieb-karten { list-style: none; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); }
.betrieb-karte { display: flex; flex-direction: column; gap: 10px; padding: 14px; background: var(--karte); border: 1px solid var(--linie);
  border-left: 4px solid var(--grau-84); border-radius: var(--radius-xl); box-shadow: var(--schatten); }
.betrieb-karte.betrieb-gruen { border-left-color: var(--lime-600); }
.betrieb-karte.betrieb-gelb { border-left-color: var(--stopp-punkt); }
.betrieb-karte.betrieb-rot { border-left-color: var(--gefahr); }
.betrieb-karte-kopf { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.betrieb-karte h2 { font-size: 17px; }
.betrieb-karte .zeile dt { min-width: 45%; }
.stoerungen-block { padding: 10px 12px; border-radius: var(--radius-md); background: var(--stopp-hell); border: 1px solid hsl(24 80% 72%); color: var(--stopp-text); }
.stoerungen-block h3 { font-family: var(--schrift); font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: inherit; margin-bottom: 4px; }
.stoerungen { padding-left: 1.1em; font-weight: 600; font-size: 13px; }
.projektliste-stand p { font-size: 13.5px; }

/* ---------------------------------------------------------------- Anmelden, Konto, Hinweise */
.anmelden, .einladung, .hinweis { width: 100%; max-width: 26rem; margin: 24px auto 0; display: flex; flex-direction: column; gap: 12px;
  padding: 20px 18px; box-shadow: var(--schatten); }
.anmelden form, .einladung form, .konto form { display: flex; flex-direction: column; gap: 4px; }
.anmelden form label, .einladung form label, .konto form label { margin-top: 8px; }
.anmelden form .knopf, .einladung form .knopf, .konto form .knopf { margin-top: 12px; width: 100%; }
.hinweis-code { font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--leise); }
.hinweis .knopf { align-self: flex-start; }
.konto { display: flex; flex-direction: column; gap: 12px; width: 100%; max-width: 40rem; }
.konto .tafel { display: flex; flex-direction: column; gap: 10px; }
.konto .zeile dt { min-width: 30%; }
.abmelden-unten .knopf { width: 100%; }

/* ---------------------------------------------------------------- Breit (ab 900px) */
@media (min-width: 900px) {
  body { font-size: 13.5px; }
  .nur-schmal { display: none !important; }
  .nur-breit { display: block !important; }
  .matrix.nur-breit { display: flex !important; }

  .kopf { flex-wrap: wrap; gap: 6px 24px; min-height: 56px; padding: 6px 24px; background: var(--a600); border-bottom: 0; }
  .kopf a { color: #fff; }
  .marke-logo-dunkel { display: none; }
  .marke-logo-hell { display: block; height: 24px; }
  .marke { gap: 14px; }
  .marke-name { font-size: 16px; color: #fff; }
  .kopf-links { flex-wrap: wrap; gap: 6px 24px; }
  .kopfleiste { display: block; }
  .tableiste { display: none; }
  .kopfleiste ul { display: flex; gap: 2px; }
  .kopfleiste a { display: flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; border-bottom: 2px solid transparent;
    color: var(--a85); font-size: 13.5px; font-weight: 500; text-decoration: none; }
  .kopfleiste a:hover { color: #fff; }
  .kopfleiste a[aria-current="page"] { color: #fff; font-weight: 600; border-bottom-color: var(--lime); }
  .kopfleiste .nav-oben { order: 2; }
  .kopfleiste .nav-oben .sym { display: none; }
  .kopfleiste .nav-text { order: 1; }
  .kopf :focus-visible { outline-color: var(--lime); }
  .kopf-benutzer { gap: 6px 18px; flex-wrap: wrap; color: #fff; font-size: 12.5px; }
  .kopf-status { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; text-decoration: none; color: #fff; }
  .kopf-status:hover { text-decoration: underline; }
  .kopf-status-punkt { width: 8px; height: 8px; border-radius: 9999px; background: var(--grau-84); }
  .kopf-status-gruen .kopf-status-punkt { background: var(--lime); }
  .kopf-status-gelb .kopf-status-punkt { background: hsl(24 92% 55%); }
  .kopf-status-rot .kopf-status-punkt { background: hsl(0 84% 62%); }
  .benutzer { color: #fff; }
  .benutzer-text { align-items: flex-start; }
  .benutzer-name { font-size: 12.5px; max-width: 14rem; }
  .benutzer-rolle { display: block; color: var(--a85); }
  .avatar { order: -1; width: 30px; height: 30px; background: var(--lime); color: var(--a700); font-size: 11.5px; font-weight: 700; }
  .abmelden { display: block; }
  .abmelden .knopf { min-height: 36px; padding: 4px 12px; color: #fff; border: 1px solid hsl(0 0% 100% / .35); font-size: 12.5px; }
  .abmelden .knopf:hover { background: hsl(0 0% 100% / .1); color: #fff; }

  .inhalt { gap: 14px; padding: 16px 24px 32px; }
  h1 { font-size: 22px; }

  /* Startseite: alle Karten im Raster */
  .karten { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); align-items: start; gap: 14px; }
  .karten-platz, .karten-platz.karte-aktuell { display: block; }
  .karte-oben { padding: 12px 16px 0; }
  .seite-freigaben .klaerungsliste { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }

  /* Vorgang allein: lesbare Breite */
  .seite-freigabe .inhalt, .seite-nicht-offen .inhalt { max-width: 760px; }

  /* Projekte */
  .kacheln ul { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
  .kachel a { flex-direction: row; align-items: center; justify-content: flex-start; gap: 14px; min-height: 68px; padding: 10px 16px; }
  .kachel-zahl { font-size: 34px; }
  .kachel-text { font-size: 14px; }
  .kachel-unter { display: block; }
  .suche { max-width: 34rem; }
  .matrix { gap: 14px; flex-wrap: wrap; align-items: flex-start; }
  .matrix-karte { flex: 999 1 720px; }
  .detail { flex: 1 1 340px; position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow-y: auto; }

  /* Projektdetail: Schritte links, Verlauf rechts */
  .seite-projekt .inhalt { max-width: 1200px; }
  .projekt-raster { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); align-items: start; gap: 14px; }

  /* Protokoll als Tabelle */
  .filterzeilen { flex-direction: row; flex-wrap: wrap; gap: 6px 24px; }
  .filter a { min-height: 36px; padding: 0 10px; }
  .tabelle-rahmen { overflow-x: auto; }
  .protokoll-tabelle { min-width: 860px; }
  .protokoll-tabelle thead { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
  .protokoll-tabelle thead tr { border-top: 0; }
  .protokoll-tabelle tr { display: table-row; }
  .protokoll-tabelle th { padding: 6px 12px; text-align: left; font-size: 11px; font-weight: 600; letter-spacing: .05em;
    text-transform: uppercase; color: var(--leise); }
  .protokoll-tabelle td, .protokoll-tabelle .sp-text:empty, .protokoll-tabelle .sp-adresse:empty,
  .protokoll-tabelle .sp-vorgang:empty, .protokoll-tabelle .sp-aktion:empty {
    display: table-cell; padding: 8px 12px; border-top: 1px solid var(--linie); vertical-align: middle; }
  .protokoll-tabelle .sp-zeit { white-space: nowrap; }
  .protokoll-tabelle .sp-benutzer { font-weight: 600; }

  .aktenverlauf .verlaufsliste li { display: grid; grid-template-columns: 140px 110px minmax(0, 1fr); align-items: center; gap: 12px; }
  .aktenverlauf .verlauf-kopf { display: contents; }
  .aktenverlauf .verlauf-schritt.abzeichen { justify-self: start; }

  /* Anmelden */
  .anmelden, .einladung, .hinweis { margin-top: 48px; }
}

@media (min-width: 1280px) {
  .karten { grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); }
}

/* Sehr schmal (unter 360px): Kopf und Kacheln enger */
@media (max-width: 359px) {
  .marke-name { display: none; }
  .kacheln ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tableiste a { font-size: 10.5px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* ---- Reiter Prozess (VERTRAG §15; nach dem Mock „Prozess“, Formensprache wie oben) ---- */
.reiter { overflow-x: auto; margin: 0 -8px; padding: 0 8px; border-bottom: 1px solid var(--linie); scrollbar-width: none; }
.reiter ul { display: flex; gap: 0; list-style: none; min-width: max-content; }
.reiter a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 9px; border-bottom: 3px solid transparent;
  color: var(--a400); font-size: 13.5px; font-weight: 500; text-decoration: none; white-space: nowrap; }
.reiter a:hover { color: var(--a700); }
.reiter a[aria-current="page"] { border-bottom-color: var(--lime); color: var(--a700); font-weight: 600; }
.reiter .zahl { line-height: 16px; min-width: 16px; font-size: 11px; }
.kopfzeile { display: flex; flex-direction: column; gap: 10px; }
.karte-knopf { flex-direction: column; gap: 0; align-items: flex-start; text-align: left; padding: 8px 14px; align-self: flex-start; }
.knopf-unter { font-size: 11.5px; font-weight: 400; color: var(--leise); }
.phasen { display: flex; flex-direction: column; gap: 12px; }
.phase .ueber { display: flex; align-items: center; gap: 8px; }
.phase-nr { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 20px; height: 20px;
  border-radius: 9999px; background: var(--a500); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: 0; }
.phase-intro { display: flex; flex-direction: column; gap: 2px; padding: 0 14px 10px; }
.phase-ziel { font-weight: 600; }
.phase .schritt { align-items: flex-start; }
.schritt-nr { flex-shrink: 0; width: 22px; margin-top: 1px; color: var(--leise); font-family: var(--titel); font-size: 13px; font-weight: 600; }
.schritt-name a { color: inherit; text-decoration: none; overflow-wrap: anywhere; }
.schritt-name a:hover { text-decoration: underline; }
.schritt-marken { display: flex; flex-wrap: wrap; gap: 4px; }
.ablauf-fuss { max-width: 60rem; }
.wer, .offen-marke, .ausnahme-marke, .neu-marke, .art, .herkunft, .prio { display: inline-flex; align-items: center; padding: 1px 7px;
  border-radius: var(--radius-sm); font-size: 11px; font-weight: 600; line-height: 1.5; white-space: nowrap; }
.wer-team { background: var(--grau-89); color: var(--a600); }
.wer-auto { background: var(--lauf-grund); color: var(--lauf-text); }
.wer-alex { background: var(--lime-hell); color: var(--lime-dunkel); }
.wer-netz { background: #fff; color: var(--a400); border: 1px dashed var(--a55); padding: 0 6px; }
.wer-donna, .wer-waechter { background: #fff; color: var(--a400); border: 1px solid var(--linie-stark); padding: 0 6px; }
.offen-marke, .prio-hoch { background: var(--stopp-grund); color: var(--stopp-text); }
.ausnahme-marke { background: #fff; color: var(--stopp-text); border: 1px solid var(--stopp-linie); padding: 0 6px; }
.neu-marke { background: var(--lime); color: var(--a700); }
.prio-mittel { background: var(--grau-89); color: var(--a600); }
.prio-niedrig, .prio-info { background: #fff; color: var(--a400); border: 1px solid var(--linie-stark); padding: 0 6px; }
.trenner { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.trenner::after { content: ""; flex: 1 1 auto; height: 1px; background: var(--linie-stark); }
.trenner-neu { color: var(--lime-text); }
.tag-kopf { margin-top: 6px; }
.eintraege { list-style: none; display: grid; gap: 10px; }
.eintrag { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; background: var(--karte); border: 1px solid var(--linie);
  border-left: 4px solid var(--grau-84); border-radius: var(--radius-xl); box-shadow: var(--schatten); min-width: 0; overflow-wrap: anywhere; }
.eintrag-neu { border-left-color: var(--lime-600); }
.eintrag-marken { display: flex; flex-wrap: wrap; gap: 6px; }
.eintrag h3 { font-size: 15.5px; }
.eintrag p { font-size: 13.5px; }
.eintrag .beleg { font-size: 12.5px; }
.eintrag-fuss { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2px 12px; font-size: 12px; color: var(--leise); }
.eintrag-meta { display: flex; flex-wrap: wrap; gap: 2px 12px; }
.eintrag-links { display: flex; flex-wrap: wrap; gap: 0 14px; }
.eintrag-fuss a { display: inline-flex; align-items: center; gap: 2px; min-height: 32px; font-weight: 600; color: var(--a500); }
.eintrag-fuss .sym { width: 14px; height: 14px; }
.art-neu { background: var(--lime-hell); color: var(--lime-dunkel); }
.art-verbessert { background: var(--lauf-grund); color: var(--lauf-text); }
.art-behoben { background: var(--stopp-grund); color: var(--stopp-text); }
.herkunft { background: #fff; color: var(--a400); border: 1px solid var(--linie-stark); padding: 0 6px; font-weight: 500; white-space: normal; }
.blaettern-leiste { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.blaettern-leiste .knopf { gap: 4px; }
.schritt-kopf { display: flex; flex-direction: column; gap: 8px; }
.schritt-kopf h1 { overflow-wrap: anywhere; }
.erkl { padding: 0; }
.erkl .tafel-kopf { padding: 12px 14px 0; margin-bottom: 0; }
.erkl-liste { margin: 0; border: 0; border-radius: 0; }
.erkl-liste .zeile { padding: 10px 14px; border-bottom: 1px solid var(--linie); flex-direction: column; gap: 3px; }
.erkl-liste .zeile:last-child { border-bottom: 0; }
.erkl-liste .zeile dt { min-width: 0; font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; }
.erkl-liste .zeile dd { flex: none; font-weight: 400; font-size: 13.5px; white-space: normal; overflow-wrap: anywhere; }
.erkl-liste dd p + p { margin-top: 6px; }
.erkl-liste ul { padding-left: 1.1em; }
.erkl-liste li + li { margin-top: 2px; }
.erkl .eintraege { padding: 10px 14px 14px; }
.erkl .eintrag { box-shadow: none; }
.erkl-mehr { padding: 0 14px 14px; font-size: 13px; font-weight: 600; }
.seite-begriffe .erkl-liste .zeile dt { text-transform: none; letter-spacing: 0; font-size: 13.5px; color: var(--text); }
.so-laeuft { align-self: flex-start; font-size: 12.5px; font-weight: 600; color: var(--a500); }
.matrix-schritte th a.so-laeuft-kopf { color: inherit; text-decoration: underline dotted; text-underline-offset: 3px; }
.hinweis-link { margin-top: 6px; }
.hinweis-link a { font-weight: 600; color: inherit; }
@media (min-width: 900px) {
  .reiter { margin: 0; padding: 0; }
  .reiter a { padding: 0 12px; }
  .kopfzeile { flex-direction: row; align-items: flex-start; justify-content: space-between; gap: 24px; }
  .kopfzeile .karte-knopf { flex-shrink: 0; }
  .phasen { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: start; gap: 14px; }
  .phase .schritt { flex-wrap: wrap; }
  .seite-neuigkeiten .inhalt, .seite-schritt .inhalt, .seite-offen .inhalt, .seite-begriffe .inhalt { max-width: 880px; }
  .erkl-liste .zeile { flex-direction: row; gap: 16px; }
  .erkl-liste .zeile dt { flex: 0 0 150px; padding-top: 2px; }
  .erkl-liste .zeile dd { flex: 1 1 0; }
  .seite-schritt .schritt-kopf { flex-direction: column; }
  .seite-schritt .knopfreihe { flex-direction: row; flex-wrap: wrap; }
  .seite-schritt .knopfreihe .knopf { width: auto; }
}
@media (max-width: 399px) { .reiter a { padding: 0 6px; font-size: 13px; } }
.seite-neuigkeiten .filter ul { gap: 4px; }
.seite-neuigkeiten .filter a { padding: 0 9px; }
.phase .begleitend { padding: 10px 14px 4px; border-top: 1px solid var(--linie); font-size: 11px; }
.phase .begleitend + .schritte .schritt:first-child { border-top: 0; }
