/* ===========================================================
   Echt oder KI? — Begleitseite
   Farben aus dem Buchcover gemessen. Keine externen Requests.
   Schriften: System-Stack (kein Ladevorgang, keine Fremd-Domain).
   =========================================================== */

:root {
  --bg: #0F141A;
  --surface: #171F29;
  --surface-2: #1F2A36;
  --line: #2C3947;
  --cyan: #88DBFD;
  --cyan-soft: #BAE2FB;
  --orange: #F5A83C;
  --orange-lo: #F2BA63;
  --danger: #FF6B6F;
  --danger-bg: #7E1C1F;
  --ok: #6FD08C;
  --text: #F2F5F8;
  --text-mute: #A7B4C2;

  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 10px;
  --wrap: 46rem;
}

/* Heller Modus fuer alle, die auf dunklem Grund schlechter lesen */
:root[data-theme="hell"] {
  --bg: #F7F9FB;
  --surface: #FFFFFF;
  --surface-2: #EDF2F7;
  --line: #C9D4DF;
  --cyan: #0B5E86;
  --cyan-soft: #12496A;
  --orange: #A85F00;
  --orange-lo: #8A4F00;
  --danger: #B3181D;
  --danger-bg: #B3181D;
  --ok: #1C6B36;
  --text: #10161D;
  --text-mute: #46545F;
}

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

html { font-size: 19px; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  overflow-wrap: break-word;
}

/* ---------- Notfall-Leiste, immer oben ---------- */
.notfallbar {
  background: var(--danger-bg);
  border-bottom: 2px solid var(--danger);
}
.notfallbar a {
  display: block;
  padding: 0.85rem 1rem;
  min-height: 64px;
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
  text-align: center;
  text-decoration: none;
  letter-spacing: 0.01em;
}
.notfallbar a:hover, .notfallbar a:focus-visible { background: rgba(255,255,255,0.12); }

/* Kurzwahl-Zeile (auf der Notfallseite statt des Buttons) */
.kurzwahl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--danger); }
.kurzwahl a {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 76px; padding: 0.5rem 0.3rem;
  background: var(--danger-bg); color: #fff; text-decoration: none;
}
.kurzwahl .nr { font-size: 1.5rem; font-weight: 800; line-height: 1.1; }
.kurzwahl .was { font-size: 0.78rem; opacity: 0.9; }
.kurzwahl a:hover, .kurzwahl a:focus-visible { background: #94272a; }

/* ---------- Kopf ---------- */
header.site { padding: 1.6rem 1rem 1.1rem; border-bottom: 1px solid var(--line); }
header.site .inner { max-width: var(--wrap); margin: 0 auto; display: flex; align-items: center; gap: 0.9rem; flex-wrap: wrap; }
header.site .shield { flex: 0 0 auto; width: 42px; height: 48px; }
header.site h1 { font-size: 1.35rem; font-weight: 800; letter-spacing: -0.01em; line-height: 1.2; }
header.site h1 .ki { color: var(--orange); }
header.site h1 .echt { color: var(--cyan); }
header.site p.claim { font-size: 0.85rem; color: var(--text-mute); margin-top: 0.15rem; }
header.site a.home { text-decoration: none; color: inherit; display: flex; align-items: center; gap: 0.9rem; }

/* ---------- Navigation ---------- */
nav.main { border-bottom: 1px solid var(--line); background: var(--surface); }
nav.main ul { max-width: var(--wrap); margin: 0 auto; display: flex; flex-wrap: wrap; list-style: none; }
nav.main a {
  display: block; padding: 0.7rem 0.95rem; min-height: 48px;
  color: var(--text-mute); text-decoration: none; font-size: 0.92rem; font-weight: 600;
  border-bottom: 3px solid transparent;
}
nav.main a:hover, nav.main a:focus-visible { color: var(--text); background: var(--surface-2); }
nav.main a[aria-current="page"] { color: var(--cyan); border-bottom-color: var(--cyan); }

/* ---------- Layout ---------- */
main { max-width: var(--wrap); margin: 0 auto; padding: 1.6rem 1rem 4rem; }
section { margin-top: 2.4rem; }
section:first-of-type { margin-top: 1.2rem; }

h2 { font-size: 1.4rem; font-weight: 800; line-height: 1.25; margin-bottom: 0.7rem; letter-spacing: -0.01em; }
h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.4rem; }
h2 + p, h3 + p { margin-top: 0.2rem; }
p { margin-bottom: 0.9rem; max-width: 62ch; }
p.lead { font-size: 1.08rem; color: var(--cyan-soft); }
p.mute { color: var(--text-mute); font-size: 0.9rem; }
strong { color: #fff; font-weight: 700; }
:root[data-theme="hell"] strong { color: #000; }

a { color: var(--cyan); }
a:hover { text-decoration: none; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; border-radius: 4px; }

ul.plain { list-style: none; }
ul.bullets { margin: 0 0 1rem 1.15rem; }
ul.bullets li { margin-bottom: 0.35rem; }

/* ---------- Die drei Tueren ---------- */
.tueren { display: grid; gap: 1rem; margin-top: 1.4rem; }
.tuer {
  display: block; padding: 1.3rem 1.2rem; text-decoration: none; color: inherit;
  background: var(--surface); border: 1px solid var(--line);
  border-left: 6px solid var(--cyan); border-radius: var(--radius);
}
.tuer:hover, .tuer:focus-visible { background: var(--surface-2); }
.tuer .kicker { display: block; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: var(--text-mute); }
.tuer .titel { display: block; font-size: 1.28rem; font-weight: 800; line-height: 1.2; margin: 0.15rem 0 0.35rem; color: var(--cyan); }
.tuer .zeit { display: inline-block; font-size: 0.8rem; color: var(--text-mute); margin-top: 0.5rem; }
.tuer p { margin: 0; color: var(--text-mute); font-size: 0.95rem; }
.tuer--notfall { border-left-color: var(--danger); }
.tuer--notfall .titel { color: var(--danger); }
.tuer--vorbereiten { border-left-color: var(--orange); }
.tuer--vorbereiten .titel { color: var(--orange); }

/* ---------- Buch-Sektion (Startseite) ---------- */
.buch {
  display: grid; gap: 1.2rem; justify-items: center;
  background: var(--surface); border: 1px solid var(--line);
  border-left: 6px solid var(--orange); border-radius: var(--radius);
  padding: 1.3rem 1.2rem; margin-top: 1.4rem;
}
.buch-cover {
  width: min(230px, 62vw); height: auto; border-radius: 6px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}
.buch-text h3 { color: var(--cyan); margin: 0 0 0.1rem; font-size: 1.35rem; }
.buch-untertitel { color: var(--cyan-soft); font-weight: 600; margin-bottom: 0.8rem; }
.buch-bezug { margin-bottom: 0; }
@media (min-width: 46rem) {
  .buch { grid-template-columns: auto 1fr; gap: 1.6rem; align-items: start; justify-items: start; }
  .buch-cover { width: 200px; }
}

/* ---------- Karten / Boxen ---------- */
.karte {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.1rem 1.15rem; margin-bottom: 1rem;
}
.karte h3 { color: var(--cyan); }
.karte--warn { border-left: 5px solid var(--orange); }
.karte--danger { border-left: 5px solid var(--danger); }

/* ---------- Werkstatt-Formulare (Codewort, Sicherheitsplan) ---------- */
html:not(.js) .js-noetig { display: none; }
.druckbogen { display: none; }
.feld {
  width: 100%; min-height: 48px; padding: 0.55rem 0.75rem; margin-top: 0.3rem;
  font: inherit; color: var(--text);
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius);
}
.feld:focus { border-color: var(--cyan); }
.plan-zeile { display: grid; gap: 0.7rem; margin-bottom: 0.8rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.plan-zeile label { display: block; font-size: 0.9rem; color: var(--text-mute); font-weight: 600; }
.plan-knoepfe { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1.1rem; }
.btn--gefahr { border-color: var(--danger); color: var(--danger); }
.btn--gefahr:hover, .btn--gefahr:focus-visible { background: var(--danger); color: #fff; }

.codewort-anzeige {
  font-size: clamp(1.5rem, 5vw, 2.1rem); font-weight: 800; color: var(--orange);
  min-height: 1.4em; margin-bottom: 0.6rem;
}
.ampel { border: 1px solid var(--line); border-radius: var(--radius); padding: 0.8rem 0.95rem; margin-top: 0.8rem; }
.ampel-kopf { font-weight: 800; display: flex; align-items: center; gap: 0.55rem; margin-bottom: 0.4rem; }
.ampel-punkt {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.7em; height: 1.7em; border-radius: 50%; font-weight: 800; color: var(--bg);
}
.ampel--gruen { border-left: 6px solid var(--ok); }
.ampel--gruen .ampel-punkt { background: var(--ok); }
.ampel--gruen .ampel-kopf { color: var(--ok); }
.ampel--gelb { border-left: 6px solid var(--orange); }
.ampel--gelb .ampel-punkt { background: var(--orange); }
.ampel--gelb .ampel-kopf { color: var(--orange); }
.ampel--rot { border-left: 6px solid var(--danger); }
.ampel--rot .ampel-punkt { background: var(--danger); color: #fff; }
.ampel--rot .ampel-kopf { color: var(--danger); }

/* ---------- Prüf-Assistent ---------- */
.stufentitel {
  display: flex; align-items: baseline; gap: 0.6rem; flex-wrap: wrap;
  font-size: 1.15rem; font-weight: 800; margin: 1.4rem 0 0.6rem;
}
.stufennr {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--bg); background: var(--cyan); border-radius: 999px; padding: 0.22rem 0.65rem;
  white-space: nowrap;
}
.sagsatz {
  font-size: clamp(1.35rem, 4.5vw, 1.8rem); font-weight: 800; line-height: 1.35;
  color: var(--cyan-soft); max-width: none; margin-bottom: 0.9rem;
}
.ausgaenge { display: grid; gap: 0.8rem; margin-top: 0.9rem; }
.ausgang { border: 1px solid var(--line); border-radius: var(--radius); padding: 0.9rem 1rem; }
.ausgang--echt { border-left: 5px solid var(--ok, #3fbf7f); }
.ausgang--betrug { border-left: 5px solid var(--danger); }
.ausgang-titel { font-weight: 800; margin-bottom: 0.4rem; }
.ausgang--echt .ausgang-titel { color: var(--ok, #3fbf7f); }
.ausgang--betrug .ausgang-titel { color: var(--danger); }
.stufen-nav { display: flex; gap: 0.7rem; flex-wrap: wrap; margin-top: 1.1rem; }
/* Nur für Screenreader: sagt den Schrittwechsel an, ohne die sichtbare
   Schritt-Plakette zu doppeln */
.stufen-melder {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.timer { display: flex; align-items: center; gap: 0.8rem; flex-wrap: wrap; margin: 0.4rem 0 0.8rem; }
.timer-anzeige { display: inline-flex; align-items: center; gap: 0.5rem; }
.timer-ring { width: 44px; height: 44px; transform: rotate(-90deg); }
.timer-ring .spur { fill: none; stroke: var(--line); stroke-width: 4; }
.timer-ring .lauf { fill: none; stroke: var(--cyan); stroke-width: 4; stroke-linecap: round; transition: stroke-dashoffset 1s linear; }
.timer-zahl { font-weight: 800; font-size: 1.1rem; min-width: 2ch; }
.timer-hinweis { font-size: 0.85rem; }

@media (min-width: 46rem) {
  .ausgaenge { grid-template-columns: 1fr 1fr; }
}

/* ---------- Notfallkarten (Druckvorlagen, Bildschirm-Ansicht) ---------- */
.druckkarte { border-top: 4px solid var(--orange); padding: 1.15rem 1.25rem 1.25rem; }
.druckkarte .kopf {
  display: flex; align-items: center; gap: 0.6rem;
  border-bottom: 1px solid var(--line); padding-bottom: 0.7rem; margin-bottom: 0.9rem;
}
.druckkarte .kopf-schild { flex: 0 0 auto; width: 24px; height: 28px; color: var(--orange); }
.druckkarte .kopf h3 { margin: 0; font-size: 1.15rem; letter-spacing: 0.01em; }
.druckkarte .kopf-nr {
  margin-left: auto; flex: 0 0 auto; font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-mute);
  border: 1px solid var(--line); border-radius: 999px; padding: 0.2rem 0.6rem; white-space: nowrap;
}
.druckkarte .schritt { display: flex; gap: 0.7rem; align-items: baseline; }
.druckkarte .snr {
  flex: 0 0 auto; width: 1.65em; height: 1.65em; align-self: flex-start; margin-top: 0.1em;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--cyan); border-radius: 50%;
  font-size: 0.88em; font-weight: 800; color: var(--cyan);
}
.druckkarte p > strong:first-child { color: var(--cyan-soft); }
.druckkarte .schritt strong { color: var(--cyan-soft); }
.druckkarte .merk {
  background: var(--surface-2); border-left: 4px solid var(--orange);
  border-radius: 0 var(--radius) var(--radius) 0; padding: 0.6rem 0.8rem; margin-top: 0.9rem;
}
.druckkarte .linie { display: inline-block; border-bottom: 1px solid var(--text-mute); min-width: 55mm; }
.nummernblock { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 0.9rem 0; }
.nummernblock .nummer {
  flex: 1 1 8rem; display: flex; flex-direction: column; align-items: center; text-align: center;
  border: 2px solid var(--cyan); border-radius: var(--radius); padding: 0.55rem 0.4rem;
}
.nummernblock .nummer strong { font-size: 1.35em; color: var(--cyan); letter-spacing: 0.03em; }

.hinweis {
  border: 1px solid var(--line); border-left: 5px solid var(--orange);
  background: var(--surface); border-radius: var(--radius);
  padding: 0.9rem 1rem; margin: 1.2rem 0; font-size: 0.95rem;
}
.hinweis .titel { font-weight: 800; color: var(--orange); display: block; margin-bottom: 0.25rem; font-size: 0.85rem; letter-spacing: 0.06em; text-transform: uppercase; }

/* ---------- Schritte ---------- */
ol.schritte { list-style: none; counter-reset: s; }
ol.schritte > li {
  counter-increment: s; position: relative;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1rem 1.1rem 1rem 3.4rem; margin-bottom: 0.85rem;
}
ol.schritte > li::before {
  content: counter(s);
  position: absolute; left: 0.9rem; top: 1rem;
  width: 1.85rem; height: 1.85rem; border-radius: 50%;
  background: var(--orange); color: #10161D;
  font-weight: 800; font-size: 0.95rem;
  display: flex; align-items: center; justify-content: center;
}
ol.schritte .tun { font-size: 1.1rem; font-weight: 700; line-height: 1.35; margin-bottom: 0.5rem; display: block; }
ol.schritte p { font-size: 0.95rem; margin-bottom: 0.6rem; }
ol.schritte p:last-child { margin-bottom: 0; }

.mitbringen { font-size: 0.9rem; color: var(--text-mute); }
.mitbringen b { color: var(--text); }

/* ---------- Buttons ---------- */
.btn, .btn-call {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 52px; padding: 0.6rem 1.1rem;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface-2); color: var(--text);
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
}
.btn:hover, .btn-call:hover, .btn:focus-visible, .btn-call:focus-visible { background: var(--line); }
.btn--primary { background: var(--orange); color: #10161D; border-color: var(--orange); }
.btn--primary:hover, .btn--primary:focus-visible { background: var(--orange-lo); }
.btn-call {
  background: var(--danger-bg); border-color: var(--danger); color: #fff;
  min-height: 60px; font-size: 1.1rem; width: 100%; margin-bottom: 0.6rem;
}
.btn-call:hover, .btn-call:focus-visible { background: #94272a; }
.btn-call .nr { font-size: 1.25rem; font-weight: 800; }
.btn-small { min-height: 44px; font-size: 0.85rem; padding: 0.4rem 0.8rem; }

/* ---------- Satz zum Vorlesen / Kopieren ---------- */
.satz {
  background: var(--surface-2); border: 1px dashed var(--line); border-radius: var(--radius);
  padding: 0.9rem 1rem; margin: 0.6rem 0;
}
.satz q { display: block; font-size: 1.08rem; line-height: 1.5; color: var(--cyan-soft); font-style: normal; }
.satz .werkzeuge { margin-top: 0.6rem; display: flex; gap: 0.5rem; flex-wrap: wrap; }
.kopiert { color: var(--ok); font-size: 0.85rem; font-weight: 700; align-self: center; }

/* ---------- Abhaken ---------- */
.abhaken { display: flex; align-items: center; gap: 0.6rem; margin-top: 0.7rem; font-size: 0.9rem; color: var(--text-mute); cursor: pointer; }
.abhaken input { width: 1.4rem; height: 1.4rem; accent-color: var(--ok); flex: 0 0 auto; cursor: pointer; }
li.erledigt { opacity: 0.62; }
li.erledigt .tun { text-decoration: line-through; }

/* ---------- Auswahl-Kacheln ---------- */
.kacheln { display: grid; gap: 0.7rem; }
.kachel {
  display: block; text-align: left; width: 100%;
  background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--danger);
  border-radius: var(--radius); padding: 1rem 1.1rem; color: var(--text);
  font: inherit; font-size: 1.05rem; font-weight: 700; line-height: 1.35;
  text-decoration: none; cursor: pointer; min-height: 64px;
}
.kachel:hover, .kachel:focus-visible { background: var(--surface-2); }
.kachel small { display: block; font-weight: 400; font-size: 0.86rem; color: var(--text-mute); margin-top: 0.2rem; }

/* ---------- Fristen-Rechner ---------- */
.rechner label { display: block; font-weight: 700; margin-bottom: 0.35rem; }
.rechner input[type="date"] {
  font: inherit; padding: 0.6rem 0.7rem; min-height: 52px; width: 100%; max-width: 20rem;
  background: var(--surface-2); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius);
}
table.fristen { width: 100%; border-collapse: collapse; margin-top: 1rem; font-size: 0.94rem; }
table.fristen th, table.fristen td { text-align: left; padding: 0.55rem 0.5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
table.fristen thead th { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-mute); font-weight: 700; }
table.fristen tbody th { font-size: 0.95rem; font-weight: 700; color: var(--text); }
table.fristen tbody th .mute { display: block; font-weight: 400; font-size: 0.83rem; margin-top: 0.1rem; }
.status { font-weight: 800; white-space: nowrap; }
.status--offen { color: var(--ok); }
.status--knapp { color: var(--orange); }
.status--zu { color: var(--danger); }

/* ---------- Nummern-Register ---------- */
.suche { width: 100%; font: inherit; padding: 0.7rem 0.8rem; min-height: 52px;
  background: var(--surface-2); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius); }
.filter { display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 0.8rem 0 1.2rem; }
.filter button {
  font: inherit; font-size: 0.85rem; font-weight: 700; min-height: 44px; padding: 0.35rem 0.85rem;
  background: var(--surface); color: var(--text-mute);
  border: 1px solid var(--line); border-radius: 999px; cursor: pointer;
}
.filter button[aria-pressed="true"] { background: var(--cyan); color: #0F141A; border-color: var(--cyan); }

.eintrag { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; margin-bottom: 0.8rem; }
.eintrag-datum {
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--text-mute); margin-bottom: 0.5rem;
}
.eintrag h3 { color: var(--cyan); margin-bottom: 0.5rem; }
.eintrag h3 { color: var(--cyan); margin-bottom: 0.3rem; }
.eintrag dl { margin-top: 0.5rem; font-size: 0.93rem; }
.eintrag dt { font-weight: 700; color: var(--text); margin-top: 0.45rem; }
.eintrag dd { color: var(--text-mute); }
.eintrag .kontakt { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.6rem 0 0.2rem; }
.eintrag .url { font-size: 0.85rem; word-break: break-all; }

/* ---------- Fusszeile ---------- */
footer.site { border-top: 1px solid var(--line); background: var(--surface); margin-top: 3rem; }
footer.site .inner { max-width: var(--wrap); margin: 0 auto; padding: 1.6rem 1rem 2.4rem; font-size: 0.86rem; color: var(--text-mute); }
footer.site a { color: var(--cyan-soft); }
footer.site .stand { display: inline-block; padding: 0.2rem 0.6rem; border: 1px solid var(--line); border-radius: 999px; margin-bottom: 0.8rem; }
footer.site nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 0.9rem; }

.themeswitch {
  display: inline-block; margin-left: auto; align-self: center;
  min-height: 48px; padding: 0.5rem 0.95rem; font: inherit; font-size: 0.82rem; font-weight: 700;
  background: var(--surface-2); color: var(--text); border: 1px solid var(--line); border-radius: 999px; cursor: pointer;
  white-space: nowrap;
}
.themeswitch:hover, .themeswitch:focus-visible { background: var(--surface); border-color: var(--cyan); }

.offline-hinweis { display: none; background: var(--surface-2); border: 1px solid var(--orange); border-radius: var(--radius); padding: 0.7rem 0.9rem; margin-bottom: 1rem; font-size: 0.9rem; }
body.offline .offline-hinweis { display: block; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 0.5rem; top: 0.5rem; z-index: 50; background: var(--orange); color: #10161D; padding: 0.6rem 1rem; border-radius: var(--radius); font-weight: 700; }

.nurdruck { display: none; }

/* ---------- Groessere Bildschirme ---------- */
@media (min-width: 46rem) {
  .tueren { grid-template-columns: repeat(3, 1fr); }
  .kacheln { grid-template-columns: repeat(2, 1fr); }
  header.site h1 { font-size: 1.6rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
