/* Kommandozentrale · basis.css – gemeinsam für ALLE Seiten:
   Schriften, Farben (Tokens), Grundtypografie, Kopf mit Reitern, Fuß, gemeinsame Bausteine
   (Knöpfe, Textlinks, Chips, Fotos, Kapitelkarte, Instrument-Rahmen, Segment, Aufklapper, Regler, Begriffe).
   Seitenspezifisches gehört nach css/seiten/<id>.css – dort nie Tokens neu definieren, nur nutzen. */

@font-face { font-family: 'Schibsted'; src: url('../fonts/schibsted-grotesk-latin-wght-normal.woff2') format('woff2'); font-weight: 400 900; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('../fonts/inter.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Serif4'; src: url('../fonts/source-serif-4-latin-opsz-normal.woff2') format('woff2'); font-weight: 200 900; font-display: swap; }
@font-face { font-family: 'Plex Mono'; src: url('../fonts/ibm-plex-mono-latin-500-normal.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'JetBrains'; src: url('../fonts/jetbrains-mono.woff2') format('woff2'); font-weight: 100 800; font-display: swap; }

:root {
  /* Flächen */
  --nacht: #06080c;
  --nacht-2: #0b0f15;
  --nacht-3: #111721;
  --nacht-4: #18202c;
  /* Linien */
  --linie: rgb(236 232 224 / .10);
  --linie-2: rgb(236 232 224 / .18);
  --linie-3: rgb(236 232 224 / .32);
  /* Text (alle ≥ AA auf --nacht) */
  --text: #ece8e0;
  --text-2: #b9bcc2;
  --text-3: #8f96a1;
  /* Bedeutung: Orange NUR für Live/Bitcoin; Gewinn/Verlust immer zusätzlich mit ▲/▼ und Vorzeichen */
  --orange: #f7931a;
  --orange-weich: rgb(247 147 26 / .14);
  --plus: #7ad8ac;
  --minus: #ff9182;
  --warn: #f3c56b;
  --info: #8fb0f0;
  --info-weich: rgb(143 176 240 / .07);
  --risiko: #ff9182;
  --risiko-weich: rgb(255 145 130 / .07);
  --gold: #d8b46a;
  /* Schriften */
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --kopf: 'Schibsted', 'Inter', system-ui, sans-serif;
  --serif: 'Serif4', Georgia, 'Times New Roman', serif;
  --mono: 'Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  --code: 'JetBrains', ui-monospace, Menlo, monospace;
  /* Maße */
  --rand: clamp(16px, 4vw, 48px);
  --breite: 1180px;
  --kopf-zeile: 56px;     /* obere Kopfzeile (Marke, Uhr, Demo, Ruhig) – scrollt weg */
  --reiter-h: 50px;       /* Reiterleiste – bleibt oben stehen */
  --aussen: max(var(--rand), (100vw - var(--breite)) / 2);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --ease-scan: cubic-bezier(.75, 0, .2, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--reiter-h) + 20px); }
html.ruhig { scroll-behavior: auto; }
body {
  margin: 0; background: var(--nacht); color: var(--text);
  font: 400 18px/1.62 var(--sans); font-feature-settings: 'cv11', 'ss01';
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-family: var(--kopf); font-weight: 600; letter-spacing: -.015em; line-height: 1.08; }
p { margin: 0; }
dl, dd, ol, ul { margin: 0; padding: 0; }
ol, ul { list-style: none; }
strong { font-weight: 600; }
::selection { background: rgb(247 147 26 / .35); color: #fff; }

:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; border-radius: 4px; }
.inhalt:focus { outline: none; }
.sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.mono { font-family: var(--mono); font-size: 14px; letter-spacing: .04em; }
.nw { white-space: nowrap; }
/* Aufzählung mit Mittelpunkt (format.js punkte()): Teile brechen um, der Punkt am Zeilenanfang wird links abgeschnitten */
.punkte { --punkt: 1em; display: flex; flex-wrap: wrap; align-items: baseline; margin-left: calc(-1 * var(--punkt)); clip-path: inset(-.6em -.6em -.6em calc(var(--punkt) - 5px)); }
.punkte > *::before { content: '·'; content: '·' / ''; display: inline-block; width: var(--punkt); text-align: center; color: var(--text-3); font-weight: 400; }
/* Bricht ein Teil selbst um, beginnt seine zweite Zeile hinter dem Punkt (hängender Einzug) – nie im abgeschnittenen Rand */
.punkte > * { padding-left: var(--punkt); text-indent: calc(-1 * var(--punkt)); }
.punkte > * *, .punkte > *::before { text-indent: 0; }   /* geerbter Einzug nur für die Zeilen des Teils, nie im Punkt selbst */
.sprung { position: fixed; left: 16px; top: -60px; z-index: 100; background: var(--text); color: var(--nacht); padding: 10px 16px; border-radius: 8px; text-decoration: none; font-weight: 600; }
.sprung:focus { top: 12px; }

.rahmen { width: min(var(--breite), 100% - 2 * var(--rand)); margin-inline: auto; }

/* ================================================================== Kopf (jede Seite) */
.kopf {
  position: sticky; top: calc(-1 * var(--kopf-zeile)); z-index: 40;
  background: var(--nacht); border-bottom: 1px solid var(--linie);
}
.kopf-zeile { height: var(--kopf-zeile); display: flex; align-items: center; gap: 18px; width: min(var(--breite), 100% - 2 * var(--rand)); margin-inline: auto; }
.marke { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; min-height: 44px; }
/* Offizielles B21-Zeichen (Bitcoin Offer kit/src/icons/logo-mark.svg): drei gestapelte Blöcke, untere in Schriftfarbe
   (.22 / .5 Deckkraft, steht als Attribut im SVG), oberster #f7931a. */
.zeichen { width: 28px; height: 28px; overflow: visible; flex: 0 0 auto; color: var(--text); }
.zeichen rect { transition: transform .5s var(--ease); transform-box: fill-box; transform-origin: 50% 100%; }
.marke:hover .zeichen .b1 { transform: translateY(-2px); }
.marke:hover .zeichen .b2 { transform: translateY(-3px); transition-delay: .05s; }
.marke:hover .zeichen .b3 { transform: translateY(-4px); transition-delay: .1s; }
.marke-wort { font: 650 19px/1 var(--kopf); letter-spacing: -.01em; white-space: nowrap; }
.marke-wort b { color: var(--orange); font-weight: 650; }

.kopf-status { margin-left: auto; display: flex; align-items: center; gap: 12px; font: 500 14px/1 var(--mono); letter-spacing: .03em; color: var(--text-3); }
.kopf-live { display: inline-flex; align-items: center; gap: 8px; color: var(--text); }
.puls-punkt { width: 8px; height: 8px; border-radius: 1px; background: var(--orange); position: relative; flex: 0 0 auto; }
/* Puls als weicher Lichthof (box-shadow) statt eines skalierten Rahmens – der wirkte auf Fotos wie ein dunkles Kästchen */
.puls-punkt { animation: lichthof 2.4s var(--ease) infinite; }
@keyframes lichthof { 0% { box-shadow: 0 0 0 0 rgb(247 147 26 / .55); } 70%, 100% { box-shadow: 0 0 0 7px rgb(247 147 26 / 0); } }
@keyframes puls { 0% { transform: scale(.6); opacity: .9; } 70%, 100% { transform: scale(1.6); opacity: 0; } }
.kopf-uhr { color: var(--text); font-variant-numeric: tabular-nums; min-width: 8ch; }
.kopf-puls { width: 72px; height: 20px; opacity: .9; }
.kopf-seit { color: var(--text-2); font: 400 15px/1 var(--sans); letter-spacing: 0; white-space: nowrap; }
.kopf-seit:empty { display: none; }
.chip { display: inline-flex; align-items: center; padding: 6px 11px; border: 1px solid var(--linie-2); border-radius: 999px; font: 500 14px/1 var(--mono); letter-spacing: .03em; color: var(--text-2); white-space: nowrap; }
.chip-demo { color: var(--warn); border-color: rgb(243 197 107 / .4); }

/* Reiterleiste: Klartext ≥ 15 px, aktiver Reiter deutlich (Farbe, Gewicht, orange Kante), am Handy waagerecht wischbar */
.reiter { border-top: 1px solid var(--linie); }
.reiter-liste {
  display: flex; align-items: stretch; height: var(--reiter-h); gap: 2px;
  width: min(var(--breite), 100% - 2 * var(--rand)); margin-inline: auto;
  overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; scroll-snap-type: x proximity;
}
.reiter-liste::-webkit-scrollbar { display: none; }
.reiter-liste li { flex: 0 0 auto; scroll-snap-align: center; }
.reiter-link {
  position: relative; display: flex; align-items: center; height: 100%; padding: 0 15px;
  font: 500 16px/1 var(--sans); color: var(--text-2); text-decoration: none; white-space: nowrap;
  transition: color .2s, background-color .2s;
  flex-direction: column; justify-content: center;
}
/* Platzhalter in fetter Breite: der aktive Reiter wird fett, ohne dass die Reiter daneben springen */
.reiter-link::before { content: attr(data-text); height: 0; overflow: hidden; visibility: hidden; font-weight: 650; pointer-events: none; user-select: none; }
.reiter-liste li:first-child .reiter-link { padding-left: 0; }
.reiter-link::after { content: ''; position: absolute; left: 15px; right: 15px; bottom: -1px; height: 2px; border-radius: 2px 2px 0 0; background: transparent; transition: background-color .2s; }
.reiter-liste li:first-child .reiter-link::after { left: 0; }
.reiter-link:hover { color: var(--text); }
.reiter-link:hover::after { background: var(--linie-3); }
/* aktiv: die Seite selbst (aria-current=page) oder ihre Unterseite (aria-current=true, z. B. projekte/casino/) */
.reiter-link[aria-current] { color: var(--text); font-weight: 650; }
.reiter-link[aria-current]::after { background: var(--orange); }
.reiter-link:focus-visible { outline-offset: -4px; }

@media (max-width: 1080px) {
  .kopf-puls { display: none; }
}
@media (max-width: 960px) {
  .kopf-seit { display: none; }
}
@media (max-width: 760px) {
  :root { --kopf-zeile: 54px; --reiter-h: 48px; }
  .kopf-zeile { gap: 10px; }
  .reiter-liste { width: 100%; padding-inline: var(--rand); scroll-padding-inline: var(--rand); }
  .reiter-link { padding: 0 13px; font-size: 15.5px; }
  .reiter-link::after { left: 13px; right: 13px; }
  /* Kanten-Verlauf: es geht weiter */
  .reiter { position: relative; }
  .reiter::before, .reiter::after { content: ''; position: absolute; top: 0; bottom: 0; width: 28px; pointer-events: none; z-index: 1; opacity: 0; transition: opacity .2s; }
  .reiter::before { left: 0; background: linear-gradient(90deg, rgb(6 8 12) 30%, transparent); }
  .reiter::after { right: 0; background: linear-gradient(270deg, rgb(6 8 12) 30%, transparent); }
  .reiter:has(.mehr-links)::before { opacity: 1; }
  .reiter:has(.mehr-rechts)::after { opacity: 1; }
  .reiter::before, .reiter::after { width: 56px; }
  /* Kleiner Pfeil am Rand: Hier geht es weiter (nur Zeichen, die Leiste bleibt wischbar) */
  .reiter::after { content: '›'; content: '›' / ''; display: flex; align-items: center; justify-content: flex-end; padding-right: 10px; font: 500 22px/1 var(--sans); color: var(--text-2); }
  .reiter::before { content: '‹'; content: '‹' / ''; display: flex; align-items: center; padding-left: 10px; font: 500 22px/1 var(--sans); color: var(--text-2); }
}
/* Handys und kleine Tablets: alle acht Themen auf einen Blick, zwei Zeilen à vier Reiter – nichts angeschnitten, kein
   Wischen nötig. Spalten so breit wie ihr längstes Wort, Rand ≥ 12 px (auch „Blockchain“ bei 320 px). */
@media (max-width: 760px) {
  :root { --reiter-h: 84px; }
  .reiter-liste { display: grid; grid-template-columns: repeat(4, auto); justify-content: space-between; grid-auto-rows: 42px; height: auto; gap: 0 4px; overflow: visible; padding-inline: max(12px, min(var(--rand), 4vw)); scroll-snap-type: none; }
  .reiter-liste li { min-width: 0; }
  .reiter-link, .reiter-liste li:first-child .reiter-link { padding: 0 4px; font-size: 15px; letter-spacing: -.005em; }
  .reiter-link::after, .reiter-liste li:first-child .reiter-link::after { left: 2px; right: 2px; }
  .reiter { border-bottom: 0; }
  .reiter-liste::after { content: ''; position: absolute; left: 0; right: 0; top: 42px; height: 1px; background: var(--linie); pointer-events: none; }
  .reiter-liste { position: relative; }
  .reiter::before, .reiter::after { display: none; }
  /* Beim Lesen nach unten tritt der Kopf ganz zurück, beim Zurückscrollen ist er sofort wieder da (kopf.js) */
  .kopf { transition: transform .28s var(--ease); }
  .kopf.weg { transform: translateY(calc(-1 * var(--reiter-h) - 2px)); }
}
@media (max-width: 360px) {
  .reiter-link, .reiter-liste li:first-child .reiter-link { padding: 0 2px; }
}
@media (max-width: 520px) {
  .kopf-zeile { gap: 7px; }
  .marke-wort { font-size: 16px; }
  .zeichen { width: 24px; height: 24px; }
  .marke { gap: 8px; }
  .kopf-status { gap: 6px; font-size: 14px; }
  .kopf-live { gap: 6px; }
  .kopf-uhr { min-width: 0; }
  .uhr-s { display: none; }
  .chip-demo { padding: 5px 7px; font-size: 14px; letter-spacing: 0; }
  .chip-demo-lang { display: none; }
}

/* Schalter (Kopf „Ruhig“ + Fuß „Bewegung reduzieren“) */
.schalter { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px 0 8px; border: 1px solid var(--linie-2); border-radius: 999px; background: transparent; cursor: pointer; color: var(--text); font-size: 15px; white-space: nowrap; }
.schalter:hover { border-color: var(--linie-3); }
.schalter-bahn { width: 36px; height: 22px; border-radius: 999px; background: var(--nacht-4); border: 1px solid var(--linie-3); position: relative; transition: background-color .3s; flex: 0 0 auto; }
.schalter-knopf { position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--text-2); transition: transform .3s var(--ease), background-color .3s; }
.schalter[aria-checked='true'] .schalter-bahn { background: rgb(247 147 26 / .3); border-color: var(--orange); }
.schalter[aria-checked='true'] .schalter-knopf { transform: translateX(14px); background: var(--text); }
.schalter-kopf { min-height: 40px; padding: 0 12px 0 6px; font-size: 15px; gap: 8px; }
@media (max-width: 520px) {
  /* Handy: „Ruhig“ steht als Wort unter dem Schalter – so ist im Kopf Platz für das Wort „Live“ */
  .schalter-kopf { flex-direction: column; justify-content: center; gap: 1px; min-height: 44px; min-width: 44px; padding: 3px 4px; border: 0; border-radius: 10px; font-size: 14px; line-height: 1.1; }
  .schalter-kopf .schalter-bahn { width: 30px; height: 18px; }
  .schalter-kopf .schalter-knopf { top: 2px; width: 12px; height: 12px; }
  .schalter-kopf[aria-checked='true'] .schalter-knopf { transform: translateX(12px); }
}
@media (max-width: 384px) { .marke-wort { display: none; } }

/* ================================================================== Typografie & Bausteine */
/* Höchstens EINE gesperrte Mono-Versalzeile je Seite: der .kicker über der H1. */
.kicker { display: flex; align-items: center; gap: 10px; font: 500 14px/1.3 var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--text-2); }
.kicker-punkt { width: 8px; height: 8px; border-radius: 1px; background: var(--orange); flex: 0 0 auto; }
.kicker-leise { font: 500 15px/1.3 var(--sans); color: var(--text-3); }
.hz-label { font: 600 15px/1.3 var(--sans); color: var(--text-3); }

.kraft { font-size: clamp(2.1rem, 1.3rem + 2.6vw, 3.9rem); font-weight: 620; line-height: 1.04; letter-spacing: -.025em; text-wrap: balance; margin-top: 14px; }
.kraft-klein { font-size: clamp(1.6rem, 1.2rem + 1.3vw, 2.4rem); font-weight: 600; letter-spacing: -.02em; text-wrap: balance; }
.kraft-gross { font-size: clamp(2.6rem, 1.6rem + 3.6vw, 5rem); }
html.js.bewegt .kraft { font-weight: 300; transition: font-weight 1.4s var(--ease), letter-spacing 1.4s var(--ease); letter-spacing: -.01em; }
html.js.bewegt .kraft.sichtbar { font-weight: 620; letter-spacing: -.025em; }
.lead { font-size: clamp(1.1rem, 1rem + .35vw, 1.3rem); line-height: 1.6; color: var(--text-2); max-width: 52ch; margin-top: 18px; }
.lead-leise { color: var(--text-3); margin-top: 10px; }
.fliess { font-size: 18px; color: var(--text-2); max-width: 64ch; }
.fliess + .fliess { margin-top: 14px; }
.fussnote { font-size: 16px; line-height: 1.55; color: var(--text-3); margin-top: 18px; max-width: 80ch; }
.pflicht-satz { font-size: 17px; color: var(--text-2); }
.pflicht-satz strong { color: var(--text); }
.label { font: 600 14px/1.4 var(--sans); letter-spacing: .01em; color: var(--text-3); margin: 0; }
.lade { font-size: 16px; color: var(--text-3); padding: 24px 0; }
html:not(.js) .lade { display: none; }   /* ohne Skript lädt nichts – dann spricht der <noscript>-Hinweis */
html:not(.js) .kopf-uhr, html:not(.js) .kopf-live, html:not(.js) .kopf-puls { display: none; }   /* keine ewig leere Uhr „--:--:--“ */
.ohne-js { margin-top: 18px; padding: 14px 18px; border: 1px solid rgb(243 197 107 / .4); border-radius: 10px; color: var(--warn); font-size: 17px; max-width: 70ch; }
.ohne-js a { color: var(--text); }
.daten-fehler { margin-top: 24px; padding: 14px 18px; border: 1px solid rgb(243 197 107 / .4); border-radius: 10px; color: var(--warn); font-size: 17px; }
.textlink { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: var(--text); text-decoration: none; border-bottom: 1px solid var(--linie-3); font-weight: 500; transition: border-color .3s; }
.textlink:hover { border-bottom-color: var(--text); }
button.textlink { -webkit-appearance: none; appearance: none; background: none; border: 0; border-bottom: 1px solid var(--linie-3); border-radius: 0; padding: 0; font: inherit; font-weight: 500; color: var(--text); cursor: pointer; }
/* Live-Hinweis („Kurse veraltet“, „neue Calls“) bleibt unter dem Kopf stehen – auch beim Lesen einer Akte */
.strom-hinweis { position: sticky; top: calc(var(--reiter-h) + 6px); z-index: 30; background: var(--nacht-2); box-shadow: 0 10px 30px rgb(0 0 0 / .5); }
html.veraltet .kopf-live .puls-punkt, html.daten-fehlen .kopf-live .puls-punkt { animation: none; background: var(--text-3); }
html.veraltet .kopf-live-wort, html.daten-fehlen .kopf-live-wort { color: var(--warn); }
/* Daten fehlen (rahmen.js): kein ewiges „Lade …“ / „verbinde …“ – der Hinweis oben sagt, was los ist */
html.daten-fehlen .lade, html.daten-fehlen [data-ohne-daten-weg] { display: none; }
@media (max-width: 520px) { .kw-lang { display: none; } }

.knopf { display: inline-flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 24px; border-radius: 10px; text-decoration: none; font: 600 17px/1 var(--kopf); letter-spacing: 0; cursor: pointer; border: 1px solid transparent; transition: transform .3s var(--ease), background-color .3s, border-color .3s; }
.knopf-haupt { background: var(--text); color: var(--nacht); }
.knopf-haupt:hover { background: #fff; transform: translateY(-1px); }
.knopf-haupt .q { width: 9px; height: 9px; background: var(--orange); border-radius: 2px; }
.knopf-geist { background: transparent; border-color: var(--linie-3); color: var(--text); min-height: 48px; font-size: 16px; }
.knopf-geist:hover { border-color: var(--text); }
.knoepfe { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; margin-top: 24px; }

/* Vorzeichen: nie nur Farbe – Klasse setzt Farbe, Text trägt ▲/▼ und +/−. Verluste so groß wie Gewinne. */
.plus { color: var(--plus); } .minus { color: var(--minus); } .neutral { color: var(--text-2); }
.zahl { font-family: var(--serif); font-variant-numeric: tabular-nums lining-nums; font-optical-sizing: auto; font-weight: 430; letter-spacing: -.01em; }
.zeichen-r { font-size: max(.62em, 13px); vertical-align: .18em; margin-right: .25em; font-family: var(--sans); }
.blink { animation: aufleuchten .9s var(--ease); }
@keyframes aufleuchten { from { text-shadow: 0 0 14px currentColor; } to { text-shadow: none; } }

.chip-n { display: inline-flex; align-items: center; font: 500 14px/1 var(--sans); padding: 6px 11px; border: 1px solid var(--linie-3); border-radius: 999px; color: var(--text); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

/* Seitenkopf (Seiten ohne Kapitelfoto) */
.seite-kopf { padding-top: clamp(2.5rem, 1.5rem + 3vw, 5rem); padding-bottom: clamp(1rem, .5rem + 1vw, 2rem); }
.seite-kopf > * { max-width: 860px; }
.seite-kopf .lead { max-width: 60ch; }
.abschnitt { position: relative; padding-block: clamp(3rem, 2rem + 3.6vw, 6rem); }
.inhalt { display: block; padding-bottom: clamp(3rem, 2rem + 3vw, 6rem); }

/* Erscheinen beim Scrollen (nur mit Bewegung) */
html.js.bewegt [data-erscheinen] { opacity: 0; transform: translateY(14px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
html.js.bewegt [data-erscheinen].sichtbar { opacity: 1; transform: none; }

/* ================================================================== Antippbare Begriffe (kein Pop-up: klappt darunter auf) */
.begriff { display: inline; padding: 0; margin: 0; border: 0; background: none; font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; cursor: pointer;
  text-decoration: underline dotted; text-decoration-color: var(--text-3); text-decoration-thickness: 1.5px; text-underline-offset: .24em; }
.begriff:hover { text-decoration-color: var(--text); }
/* Unsichtbar vergrößerte Trefferfläche (das Wort selbst ist oft nur 14–20 px hoch) */
.begriff { position: relative; }
.begriff::after { content: ''; position: absolute; inset: -10px -4px; }
.chip-n .begriff::after, .mini-chip .begriff::after { inset: -14px -12px; }
.begriff[aria-expanded='true'] { text-decoration-style: solid; text-decoration-color: var(--orange); }
.begriff-erkl { display: block; margin: 10px 0 6px; padding: 10px 14px; border-left: 2px solid var(--orange); border-radius: 0 8px 8px 0; background: rgb(236 232 224 / .045);
  font: 400 16px/1.55 var(--sans); letter-spacing: 0; text-transform: none; color: var(--text-2); max-width: 62ch; white-space: normal; text-align: left; }
.begriff-erkl b { color: var(--text); font-weight: 600; }
.begriff-erkl > b:first-child { font-family: var(--sans); font-size: 1em; line-height: inherit; letter-spacing: 0; margin: 0; }   /* nie die Zahl-Optik des Umfelds erben */
/* Erklärung in einer Tabelle: eigene Zeile direkt unter der Zeile des Begriffs */
tr.begriff-zeile > td { padding-top: 0 !important; }
tr:has(+ tr.begriff-zeile), tr:has(+ tr.begriff-zeile) > * { border-bottom-color: transparent !important; }
tr.begriff-zeile > td { grid-column: 1 / -1; }
html.bewegt .begriff-erkl { animation: aufklappen .35s var(--ease); }
@keyframes aufklappen { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* ================================================================== Fotos: Scan-Auftritt, Licht, Tiefe */
.foto { position: relative; margin: 0; overflow: hidden; border-radius: 6px; isolation: isolate; background: transparent; }
.foto img { width: 100%; height: 100%; object-fit: cover; transform: translateY(var(--py, 0px)) scale(1.06); filter: saturate(.9) contrast(1.04) brightness(.92); }
.foto[data-roh] img { filter: none; }   /* Bild ist schon bearbeitet: kein Kern-Filter */
.foto[data-licht]::before { content: ''; position: absolute; inset: 0; z-index: 2; pointer-events: none; mix-blend-mode: soft-light; opacity: .9;
  background: radial-gradient(520px circle at var(--lx, 68%) var(--ly, 30%), rgb(255 238 210 / .5), transparent 60%); transition: opacity .6s; }
/* Foto-Auftritt: kurz (≤ 0,5 s) und nur beim ersten Seitenaufruf der Sitzung. Danach (html.schon-da, Reiterwechsel)
   steht das Foto sofort – ein Scan bei jedem Klick wirkte wie Laden statt wie ein Auftritt. */
html.js.bewegt:not(.schon-da) .foto[data-scan] img { clip-path: inset(49.6% 0 49.6% 0); transition: clip-path .45s var(--ease-scan) .05s; }
html.js.bewegt:not(.schon-da) .foto[data-scan].sichtbar img { clip-path: inset(0 0 0 0); }
html.js.bewegt:not(.schon-da) .foto[data-scan]::after { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 1px; z-index: 3; background: rgb(255 244 228 / .9); box-shadow: 0 0 18px rgb(255 236 210 / .6); transform: scaleX(0); opacity: 0; pointer-events: none; }
html.js.bewegt:not(.schon-da) .foto[data-scan].sichtbar::after { animation: scanlinie .6s var(--ease-scan) forwards; }
@keyframes scanlinie { 0% { transform: scaleX(0); opacity: 1; top: 50%; } 15% { transform: scaleX(1); opacity: 1; top: 50%; } 75% { top: 100%; opacity: .6; } 100% { top: 100%; opacity: 0; transform: scaleX(1); } }
.foto-notiz { position: absolute; z-index: 4; left: 14px; bottom: 14px; padding: 6px 10px; background: rgb(6 8 12 / .8); border-radius: 4px; font: 500 14px/1.3 var(--sans); color: var(--text-2); }
.foto-unterschrift { margin-top: 10px; font-size: 15px; line-height: 1.5; color: var(--text-3); }

/* Kapitelkarte (Seitenkopf mit großem Foto: Märkte, Blockchain, KI) */
.kapitel { position: relative; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); min-height: clamp(420px, 62vh, 640px); align-items: end; margin-bottom: clamp(2.5rem, 1.5rem + 3vw, 5rem); }
.kapitel-foto { grid-column: 4 / -1; grid-row: 1; height: 100%; min-height: 420px; border-radius: 0; background: transparent; margin-right: calc(-1 * var(--aussen));
  --mh: linear-gradient(90deg, transparent 0, #000 34%, #000 78%, transparent 100%); --mv: linear-gradient(0deg, transparent 0, #000 24%, #000 80%, transparent 100%);
  -webkit-mask-image: var(--mh), var(--mv); -webkit-mask-composite: source-in; mask-image: var(--mh), var(--mv); mask-composite: intersect; }
.kapitel-foto img { filter: saturate(.92) contrast(1.08) brightness(.88); transform: translateY(var(--py, 0px)) scale(1.1); }
.kapitel-foto[data-roh] img { filter: none; }
.kapitel-foto > picture { position: absolute; inset: 0; display: block; }   /* eigener Ausschnitt je Bildschirm: Höhe kommt vom Kapitel */
.kapitel-text { grid-column: 1 / 8; grid-row: 1; position: relative; z-index: 2; padding-bottom: clamp(1rem, 3vw, 3rem); text-shadow: 0 1px 18px rgb(6 8 12 / .8); }
.kapitel-text::before { content: ''; position: absolute; z-index: -1; inset: -60px calc(-1 * min(80px, var(--aussen))) -30px -60px; background: radial-gradient(closest-side, rgb(6 8 12 / .78), rgb(6 8 12 / .4) 60%, transparent); pointer-events: none; }
.kapitel-notiz { margin-top: 16px; font-size: 15px; color: var(--text-3); }
.kapitel-text .lead { max-width: 46ch; color: var(--text-2); }
.kapitel-rechts .kapitel-foto { grid-column: 1 / 10; margin-right: 0; margin-left: calc(-1 * var(--aussen)); --mh: linear-gradient(270deg, transparent 0, #000 36%, #000 80%, transparent 100%); }
.kapitel-rechts .kapitel-text { grid-column: 6 / -1; }
.kapitel-rechts .kapitel-foto img { object-position: 18% 55%; }
@media (max-width: 860px) {
  .kapitel { display: block; min-height: 0; }
  .kapitel-foto, .kapitel-rechts .kapitel-foto { height: 62vw; min-height: 0; margin-inline: calc(-1 * var(--rand)); --mh: linear-gradient(90deg, #000, #000); --mv: linear-gradient(0deg, transparent 0, #000 38%, #000 90%, transparent 100%); }
  .kapitel-text::before { inset: -30px calc(-1 * var(--rand)) -10px; }
  .kapitel-text { margin-top: -18px; padding-bottom: 0; }
}

/* ================================================================== Instrumente & Bedienelemente (mehrere Seiten) */
.instrument { margin-top: clamp(2.5rem, 1.5rem + 3vw, 4.5rem); padding: clamp(20px, 3vw, 40px); border: 1px solid var(--linie-2); border-radius: 18px; background-color: rgb(10 13 19 / .82); position: relative;
  background-image: linear-gradient(var(--linie-3), var(--linie-3)), linear-gradient(var(--linie-3), var(--linie-3)), linear-gradient(var(--linie-3), var(--linie-3)), linear-gradient(var(--linie-3), var(--linie-3));
  background-size: 16px 1px, 1px 16px, 16px 1px, 1px 16px; background-position: 14px 14px, 14px 14px, calc(100% - 14px) calc(100% - 14px), calc(100% - 14px) calc(100% - 14px); background-repeat: no-repeat; }
.instrument-kopf { max-width: 760px; }
.instrument-kopf h2, .instrument-kopf h3 { font-size: clamp(1.6rem, 1.2rem + 1.2vw, 2.3rem); margin-top: 10px; }
.instrument-satz { font-size: 17.5px; line-height: 1.6; color: var(--text-2); margin-top: 12px; max-width: 66ch; }
.instrument-aktionen { margin-top: 20px; display: flex; gap: 12px; }
@media (max-width: 640px) { .instrument { padding-top: 30px; background-position: 10px 10px, 10px 10px, calc(100% - 10px) calc(100% - 10px), calc(100% - 10px) calc(100% - 10px); } }

/* Umschalter: eine zusammenhängende Leiste statt einzelner Pillen (weniger Vorlagen-Anmutung). Die Knöpfe teilen sich
   ihre Kanten; passt die Leiste nicht in die Zeile, bricht der Text im Knopf um – nie die Leiste. */
.segment { display: flex; flex-wrap: nowrap; align-items: stretch; gap: 0; max-width: 100%; }
.segment-label { flex: 0 0 auto; align-self: center; font: 600 14px/1.2 var(--sans); color: var(--text-3); margin-right: 12px; }
.segment > button { flex: 0 1 auto; min-width: 0; min-height: 44px; margin-left: -1px; padding: 6px 16px; border: 1px solid var(--linie-2); border-radius: 0; background: transparent; cursor: pointer; font-size: 16px; line-height: 1.2; text-align: center; color: var(--text-2); display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: background-color .25s, color .25s, border-color .25s; }
.segment > button:first-of-type { margin-left: 0; border-radius: 10px 0 0 10px; }
.segment > button:last-of-type { border-radius: 0 10px 10px 0; }
.segment > button small { font-size: 14px; color: var(--text-3); }
.segment > button:hover { position: relative; border-color: var(--text-3); color: var(--text); }
.segment > button[aria-pressed='true'] { position: relative; z-index: 1; background: var(--text); border-color: var(--text); color: var(--nacht); }
.segment > button[aria-pressed='true'] small { color: #3c4148; }
.segment > button:focus-visible { z-index: 2; }
.segment .begriff { display: inline; min-height: 0; padding: 0; border: 0; border-radius: 0; background: none; color: inherit; font-size: inherit; }
.segment .begriff:hover { color: var(--text); border-color: transparent; }

.aufklapper { margin-top: 28px; border-top: 1px solid var(--linie); border-bottom: 1px solid var(--linie); }
.aufklapper summary { list-style: none; display: flex; justify-content: space-between; align-items: center; min-height: 56px; cursor: pointer; font: 600 18px/1.2 var(--kopf); }
.aufklapper summary::-webkit-details-marker { display: none; }
.pfeil { width: 12px; height: 12px; border-right: 1.5px solid var(--text); border-bottom: 1.5px solid var(--text); transform: rotate(45deg) translate(-3px, -3px); transition: transform .25s var(--ease); }
.aufklapper[open] .pfeil { transform: rotate(225deg) translate(-2px, -2px); }
.aufklapper > :not(summary) { padding-bottom: 22px; }

.hier-zu-sehen { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 22px; margin-top: 36px; }
.hier-zu-sehen .hz-label { flex-basis: 100%; }
.hier-zu-sehen a { min-height: 44px; display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--text); text-decoration: none; border-bottom: 1px solid var(--linie-3); }
.hier-zu-sehen a:hover { border-bottom-color: var(--text); }
.hz-pflicht { font: 500 17px/1.35 var(--sans); color: var(--text); padding: 1px 0 1px 11px; border-left: 2px solid var(--linie-3); }   /* Etikett, kein Knopf */
.hier-zu-sehen a .hz-pflicht { margin-left: 8px; }

.fund-satz:empty { display: none; }
.fund-satz { margin-top: 18px; padding: 12px 16px; border-left: 2px solid var(--orange); background: var(--orange-weich); font-size: 16.5px; color: var(--text); max-width: 76ch; }
.fund-satz b { font: 600 15px/1 var(--sans); color: var(--orange); margin-right: 8px; }

/* Schieberegler (Märkte, später Verlauf) */
input[type='range'] { -webkit-appearance: none; appearance: none; width: 100%; height: 44px; background: transparent; margin: 0; cursor: pointer; position: relative; z-index: 1; }
input[type='range']::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: var(--linie-2); }
input[type='range']::-moz-range-track { height: 4px; border-radius: 2px; background: var(--linie-2); }
input[type='range']::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; margin-top: -11px; border-radius: 50%; background: var(--text); border: 5px solid var(--nacht); box-shadow: 0 0 0 1px var(--linie-3); }
input[type='range']::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--text); border: 5px solid var(--nacht); box-shadow: 0 0 0 1px var(--linie-3); }
input[type='range']:focus-visible { outline: none; }
input[type='range']:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 3px var(--text); }
input[type='range']:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 3px var(--text); }

/* ================================================================== Fuß (jede Seite)
   Seiten mit Calls/Trades: die vier Pflichttexte, gleicher Wortlaut, nur leiser (Titel laufen in die Zeile ein,
   zwei Spalten). Alle anderen: schlanker Fuß (body.fuss-schlank, siehe bauen.mjs FUSS_PFLICHT).
   Darunter die Links mit Kontaktadresse und dem Schalter, dann das Zeichen (Fundstück 1) mit ©, Datenschutz-Satz und
   Demo-Hinweis – jede Aussage eine eigene Zeile. „Fundstücke n von 3“ erscheint erst nach dem ersten Fund. */
.fuss { position: relative; padding: clamp(1.75rem, 1.4rem + 1vw, 2.5rem) 0 1.5rem; border-top: 1px solid var(--linie-2); background: var(--nacht-2); }
.pflicht { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 44px; }
.pflicht > div { font-size: 15px; line-height: 1.5; }
.pflicht > div > * { display: inline; }
.pflicht-titel { font: 650 15px/1.5 var(--kopf); letter-spacing: .01em; color: var(--text); margin: 0 .3em 0 0; }
.pflicht-titel::after { content: ':'; }
.pflicht p { font-size: 15px; line-height: 1.5; color: var(--text-2); }
.fuss-leiste { display: flex; flex-wrap: wrap; align-items: center; gap: 0 24px; margin-top: 16px; padding-top: 6px; border-top: 1px solid var(--linie); }
.fuss-links { display: flex; flex-wrap: wrap; gap: 0 20px; }
.fuss-links a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; color: var(--text-2); font-size: 16px; border-bottom: 1px solid transparent; }
.fuss-links a:hover { color: var(--text); border-bottom-color: var(--linie-3); }
.fuss-leiste .schalter { margin-left: auto; }
.fuss-unten { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 0 14px; align-items: start; margin-top: 8px; }
.fuss-zeichen { display: inline-grid; place-items: center; width: 44px; height: 44px; margin: 0; padding: 0; border: 1px solid var(--linie-2); border-radius: 10px; background: transparent; cursor: pointer; }
.fuss-zeichen:hover { border-color: var(--linie-3); }
.fuss-zeichen.hupf .zeichen .b1 { animation: hupf .5s var(--ease); }
.fuss-zeichen.hupf .zeichen .b2 { animation: hupf .5s var(--ease) .05s; }
.fuss-zeichen.hupf .zeichen .b3 { animation: hupf .5s var(--ease) .1s; }
.fuss-zeichen.gefunden .zeichen rect { animation: stapeln .9s var(--ease) both; }
.fuss-zeichen.gefunden .zeichen .b2 { animation-delay: .08s; } .fuss-zeichen.gefunden .zeichen .b3 { animation-delay: .16s; }
@keyframes hupf { 50% { transform: translateY(-3px); } }
@keyframes stapeln { 0% { transform: translateY(0); } 40% { transform: translateY(-9px); } 100% { transform: translateY(0); } }
.fuss-text { font-size: 15px; line-height: 22px; color: var(--text-3); }
.fuss-text > span { display: block; }   /* jede Aussage eine eigene Zeile */
.fuss-text > span:empty { display: none; }
@media (min-width: 900px) { .fuss-text > span:first-child { display: inline; margin-right: 1.1em; } .fuss-text > span:nth-child(2) { display: inline; } }
.fundstuecke { color: var(--text-2); }
.demo-hinweis { color: var(--warn); }
/* Schlanker Fuß (Seiten ohne Calls/Trades): kein Pflichtblock, Links direkt unter der Kante */
.fuss-schlank .fuss-leiste { margin-top: 0; padding-top: 0; border-top: 0; }
.fuss-links-titel { display: inline-flex; align-items: center; min-height: 44px; font: 500 14px/1.2 var(--mono); letter-spacing: .04em; color: var(--text-3); }
.fuss-schlank.seite-unter .demo-hinweis, .seite-recht .fundstuecke { display: none; }
@media (max-width: 860px) { .pflicht { grid-template-columns: 1fr; gap: 8px; } }
@media (max-width: 640px) {
  /* Handy: gleicher Wortlaut, gleiche 15 px – nur straffer. Die Links laufen mit dem Schalter in einem Fluss
     (meist zwei Zeilen), das Zeichen steht im Text daneben statt in einer eigenen Zeile. */
  .fuss { padding: 18px 0 12px; }
  .pflicht { gap: 6px; }
  .pflicht > div, .pflicht-titel, .pflicht p { line-height: 1.42; }
  .fuss-leiste { gap: 0 14px; margin-top: 10px; padding-top: 2px; }
  .fuss-links { display: contents; }
  .fuss-leiste .schalter { padding: 0; border: 0; gap: 8px; }
  .fuss-unten { margin-top: 6px; gap: 0 12px; }
  .fuss-text { line-height: 21px; }
  .fuss-links-titel { flex-basis: 100%; min-height: 32px; }
}

/* ================================================================== Ruhige Fassung */
html.ruhig *, html.ruhig *::before, html.ruhig *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
html.ruhig .puls-punkt { animation: none; }
html.ruhig .blink { animation: none; }
