/* ==========================================================================
   neXart BLOG — Stylesheet
   Aufbau: 1 Tokens · 2 Basis · 3 Hintergrund · 4 Glas · 5 Kopfzeile
           6 Bedienelemente · 7 Hero · 8 Bereiche · 9 Beitragsliste
           10 Reader · 11 Themen/Über/Kontakt/Recht · 12 Statuszeile/Hilfe
           13 Signale · 14 Bewegung · 15 Druck
   Ein Glasrezept für alle Flächen, keine Verläufe, gleiche Radien/Ränder.
   ========================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  color-scheme: dark;
  --bg: #0e1720;
  --panel: #122029;
  --panel-2: #172733;
  --line: #203240;
  --line-strong: #2d4252;
  --text: #dfe6ee;
  --text-2: #a9b7c6;
  --muted: #71869a;
  --accent: #3fa9f5;
  --accent-soft: rgba(63, 169, 245, .12);
  --accent-ink: #06121c;
  --ok: #6cc3a0;
  --sec: #ef8a7a;
  --dsn: #b3a6ec;
  --ki: #5fd0c0;
  --gen: #9fb2c4;
  --warn: #e3b25e;
  --orange: #f27c3c;
  --code-bg: #0c141c;
  --hover: rgba(63, 169, 245, .06);
  --logo-text: #eef3f8;
  --logo-navy: #203240;
  --sig-blue: #3fa9f5;
  --sig-green: #6cd9a8;
  --sig-white: #ffffff;
  --glow-w: 8px;   /* Leuchten der Signale (box-shadow) */
  --glow-r: 4px;   /* Leuchten der Logo-Signale (drop-shadow) */

  /* Hintergrund */
  --grid: rgba(63, 169, 245, .035);
  --glow-o: .8;
  --bg-o: .8;
  --bg-stroke: #3a5770;
  /* Häufigkeit der Signale im Hintergrund: 1 = Grundtakt, 2 = doppelt so oft
     und doppelt so viele gleichzeitig, 0 = aus. Wird von background.js gelesen. */
  --bg-signal-rate: 2;

  /* Glas: eine Rezeptur für alle Flächen */
  --glass: rgba(26, 42, 55, .36);
  --glass-edge: rgba(255, 255, 255, .06);
  --glass-line: rgba(63, 90, 115, .55);
  --glass-blur: 5px;   /* wenig Blur: Leiterbahnen bleiben als weiche Linien sichtbar */

  --f-sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --fs-2xs: .6875rem;
  --fs-xs: .75rem;
  --fs-sm: .8125rem;
  --fs-base: 1rem;
  --fs-md: 1.125rem;
  --fs-lg: 1.375rem;
  --fs-xl: 1.75rem;

  --r: 12px;
  --r-sm: 6px;
  --r-xs: 4px;
  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 56px;
  --pad: clamp(18px, 3vw, 28px);
}

/* Helles Design: beide Wege (System und Schalter) nutzen dieselben Werte */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --bg: #eef2f6;
    --panel: #f4f7fa;
    --panel-2: #f8fafc;
    --line: #d8e0e8;
    --line-strong: #bcc8d4;
    --text: #10202c;
    --text-2: #33475a;
    --muted: #5b6f84;
    --accent: #1570b0;
    --accent-soft: rgba(21, 112, 176, .09);
    --accent-ink: #ffffff;
    --ok: #1b7a55;
    --sec: #b23a2e;
    --dsn: #5b4ab0;
    --ki: #0e7266;
    --gen: #566b80;
    --warn: #93600c;
    --orange: #b5470a;
    --code-bg: #f9fbfc;
    --hover: rgba(21, 112, 176, .05);
    --logo-text: #10202c;
    --logo-navy: #203240;
    --sig-blue: #1a8ae6;
    --sig-green: #12a56b;
    --sig-white: #5ec1ff;
    --glow-w: 12px;
    --glow-r: 6px;
    --grid: rgba(32, 50, 64, .08);
    --glow-o: .5;
    --bg-o: .7;
    --bg-stroke: #9fb1c4;
    --glass: rgba(255, 255, 255, .36);
    --glass-edge: rgba(255, 255, 255, .95);
    --glass-line: rgba(190, 204, 218, .8);
    --glass-blur: 2px;
  }
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #eef2f6;
  --panel: #f4f7fa;
  --panel-2: #f8fafc;
  --line: #d8e0e8;
  --line-strong: #bcc8d4;
  --text: #10202c;
  --text-2: #33475a;
  --muted: #5b6f84;
  --accent: #1570b0;
  --accent-soft: rgba(21, 112, 176, .09);
  --accent-ink: #ffffff;
  --ok: #1b7a55;
  --sec: #b23a2e;
  --dsn: #5b4ab0;
  --ki: #0e7266;
  --gen: #566b80;
  --warn: #93600c;
  --orange: #b5470a;
  --code-bg: #f9fbfc;
  --hover: rgba(21, 112, 176, .05);
  --logo-text: #10202c;
  --logo-navy: #203240;
  --sig-blue: #1a8ae6;
  --sig-green: #12a56b;
  --sig-white: #5ec1ff;
  --glow-w: 12px;
  --glow-r: 6px;
  --grid: rgba(32, 50, 64, .08);
  --glow-o: .5;
  --bg-o: .7;
  --bg-stroke: #9fb1c4;
  --glass: rgba(255, 255, 255, .36);
  --glass-edge: rgba(255, 255, 255, .95);
  --glass-line: rgba(190, 204, 218, .8);
  --glass-blur: 2px;
}
:root[data-theme="dark"] { color-scheme: dark; }

/* ---------- 2. Basis ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: calc(var(--header-h) + 20px); -webkit-text-size-adjust: 100%; }
html:not([data-motion="off"]) { scroll-behavior: smooth; }
body {
  margin: 0;
  position: relative;
  isolation: isolate;
  background: var(--bg);
  color: var(--text);
  font: 400 var(--fs-base)/1.65 var(--f-sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
::selection { background: var(--accent); color: var(--accent-ink); }
h1, h2, h3, h4, h5, h6 { text-wrap: balance; line-height: 1.2; margin: 0; font-weight: 600; }
p { margin: 0; }
.muted { color: var(--muted); }
.error { color: var(--sec); }
.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; }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

kbd {
  display: inline-block; min-width: 1.6em; text-align: center;
  font: 500 var(--fs-2xs)/1 var(--f-mono); color: var(--text-2);
  border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 3px;
  padding: 3px 5px; background: var(--panel);
}
.skip { position: absolute; left: 16px; top: -48px; z-index: 100; padding: 8px 14px; background: var(--accent); color: var(--accent-ink); border-radius: var(--r-sm); font-weight: 600; }
.skip:focus { top: 12px; }
.progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 60; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); }

/* ---------- 3. Hintergrund: Lichtschein, Raster, Platine (JS) ---------- */
body::before {
  content: ""; position: fixed; inset: -20%; z-index: -2; pointer-events: none;
  background:
    radial-gradient(60% 45% at 78% 8%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%),
    radial-gradient(45% 35% at 8% 70%, color-mix(in srgb, var(--ki) 12%, transparent), transparent 70%),
    radial-gradient(35% 30% at 55% 100%, color-mix(in srgb, var(--dsn) 9%, transparent), transparent 70%);
  opacity: var(--glow-o);
  animation: glow-drift 38s ease-in-out infinite alternate;
}
body::after {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 24px 24px;
  -webkit-mask-image: linear-gradient(180deg, #000 0, rgba(0,0,0,.55) 40%, rgba(0,0,0,.25) 100%);
          mask-image: linear-gradient(180deg, #000 0, rgba(0,0,0,.55) 40%, rgba(0,0,0,.25) 100%);
}
@keyframes glow-drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(-3%, 2%, 0) scale(1.06); }
}
.bg-circuit {
  position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: -1; pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, #000 0, rgba(0,0,0,.6) 35%, rgba(0,0,0,.28) 100%);
          mask-image: linear-gradient(180deg, #000 0, rgba(0,0,0,.6) 35%, rgba(0,0,0,.28) 100%);
}
.bg-traces path { fill: none; stroke: var(--bg-stroke); stroke-width: 1.1; stroke-linecap: round; stroke-linejoin: round; opacity: var(--bg-o); }
.bg-pads circle, .bg-pads rect { fill: var(--bg); stroke: var(--bg-stroke); stroke-width: 1.1; opacity: var(--bg-o); }
.bg-pads .bg-via { fill: var(--bg-stroke); stroke: none; }
.bg-smd rect { fill: var(--panel-2); stroke: var(--bg-stroke); stroke-width: 1; opacity: var(--bg-o); }
.bg-smd .cap { fill: var(--bg-stroke); stroke: none; }
.bg-pulse {
  fill: none; stroke: var(--sig-blue); color: var(--sig-blue); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 6 calc(var(--len, 200) * 1px + 20px); stroke-dashoffset: 6; opacity: 0;
}
.bg-pulse[data-c="green"] { stroke: var(--sig-green); color: var(--sig-green); }
.bg-pulse[data-c="white"] { stroke: var(--sig-white); color: var(--sig-white); }
.bg-pulse.run { animation: bg-flow var(--dur, 3s) cubic-bezier(.4, 0, .6, 1) 1 both; }
@keyframes bg-flow {
  0% { stroke-dashoffset: 6; opacity: 0; }
  12% { opacity: .4; }
  85% { opacity: .4; }
  100% { stroke-dashoffset: calc(var(--len, 200) * -1px); opacity: 0; }
}

/* ---------- 4. Glas: eine Rezeptur ---------- */
.glass, .panel, .listing, .topics, .glass-zone, .glass-bar, .help, .gl-pop,
.hero-copy::before, .reader-main::before {
  background: var(--glass);
  border: 1px solid var(--glass-line);
  border-radius: var(--r);
  box-shadow: inset 0 1px 0 var(--glass-edge);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(120%);
          backdrop-filter: blur(var(--glass-blur)) saturate(120%);
}
.panel { overflow: hidden; min-width: 0; }
.panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 0 10px 0 0; min-height: 38px;
  border-bottom: 1px solid var(--glass-line);
  background: color-mix(in srgb, var(--panel-2) 40%, transparent);
}
.panel-tab {
  align-self: stretch; display: inline-flex; align-items: center;
  font: 500 var(--fs-xs)/1 var(--f-mono); color: var(--text);
  padding: 0 14px; border-right: 1px solid var(--glass-line);
  box-shadow: inset 0 2px 0 var(--accent);
}
.badge {
  font: 500 var(--fs-2xs)/1 var(--f-mono); letter-spacing: .04em; text-transform: uppercase;
  color: var(--muted); border: 1px solid var(--line-strong); border-radius: 3px; padding: 4px 6px;
}
.badge.is-open { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 45%, transparent); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass, .panel, .listing, .topics, .glass-zone, .glass-bar, .help, .gl-pop, .hero-copy::before, .reader-main::before { background: color-mix(in srgb, var(--panel) 96%, transparent); }
}

/* ---------- 5. Kopfzeile ---------- */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; color: var(--text); text-decoration: none; }
.logo { display: block; height: 36px; width: auto; }
.lg-blue { fill: #3fa9f5; }
.lg-slate { fill: #566b80; }
.lg-navy { fill: var(--logo-navy); transition: fill .2s; }
.lg-text { fill: var(--logo-text); }
.brand:hover .lg-navy, .brand:focus-visible .lg-navy { fill: #ffffff; }

.site-nav { display: flex; align-items: center; gap: 2px; }
.site-nav a {
  display: inline-flex; align-items: center; gap: 8px;
  font: 500 var(--fs-sm)/1 var(--f-sans); color: var(--text-2); text-decoration: none;
  padding: 8px 10px; border-radius: var(--r-sm);
}
.site-nav a kbd { min-width: 0; padding: 2px 4px; color: var(--muted); }
.site-nav a:hover { color: var(--text); background: var(--hover); }
.site-nav a:hover kbd { color: var(--accent); border-color: var(--accent); }
.site-nav a:focus-visible { outline-offset: -2px; }
.nav-sep { width: 1px; height: 20px; background: var(--line); margin-inline: 8px; }
.icon-btn {
  display: inline-flex; align-items: center; gap: 6px;
  font: 500 var(--fs-xs)/1 var(--f-mono); color: var(--text-2);
  background: transparent; border: 1px solid transparent; border-radius: var(--r-sm);
  padding: 6px 8px; cursor: pointer; text-decoration: none;
}
.icon-btn:hover { color: var(--text); border-color: var(--line-strong); }
.theme-toggle { border-color: var(--line); }
.tt-label { color: var(--muted); }
.tt-value { color: var(--accent); min-width: 4ch; text-align: left; }

.nav-toggle { display: none; }
@media (max-width: 820px) {
  .nav-toggle {
    display: inline-grid; place-items: center; width: 40px; height: 40px; color: var(--text);
    background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-sm); cursor: pointer;
  }
  .bars, .bars::before, .bars::after { display: block; width: 16px; height: 2px; background: currentColor; position: relative; transition: transform .2s; }
  .bars::before, .bars::after { content: ""; position: absolute; left: 0; }
  .bars::before { top: -5px; } .bars::after { top: 5px; }
  .nav-toggle[aria-expanded="true"] .bars { background: transparent; }
  .nav-toggle[aria-expanded="true"] .bars::before { transform: translateY(5px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .bars::after { transform: translateY(-5px) rotate(-45deg); }
  .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 2px;
    padding: 10px var(--gutter) 18px; background: var(--bg); border-bottom: 1px solid var(--line);
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 12px 8px; font-size: 1rem; }
  .nav-sep { width: auto; height: 1px; margin: 8px 0; }
  #help-open { display: none; }
  .theme-toggle { align-self: flex-start; padding: 10px 12px; }
}

/* ---------- 6. Bedienelemente ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 500 var(--fs-sm)/1 var(--f-sans);
  padding: 11px 16px; border-radius: var(--r-sm); border: 1px solid transparent;
  text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s, color .15s;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 88%, var(--text)); }
.btn-ghost { background: color-mix(in srgb, var(--panel) 70%, transparent); color: var(--text); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--accent); }
.btn-sm { padding: 8px 12px; font-size: var(--fs-xs); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.is-armed, .btn-danger:hover { border-color: var(--sec); color: var(--sec); }
.link-btn { background: none; border: 0; padding: 0; font: 500 var(--fs-sm)/1.4 var(--f-mono); color: var(--accent); cursor: pointer; text-align: left; }
.link-btn:hover { text-decoration: underline; }

.seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--line-strong); border-radius: var(--r-sm); overflow: hidden; background: color-mix(in srgb, var(--panel) 70%, transparent); }
.seg button {
  display: inline-flex; align-items: center; gap: 7px;
  font: 500 var(--fs-xs)/1 var(--f-mono); color: var(--text-2);
  background: transparent; border: 0; border-right: 1px solid var(--line); padding: 10px 12px; cursor: pointer;
}
.seg button:last-child { border-right: 0; }
.seg button:hover { color: var(--text); background: var(--hover); }
.seg button[aria-pressed="true"] { color: var(--text); background: color-mix(in srgb, var(--panel-2) 80%, transparent); box-shadow: inset 0 -2px 0 var(--accent); }
.seg .n { color: var(--muted); font-variant-numeric: tabular-nums; }
.sw { width: 7px; height: 7px; border-radius: 1px; }
.sw-security { background: var(--sec); } .sw-technik { background: var(--ki); } .sw-howto { background: var(--dsn); } .sw-allgemein { background: var(--gen); }

.search {
  display: flex; align-items: center; gap: 8px; flex: 1 1 240px; max-width: 320px; min-width: 0;
  background: color-mix(in srgb, var(--panel) 70%, transparent); border: 1px solid var(--line-strong); border-radius: var(--r-sm); padding: 0 8px 0 12px;
}
.search:focus-within { border-color: var(--accent); }
.search-cmd { font: 500 var(--fs-xs)/1 var(--f-mono); color: var(--accent); white-space: nowrap; }
.search input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text); font: 400 var(--fs-sm)/1 var(--f-mono); padding: 10px 0; outline: none; }
.search input::placeholder { color: var(--muted); }

.cat {
  display: inline-block; font: 500 var(--fs-2xs)/1 var(--f-mono); letter-spacing: .06em; text-transform: uppercase;
  padding: 4px 6px; border-radius: 3px; border: 1px solid currentColor; white-space: nowrap;
}
.cat-security { color: var(--sec); } .cat-technik { color: var(--ki); } .cat-howto { color: var(--dsn); } .cat-allgemein { color: var(--gen); }
mark { background: color-mix(in srgb, var(--accent) 28%, transparent); color: inherit; border-radius: 2px; padding: 0 .1em; box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent); }

/* ---------- 7. Hero ---------- */
.hero {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 64px); align-items: center;
  padding-block: clamp(48px, 7vw, 96px) clamp(48px, 6vw, 80px);
}
.hero-copy { position: relative; z-index: 0; }
.hero-copy::before { content: ""; position: absolute; z-index: -1; inset: -24px -28px; }
.prompt-line { font: 400 var(--fs-sm)/1 var(--f-mono); color: var(--text-2); }
.p-user { color: var(--accent); } .p-sep { color: var(--muted); } .p-path { color: var(--dsn); } .p-sym { color: var(--muted); margin-right: .6ch; }
#prompt-cmd.typing::after { content: ""; display: inline-block; width: .6ch; height: 1.05em; margin-left: 2px; vertical-align: -.15em; background: var(--accent); animation: blink 1s steps(2, jump-none) infinite; }
.hero-title { font: 600 clamp(1.75rem, 1.1rem + 2.6vw, 3rem)/1.12 var(--f-sans); letter-spacing: -.025em; margin-block: 18px 20px; max-width: 18em; }
.hl { white-space: nowrap; background-image: linear-gradient(transparent 88%, var(--c) 88%, var(--c) 96%, transparent 96%); }
.hl-security { --c: color-mix(in srgb, var(--sec) 70%, transparent); }
.hl-technik  { --c: color-mix(in srgb, var(--ki) 70%, transparent); }
.hl-howto    { --c: color-mix(in srgb, var(--dsn) 70%, transparent); }
.lead { font-size: var(--fs-md); line-height: 1.6; color: var(--text-2); max-width: 36em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 32px 0 0; padding-top: 18px; border-top: 1px dashed var(--line-strong); }
.hero-meta div { display: flex; flex-direction: column; gap: 4px; }
.hero-meta dt { font: 400 var(--fs-2xs)/1 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.hero-meta dd { margin: 0; font: 500 var(--fs-sm)/1.2 var(--f-mono); color: var(--text); font-variant-numeric: tabular-nums; }

/* Platine im Hero */
.board { margin: 0; position: relative; min-width: 0; }
.board::before { content: ""; position: absolute; inset: 10% 15%; z-index: -1; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 18%, transparent), transparent); }
.circuit { display: block; width: 100%; max-width: 560px; height: auto; margin-inline: auto; overflow: visible; }
.cb-grid circle { fill: var(--line-strong); opacity: .5; }
.cb-trace { fill: none; stroke: var(--line-strong); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cb-pulse {
  fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 10 calc(var(--len, 200) * 1px + 20px); stroke-dashoffset: 10;
  filter: drop-shadow(0 0 var(--glow-r) var(--accent));
  animation: cb-flow 3.2s cubic-bezier(.45, 0, .55, 1) infinite;
}
.cb-pulse.p1 { animation-delay: -.4s; animation-duration: 3.8s; }
.cb-pulse.p2 { animation-delay: -1.1s; stroke: var(--ki); filter: drop-shadow(0 0 var(--glow-r) var(--ki)); }
.cb-pulse.p3 { animation-delay: -1.9s; animation-duration: 4.4s; }
.cb-pulse.p4 { animation-delay: -2.6s; animation-duration: 2.9s; }
.cb-pulse.p5 { animation-delay: -.8s; animation-duration: 4.1s; stroke: var(--gen); filter: none; }
.cb-pulse.p6 { animation-delay: -3.1s; animation-duration: 3.5s; }
.cb-pulse.p7 { animation-delay: -1.5s; animation-duration: 5s; stroke: var(--ki); filter: drop-shadow(0 0 var(--glow-r) var(--ki)); }
@keyframes cb-flow {
  0%   { stroke-dashoffset: 10; opacity: 0; }
  10%  { opacity: 1; }
  85%  { opacity: 1; }
  100% { stroke-dashoffset: calc(var(--len, 200) * -1px); opacity: 0; }
}
.cb-pad { fill: var(--bg); stroke: var(--line-strong); stroke-width: 2; }
.cb-pin { fill: var(--line-strong); }
.cb-chip { fill: var(--panel-2); stroke: var(--line-strong); stroke-width: 1.5; }
.cb-core { fill: var(--panel); stroke: var(--line); stroke-width: 1; }
.cb-glow { fill: var(--accent); opacity: .12; filter: blur(14px); animation: cb-breathe 4s ease-in-out infinite; }
.cb-scan { fill: var(--accent); opacity: .18; animation: cb-scan 3.6s linear infinite; }
.cb-dot { fill: var(--ok); animation: blink 1.6s steps(2, jump-none) infinite; }
.cb-smd rect { fill: var(--panel-2); stroke: var(--line-strong); stroke-width: 1; }
.cb-smd .cb-smd-cap { fill: var(--line-strong); stroke: none; }
@keyframes cb-breathe { 50% { opacity: .28; } }
@keyframes cb-scan { from { transform: translateY(-6px); } to { transform: translateY(96px); } }
@keyframes blink { 50% { opacity: .2; } }
@media (max-width: 980px) { .hero { grid-template-columns: minmax(0, 1fr); } .circuit { max-width: 440px; } }
@media (max-width: 720px) { .hero-copy::before { inset: -16px -16px; } }

/* ---------- 8. Bereiche: Leiterbahn-Trenner, Kopfzeilen ---------- */
.section { position: relative; max-width: var(--wrap); margin-inline: auto; padding-block: clamp(56px, 7vw, 88px); }
.section::before, .prose .rule {
  content: ""; position: absolute; top: 0; left: var(--gutter); right: var(--gutter); height: 9px; transform: translateY(-4px);
  background:
    radial-gradient(circle at 4.5px 4.5px, var(--bg) 2.5px, var(--line-strong) 3px, var(--line-strong) 4.5px, transparent 5px) left center / 9px 9px no-repeat,
    radial-gradient(circle at 4.5px 4.5px, var(--bg) 2.5px, var(--line-strong) 3px, var(--line-strong) 4.5px, transparent 5px) right center / 9px 9px no-repeat,
    linear-gradient(var(--line-strong), var(--line-strong)) center / calc(100% - 18px) 1.5px no-repeat;
}
.section::after {
  content: ""; position: absolute; top: -1px; left: calc(var(--gutter) + 9px); width: 64px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--sig-c, var(--accent)));
  box-shadow: 0 0 var(--glow-w) var(--sig-c, var(--accent));
  opacity: 0;
}
html.sig-js .section.sig::after { animation: trace-go var(--sig-dur, 3s) cubic-bezier(.4, 0, .6, 1) var(--sig-delay, 0s) 1 both; }
@keyframes trace-go {
  0% { left: calc(var(--gutter) + 9px); opacity: 0; }
  10% { opacity: .95; }
  88% { opacity: .95; }
  100% { left: calc(100% - var(--gutter) - 73px); opacity: 0; }
}

.section-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; margin-bottom: 20px; }
.glass-bar { padding: 14px 18px; }
.glass-zone { padding: var(--pad); }
.glass-zone > .section-head { margin-bottom: 18px; }
.h2 { display: flex; align-items: center; gap: 12px; font: 600 var(--fs-xl)/1.2 var(--f-sans); letter-spacing: -.02em; }
.h3 { font: 600 var(--fs-md)/1.3 var(--f-sans); }
.section-sub { color: var(--muted); font-size: var(--fs-sm); }
/* Nummer als kleiner Chip mit Pins */
.sec-no {
  position: relative; display: inline-grid; place-items: center; min-width: 30px; height: 30px; padding: 0 6px;
  font: 600 var(--fs-xs)/1 var(--f-mono); color: var(--accent);
  background: color-mix(in srgb, var(--panel-2) 85%, transparent); border: 1.5px solid var(--line-strong); border-radius: 5px;
  box-shadow: 0 0 14px -2px color-mix(in srgb, var(--accent) 45%, transparent);
}
.sec-no::before, .sec-no::after {
  content: ""; position: absolute; left: 50%; width: 10px; height: 4px; transform: translateX(-50%);
  background: repeating-linear-gradient(90deg, var(--line-strong) 0 2px, transparent 2px 4px);
}
.sec-no::before { top: -6px; } .sec-no::after { bottom: -6px; }

/* ---------- 9. Beitragsliste ---------- */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.listing { overflow: hidden; }
.listing-head, .post-link { display: grid; grid-template-columns: 28px 104px 52px minmax(0, 1fr) 44px; gap: 20px; }
.listing-head {
  padding: 10px 18px; border-bottom: 1px solid var(--glass-line); background: color-mix(in srgb, var(--panel-2) 40%, transparent);
  font: 500 var(--fs-2xs)/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
}
.r { text-align: right; }
.post-list { list-style: none; margin: 0; padding: 0; }
.post + .post { border-top: 1px solid var(--glass-line); }
.post-link { position: relative; padding: 18px; color: inherit; text-decoration: none; align-items: baseline; }
.post-link:hover, .post-link:focus-visible { background: var(--hover); outline-offset: -2px; }
.post-no { font: 500 var(--fs-sm)/1.5 var(--f-mono); color: var(--muted); font-variant-numeric: tabular-nums; transition: color .15s; }
.post-link:hover .post-no, .post-link:focus-visible .post-no { color: var(--accent); }
.post-date, .post-min { font: 400 var(--fs-sm)/1.5 var(--f-mono); color: var(--muted); font-variant-numeric: tabular-nums; }
.post-min { text-align: right; }
.post-title { font: 600 var(--fs-md)/1.35 var(--f-sans); color: var(--text); letter-spacing: -.01em; }
.post-link:hover .post-title { color: var(--accent); }
.post-excerpt { color: var(--text-2); font-size: .9375rem; margin-top: 6px; max-width: 70ch; }
.post-tags { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 8px; font: 400 var(--fs-xs)/1.4 var(--f-mono); color: var(--muted); }
.post-empty { padding: 24px 18px; color: var(--muted); font: 400 var(--fs-sm)/1.5 var(--f-mono); }
.post-empty .p-sym { color: var(--accent); }
.post-empty .muted { display: inline-block; margin-top: 4px; }
.listing-foot {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px;
  padding: 10px 18px; border-top: 1px solid var(--glass-line); background: color-mix(in srgb, var(--panel-2) 40%, transparent);
  font: 400 var(--fs-xs)/1.4 var(--f-mono); color: var(--muted);
}
.listing-foot .hint { display: inline-flex; align-items: center; gap: 4px; }
@media (max-width: 720px) {
  .listing-head { display: none; }
  .post-link { grid-template-columns: auto auto auto 1fr; gap: 6px 12px; padding: 16px; }
  .post-body { grid-column: 1 / -1; grid-row: 2; }
  .listing-foot .hint { display: none; }
  .search { max-width: none; }
}

/* ---------- 10. Reader ---------- */
.reader { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: clamp(32px, 5vw, 64px); align-items: start; }
.reader-main { position: relative; z-index: 0; max-width: 740px; min-width: 0; }
.reader-main::before { content: ""; position: absolute; z-index: -1; inset: -24px calc(-1 * min(32px, var(--gutter) - 4px)) -8px; } /* nie breiter als der Seitenrand */
.back { display: inline-flex; gap: 8px; font: 500 var(--fs-sm)/1 var(--f-mono); color: var(--text-2); text-decoration: none; margin-bottom: 28px; }
.back:hover { color: var(--accent); }
.reader-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; font: 400 var(--fs-sm)/1.2 var(--f-mono); color: var(--muted); }
.reader-share { font-size: var(--fs-xs); color: var(--muted); }
.reader-share:hover { color: var(--accent); }
.reader-title { font: 600 clamp(1.6rem, 1.1rem + 2vw, 2.4rem)/1.15 var(--f-sans); letter-spacing: -.025em; margin-block: 16px 14px; outline: none; }
.reader-tags { display: flex; flex-wrap: wrap; gap: 4px 12px; font: 400 var(--fs-xs)/1.4 var(--f-mono); color: var(--muted); }
.reader-head { padding-bottom: 28px; margin-bottom: 32px; border-bottom: 1px solid var(--line); }
.reader[data-state="404"] .reader-head { border-bottom-style: dashed; }
.loading { color: var(--muted); font-family: var(--f-mono); font-size: var(--fs-sm); }
.loading::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 10px; background: var(--accent); animation: blink .8s steps(2, jump-none) infinite; }
.nf-term { margin: 0; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r); background: var(--code-bg); font: 400 var(--fs-sm)/1.7 var(--f-mono); color: var(--text-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.nf-err { color: var(--sec); }

/* Fehlerseiten (errors/*.html, erzeugt von tools/build-errors.mjs):
   unterbrochene Leiterbahn vor dem neXart-Chip, Signal erreicht den Bruch und verlischt rot;
   die Fehlernummer flackert gelegentlich im Glitch-Look. */
.err-page { min-height: calc(100vh - var(--header-h)); min-height: calc(100dvh - var(--header-h)); display: grid; align-content: center; padding-block: clamp(28px, 7vh, 88px); }
.err-zone { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
.err-board { display: block; width: 100%; max-width: 420px; height: auto; margin-inline: auto; overflow: visible; }
.err-traces path { fill: none; stroke: var(--line-strong); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.err-traces .err-dead { stroke-dasharray: 3 6; opacity: .55; }
.err-pads circle { fill: var(--bg); stroke: var(--line-strong); stroke-width: 2; }
.err-break circle { fill: var(--bg); stroke: var(--sec); stroke-width: 2; }
.err-break path { fill: none; stroke: var(--sec); stroke-width: 2; stroke-linecap: round; animation: err-spark 3.6s ease-in-out infinite; }
.err-chip { fill: color-mix(in srgb, var(--panel) 85%, transparent); stroke: var(--line-strong); stroke-width: 2; }
.err-chip-pins path { stroke: var(--line-strong); stroke-width: 3; stroke-linecap: square; }
.err-chip-t { font: 600 17px var(--f-mono); fill: var(--accent); }
/* Bahn bis zum Bruch: 68 + 42.4 + 26 = 136.4; Signal 16 lang -> Endpunkt bei -120.4 */
.err-pulse { fill: none; stroke: var(--accent); color: var(--accent); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 16 260; stroke-dashoffset: 16; opacity: 0;
  filter: drop-shadow(0 0 var(--glow-r) currentColor); animation: err-run 3.6s cubic-bezier(.45, 0, .55, 1) infinite; }
@keyframes err-run {
  0%   { stroke-dashoffset: 16; opacity: 0; stroke: var(--accent); color: var(--accent); }
  8%   { opacity: 1; }
  55%  { stroke-dashoffset: -120.4; opacity: 1; stroke: var(--accent); color: var(--accent); }
  62%  { stroke-dashoffset: -120.4; opacity: 1; stroke: var(--sec); color: var(--sec); }
  78%, 100% { stroke-dashoffset: -120.4; opacity: 0; stroke: var(--sec); color: var(--sec); }
}
@keyframes err-spark { 0%, 55% { opacity: .35; } 62% { opacity: 1; } 80%, 100% { opacity: .35; } }
.err-code { position: relative; display: inline-block; margin: 0 0 6px; font: 600 clamp(3.5rem, 9vw, 6rem)/1 var(--f-mono); letter-spacing: .02em; color: var(--text); }
.err-code::before, .err-code::after { content: attr(data-code); position: absolute; inset: 0; opacity: 0; pointer-events: none; }
.err-code::before { color: var(--accent); animation: err-glitch-a 7s steps(1, end) infinite; }
.err-code::after  { color: var(--sec);    animation: err-glitch-b 7s steps(1, end) infinite; }
@keyframes err-glitch-a {
  0%, 89%, 100% { opacity: 0; transform: none; clip-path: none; }
  90% { opacity: .9; transform: translate(-3px, 1px); clip-path: inset(10% 0 55% 0); }
  92% { opacity: .9; transform: translate(2px, -1px); clip-path: inset(60% 0 8% 0); }
  94% { opacity: .9; transform: translate(-2px, 0); clip-path: inset(35% 0 35% 0); }
  96% { opacity: 0; }
}
@keyframes err-glitch-b {
  0%, 89%, 100% { opacity: 0; transform: none; clip-path: none; }
  90% { opacity: .9; transform: translate(3px, -1px); clip-path: inset(55% 0 12% 0); }
  92% { opacity: .9; transform: translate(-2px, 1px); clip-path: inset(5% 0 70% 0); }
  94% { opacity: .9; transform: translate(2px, 0); clip-path: inset(40% 0 30% 0); }
  96% { opacity: 0; }
}
.err-copy .h2 { margin-bottom: 18px; }
.err-text { margin-top: 16px; color: var(--text-2); max-width: 54ch; }
.err-copy .cta-row { margin-top: 22px; }
.nf-term .err-out { color: var(--text-2); }
.nf-term .err-cmt { color: var(--muted); }
.term-cursor { display: inline-block; width: .6em; height: 1.1em; margin-left: 2px; vertical-align: -.2em; background: var(--accent); animation: blink 1.1s steps(2, jump-none) infinite; }
@media (max-width: 760px) {
  .err-zone { grid-template-columns: minmax(0, 1fr); }
  .err-board { max-width: 300px; }
}
@media (pointer: coarse) { .err-pulse { filter: none; stroke-width: 3; } }
.eof { margin-top: 40px; font: 400 var(--fs-xs)/1.4 var(--f-mono); color: var(--muted); }
.eof::before { content: ""; display: block; width: 100%; height: 1px; margin-bottom: 14px; background: repeating-linear-gradient(90deg, var(--line-strong) 0 6px, transparent 6px 12px); }

.reader-side { position: sticky; top: calc(var(--header-h) + 24px); display: flex; flex-direction: column; gap: 20px; }
.side-block { border-left: 1px solid var(--line); padding-left: 16px; }
.side-title { font: 500 var(--fs-2xs)/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.toc { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; counter-reset: toc; }
.toc li { counter-increment: toc; display: flex; gap: 8px; font-size: var(--fs-sm); line-height: 1.4; }
.toc li::before { content: counter(toc, decimal-leading-zero); font: 400 var(--fs-xs)/1.6 var(--f-mono); color: var(--muted); }
.toc a { color: var(--text-2); text-decoration: none; }
.toc a:hover, .toc a.is-active { color: var(--accent); }
.toc li:has(a.is-active)::before { color: var(--accent); }
@media (max-width: 1000px) { .reader { grid-template-columns: minmax(0, 1fr); } .reader-side { display: none; } }

/* Fließtext */
.prose { font-size: 1.0625rem; line-height: 1.75; color: var(--text-2); }
.prose > * + * { margin-top: 1.1em; }
.prose h2, .prose h3, .prose h4, .prose h5, .prose h6 { color: var(--text); letter-spacing: -.01em; scroll-margin-top: calc(var(--header-h) + 20px); position: relative; }
.prose h2 { font-size: 1.375rem; margin-top: 2.1em; padding-left: 26px; }
.prose h2::before { content: ""; position: absolute; left: 0; top: .5em; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--accent); background: var(--bg); box-shadow: 0 0 8px color-mix(in srgb, var(--accent) 60%, transparent); }
.prose h2::after { content: ""; position: absolute; left: 13px; top: calc(.5em + 5px); width: 9px; height: 1.5px; background: var(--accent); }
/* Ebene 3: ausgefüllter Punkt in Akzentfarbe mit kurzer Bahn, ohne Leuchten (Mitte der Zeile: .67em) */
.prose h3 { font-size: 1.25rem; margin-top: 1.9em; padding-left: 26px; }
.prose h3::before { content: ""; position: absolute; left: 1px; top: calc(.67em - 4px); width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.prose h3::after { content: ""; position: absolute; left: 12px; top: calc(.67em - .75px); width: 8px; height: 1.5px; background: var(--accent); }
/* Ebene 4: eckiges SMD-Pad wie in Unterlisten, Text auf derselben Linie wie Ebene 2 und 3 */
.prose h4 { font-size: 1.125rem; margin-top: 1.7em; padding-left: 26px; }
.prose h4::before { content: ""; position: absolute; left: 2px; top: calc(.67em - 3.5px); width: 7px; height: 7px; border-radius: 1.5px; background: var(--accent); }
/* Ebene 5 und 6: Beschriftung in Mono, damit sie nicht wie fetter Text wirken */
.prose h5, .prose h6 { margin-top: 1.6em; font: 600 .8125rem/1.3 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.prose h6 { color: var(--muted); }
/* Überschrift und ihr Text gehören zusammen: kleinerer Abstand nach Ebene 3 bis 6 (Überschrift auf Überschrift behält ihren Abstand) */
.prose :is(h3, h4) + :not(h2, h3, h4, h5, h6) { margin-top: .7em; }
.prose :is(h5, h6) + :not(h2, h3, h4, h5, h6) { margin-top: .5em; }
.prose strong { color: var(--text); font-weight: 600; }
.prose a.ext::after { content: "↗"; font-size: .8em; margin-left: 2px; }
/* Listen als Leiterbahn: Punkte = Lötpunkte, Nummern = Chips, eine feine Bahn verbindet sie.
   --lc = Listenfarbe (Akzent; in Blöcken und farbigen Zitaten deren Farbe).
   Mitte der ersten Textzeile: .875em (line-height 1.75 / 2). */
.prose ul, .prose ol { --lc: var(--accent); list-style: none; padding-left: 0; }
.prose .callout-body :is(ul, ol), .prose blockquote.bq-mark :is(ul, ol) { --lc: var(--c); }
.prose li { position: relative; }
.prose li + li { margin-top: .35em; }
.prose li::marker { content: none; }
/* Aufzählung: Ring (Via), darunter die Bahn zum nächsten Punkt */
.prose ul > li { padding-left: 26px; }
.prose ul > li::before {
  content: ""; position: absolute; left: 5px; top: calc(.875em - 4.5px); width: 9px; height: 9px; box-sizing: border-box;
  border-radius: 50%; border: 1.5px solid var(--lc); background: var(--bg);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--lc) 10%, transparent);
}
.prose ul > li:not(:last-child)::after {
  content: ""; position: absolute; left: 8.75px; width: 1.5px; top: calc(.875em + 7px); bottom: calc(-.35em - .875em + 7px);
  background: color-mix(in srgb, var(--lc) 30%, transparent);
}
/* Ebene 2 und tiefer: kleines eckiges SMD-Pad */
.prose li ul > li::before { left: 6.5px; top: calc(.875em - 3px); width: 6px; height: 6px; border: 0; border-radius: 1.5px; background: color-mix(in srgb, var(--lc) 65%, transparent); box-shadow: none; }
.prose li ul > li:not(:last-child)::after { top: calc(.875em + 5px); bottom: calc(-.35em - .875em + 5px); background: color-mix(in srgb, var(--lc) 18%, transparent); }
/* Nummerierte Liste: Nummer als Chip (data-n kommt aus dem Renderer, auch bei Start ≠ 1) */
.prose ol > li { padding-left: 40px; }
.prose ol > li::before {
  content: attr(data-n); position: absolute; left: 0; top: calc(.875em - 11px); box-sizing: border-box;
  min-width: 27px; height: 22px; padding: 0 5px; border-radius: 4px; text-align: center;
  font: 500 .75rem/20px var(--f-mono); font-variant-numeric: tabular-nums; color: var(--lc);
  border: 1px solid color-mix(in srgb, var(--lc) 45%, transparent);
  background: color-mix(in srgb, var(--lc) 10%, var(--bg));
}
.prose ol > li:not(:last-child)::after {
  content: ""; position: absolute; left: 12.75px; width: 1.5px; top: calc(.875em + 11px); bottom: calc(-.35em - .875em + 11px);
  background: color-mix(in srgb, var(--lc) 30%, transparent);
}
/* Aufgaben: Checkbox statt Punkt, keine Bahn */
.prose li.task { padding-left: 0; }
.prose ul > li.task::before, .prose ul > li.task::after { content: none; }
.prose li.task input { margin: 0 .6em 0 0; accent-color: var(--lc); vertical-align: -.1em; }
/* Listenpunkt mit Farbe (-{rot} Text, 2.{rot} Text): Punkt oder Nummer und die Bahn zum nächsten Punkt nehmen die
   Farbe aus .tone-* an (--c), der Text bleibt. Untere Listen starten wieder beim Akzent. */
.prose li[class*="tone-"] { --lc: var(--c); }
.prose ul > li[class*="tone-"]::before { background: color-mix(in srgb, var(--lc) 45%, var(--bg)); }
.prose li ul > li[class*="tone-"]::before { background: var(--lc); }
.prose ol > li[class*="tone-"]::before { background: color-mix(in srgb, var(--lc) 16%, var(--bg)); border-color: color-mix(in srgb, var(--lc) 60%, transparent); }
/* Aufgaben: die deaktivierte Checkbox zeichnet der Browser grau, deshalb ein farbiger Rahmen */
.prose li.task[class*="tone-"] input { outline: 1.5px solid color-mix(in srgb, var(--lc) 75%, transparent); outline-offset: 1px; border-radius: 3px; }
/* Invertiert: Punkt und Nummer als gefüllte Fläche in Textfarbe */
.prose ul > li.tone-invert::before { background: var(--text); border-color: var(--text); box-shadow: none; }
.prose ol > li.tone-invert::before { background: var(--text); border-color: var(--text); color: var(--bg); }
.prose blockquote { margin-inline: 0; padding-left: 18px; border-left: 2px solid var(--line-strong); color: var(--muted); }
/* > {rot} Text: farbige Linie, Farbe aus den Tonfamilien der Blöcke.
   Kleines Pad oben auf der Linie wie bei einer Leiterbahn. */
.prose blockquote.bq-mark { position: relative; border-left-color: var(--c); color: var(--text-2); }
.prose blockquote.bq-mark::before { content: ""; position: absolute; left: -5px; top: -4px; width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--c); background: var(--bg); box-sizing: border-box; }
/* [Text]{rot}: farbiger Text */
.tc { color: var(--c); }
.tc strong, .tc em, .tc del { color: inherit; }
/* Invertiert (Text und Marker): Text- und Hintergrundfarbe getauscht */
.tc.tone-invert, .prose mark.tone-invert { background: var(--text); color: var(--bg); box-shadow: none; border-radius: 3px; padding: .02em .35em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.tc.tone-invert :is(strong, em, del, a), .prose mark.tone-invert :is(strong, em, del, a) { color: inherit; }
.prose :not(pre) > code { font: 400 .875em/1 var(--f-mono); color: var(--text); background: var(--panel-2); border: 1px solid var(--line); padding: .15em .4em; border-radius: 3px; overflow-wrap: anywhere; }
/* Inline: ++Strg+R++, ==Marker==, [Text]{klein}, [Text]{kapitälchen}, 10^3^, H~2~O */
.kbd-combo { white-space: nowrap; }
.kbd-sep { color: var(--muted); padding-inline: .2em; font-size: .85em; }
.prose kbd { font-size: .78em; padding: .22em .5em; color: var(--text); vertical-align: .08em; }
/* Marker: ohne Farbe gelb (--warn), mit ==Text=={farbe} in der Farbe aus .tone-* (--c) */
.prose mark { background: color-mix(in srgb, var(--c, var(--warn)) 36%, transparent); color: var(--text); box-shadow: inset 0 -2px 0 color-mix(in srgb, var(--c, var(--warn)) 85%, transparent); border-radius: 3px; padding: .02em .25em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.tx-small { font-size: .85em; }
.tx-caps { font-variant-caps: small-caps; letter-spacing: .05em; }
.prose sup, .prose sub { font-size: .72em; line-height: 0; }

/* Bilder: Unterschrift, Größe (klein/mittel/breit), mehrere nebeneinander, Klick für die Großansicht */
.prose figure { margin-inline: 0; }
.prose figure.img img { border-radius: var(--r); border: 1px solid var(--line); display: block; }
.prose figcaption { font: 400 var(--fs-sm)/1.4 var(--f-mono); color: var(--muted); margin-top: 10px; }
.img-zoom { cursor: zoom-in; }
.img-zoom:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.prose figure.img:is(.is-s, .is-m, .is-l) { width: 100%; }
.prose figure.img:is(.is-s, .is-m, .is-l) img { width: 100%; }
@media (min-width: 641px) { .prose figure.img.is-s { width: 40%; } .prose figure.img.is-m { width: 65%; } }
.img-missing { color: var(--muted); font: 400 var(--fs-sm)/1.4 var(--f-mono); }
.img-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 14px; align-items: start; }
.prose .img-row figure.img { margin: 0; width: auto; }
.img-row img { width: 100%; }
.prose .rule { position: relative; left: auto; right: auto; transform: none; margin-block: 2.6em; width: 100%; }
.prose .rule::after { content: ""; position: absolute; top: 3.5px; left: 9px; width: 56px; height: 2px; border-radius: 2px; opacity: 0; background: linear-gradient(90deg, transparent, var(--sig-c, var(--accent))); box-shadow: 0 0 var(--glow-w) var(--sig-c, var(--accent)); }
html.sig-js .prose .rule.sig::after { animation: rule-go var(--sig-dur, 3s) cubic-bezier(.4, 0, .6, 1) var(--sig-delay, 0s) 1 both; }
@keyframes rule-go { 0% { left: 9px; opacity: 0; } 12% { opacity: .95; } 88% { opacity: .95; } 100% { left: calc(100% - 65px); opacity: 0; } }

/* Code */
.code { position: relative; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--code-bg); }
.code-head { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 8px 6px 26px; border-bottom: 1px solid var(--line); background: var(--panel-2); }
.code-head::before { content: ""; position: absolute; left: 10px; top: 50%; width: 8px; height: 8px; border-radius: 50%; transform: translateY(-50%); background: var(--ok); box-shadow: 0 0 6px var(--ok); animation: blink 2.4s steps(2, jump-none) infinite; }
.code-head::after { content: ""; position: absolute; left: 0; bottom: -1px; width: 56px; height: 1.5px; opacity: 0; background: linear-gradient(90deg, transparent, var(--sig-c, var(--accent))); box-shadow: 0 0 var(--glow-w) var(--sig-c, var(--accent)); }
html.sig-js .code-head.sig::after { animation: code-go var(--sig-dur, 3s) ease-in-out var(--sig-delay, 0s) 1 both; }
@keyframes code-go { 0% { left: 0; opacity: 0; } 12% { opacity: 1; } 85% { opacity: 1; } 100% { left: calc(100% - 56px); opacity: 0; } }
.code-head-l { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; min-width: 0; }
.code-lang { font: 500 var(--fs-2xs)/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.code-lines { font: 400 var(--fs-2xs)/1 var(--f-mono); color: var(--muted); opacity: .8; }
.code-copy { font: 500 var(--fs-2xs)/1 var(--f-mono); color: var(--text-2); background: transparent; border: 1px solid var(--line-strong); border-radius: 3px; padding: 5px 8px; cursor: pointer; }
.code-copy:hover { border-color: var(--accent); color: var(--accent); }
.code-body { display: flex; align-items: stretch; }
.code-title { font: 400 var(--fs-xs)/1.2 var(--f-mono); color: var(--text); overflow-wrap: anywhere; }
.code-warn { flex: none; font: 600 var(--fs-2xs)/1 var(--f-mono); letter-spacing: .09em; text-transform: uppercase; color: var(--sec); border: 1px solid color-mix(in srgb, var(--sec) 55%, transparent); border-radius: 3px; padding: 5px 8px; background: color-mix(in srgb, var(--sec) 10%, var(--bg)); }
.code-ln { flex: none; display: flex; flex-direction: column; padding: 14px 10px 14px 14px; text-align: right; user-select: none; font: 400 .84375rem/1.7 var(--f-mono); color: var(--muted); border-right: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.code-ln .ln-hl { color: var(--accent); font-weight: 600; }
.code pre { flex: 1; min-width: 0; margin: 0; padding: 14px 0; overflow-x: auto; font: 400 .84375rem/1.7 var(--f-mono); color: var(--text); tab-size: 2; }
.code pre code { display: inline-block; vertical-align: top; min-width: 100%; font: inherit; }
/* Zeilen: jede Zeile ist eine eigene Fläche (Markierung, Diff, Terminal); die Zeilenumbrüche stehen als Text dazwischen */
.cl { display: inline-block; vertical-align: top; box-sizing: border-box; min-width: 100%; padding-inline: 16px; }
.cl:empty::before { content: "\200b"; }
.cl-hl { background: color-mix(in srgb, var(--accent) 13%, transparent); box-shadow: inset 2px 0 0 var(--accent); }
.cl-add { background: color-mix(in srgb, var(--ok) 14%, transparent); box-shadow: inset 2px 0 0 var(--ok); }
.cl-del { background: color-mix(in srgb, var(--sec) 14%, transparent); box-shadow: inset 2px 0 0 var(--sec); }
.cl-hunk { color: var(--dsn); background: color-mix(in srgb, var(--dsn) 10%, transparent); }
.cl-meta { color: var(--muted); }
.cl-prompt { color: var(--accent); user-select: none; }
.cl-out { color: var(--text-2); }
.tk-c { color: var(--muted); font-style: italic; } .tk-s { color: var(--ki); } .tk-n { color: var(--dsn); } .tk-k { color: var(--accent); }
.tk-f { color: var(--warn); } .tk-v { color: var(--sec); } .tk-p { color: var(--ok); } .tk-t { color: var(--accent); }
/* Nicht ausführen (danger): roter Rahmen, Warnstreifen in der Kopfzeile, rote Leuchte, kein Kopier-Knopf */
.code-danger { border-color: color-mix(in srgb, var(--sec) 55%, var(--line)); }
.code-danger .code-head { --sig-c: var(--sec); border-bottom-color: color-mix(in srgb, var(--sec) 45%, var(--line)); background: repeating-linear-gradient(-45deg, color-mix(in srgb, var(--sec) 24%, var(--panel-2)) 0 10px, color-mix(in srgb, var(--sec) 8%, var(--panel-2)) 10px 20px); }
.code-danger .code-head::before { background: var(--sec); box-shadow: 0 0 6px var(--sec); }

/* Tabellen */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); }
.prose table { width: 100%; border-collapse: collapse; font-size: .9375rem; line-height: 1.5; }
.prose th, .prose td { text-align: left; padding: 9px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { font: 500 var(--fs-2xs)/1.3 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); background: var(--panel-2); }
.prose tr:last-child td { border-bottom: 0; }
.prose td { font-variant-numeric: tabular-nums; }
.prose .al-right { text-align: right; } .prose .al-center { text-align: center; }
/* Blöcke: > [!TYP]  ·  Aufbau wie eine Leiterbahn: Chip oben, Bahn nach unten, Pad am Ende.
   Farbe kommt nur aus --c (Tonfamilie); das Signal läuft immer in dieser Farbe. */
.callout {
  --c: var(--accent); --chip: 22px; --pad-l: 14px;
  position: relative; padding: 12px 18px 14px var(--pad-l); border-radius: var(--r-sm);
  border: 1px solid color-mix(in srgb, var(--c) 28%, var(--line));
  background: color-mix(in srgb, var(--c) 6%, color-mix(in srgb, var(--panel) 78%, transparent));
}
/* Tonfamilien: nach .callout, damit sie die Standardfarbe überschreiben */
.tone-info   { --c: var(--accent); }
.tone-teal   { --c: var(--ki); }
.tone-green  { --c: var(--ok); }
.tone-purple { --c: var(--dsn); }
.tone-amber  { --c: var(--warn); }
.tone-red    { --c: var(--sec); }
.tone-slate  { --c: var(--gen); }
.tone-orange { --c: var(--orange); }
.tone-muted  { --c: var(--muted); }
.tone-invert { --c: var(--text); }   /* Text, Marker, Ablauf: Text- und Hintergrundfarbe getauscht (eigene Regeln) */
/* Bahn unter dem Chip und Pad am Ende */
.callout::before { content: ""; position: absolute; left: calc(var(--pad-l) + var(--chip) / 2 - 1px); top: calc(12px + var(--chip) + 6px); bottom: 20px; width: 2px; border-radius: 2px; background: color-mix(in srgb, var(--c) 32%, transparent); }
.callout::after { content: ""; position: absolute; left: calc(var(--pad-l) + var(--chip) / 2 - 4px); bottom: 12px; width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid color-mix(in srgb, var(--c) 60%, transparent); background: var(--bg); }
.callout.is-empty::before, .callout.is-empty::after, .callout.is-fold:not([open])::before, .callout.is-fold:not([open])::after { display: none; }

.callout-title { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; min-height: var(--chip); margin: 0; }
.callout-ico {
  flex: none; display: inline-grid; place-items: center; min-width: var(--chip); height: var(--chip); padding: 0 4px;
  font: 600 var(--fs-2xs)/1 var(--f-mono); color: var(--c); border-radius: 4px;
  border: 1px solid color-mix(in srgb, var(--c) 50%, transparent);
  background: color-mix(in srgb, var(--c) 12%, var(--bg));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 7%, transparent);
}
.callout-label { font: 600 var(--fs-2xs)/1.2 var(--f-mono); letter-spacing: .09em; text-transform: uppercase; color: var(--c); }
.callout-name { font: 600 var(--fs-base)/1.35 var(--f-sans); color: var(--text); }
.callout-name::before { content: "/"; margin-right: 10px; font: 400 var(--fs-sm)/1 var(--f-mono); color: var(--muted); }
.callout-body { margin-top: 8px; padding-left: calc(var(--chip) + 10px); color: var(--text-2); }
.callout-body > * + * { margin-top: .6em; }
.callout-body strong { color: var(--text); }

/* Signal: läuft die Bahn hinunter, nur in der Blockfarbe */
.callout-title::before { content: ""; position: absolute; left: calc(var(--pad-l) + var(--chip) / 2 - 2px); top: calc(12px + var(--chip) + 6px); width: 4px; height: 12px; border-radius: 2px; background: var(--c); box-shadow: 0 0 var(--glow-w) var(--c); opacity: 0; }
html.sig-js .callout-title.sig::before { animation: callout-go var(--sig-dur, 2s) ease-in-out var(--sig-delay, 0s) 1 both; }
.callout.is-empty .callout-title::before, .callout.is-fold:not([open]) .callout-title::before { display: none; }
@keyframes callout-go { 0% { top: calc(12px + var(--chip) + 6px); opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { top: calc(100% - 34px); opacity: 0; } }

/* Gefahr: kräftiger */
.callout.is-strong { background: color-mix(in srgb, var(--c) 11%, color-mix(in srgb, var(--panel) 78%, transparent)); border-color: color-mix(in srgb, var(--c) 55%, var(--line)); }
.callout.is-strong .callout-ico { background: var(--c); color: var(--bg); border-color: var(--c); }

/* Zitat: Chip links, Text daneben, Quelle unten */
.callout-quote:not(.is-fold) { display: grid; grid-template-columns: var(--chip) minmax(0, 1fr); column-gap: 10px; }
.callout-quote:not(.is-fold) .callout-title { grid-column: 1; grid-row: 1; align-self: start; }
.callout-quote:not(.is-fold) .callout-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.callout-quote:not(.is-fold) .callout-body { grid-column: 2; grid-row: 1; margin-top: 0; padding-left: 0; }
.callout-quote .callout-ico { font-size: 1.25rem; line-height: 1; padding-top: 7px; }
.callout-quote .callout-body > p:not(.callout-cite) { font-style: italic; font-size: var(--fs-md); line-height: 1.6; color: var(--text); }
.callout-cite { font: 400 var(--fs-sm)/1.4 var(--f-mono); color: var(--muted); }
.callout-cite::before { content: "— "; color: var(--c); }

/* Einklappbar: > [!TYP]- (zu) oder > [!TYP]+ (offen) */
.callout.is-fold > summary { list-style: none; cursor: pointer; border-radius: 4px; outline-offset: 4px; }
.callout.is-fold > summary::-webkit-details-marker { display: none; }
.callout.is-fold > summary::after { content: "[+]"; margin-left: auto; padding-left: 12px; font: 500 var(--fs-xs)/1 var(--f-mono); color: var(--muted); }
.callout.is-fold[open] > summary::after { content: "[-]"; }
.callout.is-fold > summary:hover::after, .callout.is-fold > summary:focus-visible::after { color: var(--c); }
.callout.is-fold > summary:focus-visible { outline: 2px solid var(--c); }

@media (max-width: 560px) {
  .callout { --chip: 20px; --pad-l: 12px; padding-right: 14px; }
  .callout-body { padding-left: calc(var(--chip) + 8px); }
  .callout-name { flex-basis: 100%; padding-left: calc(var(--chip) + 8px); }
  .callout-name::before { display: none; }
}

/* Spalten: ::: spalten, getrennt durch "=== Titel {farbe}" */
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 14px; align-items: stretch; }
.col { position: relative; min-width: 0; padding: 12px 16px 14px; border-radius: var(--r-sm); border: 1px solid color-mix(in srgb, var(--c, var(--gen)) 30%, var(--line)); border-top: 2px solid var(--c, var(--line-strong)); background: color-mix(in srgb, var(--c, var(--gen)) 5%, color-mix(in srgb, var(--panel) 78%, transparent)); }
.col-title { font: 600 var(--fs-2xs)/1.2 var(--f-mono); letter-spacing: .09em; text-transform: uppercase; color: var(--c, var(--muted)); margin: 0 0 8px; }
.col-body > * + * { margin-top: .6em; }
.col-body :is(ul, ol) { --lc: var(--c, var(--accent)); }

/* Tabs: ::: tabs, getrennt durch "=== Reitername" */
.tabs { border: 1px solid var(--line); border-radius: var(--r-sm); background: color-mix(in srgb, var(--panel) 70%, transparent); overflow: hidden; }
.tabs-list { display: flex; overflow-x: auto; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--panel-2) 60%, transparent); }
.tab { flex: none; font: 500 var(--fs-xs)/1 var(--f-mono); color: var(--text-2); background: transparent; border: 0; border-right: 1px solid var(--line); padding: 12px 16px; cursor: pointer; white-space: nowrap; }
.tab:hover { color: var(--text); background: var(--hover); }
.tab[aria-selected="true"] { color: var(--text); background: color-mix(in srgb, var(--bg) 35%, transparent); box-shadow: inset 0 -2px 0 var(--accent); }
.tab:focus-visible, .tabs-panel:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.tabs-panel { padding: 14px 16px 16px; }
.tabs-panel > * + * { margin-top: .8em; }

/* Steckbrief: > [!FACTS] mit Zeilen "Schlüssel: Wert" */
.facts { margin: 0; }
.fact { display: grid; grid-template-columns: minmax(5.5em, 8.5em) minmax(0, 1fr); align-items: baseline; gap: 2px 16px; padding: 7px 0; }
.fact:first-child { padding-top: 2px; }
.fact + .fact { border-top: 1px solid color-mix(in srgb, var(--c, var(--gen)) 22%, var(--line)); }
.fact dt { font: 500 var(--fs-xs)/1.7 var(--f-mono); letter-spacing: .02em; color: var(--c, var(--muted)); }
.fact dd { margin: 0; color: var(--text); line-height: 1.55; overflow-wrap: anywhere; }
a.cve { font-family: var(--f-mono); font-size: .92em; }
@media (max-width: 520px) { .fact { grid-template-columns: minmax(0, 1fr); } }

/* Ablauf: ```ablauf mit "A -> B -> C" (Farbe je Schritt: "Text {rot}") */
.flows { display: flex; flex-direction: column; gap: 14px; }
.flow { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 0; }
/* Umgebrochene Ketten (mehrere Zeilen, markdown.js setzt .is-wrapped) und die gestapelte Darstellung sind zentriert; passt alles in eine Zeile, bleibt es linksbündig */
.flow.is-wrapped { justify-content: center; }
.flow.is-wrapped .flow-chip { text-align: center; }
.flow-step { display: flex; align-items: center; }
.flow-step.tone-invert .flow-chip { background: var(--text); color: var(--bg); border-color: var(--text); }
.flow-chip { display: inline-block; padding: 8px 14px; border-radius: var(--r-sm); border: 1px solid color-mix(in srgb, var(--c, var(--accent)) 45%, var(--line)); background: color-mix(in srgb, var(--c, var(--accent)) 8%, var(--bg)); color: var(--text); font: 500 var(--fs-sm)/1.35 var(--f-sans); }
.flow-step + .flow-step::before { content: ""; flex: none; width: 28px; height: 10px; margin-inline: 6px; background: var(--muted); clip-path: polygon(0 4.25px, 20px 4.25px, 20px 0, 28px 5px, 20px 10px, 20px 5.75px, 0 5.75px); }
@media (max-width: 520px) {
  .flow { flex-direction: column; align-items: center; gap: 0; }
  .flow-step { flex-direction: column; align-items: center; }
  .flow-chip { text-align: center; }
  .flow-step + .flow-step::before { width: 10px; height: 28px; margin: 6px 0; clip-path: polygon(4.25px 0, 5.75px 0, 5.75px 20px, 10px 20px, 5px 28px, 0 20px, 4.25px 20px); }
}

/* Zeitstrahl: ```zeitstrahl mit "09:14 | Text" */
.tl-item { --tl: 5.5em; position: relative; display: grid; grid-template-columns: var(--tl) minmax(0, 1fr); align-items: baseline; gap: 0 32px; padding-bottom: 20px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-time { font: 500 var(--fs-xs)/1.5 var(--f-mono); color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.tl-body { color: var(--text-2); min-width: 0; }
.tl-item::before { content: ""; position: absolute; left: calc(var(--tl) + 16px - .75px); top: calc(.875em + 5px); bottom: calc(5px - .875em); width: 1.5px; background: color-mix(in srgb, var(--c, var(--accent)) 35%, var(--line-strong)); }
.tl-item:last-child::before { display: none; }
.tl-item::after { content: ""; position: absolute; left: calc(var(--tl) + 16px - 5px); top: calc(.875em - 5px); width: 10px; height: 10px; box-sizing: border-box; border-radius: 50%; border: 2px solid var(--c, var(--accent)); background: var(--bg); }
.tl-item.tone-invert::after { background: var(--text); }
@media (max-width: 520px) {
  .tl-item { grid-template-columns: minmax(0, 1fr); gap: 2px 0; padding-left: 26px; }
  .tl-time { text-align: left; }
  .tl-item::before { left: 4.25px; }
  .tl-item::after { left: 0; }
}

/* Großansicht für Bilder (Klick auf ein Bild im Beitrag) */
.lightbox { padding: 0; border: 0; background: transparent; color: #dfe6ee; max-width: 96vw; max-height: 96vh; overflow: visible; }
.lightbox::backdrop { background: rgba(6, 14, 22, .86); }
.lightbox[open] { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.lightbox img { display: block; max-width: 94vw; max-height: 78vh; object-fit: contain; border-radius: var(--r-sm); border: 1px solid #2d4252; background: #0e1720; cursor: zoom-out; }
.lightbox-cap { margin: 0; max-width: 70ch; text-align: center; font: 400 var(--fs-sm)/1.5 var(--f-mono); color: #dfe6ee; }
.lightbox-close { align-self: flex-end; font: 500 var(--fs-xs)/1 var(--f-mono); color: #dfe6ee; background: rgba(14, 23, 32, .85); border: 1px solid #2d4252; border-radius: var(--r-sm); padding: 9px 12px; cursor: pointer; }
.lightbox-close:hover { border-color: var(--accent); color: #fff; }

/* Vor/zurück */
.pager { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--line); }
.pager-link { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; color: var(--text); background: color-mix(in srgb, var(--panel) 80%, transparent); }
.pager-link:hover { border-color: var(--accent); }
.pager-next { grid-column: 2; text-align: right; }
.pager-label { font: 500 var(--fs-2xs)/1 var(--f-mono); color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.pager-title { font-weight: 600; line-height: 1.35; }

/* Ähnliche Beiträge am Beitragsende */
.related { margin-top: 40px; }
.related-title { font: 500 var(--fs-2xs)/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.related-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.related-link { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: baseline; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; color: var(--text); background: color-mix(in srgb, var(--panel) 80%, transparent); }
.related-link:hover, .related-link:focus-visible { border-color: var(--accent); }
.related-t { font-weight: 600; line-height: 1.35; }
.related-d { font: 400 var(--fs-xs)/1.4 var(--f-mono); color: var(--muted); font-variant-numeric: tabular-nums; }
/* Schlagwörter im Beitrag: Links zur gefilterten Beitragsliste */
.reader-tags .tag { color: inherit; text-decoration: none; border-radius: 3px; }
.reader-tags .tag:hover, .reader-tags .tag:focus-visible { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
/* Volltextsuche: Fundstelle im Beitragstext */
.post-hit { margin-top: 6px; font-size: var(--fs-sm); line-height: 1.5; color: var(--muted); max-width: 70ch; }
/* Glossarbegriffe im Text: gepunktet unterstrichen, Kurzerklärung im Tooltip, Klick öffnet die Erklärung im Popup */
.prose a.gl { color: inherit; text-decoration: underline dotted color-mix(in srgb, var(--accent) 75%, transparent); text-decoration-thickness: 1px; text-underline-offset: 3px; cursor: help; }
.prose a.gl:hover, .prose a.gl:focus-visible { color: var(--accent); }
/* Glossar-Popup (assets/js/glossary.js): Rahmen wie die Tastaturhilfe, aber fast deckend, damit der Beitragstext
   dahinter beim Lesen nicht durchscheint. Inhalt scrollt bei langen Erklärungen. */
.gl-pop { width: min(560px, calc(100vw - 32px)); max-height: min(80vh, 720px); padding: 0; color: var(--text); background: color-mix(in srgb, var(--panel) 96%, transparent); box-shadow: inset 0 1px 0 var(--glass-edge), 0 18px 48px rgba(6, 14, 22, .35); }
.gl-pop[open] { display: flex; flex-direction: column; animation: gl-pop-in .16s ease-out; }
.gl-pop::backdrop { background: rgba(6, 14, 22, .55); }
@keyframes gl-pop-in { from { opacity: 0; transform: translateY(6px); } }
.gl-pop-close { font-size: var(--fs-md); padding: 2px 9px; }
.gl-pop-body { display: flex; flex-direction: column; gap: 14px; min-height: 0; padding: 20px 22px 22px; overflow-y: auto; overscroll-behavior: contain; }
.gl-pop-term { font-size: var(--fs-lg); letter-spacing: -.015em; }
.gl-pop-text { font-size: 1rem; line-height: 1.65; }
.gl-pop-text > .gl-aka { font: 400 var(--fs-xs)/1.5 var(--f-mono); color: var(--muted); }
.gl-pop-text > .gl-aka + * { margin-top: .6em; }
.gl-pop-more { align-self: flex-start; }
@media (max-width: 480px) { .gl-pop-body { padding: 16px 16px 18px; } }
@media (max-width: 560px) { .pager { grid-template-columns: minmax(0, 1fr); } .pager-next { grid-column: auto; } }

/* ---------- 11. Themen, Über, Kontakt, Recht ---------- */
.topics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: hidden; }
.topic { display: flex; flex-direction: column; gap: 10px; padding: 24px; }
.topic + .topic { border-left: 1px solid var(--glass-line); }
.topic-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.topic-n { font: 400 var(--fs-xs)/1 var(--f-mono); color: var(--muted); font-variant-numeric: tabular-nums; }
.topic h3 { font-size: var(--fs-lg); letter-spacing: -.015em; }
.topic p { color: var(--text-2); font-size: .9375rem; }
.topic .link-btn { margin-top: auto; padding-top: 10px; }
@media (max-width: 1000px) { .topics { grid-template-columns: repeat(2, minmax(0, 1fr)); } .topic:nth-child(3) { border-left: 0; } .topic:nth-child(n+3) { border-top: 1px solid var(--glass-line); } }
@media (max-width: 560px) { .topics { grid-template-columns: minmax(0, 1fr); } .topic + .topic { border-left: 0; border-top: 1px solid var(--glass-line); } }

.about { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
.about-copy { display: flex; flex-direction: column; gap: 14px; color: var(--text-2); max-width: 62ch; }
@media (max-width: 860px) { .about { grid-template-columns: minmax(0, 1fr); } }

.contact { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px); gap: clamp(28px, 5vw, 64px); align-items: start; }
.contact-copy { display: flex; flex-direction: column; gap: 12px; font-size: var(--fs-md); max-width: 52ch; }
.contact-copy .muted { font-size: var(--fs-base); }
.contact-body { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding: 18px; }
.contact-cmd { font: 400 var(--fs-sm)/1 var(--f-mono); color: var(--text-2); }
.t-prompt { color: var(--accent); }
.contact-out { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; font: 500 var(--fs-md)/1.4 var(--f-mono); min-height: 1.6em; overflow-wrap: anywhere; }
.contact-out .mail { color: var(--text); }
.redacted { color: var(--line-strong); letter-spacing: -.05em; user-select: none; }
.redacted.is-revealed { color: inherit; letter-spacing: normal; user-select: text; }
@media (max-width: 860px) { .contact { grid-template-columns: minmax(0, 1fr); } }

.legal-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; }
.legal-tag { font: 500 var(--fs-2xs)/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.legal-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 16px; align-items: start; }
.legal-body { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 18px; font-size: var(--fs-sm); color: var(--text-2); }
.legal-label { font: 500 var(--fs-2xs)/1.3 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
.imprint { display: flex; flex-direction: column; font: normal 400 var(--fs-sm)/1.7 var(--f-mono); color: var(--text); padding-left: 12px; border-left: 2px solid var(--glass-line); }
.legal-note { font: 400 var(--fs-xs)/1.4 var(--f-mono); color: var(--muted); }
.legal-note a { color: var(--accent); }
.legal-kv { margin: 0; padding: 6px 0; font-size: var(--fs-sm); }
.legal-kv > div { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 4px 16px; padding: 9px 18px; }
.legal-kv > div + div { border-top: 1px solid var(--glass-line); }
.legal-kv dt { font: 500 var(--fs-xs)/1.6 var(--f-mono); color: var(--accent); }
.legal-kv dt::before { content: "› "; color: var(--muted); }
.legal-kv dd { margin: 0; color: var(--text-2); line-height: 1.55; max-width: 68ch; }
@media (max-width: 860px) { .legal-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 480px) { .legal-kv > div { grid-template-columns: minmax(0, 1fr); padding-inline: 14px; } .legal-body { padding: 14px; } }

/* ---------- 12. Statuszeile, Hilfe ---------- */
.statusline { border-top: 1px solid var(--line); background: color-mix(in srgb, var(--panel-2) 85%, transparent); padding-bottom: env(safe-area-inset-bottom, 0px); }
.statusline-row { display: flex; flex-wrap: wrap; align-items: stretch; font: 400 var(--fs-xs)/1 var(--f-mono); color: var(--muted); }
.statusline-row > * { padding: 12px; border-right: 1px solid var(--line); }
.statusline-row > :last-child { border-right: 0; }
.sl-mode { background: var(--accent); color: var(--accent-ink); font-weight: 600; border-right: 0; }
.sl-spacer { flex: 1; border-right: 0; padding: 0; }
.sl-clock { font-variant-numeric: tabular-nums; user-select: none; }
.sl-fx { cursor: pointer; background: transparent; border: 0; border-right: 1px solid var(--line); font: inherit; color: inherit; }
.sl-fx b { font-weight: 600; color: var(--accent); }
.sl-fx:hover { color: var(--accent); }
.statusline a { color: var(--muted); text-decoration: none; }
.statusline a:hover { color: var(--accent); }
@media (max-width: 720px) { .sl-clock { display: none; } }
@media (max-width: 560px) { .sl-hide-sm { display: none; } }

.help { width: min(420px, calc(100vw - 32px)); padding: 0; color: var(--text); }
.help::backdrop { background: rgba(6, 14, 22, .55); }
.keys { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.keys td { padding: 9px 16px; border-bottom: 1px solid var(--line); color: var(--text-2); }
.keys tr:last-child td { border-bottom: 0; }
.keys td:first-child { white-space: nowrap; width: 1%; }

/* ---------- 13. Signale (assets/js/signals.js) ---------- */
html.sig-js .cb-pulse.sig {
  stroke: var(--sig-c) !important;
  filter: drop-shadow(0 0 var(--glow-r) var(--sig-c)) !important;
  animation: cb-flow var(--sig-dur) cubic-bezier(.45, 0, .55, 1) var(--sig-delay) 1 both !important;
}
html.sig-js .sig-off.cb-pulse, html.sig-js .sig-off::after, html.sig-js .sig-off::before { animation: none !important; }
html.theme-fade, html.theme-fade * { transition: background-color .35s ease, color .35s ease, border-color .35s ease !important; }

/* ---------- 14. Bewegung: Touch-Geräte, reduzierte Bewegung, Schalter ---------- */
@media (pointer: coarse) {
  .cb-pulse, html.sig-js .cb-pulse.sig { filter: none !important; stroke-width: 3; }
  .cb-glow { display: none; }
  .board::before { inset: 4% 10%; background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 26%, transparent), transparent); }
  .section::after, .code-head::after, .callout-title::before { box-shadow: none; }
}
@media (prefers-reduced-motion: reduce) {
  html:not([data-motion="on"]) { scroll-behavior: auto; }
  html:not([data-motion="on"]) *:not(.cb-pulse):not(.bg-pulse), html:not([data-motion="on"]) *::before, html:not([data-motion="on"]) *::after { transition: none !important; animation: none !important; }
  html:not([data-motion="on"]):not(.sig-js) .cb-pulse { animation-duration: 6s !important; }
}
html[data-motion="off"] *, html[data-motion="off"] *::before, html[data-motion="off"] *::after { transition: none !important; animation: none !important; }
html[data-motion="off"] .cb-pulse, html[data-motion="off"] .bg-pulse, html[data-motion="off"] .cb-scan { display: none; }

/* ---------- 15. Druck ---------- */
@media print {
  .site-header, .statusline, .progress, .skip, .board, .cta-row, .pager, .back, .reader-share, .reader-side, .seg, .search, .listing-foot, .help, .bg-circuit, #themen, #ueber, #kontakt, #impressum { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  body::before, body::after { display: none; }
  .section { padding-block: 12pt; }
  .section::before, .section::after { display: none; }
  .glass, .panel, .listing, .topics, .glass-zone, .glass-bar, .hero-copy::before, .reader-main::before { backdrop-filter: none; box-shadow: none; background: #fff; border-color: #999; }
  .prose a::after { content: " (" attr(href) ")"; font-size: .85em; color: #555; }
  .code, .callout, .table-wrap { break-inside: avoid; border-color: #999; }
  .code pre, .code-ln { font-size: 9pt; }
}
@media print {
  .tabs-list, .lightbox { display: none; }
  .tabs-panel[hidden] { display: block !important; }
  .tabs-panel::before { content: attr(data-title); display: block; margin-bottom: 4pt; font: 600 .9em var(--f-mono); }
  .tabs, .col, .flow-chip, .tl-item, .fact, .img-row figure { break-inside: avoid; }
}
