/* vademio – Design-System
   Farbprofil: Petrol als Primärfarbe (ruhig, medizinisch), semantische Farben für Richtig/Falsch,
   eigene ordinale Skala für die fünf Relevanzstufen. Alle Textfarben ≥ 4.5:1 (WCAG AA), Bedienrahmen ≥ 3:1.
   Mobile-first: Navigation unten, Aktionen im Daumenbereich; ab 720 px Navigation oben. */

:root {
  color-scheme: light;
  /* Flächen & Text */
  --bg: #F5F7F8; --flaeche: #FFFFFF; --flaeche-2: #EDF1F3; --flaeche-3: #E3E9EC;
  --text: #14212B; --text-2: #4A5A66; --rand: #D5DDE2; --rand-stark: #8697A2;
  /* Primär */
  --primaer: #0B6B6F; --primaer-hover: #095A5D; --primaer-fg: #FFFFFF; --primaer-weich: #E3F1F1;
  /* Semantik */
  --gut: #1B7F4B; --gut-weich: #E4F3EA; --schlecht: #B42318; --schlecht-weich: #FBE9E7; --warn: #9A6200; --warn-weich: #FDF3DC;
  --auf-farbe: #FFFFFF;
  /* Relevanz 1–5 */
  --r1: #B42318; --r2: #C2410C; --r3: #2D5FB0; --r4: #4E5C66; --r5: #63727C;
  /* Raster */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px;
  --rad-s: 8px; --rad-m: 12px; --rad-l: 16px; --rad-voll: 999px;
  --schatten-1: 0 1px 2px rgba(16, 33, 43, .06), 0 1px 3px rgba(16, 33, 43, .08);
  --schatten-2: 0 4px 16px rgba(16, 33, 43, .12);
  --fokus: 0 0 0 3px color-mix(in srgb, var(--primaer) 45%, transparent);
  /* Typografie */
  --schrift: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --fs-xs: .75rem; --fs-s: .8125rem; --fs-m: .9375rem; --fs-n: 1rem; --fs-l: 1.125rem; --fs-xl: 1.3125rem; --fs-xxl: 1.625rem;
  /* Maße */
  --kopf-h: 56px; --nav-h: 64px; --inhalt-max: 760px; --ziel: 44px;
  --unten: env(safe-area-inset-bottom, 0px);
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #0E1519; --flaeche: #162026; --flaeche-2: #1E2A31; --flaeche-3: #26343C;
    --text: #E6EDF0; --text-2: #9FB0BA; --rand: #2C3A42; --rand-stark: #5E707B;
    --primaer: #4FC1C0; --primaer-hover: #6FD0CF; --primaer-fg: #06272A; --primaer-weich: #123436;
    --gut: #4CC38A; --gut-weich: #12301F; --schlecht: #F97066; --schlecht-weich: #3A1715; --warn: #F2B84B; --warn-weich: #33270C;
    --auf-farbe: #0E1519;
    --r1: #F97066; --r2: #FB923C; --r3: #8AB4F8; --r4: #9FB0BA; --r5: #7D8E99;
    --schatten-1: 0 1px 2px rgba(0, 0, 0, .4); --schatten-2: 0 6px 20px rgba(0, 0, 0, .5);
  }
}

/* ---------- Basis ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--kopf-h) + var(--s3)); }
body { margin: 0; background: var(--bg); color: var(--text); font: var(--fs-n)/1.55 var(--schrift); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { line-height: 1.25; margin: 0; }
h1 { font-size: var(--fs-xxl); font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: var(--fs-l); font-weight: 650; }
p { margin: 0 0 var(--s3); }
a { color: var(--primaer); text-underline-offset: 2px; }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: none; box-shadow: var(--fokus); border-radius: var(--rad-s); }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.gedimmt { color: var(--text-2); }
.klein { font-size: var(--fs-s); color: var(--text-2); }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- App-Rahmen ---------- */
.kopf { position: sticky; top: 0; z-index: 20; height: var(--kopf-h); display: flex; align-items: center; gap: var(--s3);
  padding: 0 var(--s4); padding-top: env(safe-area-inset-top, 0px); background: color-mix(in srgb, var(--flaeche) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--rand); }
.marke { display: flex; align-items: center; gap: var(--s2); font-weight: 750; font-size: var(--fs-l); color: var(--text); text-decoration: none; letter-spacing: -.01em; }
.marke svg { width: 26px; height: 26px; flex: none; }
.kopf .zurueck { display: none; }
.kopf-nav { display: none; margin-left: var(--s5); gap: var(--s1); }
.kopf-rechts { margin-left: auto; display: flex; align-items: center; gap: var(--s2); }

.tabnav { position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; height: calc(var(--nav-h) + var(--unten)); padding-bottom: var(--unten);
  display: grid; grid-template-columns: repeat(6, 1fr); background: var(--flaeche); border-top: 1px solid var(--rand); }
.tabnav a, .kopf-nav a { display: flex; align-items: center; justify-content: center; gap: var(--s2); text-decoration: none; color: var(--text-2); font-weight: 600; }
.tabnav a { flex-direction: column; gap: 2px; font-size: var(--fs-xs); }
.tabnav svg, .kopf-nav svg { width: 24px; height: 24px; }
.tabnav a.aktiv, .kopf-nav a.aktiv { color: var(--primaer); }
.kopf-nav a { padding: var(--s2) var(--s3); border-radius: var(--rad-s); font-size: var(--fs-m); }
.kopf-nav a:hover { background: var(--flaeche-2); }
.kopf-nav a.aktiv { background: var(--primaer-weich); }
.kopf-nav svg { width: 20px; height: 20px; }

main { max-width: var(--inhalt-max); margin: 0 auto; padding: var(--s4) var(--s4) calc(var(--nav-h) + var(--unten) + 120px); }
.seitenkopf { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s3); margin: var(--s2) 0 var(--s4); }
.abschnitt { margin-top: var(--s5); }
.abschnitt > h2 { margin-bottom: var(--s3); display: flex; align-items: baseline; justify-content: space-between; gap: var(--s3); }

/* Fokusmodus beim Lernen: Tab-Navigation ausblenden, Zurück-Knopf zeigen */
body.fokus .tabnav { display: none; }
body.fokus main { padding-bottom: calc(150px + var(--unten)); }
body.fokus .kopf .zurueck { display: inline-flex; }
body.fokus .kopf .marke { display: none; }
body.fokus #kopfinfo { font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
body.fokus .kopf-rechts { flex: 1; min-width: 0; justify-content: space-between; }

@media (min-width: 720px) {
  .tabnav { display: none; }
  .kopf-nav { display: flex; }
  main { padding: var(--s5) var(--s5) 140px; }
  body.fokus .kopf .marke { display: flex; }
  body.fokus .kopf-rechts { flex: 0 1 auto; }
  body.fokus #kopfinfo { font-weight: 400; color: var(--text-2); }
}

/* ---------- Karten / Flächen ---------- */
.flaeche { background: var(--flaeche); border: 1px solid var(--rand); border-radius: var(--rad-l); box-shadow: var(--schatten-1); }
.flaeche.innen { padding: var(--s4); }
@media (min-width: 720px) { .flaeche.innen { padding: var(--s5); } }
.trenner { height: 1px; background: var(--rand); border: 0; margin: var(--s4) 0; }

/* ---------- Knöpfe (einheitliches System) ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); min-height: var(--ziel); padding: 0 var(--s4);
  border-radius: var(--rad-m); border: 1px solid transparent; font-weight: 650; font-size: var(--fs-m); line-height: 1.2; text-decoration: none;
  cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent; transition: background-color .15s, border-color .15s, transform .05s; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-primaer { background: var(--primaer); color: var(--primaer-fg); }
.btn-primaer:hover:not(:disabled) { background: var(--primaer-hover); }
.btn-zweit { background: var(--flaeche); color: var(--text); border-color: var(--rand-stark); }
.btn-zweit:hover:not(:disabled) { background: var(--flaeche-2); }
.btn-text { background: transparent; color: var(--text-2); padding: 0 var(--s3); }
.btn-text:hover:not(:disabled) { background: var(--flaeche-2); color: var(--text); }
.btn-gut { background: var(--gut); color: var(--auf-farbe); }
.btn-schlecht { background: var(--schlecht); color: var(--auf-farbe); }
.btn-gross { min-height: 52px; font-size: var(--fs-n); border-radius: var(--rad-m); }
.btn-klein { min-height: 36px; padding: 0 var(--s3); font-size: var(--fs-s); border-radius: var(--rad-s); }
.btn-icon { width: var(--ziel); padding: 0; }
.btn-voll { width: 100%; }
.btn kbd { font: 600 var(--fs-xs)/1 var(--schrift); opacity: .7; border: 1px solid currentColor; border-radius: 4px; padding: 2px 4px; display: none; }
@media (hover: hover) and (min-width: 720px) { .btn kbd { display: inline-block; } }
.knopfreihe { display: flex; gap: var(--s2); flex-wrap: wrap; align-items: center; }

/* ---------- Chips / Badges ---------- */
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 var(--s3); border-radius: var(--rad-voll);
  border: 1px solid var(--rand-stark); background: var(--flaeche); color: var(--text); font-size: var(--fs-s); font-weight: 600; cursor: pointer; }
.chip .punkt { width: 10px; height: 10px; border-radius: 50%; background: var(--farbe, var(--rand-stark)); flex: none; }
.chip[aria-pressed="true"] { background: color-mix(in srgb, var(--farbe, var(--primaer)) 14%, var(--flaeche)); border-color: var(--farbe, var(--primaer)); }
.chip[aria-pressed="true"]::before { content: "✓"; font-weight: 800; color: var(--farbe, var(--primaer)); }
.chipreihe { display: flex; flex-wrap: wrap; gap: var(--s2); }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px var(--s2); border-radius: var(--rad-voll); font-size: var(--fs-xs); font-weight: 650;
  background: var(--flaeche-2); color: var(--text-2); white-space: nowrap; }
.badge.primaer { background: var(--primaer-weich); color: var(--primaer); }
.badge.gut { background: var(--gut-weich); color: var(--gut); }
.badge.warn { background: var(--warn-weich); color: var(--warn); }
.badge.demo { background: var(--warn-weich); color: var(--warn); }
.rel-1 { --farbe: var(--r1); } .rel-2 { --farbe: var(--r2); } .rel-3 { --farbe: var(--r3); } .rel-4 { --farbe: var(--r4); } .rel-5 { --farbe: var(--r5); }
.badge.rel { background: color-mix(in srgb, var(--farbe) 14%, var(--flaeche)); color: var(--farbe); }

/* ---------- Auswahl ---------- */
.filterkopf { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); margin-bottom: var(--s3); }
.baum { margin: 0 calc(-1 * var(--s2)); }
.baum details > summary { list-style: none; }
.baum summary::-webkit-details-marker { display: none; }
.knoten { display: grid; grid-template-columns: 32px 28px 1fr auto; align-items: center; min-height: 48px; padding: 0 var(--s2); border-radius: var(--rad-s); }
.knoten:hover { background: var(--flaeche-2); }
.knoten .auf { width: 32px; height: 32px; display: grid; place-items: center; color: var(--text-2); border-radius: var(--rad-s); cursor: pointer; }
.knoten .auf svg { width: 18px; height: 18px; transition: transform .15s; }
details[open] > summary .auf svg { transform: rotate(90deg); }
.knoten.blatt { grid-template-columns: 32px 28px 1fr auto; cursor: pointer; }
.knoten .name { min-width: 0; padding: var(--s2) var(--s2) var(--s2) 0; overflow-wrap: anywhere; line-height: 1.35; cursor: pointer; }
.ebene-1 > summary .name { font-weight: 700; }
.ebene-2 > summary .name { font-weight: 600; }
.ebene-2 { margin-left: var(--s4); }
.ebene-3 { margin-left: calc(var(--s4) * 2); }
.ebene-3 .name { font-size: var(--fs-m); }
input[type=checkbox] { width: 20px; height: 20px; margin: 0; accent-color: var(--primaer); cursor: pointer; }
.zahl { font-size: var(--fs-xs); font-weight: 650; color: var(--text-2); white-space: nowrap; font-variant-numeric: tabular-nums;
  padding: 2px var(--s2); border-radius: var(--rad-voll); background: var(--flaeche-2); }
.zahl b { color: var(--gut); }
.legende { display: flex; gap: var(--s3); flex-wrap: wrap; font-size: var(--fs-xs); color: var(--text-2); margin-top: var(--s3); }

/* fixe Start-Leiste */
.aktionsleiste { position: fixed; z-index: 15; left: 0; right: 0; bottom: calc(var(--nav-h) + var(--unten));
  background: color-mix(in srgb, var(--flaeche) 94%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--rand); padding: var(--s3) var(--s4); }
.aktionsleiste .innen { max-width: var(--inhalt-max); margin: 0 auto; display: flex; gap: var(--s3); align-items: center; }
.aktionsleiste .zusammenfassung { flex: 1; min-width: 0; font-size: var(--fs-s); color: var(--text-2); line-height: 1.3; }
.aktionsleiste .zusammenfassung b { color: var(--text); font-size: var(--fs-m); display: block; }
.aktionsleiste .startknoepfe { display: flex; gap: var(--s2); flex: none; }
@media (max-width: 559px) {
  .aktionsleiste .innen { flex-wrap: wrap; row-gap: var(--s2); }
  .aktionsleiste .zusammenfassung { flex-basis: 100%; }
  .aktionsleiste .zusammenfassung b { display: inline; margin-right: var(--s2); }
  .aktionsleiste .startknoepfe { flex: 1 1 100%; }
  .aktionsleiste .startknoepfe .btn { flex: 1; }
  .aktionsleiste .startknoepfe .btn:first-child { flex: 0 1 auto; }
  main { padding-bottom: calc(var(--nav-h) + var(--unten) + 170px); }
}
body.fokus .aktionsleiste { bottom: 0; padding-bottom: calc(var(--s3) + var(--unten)); }
@media (min-width: 720px) { .aktionsleiste { bottom: 0; padding-bottom: calc(var(--s3) + var(--unten)); } }

/* Sitzungsliste */
.liste { list-style: none; margin: 0; padding: 0; }
.liste > li { display: flex; gap: var(--s3); align-items: center; padding: var(--s3) 0; border-top: 1px solid var(--rand); }
.liste > li:first-child { border-top: 0; padding-top: 0; }
.liste > li:last-child { padding-bottom: 0; }
.liste .text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.liste .titelzeile { font-weight: 600; line-height: 1.35; }
.liste .aktionen { display: flex; gap: var(--s1); flex: none; }
.leer { color: var(--text-2); text-align: center; padding: var(--s4) 0; margin: 0; }

/* ---------- Lernen ---------- */
.fortschritt { display: flex; align-items: center; gap: var(--s3); margin-bottom: var(--s3); }
.mengen { display: flex; gap: var(--s3); font-size: var(--fs-s); color: var(--text-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.mengen b { color: var(--text); }
.bahnen { margin-left: auto; display: flex; gap: 4px; align-items: flex-end; }
.bahn { width: 10px; height: 28px; display: flex; flex-direction: column-reverse; gap: 2px; padding: 1px; border-radius: 4px; }
.bahn i { flex: 1; border-radius: 2px; background: var(--flaeche-3); }
.bahn i.an { background: var(--gut); }
.bahn.leer { opacity: .45; }
.bahn.aktuell { box-shadow: 0 0 0 2px var(--primaer); }

.lernkarte { overflow: hidden; }
.lernkarte .karteninhalt { padding: var(--s4); }
@media (min-width: 720px) { .lernkarte .karteninhalt { padding: var(--s5); } }
.pfad { font-size: var(--fs-xs); color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: var(--s2); }
.metazeile { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s2); align-items: center; margin-bottom: var(--s3); }
.frage { font-size: var(--fs-l); font-weight: 650; line-height: 1.45; }
@media (min-width: 720px) { .frage { font-size: var(--fs-xl); } }
.frage p:last-child { margin-bottom: 0; }
.antwort { margin-top: var(--s4); padding: var(--s3) var(--s4); background: var(--primaer-weich); border-left: 4px solid var(--primaer); border-radius: var(--rad-s); font-weight: 550; }
.antwort p:last-child, .antwort ul:last-child, .antwort ol:last-child { margin-bottom: 0; }
.antwort-label, .loesung-label { font-size: var(--fs-xs); font-weight: 750; letter-spacing: .06em; text-transform: uppercase; color: var(--primaer); margin-bottom: var(--s1); }
.loesung-label { color: var(--text-2); margin-top: var(--s5); }
.md { overflow-wrap: anywhere; }
.md ul, .md ol { padding-left: 1.3em; margin: 0 0 var(--s3); }
.md li { margin: 2px 0; }
.md h3, .md h4, .md h5, .md h6 { font-size: var(--fs-n); margin: var(--s4) 0 var(--s2); }
.md blockquote { margin: var(--s3) 0; padding: var(--s2) var(--s3); border-left: 4px solid var(--warn); background: var(--warn-weich); border-radius: var(--rad-s); }
.md code { background: var(--flaeche-2); padding: 0 4px; border-radius: 4px; font-size: .92em; }
.md pre { background: var(--flaeche-2); padding: var(--s3); border-radius: var(--rad-s); overflow-x: auto; }
.tabelle { overflow-x: auto; margin: var(--s3) 0; -webkit-overflow-scrolling: touch; border: 1px solid var(--rand); border-radius: var(--rad-s); }
.tabelle table { border-collapse: collapse; width: 100%; font-size: var(--fs-s); }
.tabelle th, .tabelle td { padding: var(--s2) var(--s3); border-bottom: 1px solid var(--rand); vertical-align: top; text-align: left; }
.tabelle tr:last-child td { border-bottom: 0; }
.tabelle th { background: var(--flaeche-2); font-weight: 650; }
.bilder { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--s2); margin: var(--s4) 0; }
.bilder button { position: relative; padding: 0; border: 1px solid var(--rand); border-radius: var(--rad-m); overflow: hidden; background: #fff; cursor: zoom-in; aspect-ratio: 4 / 3; }
.bilder img { display: block; width: 100%; height: 100%; object-fit: contain; }
.bilder .lupe { position: absolute; right: 6px; bottom: 6px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(0, 0, 0, .55); color: #fff; }
.bilder .lupe svg { width: 16px; height: 16px; }
.quellen { margin-top: var(--s4); font-size: var(--fs-s); color: var(--text-2); }
.quellen summary { cursor: pointer; min-height: 32px; display: flex; align-items: center; }
.quellen ul { margin: var(--s1) 0 0; padding-left: 1.2em; }

.kartenfuss { border-top: 1px solid var(--rand); background: var(--flaeche-2); padding: var(--s3) var(--s4); }
@media (min-width: 720px) { .kartenfuss { padding: var(--s3) var(--s5); } }
.kartenfuss .zeile { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); margin-bottom: var(--s2); }
.segment { display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px; padding: 2px; background: var(--flaeche-3); border-radius: var(--rad-m); }
.segment button { min-height: 40px; padding: 2px 4px; border: 0; border-radius: 10px; background: transparent; color: var(--text-2);
  font-size: var(--fs-xs); font-weight: 650; line-height: 1.15; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; }
.segment button .punkt { width: 8px; height: 8px; border-radius: 50%; background: var(--farbe); }
.segment button[aria-pressed="true"] { background: var(--flaeche); color: var(--farbe); box-shadow: var(--schatten-1); }
.segment button .vor { font-size: 9px; font-weight: 600; color: var(--text-2); }
@media (min-width: 720px) { .segment button { flex-direction: row; font-size: var(--fs-s); } }

.lernaktionen { position: fixed; z-index: 15; left: 0; right: 0; bottom: 0; padding: var(--s3) var(--s4) calc(var(--s3) + var(--unten));
  background: color-mix(in srgb, var(--flaeche) 94%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-top: 1px solid var(--rand); }
.lernaktionen .innen { max-width: var(--inhalt-max); margin: 0 auto; display: grid; gap: var(--s2); grid-template-columns: 1fr 1fr; }
.lernaktionen .innen.drei { grid-template-columns: 1fr 1fr auto; }
.lernaktionen .innen.vor { grid-template-columns: auto 1fr; }
.lernaktionen .innen.zwei { grid-template-columns: 1fr 1fr; }

/* Ansehen */
.ansichtkopf { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; margin-bottom: var(--s3); }
.ansichtkopf .klein { flex: 1; min-width: 0; }
.badge svg { width: 14px; height: 14px; flex: none; }

/* ---------- Statistik ---------- */
.kacheln { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s2); }
@media (min-width: 720px) { .kacheln { grid-template-columns: repeat(4, 1fr); gap: var(--s3); } }
.kachel { padding: var(--s3) var(--s4); }
.kachel .wert { font-size: var(--fs-xxl); font-weight: 750; font-variant-numeric: tabular-nums; line-height: 1.1; }
.kachel .bez { font-size: var(--fs-s); color: var(--text-2); }
.zeilen { list-style: none; margin: 0; padding: 0; }
.zeilen li { padding: var(--s3) 0; border-top: 1px solid var(--rand); }
.zeilen li:first-child { border-top: 0; padding-top: 0; }
.zeilen li:last-child { padding-bottom: 0; }
.zeilen .kopfzeile { display: flex; justify-content: space-between; gap: var(--s3); align-items: baseline; }
.zeilen .name { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.zeilen .zahlen { font-size: var(--fs-s); color: var(--text-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.balken { display: flex; height: 8px; border-radius: var(--rad-voll); overflow: hidden; background: var(--flaeche-3); margin-top: var(--s2); }
.balken span { display: block; height: 100%; }
.balken .g { background: var(--gut); } .balken .a { background: var(--warn); }
.legende .punkt { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 4px; vertical-align: -1px; }
.legende .g { background: var(--gut); } .legende .a { background: var(--warn); } .legende .n { background: var(--flaeche-3); }
.erledigt { opacity: .55; }

/* ---------- Overlays ---------- */
.vollbild { position: fixed; inset: 0; z-index: 50; background: rgba(5, 10, 13, .94); display: flex; align-items: center; justify-content: center; overflow: auto; }
.vollbild img { max-width: 100%; max-height: 100%; object-fit: contain; background: #fff; touch-action: pinch-zoom; cursor: zoom-in; }
.vollbild.zoom { align-items: flex-start; justify-content: flex-start; }
.vollbild.zoom img { max-width: none; max-height: none; cursor: zoom-out; }
.vollbild .schliessen { position: fixed; top: calc(var(--s3) + env(safe-area-inset-top, 0px)); right: var(--s3); z-index: 51; width: var(--ziel); height: var(--ziel);
  border-radius: 50%; border: 0; background: rgba(255, 255, 255, .92); color: #000; display: grid; place-items: center; cursor: pointer; }
.vollbild .schliessen svg { width: 22px; height: 22px; }
dialog { border: 1px solid var(--rand); border-radius: var(--rad-l); background: var(--flaeche); color: var(--text); width: min(480px, calc(100vw - 32px));
  padding: var(--s5); box-shadow: var(--schatten-2); }
dialog::backdrop { background: rgba(5, 10, 13, .55); }
dialog h2 { margin-bottom: var(--s2); }
dialog .knopfreihe { justify-content: flex-end; margin-top: var(--s4); }
label.feld { display: block; font-weight: 600; font-size: var(--fs-s); margin: var(--s3) 0 var(--s1); }
textarea, input[type=password], input[type=text] { width: 100%; padding: var(--s3); border-radius: var(--rad-m); border: 1px solid var(--rand-stark); background: var(--flaeche); }
textarea:focus, input:focus { outline: none; border-color: var(--primaer); box-shadow: var(--fokus); }
.toast { position: fixed; z-index: 60; left: 50%; transform: translateX(-50%); bottom: calc(var(--nav-h) + var(--unten) + 84px);
  max-width: calc(100vw - 32px); padding: var(--s2) var(--s4); border-radius: var(--rad-m); background: var(--text); color: var(--bg);
  font-size: var(--fs-m); font-weight: 550; box-shadow: var(--schatten-2); }
body.fokus .toast { bottom: calc(var(--unten) + 96px); }
@media (min-width: 720px) { .toast { bottom: 96px; } }
.laden { display: flex; justify-content: center; padding: var(--s6) 0; color: var(--text-2); }
.marke-akzent { color: var(--primaer); }

/* Tabellen in Lösungen: nie mitten im Wort umbrechen, bei Bedarf horizontal scrollen (mit Scroll-Schatten) */
.md .tabelle { overflow-x: auto; overscroll-behavior-x: contain;
  background: linear-gradient(to right, var(--flaeche) 30%, transparent) left / 24px 100% no-repeat local,
              linear-gradient(to left, var(--flaeche) 30%, transparent) right / 24px 100% no-repeat local,
              radial-gradient(farthest-side at 0 50%, rgba(16, 33, 43, .18), transparent) left / 10px 100% no-repeat scroll,
              radial-gradient(farthest-side at 100% 50%, rgba(16, 33, 43, .18), transparent) right / 10px 100% no-repeat scroll; }
.md .tabelle table { width: max-content; min-width: 100%; max-width: none; }
.md .tabelle th, .md .tabelle td { overflow-wrap: normal; word-break: normal; hyphens: manual; min-width: 9rem; max-width: 22rem; }
.md .tabelle th:first-child, .md .tabelle td:first-child { min-width: 0; white-space: nowrap; font-weight: 650; }

/* Angemeldeter Benutzer in der Kopfzeile (dezent; im Fokusmodus auf dem Handy ausgeblendet) */
.benutzer { display: inline-flex; align-items: center; gap: 4px; min-width: 0; max-width: 40vw; font-size: var(--fs-s); color: var(--text-2); white-space: nowrap; }
.benutzer svg { width: 16px; height: 16px; flex: none; }
#benutzername { overflow: hidden; text-overflow: ellipsis; }
body.fokus .benutzer { display: none; }
@media (min-width: 720px) {
  .benutzer { max-width: 220px; }
  body.fokus .benutzer { display: inline-flex; padding-left: var(--s2); border-left: 1px solid var(--rand); }
}

/* ---------- Praxisguides (Layout nach AMBOSS: farbige Karten, Hauptpunkte zum Abhaken) ---------- */
body.breit main { max-width: 1200px; }
.suchfeld { position: relative; margin-bottom: var(--s4); }
.suchfeld svg { position: absolute; left: var(--s3); top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--text-2); pointer-events: none; }
.suchfeld input { width: 100%; min-height: var(--ziel); padding: var(--s2) var(--s3) var(--s2) 40px; border: 1px solid var(--rand-stark);
  border-radius: var(--rad-m); background: var(--flaeche); }
.guide-einf { margin-bottom: var(--s4); }
.guide-einf summary { cursor: pointer; font-weight: 650; }
.guide-einf[open] summary { margin-bottom: var(--s3); }
.guide-kategorien { display: grid; gap: var(--s4); }
@media (min-width: 720px) { .guide-kategorien { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; } }
.guide-spalte { display: grid; gap: var(--s4); align-content: start; }
.guide-kategorie { background: var(--flaeche); border: 1px solid var(--rand); border-radius: var(--rad-l); box-shadow: var(--schatten-1); overflow: hidden; }
.guide-kategorie h2 { padding: var(--s3) var(--s4); background: var(--primaer-weich); color: var(--primaer); font-size: var(--fs-m); }
.guide-liste { list-style: none; margin: 0; padding: 0; }
.guide-liste li + li { border-top: 1px solid var(--rand); }
.guide-liste a { display: flex; align-items: center; gap: var(--s2); min-height: var(--ziel); padding: var(--s2) var(--s4); color: var(--text); text-decoration: none; }
.guide-liste a:hover { background: var(--flaeche-2); }
.guide-liste .titel { flex: 1; }
.guide-liste svg { width: 16px; height: 16px; color: var(--text-2); flex: none; }

.guide-zurueck { display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-s); font-weight: 600; text-decoration: none; min-height: 32px; }
.guide-zurueck svg { width: 16px; height: 16px; }
.guide-kopf { flex-wrap: wrap; align-items: flex-end; }
.guide-kopf .guide-kat { margin: 0 0 2px; }
.guide-kopf .knopfreihe { display: flex; align-items: center; gap: var(--s2); }
.guide-intro { margin-bottom: var(--s4); }

.guide-spalten { display: grid; gap: var(--s4); }
.guide-spalte { display: grid; gap: var(--s4); align-content: start; }
@media (min-width: 900px) { .guide-spalten { grid-template-columns: 1fr 1fr; } }

.guide-karte { --farbe: var(--text-2); background: var(--flaeche); border: 1px solid var(--rand); border-radius: var(--rad-m); box-shadow: var(--schatten-1); overflow: hidden; }
.guide-karte > h2 { padding: var(--s3) var(--s4); font-size: var(--fs-m); font-weight: 700; color: var(--farbe);
  background: color-mix(in srgb, var(--farbe) 11%, var(--flaeche)); border-bottom: 1px solid color-mix(in srgb, var(--farbe) 30%, var(--flaeche)); }
.guide-karte.typ-vorgehen { --farbe: var(--r3); }
.guide-karte.typ-ursachen { --farbe: var(--r2); }
.guide-karte.typ-warnzeichen { --farbe: var(--schlecht); }
.guide-karte.typ-prozedere { --farbe: var(--primaer); }
.guide-karteninhalt { padding: var(--s3) var(--s4) var(--s4); font-size: var(--fs-m); }
.guide-karteninhalt > :last-child { margin-bottom: 0; }

.guide-punkte, .guide-unter { list-style: none; margin: 0 0 var(--s3); padding: 0; }
.guide-punkte > li { padding: 3px 0; }
.guide-punkte li.box > label { display: flex; align-items: flex-start; gap: var(--s2); cursor: pointer; border-radius: var(--rad-s); }
.guide-punkte li.box > label input { flex: none; width: 18px; height: 18px; margin-top: 3px; }
.guide-punkte li.box > label:hover span { color: var(--farbe); }
.guide-punkte li.erledigt-punkt > label span { color: var(--text-2); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--text-2) 60%, transparent); }
.guide-punkte > li:not(.box) { position: relative; padding-left: 26px; }
.guide-punkte > li:not(.box)::before { content: ""; position: absolute; left: 7px; top: .8em; width: 5px; height: 5px; border-radius: 50%; background: var(--farbe); }
.guide-unter { margin: 2px 0 2px 26px; }
.guide-unter li { position: relative; padding: 1px 0 1px 16px; color: var(--text); }
.guide-unter li::before { content: ""; position: absolute; left: 2px; top: .72em; width: 5px; height: 5px; border-radius: 50%; border: 1.5px solid var(--text-2); }
.guide-unter li.box { padding-left: 0; }
.guide-unter li.box::before { display: none; }

.guide-box { margin: var(--s2) 0 var(--s3); padding: var(--s2) var(--s3); border-radius: var(--rad-s); background: var(--flaeche-2); border-left: 3px solid var(--rand-stark); }
.guide-box.merke, .guide-box.note { background: var(--warn-weich); border-left-color: var(--warn); }
.guide-box.leitlinie-vor { background: color-mix(in srgb, var(--primaer) 10%, transparent); border-left-color: var(--primaer); }
.ll-marke { display: inline-block; margin-left: 4px; padding: 0 4px; border-radius: 4px; background: var(--primaer); color: #fff; font-size: 10px; font-weight: 700; line-height: 15px; vertical-align: middle; }
.impf-art.typ-ll { background: var(--primaer); }
.guide-siehe { color: var(--text-2); font-size: var(--fs-s); overflow-wrap: anywhere; }
.guide-quelle { margin-top: var(--s5); overflow-wrap: anywhere; }
/* ---------- Impfkalender (Darstellung nach STIKO/RKI) ---------- */
.impf-karte { --farbe: #0B5FA5; margin-bottom: var(--s4); }
.impf-tipp { font-size: var(--fs-s); font-weight: 600; color: var(--farbe); margin: var(--s2) 0; }
.impf-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--rand); border-radius: var(--rad-s); }
.impf-tabelle { border-collapse: separate; border-spacing: 0; min-width: 1000px; width: 100%; font-size: var(--fs-s); table-layout: fixed; }
.impf-tabelle th, .impf-tabelle td { padding: 0; text-align: center; vertical-align: middle; border-bottom: 1px dotted var(--rand-stark); }
.impf-tabelle thead th { font-weight: 700; background: var(--flaeche); }
.impf-tabelle tr.gruppen th { color: #E07000; font-size: var(--fs-s); border-bottom: 0; }
.impf-tabelle tr.alter th { font-size: var(--fs-xs); height: 30px; }
.impf-tabelle tr.unters td, .impf-tabelle tr.unters th { border-bottom: 0; }
.impf-tabelle tr.unters td.seg span, .impf-tabelle tr.unters td.frei { min-height: 20px; height: auto; white-space: nowrap; overflow: hidden; }
.impf-tabelle col.spalte-kopf { width: 180px; }
.impf-tabelle .impf-kopf { position: sticky; left: 0; z-index: 1; text-align: left; background: var(--flaeche); border-right: 1px solid var(--rand); }
.impf-tabelle tr.alter .impf-kopf { background: #0B5FA5; color: #fff; }
.impf-tabelle .kopf-alter { display: flex; justify-content: space-between; align-items: center; padding: 0 var(--s2); }
.impf-tabelle tbody .impf-kopf button { all: unset; box-sizing: border-box; display: block; width: 100%; min-height: 29px; padding: 5px var(--s2); cursor: pointer; font-weight: 650; line-height: 1.2; }
.impf-tabelle tbody .impf-kopf button:hover, .impf-tabelle tbody .impf-kopf button:focus-visible { color: var(--primaer); text-decoration: underline; }
.impf-tabelle tr.tint .impf-kopf, .impf-tabelle tr.tint td.frei { background: color-mix(in srgb, #7AAB2F 25%, var(--flaeche)); }
.impf-tabelle td.seg { color: #fff; font-weight: 700; }
.impf-tabelle td.seg button, .impf-tabelle td.seg span { all: unset; box-sizing: border-box; display: flex; align-items: center; justify-content: center; width: 100%; min-height: 30px; cursor: pointer; padding: 2px; line-height: 1.15; }
.impf-tabelle td.frei { height: 30px; }
.impf-tabelle td.seg span { cursor: default; }
.impf-tabelle td.seg button:has(.zusatz) { flex-direction: column; gap: 0; }
.impf-tabelle td.seg .zeile, .impf-tabelle td.seg .zusatz { all: unset; display: block; }
.impf-tabelle td.seg .zusatz { font-size: 9px; font-weight: 600; line-height: 1; max-width: 100%; overflow: hidden; text-overflow: clip; }
.impf-tabelle tr.gruppen th { white-space: nowrap; }
.impf-tabelle td.seg button:hover, .impf-tabelle td.seg button:focus-visible { outline: 2px solid var(--text); outline-offset: -2px; }
.art-G, .art-S, .art-A { background: #0B64AE; color: #fff; }
.art-N { background: #B1C5E7; color: #fff; }
.impf-tabelle td.art-N { color: #fff; }
.art-AK { background: #7AAB2F; color: #fff; }
.art-AKN { background: #A9C97A; color: #fff; }
.art-U, .art-J { background: #F07D00; color: #fff; }
.impf-tabelle tr.unters td.seg { font-size: var(--fs-xs); font-weight: 500; border-left: 1px dashed #fff; }
.impf-tabelle td.seg + td.seg { border-left: 1px dashed rgba(255,255,255,.7); }
.impf-fnmarke { display: inline-flex; align-items: center; justify-content: center; min-width: 14px; height: 14px; margin-left: 2px; border-radius: 50%; background: var(--text); color: var(--flaeche); font-size: 10px; font-weight: 700; vertical-align: super; line-height: 1; }
.impf-legende { list-style: none; display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); padding: 0; margin: var(--s3) 0; font-size: var(--fs-s); }
.impf-legende li { display: flex; align-items: center; gap: 6px; }
.impf-legende .marke { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 3px; font-weight: 700; font-size: var(--fs-xs); }
.impf-details { margin: var(--s2) 0; }
.impf-details summary { cursor: pointer; font-weight: 650; font-size: var(--fs-s); }
.impf-fussnoten { list-style: none; padding: 0; margin: var(--s2) 0; display: grid; gap: 6px; font-size: var(--fs-s); }
.impf-fussnoten .impf-fnmarke { vertical-align: baseline; }
.impf-original { margin: var(--s3) 0; }
.impf-original img { max-width: 100%; height: auto; border: 1px solid var(--rand); border-radius: var(--rad-s); background: #fff; }
.impf-art { display: inline-block; margin-top: 4px; padding: 2px 10px; border-radius: var(--rad-voll); font-size: var(--fs-xs); font-weight: 700; color: #fff; background: #5B6B75; }
.impf-art.typ-lebend { background: #C2410C; }
.impf-art.typ-tot { background: #0B64AE; }
.impf-art.typ-mrna { background: #7C3AED; }
.impf-art.typ-antikoerper { background: #4D7C0F; }
.impf-art.typ-gemischt { background: #5B6B75; }
dialog.impf-dialog { width: min(640px, calc(100vw - 24px)); max-height: calc(100dvh - 32px); overflow-y: auto; padding: var(--s4); }
.impf-dialogkopf { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s3); margin: calc(-1 * var(--s4)) calc(-1 * var(--s4)) var(--s3); padding: var(--s4) var(--s4) var(--s2); position: sticky; top: calc(-1 * var(--s4)); z-index: 2; background: var(--flaeche); border-bottom: 1px solid var(--rand); }
.impf-dialogkopf h2 { margin: 0; }
.impf-segment { padding: var(--s2) var(--s3); border-radius: var(--rad-s); margin-bottom: var(--s3); font-size: var(--fs-s); }
.impf-segment.art-N, .impf-segment.art-AKN { color: #10233A; }
.impf-segment .impf-fn { margin-top: 4px; }
.impf-abschnitt h3 { font-size: var(--fs-m); margin: var(--s3) 0 var(--s1, 4px); color: var(--primaer); }
.impf-abschnitt ul { margin: 0; padding-left: 1.2em; font-size: var(--fs-m); }
.impf-abschnitt li + li { margin-top: 3px; }
.impf-tabelle tr.abschnitt th, .impf-tabelle tr.abschnitt td { background: var(--flaeche-2); font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--text-2); padding: 4px var(--s2); text-align: left; }
.art-alle { background: #0B64AE; color: #fff; }
.art-F { background: #B4236A; color: #fff; }
.art-M { background: #0E7C86; color: #fff; }
.art-K { background: #6D4CC2; color: #fff; }
.art-E { background: #8FB3E0; color: #fff; }
.art-P { background: #C9D6E8; color: #10233A; }
.impf-tabelle td.art-P { color: #10233A; }
.impf-art.typ-wert-positiv { background: #15803D; }
.impf-art.typ-wert-tendenziell-positiv { background: #65A30D; }
.impf-art.typ-wert-unklar { background: #A16207; }
.impf-art.typ-wert-tendenziell-negativ { background: #EA580C; }
.impf-art.typ-wert-negativ { background: #B91C1C; }
.impf-art.typ-gkv { background: #0B64AE; }
.impf-art.typ-wert-keine { background: #5B6B75; }
.impf-art.typ-igel { background: #5B6B75; }
.bewertungs-liste { list-style: none; margin: 0 0 var(--s3); padding: 0; border: 1px solid var(--rand); border-radius: var(--rad-s); overflow: hidden; }
.bewertungs-liste li + li { border-top: 1px solid var(--rand); }
.bewertungs-gruppe { font-size: var(--fs-n); margin: var(--s4) 0 var(--s1); }
.bewertungs-liste button { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: var(--s2); width: 100%; min-height: var(--ziel); padding: var(--s2) var(--s3); cursor: pointer; }
.bewertungs-liste button:hover, .bewertungs-liste button:focus-visible { background: var(--flaeche-2); }
.bewertungs-liste .titel { flex: 1; min-width: 0; hyphens: auto; overflow-wrap: break-word; }
.bewertungs-liste .impf-art { margin-top: 0; white-space: nowrap; flex: none; }
.bewertungs-liste svg { width: 16px; height: 16px; color: var(--text-2); flex: none; }
@media (max-width: 600px) {
  .bewertungs-liste button { display: grid; grid-template-columns: 1fr auto; gap: var(--s1) var(--s2); }
  .bewertungs-liste .titel { grid-column: 1; }
  .bewertungs-liste .impf-art { grid-column: 1; grid-row: 2; justify-self: start; }
  .bewertungs-liste .impf-art.typ-ll { grid-row: 3; }
  .bewertungs-liste svg { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
}
.impf-quellen { margin-top: var(--s4); }
.impf-quellen ul { padding-left: 1.2em; word-break: break-word; }
.impf-tabelle tbody .impf-kopf button { hyphens: manual; }
@media (max-width: 600px) {
  .impf-tabelle { min-width: 1060px; } .impf-tabelle col.spalte-kopf { width: 124px; }
  .impf-tabelle tbody .impf-kopf button { font-size: var(--fs-xs); }
  .impf-tabelle .kopf-alter { flex-wrap: wrap; font-size: var(--fs-xs); gap: 0 var(--s1); }
}
@media print { .kopf, .tabnav, .guide-zurueck, .guide-kopf .knopfreihe { display: none !important; } body.breit main { max-width: none; padding: 0; } }

/* Leitlinien – PDF-Katalog */
.ll-filter { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); margin: calc(-1 * var(--s2)) 0 var(--s4); font-size: var(--fs-s); color: var(--text-2); }
.ll-filter label { display: inline-flex; align-items: center; gap: var(--s2); cursor: pointer; }
.ll-quellen { display: grid; gap: var(--s3); }
.ll-quelle { background: var(--flaeche); border: 1px solid var(--rand); border-radius: var(--rad-l); box-shadow: var(--schatten-1); overflow: hidden; }
.ll-quelle > summary { display: flex; align-items: baseline; gap: var(--s2); padding: var(--s3) var(--s4); cursor: pointer; font-weight: 650; color: var(--primaer); background: var(--primaer-weich); list-style: none; }
.ll-quelle > summary::-webkit-details-marker { display: none; }
.ll-quelle > summary::before { content: "▸"; color: var(--text-2); }
.ll-quelle[open] > summary::before { content: "▾"; }
.ll-quelle > summary .zahl { margin-left: auto; font-weight: 500; font-size: var(--fs-s); color: var(--text-2); white-space: nowrap; }
.ll-liste { list-style: none; margin: 0; padding: 0; }
.ll-liste li { display: flex; align-items: center; gap: var(--s2); padding: var(--s2) var(--s2) var(--s2) var(--s4); }
.ll-liste li + li { border-top: 1px solid var(--rand); }
.ll-liste li:hover { background: var(--flaeche-2); }
.ll-liste .ll-link { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; color: var(--text); text-decoration: none; min-height: var(--ziel); justify-content: center; }
.ll-liste .ll-link:hover .ll-titel { text-decoration: underline; }
.ll-liste .ll-meta { font-size: var(--fs-xs); color: var(--text-2); }
.ll-liste .ll-meta .abgelaufen { color: var(--schlecht); font-weight: 600; }
.ll-liste .ll-laden { flex: none; display: inline-flex; align-items: center; justify-content: center; width: var(--ziel); height: var(--ziel); border-radius: var(--rad-s); color: var(--text-2); }
.ll-liste .ll-laden:hover { background: var(--primaer-weich); color: var(--primaer); }
.ll-liste .ll-laden svg { width: 20px; height: 20px; }
.ll-hinweis { font-size: var(--fs-s); color: var(--text-2); padding: var(--s2) var(--s4); }
.ll-liste .ll-datei { display: none; }
@media (min-width: 720px) { .ll-liste .ll-datei { display: inline; } }
.ll-rolle { display: inline-block; margin-right: var(--s2); padding: 0 6px; border-radius: 999px; font-size: var(--fs-xs); font-weight: 600; background: var(--flaeche-2); color: var(--text-2); }
.ll-rolle.ff { background: var(--primaer-weich); color: var(--primaer); }
.ll-reiter { display: flex; gap: var(--s2); margin-bottom: var(--s3); }
.ll-reiter button { font: inherit; font-weight: 600; padding: var(--s2) var(--s4); border-radius: 999px; border: 1px solid var(--rand); background: var(--flaeche); color: var(--text-2); cursor: pointer; min-height: 40px; }
.ll-reiter button.aktiv { background: var(--primaer); border-color: var(--primaer); color: #fff; }
.ll-liste.flaeche { background: var(--flaeche); border: 1px solid var(--rand); border-radius: var(--rad-l); box-shadow: var(--schatten-1); overflow: hidden; }
.ll-liste li.ll-inhalt { display: block; padding: var(--s3) var(--s2) var(--s3) var(--s4); }
.ll-inhalt-kopf { display: flex; align-items: center; gap: var(--s2); }
.ll-inhalt-kopf .ll-titel { font-weight: 600; }
.ll-stellen { list-style: none; margin: var(--s1) 0 0; padding: 0; display: grid; gap: 2px; }
.ll-stellen a { display: flex; gap: var(--s3); padding: var(--s1) var(--s2); border-radius: var(--rad-s); color: var(--text); text-decoration: none; font-size: var(--fs-s); line-height: 1.45; }
.ll-stellen a:hover { background: var(--flaeche-2); }
.ll-seite { flex: none; min-width: 4.2em; font-weight: 600; color: var(--primaer); }
.ll-stellen mark { background: var(--primaer-weich); color: inherit; font-weight: 650; padding: 0 1px; border-radius: 2px; }
.ll-qname { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: var(--s3); min-width: 0; }
.ll-voll { font-weight: 400; font-size: var(--fs-xs); color: var(--text-2); }

/* Konto / Passkeys */
a.benutzer { text-decoration: none; border-radius: var(--rad-s); padding: 2px 6px; }
a.benutzer:hover { background: var(--flaeche-2); color: var(--text); }
.pk h2 { margin-bottom: var(--s2); }
.pk-liste { list-style: none; margin: var(--s4) 0; padding: 0; border: 1px solid var(--rand); border-radius: var(--rad-m); }
.pk-liste li { display: flex; align-items: center; gap: var(--s3); padding: var(--s3) var(--s4); }
.pk-liste li + li { border-top: 1px solid var(--rand); }
.pk-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pk-liste .warn { color: var(--schlecht); }
.pk-neu { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--s3); }
.pk-neu label { display: flex; flex-direction: column; gap: 4px; flex: 1 1 220px; }
.pk-name { font: inherit; padding: var(--s2) var(--s3); border: 1px solid var(--rand); border-radius: var(--rad-s); background: var(--flaeche); color: var(--text); min-height: 40px; }
.hinweisband { max-width: var(--inhalt-max); margin: var(--s3) auto 0; padding: var(--s3) var(--s4); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s3);
  background: var(--primaer-weich); border: 1px solid var(--rand); border-radius: var(--rad-m); font-size: var(--fs-s); }
.hinweisband[hidden] { display: none; }
.hinweisband .knopfreihe { display: flex; gap: var(--s2); }
@media (max-width: 719px) { .hinweisband { margin: var(--s3) var(--s4) 0; } }
body.fokus .hinweisband { display: none; }
@media (min-width: 720px) { .hinweisband { max-width: calc(var(--inhalt-max) - 2 * var(--s5)); margin-top: var(--s4); } }

/* ---------- Fragen (Claude) ---------- */
.ki-eingabe { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s3); margin: var(--s4) 0; }
.ki-text { width: 100%; min-height: 84px; resize: vertical; padding: var(--s3); border: 1px solid var(--rand-stark); border-radius: var(--rad-m);
  background: var(--flaeche); line-height: 1.45; }
.ki-text:focus { outline: none; box-shadow: var(--fokus); border-color: var(--primaer); }
.ki-eingabe-fuss { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; }
.ki-umschalter { grid-template-columns: repeat(2, 1fr); flex: 1 1 160px; max-width: 260px; min-width: 0; }
.ki-eingabe-fuss > .knopfreihe { margin-left: auto; }
.ki-zitate { display: inline-flex; align-items: center; gap: var(--s2); font-size: var(--fs-s); color: var(--text-2); cursor: pointer; white-space: nowrap; }
.ki-zitate[hidden] { display: none; }
.ki-eingabe-fuss > .knopfreihe { flex: none; flex-wrap: nowrap; }
.ki-umschalter button { --farbe: var(--primaer); flex-direction: row; font-size: var(--fs-s); }
.ki-liste { list-style: none; margin: 0; padding: 0; background: var(--flaeche); border: 1px solid var(--rand); border-radius: var(--rad-l); overflow: hidden; }
.ki-liste li { display: flex; align-items: center; gap: var(--s2); border-top: 1px solid var(--rand); padding-right: var(--s2); }
.ki-liste li:first-child { border-top: 0; }
.ki-liste li.leer { display: block; padding: var(--s4); }
.ki-liste a { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; padding: var(--s3) var(--s4); color: var(--text); text-decoration: none; }
.ki-liste a:hover { background: var(--flaeche-2); }
.ki-titel { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ki-verlauf { display: grid; gap: var(--s5); }
.ki-paar { display: grid; gap: var(--s3); scroll-margin-top: calc(var(--kopf-h) + var(--s3)); }
.ki-frage { justify-self: end; max-width: 88%; background: var(--primaer-weich); border-radius: var(--rad-l) var(--rad-l) var(--rad-s) var(--rad-l);
  padding: var(--s3) var(--s4); white-space: pre-wrap; overflow-wrap: anywhere; }
.ki-frage p { margin: 0; }
.ki-modus { display: block; margin-top: var(--s1); text-align: right; }
.ki-antwort { --ki-pad: var(--s4); background: var(--flaeche); border: 1px solid var(--rand); border-radius: var(--rad-l); box-shadow: var(--schatten-1);
  padding: var(--ki-pad); min-width: 0; overflow: hidden; }
@media (min-width: 720px) { .ki-antwort { --ki-pad: var(--s5); } }
.ki-md blockquote { border-left-color: var(--primaer); background: var(--primaer-weich); }
.ki-md h2, .ki-md h3 { margin: var(--s5) 0 var(--s2); font-size: var(--fs-l); }
.ki-md > :first-child { margin-top: 0; }
.ki-seite { margin: var(--s3) 0; }
.ki-seite img { display: block; max-width: 100%; height: auto; border: 1px solid var(--rand); border-radius: var(--rad-s); background: #fff; cursor: zoom-in; }
.ki-seite figcaption { margin-top: var(--s1); }
.ki-lauf { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; }
.ki-lauf .btn { margin-left: auto; }
.ki-spinner { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid var(--primaer-weich); border-top-color: var(--primaer); animation: ki-dreh 0.9s linear infinite; flex: none; }
@keyframes ki-dreh { to { transform: rotate(360deg); } }
.ki-schritte { margin: var(--s2) 0 0; padding-left: 1.2em; color: var(--text-2); overflow-wrap: anywhere; }
.ki-entwurf { margin-top: var(--s4); padding-top: var(--s3); border-top: 1px dashed var(--rand); opacity: .75; }
.ki-fehler { color: var(--schlecht); background: var(--schlecht-weich); border-radius: var(--rad-s); padding: var(--s2) var(--s3); }
/* Zusammenfassung: Karte mit Schritten zum Abhaken */
.ki-zf { background: var(--primaer-weich); border-bottom: 1px solid color-mix(in srgb, var(--primaer) 35%, transparent);
  padding: var(--ki-pad); margin: calc(-1 * var(--ki-pad)) calc(-1 * var(--ki-pad)) var(--s4); }
.ki-zf-inhalt blockquote p { margin: 0; }
.ki-zf-kopf { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); flex-wrap: wrap; margin-bottom: var(--s2); }
.ki-zf-kopf h2 { color: var(--primaer); }
.ki-zf-inhalt h3, .ki-zf-inhalt h4, .ki-zf-inhalt h5, .ki-zf-inhalt h6 { font-size: var(--fs-n); margin: var(--s4) 0 var(--s2);
  padding-top: var(--s3); border-top: 1px solid color-mix(in srgb, var(--primaer) 25%, transparent); }
.ki-zf-inhalt > :first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.ki-zf-inhalt ul, .ki-zf-inhalt ol { margin-bottom: var(--s2); }
.ki-zf-inhalt li.aufgabe { list-style: none; margin: 0 0 0 -1.3em; padding: 3px 0; }
.ki-zf-inhalt li.aufgabe > label { display: flex; align-items: flex-start; gap: var(--s2); cursor: pointer; }
.ki-zf-inhalt li.aufgabe > label input { flex: none; width: 20px; height: 20px; margin-top: 2px; background: var(--flaeche); }
.ki-zf-inhalt li.erledigt-punkt > label span { color: var(--text-2); text-decoration: line-through;
  text-decoration-color: color-mix(in srgb, var(--text-2) 60%, transparent); }
.ki-zf-inhalt blockquote { border-left-color: var(--warn); background: var(--warn-weich); }
.ki-zf-inhalt p { margin-bottom: var(--s2); }
.ki-belege > summary { cursor: pointer; font-weight: 650; padding: var(--s2) 0; color: var(--text-2); }
.ki-belege[open] > summary { margin-bottom: var(--s3); border-bottom: 1px solid var(--rand); }
.ki-meta { margin-top: var(--s4); border-top: 1px solid var(--rand); padding-top: var(--s2); }
.ki-meta summary { cursor: pointer; }

/* Anhänge */
.ki-eingabe.ziel { box-shadow: var(--fokus); }
.ki-anhaenge-neu { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s2); }
.ki-anhaenge-neu li { display: flex; align-items: center; gap: var(--s2); max-width: 100%; padding: 4px 4px 4px var(--s2);
  border: 1px solid var(--rand); border-radius: var(--rad-s); background: var(--flaeche-2); font-size: var(--fs-s); }
.ki-anhaenge-neu img { width: 36px; height: 36px; object-fit: cover; border-radius: 4px; flex: none; }
.ki-anhaenge-neu li > svg { width: 22px; height: 22px; flex: none; color: var(--text-2); }
.ki-anhang-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.ki-anhaenge { list-style: none; margin: var(--s2) 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s2); justify-content: flex-end; }
.ki-anhang-bild { padding: 0; border: 1px solid var(--rand); border-radius: var(--rad-s); overflow: hidden; background: var(--flaeche); cursor: zoom-in; }
.ki-anhang-bild img { display: block; width: 96px; height: 96px; object-fit: cover; }
.ki-anhang-datei { display: inline-flex; align-items: center; gap: 6px; padding: 6px var(--s2); border-radius: var(--rad-s);
  background: var(--flaeche); border: 1px solid var(--rand); font-size: var(--fs-s); text-decoration: none; max-width: 240px; }
.ki-anhang-datei span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ki-anhang-datei svg { width: 18px; height: 18px; flex: none; }

