/* Fachakademie Campus · Lernguide „Recht & Folgen“
   Farben, Schrift und Themen aus assets/farben.css (Marke_Campus/tokens) – hier nur Variablen, keine Hex-Werte
   (Ausnahme: Gefährdungsstufen aus dem Anatomie-Atlas). Hell ist Standard, dunkel über data-theme="dunkel" oder System.
   Abstandsraster 4 / 8 / 12 / 16 / 24 / 32 px, Touch-Ziele mindestens 44 px. */
@import url('assets/farben.css?v=2');

:root {
  --a1: 4px; --a2: 8px; --a3: 12px; --a4: 16px; --a5: 24px; --a6: 32px;
  --r: var(--radius-karte, 10px);
  --rk: var(--radius-knopf, 8px);
  --hoehe-knopf: 48px;
  --schatten-blatt: 0 12px 32px rgba(14, 26, 48, .18);
  /* Gefährdungsstufen – unverändert aus dem Atlas */
  --stufe4: #b3122a; --stufe3: #e0661b; --stufe2: #e8b21e; --stufe1: #4f9a5a;
  color-scheme: light;
}
:root[data-theme="dunkel"] { color-scheme: dark; --schatten-blatt: 0 12px 32px rgba(0, 0, 0, .45); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="hell"]) { color-scheme: dark; --schatten-blatt: 0 12px 32px rgba(0, 0, 0, .45); } }

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--grund); color: var(--text-2); }
body { font-family: var(--schrift); font-weight: var(--gewicht-text); font-size: 16px; line-height: 1.5; -webkit-text-size-adjust: 100%; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--fokus); outline-offset: 2px; }
[hidden] { display: none !important; }
a { color: var(--primaer); font-weight: var(--gewicht-halbfett); text-underline-offset: 2px; }
a:hover { color: var(--primaer-hover); }
h2, h3, h4 { color: var(--text); font-weight: var(--gewicht-fett); }

.app { max-width: 1120px; margin: 0 auto; padding: max(var(--a2), env(safe-area-inset-top)) var(--a4) max(var(--a6), env(safe-area-inset-bottom)); }

/* ---------- Kopfzeile ---------- */
.kopf { display: flex; align-items: center; gap: var(--a3); min-height: 64px; padding: var(--a2) 0; margin-bottom: var(--a5); border-bottom: 1px solid var(--rahmen); }
.kopf-marke { display: inline-flex; align-items: center; gap: var(--a2); flex: none; color: var(--text); text-decoration: none; }
.kopf-marke svg { width: 32px; height: 32px; flex: none; }
.marke-name { font-weight: var(--gewicht-fett); font-size: 20px; letter-spacing: .02em; color: var(--text); line-height: 1; padding-right: var(--a3); border-right: 1px solid var(--rahmen); }
.kopf h1 { flex: 1; min-width: 0; margin: 0; font-size: 18px; line-height: 1.25; font-weight: var(--gewicht-halbfett); color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.profil-btn { flex: none; display: inline-flex; align-items: center; gap: var(--a2); min-width: 44px; min-height: 44px; padding: 0 var(--a3); border: 1px solid var(--rahmen); border-radius: 22px; background: var(--flaeche); color: var(--text); font-size: 14px; font-weight: var(--gewicht-halbfett); }
.profil-btn #kontext { color: var(--text-zusatz); }
.profil-btn:hover { background: var(--flaeche-2); }
.icon-btn { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--rahmen); border-radius: var(--rk); background: var(--flaeche); color: var(--text); font-size: 24px; line-height: 1; }
.icon-btn:hover { background: var(--flaeche-2); }
.pfeil-links { width: 10px; height: 10px; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateX(2px) rotate(45deg); }

/* ---------- Raster: Hauptbereich + Seite ---------- */
.layout { display: grid; gap: var(--a5); }
.layout > * { min-width: 0; }
@media (min-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; gap: var(--a6); }
  .seite { position: sticky; top: var(--a4); }
}

/* ---------- Ansicht-Reiter (Segment-Steuerung) ---------- */
.ansichten { display: flex; gap: var(--a1); padding: var(--a1); margin-bottom: var(--a5); width: fit-content; max-width: 100%; overflow-x: auto; border-radius: calc(var(--rk) + 4px); background: var(--flaeche-2); scrollbar-width: none; }
.ansichten:empty { display: none; }
.ansichten::-webkit-scrollbar { display: none; }
.ansichten button { flex: none; display: inline-flex; align-items: center; justify-content: center; gap: var(--a2); min-height: 44px; padding: 0 var(--a4); border: 0; border-radius: var(--rk); background: transparent; color: var(--text-zusatz); font-size: 15px; font-weight: var(--gewicht-halbfett); }
.ansichten button:hover { color: var(--text); }
.ansichten button[aria-pressed="true"] { background: var(--primaer); color: var(--auf-primaer); }
.zaehler { min-width: 22px; padding: 0 6px; border-radius: 11px; background: var(--flaeche); color: var(--text); font-size: 12px; text-align: center; }

/* ---------- Texte ---------- */
.label-rot { display: block; margin: 0 0 var(--a2); font-size: 12px; font-weight: var(--gewicht-halbfett); letter-spacing: .08em; text-transform: uppercase; color: var(--text-zusatz); }
.text { margin: 0 0 var(--a3); color: var(--text-2); }
.meta { margin: var(--a1) 0 var(--a2); font-size: 13px; color: var(--text-zusatz); }
.meta.haftung { font-size: 12px; color: var(--text-leise); }
.abschnitt-titel { margin: var(--a5) 0 var(--a3); font-size: 18px; font-weight: var(--gewicht-fett); }
.lead { font-size: 16px; color: var(--text); }

/* ---------- Aufklapper ---------- */
.acc { margin-bottom: var(--a3); border: 1px solid var(--rahmen); border-radius: var(--r); background: var(--flaeche); overflow: hidden; }
.acc > summary { list-style: none; display: flex; align-items: center; gap: var(--a3); min-height: 56px; padding: var(--a2) var(--a4); color: var(--text); font-size: 16px; font-weight: var(--gewicht-fett); cursor: pointer; }
.acc > summary::-webkit-details-marker { display: none; }
.acc > summary:hover { background: var(--flaeche-2); }
.acc > summary > span { flex: 1; }
.acc > summary small { font-size: 13px; font-weight: var(--gewicht-halbfett); color: var(--text-zusatz); }
.chev { flex: none; width: 8px; height: 8px; margin: 0 var(--a1) var(--a1); border-right: 2px solid var(--text-zusatz); border-bottom: 2px solid var(--text-zusatz); transform: rotate(45deg); transition: transform .15s; }
.acc[open] > summary > .chev { transform: rotate(-135deg); margin-bottom: -4px; }
.acc-body { padding: var(--a1) var(--a4) var(--a4); }

/* ---------- Lernpfad ---------- */
.kapitel { margin: var(--a2) 0 var(--a4); }
.kapitel h3 { margin: var(--a2) 0 var(--a2); font-size: 12px; font-weight: var(--gewicht-halbfett); letter-spacing: .08em; text-transform: uppercase; color: var(--text-zusatz); }
.pfad { list-style: none; margin: 0; padding: 0; position: relative; }
.pfad li { position: relative; }
.pfad li + li::before { content: ""; position: absolute; left: 25px; top: -6px; height: 8px; width: 2px; background: var(--rahmen); }
.pfad li.erledigt + li::before { background: var(--primaer); }
.station { display: flex; align-items: center; gap: var(--a3); width: 100%; min-height: 56px; margin: var(--a1) 0; padding: var(--a2) var(--a4) var(--a2) var(--a3); border: 1px solid var(--rahmen); border-radius: var(--rk); background: var(--flaeche); color: var(--text-2); text-align: left; }
.station:hover:not(:disabled) { background: var(--flaeche-2); }
.station .nr { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--rahmen); font-size: 12px; font-weight: var(--gewicht-fett); color: var(--text-zusatz); }
.station .name { flex: 1; min-width: 0; font-weight: var(--gewicht-halbfett); color: var(--text); }
.station .dauer { flex: none; font-size: 13px; color: var(--text-leise); }
.erledigt .station .nr { border-color: var(--primaer); background: var(--primaer); color: var(--auf-primaer); }
.naechste .station { border-color: var(--primaer); box-shadow: inset 3px 0 0 var(--primaer); }
.naechste .station .nr { border-color: var(--primaer); color: var(--primaer); }
.station:disabled { opacity: .4; cursor: not-allowed; }

/* ---------- Knöpfe ---------- */
.zeile-btn { display: flex; flex-wrap: wrap; align-items: center; gap: var(--a3); margin: var(--a4) 0 var(--a5); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--a2); min-height: var(--hoehe-knopf); padding: 0 var(--a5); border: 1px solid var(--rahmen-eingabe); border-radius: var(--rk); background: var(--flaeche); color: var(--text); font-size: 16px; font-weight: var(--gewicht-halbfett); line-height: 1.2; text-decoration: none; transition: background .12s, border-color .12s; }
.btn:hover { background: var(--flaeche-2); }
.btn.haupt-btn { border-color: var(--primaer); background: var(--primaer); color: var(--auf-primaer); }
.btn.haupt-btn:hover { border-color: var(--primaer-hover); background: var(--primaer-hover); }
.btn[aria-pressed="true"] { border-color: var(--primaer); background: var(--info-flaeche); color: var(--primaer); }
.btn.breit { width: 100%; }
.btn:disabled { opacity: .4; cursor: not-allowed; }

/* ---------- Lektion ---------- */
.lektion-kopf { display: flex; align-items: flex-start; gap: var(--a3); margin-bottom: var(--a2); }
.lektion-kopf h2 { flex: 1; margin: 0; font-size: 26px; line-height: 1.2; }
.story { padding: var(--a4) var(--a5); border: 1px solid var(--rahmen); border-radius: var(--r); background: var(--flaeche); color: var(--text-2); font-size: 17px; line-height: 1.6; }
.story p { margin: 0 0 var(--a3); }
.story p:last-child { margin-bottom: 0; }
.story p.liest { color: var(--text); background: var(--info-flaeche); border-radius: 6px; }
.kasten { margin: var(--a4) 0; padding: var(--a4) var(--a5); border: 1px solid var(--rahmen); border-radius: var(--r); background: var(--flaeche); }
.kasten h3 { margin: 0 0 var(--a2); font-size: 16px; }
.kasten ul { margin: 0; padding-left: 20px; }
.kasten li { margin: 0 0 var(--a2); }
.kasten li:last-child { margin-bottom: 0; }
.kasten.rolle { border-left: 4px solid var(--marke-navy); }
:root[data-theme="dunkel"] .kasten.rolle { border-left-color: var(--text-zusatz); }
.kasten.reflexion { background: var(--flaeche-2); border-color: transparent; }
.chips { display: flex; flex-wrap: wrap; gap: var(--a2); }
.chip { display: inline-flex; align-items: center; gap: var(--a2); min-height: 44px; padding: 0 var(--a4); border: 1px solid var(--rahmen); border-radius: 22px; background: var(--flaeche); color: var(--text); font-size: 14px; font-weight: var(--gewicht-halbfett); }
.chip:hover:not(:disabled) { background: var(--flaeche-2); }
.chip[aria-pressed="true"] { border-color: var(--primaer); background: var(--primaer); color: var(--auf-primaer); }
.chip:disabled, .eintrag:disabled { opacity: .4; cursor: not-allowed; }
.chip .punkt { width: 10px; height: 10px; border-radius: 3px; }

/* ---------- Quiz ---------- */
.quiz-stand { display: flex; align-items: center; gap: var(--a3); margin: var(--a2) 0 var(--a4); font-size: 13px; color: var(--text-zusatz); }
.balken { flex: 1; height: 6px; border-radius: 3px; background: var(--flaeche-2); overflow: hidden; }
.balken i { display: block; height: 100%; border-radius: 3px; background: var(--primaer); }
.frage { margin: 0 0 var(--a4); font-size: 20px; line-height: 1.4; font-weight: var(--gewicht-fett); color: var(--text); }
.antworten { display: grid; gap: var(--a3); }
.antwort { display: flex; align-items: center; gap: var(--a3); min-height: 56px; padding: var(--a3) var(--a4); border: 1px solid var(--rahmen-eingabe); border-radius: var(--rk); background: var(--flaeche); text-align: left; color: var(--text-2); }
.antwort:hover:not(:disabled) { border-color: var(--primaer); background: var(--info-flaeche); }
.antwort .marke { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border: 2px solid var(--rahmen-eingabe); border-radius: 50%; font-size: 14px; font-weight: var(--gewicht-fett); line-height: 1; }
.antwort:disabled { cursor: default; }
.antwort.richtig { border-color: var(--erfolg); background: var(--erfolg-flaeche); color: var(--text); }
.antwort.richtig .marke { border-color: var(--erfolg); background: var(--erfolg); color: var(--flaeche); }
.antwort.richtig .marke::after { content: "✓"; }
.antwort.falsch { border-color: var(--fehler); background: var(--fehler-flaeche); color: var(--text); }
.antwort.falsch .marke { border-color: var(--fehler); background: var(--fehler); color: var(--flaeche); }
.antwort.falsch .marke::after { content: "✕"; }
.rueckmeldung { margin: var(--a4) 0; padding: var(--a3) var(--a4); border-radius: var(--rk); border: 1px solid var(--rahmen); background: var(--flaeche); }
.rueckmeldung strong { display: block; margin-bottom: var(--a1); }
.rueckmeldung.gut { border-color: var(--erfolg); background: var(--erfolg-flaeche); }
.rueckmeldung.gut strong { color: var(--erfolg); }
.rueckmeldung.schlecht { border-color: var(--fehler); background: var(--fehler-flaeche); }
.rueckmeldung.schlecht strong { color: var(--fehler); }
.ergebnis { text-align: center; padding: var(--a5) var(--a3); }
.ergebnis .zahl { font-size: 44px; font-weight: var(--gewicht-fett); color: var(--text); line-height: 1.1; }

/* ---------- Listen ---------- */
.liste { display: grid; gap: var(--a2); }
.eintrag { display: flex; align-items: center; gap: var(--a3); width: 100%; min-height: 52px; padding: var(--a2) var(--a4); border: 1px solid var(--rahmen); border-radius: var(--rk); background: var(--flaeche); text-align: left; color: var(--text-2); }
.eintrag:hover:not(:disabled) { background: var(--flaeche-2); }
.eintrag .norm { flex: none; min-width: 96px; font-size: 13px; font-weight: var(--gewicht-fett); color: var(--primaer); }
.eintrag .name { flex: 1; min-width: 0; font-weight: var(--gewicht-halbfett); color: var(--text); }
.eintrag .unter { display: block; font-weight: var(--gewicht-text); font-size: 13px; color: var(--text-zusatz); }
.eintrag small { flex: none; font-size: 12px; color: var(--text-zusatz); }
.eintrag .punkt { flex: none; width: 12px; height: 12px; border-radius: 3px; }
[data-stufe="4"] .punkt, .punkt[data-stufe="4"] { background: var(--stufe4); }
[data-stufe="3"] .punkt, .punkt[data-stufe="3"] { background: var(--stufe3); }
[data-stufe="2"] .punkt, .punkt[data-stufe="2"] { background: var(--stufe2); }
[data-stufe="1"] .punkt, .punkt[data-stufe="1"] { background: var(--stufe1); }
.stufe-marke { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: var(--gewicht-fett); color: #fff; background: var(--stufe3); }
.stufe-marke[data-stufe="4"] { background: var(--stufe4); }
.stufe-marke[data-stufe="2"] { background: #b98a10; }
.stufe-marke[data-stufe="1"] { background: var(--stufe1); }
.leer { padding: var(--a5) var(--a4); border: 1px dashed var(--rahmen-eingabe); border-radius: var(--r); color: var(--text-zusatz); text-align: center; }
.kacheln { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--a2); margin-bottom: var(--a3); }
.kachel { padding: var(--a3); border-radius: var(--rk); background: var(--flaeche-2); text-align: center; }
.kachel b { display: block; font-size: 24px; color: var(--text); }
.kachel span { font-size: 12px; color: var(--text-zusatz); }

/* ---------- Seite: Suche, Profil ---------- */
.suche { margin-bottom: var(--a4); }
.suche input { width: 100%; min-height: 48px; padding: 0 var(--a4); border: 1px solid var(--rahmen-eingabe); border-radius: var(--rk); background: var(--flaeche); color: var(--text); }
.suche input::placeholder { color: var(--text-leise); }
.treffer { display: grid; gap: var(--a1); margin-top: var(--a2); }
.treffer .eintrag { min-height: 48px; }
.feld-label { display: block; margin: var(--a4) 0 var(--a2); font-size: 13px; font-weight: var(--gewicht-halbfett); color: var(--text-zusatz); }
.segment { display: grid; grid-template-columns: 1fr 1fr; gap: var(--a2); }
.segment.drei { grid-template-columns: repeat(3, 1fr); }
.segment button { min-height: 44px; padding: var(--a2); border: 1px solid var(--rahmen); border-radius: var(--rk); background: var(--flaeche); color: var(--text-2); font-size: 14px; font-weight: var(--gewicht-halbfett); line-height: 1.2; }
.segment button:hover { background: var(--flaeche-2); }
.segment:not(.drei) button:last-child:nth-child(odd) { grid-column: 1 / -1; }
.segment button[aria-checked="true"] { border-color: var(--primaer); background: var(--primaer); color: var(--auf-primaer); }
.auswahl { position: relative; }
.auswahl::after { content: ""; position: absolute; right: var(--a4); top: 50%; width: 7px; height: 7px; margin-top: -6px; border-right: 2px solid var(--text-zusatz); border-bottom: 2px solid var(--text-zusatz); transform: rotate(45deg); pointer-events: none; }
.auswahl select { appearance: none; -webkit-appearance: none; width: 100%; min-height: 48px; padding: 0 40px 0 var(--a4); border: 1px solid var(--rahmen-eingabe); border-radius: var(--rk); background: var(--flaeche); color: var(--text); font-weight: var(--gewicht-halbfett); }
.auswahl select:disabled { color: var(--text-leise); }
.auswahl.klein { flex: none; width: 130px; }
.auswahl option { background: var(--flaeche); color: var(--text); }
.schalter-zeile { display: flex; align-items: center; gap: var(--a3); min-height: 56px; margin-top: var(--a2); padding-top: var(--a2); border-top: 1px solid var(--rahmen); color: var(--text); font-weight: var(--gewicht-halbfett); cursor: pointer; }
.schalter-zeile > span { flex: 1; display: flex; flex-direction: column; line-height: 1.3; }
.schalter-zeile small { font-size: 13px; font-weight: var(--gewicht-text); color: var(--text-zusatz); }
.schalter-zeile input[type="checkbox"] { appearance: none; -webkit-appearance: none; flex: none; position: relative; width: 48px; height: 28px; margin: 0; border-radius: 14px; background: var(--rahmen-eingabe); cursor: pointer; transition: background .15s; }
.schalter-zeile input[type="checkbox"]::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--flaeche); transition: transform .15s; }
.schalter-zeile input[type="checkbox"]:checked { background: var(--primaer); }
.schalter-zeile input[type="checkbox"]:checked::after { transform: translateX(20px); }

/* ---------- Detailfenster ---------- */
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; max-width: 720px; margin: 0 auto; height: 50dvh; display: flex; flex-direction: column; background: var(--flaeche); border: 1px solid var(--rahmen); border-bottom: 0; border-radius: 16px 16px 0 0; padding-bottom: env(safe-area-inset-bottom); box-shadow: var(--schatten-blatt); }
.sheet.zieht { transition: none; }
.sheet-kopf { position: relative; display: flex; justify-content: flex-end; padding: var(--a2) var(--a3) 0; touch-action: none; }
.sheet-griff { position: absolute; left: 50%; top: 0; width: 140px; height: 32px; margin-left: -70px; border: 0; background: transparent; cursor: ns-resize; touch-action: none; }
.sheet-griff::before { content: ""; position: absolute; left: 50px; top: 10px; width: 40px; height: 4px; border-radius: 2px; background: var(--rahmen-eingabe); }
.sheet-inhalt { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 0 var(--a5) var(--a5); }
.sheet-inhalt h3 { margin: 0 0 var(--a2); font-size: 22px; line-height: 1.25; }
.sheet-inhalt h4 { margin: var(--a4) 0 var(--a1); font-size: 14px; color: var(--text-zusatz); }
.sheet-inhalt p { margin: 0 0 var(--a3); }
.merke { margin: var(--a4) 0; padding: var(--a3) var(--a4); border-left: 4px solid var(--info); background: var(--info-flaeche); border-radius: 0 var(--rk) var(--rk) 0; color: var(--text); font-weight: var(--gewicht-halbfett); }
/* Länderbesonderheiten (Normfenster und Station „Dein Land im Vergleich“) */
.kasten.besonderheit { border-left: 4px solid var(--marke-navy); }
.besonderheiten { margin: 0 0 var(--a3); padding: 0; list-style: none; }
.besonderheiten li { display: flex; align-items: flex-start; gap: var(--a3); padding: var(--a3) 0; border-top: 1px solid var(--rahmen); }
.besonderheiten li:first-child { border-top: 0; padding-top: 0; }
.besonderheiten strong { color: var(--text); }
.besonderheiten p { margin: var(--a1) 0; color: var(--text-2); }
.abw-marke { flex: none; min-width: 64px; padding: 2px 8px; border-radius: 12px; font-size: 12px; font-weight: var(--gewicht-fett); text-align: center; background: var(--flaeche-2); color: var(--text-zusatz); }
.abw-marke[data-stufe="stark"] { background: var(--marke-navy); color: #F2F5FA; }
.abw-marke[data-stufe="mittel"] { background: var(--info-flaeche); color: var(--info); }
:root[data-theme="dunkel"] .abw-marke[data-stufe="stark"] { background: var(--rahmen); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="hell"]) .abw-marke[data-stufe="stark"] { background: var(--rahmen); } }
.merke-land { margin: var(--a3) 0; padding: var(--a3) var(--a4); border-radius: var(--rk); background: var(--flaeche-2); color: var(--text-2); font-size: 15px; }
@media (min-width: 900px) {
  .sheet { left: auto; right: max(var(--a4), calc((100vw - 1120px) / 2 + 16px)); bottom: var(--a4); width: 420px; height: calc(100dvh - 128px); border-radius: 14px; border-bottom: 1px solid var(--rahmen); }
  .sheet-griff { display: none; }
}
body[data-ansicht="willkommen"] .seite, body[data-ansicht="willkommen"] .profil-btn { display: none; }

/* ---------- Startseite ---------- */
.kacheln-bereiche { display: grid; gap: var(--a3); }
@media (min-width: 640px) { .kacheln-bereiche { grid-template-columns: 1fr 1fr; gap: var(--a4); } }
.bereich-kachel { display: flex; align-items: flex-start; gap: var(--a4); width: 100%; min-height: 112px; padding: var(--a4) var(--a5) var(--a4) var(--a4); border: 1px solid var(--rahmen); border-radius: var(--r); background: var(--flaeche); text-align: left; color: var(--text-2); transition: border-color .12s; }
.bereich-kachel:hover { border-color: var(--primaer); }
.bereich-kachel .nr { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: var(--rk); background: var(--flaeche-2); color: var(--text); font-weight: var(--gewicht-fett); }
.bereich-kachel .inhalt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--a1); }
.bereich-kachel strong { color: var(--text); font-size: 18px; font-weight: var(--gewicht-fett); }
.bereich-kachel .kurz { font-size: 14px; color: var(--text-zusatz); line-height: 1.45; }
.bereich-kachel .stand { display: flex; align-items: center; gap: var(--a3); margin-top: var(--a2); }
.bereich-kachel .stand small { flex: none; font-size: 12px; color: var(--text-zusatz); }
.willkommen h2 { margin: 0 0 var(--a2); font-size: 26px; }
.willkommen .btn { margin-top: var(--a5); }
#ansicht > .zeile-btn:first-child { margin-top: 0; }

/* ---------- Glossar ---------- */
.begriff { display: inline; padding: 0; margin: 0; border: 0; border-bottom: 1px dashed var(--primaer); background: none; color: inherit; font: inherit; line-height: inherit; cursor: help; text-align: inherit; }
.begriff:hover, .begriff:focus-visible { color: var(--primaer); border-bottom-style: solid; }
.popup { position: fixed; z-index: 40; max-width: calc(100vw - 24px); padding: var(--a3) var(--a4); border: 1px solid var(--rahmen); border-radius: var(--r); background: var(--flaeche); box-shadow: var(--schatten-blatt); }
.popup-kopf { display: flex; align-items: flex-start; gap: var(--a3); margin-bottom: var(--a1); }
.popup-kopf strong { flex: 1; color: var(--text); font-size: 15px; padding-top: 10px; }
.popup-zu { flex: none; width: 44px; height: 44px; margin: -6px -8px 0 0; border: 0; background: none; color: var(--text-zusatz); font-size: 24px; }
.popup p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--text-2); }

/* ---------- Lehrgang ---------- */
.pflicht-marke { flex: none; padding: 2px var(--a2); border-radius: 20px; background: var(--warnung-flaeche); color: var(--warnung); font-size: 11px; font-weight: var(--gewicht-fett); letter-spacing: .03em; }
.lehrgang-kasten { border-left: 4px solid var(--primaer); }

/* ---------- Gesetzestext im Wortlaut ---------- */
.wortlaut { margin: var(--a4) 0; padding: var(--a4); background: var(--flaeche-2); border-radius: var(--r); }
.wortlaut .label-rot { margin: 0 0 var(--a1); }
.wortlaut h4 { margin: var(--a3) 0 var(--a2); color: var(--text); font-size: 15px; }
.wortlaut .wl-absatz { margin: 0 0 var(--a3); }
.wortlaut .wl-absatz p { font-size: 14px; line-height: 1.6; color: var(--text-2); margin: 0 0 var(--a1); overflow-wrap: anywhere; }
.wortlaut .wl-punkt { display: grid; grid-template-columns: 2.4em 1fr; padding-left: 0; }
.wortlaut .wl-punkt[data-tiefe="2"] { padding-left: 2.4em; }
.wortlaut .wl-punkt[data-tiefe="3"] { padding-left: 4.8em; }
.wortlaut .wl-marke { color: var(--text-zusatz); }
.wortlaut p.meta { font-size: 12px; margin: var(--a2) 0 0; }
@media (max-width: 520px) {
  .wortlaut { padding: var(--a3); }
  .wortlaut .wl-punkt { grid-template-columns: 2em 1fr; }
  .wortlaut .wl-punkt[data-tiefe="2"] { padding-left: 1.2em; }
  .wortlaut .wl-punkt[data-tiefe="3"] { padding-left: 2.4em; }
}

/* ---------- Zahlen & Fakten ---------- */
.kasten.fakten { border-left: 4px solid var(--rahmen-eingabe); }
.fakt { padding: var(--a3) 0; border-top: 1px solid var(--rahmen); }
.fakt:first-of-type { border-top: 0; padding-top: 2px; }
.fakt p { margin: 0 0 var(--a2); }
.fakt-zahl { font-size: 24px; line-height: 1.2; font-weight: var(--gewicht-fett); color: var(--text); }
.fakt-titel { font-size: 13px; font-weight: var(--gewicht-halbfett); color: var(--text-zusatz); }
.fakt-einordnung { color: var(--text-zusatz); }
.fakt-einordnung strong { color: var(--text-2); }
.fakt .meta a { font-weight: var(--gewicht-halbfett); }

/* ---------- Anatomie: Legende und Techniken ---------- */
.legende { display: flex; flex-wrap: wrap; gap: var(--a2) var(--a4); margin: 0 0 var(--a3); font-size: 13px; color: var(--text-zusatz); }
.legende span { display: inline-flex; align-items: center; gap: 6px; }
.punkt { display: inline-block; flex: none; width: 11px; height: 11px; border-radius: 3px; }
.mech-liste { margin-top: var(--a3); }
.mech { padding: var(--a3) var(--a4); border: 1px solid var(--rahmen); border-left: 4px solid var(--stufe2); border-radius: var(--rk); background: var(--flaeche); }
.mech[data-stufe="4"] { border-left-color: var(--stufe4); }
.mech[data-stufe="3"] { border-left-color: var(--stufe3); }
.mech[data-stufe="1"] { border-left-color: var(--stufe1); }
.mech-kopf { display: flex; flex-wrap: wrap; align-items: center; gap: var(--a1) var(--a3); width: 100%; min-height: 44px; padding: 0; border: 0; background: none; text-align: left; color: var(--text); }
.mech-kopf small { flex-basis: 100%; color: var(--text-zusatz); font-size: 13px; font-weight: var(--gewicht-halbfett); }
.mech p { margin: var(--a1) 0 0; font-size: 15px; }
.mech-dl dt { margin-top: var(--a3); font-weight: var(--gewicht-fett); color: var(--text); font-size: 14px; }
.mech-dl dd { margin: 2px 0 0; }

/* ---------- Szenarien: Bewertung (gut / vertretbar / kritisch) ---------- */
.szenario-eintrag .name { display: flex; flex-direction: column; }
.szenario-eintrag .unter { font-weight: var(--gewicht-text); color: var(--text-zusatz); font-size: 13px; }
.wertung-marke { flex: none; display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: var(--gewicht-fett); background: var(--flaeche-2); color: var(--text-zusatz); }
.wertung-marke[data-wertung="gut"] { background: var(--erfolg-flaeche); color: var(--erfolg); }
.wertung-marke[data-wertung="vertretbar"] { background: var(--warnung-flaeche); color: var(--warnung); }
.wertung-marke[data-wertung="kritisch"] { background: var(--fehler-flaeche); color: var(--fehler); }
.wertung-marke.gross { font-size: 15px; padding: 6px var(--a4); margin: var(--a2) 0 var(--a3); }
.rueckmeldung.wertung { border-left: 4px solid var(--rahmen); }
.rueckmeldung.wertung[data-wertung="gut"] { border-left-color: var(--erfolg); }
.rueckmeldung.wertung[data-wertung="gut"] strong { color: var(--erfolg); }
.rueckmeldung.wertung[data-wertung="vertretbar"] { border-left-color: var(--warnung); }
.rueckmeldung.wertung[data-wertung="vertretbar"] strong { color: var(--warnung); }
.rueckmeldung.wertung[data-wertung="kritisch"] { border-left-color: var(--fehler); }
.rueckmeldung.wertung[data-wertung="kritisch"] strong { color: var(--fehler); }
.antwort[class*="gewaehlt-"] { border-width: 2px; color: var(--text); }
.antwort.gewaehlt-gut { border-color: var(--erfolg); background: var(--erfolg-flaeche); }
.antwort.gewaehlt-vertretbar { border-color: var(--warnung); background: var(--warnung-flaeche); }
.antwort.gewaehlt-kritisch { border-color: var(--fehler); background: var(--fehler-flaeche); }
.verlauf { margin: 0; padding-left: 22px; }
.verlauf li { margin-bottom: var(--a3); }
.verlauf li[data-wertung="gut"] strong { color: var(--erfolg); }
.verlauf li[data-wertung="vertretbar"] strong { color: var(--warnung); }
.verlauf li[data-wertung="kritisch"] strong { color: var(--fehler); }

/* ---------- Berichtstrainer ---------- */
.bericht-feld { width: 100%; margin: var(--a4) 0 var(--a1); padding: var(--a3) var(--a4); border: 1px solid var(--rahmen-eingabe); border-radius: var(--rk); background: var(--flaeche); color: var(--text); font: inherit; line-height: 1.5; resize: vertical; }
.bericht-feld::placeholder { color: var(--text-leise); }
.pruefliste { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--a2); }
.pruefliste li { display: flex; align-items: flex-start; gap: var(--a3); padding: var(--a3); border: 1px solid var(--rahmen); border-radius: var(--rk); background: var(--flaeche); }
.pruefliste li.ok { border-color: var(--erfolg); background: var(--erfolg-flaeche); }
.pruefliste input { flex: none; width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--primaer); }
.pruefliste label { display: flex; flex-direction: column; gap: 2px; cursor: pointer; }
.pruefliste strong { color: var(--text); }
.pruefliste .auto { color: var(--erfolg); font-weight: var(--gewicht-fett); }
.pruefliste .meta { margin: 0; }

/* ---------- Angebot je Rolle, Ernstfall, Frage des Tages, Grenzen, Quellen (17.10.2026) ---------- */
.kacheln-bereiche.vertiefung .bereich-kachel { min-height: 88px; padding-top: var(--a3); padding-bottom: var(--a3); background: var(--flaeche-2); border-color: transparent; }
.kacheln-bereiche.vertiefung .bereich-kachel:hover { border-color: var(--primaer); }
.kacheln-bereiche.vertiefung .bereich-kachel strong { font-size: 16px; }
.kacheln-bereiche.vertiefung .bereich-kachel .nr { background: var(--flaeche); }
/* Übersicht (Guide-Startseite und Portal): Lernstand als Markenfläche (Navy), Abschnitte, Werkzeugkarten */
:root { --ls-grund: var(--marke-navy); --ls-text: #F2F5FA; --ls-leise: #B9C6DC; --ls-spur: #2E4672; --ls-balken: var(--marke-hellblau); }
:root[data-theme="dunkel"] { --ls-grund: var(--flaeche-2); --ls-spur: var(--rahmen); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="hell"]) { --ls-grund: var(--flaeche-2); --ls-spur: var(--rahmen); } }
.lernstand { margin: 0 0 var(--a5); padding: var(--a5); border-radius: var(--r); background: var(--ls-grund); color: var(--ls-text); }
.lernstand .ls-kopf { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--a4); }
.lernstand .ls-label { margin: 0; font-size: 12px; font-weight: var(--gewicht-halbfett); letter-spacing: .08em; text-transform: uppercase; color: var(--ls-leise); }
.lernstand .ls-zahl { margin: var(--a1) 0 0; font-size: 40px; font-weight: var(--gewicht-fett); line-height: 1.05; color: var(--ls-text); }
.lernstand .ls-text { margin: var(--a1) 0 0; font-size: 14px; color: var(--ls-leise); }
.lernstand .ls-werte { display: flex; gap: var(--a5); }
.lernstand .ls-werte span { display: flex; flex-direction: column; font-size: 12px; color: var(--ls-leise); }
.lernstand .ls-werte b { font-size: 20px; color: var(--ls-text); }
.lernstand .ls-balken { height: 8px; margin: var(--a4) 0; border-radius: 4px; background: var(--ls-spur); overflow: hidden; }
.lernstand .ls-balken i, .lernstand .ls-mini i { display: block; height: 100%; background: var(--ls-balken); border-radius: inherit; }
.lernstand .ls-bereiche { display: grid; gap: var(--a2) var(--a5); margin: 0 0 var(--a4); padding: 0; list-style: none; font-size: 13px; color: var(--ls-leise); }
@media (min-width: 640px) { .lernstand .ls-bereiche { grid-template-columns: 1fr 1fr; } }
.lernstand .ls-bereiche li { display: grid; grid-template-columns: minmax(0, 1fr) 72px 44px; align-items: center; gap: var(--a3); }
.lernstand .ls-bereiche small { text-align: right; }
.lernstand .ls-mini { height: 4px; border-radius: 2px; background: var(--ls-spur); overflow: hidden; }
.lernstand .ls-weiter { display: flex; flex-direction: column; gap: 2px; padding: var(--a3) 0 0; border-top: 1px solid var(--ls-spur); }
.lernstand .ls-weiter strong { font-size: 17px; color: var(--ls-text); }
.lernstand .ls-weiter span:last-child { font-size: 13px; color: var(--ls-leise); }
.lernstand .ls-knoepfe { display: flex; flex-wrap: wrap; gap: var(--a3); margin-top: var(--a4); }
.lernstand .ls-zweit { background: transparent; border-color: var(--ls-leise); color: var(--ls-text); }
.lernstand .ls-zweit:hover { background: var(--ls-spur); }
.abschnitt-kopf { margin: var(--a6) 0 var(--a3); }
.abschnitt-kopf h2 { margin: 0; font-size: 20px; color: var(--text); }
.abschnitt-kopf .meta { margin: var(--a1) 0 0; }
.notruf-zeile { margin: var(--a2) 0 0; font-size: 14px; color: var(--text-2); }
.notruf-zeile a { color: var(--primaer); font-weight: var(--gewicht-halbfett); }
.werkzeuge { display: grid; gap: var(--a3); }
@media (min-width: 640px) { .werkzeuge { grid-template-columns: 1fr 1fr; } }
.werkzeug { position: relative; display: flex; align-items: flex-start; gap: var(--a4); width: 100%; min-height: 96px; padding: var(--a4); border: 1px solid var(--rahmen); border-radius: var(--r); background: var(--flaeche); color: var(--text-2); text-align: left; text-decoration: none; font: inherit; cursor: pointer; transition: border-color .12s; }
.werkzeug:hover { border-color: var(--primaer); }
.werkzeug .wz-icon { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--rk); background: var(--flaeche-2); color: var(--primaer); }
.werkzeug .wz-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.werkzeug[data-gruppe="nachschlagen"] .wz-icon { background: var(--marke-navy); color: #F2F5FA; }
:root[data-theme="dunkel"] .werkzeug[data-gruppe="nachschlagen"] .wz-icon { background: var(--rahmen); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="hell"]) .werkzeug[data-gruppe="nachschlagen"] .wz-icon { background: var(--rahmen); } }
.werkzeug .wz-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.werkzeug .wz-art { font-size: 11px; font-weight: var(--gewicht-halbfett); letter-spacing: .06em; text-transform: uppercase; color: var(--text-zusatz); }
.werkzeug strong { font-size: 16px; color: var(--text); }
.werkzeug .wz-kurz { font-size: 14px; line-height: 1.45; color: var(--text-zusatz); }
.werkzeug .wz-zahl { position: absolute; top: var(--a3); right: var(--a3); min-width: 24px; padding: 2px 8px; border-radius: 12px; background: var(--primaer); color: var(--auf-primaer); font-size: 12px; text-align: center; }
.tagesfrage .frage { margin: 0 0 var(--a3); }
.tagesfrage .zeile-btn { margin-bottom: 0; }
.kasten.grenzen { border-left: 4px solid var(--warnung); background: var(--warnung-flaeche); border-color: var(--warnung); }
.kasten.grenzen dl { display: grid; grid-template-columns: max-content 1fr; gap: var(--a2) var(--a4); margin: 0; }
.kasten.grenzen dt { font-weight: var(--gewicht-fett); color: var(--text); }
.kasten.grenzen dd { margin: 0; color: var(--text-2); }
.quellen { margin: 0 0 var(--a3); padding-left: 20px; color: var(--text-2); font-size: 14px; }
.quellen li { margin-bottom: var(--a2); }
.quellen a, .nummer a { color: var(--primaer); }
.hinweis-kompass { padding: var(--a3) var(--a4); border-radius: var(--rk); background: var(--flaeche-2); }
.kompass-verlauf { margin: 0 0 var(--a4); padding-left: 20px; color: var(--text-zusatz); font-size: 14px; }
.kompass-verlauf li { margin-bottom: var(--a1); }
.kompass-ergebnis { border-left: 4px solid var(--rahmen-eingabe); }
.kompass-ergebnis h2 { margin: var(--a2) 0; font-size: 20px; }
.kompass-ergebnis[data-art="ja"] { border-left-color: var(--erfolg); }
.kompass-ergebnis[data-art="vorsicht"] { border-left-color: var(--warnung); }
.kompass-ergebnis[data-art="nein"] { border-left-color: var(--fehler); }
.wertung-marke[data-art="ja"] { background: var(--erfolg-flaeche); color: var(--erfolg); }
.wertung-marke[data-art="vorsicht"] { background: var(--warnung-flaeche); color: var(--warnung); }
.wertung-marke[data-art="nein"] { background: var(--fehler-flaeche); color: var(--fehler); }
.checkliste { margin: 0 0 var(--a4); padding-left: 24px; }
.checkliste li { margin-bottom: var(--a4); }
.checkliste li p { margin: var(--a1) 0 var(--a2); color: var(--text-2); }
.checkliste strong { color: var(--text); }
.nummern { gap: var(--a3); }
.nummer { display: flex; align-items: flex-start; gap: var(--a4); padding: var(--a3) var(--a4); border: 1px solid var(--rahmen); border-radius: var(--r); background: var(--flaeche); }
.nummer p { margin: var(--a1) 0 0; color: var(--text-2); font-size: 14px; }
.nummer strong { color: var(--text); }
.nummer-ruf { flex: none; display: inline-flex; align-items: center; justify-content: center; min-width: 132px; min-height: 48px; padding: 0 var(--a3); border-radius: var(--rk); background: var(--primaer); color: var(--auf-primaer) !important; font-weight: var(--gewicht-fett); font-size: 16px; text-decoration: none; white-space: nowrap; }

/* ---------- Handy ---------- */
@media (max-width: 520px) {
  .kopf { gap: var(--a2); min-height: 56px; margin-bottom: var(--a4); }
  .kopf-marke svg { width: 28px; height: 28px; }
  .marke-name { font-size: 17px; padding-right: var(--a2); }
  .kopf h1 { font-size: 16px; }
  .profil-btn #kontext { display: none; }
  .profil-btn { padding: 0; justify-content: center; }
  .ansichten { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); width: 100%; overflow: visible; }
  .ansichten button { padding: 0 var(--a2); font-size: 14px; }
  .lektion-kopf h2 { font-size: 22px; }
  .story { padding: var(--a4); font-size: 16px; }
  .kasten { padding: var(--a4); }
  .zeile-btn .btn { flex: 1 1 auto; }
  .sheet-inhalt { padding: 0 var(--a4) var(--a5); }
  .nummer { flex-direction: column; gap: var(--a2); }
  .kasten.grenzen dl { grid-template-columns: 1fr; gap: 2px; }
  .kasten.grenzen dd { margin-bottom: var(--a2); }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
@media print { .kopf, .seite, .ansichten, .zeile-btn { display: none !important; } body { background: #fff; } }
