/* Dunkelmodus des Ausbildungsportals – nur wenn über den Knopf im Kopf gewählt (data-theme="dark"). */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg:#171a20; --soft:#0f1115; --card:#181b21; --text:#e7e9ee; --text2:#c9ced6; --muted:#9aa2ad; --line:#2b3038;
  --accent-soft:#3a2f0c; --accent-ink:#f5d27a; --ok:#4ade80; --ok-soft:#10301c; --no:#f87171; --no-soft:#3a1717;
  --ink:#2f3540; --glass:rgba(20,23,28,.88); --shadow:0 10px 30px rgba(0,0,0,.35);
}
/* Alles Weitere gilt nur, wenn dunkel aktiv ist: .dunkel wird per Skript an <html> gesetzt */
/* Logo: im Dunkelmodus die helle Variante (schwarze Schrift wird weiß, Blitz bleibt gelb) */
.logo-dunkel { display: none !important; }
html.dunkel .logo-hell { display: none !important; }
html.dunkel .logo-dunkel { display: block !important; }
html.dunkel .opt.is-sel { background: #232832; border-color: var(--text); }
html.dunkel .opt.is-sel b { background: var(--text); color: #15181d; }
html.dunkel .q__formel, html.dunkel .fc__main { background: linear-gradient(135deg, #2c250f, #2a2112) !important; border-color: #5a4a1a !important; color: var(--text); }
html.dunkel .btn:hover { box-shadow: 0 8px 20px rgba(0,0,0,.4); }
html.dunkel .lstart .btn { color: #15181d; }
html.dunkel .tag, html.dunkel .brand span { color: var(--accent-ink); }
html.dunkel .hinweis { color: var(--accent-ink); }
html.dunkel .anz--hinweis { color: #6b4b00; }
html.dunkel ::placeholder { color: #6f7783; }
html.dunkel .lern-kacheln .folder .ic { background: #0b0d10; }
html.dunkel .ergebnis-box.is-ok { border-color: #1f5c35; } html.dunkel .ergebnis-box.is-no { border-color: #6b2525; } html.dunkel .ergebnis-box.is-warn { border-color: #6b5517; }

/* Schaltpläne, Diagramme und Bedienfelder bleiben „auf Papier“: innen die hellen Farben */
html.dunkel .papier, html.dunkel .simbox, html.dunkel .skreise figure, html.dunkel .bedien, html.dunkel .sbedien,
html.dunkel .demo, html.dunkel svg.kurve, html.dunkel svg.geraet, html.dunkel svg.widerstand {
  --soft:#f6f7f9; --card:#fff; --text:#15181d; --text2:#2b3038; --muted:#5d6470; --line:#e6e8ec;
  --accent-soft:#fff5d6; --accent-ink:#6b4b00; --ok:#15803d; --ok-soft:#e8f6ec; --no:#b42318; --no-soft:#fdecec; --ink:#15181d;
  color: #15181d;
}
html.dunkel .simbox > svg { background-color: #fff; }
html.dunkel .skreise figure { background-color: #fff; }
html.dunkel .demo { background: #eef0f3; }
html.dunkel svg.kurve, html.dunkel svg.geraet, html.dunkel svg.widerstand { background: #fff; border-radius: 12px; }

/* Umschalter Hell/Dunkel im Kopf */
.thema-knopf { width: 36px; height: 36px; flex: none; display: inline-grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--text); cursor: pointer; padding: 0; }
.thema-knopf:hover { border-color: var(--text); }
.thema-knopf svg { width: 18px; height: 18px; }
.thema-knopf .t-hell { display: none; }
html.dunkel .thema-knopf .t-hell { display: block; } html.dunkel .thema-knopf .t-dunkel { display: none; }
html.dunkel .msg { background: var(--no-soft); color: #fca5a5; }
html.dunkel .row:hover { background: #1e2229; }
html.dunkel .ib.danger:hover { background: var(--no-soft); color: var(--no); }
html.dunkel .bh-haken { background: var(--no-soft); } html.dunkel .bh-haken.ja { background: var(--ok-soft); }
