:root {
  --navy: #0b2540; --navy2: #14375c; --teal: #0e7c86; --teal-d: #0a5f67;
  --bg: #f3f6f9; --card: #fff; --ink: #14202e; --muted: #415163; --line: #d8e0e8;   /* --muted: mind. 7:1 auf allen Flächen (AP9c) */
  --top-h: 4.5rem;   /* Höhe der klebenden Kopfleiste, Versatz für Sprung- und Fokusziele */
  --red: #c92a2a; --orange: #b83c0a; --amber: #8f5d0a; --green: #237a35; --blue: #1c6dd0;
  --radius: 12px; --shadow: 0 1px 2px rgba(11,37,64,.06), 0 6px 18px rgba(11,37,64,.06);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; color: var(--ink); background: var(--bg); }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5rem; color: var(--navy); overflow-wrap: break-word; hyphens: auto; }   /* lange Fachwörter („Sprechfunkverfahren“) dürfen bei 240 px umbrechen */
h1 { font-size: 1.9rem; } h2 { font-size: 1.3rem; } h3 { font-size: 1.05rem; } h4 { font-size: .95rem; margin-top: 1rem; }
p { margin: 0 0 .75rem; }
a { color: var(--teal-d); }
.muted { color: var(--muted); font-size: 1rem; }
.err { color: var(--red); font-weight: 600; }
.skip { position: absolute; left: .5rem; top: -4rem; z-index: 10; background: #fff; color: var(--navy); font-weight: 700; padding: .6rem 1rem; border-radius: 8px; border: 2px solid var(--teal-d); }
.skip:focus { top: .5rem; }

.top { display: flex; align-items: center; gap: 1.25rem; padding: .7rem 1.5rem; background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 5; }
.brand { display: flex; align-items: center; gap: .7rem; color: #fff; text-decoration: none; }
.brand-mark { font-size: 1.6rem; background: var(--teal); width: 2.4rem; height: 2.4rem; display: grid; place-items: center; border-radius: 10px; }
.brand strong { display: block; font-size: 1.05rem; } .brand small { display: block; color: #a9c1d9; font-size: .78rem; }
.nav { margin-left: auto; display: flex; flex-wrap: wrap; gap: .25rem .5rem; align-items: center; }
.nav .link { background: none; border: 0; color: #dbe7f3; font: inherit; padding: .4rem .7rem; cursor: pointer; border-radius: 8px; }
.nav .link:hover { background: var(--navy2); color: #fff; }
.mic-pill { background: var(--red); color: #fff; padding: .35rem .8rem; border-radius: 999px; font-weight: 700; font-size: .85rem; display: flex; align-items: center; gap: .5rem; }
.mic-pill[hidden] { display: none; }
.rec-dot { width: .7rem; height: .7rem; border-radius: 50%; background: #fff; animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .25; } }

.disclaimer { background: #fff7e0; border-bottom: 1px solid #f0dca0; color: #5a4300; padding: .55rem 1.5rem; font-size: 1rem; }
.disclaimer a { display: inline-block; padding: .8rem .2rem; margin: -.8rem 0; }   /* Tippziel ≥ 44 px, ohne die Zeile höher zu machen */
main { max-width: 1240px; margin: 0 auto; padding: 1.5rem; outline: none; scroll-margin-top: var(--top-h); }
.foot { max-width: 1240px; margin: 0 auto; padding: 1rem 1.5rem 2rem; color: var(--muted); font-size: 1rem; }
.foot p { margin: 0 0 .4rem; }
.foot-more { margin: 0 0 .6rem; line-height: 1.5; }
.foot .link { background: none; border: 0; padding: 0 .6rem; min-height: 44px; font: inherit; color: var(--teal-d); text-decoration: underline; cursor: pointer; }
/* Tippziele der Fußzeile: mindestens 44 px hoch (Links im Fließtext sind ausgenommen) */
.foot-more a, .foot-links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 .35rem; }
.foot .link[hidden] { display: none; }
.draft-bar { background: var(--red); color: #fff; font-weight: 700; padding: .6rem 1.5rem; text-align: center; position: sticky; top: 0; z-index: 5; }
.legal { max-width: 56rem; margin: 0 auto; padding: 1.5rem; }
.legal p, .legal li { max-width: 65ch; }
.legal h1 { margin-bottom: 1rem; } .legal h2 { margin-top: 1.4rem; } .legal ul { padding-left: 1.2rem; }
.legal .ph { background: #fff7e0; border-radius: 4px; padding: 0 .2rem; word-break: break-word; }
.legal .back { margin-top: 2rem; }
/* AP10b: Fußzeilen-Links der Rechtsseiten: Tippziel mindestens 44 px, umbrechen bis 240 px (danke.html hat eigene Regel unten) */
.legal:not(.danke) .back a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 .35rem; }
/* AP10b: Muster-Widerrufsformular der Rechtsseiten */
.legal .muster { margin: 1.4rem 0 1rem; padding: .2rem 1rem .6rem; border: 2px solid var(--navy); border-radius: 10px; background: #fff; overflow-wrap: anywhere; }
.legal .muster h2 { margin-top: .8rem; }
.legal ol { padding-left: 1.4rem; }
.legal p, .legal li { overflow-wrap: anywhere; }   /* lange Platzhalter, Adressen und Gesetzes-URLs brechen um statt seitlich zu scrollen (240 px) */

.btn { font: inherit; font-weight: 600; padding: .6rem 1.1rem; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--navy); cursor: pointer; }
.btn:hover { border-color: var(--teal); }
.btn.primary { background: var(--teal); border-color: var(--teal); color: #fff; }
.btn.primary:hover { background: var(--teal-d); }
.btn.ghost { background: transparent; }
.btn.small { padding: .35rem .75rem; font-size: .88rem; }
.nav .btn.ghost { color: #fff; border-color: #3a5f86; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.mic { min-width: 9.5rem; }
.btn.mic.on { background: var(--red); border-color: var(--red); color: #fff; }
.icon { background: none; border: 0; cursor: pointer; font-size: 1rem; }
.row { display: flex; gap: .75rem; align-items: center; }
.row.wrap { flex-wrap: wrap; } .row.end { justify-content: flex-end; margin-top: 1rem; } .spacer { flex: 1; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.25rem; box-shadow: var(--shadow); margin-bottom: 1rem; overflow-wrap: anywhere; }
.hero { margin-bottom: 1.5rem; max-width: 62rem; }
.hero p { font-size: 1.05rem; color: #2d3e50; max-width: 65ch; }
.hero-more { margin-top: .25rem; } .hero-more summary { cursor: pointer; font-weight: 700; color: var(--teal-d); padding: .4rem 0; }
.hero-more[open] summary { margin-bottom: .25rem; }
.pills { list-style: none; padding: 0; margin: .5rem 0 0; display: flex; gap: .5rem; flex-wrap: wrap; }
.pills li { background: #e3f1f2; color: var(--teal-d); border-radius: 999px; padding: .25rem .8rem; font-size: .85rem; font-weight: 600; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 1rem; }
.first-start { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin: 0 0 1.5rem; }
.first-start .btn { min-height: 48px; font-size: 1.05rem; padding: .7rem 1.3rem; }
.scen { display: flex; flex-direction: column; margin: 0; }
.scen p { color: #3b4c5e; flex: 1; font-size: 1rem; }
.scen h2 { font-size: 1.05rem; }
.scen-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .6rem; }
.steps { color: var(--muted); font-size: .875rem; }
.badge { font-weight: 800; font-size: .75rem; letter-spacing: .04em; padding: .22rem .6rem; border-radius: 6px; color: #fff; }
.k-exam { background: var(--navy2); } .k-not { background: var(--red); } .k-urg { background: var(--amber); } .k-sec { background: var(--blue); } .k-rou { background: var(--green); }

.scen-hd { margin-bottom: 1rem; } .scen-hd .scen-head { justify-content: flex-start; gap: .75rem; margin-bottom: .4rem; } .scen-hd h1 { margin: 0; }
.two { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.two > * { min-width: 0; }
.card > h2.sub { font-size: 1.05rem; }
.lage, .cheat { padding-top: .4rem; padding-bottom: .4rem; }
.lage > summary { cursor: pointer; font-weight: 700; color: var(--navy); } .lage[open] > summary { margin-bottom: .6rem; }
.core { display: none; margin: 0 0 .6rem; }
.core dt { color: var(--muted); font-size: .8rem; line-height: 1.2; } .core dd { margin: 0; font-weight: 700; font-size: .95rem; line-height: 1.3; }
.facts { margin: 0; display: grid; gap: .35rem; }
.facts div { display: grid; grid-template-columns: 8.5rem 1fr; gap: .5rem; border-bottom: 1px dashed var(--line); padding-bottom: .3rem; }
.facts dt { color: var(--muted); font-size: .9rem; } .facts dd { margin: 0; font-weight: 600; }
.heard { background: #eef4fa; border-left: 4px solid var(--blue); padding: .6rem .8rem; border-radius: 6px; margin-top: .6rem; }
.heard p { font-style: italic; margin-bottom: .4rem; font-size: 1rem; }
.cheat summary { cursor: pointer; font-weight: 700; color: var(--navy); }
.cheat ol { margin: .6rem 0 0 1.2rem; padding: 0; } .cheat li { margin-bottom: .15rem; }

.radio { padding: 0; overflow: hidden; }
.radio-head { display: flex; align-items: center; gap: .9rem; padding: .7rem 1rem; background: var(--navy); color: #fff; flex-wrap: wrap; }
.chan { background: #000; color: #7dffb2; font-family: ui-monospace, Menlo, monospace; padding: .2rem .6rem; border-radius: 6px; letter-spacing: .08em; }
.chan b { font-size: 1.15rem; }
.prompt { flex: 1; font-weight: 600; }
.rec { font-size: .875rem; color: #a9c1d9; } .rec.live { color: #fff; background: var(--red); padding: .15rem .6rem; border-radius: 999px; font-weight: 800; animation: pulse 1s infinite; }
.log { padding: 1rem; min-height: 9rem; max-height: 22rem; overflow-y: auto; background: #f7fafc; display: flex; flex-direction: column; gap: .6rem; }
.bubble { max-width: 85%; padding: .6rem .85rem; border-radius: 12px; font-size: 1rem; border: 1px solid var(--line); background: #fff; }
.bubble .who { display: block; font-size: .8rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: .15rem; }
.bubble.me { align-self: flex-end; background: #e1f3f4; border-color: #b4dde0; }
.bubble.coast { align-self: flex-start; background: #fff; border-left: 4px solid var(--navy2); font-family: ui-monospace, Menlo, monospace; font-size: 1rem; }
.bubble.note { align-self: center; background: transparent; border-style: dashed; color: var(--muted); font-size: 1rem; }

.composer { margin-bottom: 1rem; }
.lab { display: block; font-weight: 700; margin-bottom: .35rem; color: var(--navy); }
textarea { width: 100%; max-width: 100%; font: inherit; padding: .7rem .85rem; border-radius: 10px; border: 1px solid #738699; resize: vertical; min-height: 6.5rem; }
textarea:focus, select:focus, .btn:focus-visible, summary:focus-visible, button:focus-visible, a:focus-visible, input:focus-visible, .tbl-wrap:focus-visible, .tbl-scroll:focus-visible { outline: 3px solid var(--teal-d); outline-offset: 2px; }
.top :focus-visible, .radio-head :focus-visible { outline-color: #fff; }
.interim { min-height: 1.3rem; color: var(--muted); font-style: italic; font-size: 1rem; }
.sel, .chk { font-size: 1rem; color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.chk { min-height: 44px; cursor: pointer; } .chk input { width: 1.4rem; height: 1.4rem; }
.sel select { max-width: 100%; }
.nosave { margin: .35rem 0 .5rem; font-size: .9rem; }
.count { margin: 0 0 .5rem; font-size: .9rem; }
.notice { margin: 0 0 1rem; padding: .7rem 1rem; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--amber); border-radius: 8px; overflow-wrap: anywhere; }
.tts-note { margin: .25rem 0 .5rem; font-size: .9rem; }
.limits { margin: 0 0 .75rem; padding-left: 1.2rem; max-width: 65ch; } .limits li { margin-bottom: .2rem; }
.hero-limits { margin-bottom: .5rem; }
select { font: inherit; padding: .3rem .4rem; border-radius: 8px; border: 1px solid #738699; }

.result { border-top: 5px solid var(--teal); scroll-margin-top: calc(var(--top-h) + .5rem); }
.score-row { display: flex; gap: 1.2rem; align-items: center; margin-bottom: .5rem; }
.score { width: 6.2rem; height: 6.2rem; border-radius: 50%; display: grid; place-content: center; text-align: center; color: #fff; flex: none; }
.score b { font-size: 2.1rem; line-height: 1; } .score span { font-size: .8rem; opacity: .9; }
.s-good { background: var(--green); } .s-ok { background: var(--amber); } .s-bad { background: var(--red); }
.heardtext { font-style: italic; color: #2d3e50; margin: 0; }
.check { list-style: none; padding: 0; margin: .4rem 0 0; display: grid; gap: .3rem; }
.check li { display: grid; grid-template-columns: 1.6rem 1fr auto; gap: .5rem; align-items: center; padding: .35rem .6rem; border-radius: 8px; background: #f6f8fa; }
.check .ic { font-weight: 900; text-align: center; }
.check .lbl { min-width: 0; overflow-wrap: anywhere; }
.check .st { font-size: .875rem; color: var(--muted); white-space: nowrap; }
.c-ok .ic { color: var(--green); } .c-ok { background: #eef8f0 !important; }
.c-part .ic { color: var(--amber); } .c-part { background: #fff7e6 !important; }
.c-miss .ic { color: var(--red); } .c-miss { background: #fdecec !important; }
.c-ord .ic { color: var(--orange); } .c-ord { background: #fff0e6 !important; }
.c-opt .ic { color: var(--muted); }
.fb { margin: .3rem 0 0 1.1rem; padding: 0; } .fb li { margin-bottom: .4rem; }
.tag-unbelegt { display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .02em; padding: .08rem .45rem; border-radius: 999px; border: 1px solid var(--amber); color: var(--amber); background: #fff8e8; white-space: nowrap; }
.content-note { font-size: 1rem; margin: .5rem 0 0; }
.note-unbelegt { font-size: 1rem; color: var(--muted); margin: .4rem 0 0; }
.s-none { background: var(--muted); }
.good { color: var(--green); font-weight: 700; }
.model { margin-top: 1rem; } .model summary { cursor: pointer; font-weight: 700; color: var(--teal-d); }
.model-t { width: 100%; table-layout: fixed; border-collapse: collapse; margin: .6rem 0; font-size: 1rem; }   /* bricht um statt über die Karte hinauszuragen (Reflow) */
.model-t th, .model-t td { overflow-wrap: anywhere; }
.model-t th { text-align: left; width: 38%; color: var(--muted); font-weight: 600; vertical-align: top; padding: .3rem .5rem .3rem 0; border-bottom: 1px solid var(--line); }
.model-t td { font-family: ui-monospace, Menlo, monospace; padding: .3rem 0; border-bottom: 1px solid var(--line); }
.actions { margin-top: .5rem; }
.final ul { margin: .4rem 0 1rem 1.1rem; padding: 0; }
.prose { max-width: 56rem; } .prose h2 { margin-top: 1.4rem; } .src { padding-left: 1.2rem; } .src li { margin-bottom: .8rem; } .src p { margin: .15rem 0 0; color: #3b4c5e; font-size: 1rem; }

dialog { border: 0; border-radius: 14px; padding: 1.4rem 1.5rem; max-width: 34rem; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
dialog::backdrop { background: rgba(11,37,64,.55); }
dialog ul { padding-left: 1.2rem; } dialog li { margin-bottom: .4rem; }
/* AP10: Prüfungsmodus (nur bei eingeschalteter Bezahlversion sichtbar) */
.exam-entry { margin-top: 1.5rem; }
.exam-progress { font-size: 1.05rem; color: var(--navy); }
.card.task .radio { margin: .5rem 0 1rem; box-shadow: none; }
.card.task .radio-head .prompt { flex: 1 1 12rem; min-width: 0; overflow-wrap: anywhere; }   /* Aufgabe umbricht in eine eigene Zeile statt zu quetschen */
.exam-between h2, .exam-confirm h2 { margin-bottom: .6rem; }
.exam-task h3 { overflow-wrap: anywhere; }
.exam-task .model > summary { padding: .4rem 0; }
/* AP10: Freischalt-Dialog (Eingabefeld, Kaufen-Link als Knopf); Tippziele ≥ 44 px, bricht bei schmalen Displays um */
dialog .lab { margin-top: .8rem; }
.field { display: block; width: 100%; max-width: 100%; min-height: 44px; font: inherit; padding: .55rem .8rem; border-radius: 10px; border: 1px solid #738699; }
a.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; text-decoration: none; }
a.btn[hidden], .btn[hidden] { display: none; }
#unlockMsg { min-height: 1.5rem; margin: .5rem 0 0; }
/* AP10: danke.html (Freischaltcode groß und lesbar; bricht an jeder Stelle um, damit nichts seitlich scrollt) */
.code-big { font: 700 1.5rem/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .04em; padding: .8rem 1rem; margin: .5rem 0 1rem; background: #fff; border: 2px solid var(--navy); border-radius: 10px; overflow-wrap: anywhere; word-break: break-all; user-select: all; max-width: 100%; }
.danke .btn { min-height: 44px; }
.danke .back a:not(.btn) { display: inline-block; padding: .8rem .2rem; margin: -.8rem 0; }
/* AP10b: Zustimmung (Verzicht auf das Widerrufsrecht) und Bestätigung zum Drucken */
.consent { display: flex; align-items: flex-start; gap: .7rem; min-height: 44px; padding: .55rem .7rem; margin: .5rem 0; border: 1px solid #b6c4d2; border-radius: 10px; background: #fff; cursor: pointer; }
.consent input[type="checkbox"] { flex: none; width: 1.6rem; height: 1.6rem; margin: .1rem 0 0; accent-color: var(--teal-d); }
.consent span { min-width: 0; overflow-wrap: anywhere; }
.danke [hidden] { display: none; }
.beleg { margin: .5rem 0 1rem; padding: .8rem 1rem; border: 2px solid var(--navy); border-radius: 10px; background: #fff; }
.beleg dt { font-weight: 700; margin-top: .6rem; color: var(--navy); } .beleg dt:first-child { margin-top: 0; }
.beleg dd { margin: 0; overflow-wrap: anywhere; word-break: break-word; }
.beleg dd.code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-weight: 700; word-break: break-all; }
@media print {
  /* danke.html drucken: nur der Bestätigungsblock (ohne Kopf-/Fußzeile, Knöpfe und übrige Abschnitte) */
  body > header, body > footer, body > nav, body > .draft-bar { display: none !important; }
  .danke > *:not(#bestaetigung) { display: none !important; }
  .danke #bestaetigung .noprint, .danke #bestaetigung button { display: none !important; }
  .danke { max-width: none; padding: 0; }
  /* widerrufen.html drucken: nur Überschrift und Bestätigung */
  .widerrufen > *:not(#widerrufBestaetigung):not(h1) { display: none !important; }
  .widerrufen .noprint, .widerrufen button { display: none !important; }
  .beleg { border: 1px solid #000; }
}

@media (max-width: 900px) {
  :root { --top-h: 8rem; }
  .two { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .core { display: grid; grid-template-columns: repeat(auto-fit, minmax(7.5rem, 1fr)); gap: .35rem .8rem; }
  .top { flex-wrap: wrap; } .nav { margin-left: 0; width: 100%; }
  h1 { font-size: 1.5rem; }
}
/* Touch-Geräte (iPhone): Tippflächen mindestens ca. 44 px, Dialog passt in schmale Displays */
@media (pointer: coarse), (max-width: 600px) {
  .btn, .btn.small, .nav .link, select, summary { min-height: 44px; }
  .btn, .nav .link { min-width: 44px; }
  .icon { min-width: 44px; min-height: 44px; }
  .chk input { width: 1.4rem; height: 1.4rem; }
  .sel, .chk { min-height: 44px; }
}
@media (max-width: 600px) {
  main, .foot { padding-left: 1rem; padding-right: 1rem; }
  .top, .disclaimer { padding-left: 1rem; padding-right: 1rem; }
  dialog { max-width: calc(100vw - 2rem); }
  .check li { grid-template-columns: 1.6rem 1fr; } .check .st { grid-column: 2; white-space: normal; }
  .facts div { grid-template-columns: 1fr; gap: 0; }
  .top { position: static; }   /* zweizeilige Kopfzeile verdeckt sonst 130 px des kleinen Displays und den Anfang des Ergebnisses */
  :root { --top-h: 0rem; }
  .log { min-height: 3rem; padding: .6rem .75rem; }
  .radio-head { padding: .5rem .75rem; gap: .4rem .75rem; }
  .card.task { padding: .8rem 1rem; }
  .hero h1 { margin-bottom: .4rem; }
  .score-row { flex-direction: column; align-items: flex-start; }
}
/* Niedrige Fenster (z. B. 200 % Zoom am Rechner): Kopfleiste nicht kleben lassen, sie nähme sonst über ein Viertel der Höhe */
@media (max-height: 500px) { .top { position: static; } :root { --top-h: 0rem; } }
@media (prefers-reduced-motion: reduce) { .rec-dot, .rec.live { animation: none; } }
/* Windows-Kontrastmodus: Farbflächen entfallen, Marken und Rahmen bleiben über Systemfarben erkennbar */
@media (forced-colors: active) { .badge, .score, .mic-pill, .tag-unbelegt, .chan, .rec.live { border: 1px solid CanvasText; } .rec-dot { background: CanvasText; } .btn.primary { border-color: ButtonText; } }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
