/* Dunkelmodus – wird aktiv, wenn <html data-theme="dark"> gesetzt ist (siehe /assets/theme.js) */
html[data-theme="dark"]{
  color-scheme:dark;
  --ink:#e6ebf2; --muted:#a3afbf; --line:#2c3746; --bg:#0f1520; --card:#18202d;
  --brand:#6ea2f0; --brand-dark:#9cc0f5; --accent:#1c2b44;
  --ok:#4cc47f; --warn:#f0b840; --bad:#f07466;
  --surface:#18202d;
}
html[data-theme="dark"] body{background:var(--bg);color:var(--ink)}

/* Flächen, die im hellen Design fest weiß sind */
html[data-theme="dark"] .top,
html[data-theme="dark"] section.alt,
html[data-theme="dark"] .figure,
html[data-theme="dark"] .buybox,
html[data-theme="dark"] details,
html[data-theme="dark"] input,
html[data-theme="dark"] textarea,
html[data-theme="dark"] .mobilebar,
html[data-theme="dark"] .hx,
html[data-theme="dark"] .sheet,
html[data-theme="dark"] .tag,
html[data-theme="dark"] .chip,
html[data-theme="dark"] .pc,
html[data-theme="dark"] .step,
html[data-theme="dark"] table.t,
html[data-theme="dark"] .toc,
html[data-theme="dark"] .article .cta,
html[data-theme="dark"] .cmp,
html[data-theme="dark"] .nums div{background:var(--surface);color:var(--ink)}
html[data-theme="dark"] .skip:focus{background:var(--surface)}

html[data-theme="dark"] .hero{background:linear-gradient(180deg,#151c28 0%,var(--bg) 100%)}
html[data-theme="dark"] .btn{color:#0b1220}
html[data-theme="dark"] .btn-ghost{color:var(--brand);background:transparent}
html[data-theme="dark"] .btn-ghost:hover{background:var(--accent)}
html[data-theme="dark"] input,html[data-theme="dark"] textarea{border-color:#3a4658}
html[data-theme="dark"] .note{background:#2a2414;border-color:#5a4a1f;color:#f1dfae}
html[data-theme="dark"] .check.no li::before{background-color:#5d6878}
html[data-theme="dark"] footer{background:#0a0f17}
html[data-theme="dark"] .article p,html[data-theme="dark"] .article li{color:var(--ink)}
html[data-theme="dark"] .figure,html[data-theme="dark"] .sheet,html[data-theme="dark"] .tag{box-shadow:0 12px 30px rgba(0,0,0,.45)}

/* Startseite */
html[data-theme="dark"] .blob{opacity:.18}
html[data-theme="dark"] .sheet i{background:#2c3746}
html[data-theme="dark"] .sheet .grid6 b{background:#22304a}
html[data-theme="dark"] .sheet .grid6 b:nth-child(2){background:#1d3a2b}
html[data-theme="dark"] .sheet .grid6 b:nth-child(6){background:#3a3220}
html[data-theme="dark"] .chips{background:rgba(15,21,32,.92)}
html[data-theme="dark"] .cat-head .icon{background:color-mix(in srgb,var(--t) 22%,#18202d)}
html[data-theme="dark"] .fmt{background:color-mix(in srgb,var(--t) 22%,#18202d);color:color-mix(in srgb,var(--t) 60%,#fff)}
html[data-theme="dark"] .pc:hover,html[data-theme="dark"] .pc:focus-visible{box-shadow:0 20px 40px rgba(0,0,0,.5);border-color:color-mix(in srgb,var(--t) 50%,#18202d)}
html[data-theme="dark"] .cat-head .icon svg{stroke:color-mix(in srgb,var(--t) 60%,#fff)}
html[data-theme="dark"] body.home::before{opacity:0!important}

/* Bilder (Screenshots) etwas abdunkeln, damit sie nicht blenden */
html[data-theme="dark"] .figure img,html[data-theme="dark"] .shots img{filter:brightness(.9)}

/* Umschalter in der Kopfzeile */
.theme-toggle{display:inline-grid;place-items:center;width:40px;height:40px;border-radius:50%;border:1px solid var(--line);
  background:transparent;color:var(--ink);cursor:pointer;padding:0;flex:0 0 auto;transition:background .2s,border-color .2s}
.theme-toggle:hover,.theme-toggle:focus-visible{background:var(--accent);border-color:var(--brand)}
.theme-toggle svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.theme-toggle .sun{display:none}
html[data-theme="dark"] .theme-toggle .sun{display:block}
html[data-theme="dark"] .theme-toggle .moon{display:none}
.top-actions{display:flex;align-items:center;gap:10px}
