/*
  Kundenbereich konzeptico – EINE Stylesheet-Datei (Konzept 10.3). KSS-Corporate-Design (Business, getrennt vom
  Grothey Design System): Charcoal/Lime und Schrift aus src/Konzeptico.SafetySuite.Ui/wwwroot/konzeptico.css, Logo als
  Originaldatei (/img/konzeptico-logo.png, im dunklen Kopf wie in der internen App per Filter weiß).
  Hell/Dunkel nach System oder Option (data-theme), Schriftgröße, Kontrast und Bewegung über data-Attribute am
  html-Element. Kein Inline-Style, kein Skript, keine externen Quellen (CSP).
  Mobil zuerst: Prüfbreite 360 px bei 130 % Schrift, danach 390/768/1280 px. Alle Maße in rem, damit die Schrift-
  vergrößerung des Geräts und die Option „Schriftgröße“ das ganze Layout mitnehmen. Tippflächen mindestens 44 px.
  Kontraste (WCAG 2.2 AA, nachgerechnet 03.11.2026 nach WCAG-Formel): Hell – Text 14,7 / Nebentext 6,4 / Link 6,7 auf
  Grund, Ampeltext 8,7–12,7, Fehler 5,6, Warnung 6,5, Fokus 5,5, Feldrand 4,4; Dunkel – Text 15,2 / Nebentext 7,4 /
  Link 9,4, Ampeltext 6,9–9,1, Fehler 6,3, Warnung 6,6, Fokus 6,8, Feldrand 4,4; Kopf Weiß auf Charcoal 14,3, Lime 8,5.
*/
:root {
  --lime: #93c355;
  --lime-bright: #a5d663;
  --lime-soft: #eef7e3;
  --lime-line: #5f8a2e;
  --charcoal: #292a30;
  --charcoal-2: #36373e;
  --on-charcoal: #ffffff;
  --on-charcoal-muted: #d8d9dc;
  --ink: #202128;
  --muted: #565961;
  --border: #d9dcd6;
  --control-line: #767982;
  --surface: #ffffff;
  --surface-soft: #f8f9f6;
  --canvas: #f4f5f2;
  --accent-text: #4a6d24;
  --link: #3f5f1d;
  --focus: #2f5ec4;
  --danger: #a8323a;
  --danger-soft: #fae8e9;
  --warning-text: #7a4e17;
  --warning-soft: #fff2df;
  --low: #c9e7b8;
  --low-line: #4f7a2c;
  --medium: #ffe29a;
  --medium-line: #8a6a00;
  --high: #f4ada6;
  --high-line: #a8323a;
  --open: #eceff0;
  --open-line: #767982;
  --shadow: 0 0.25rem 1.25rem rgba(32, 33, 40, 0.06);
  --radius: 0.75rem;
  --radius-small: 0.5rem;
  --space: 1rem;
  --tap: 2.75rem;
  --font: Inter, Aptos, "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --lime-soft: #324426;
    --lime-line: #a5d663;
    --ink: #f1f2ef;
    --muted: #b8bbc0;
    --border: #46494f;
    --control-line: #8d9097;
    --surface: #292b30;
    --surface-soft: #23252a;
    --canvas: #1b1c20;
    --accent-text: #b7df82;
    --link: #b7df82;
    --focus: #8fb4ff;
    --danger: #ff9aa0;
    --danger-soft: #4b292d;
    --warning-text: #f5c27a;
    --warning-soft: #4d3a20;
    --low: #3d5a2c;
    --low-line: #a5d663;
    --medium: #5c4b17;
    --medium-line: #f5c27a;
    --high: #6a2f2b;
    --high-line: #ff9aa0;
    --open: #34373c;
    --open-line: #8d9097;
    --shadow: none;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --lime-soft: #324426;
  --lime-line: #a5d663;
  --ink: #f1f2ef;
  --muted: #b8bbc0;
  --border: #46494f;
  --control-line: #8d9097;
  --surface: #292b30;
  --surface-soft: #23252a;
  --canvas: #1b1c20;
  --accent-text: #b7df82;
  --link: #b7df82;
  --focus: #8fb4ff;
  --danger: #ff9aa0;
  --danger-soft: #4b292d;
  --warning-text: #f5c27a;
  --warning-soft: #4d3a20;
  --low: #3d5a2c;
  --low-line: #a5d663;
  --medium: #5c4b17;
  --medium-line: #f5c27a;
  --high: #6a2f2b;
  --high-line: #ff9aa0;
  --open: #34373c;
  --open-line: #8d9097;
  --shadow: none;
  color-scheme: dark;
}

/* Hoher Kontrast: Nebentexte in Textfarbe, Linien kräftig. */
:root[data-kontrast="hoch"] {
  --muted: var(--ink);
  --border: var(--ink);
  --control-line: var(--ink);
}

html { font-size: 100%; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--canvas); }
:root[data-schrift="gross"] { font-size: 118.75%; }
:root[data-schrift="sehr-gross"] { font-size: 137.5%; }

@media (prefers-reduced-motion: no-preference) {
  :root:not([data-bewegung="reduziert"]) { scroll-behavior: smooth; }
  :root:not([data-bewegung="reduziert"]) .knopf, :root:not([data-bewegung="reduziert"]) button,
  :root:not([data-bewegung="reduziert"]) .option label { transition: background-color 0.15s ease, border-color 0.15s ease; }
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  line-height: 1.55;
  color: var(--ink);
  background: var(--canvas);
  overflow-wrap: break-word;
}
main { flex: 1 0 auto; }
img { max-width: 100%; height: auto; }

a { color: var(--link); text-decoration-thickness: 0.08em; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 0.14em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.seite:focus { outline: none; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

/* Sprungmarke: nur bei Tastaturfokus sichtbar */
.sprungmarke {
  position: absolute; left: 0.5rem; top: -10rem; z-index: 20; padding: 0.75rem 1rem; border-radius: var(--radius-small);
  background: var(--surface); color: var(--ink); font-weight: 700; box-shadow: var(--shadow);
}
.sprungmarke:focus { top: 0.5rem; }

/* ---------- Kopf: Charcoal-Fläche, Lime-Akzent, Logo ---------- */
.kopf { --focus: var(--lime-bright); --link: var(--on-charcoal); background: var(--charcoal); color: var(--on-charcoal); border-bottom: 0.25rem solid var(--lime); }
.kopf-innen { max-width: 68rem; margin: 0 auto; padding: 0.75rem var(--space); display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; align-items: center; justify-content: space-between; }
.marke { display: inline-flex; flex-direction: column; gap: 0.2rem; color: var(--on-charcoal); text-decoration: none; padding: 0.25rem 0; min-height: var(--tap); justify-content: center; }
.marke img { display: block; width: 9rem; height: auto; filter: brightness(0) invert(1); }
.marke-zusatz { color: var(--lime-bright); text-transform: uppercase; letter-spacing: 0.16em; font-size: 0.7rem; font-weight: 700; }
.kopf-person { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.75rem; font-size: 0.9rem; color: var(--on-charcoal-muted); }
.kopf-person strong { color: var(--on-charcoal); font-weight: 600; }
.kopf-person .kopf-kunde { display: block; }
.kopf-person form { margin: 0; }
.knopf-kopf { min-height: var(--tap); padding: 0.4rem 0.9rem; border: 1px solid var(--on-charcoal-muted); border-radius: var(--radius-small); background: transparent; color: var(--on-charcoal); font: inherit; font-weight: 600; cursor: pointer; }
.knopf-kopf:hover { background: var(--charcoal-2); }

.navigation { background: var(--charcoal-2); }
.navigation ul { list-style: none; margin: 0 auto; padding: 0 calc(var(--space) - 0.5rem); max-width: 68rem; display: flex; flex-wrap: wrap; }
.navigation a {
  display: flex; align-items: center; min-height: var(--tap); padding: 0.25rem 0.5rem; color: var(--on-charcoal-muted);
  text-decoration: none; font-weight: 600; border-bottom: 0.2rem solid transparent;
}
.navigation a:hover { color: var(--on-charcoal); }
.navigation a[aria-current="page"] { color: var(--on-charcoal); border-bottom-color: var(--lime); }
.navigation { --focus: var(--lime-bright); }

/* ---------- Seite ---------- */
.seite { width: 100%; max-width: 68rem; margin: 0 auto; padding: 1.25rem var(--space) 2.5rem; }
.schmal { max-width: 34rem; margin-left: auto; margin-right: auto; }
main.schmal { margin: 0 auto; }

h1, h2, h3, h4 { line-height: 1.25; color: var(--ink); }
h1 { font-size: 1.6rem; margin: 0.25rem 0 0.75rem; letter-spacing: -0.01em; }
h2 { font-size: 1.25rem; margin: 2rem 0 0.75rem; }
h3 { font-size: 1.1rem; margin: 1.5rem 0 0.5rem; }
h4 { font-size: 1rem; margin: 0 0 0.25rem; }
@media (min-width: 48rem) { h1 { font-size: 1.9rem; } }
p { margin: 0 0 0.75rem; }
.einleitung { font-size: 1.05rem; max-width: 46rem; }

.pfad { font-size: 0.9rem; color: var(--muted); margin: 0 0 0.25rem; }
.pfad ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 0.4rem; }
.pfad li + li::before { content: "›"; margin-right: 0.4rem; color: var(--muted); }
.pfad a, .pfad [aria-current="page"] { display: inline-flex; align-items: center; min-height: var(--tap); padding: 0.25rem 0; }

/* Handy: aktuelle Seite steht als h1 darunter – Pfad zeigt nur die Wege zurück. */
@media (max-width: 39.99rem) { .pfad li:last-child:not(:first-child) { display: none; } }

.schritt { display: inline-block; margin: 0 0 0.25rem; padding: 0.15rem 0.6rem; border-radius: 999px; background: var(--lime-soft); color: var(--accent-text); font-weight: 700; font-size: 0.875rem; }

/* ---------- Fuß ---------- */
.fuss { flex-shrink: 0; background: var(--surface); border-top: 1px solid var(--border); color: var(--muted); font-size: 0.9rem; }
.fuss-innen { max-width: 68rem; margin: 0 auto; padding: 1.25rem var(--space) 1.5rem; display: grid; gap: 0.75rem; }
@media (min-width: 48rem) { .fuss-innen { grid-template-columns: 1fr auto; align-items: start; } }
.fuss h2 { font-size: 0.95rem; margin: 0 0 0.25rem; color: var(--ink); }
.fuss address { font-style: normal; }
.fuss ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0 1rem; }
.fuss li a { display: inline-flex; align-items: center; min-height: var(--tap); }
.fuss .hinweis-klein { grid-column: 1 / -1; margin: 0; }

/* ---------- Karten ---------- */
.karten { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.75rem; }
@media (min-width: 48rem) { .karten { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.karte { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow); min-width: 0; }
section.karte { margin: 1rem 0; }
section.karte > h2:first-child, section.karte > h2.sr-only + * { margin-top: 0; }
.karte > :last-child { margin-bottom: 0; }
.karte-titel { margin: 0 0 0.25rem; font-size: 1.05rem; }
.karte-titel a { text-decoration: none; }
.karte-titel a:hover { text-decoration: underline; }
.karte-meta { color: var(--muted); margin: 0 0 0.5rem; font-size: 0.95rem; }
.karte-zeile { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; margin: 0 0 0.75rem; }
.karte-aktion { margin: 0.75rem 0 0; }
.karte.hervor { border-left: 0.3rem solid var(--lime); }
/* KSS-41: Mitteilungen von konzeptico und Termine (Startseite). Text bleibt reiner Text, Zeilenumbrüche sichtbar. */
.mitteilung-liste, .termin-liste { list-style: none; margin: 0; padding: 0; }
.mitteilung + .mitteilung { border-top: 1px solid var(--border); margin-top: 0.75rem; padding-top: 0.75rem; }
.mitteilung-text { white-space: pre-line; overflow-wrap: anywhere; margin: 0 0 0.5rem; }
.termin { display: flex; flex-wrap: wrap; gap: 0.25rem 0.75rem; align-items: baseline; padding: 0.4rem 0; }
.termin + .termin { border-top: 1px solid var(--border); }
.termin time { font-variant-numeric: tabular-nums; font-weight: 600; min-width: 6.5rem; }
.termin-text { min-width: 0; overflow-wrap: anywhere; }
/* Fachprüfung M2/M3 (04.11.2026): Hinweis über der Liste; verstrichene Termine mit Text (nicht nur Farbe). */
.termine-hinweis { margin: 0 0 0.5rem; }
.termin-hinweis { display: block; margin-top: 0.15rem; padding: 0.1rem 0.4rem; border-radius: 0.25rem; background: var(--warning-soft); color: var(--warning-text); font-size: 0.9em; }
.bereich-titel { border-left: 0.25rem solid var(--lime); padding-left: 0.6rem; }

.angaben { margin: 0 0 0.75rem; display: grid; gap: 0.6rem; }
.angaben > div { display: grid; gap: 0.1rem; min-width: 0; }
@media (min-width: 40rem) { .angaben > div { grid-template-columns: 13rem minmax(0, 1fr); gap: 1rem; } }
.angaben dt { font-weight: 600; color: var(--muted); }
.angaben dd { margin: 0; min-width: 0; }
.liste { margin: 0; padding-left: 1.2rem; }
/* Stufe 2: Passkey-Bereiche sind ohne Skript verborgen (hidden); Regeln wie .formular { display: grid } dürfen das nicht aufheben. */
[hidden] { display: none !important; }
.stufen-liste { list-style: none; margin: 0 0 0.75rem; padding: 0; display: grid; gap: 0.5rem; }
.stufen-liste li { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.text, .kommentar-text { white-space: pre-wrap; }
/* Stufe 3: lange Dateinamen ohne Leerzeichen dürfen auf 360 px nicht seitlich überlaufen. */
.datei-name { overflow-wrap: anywhere; }

.status, .etikett {
  display: inline-block; padding: 0.15rem 0.6rem; border-radius: 999px; font-size: 0.875rem; font-weight: 600; line-height: 1.4;
  background: var(--lime-soft); color: var(--accent-text); border: 1px solid transparent;
}
.etikett { background: var(--open); color: var(--ink); font-weight: 500; }
.etikett.warnung { background: var(--warning-soft); color: var(--warning-text); }
.etikett.geaendert { background: var(--surface-soft); border-color: var(--control-line); }

/* ---------- Ampel: immer Farbe UND Text (WCAG 1.4.1) ---------- */
.stufe {
  display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.2rem 0.65rem; border-radius: var(--radius-small);
  border: 1px solid var(--open-line); background: var(--open); color: var(--ink); font-weight: 600; font-size: 0.95rem; line-height: 1.35;
}
.stufe::before { content: ""; flex: 0 0 auto; width: 0.7rem; height: 0.7rem; border-radius: 50%; background: var(--open-line); }
.stufe-niedrig { background: var(--low); border-color: var(--low-line); }
.stufe-niedrig::before { background: var(--low-line); }
.stufe-mittel { background: var(--medium); border-color: var(--medium-line); }
.stufe-mittel::before { background: var(--medium-line); border-radius: 0.1rem; }
.stufe-hoch { background: var(--high); border-color: var(--high-line); }
.stufe-hoch::before { background: var(--high-line); border-radius: 0; transform: rotate(45deg); }
.risiko { display: grid; gap: 0.5rem; margin: 0 0 1rem; }
@media (min-width: 40rem) { .risiko { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.risiko > div { display: grid; gap: 0.25rem; justify-items: start; }
.risiko .risiko-titel { font-size: 0.9rem; color: var(--muted); font-weight: 600; }

/* Risikomatrix 5 × 5 (in <details>) */
.matrix { border-collapse: separate; border-spacing: 0.2rem; margin: 0.75rem 0; font-size: 0.9rem; }
.matrix caption { text-align: left; font-weight: 700; padding: 0 0 0.25rem; }
.matrix th { font-weight: 600; padding: 0.25rem; text-align: center; color: var(--muted); }
.matrix td { min-width: 2.4rem; padding: 0.3rem 0.25rem; text-align: center; border-radius: 0.35rem; border: 1px solid var(--open-line); font-variant-numeric: tabular-nums; }
.matrix td.stufe-niedrig { background: var(--low); border-color: var(--low-line); }
.matrix td.stufe-mittel { background: var(--medium); border-color: var(--medium-line); }
.matrix td.stufe-hoch { background: var(--high); border-color: var(--high-line); }
.matrix td abbr { text-decoration: none; display: block; font-size: 0.75rem; font-weight: 700; }
.legende { list-style: none; padding: 0; margin: 0.5rem 0; display: grid; gap: 0.35rem; }

/* ---------- Fortschritt ---------- */
progress { width: 100%; height: 0.75rem; accent-color: var(--lime-line); }
.fortschritt { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: 0.75rem; }
@media (min-width: 48rem) { .fortschritt { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.fortschritt li { display: grid; gap: 0.2rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-small); padding: 0.6rem 0.75rem; }
.fortschritt .bereich { font-weight: 700; }
.fortschritt .zahlen { color: var(--muted); font-size: 0.95rem; }
.fortschritt-text { margin: 0.25rem 0; color: var(--muted); }
.fortschritt-gesamt { font-weight: 600; }

/* ---------- Formulare ---------- */
.formular { display: grid; gap: 0.5rem; margin: 0.75rem 0; }
.feld { display: grid; gap: 0.3rem; margin: 0 0 0.75rem; min-width: 0; }
label { font-weight: 600; }
input[type="text"], input[type="email"], input[type="date"], input:not([type]), select, textarea {
  display: block; width: 100%; max-width: 100%; min-height: var(--tap); padding: 0.6rem 0.75rem; font: inherit; color: var(--ink);
  background: var(--surface); border: 1px solid var(--control-line); border-radius: var(--radius-small);
}
input[type="date"] { max-width: 14rem; }
input.code { max-width: 14rem; font-size: 1.35rem; letter-spacing: 0.12em; font-variant-numeric: tabular-nums; }
textarea { resize: vertical; min-height: 6rem; }
input:disabled, select:disabled, textarea:disabled { background: var(--surface-soft); color: var(--muted); border-style: dashed; }
[aria-invalid="true"] { border-color: var(--danger); border-width: 2px; }

button, .knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; min-height: var(--tap); padding: 0.55rem 1.15rem;
  font: inherit; font-weight: 600; line-height: 1.3; text-align: center; border-radius: var(--radius-small); border: 1px solid var(--control-line);
  background: var(--surface); color: var(--ink); cursor: pointer; text-decoration: none;
}
button:hover, .knopf:hover { border-color: var(--ink); }
button.primaer, .knopf.primaer { background: var(--lime); border-color: var(--lime-line); color: #1b1c20; }
button.primaer:hover, .knopf.primaer:hover { background: var(--lime-bright); }
.knoepfe { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; margin: 1rem 0 0; }
@media (max-width: 29.99rem) { .knoepfe > .knopf, .knoepfe > button, .formular > button { width: 100%; } }
.link-knopf {
  border: 0; background: none; padding: 0.5rem 0; min-height: var(--tap); color: var(--link); text-decoration: underline;
  text-underline-offset: 0.18em; font-weight: 500; justify-content: flex-start;
}
form.inline { display: inline; }

/* Auswahlgruppen (Bewertung, Optionen): große Tippflächen, ganze Zeile klickbar */
fieldset { min-width: 0; }
.auswahl { border: 1px solid var(--border); border-radius: var(--radius); padding: 0.75rem; margin: 0 0 1rem; background: var(--surface); }
.auswahl legend { font-weight: 700; padding: 0 0.35rem; font-size: 1.05rem; }
.auswahl legend .kurz { font-weight: 500; color: var(--muted); }
.auswahl[disabled] { background: var(--surface-soft); }
.zeitpunkt { border: 0; padding: 0; margin: 0 0 1.25rem; }
.zeitpunkt > legend { font-size: 1.1rem; font-weight: 700; padding: 0; margin: 0 0 0.5rem; }
.zeitpunkt-gitter { display: grid; gap: 0.75rem; }
@media (min-width: 60rem) { .zeitpunkt-gitter { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.optionen { display: grid; gap: 0.4rem; }
.option { position: relative; }
.option input {
  position: absolute; left: 0.75rem; top: 0.8rem; width: 1.35rem; height: 1.35rem; margin: 0; accent-color: var(--lime-line);
}
.option label {
  display: block; min-height: var(--tap); padding: 0.6rem 0.75rem 0.6rem 2.75rem; border: 1px solid var(--border);
  border-radius: var(--radius-small); font-weight: 400; cursor: pointer; background: var(--surface);
}
.option label:hover { border-color: var(--control-line); }
.option input:checked + label { border-color: var(--lime-line); background: var(--lime-soft); box-shadow: inset 0.25rem 0 0 var(--lime-line); }
.option input:focus-visible + label { outline: 3px solid var(--focus); outline-offset: 2px; }
.option input:disabled + label { cursor: default; }
.option strong { font-weight: 700; }
.anker { display: block; color: var(--muted); font-size: 0.9rem; }
.optionen.reihe { grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); }
.option.einfach label { display: flex; align-items: center; }

.feldhinweis { margin: 0; color: var(--muted); font-size: 0.9rem; }
.feldhinweis.datenschutz::before { content: "Hinweis: "; font-weight: 700; }
.feldfehler { margin: 0; color: var(--danger); font-weight: 700; }
.feldfehler::before { content: "Fehler: "; }

.meldung { padding: 0.75rem 1rem; border-radius: var(--radius-small); border-left: 0.3rem solid var(--lime-line); background: var(--lime-soft); color: var(--ink); margin: 0 0 1rem; }
.meldung.fehler { border-color: var(--danger); background: var(--danger-soft); }
.meldung.warnung { border-color: var(--warning-text); background: var(--warning-soft); }
.meldung ul { margin: 0.25rem 0 0; padding-left: 1.2rem; }
.meldung > :last-child { margin-bottom: 0; }
.leer { color: var(--muted); }
.hinweis-klein { color: var(--muted); font-size: 0.9rem; }
.hinweis-kasten { background: var(--surface-soft); border: 1px solid var(--border); border-radius: var(--radius-small); padding: 0.75rem 1rem; margin: 1rem 0; }
.hinweis-kasten > :last-child { margin-bottom: 0; }
.vorschlag { background: var(--surface-soft); border: 1px solid var(--border); border-radius: var(--radius-small); padding: 0.5rem 0.75rem; }

details { margin: 0.75rem 0; }
summary {
  cursor: pointer; font-weight: 600; min-height: var(--tap); display: flex; align-items: center; gap: 0.5rem; color: var(--link);
  list-style: none;
}
summary::-webkit-details-marker { display: none; }
summary::before { content: "+"; display: inline-grid; place-items: center; flex: 0 0 auto; width: 1.4rem; height: 1.4rem; border: 1px solid currentColor; border-radius: 0.3rem; font-weight: 700; line-height: 1; }
details[open] > summary::before { content: "−"; }
details > :not(summary) { margin-left: 0; }
.methode { background: var(--surface-soft); border: 1px solid var(--border); border-radius: var(--radius-small); padding: 0 0.75rem; }
.methode[open] { padding-bottom: 0.75rem; }

/* Nachbarn (vorige/nächste Gefährdung) */
.blaettern { display: grid; gap: 0.5rem; margin: 1.5rem 0 0; }
@media (min-width: 40rem) { .blaettern { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.blaettern a { justify-content: center; }

/* ---------- Kommentare ---------- */
.kommentare { margin: 1.5rem 0 0; }
.kommentar-liste { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: 0.75rem; }
.kommentar { border: 1px solid var(--border); border-left: 0.3rem solid var(--open-line); padding: 0.6rem 0.85rem; background: var(--surface); border-radius: 0 var(--radius-small) var(--radius-small) 0; }
.kommentar.von-fachkraft { border-left-color: var(--lime-line); }
.kommentar.erledigt { background: var(--surface-soft); }
.kommentar-kopf { margin: 0 0 0.25rem; display: flex; flex-wrap: wrap; gap: 0.25rem 0.5rem; align-items: center; }
.kommentar-kopf .zeit { color: var(--muted); font-size: 0.875rem; }
.kommentar-text { margin: 0; }
.kommentar-text.zurueckgezogen { color: var(--muted); font-style: italic; }
.kommentar-aktionen { display: flex; flex-wrap: wrap; gap: 0 1.25rem; margin-top: 0.25rem; }
.kommentar-neu { display: grid; gap: 0.4rem; }
.kommentar-neu button { justify-self: start; }

/* ---------- Tabellen und Texte ---------- */
.tabelle-rahmen { max-width: 100%; overflow-x: auto; }
.tabelle { width: 100%; border-collapse: collapse; margin: 0.75rem 0; }
.tabelle caption { text-align: left; font-weight: 700; padding: 0.25rem 0; }
.tabelle th, .tabelle td { text-align: left; vertical-align: top; padding: 0.45rem 0.5rem; border-bottom: 1px solid var(--border); }
.tabelle th[scope="row"] { min-width: 7.5rem; }
.text-block { max-width: 46rem; }
.text-block h2:first-child { margin-top: 0.5rem; }
.schritte { padding-left: 1.4rem; display: grid; gap: 0.4rem; }
code { font-family: ui-monospace, Consolas, monospace; background: var(--surface-soft); padding: 0.1rem 0.3rem; border-radius: 0.25rem; overflow-wrap: anywhere; }

/* ---------- Druck ---------- */
@media print {
  :root, :root[data-theme="dark"], :root:not([data-theme="light"]) {
    --ink: #000; --muted: #333; --surface: #fff; --surface-soft: #fff; --canvas: #fff; --border: #999; --link: #000;
    --low: #c9e7b8; --medium: #ffe29a; --high: #f4ada6; --open: #eceff0; --shadow: none;
    color-scheme: light;
  }
  @page { margin: 15mm; }
  html, body { background: #fff; font-size: 11pt; }
  .sprungmarke, .navigation, .kopf-person form, .knopf, button, .link-knopf, .kommentar-neu, .kommentar-bearbeiten,
  .kommentar-aktionen, .blaettern, .vorschlag-formular, .fuss ul { display: none !important; }
  .kopf { background: #fff; color: #000; border-bottom: 2pt solid #93c355; }
  .kopf .marke img { filter: none; width: 35mm; }
  .kopf .marke-zusatz { color: #333; }
  .kopf-person, .kopf-person strong { color: #000; }
  .seite { max-width: none; padding: 0; }
  .karte, .auswahl, .fortschritt li, .kommentar, .meldung { box-shadow: none; break-inside: avoid; }
  .option label { border: 0; padding: 0.1rem 0 0.1rem 1.75rem; }
  .option input { top: 0.2rem; left: 0; }
  .option input:not(:checked) + label .anker { display: none; }
  details > :not(summary) { display: block; }
  summary::before { display: none; }
  a { text-decoration: none; }
  .fuss { border-top: 1pt solid #999; }
}

/* Band „Testumgebung“ (Kundenbereich:TestBanner) und Entwurfskasten */
.testband { margin: 0; padding: 0.4rem var(--space); text-align: center; font-size: 0.9rem; background: var(--warning-soft); color: var(--warning-text); border-bottom: 1px solid var(--warning-text); }
.entwurf { border-left: 0.3rem solid var(--warning-text); background: var(--warning-soft); color: var(--ink); padding: 0.75rem 1rem; border-radius: var(--radius-small); margin: 0 0 1rem; }
.entwurf > :last-child { margin-bottom: 0; }
.hinweise { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: 0.5rem; }
.hinweise li { border-left: 0.3rem solid var(--warning-text); background: var(--warning-soft); padding: 0.6rem 0.85rem; border-radius: var(--radius-small); }
@media print { .testband { border: 1pt solid #000; } }

/* Anbieterangaben (Impressum, Datenschutzhinweis): fehlende Angabe sichtbar, nie als eckiger Platzhalter. */
.angabe-folgt { font-style: italic; color: var(--warning-text); }
.anbieter-liste { display: grid; grid-template-columns: minmax(8rem, max-content) 1fr; gap: 0.25rem 1rem; margin: 0 0 1rem; }
.anbieter-liste dt { font-weight: 600; }
.anbieter-liste dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 30rem) { .anbieter-liste { grid-template-columns: 1fr; } .anbieter-liste dd { margin-bottom: 0.5rem; } }
/* Vertrag im Kundenbereich (AVV): Abschluss-Hinweis auf der Dokumentkarte. */
.vertrag-status { margin: 0.25rem 0 0.5rem; }
