/*
 * marc-oltersdorf.de – Thema "Maschinenraum": dunkel, technisch, ein Neon-Akzent.
 * Hell/Dunkel über html[data-thema] (js/thema.js). Schriften liegen lokal
 * (public/schrift, OFL). Bewegung nur ohne prefers-reduced-motion.
 */

@font-face {
    font-family: "Space Grotesk";
    src: url("/schrift/space-grotesk.woff2") format("woff2");
    font-weight: 300 700;
    font-display: swap;
}
@font-face {
    font-family: "JetBrains Mono";
    src: url("/schrift/jetbrains-mono.woff2") format("woff2");
    font-weight: 100 800;
    font-display: swap;
}

:root {
    --grund: #0a0c10;
    --flaeche: #10141b;
    --flaeche-2: #161b25;
    --flaeche-glas: rgba(16, 20, 27, .72);
    --linie: rgba(255, 255, 255, .08);
    --linie-stark: rgba(255, 255, 255, .16);
    --text: #e6edf3;
    --text-2: #9aa7b8;
    --text-3: #6b778a;
    --akzent: #3cf5c0;
    --akzent-tief: #19c99a;
    --akzent-text: #04130e;
    --akzent-2: #8b5cf6;
    --gelb: #ffc857;
    --rot: #ff5d73;
    --blau: #5cc8ff;
    --schein: rgba(60, 245, 192, .16);
    --schatten: 0 10px 40px -12px rgba(0, 0, 0, .6);
    --schrift: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
    --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    --breite: 1180px;
    --rand: clamp(16px, 4vw, 40px);
    --rund: 14px;
    color-scheme: dark;
}
html[data-thema="hell"] {
    --grund: #f5f7fa;
    --flaeche: #ffffff;
    --flaeche-2: #edf1f6;
    --flaeche-glas: rgba(255, 255, 255, .78);
    --linie: rgba(10, 14, 22, .09);
    --linie-stark: rgba(10, 14, 22, .18);
    --text: #0d1117;
    --text-2: #4d5a6c;
    --text-3: #7a8699;
    --akzent: #0a9f78;
    --akzent-tief: #077d5e;
    --akzent-text: #ffffff;
    --akzent-2: #6d48e0;
    --gelb: #a86a00;
    --rot: #cf2441;
    --blau: #1474b8;
    --schein: rgba(10, 159, 120, .12);
    --schatten: 0 10px 30px -14px rgba(16, 24, 40, .25);
    color-scheme: light;
}

@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .28s; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 90px; }
body {
    margin: 0;
    background: var(--grund);
    color: var(--text);
    font-family: var(--schrift);
    font-size: 17px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
main { flex: 1; position: relative; z-index: 1; }
img { max-width: 100%; height: auto; }
a { color: var(--akzent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--text); }
::selection { background: var(--akzent); color: var(--akzent-text); }
:focus-visible { outline: 2px solid var(--akzent); outline-offset: 3px; border-radius: 4px; }
.mono { font-family: var(--mono); font-feature-settings: "calt" 1; }
.akzent { color: var(--akzent); }
.leer { color: var(--text-2); }
[hidden] { display: none !important; }
kbd {
    font-family: var(--mono); font-size: .72em; padding: .1em .45em; border-radius: 5px;
    border: 1px solid var(--linie-stark); border-bottom-width: 2px; background: var(--flaeche-2); color: var(--text-2);
}
.sprung { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--akzent); color: var(--akzent-text); padding: 8px 14px; border-radius: 8px; }
.sprung:focus { left: 8px; }
.nur-hell { display: none; }
html[data-thema="hell"] .nur-hell { display: inline; }
html[data-thema="hell"] .nur-dunkel { display: none; }

/* ---------- Hintergrund: Raster + Schein ---------- */
.hintergrund { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.raster {
    position: absolute; inset: -2px;
    background-image: linear-gradient(var(--linie) 1px, transparent 1px), linear-gradient(90deg, var(--linie) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 80%);
    opacity: .7;
}
.schein { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .5; }
.schein-a { width: 520px; height: 520px; background: var(--akzent-2); top: -220px; left: -120px; opacity: .22; }
.schein-b { width: 480px; height: 480px; background: var(--akzent); top: 10%; right: -220px; opacity: .12; }

/* ---------- Kopf ---------- */
.kopf {
    position: sticky; top: 0; z-index: 30;
    background: var(--flaeche-glas);
    backdrop-filter: saturate(160%) blur(14px);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    border-bottom: 1px solid var(--linie);
}
.kopf-innen {
    max-width: var(--breite); margin: 0 auto; padding: 12px var(--rand);
    display: flex; align-items: center; gap: 20px;
}
.marke { display: inline-flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none; font-family: var(--mono); font-weight: 700; font-size: 16px; white-space: nowrap; }
.marke:hover { color: var(--text); }
.marke-prompt { color: var(--akzent); }
.marke-rest { color: var(--text-3); font-weight: 400; }
.cursor { width: 9px; height: 18px; background: var(--akzent); display: inline-block; animation: blinken 1.1s steps(1) infinite; box-shadow: 0 0 12px var(--akzent); }
@keyframes blinken { 50% { opacity: 0; } }
.hauptnav { display: flex; gap: 4px; margin-right: auto; }
.hauptnav a {
    white-space: nowrap;
    color: var(--text-2); text-decoration: none; padding: 6px 12px; border-radius: 8px; font-weight: 500; font-size: 15px;
}
.hauptnav a:hover, .hauptnav a[aria-current] { color: var(--text); background: var(--flaeche-2); }
.hauptnav a[aria-current] { box-shadow: inset 0 -2px 0 var(--akzent); }
.werkzeuge { display: flex; align-items: center; gap: 8px; }
.knopf-suche {
    display: inline-flex; align-items: center; gap: 10px; height: 36px; padding: 0 10px 0 12px;
    border: 1px solid var(--linie-stark); border-radius: 10px; background: var(--flaeche); color: var(--text-2);
    font: inherit; font-size: 14px; cursor: pointer; transition: border-color .2s, color .2s;
}
.knopf-suche:hover { border-color: var(--akzent); color: var(--text); }
.knopf-rund {
    width: 36px; height: 36px; display: inline-grid; place-items: center; border-radius: 10px; cursor: pointer;
    border: 1px solid var(--linie-stark); background: var(--flaeche); color: var(--text-2); transition: all .2s;
}
.knopf-rund:hover { color: var(--akzent); border-color: var(--akzent); box-shadow: 0 0 0 4px var(--schein); }
@media (max-width: 720px) {
    .nur-breit { display: none !important; }
    .held-netz { opacity: .45; }
    .werkzeuge { gap: 6px; }
    .marke-rest { display: none; }
    .kopf-innen { gap: 10px; }
    .hauptnav a { padding: 6px 8px; }
    .knopf-suche { width: 36px; padding: 0; justify-content: center; }
}

/* ---------- Knöpfe ---------- */
.knopf {
    display: inline-flex; align-items: center; gap: 10px; padding: 12px 20px; border-radius: 12px;
    font: inherit; font-weight: 600; font-size: 16px; text-decoration: none; cursor: pointer;
    border: 1px solid transparent; transition: transform .15s, box-shadow .2s, background .2s, color .2s;
}
.knopf:active { transform: translateY(1px); }
.knopf-primaer { background: var(--akzent); color: var(--akzent-text); box-shadow: 0 0 0 0 var(--schein), 0 8px 30px -8px var(--akzent); }
.knopf-primaer:hover { color: var(--akzent-text); box-shadow: 0 0 0 6px var(--schein), 0 8px 30px -6px var(--akzent); }
.knopf-geist { background: var(--flaeche); color: var(--text); border-color: var(--linie-stark); }
.knopf-geist:hover { color: var(--text); border-color: var(--akzent); }
.link-knopf { background: none; border: 0; padding: 0; color: var(--akzent); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Hero ---------- */
.held {
    position: relative; min-height: min(86vh, 820px); display: flex; align-items: center;
    max-width: var(--breite); margin: 0 auto; padding: 40px var(--rand) 60px;
}
.held-netz { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.held-inhalt { position: relative; z-index: 1; max-width: 680px; pointer-events: none; }
.held-inhalt a, .held-inhalt button { pointer-events: auto; }
.dachzeile { font-family: var(--mono); font-size: 14px; color: var(--text-2); display: flex; align-items: center; gap: 10px; margin: 0 0 18px; }
.punkt-gruen { width: 8px; height: 8px; border-radius: 50%; background: var(--akzent); box-shadow: 0 0 0 4px var(--schein), 0 0 14px var(--akzent); display: inline-block; animation: pulsieren 2.4s ease-in-out infinite; }
@keyframes pulsieren { 50% { box-shadow: 0 0 0 8px transparent, 0 0 18px var(--akzent); } }
.held-titel { font-size: clamp(40px, 7vw, 76px); line-height: 1.04; letter-spacing: -.035em; margin: 0 0 24px; font-weight: 700; }
.held-titel .zeile { display: block; }
.verlauf {
    background: linear-gradient(100deg, var(--akzent) 0%, var(--blau) 45%, var(--akzent-2) 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.verlauf.tippt::after { content: "▍"; color: var(--akzent); -webkit-text-fill-color: var(--akzent); font-weight: 300; font-size: .62em; vertical-align: .12em; margin-left: .04em; animation: blinken 1s steps(1) infinite; }
.held-titel .zeile:last-child { min-height: 2.08em; }
.held-text { font-size: clamp(17px, 2vw, 20px); color: var(--text-2); max-width: 600px; margin: 0 0 32px; text-shadow: 0 0 20px var(--grund), 0 0 4px var(--grund); }
.held-knoepfe { display: flex; flex-wrap: wrap; gap: 12px; }
.zahlen { display: flex; gap: clamp(20px, 5vw, 48px); margin: 48px 0 0; }
.zahlen div { display: flex; flex-direction: column-reverse; }
.zahlen dt { font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--text-3); }
.zahlen dd { margin: 0; font-size: 34px; font-weight: 700; font-family: var(--mono); color: var(--text); }
.held-hinweis { position: absolute; right: var(--rand); bottom: 24px; z-index: 1; font-family: var(--mono); font-size: 12px; color: var(--text-3); margin: 0; }

/* ---------- Abschnitte ---------- */
.abschnitt, .seitenkopf, .filter, .netz-buehne, .textseite, .fehlerseite {
    max-width: var(--breite); margin: 0 auto; padding-left: var(--rand); padding-right: var(--rand);
}
.abschnitt { padding-top: 40px; padding-bottom: 40px; }
.abschnitt-kopf { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.abschnitt-kopf h2 { font-size: clamp(24px, 3vw, 32px); letter-spacing: -.02em; margin: 0; }
.abschnitt-kopf h2 .mono { font-size: .55em; margin-right: 10px; vertical-align: middle; font-weight: 500; }
.mehr { font-family: var(--mono); font-size: 14px; text-decoration: none; }
.seitenkopf { padding-top: 48px; padding-bottom: 12px; }
.seitenkopf h1 { font-size: clamp(36px, 5.5vw, 60px); letter-spacing: -.03em; line-height: 1.08; margin: 8px 0 12px; }
.einleitung { color: var(--text-2); font-size: 19px; margin: 0; max-width: 720px; }
.brotkrumen { font-family: var(--mono); font-size: 13px; color: var(--text-3); display: flex; flex-wrap: wrap; gap: 8px; }
.brotkrumen a { color: var(--text-2); text-decoration: none; }
.brotkrumen a:hover { color: var(--akzent); }
.jahr { font-size: 14px; color: var(--text-3); letter-spacing: .1em; margin: 32px 0 16px; display: flex; align-items: center; gap: 14px; }
.jahr::after { content: ""; flex: 1; height: 1px; background: var(--linie); }

/* ---------- Karten (mit Leuchten, das der Maus folgt) ---------- */
.karten { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 18px; }
.karte {
    --mx: 50%; --my: 0%;
    position: relative; border-radius: var(--rund); background: var(--flaeche);
    border: 1px solid var(--linie); padding: 22px 22px 18px; display: flex; flex-direction: column;
    transition: transform .25s cubic-bezier(.2, .8, .2, 1), border-color .25s, box-shadow .25s;
    isolation: isolate; overflow: hidden;
}
.karte::before {
    content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .3s;
    background: radial-gradient(420px circle at var(--mx) var(--my), var(--schein), transparent 45%);
}
.karte:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--akzent) 45%, transparent); box-shadow: var(--schatten); }
.karte:hover::before { opacity: 1; }
.karte-link { color: inherit; text-decoration: none; flex: 1; }
.karte-link:hover { color: inherit; }
.karte-link::after { content: ""; position: absolute; inset: 0; z-index: 0; }
.karte-meta { display: flex; gap: 14px; font-family: var(--mono); font-size: 12.5px; color: var(--text-3); margin-bottom: 10px; }
.karte-hilfreich { color: var(--akzent); }
.karte-titel { font-size: 21px; line-height: 1.25; margin: 0 0 10px; letter-spacing: -.01em; }
.karte:hover .karte-titel { color: var(--akzent); }
.karte-text { color: var(--text-2); font-size: 15.5px; margin: 0 0 14px; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.schlagworte { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; position: relative; z-index: 1; }
.schlagworte a {
    font-family: var(--mono); font-size: 12.5px; text-decoration: none; color: var(--akzent);
    background: color-mix(in srgb, var(--akzent) 10%, transparent); padding: 3px 9px; border-radius: 6px;
}
.schlagworte a:hover { background: var(--akzent); color: var(--akzent-text); }

/* ---------- Ablauf (wie Beiträge entstehen) ---------- */
.ablauf { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 18px; counter-reset: schritt; position: relative; }
.ablauf li { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--rund); padding: 24px; position: relative; }
.ablauf li::after { content: "→"; position: absolute; right: -16px; top: 50%; transform: translateY(-50%); color: var(--akzent); font-family: var(--mono); z-index: 2; }
.ablauf li:last-child::after { display: none; }
@media (max-width: 860px) { .ablauf li::after { display: none; } }
.ablauf-nr { display: inline-block; font-size: 12px; color: var(--akzent); border: 1px solid color-mix(in srgb, var(--akzent) 40%, transparent); border-radius: 6px; padding: 2px 8px; }
.ablauf h3 { margin: 14px 0 8px; font-size: 20px; }
.ablauf p { margin: 0; color: var(--text-2); font-size: 15.5px; }

.themenwolke { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.themenwolke a {
    display: inline-flex; align-items: center; gap: 4px; padding: 8px 14px; border-radius: 10px;
    background: var(--flaeche); border: 1px solid var(--linie); color: var(--text); text-decoration: none; font-weight: 500;
}
.themenwolke a:hover { border-color: var(--akzent); color: var(--akzent); }
.themenwolke .anzahl { font-family: var(--mono); font-size: 12px; color: var(--text-3); margin-left: 6px; }

/* ---------- Wissensnetz (Blog) ---------- */
.netz-buehne { position: relative; margin-top: 24px; }
.netz-gross {
    width: 100%; height: clamp(320px, 46vh, 480px); display: block; border-radius: var(--rund);
    border: 1px solid var(--linie); background: radial-gradient(ellipse at center, color-mix(in srgb, var(--flaeche) 80%, transparent), transparent 75%);
    cursor: grab; touch-action: pan-y;
}
.netz-gross:active { cursor: grabbing; }
.netz-legende { font-family: var(--mono); font-size: 12px; color: var(--text-3); margin: 10px 0 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.punkt { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.punkt-beitrag { background: var(--akzent); box-shadow: 0 0 8px var(--akzent); }
.punkt-thema { background: var(--akzent-2); box-shadow: 0 0 8px var(--akzent-2); }
.filter { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 24px; }
.filter a {
    font-family: var(--mono); font-size: 13px; color: var(--text-2); text-decoration: none; padding: 6px 12px; border-radius: 999px;
    border: 1px solid var(--linie-stark);
}
.filter a span { color: var(--text-3); margin-left: 4px; }
.filter a:hover { color: var(--akzent); border-color: var(--akzent); }
.filter a[aria-current] { background: var(--akzent); border-color: var(--akzent); color: var(--akzent-text); }
.filter a[aria-current] span { color: inherit; opacity: .7; }

/* ---------- Beitrag ---------- */
.vorschau-balken { background: var(--gelb); color: #1b1300; text-align: center; padding: 8px 16px; font-family: var(--mono); font-size: 14px; position: relative; z-index: 2; }
.vorschau-balken a { color: inherit; }
.beitrag-raster {
    max-width: var(--breite); margin: 0 auto; padding: 40px var(--rand) 20px;
    display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 56px;
}
@media (max-width: 1020px) { .beitrag-raster { grid-template-columns: minmax(0, 1fr); } .seitenleiste { display: none; } }
.beitrag { min-width: 0; max-width: 760px; }
.beitrag-kopf h1 { font-size: clamp(32px, 5vw, 52px); line-height: 1.1; letter-spacing: -.03em; margin: 14px 0 18px; text-wrap: balance; }
.beitrag-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; color: var(--text-2); font-size: 14.5px; font-family: var(--mono); margin-bottom: 14px; }
.autor { display: inline-flex; align-items: center; gap: 8px; color: var(--text); font-family: var(--schrift); font-weight: 600; }
.avatar {
    width: 30px; height: 30px; border-radius: 9px; display: inline-grid; place-items: center; font-family: var(--mono); font-size: 12px; font-weight: 700;
    background: linear-gradient(135deg, var(--akzent), var(--akzent-2)); color: #05110d;
}
.lead { font-size: 20px; line-height: 1.6; color: var(--text-2); margin: 24px 0 0; }

/* Lösungsweg als Zeitleiste */
.weg { margin: 40px 0 8px; padding: 24px; border-radius: var(--rund); background: var(--flaeche); border: 1px solid var(--linie); position: relative; overflow: hidden; }
.weg-titel { font-size: 18px; margin: 0 0 22px; display: flex; flex-wrap: wrap; gap: 10px; align-items: baseline; }
.weg-titel .mono { font-size: 13px; font-weight: 500; }
.weg-liste { list-style: none; margin: 0; padding: 0 0 0 30px; position: relative; }
.weg-liste::before { content: ""; position: absolute; left: 8px; top: 6px; bottom: 6px; width: 2px; background: linear-gradient(var(--rot), var(--gelb), var(--akzent)); border-radius: 2px; opacity: .8; }
.station { position: relative; padding: 0 0 20px; }
.station:last-child { padding-bottom: 0; }
.station::before {
    content: ""; position: absolute; left: -28px; top: 5px; width: 14px; height: 14px; border-radius: 50%;
    background: var(--grund); border: 3px solid var(--farbe, var(--akzent)); box-shadow: 0 0 12px var(--farbe, var(--akzent));
}
.station-problem { --farbe: var(--rot); }
.station-versuch { --farbe: var(--blau); }
.station-irrweg { --farbe: var(--gelb); }
.station-erkenntnis { --farbe: var(--akzent-2); }
.station-loesung { --farbe: var(--akzent); }
.station-art { display: inline-block; font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--farbe); margin-right: 8px; }
.station strong { font-size: 16.5px; }
.station p { margin: 4px 0 0; color: var(--text-2); font-size: 15.5px; }
.station-irrweg strong { text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--gelb) 60%, transparent); }

/* Platzhalter-Leiste */
.platzhalter-leiste {
    margin: 28px 0 0; padding: 16px 18px; border-radius: 12px; border: 1px dashed color-mix(in srgb, var(--akzent) 50%, transparent);
    background: color-mix(in srgb, var(--akzent) 5%, transparent); font-size: 14.5px; color: var(--text-2);
    position: sticky; top: 70px; z-index: 5; backdrop-filter: blur(10px);
}
.platzhalter-felder { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.platzhalter-felder label { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 13px; color: var(--text); }
.platzhalter-felder input {
    font-family: var(--mono); font-size: 13px; padding: 6px 10px; border-radius: 8px; width: 160px;
    border: 1px solid var(--linie-stark); background: var(--grund); color: var(--akzent);
}
.platzhalter-felder input:focus { outline: none; border-color: var(--akzent); box-shadow: 0 0 0 3px var(--schein); }

/* Fließtext */
.text { font-size: 18px; line-height: 1.75; }
.text > * + * { margin-top: 1.1em; }
.text h2 { font-size: 30px; line-height: 1.2; letter-spacing: -.02em; margin: 2em 0 .4em; scroll-margin-top: 90px; }
.text h2::before { content: "## "; font-family: var(--mono); color: var(--akzent); font-size: .6em; vertical-align: middle; opacity: .8; }
.text h3 { font-size: 22px; margin: 1.6em 0 .3em; scroll-margin-top: 90px; }
.text p, .text li { color: color-mix(in srgb, var(--text) 88%, var(--text-2)); }
.text ul, .text ol { padding-left: 1.3em; }
.text li + li { margin-top: .35em; }
.text li::marker { color: var(--akzent); }
.text strong { color: var(--text); }
.text blockquote { margin-left: 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--akzent-2); color: var(--text-2); font-style: italic; }
.text hr { border: 0; height: 1px; background: var(--linie-stark); margin: 2.4em 0; }
.text code { font-family: var(--mono); font-size: .86em; background: var(--flaeche-2); border: 1px solid var(--linie); padding: .12em .38em; border-radius: 6px; }
.text a code { color: inherit; }
.text figure { margin: 1.8em 0; }
.text figure img { border-radius: 12px; border: 1px solid var(--linie-stark); display: block; box-shadow: var(--schatten); cursor: zoom-in; }
.text figcaption { font-size: 14px; color: var(--text-3); margin-top: 8px; font-family: var(--mono); }
.text table { width: 100%; border-collapse: collapse; font-size: 15.5px; display: block; overflow-x: auto; }
.text th, .text td { padding: 10px 12px; border-bottom: 1px solid var(--linie); text-align: left; vertical-align: top; }
.text th { font-family: var(--mono); font-size: 13px; color: var(--text-2); text-transform: uppercase; letter-spacing: .06em; }
.text details { border: 1px solid var(--linie); border-radius: 12px; padding: 12px 16px; background: var(--flaeche); }
.text summary { cursor: pointer; font-weight: 600; }
.text aside { border-radius: 12px; padding: 14px 18px 14px 50px; position: relative; background: var(--flaeche); border: 1px solid var(--linie); }
.text aside::before { position: absolute; left: 16px; top: 13px; font-family: var(--mono); font-weight: 700; }
.text aside[data-art="tipp"] { border-color: color-mix(in srgb, var(--akzent) 40%, transparent); }
.text aside[data-art="tipp"]::before { content: "→"; color: var(--akzent); }
.text aside[data-art="hinweis"] { border-color: color-mix(in srgb, var(--blau) 40%, transparent); }
.text aside[data-art="hinweis"]::before { content: "i"; color: var(--blau); }
.text aside[data-art="warnung"] { border-color: color-mix(in srgb, var(--gelb) 50%, transparent); }
.text aside[data-art="warnung"]::before { content: "!"; color: var(--gelb); }
.text aside > :first-child { margin-top: 0; }
.text aside > :last-child { margin-bottom: 0; }
.text var { font-style: normal; }

/* Code-Blöcke (js/beitrag.js baut die Leiste) */
.code { margin: 1.6em 0; border-radius: 12px; border: 1px solid var(--linie-stark); background: #07090c; overflow: hidden; box-shadow: var(--schatten); }
html[data-thema="hell"] .code { background: #0d1117; }
.code-leiste {
    display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 14px; border-bottom: 1px solid rgba(255, 255, 255, .08);
    font-family: var(--mono); font-size: 12px; color: #8b98a9; background: rgba(255, 255, 255, .03);
}
.code-leiste .ampel { margin-right: 4px; }
.code-art { text-transform: uppercase; letter-spacing: .1em; color: var(--akzent); }
html[data-thema="hell"] .code-art { color: #3cf5c0; }
.code-datei { color: #c9d4e2; }
.code-kopieren {
    margin-left: auto; font: inherit; font-size: 12px; color: #c9d4e2; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 7px; padding: 4px 10px; cursor: pointer; transition: all .2s;
}
.code-kopieren:hover { color: #3cf5c0; border-color: #3cf5c0; }
.code-kopieren.ok { color: #04130e; background: #3cf5c0; border-color: #3cf5c0; }
.text pre { margin: 0; padding: 16px 18px; overflow-x: auto; font-family: var(--mono); font-size: 14.5px; line-height: 1.6; color: #e6edf3; tab-size: 4; }
.text pre code { background: none; border: 0; padding: 0; font-size: inherit; color: inherit; }
.text pre[data-art="befehl"] code > .zeile::before { content: var(--prompt, "$ "); color: #3cf5c0; user-select: none; }
.text pre[data-sprache="powershell"], .text pre[data-sprache="ps"] { --prompt: "PS> "; }
.text pre[data-sprache="sql"], .text pre[data-sprache="mysql"] { --prompt: "sql> "; }
.text pre[data-art="ausgabe"] { color: #9aa7b8; }
.text pre var {
    color: #04130e; background: #3cf5c0; border-radius: 4px; padding: 0 4px; font-style: normal; transition: background .2s;
}
.text pre var.leer { background: #ffc857; }
.vergleich { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.vergleich .code { margin: 0; border-radius: 0; box-shadow: none; border: 0; min-width: 0; }
.vergleich .code + .code { border-left: 1px solid rgba(255, 255, 255, .1); }
.vergleich-rahmen { margin: 1.6em 0; border-radius: 12px; border: 1px solid var(--linie-stark); overflow: hidden; box-shadow: var(--schatten); }
.vergleich .code[data-seite="vorher"] .code-art { color: #ff5d73; }
@media (max-width: 760px) { .vergleich { grid-template-columns: 1fr; } .vergleich .code + .code { border-left: 0; border-top: 1px solid rgba(255, 255, 255, .1); } }
.ampel { display: inline-flex; gap: 6px; }
.ampel i { width: 10px; height: 10px; border-radius: 50%; background: #ff5f57; display: inline-block; }
.ampel i:nth-child(2) { background: #febc2e; }
.ampel i:nth-child(3) { background: #28c840; }
/* einfache Hervorhebung (js/beitrag.js) */
.t-k { color: #c792ea; }
.t-s { color: #5cc8ff; }
.t-w { color: #c3e88d; }
.t-z { color: #f78c6c; }
.t-c { color: #6b778a; font-style: italic; }
.t-v { color: #ffcb6b; }

/* Fuß des Beitrags */
.beitrag-fuss { margin: 56px 0 0; padding: 28px 0 0; border-top: 1px solid var(--linie); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px; }
.hilfreich-box { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.hilfreich-box p { margin: 0; font-weight: 600; }
.hilfreich {
    position: relative; display: inline-flex; align-items: center; gap: 10px; padding: 10px 14px 10px 16px; border-radius: 12px; cursor: pointer;
    font: inherit; font-weight: 600; color: var(--text); background: var(--flaeche); border: 1px solid var(--linie-stark); transition: all .2s;
}
.hilfreich:hover:not(:disabled) { border-color: var(--akzent); box-shadow: 0 0 0 5px var(--schein); }
.hilfreich-pfeil { color: var(--akzent); transition: transform .3s cubic-bezier(.3, 1.6, .5, 1); }
.hilfreich:hover .hilfreich-pfeil { transform: translateY(-3px); }
.hilfreich-zahl { font-family: var(--mono); font-size: 13px; background: var(--flaeche-2); border-radius: 7px; padding: 2px 8px; color: var(--text-2); }
.hilfreich.erledigt { border-color: var(--akzent); background: color-mix(in srgb, var(--akzent) 12%, var(--flaeche)); cursor: default; }
.hilfreich.erledigt .hilfreich-zahl { background: var(--akzent); color: var(--akzent-text); }
.funke { position: fixed; width: 7px; height: 7px; border-radius: 2px; pointer-events: none; z-index: 60; }
.teilen { display: flex; gap: 10px; flex-wrap: wrap; }
.teilen .knopf { padding: 9px 14px; font-size: 14.5px; }

/* Seitenleiste: Gliederung als Commit-Graph */
.seitenleiste { position: relative; }
.graph { position: sticky; top: 96px; font-size: 14px; }
.graph-titel { font-size: 12px; color: var(--text-3); margin: 0 0 14px; }
.graph ol { list-style: none; margin: 0; padding: 0 0 0 22px; position: relative; }
.graph ol::before { content: ""; position: absolute; left: 5px; top: 8px; bottom: 8px; width: 2px; background: var(--linie-stark); }
.graph ol::after {
    content: ""; position: absolute; left: 5px; top: 8px; width: 2px; height: calc((100% - 16px) * var(--graph, 0));
    background: var(--akzent); box-shadow: 0 0 10px var(--akzent); transition: height .15s linear;
}
.graph li { position: relative; padding: 5px 0; }
.graph li::before {
    content: ""; position: absolute; left: -22px; top: 11px; width: 12px; height: 12px; border-radius: 50%;
    border: 2px solid var(--linie-stark); background: var(--grund); z-index: 1; transition: all .25s;
}
.graph li.ebene-3 { padding-left: 14px; font-size: 13px; }
.graph li.ebene-3::before { width: 8px; height: 8px; left: -20px; top: 13px; }
.graph li.erreicht::before { border-color: var(--akzent); background: var(--akzent); box-shadow: 0 0 10px var(--akzent); }
.graph li.aktuell a { color: var(--text); }
.graph a { color: var(--text-2); text-decoration: none; display: block; line-height: 1.4; }
.graph a:hover { color: var(--akzent); }
.graph-hash { color: var(--gelb); font-size: 11.5px; margin-right: 4px; }
.fortschritt { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 40; pointer-events: none; }
.fortschritt div { height: 100%; width: 100%; transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, var(--akzent-2), var(--akzent)); box-shadow: 0 0 12px var(--akzent); }

/* ---------- Textseiten (Über mich, Impressum, Datenschutz) ---------- */
.textseite { padding-top: 12px; padding-bottom: 60px; max-width: 820px; margin-left: max(var(--rand), calc((100% - var(--breite)) / 2)); }
@media (max-width: 1200px) { .textseite { margin-left: auto; } }
.profil { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; padding: 24px; border-radius: var(--rund); background: var(--flaeche); border: 1px solid var(--linie); margin: 16px 0 32px; position: relative; overflow: hidden; }
.profil-zeichen {
    width: 96px; height: 96px; border-radius: 24px; display: grid; place-items: center; font-family: var(--mono); font-size: 34px; font-weight: 800;
    background: linear-gradient(135deg, var(--akzent), var(--akzent-2)); color: #05110d; box-shadow: 0 0 40px -6px var(--akzent);
}
.profil-json { margin: 0; font-size: 14px; line-height: 1.7; color: var(--text); overflow-x: auto; }
html[data-thema="hell"] .profil-json .t-w { color: #3d7a00; }
html[data-thema="hell"] .profil-json .t-s { color: #1474b8; }

/* ---------- Fehlerseite ---------- */
.fehlerseite { padding-top: 80px; padding-bottom: 80px; max-width: 760px; }
.fehler-terminal { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 12px; padding: 18px 20px; color: var(--text-2); white-space: pre-wrap; word-break: break-all; }
.fehlerseite h1 { font-size: clamp(36px, 6vw, 60px); letter-spacing: -.03em; margin: 32px 0 8px; }
.fehler-detail { font-size: 13px; white-space: pre-wrap; color: var(--text-3); }

/* ---------- Fuß ---------- */
.fuss { position: relative; z-index: 1; border-top: 1px solid var(--linie); margin-top: 60px; background: color-mix(in srgb, var(--flaeche) 60%, transparent); }
.fuss-innen { max-width: var(--breite); margin: 0 auto; padding: 36px var(--rand) 40px; display: grid; grid-template-columns: 1fr auto; gap: 24px 40px; }
.fuss-marke { font-family: var(--mono); font-weight: 700; }
.fuss-marke p { font-family: var(--schrift); font-weight: 400; color: var(--text-2); margin: 6px 0 0; font-size: 15px; }
.fuss-links { display: flex; flex-wrap: wrap; gap: 6px 20px; align-content: start; }
.fuss-links a { color: var(--text-2); text-decoration: none; font-size: 15px; }
.fuss-links a:hover { color: var(--akzent); }
.fuss-zeile { grid-column: 1 / -1; font-family: var(--mono); font-size: 12.5px; color: var(--text-3); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0; }
.fuss-zeile .link-knopf { font-size: inherit; }
@media (max-width: 640px) { .fuss-innen { grid-template-columns: 1fr; } }

/* ---------- Befehlspalette (Strg+K) ---------- */
.palette, .terminal { position: fixed; inset: 0; z-index: 80; display: flex; align-items: flex-start; justify-content: center; padding: 10vh 16px 16px; background: rgba(4, 6, 10, .55); backdrop-filter: blur(6px); }
.palette-fenster, .terminal-fenster {
    width: min(680px, 100%); border-radius: 16px; overflow: hidden; background: var(--flaeche);
    border: 1px solid var(--linie-stark); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .7), 0 0 0 1px var(--schein);
    animation: auftauchen .18s cubic-bezier(.2, .9, .3, 1.2);
}
@keyframes auftauchen { from { opacity: 0; transform: translateY(-8px) scale(.98); } }
.palette-eingabe { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--linie); color: var(--text-3); }
.palette-eingabe input { flex: 1; background: none; border: 0; outline: none; font: inherit; font-size: 18px; color: var(--text); min-width: 0; }
.palette-liste { list-style: none; margin: 0; padding: 8px; max-height: min(56vh, 460px); overflow-y: auto; }
.palette-liste li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; cursor: pointer; }
.palette-liste li[aria-selected="true"] { background: color-mix(in srgb, var(--akzent) 12%, transparent); box-shadow: inset 2px 0 0 var(--akzent); }
.palette-symbol { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--flaeche-2); font-family: var(--mono); font-size: 12px; color: var(--akzent); flex: none; }
.palette-text { min-width: 0; flex: 1; }
.palette-text strong { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.palette-text small { display: block; color: var(--text-3); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.palette-text mark { background: none; color: var(--akzent); }
.palette-leer { color: var(--text-3); padding: 18px 12px; font-size: 15px; }
.palette-fuss { display: flex; gap: 16px; padding: 10px 16px; border-top: 1px solid var(--linie); font-size: 12px; color: var(--text-3); flex-wrap: wrap; }

/* ---------- Terminal ---------- */
.terminal-fenster { background: #07090c; border-color: rgba(60, 245, 192, .25); width: min(780px, 100%); }
.terminal-leiste { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: rgba(255, 255, 255, .04); border-bottom: 1px solid rgba(255, 255, 255, .08); }
.terminal-titel { flex: 1; text-align: center; font-family: var(--mono); font-size: 12.5px; color: #8b98a9; }
.terminal-zu { background: none; border: 0; color: #8b98a9; font-size: 22px; line-height: 1; cursor: pointer; padding: 0 4px; }
.terminal-zu:hover { color: #fff; }
.terminal-ausgabe { font-family: var(--mono); font-size: 14px; line-height: 1.6; color: #c9d4e2; padding: 14px 16px 0; height: min(52vh, 440px); overflow-y: auto; white-space: pre-wrap; word-break: break-word; }
.terminal-ausgabe a { color: #3cf5c0; }
.terminal-ausgabe .t-befehl { color: #fff; }
.terminal-ausgabe .t-fehler { color: #ff5d73; }
.terminal-ausgabe .t-grau { color: #6b778a; }
.terminal-ausgabe .t-mint { color: #3cf5c0; }
.terminal-ausgabe .t-lila { color: #a78bfa; }
.terminal-zeile { display: flex; align-items: center; gap: 8px; padding: 6px 16px 16px; font-family: var(--mono); font-size: 14px; }
.terminal-prompt { color: #3cf5c0; white-space: nowrap; }
.terminal-zeile input { flex: 1; background: none; border: 0; outline: none; color: #fff; font: inherit; caret-color: #3cf5c0; min-width: 0; }
@media (max-width: 600px) { .palette, .terminal { padding-top: 8px; } .terminal-ausgabe { height: 58vh; font-size: 13px; } }

/* ---------- Matrix (Easter Egg) ---------- */
.matrix { position: fixed; inset: 0; z-index: 90; background: #000; cursor: pointer; }
.matrix p { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font-family: var(--mono); color: #3cf5c0; font-size: clamp(16px, 3vw, 26px); text-align: center; text-shadow: 0 0 12px #3cf5c0; margin: 0; padding: 0 16px; }

/* ---------- Bild-Großansicht ---------- */
.lupe { position: fixed; inset: 0; z-index: 85; background: rgba(4, 6, 10, .88); display: grid; place-items: center; padding: 20px; cursor: zoom-out; animation: auftauchen .2s; }
.lupe img { max-height: 92vh; border-radius: 10px; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); }

/* ---------- Erscheinen beim Scrollen ---------- */
.bewegung [data-erscheinen] { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s cubic-bezier(.2, .8, .2, 1); transition-delay: calc(var(--i, 0) * 90ms); }
.bewegung [data-erscheinen].sichtbar { opacity: 1; transform: none; }

/* Thema-Wechsel mit Kreis (View Transitions) */
html.thema-wechsel::view-transition-old(root) { animation: none; }
html.thema-wechsel::view-transition-new(root) { animation: kreis .6s cubic-bezier(.6, 0, .3, 1); }
@keyframes kreis { from { clip-path: circle(0 at var(--wx, 90%) var(--wy, 0%)); } to { clip-path: circle(150% at var(--wx, 90%) var(--wy, 0%)); } }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
    .bewegung [data-erscheinen] { opacity: 1; transform: none; }
}
@media print {
    .kopf, .fuss, .seitenleiste, .hintergrund, .beitrag-fuss, .fortschritt, .platzhalter-leiste { display: none !important; }
    body { background: #fff; color: #000; }
}
