/* KI-Ingenieur Academy — Styles v0.3
   Token-Werte gespiegelt aus **Designsystem v1.2** (23_Dashboard_System/03_Designsystem:
   tokens.css + theme-ki-ingenieur.css). SSOT bleibt das Designsystem.
   Update 2026-07-20 (Freigabe Christian): Kontrast-Korrekturen aus v1.1/v1.2 übernommen —
   --ink-3, --gruen, --amber erreichen jetzt WCAG 4,5:1; neu --primaer-text (#a8440a) für
   Orange als TEXT (Markenfarbe #e8600a bleibt Flächen-/Icon-Farbe, Spec §6a). */
:root {
  --bg: #F6F7F9; --karte: #FFFFFF; --sidebar: #f8fafc;
  --linie: #E4E7EC; --linie-stark: #CBD2DB;
  --ink: #0d1f3c; --ink-2: #44506b; --ink-3: #646F7D;   /* v1.2: war #6b7690 (4,24:1 auf --bg) → 4,76:1 */
  --primaer: #e8600a; --primaer-tief: #cc5309; --primaer-hell: #fff1e6;
  --primaer-text: #a8440a;                               /* Orange als TEXT (6,01:1 auf Weiß) */
  --ci: #0d1f3c; --ci-hell: #e8ecf3;
  --gruen: #1A7347; --gruen-hell: #e5f3ec;               /* v1.1: war #1E7F4F (4,37:1) → 4,84:1 */
  --amber: #8A5C00; --amber-hell: #fdf3e0;               /* v1.1: war #9A6700 (4,42:1) → 5,29:1 */
  --warnrot: #B3261E; --warnrot-hell: #fbebea;
  --rot: #E10000;
  --radius: 14px; --schatten: 0 1px 3px rgba(13,31,60,.08), 0 4px 14px rgba(13,31,60,.06);
  --font-basis: 17px; /* Open-Points 28.07. (Befund Christian „Schrift zu klein"): Lese-Grundgröße 16→17px, Lesetexte +1px, Zeilenhöhe 1.6 */
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: var(--font-basis)/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  min-height: 100dvh;
}
/* Kopiersperre (Erschwernis, kein Schutz — Modul I §5) */
body.is-public { -webkit-user-select: none; user-select: none; }
body.is-public input, body.is-public textarea { -webkit-user-select: text; user-select: text; }

/* Layout: Mobile-first, Desktop-Sidebar ab 900px */
#appwrap { display: flex; min-height: 100dvh; }
#sidenav { display: none; }
#main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
header.topbar {
  position: sticky; top: 0; z-index: 30; background: var(--karte);
  border-bottom: 1px solid var(--linie); padding: 10px 16px;
  display: flex; align-items: center; gap: 10px;
}
header.topbar .logo { width: 30px; height: 30px; flex: none; }
header.topbar .brand { font-weight: 700; font-size: 17px; letter-spacing: .2px; }
header.topbar .brand small { display: block; font-size: 11px; font-weight: 500; color: var(--ink-3); }
/* Sprachwahl in der Kopfzeile (02.08.2026) — kompakt, sitzt links neben der XP-Pille */
#kopf-lang {
  margin-left: auto; margin-right: 8px; padding: 5px 8px;
  border: 1px solid var(--linie-stark); border-radius: 10px; background: var(--karte);
  font: inherit; font-size: 13px; font-weight: 700; color: var(--ink-2); cursor: pointer;
}
#kopf-lang + .xp-pill { margin-left: 0; }
header.topbar .xp-pill {
  margin-left: auto; background: var(--primaer-hell); color: var(--primaer-tief);
  border: 1px solid #f5cdb0; border-radius: 999px; padding: 4px 12px;
  font-size: 13px; font-weight: 700; white-space: nowrap; text-align: center;
}
main#view { flex: 1; width: 100%; max-width: 760px; margin: 0 auto; padding: 16px 16px 90px; }
@media (min-width: 900px) {
  #sidenav {
    display: flex; flex-direction: column; gap: 4px; width: 272px; flex: none;
    background: var(--sidebar); border-right: 1px solid var(--linie); padding: 18px 12px;
  }
  #sidenav .side-brand { font-weight: 800; font-size: 18px; padding: 6px 10px 16px; }
  #sidenav .side-brand small { display: block; font-size: 11px; color: var(--ink-3); font-weight: 500; }
  #sidenav button {
    display: flex; gap: 10px; align-items: center; width: 100%; text-align: left;
    background: none; border: 0; border-radius: 10px; padding: 10px 12px;
    font: inherit; font-weight: 600; color: var(--ink-2); cursor: pointer;
  }
  #sidenav button:hover { background: var(--ci-hell); }
  #sidenav button.active { background: var(--primaer); color: #fff; }
  nav#bottomnav { display: none !important; }
  main#view { padding-bottom: 40px; }

  /* Verfahrens-Baum in der Sidebar (Umbau 24.07.): jedes Verfahren mit seinem Level-Baum */
  #sidenav .side-tree { display: flex; flex-direction: column; gap: 2px; margin-bottom: 10px; }
  #sidenav .side-sec {
    font-size: 11px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase;
    color: var(--ink-3); padding: 4px 10px 6px;
  }
  #sidenav .side-mod { border-radius: 10px; }
  #sidenav .side-mod.aktiv { background: var(--ci-hell); padding-bottom: 6px; }
  #sidenav .side-mod-head { display: flex; align-items: center; gap: 8px; }
  #sidenav .side-mod-head .caret { flex: none; width: 14px; color: var(--ink-3); }
  #sidenav .side-mod-head .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  #sidenav .side-mod-head .xp {
    /* B1 U-11 (Entscheid E-P2): neutraler Zähler-Chip — warme Signalfarben bleiben
       Beacons/Fehlern vorbehalten, ein "0 XP" ist keine Warnung. */
    flex: none; font-size: 11px; font-weight: 700; color: var(--ink-2);
    background: var(--ci-hell); border-radius: 999px; padding: 2px 8px; text-align: center;
  }
  #sidenav .side-mod.aktiv .side-mod-head .nm { color: var(--primaer-tief); }
  #sidenav .side-levels { display: flex; flex-direction: column; gap: 1px; padding: 0 4px 0 10px; }
  #sidenav .side-level {
    display: flex; align-items: center; gap: 8px; padding: 6px 8px !important;
    font-weight: 500 !important; font-size: 13px;
  }
  #sidenav .side-level .dot {
    flex: none; width: 20px; height: 20px; border-radius: 50%; background: var(--karte);
    border: 1px solid var(--linie-stark); font-size: 11px; font-weight: 700;
    display: inline-flex; align-items: center; justify-content: center; text-align: center;
  }
  #sidenav .side-level.done .dot { background: var(--gruen); border-color: var(--gruen); color: #fff; }
  #sidenav .side-level .ttl { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  #sidenav .side-level .st { flex: none; font-size: 11px; color: var(--ink-3); text-align: center; }
  #sidenav div.side-level.preview { display: flex; align-items: center; gap: 8px; padding: 6px 8px; color: var(--ink-3); font-size: 13px; cursor: default; }
  #sidenav div.side-level.preview .dot { font-size: 10px; border-style: dashed; }
  /* „Lernen" je Verfahren am Ende des Level-Baums (Entscheid Christian 02.08.2026).
     Orange als Text = --primaer-text (Spec §6a, WCAG); die Fläche des Punkts darf Markenorange. */
  #sidenav .side-website { display:block; margin:10px 14px 16px; font-size:.82rem; color:var(--primaer-text); text-decoration:none; }
  #sidenav .side-website:hover { text-decoration:underline; }
  #sidenav .side-level.side-lernen { color: var(--primaer-text); font-weight: 700 !important; margin-top: 2px; }
  #sidenav .side-level.side-lernen .dot { background: var(--primaer); border-color: var(--primaer); font-size: 11px; }
}

/* Rückweg aus dem Quiz in die Lektion (02.08.2026) — bewusst als klarer Knopf, nicht als
   verstecktes Link-Chen; der Warnzustand (zweiter Tipp nötig) wechselt sichtbar auf Amber. */
button.q-back {
  display: inline-flex; align-items: center; gap: 6px; margin: 0 0 10px;
  padding: 9px 14px; border: 1px solid var(--linie-stark); border-radius: 10px;
  background: var(--karte); color: var(--primaer-text); font: inherit; font-size: 14px;
  font-weight: 700; cursor: pointer;
}
button.q-back.warn {
  border-color: var(--amber); background: var(--amber-hell); color: var(--amber);
}

/* Bottom-Navigation (Mobile) */
nav#bottomnav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 30;
  display: flex; background: var(--karte); border-top: 1px solid var(--linie);
  padding-bottom: env(safe-area-inset-bottom);
}
nav#bottomnav button {
  flex: 1; background: none; border: 0; font: inherit; font-size: 11px; font-weight: 600;
  color: var(--ink-3); padding: 8px 4px 10px; cursor: pointer; min-height: 52px;
}
nav#bottomnav button .ic { display: block; font-size: 20px; line-height: 1.2; }
nav#bottomnav button.active { color: var(--primaer-tief); }

/* Kompetenz-Pilot (Stufe 2, Dev-only) */
.pilot-banner {
  background: repeating-linear-gradient(45deg, #fff7e6, #fff7e6 12px, #ffefcc 12px, #ffefcc 24px);
  border: 1px dashed var(--primaer); border-radius: 10px;
  padding: 10px 14px; margin: 0 0 14px; font-size: 14px; font-weight: 600; color: var(--primaer-tief);
}
.pilot-card { border: 1px dashed var(--primaer); }
.pilot-ta { width: 100%; padding: 11px 14px; border: 1px solid var(--linie-stark); border-radius: 10px; font: inherit; margin-top: 6px; }
.abgleich-zeile { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--linie); }
.abgleich-zeile .txt { flex: 1; min-width: 0; font-size: 15px; }
.abgleich-zeile.krit .txt { color: var(--warnrot); }
.abgleich-zeile .paar { flex: none; display: flex; gap: 6px; }
.abgleich-zeile .mini {
  background: var(--karte); border: 1px solid var(--linie-stark); border-radius: 999px;
  font: inherit; font-size: 12px; font-weight: 600; padding: 8px 14px; cursor: pointer; min-height: 44px; /* B1 U-12: Touch-Ziel-Regel ≥44px */
}
.abgleich-zeile .mini.on { background: var(--primaer); border-color: var(--primaer); color: #fff; }
.kette-liste .opt.kette-on, .match-col .opt.kette-on { border-color: var(--primaer); background: var(--primaer-hell); }
.match-col .opt.gepaart { border-color: var(--gruen); }
.match-wrap { display: flex; gap: 12px; }
.match-col { flex: 1; min-width: 0; }
.merk.krit { background: var(--warnrot-hell); border-left-color: var(--warnrot); }
.korrektur { border: 1px solid var(--warnrot); }
@media (max-width: 560px) { .match-wrap { flex-direction: column; } }

/* Karten & Bausteine */
.card {
  background: var(--karte); border: 1px solid var(--linie); border-radius: var(--radius);
  box-shadow: var(--schatten); padding: 16px; margin: 0 0 14px;
}
.card h2 { margin: 0 0 8px; font-size: 20px; }
.card h3 { margin: 0 0 6px; font-size: 17px; }
.muted { color: var(--ink-3); font-size: 14px; }
.center { text-align: center; }
.btn {
  display: inline-block; background: var(--primaer); color: #fff; border: 0;
  border-radius: 10px; padding: 12px 18px; font: inherit; font-weight: 700;
  cursor: pointer; min-height: 44px; text-align: center;
}
.btn:hover { background: var(--primaer-tief); }
.btn:focus-visible, button:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--primaer); outline-offset: 2px;
}
.btn.sec { background: var(--ci-hell); color: var(--ci); }
.btn.ghost { background: none; color: var(--primaer-tief); border: 1px solid var(--linie-stark); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }

/* XP / Fortschritt */
.xp-bar { background: var(--ci-hell); border-radius: 999px; height: 12px; overflow: hidden; }
.xp-bar > div { background: linear-gradient(90deg, var(--primaer), var(--primaer-tief)); height: 100%; border-radius: 999px; transition: width .4s ease; }
.title-badge {
  display: inline-flex; align-items: center; gap: 8px; background: var(--ci); color: #fff;
  border-radius: 999px; padding: 6px 14px; font-weight: 700; font-size: 14px;
}
.kpi-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.kpi { background: var(--bg); border: 1px solid var(--linie); border-radius: 10px; padding: 10px 6px; text-align: center; }
.kpi b { display: block; font-size: 20px; color: var(--ci); }
.kpi span { font-size: 11px; color: var(--ink-3); }

/* Levelkarte */
.level-item { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--linie); }
.level-item:last-child { border-bottom: 0; }
.level-dot {
  flex: none; width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; font-weight: 800; color: #fff; background: var(--linie-stark);
}
.level-item.live .level-dot { background: var(--primaer); }
.level-item.done .level-dot { background: var(--gruen); }
.level-item .lv-state { font-size: 12px; color: var(--ink-3); }
.tag { display: inline-block; border-radius: 999px; padding: 2px 10px; font-size: 11.5px; font-weight: 700; }
.tag.review { background: var(--amber-hell); color: var(--amber); }
.tag.preview { background: var(--ci-hell); color: var(--ink-2); }
.tag.ok { background: var(--gruen-hell); color: var(--gruen); }

/* Lektion */
.lesson-sec { margin-bottom: 14px; }
.lesson-sec p { margin: 6px 0 0; }

/* Blocksatz für erklärende Fließtexte — NUR auf breiten Spalten (Entscheid E-P2 27.07.,
   ersetzt Teilaspekt der Vorgabe 24.07.): in schmalen Mobil-Spalten riss der Blocksatz
   sichtbare Wortabstands-Löcher (Befund U-08), dort gilt Flattersatz. Silbentrennung bleibt
   überall aktiv; zentrierte Kurztexte (.center) bleiben zentriert. */
.card p:not(.center), .lesson-sec p, .flagbox, .rulebox,
figure.photofig figcaption, figure.svgfig figcaption, .opt .expl {
  hyphens: auto; -webkit-hyphens: auto; overflow-wrap: break-word;
}
@media (min-width: 700px) {
  .card p:not(.center), .lesson-sec p, .flagbox, .rulebox,
  figure.photofig figcaption, figure.svgfig figcaption, .opt .expl { text-align: justify; }
}
.merk { background: var(--primaer-hell); border-left: 4px solid var(--primaer); border-radius: 8px; padding: 10px 14px; margin: 10px 0; }
.flagbox { background: var(--warnrot-hell); border-left: 4px solid var(--warnrot); border-radius: 8px; padding: 10px 14px; font-size: 15px; margin-top: 10px; }
/* Echtes Foto (Querschliff o. Ä.) mit Pflicht-Lizenzangabe */
figure.photofig { margin: 14px 0; text-align: center; }
figure.photofig img {
  max-width: 100%; height: auto; border-radius: 10px;
  border: 1px solid var(--linie-stark); background: var(--bg);
}
figure.photofig figcaption {
  font-size: 14px; color: var(--ink-2); margin-top: 8px; text-align: left;
}
figure.photofig .credit {
  display: block; margin-top: 6px; font-size: 11.5px; color: var(--ink-3);
}
figure.photofig .credit a { color: var(--ink-3); }
figure.photofig .ai-badge {
  display: inline-block; background: var(--ci-hell); color: var(--ci);
  border-radius: 999px; padding: 2px 9px; font-weight: 700; font-size: 11px;
  margin-right: 6px;
}

figure.svgfig { margin: 12px 0; text-align: center; }
figure.svgfig svg { max-width: 100%; height: auto; }
figure.svgfig figcaption { font-size: 13.5px; color: var(--ink-3); margin-top: 4px; }

/* Glossar-Begriffe im Text */
/* B2: sichtbarer Testprotokoll-Chip (keine stille Messung) */
.metrics-chip {
  position: fixed; left: 12px; bottom: calc(64px + env(safe-area-inset-bottom)); z-index: 75;
  background: var(--amber-hell); color: var(--amber); border: 1px solid var(--amber);
  border-radius: 999px; padding: 5px 12px; font-size: 12px; font-weight: 700; cursor: pointer;
  box-shadow: var(--schatten);
}

sub { font-size: .72em; line-height: 0; } /* Formelzeichen-Indizes (Konvention 27.07.) */

/* B1 U-04: ⓘ-Statuserklärungen nutzen die Glossar-Mechanik, aber ohne Unterstreichung */
button.gloss.info { text-decoration: none; font-weight: 700; border-bottom: none; }
button.gloss {
  background: none; border: 0; padding: 0; font: inherit; color: var(--primaer-tief);
  border-bottom: 1.5px dotted var(--primaer); cursor: pointer;
}
/* Bottom-Sheet */
#sheetwrap { position: fixed; inset: 0; z-index: 60; display: none; }
#sheetwrap.open { display: block; }
#sheetwrap .backdrop { position: absolute; inset: 0; background: rgba(13,31,60,.45); }
#sheet {
  position: absolute; left: 0; right: 0; bottom: 0; background: var(--karte);
  border-radius: 18px 18px 0 0; padding: 18px 18px calc(18px + env(safe-area-inset-bottom));
  max-height: 70dvh; overflow: auto; box-shadow: 0 -6px 30px rgba(13,31,60,.25);
}
@media (min-width: 900px) {
  #sheet { left: 50%; right: auto; bottom: auto; top: 50%; transform: translate(-50%,-50%);
    width: 460px; border-radius: 16px; }
}
#sheet h4 { margin: 0 0 2px; font-size: 17px; }
#sheet .long { color: var(--ink-3); font-size: 14px; margin-bottom: 8px; }

/* Quiz */
.q-progress { display: flex; gap: 6px; margin-bottom: 12px; }
.q-progress i { flex: 1; height: 6px; border-radius: 3px; background: var(--linie); }
.q-progress i.now { background: var(--primaer); }
.q-progress i.ok { background: var(--gruen); }
.q-progress i.err { background: var(--warnrot); }
.n-hint {
  background: var(--ci-hell); color: var(--ci); border-radius: 8px; padding: 8px 12px;
  font-size: 14px; font-weight: 600; margin: 10px 0; text-align: center;
}
.opt {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-start; width: 100%; text-align: left;
  background: var(--karte); border: 2px solid var(--linie); border-radius: 12px;
  padding: 12px 14px; margin: 8px 0; font: inherit; cursor: pointer; min-height: 48px;
}
.opt > span:not(.box):not(.expl) { flex: 1; min-width: 0; }
.opt .box { flex: none; width: 22px; height: 22px; border: 2px solid var(--linie-stark);
  border-radius: 6px; margin-top: 1px; display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800; color: #fff; }
.opt[aria-checked="true"] { border-color: var(--primaer); background: var(--primaer-hell); }
.opt[aria-checked="true"] .box { background: var(--primaer); border-color: var(--primaer); }
.opt.reveal { cursor: default; }
.opt.r-ok { border-color: var(--gruen); background: var(--gruen-hell); }
.opt.r-ok .box { background: var(--gruen); border-color: var(--gruen); }
.opt.r-err { border-color: var(--warnrot); background: var(--warnrot-hell); }
.opt.r-err .box { background: var(--warnrot); border-color: var(--warnrot); }
.opt.r-miss { border-color: var(--amber); background: var(--amber-hell); }
.opt.r-miss .box { background: var(--amber); border-color: var(--amber); }
/* Erklärung immer als eigene Zeile UNTER dem Antworttext (nicht daneben) */
.opt .expl { flex-basis: 100%; display: block; font-size: 14.5px; color: var(--ink-2);
  margin: 4px 0 0 32px; padding-top: 8px; border-top: 1px solid rgba(13,31,60,.08); }
.verdict { border-radius: 10px; padding: 10px 14px; font-weight: 700; margin: 10px 0; text-align: center; }
.verdict.full { background: var(--gruen-hell); color: var(--gruen); }
.verdict.partial { background: var(--amber-hell); color: var(--amber); }
.verdict.wrong { background: var(--warnrot-hell); color: var(--warnrot); }
.rulebox { background: var(--ci-hell); border-left: 4px solid var(--ci); border-radius: 8px; padding: 10px 14px; margin: 10px 0; font-size: 15.5px; }
.src-line { font-size: 12px; color: var(--ink-3); margin-top: 4px; }

/* Achievements */
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.ach { border: 1px solid var(--linie); border-radius: 12px; padding: 12px; text-align: center; background: var(--bg); }
.ach.won { background: var(--primaer-hell); border-color: #f5cdb0; }
.ach .ic { font-size: 26px; }
.ach.locked { opacity: .45; filter: grayscale(1); }
.ach b { display: block; font-size: 13.5px; margin-top: 4px; }
.ach span { font-size: 11.5px; color: var(--ink-3); }

/* Overlay-Karte (Level-Up / Achievement) */
#toastwrap { position: fixed; left: 0; right: 0; bottom: 70px; z-index: 80; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; } /* B1 U-01: über Funki (z-70) */

/* Funki-Sichtbarkeitsregeln (B1 27.07., Befund U-01 — Funki überdeckte mobil Antwortoptionen):
   .funki-away = während offener Quiz-/Pilot-Bearbeitung komplett ausgeblendet (Auflösung holt
   ihn zurück, damit die Reaktion sichtbar ist); .funki-peek = beim Scrollen in Inhalten zur
   Seite gerückt und abgeschwächt, damit er keine Inhalte verdeckt. */
body.funki-away #funki-dock { display: none !important; } /* !important: Dock trägt display:flex INLINE (index.html) */
#funki-dock { transition: transform .2s ease, opacity .2s ease; }
body.funki-peek #funki-dock { transform: translateX(130%); opacity: 0; pointer-events: none; } /* B1-Nachbesserung 27.07. (Befund Christian): halb abgeschnitten wirkte kaputt — beim Scrollen jetzt ganz raus, Auflösung/Seitenwechsel holen ihn zurück */
/* Open-Points 28.07.: ×-Abschalter direkt am Funki — 40px-Trefffläche, sichtbarer Kreis 22px (Ring per radial-gradient). */
.funki-x {
  position: absolute; top: -16px; right: -16px; width: 40px; height: 40px; padding: 0;
  border: 0; background: radial-gradient(circle at center, #fff 0 10px, var(--linie-stark) 10px 11px, transparent 11px);
  color: var(--ink-3); font: 700 15px/40px system-ui, sans-serif; text-align: center;
  cursor: pointer; pointer-events: auto;
}
.funki-x:hover, .funki-x:focus-visible { color: var(--ink); }
@media (prefers-reduced-motion: reduce) { #funki-dock { transition: none; } }
.toast {
  background: var(--ci); color: #fff; border-radius: 12px; padding: 12px 18px;
  box-shadow: var(--schatten); font-weight: 600; font-size: 14.5px; max-width: 90%;
  animation: toast-in .3s ease;
}
.toast.gold { background: linear-gradient(120deg, var(--primaer), var(--primaer-tief)); }
@keyframes toast-in { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }

/* Klick-Beacon (rot, pulsierend bis 1. Klick) */
.beacon { position: relative; }
.beacon::after {
  content: ""; position: absolute; top: -4px; right: -4px; width: 12px; height: 12px;
  border-radius: 50%; background: var(--rot); animation: beacon-pulse 1.4s infinite;
}
@keyframes beacon-pulse {
  0% { box-shadow: 0 0 0 0 rgba(225,0,0,.55); } 70% { box-shadow: 0 0 0 9px rgba(225,0,0,0); } 100% { box-shadow: 0 0 0 0 rgba(225,0,0,0); }
}

/* Tabellen (Datenschutz-Cockpit) — breite Tabellen scrollen IN ihrem Container,
   die Seite selbst darf nie horizontal scrollen (Responsive-Probe-Befund 20.07.). */
.tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 8px 0; }
table.ds { width: 100%; min-width: 520px; border-collapse: collapse; font-size: 13.5px; }
table.ds th, table.ds td { border: 1px solid var(--linie); padding: 7px 9px; text-align: left; vertical-align: top; }
table.ds th { background: var(--bg); }
table.ds td.center, table.ds th.center { text-align: center; }

/* Statistik */
.stat-row { display: flex; align-items: center; gap: 10px; margin: 7px 0; }
.stat-row .lbl { flex: none; width: 130px; font-size: 13.5px; }
.stat-row .bar { flex: 1; }
.stat-row .val { flex: none; width: 56px; text-align: center; font-weight: 700; font-size: 13.5px; }

/* Onboarding */
.onb-step { text-align: center; padding: 20px 8px; }
.onb-step .big { font-size: 44px; }
.dots { display: flex; gap: 6px; justify-content: center; margin: 14px 0; }
.dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--linie-stark); }
.dots i.on { background: var(--primaer); }

/* Footer */
footer.appfoot { padding: 18px 16px 26px; text-align: center; font-size: 12px; color: var(--ink-3); }
/* Ausreichend große Tap-Fläche für den Footer-Link (Responsive-Probe-Befund 20.07.) */
footer.appfoot a { color: var(--primaer-tief); display: inline-block; padding: 12px 10px; min-height: 44px; line-height: 20px; font-weight: 600; }

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

/* Verfahrenswahl: aktives Fachmodul hervorheben (Plattform-Umbau 21.07.2026) */
.card.aktiv{border-left:4px solid var(--akzent,#e8600a)}
.card.aktiv h3{color:var(--navy,#0d1f3c)}
