/* ===========================================================================
   LEDGER Design System v10 — „Monochrome Premium“
   Strikt Schwarz/Weiß. Hell ist Standard, Dunkel ist die Inversion.
   Struktur: Nachrichtenagentur. Marktdaten: Terminal-Konventionen.
   Oberfläche & Bewegung: iOS — Federkurven, Large-Title-Kollaps,
   Druckfeedback, geschichtete Tiefe ohne einen einzigen Farbton.
   CSP: style-src 'self' — keine Inline-Styles, alles lebt hier.
   =========================================================================== */

/* --- 1. Tokens ---------------------------------------------------------- */
:root {
  color-scheme: light;

  --bg: #f2f2f4;
  --surface: #ffffff;
  --surface-2: #f4f4f6;
  --surface-3: #e9e9ec;
  --glass: rgba(255, 255, 255, .74);
  --glass-line: rgba(255, 255, 255, .95);

  --ink: #000000;
  --ink-2: #1c1c1e;
  --muted: #636366;
  --faint: #6e6e73;
  --line: rgba(0, 0, 0, .09);
  --line-strong: rgba(0, 0, 0, .22);

  --accent: #000000;
  --accent-grad: linear-gradient(180deg, #2b2b2e 0%, #000000 100%);
  --accent-ink: #ffffff;
  --on-accent-chip: #ffffff;

  --sans: system-ui, -apple-system, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "SFMono-Regular", "Cascadia Mono", Consolas, "Liberation Mono", monospace;

  --r-xs: 8px;
  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 24px;
  --r-xl: 32px;
  --r-full: 999px;

  /* Neutrale, geschichtete Tiefe — kein Farbstich im Schatten. */
  --e1: 0 1px 2px rgba(0, 0, 0, .04), 0 4px 10px -3px rgba(0, 0, 0, .05);
  --e2: 0 1px 3px rgba(0, 0, 0, .05), 0 10px 24px -8px rgba(0, 0, 0, .10);
  --e3: 0 2px 6px rgba(0, 0, 0, .06), 0 22px 48px -14px rgba(0, 0, 0, .16);
  --e-pop: 0 8px 20px rgba(0, 0, 0, .10), 0 32px 70px -18px rgba(0, 0, 0, .26);
  --gloss: inset 0 1px 0 rgba(255, 255, 255, .9);
  --gloss-dark: inset 0 1px 0 rgba(255, 255, 255, .18);
  --ring: 0 0 0 1px rgba(0, 0, 0, .06);

  /* iOS-Federkurven. */
  --ease-spring: cubic-bezier(.32, .72, 0, 1);
  --ease-bounce: cubic-bezier(.34, 1.56, .64, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --t-fast: 140ms;
  --t-mid: 280ms;
  --t-slow: 500ms;

  --max: 1060px;
  --gutter: clamp(16px, 3.2vw, 32px);
  --topbar-h: 60px;
  --tabbar-h: calc(66px + env(safe-area-inset-bottom, 0px));
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #000000;
  --surface: #141416;
  --surface-2: #1c1c1f;
  --surface-3: #2a2a2e;
  --glass: rgba(20, 20, 22, .74);
  --glass-line: rgba(255, 255, 255, .12);
  --ink: #ffffff;
  --ink-2: #ebebf0;
  --muted: #9e9ea3;
  --faint: #8e8e93;
  --line: rgba(255, 255, 255, .12);
  --line-strong: rgba(255, 255, 255, .28);
  --accent: #ffffff;
  --accent-grad: linear-gradient(180deg, #ffffff 0%, #dcdce0 100%);
  --accent-ink: #000000;
  --e1: 0 1px 2px rgba(0, 0, 0, .6);
  --e2: 0 2px 6px rgba(0, 0, 0, .6), 0 12px 28px -10px rgba(0, 0, 0, .8);
  --e3: 0 4px 12px rgba(0, 0, 0, .65), 0 26px 56px -16px rgba(0, 0, 0, .9);
  --e-pop: 0 10px 28px rgba(0, 0, 0, .7), 0 34px 76px -20px rgba(0, 0, 0, .95);
  --gloss: inset 0 1px 0 rgba(255, 255, 255, .08);
  --gloss-dark: inset 0 1px 0 rgba(0, 0, 0, .18);
  --ring: 0 0 0 1px rgba(255, 255, 255, .08);
}

@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] {
    color-scheme: dark;
    --bg: #000000;
    --surface: #141416;
    --surface-2: #1c1c1f;
    --surface-3: #2a2a2e;
    --glass: rgba(20, 20, 22, .74);
    --glass-line: rgba(255, 255, 255, .12);
    --ink: #ffffff;
    --ink-2: #ebebf0;
    --muted: #9e9ea3;
    --faint: #8e8e93;
    --line: rgba(255, 255, 255, .12);
    --line-strong: rgba(255, 255, 255, .28);
    --accent: #ffffff;
    --accent-grad: linear-gradient(180deg, #ffffff 0%, #dcdce0 100%);
    --accent-ink: #000000;
    --e1: 0 1px 2px rgba(0, 0, 0, .6);
    --e2: 0 2px 6px rgba(0, 0, 0, .6), 0 12px 28px -10px rgba(0, 0, 0, .8);
    --e3: 0 4px 12px rgba(0, 0, 0, .65), 0 26px 56px -16px rgba(0, 0, 0, .9);
    --e-pop: 0 10px 28px rgba(0, 0, 0, .7), 0 34px 76px -20px rgba(0, 0, 0, .95);
    --gloss: inset 0 1px 0 rgba(255, 255, 255, .08);
    --gloss-dark: inset 0 1px 0 rgba(0, 0, 0, .18);
    --ring: 0 0 0 1px rgba(255, 255, 255, .08);
  }
}

/* --- 2. Reset ----------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--topbar-h) + 24px);
}

body {
  margin: 0; min-height: 100vh;
  background: var(--bg); color: var(--ink);
  font: 400 16px/1.5 var(--sans);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.011em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-wrap: break-word;
}

a { color: inherit; text-decoration: none; }

/* Die erste Nennung des Unternehmens im Artikel: eine Taste, kein Wort mit
   Unterstreichung. Sie führt auf die Instrumentenseite mit Kurs und Chart.

   Bewusst eine Fläche statt einer Linie — auf dem Telefon ist eine Linie kein
   Ziel, das man trifft. `inline-flex` mit `baseline`-Ausrichtung hält die Taste
   trotzdem in der Textzeile, damit der Satz weiterhin als Satz liest.
   Kein Farbton: die Abgrenzung trägt die Fläche, wie überall sonst hier. */
a.instrument {
  display: inline-flex; align-items: baseline; gap: 6px;
  padding: 1px 8px 2px;
  border-radius: var(--r-xs);
  /* `background-color`, nicht die Kurzform: die Kurzform traegt Anteile, die
     sich nicht interpolieren lassen, und ein Uebergang darauf haelt in
     manchen Engines den alten Farbwert fest — beim Themenwechsel bliebe die
     helle Flaeche unter weisser Schrift stehen. */
  background-color: var(--surface-3);
  box-shadow: var(--ring);
  font-weight: 560;
  white-space: nowrap;
  transition: background-color var(--t-fast) var(--ease-out), transform var(--t-fast) var(--ease-out);
}
a.instrument:hover { background-color: var(--line-strong); color: var(--surface); }
/* Druckfeedback wie in iOS: die Taste gibt kurz nach. */
a.instrument:active { transform: scale(.97); }
.instrument__ticker {
  font-family: var(--mono);
  font-size: .78em; font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
  color: var(--muted);
}
a.instrument:hover .instrument__ticker { color: inherit; }

@media (prefers-reduced-motion: reduce) {
  a.instrument { transition: none; }
  a.instrument:active { transform: none; }
}

/* Zwischenüberschrift im Artikel. Trägt die Gliederung, ohne mit der
   Hauptüberschrift zu konkurrieren: kleiner, aber mit spürbarem Vorlauf, weil
   der Abstand darüber die Trennung macht und nicht die Größe. */
.section-heading {
  margin: 2em 0 .6em;
  font-size: 1.25rem; font-weight: 660;
  letter-spacing: -.02em; line-height: 1.25;
  text-wrap: balance;
}

/* Der Hinweiskasten. Er handelt *von* der Meldung, nicht ihr Teil — deshalb
   eine abgesetzte Fläche und im Markup ein `aside role="note"`. */
.infobox {
  margin: 2em 0;
  padding: 18px 20px;
  border-radius: var(--r-md);
  background: var(--surface-2);
  box-shadow: var(--ring);
  color: var(--muted);
  font-size: .938rem; line-height: 1.55;
}
.infobox h2 {
  margin-bottom: .35em;
  color: var(--ink);
  font-size: .813rem; font-weight: 640;
  letter-spacing: .06em; text-transform: uppercase;
}

/* Die Kursbox am Ende: Identität und ein Weg weiter. Bewusst ohne Kurs — die
   Seite liegt eine Stunde im Randcache, und eine eingebackene Notierung wäre
   die meiste Zeit davon falsch. */
.instrument-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 16px;
  margin: 2em 0 0;
  padding: 18px 20px;
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: var(--e1), var(--ring);
  transition: box-shadow var(--t-fast) var(--ease-out), transform var(--t-fast) var(--ease-out);
}
.instrument-card:hover { box-shadow: var(--e2), var(--ring); }
.instrument-card:active { transform: scale(.995); }
.instrument-card__name { font-weight: 640; letter-spacing: -.01em; }
.instrument-card__ticker {
  font-family: var(--mono); font-size: .875rem;
  color: var(--muted); text-align: end;
}
.instrument-card__more {
  grid-column: 1 / -1;
  color: var(--muted); font-size: .875rem;
}

@media (prefers-reduced-motion: reduce) {
  .instrument-card { transition: none; }
  .instrument-card:active { transform: none; }
}

button, input, select, textarea { font: inherit; color: inherit; }
button {
  cursor: pointer; background: none; border: 0; padding: 0;
  user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent;
}
h1, h2, h3, h4, p, figure, dl, dd { margin: 0; }
ol, ul { margin: 0; padding: 0; list-style: none; }
img, svg { max-width: 100%; }
table { border-collapse: collapse; }
[hidden] { display: none !important; }

:focus-visible { outline: 2.5px solid var(--ink); outline-offset: 3px; border-radius: 8px; }

.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}
.skip-link {
  position: fixed; z-index: 999; inset: 12px auto auto 12px;
  padding: 12px 18px; border-radius: var(--r-full);
  background: var(--accent-grad); color: var(--accent-ink); font-weight: 640;
  box-shadow: var(--e3);
  transform: translateY(-220%);
  transition: transform var(--t-mid) var(--ease-spring);
}
.skip-link:focus { transform: none; }

/* Scroll-Reveal: erst aktiv, wenn JS bereit ist — sonst bleibt alles sichtbar. */
[data-reveal="on"] .reveal { opacity: 0; transform: translateY(22px); }
[data-reveal="on"] .reveal.is-in {
  opacity: 1; transform: none;
  transition: opacity var(--t-slow) var(--ease-out), transform var(--t-slow) var(--ease-spring);
}

/* --- 3. Typografie ------------------------------------------------------ */
.eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  color: var(--muted);
  font-size: .688rem; font-weight: 640; letter-spacing: .075em; text-transform: uppercase;
}
.dek { color: var(--muted); font-size: .938rem; line-height: 1.55; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.sep { color: var(--line-strong); user-select: none; }

/* Large Title wie in iOS: groß, eng, fett — kollabiert beim Scrollen. */
.large-title, .section-head h2.large-title {
  font-size: clamp(2.2rem, 7.5vw, 3.1rem);
  font-weight: 700; line-height: 1.03; letter-spacing: -.045em;
}

/* --- 4. Marktbausteine (rein monochrom) --------------------------------- */
.delta {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: var(--r-full);
  font: 620 .75rem/1.25 var(--mono); white-space: nowrap;
  background: var(--surface-2); color: var(--muted);
  box-shadow: var(--ring);
  transition: background var(--t-mid) var(--ease-out), color var(--t-mid) var(--ease-out);
}
.delta::before { font-size: .68em; line-height: 1; }
/* Richtung wird durch Form und Glyphe codiert, nicht durch Farbe. */
.delta--up { background: var(--ink); color: var(--bg); box-shadow: none; }
.delta--up::before { content: "▲"; }
.delta--down { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.delta--down::before { content: "▼"; }
.delta--flat { background: var(--surface-2); color: var(--muted); }

.pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 11px; border-radius: var(--r-full);
  background: var(--surface-2); color: var(--muted);
  font-size: .72rem; font-weight: 600; white-space: nowrap;
  box-shadow: var(--ring);
}
.pill--ticker { font-family: var(--mono); font-weight: 660; color: var(--ink); letter-spacing: .01em; }
.pill--demo { background: transparent; box-shadow: inset 0 0 0 1px var(--line-strong); }

.source-pill { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: .72rem; font-weight: 620; }
.source-pill::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; flex: 0 0 auto;
  background: var(--ink);
}

.dot-live { width: 7px; height: 7px; border-radius: 50%; background: var(--ink); display: inline-block; }
.dot-live--pulse { position: relative; }
.dot-live--pulse::after {
  content: "";
  position: absolute;
  inset: -1px;
  border: 1px solid currentColor;
  border-radius: 50%;
  pointer-events: none;
  animation: pulse 2.8s var(--ease-out) 3;
}
@keyframes pulse {
  0% { opacity: .34; transform: scale(1); }
  70%, 100% { opacity: 0; transform: scale(3.6); }
}
@media (prefers-reduced-motion: reduce) { .dot-live--pulse::after { animation: none; } }

.spark { display: block; width: 100%; height: 100%; overflow: visible; color: var(--ink); }
.spark path { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.spark--down path { stroke-dasharray: 3 2.5; }
.spark--flat { color: var(--faint); }

/* --- 5. Steuerelemente -------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 46px; padding: 0 20px;
  border-radius: var(--r-full);
  background: var(--surface); color: var(--ink);
  font-size: .9rem; font-weight: 620; white-space: nowrap;
  box-shadow: var(--ring), var(--e1), var(--gloss);
  transition: transform var(--t-fast) var(--ease-spring), box-shadow var(--t-mid) var(--ease-out), background var(--t-mid) var(--ease-out), color var(--t-mid) var(--ease-out);
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--ring), var(--e2), var(--gloss); }
.btn:active { transform: scale(.96); box-shadow: var(--ring), var(--e1); }
.btn--primary { background: var(--accent-grad); color: var(--accent-ink); box-shadow: var(--e2), var(--gloss-dark); }
.btn--primary:hover { box-shadow: var(--e3), var(--gloss-dark); }
.btn--ghost { background: transparent; color: var(--muted); box-shadow: none; }
.btn--ghost:hover { background: var(--surface-2); color: var(--ink); box-shadow: none; transform: none; }
.btn--sm { min-height: 36px; padding: 0 15px; font-size: .8rem; }
.btn--full { width: 100%; }
.btn[aria-pressed="true"] { background: var(--accent-grad); color: var(--accent-ink); box-shadow: var(--e2), var(--gloss-dark); }

/* Signatur-CTA: schwarze Pille mit rundem Pfeil-Badge. */
.btn--cta { min-height: 56px; padding: 0 8px 0 26px; gap: 16px; font-size: .95rem; font-weight: 640; }
.btn--cta .btn__arrow {
  width: 40px; height: 40px; flex: 0 0 auto;
  display: grid; place-items: center; border-radius: 50%;
  background: var(--accent-ink); color: var(--accent);
  transition: transform var(--t-mid) var(--ease-bounce);
}
.btn--cta .btn__arrow svg { width: 17px; height: 17px; }
.btn--cta:hover .btn__arrow { transform: translate(2px, -2px) rotate(8deg); }
.btn--cta:active .btn__arrow { transform: scale(.9); }
.btn--cta.btn--full { justify-content: space-between; margin-top: 16px; }

.icon-btn {
  width: 44px; height: 44px; flex: 0 0 auto;
  display: inline-grid; place-items: center;
  border-radius: var(--r-full);
  background: var(--surface); color: var(--ink);
  box-shadow: var(--ring), var(--e1), var(--gloss);
  transition: transform var(--t-fast) var(--ease-spring), box-shadow var(--t-mid) var(--ease-out);
}
.icon-btn:hover { transform: translateY(-1px); box-shadow: var(--ring), var(--e2), var(--gloss); }
.icon-btn:active { transform: scale(.92); }
.icon-btn svg, .search svg, .notice__icon, .tabbar svg, .act svg, .btn svg {
  fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
.icon-btn svg { width: 19px; height: 19px; transition: transform var(--t-slow) var(--ease-spring); }
.icon-btn:active svg { transform: rotate(-30deg); }

/* --- 6. Kopfleiste mit Large-Title-Kollaps ------------------------------ */
.topbar {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--bg) 68%, transparent);
  backdrop-filter: saturate(180%) blur(22px);
  -webkit-backdrop-filter: saturate(180%) blur(22px);
  box-shadow: 0 1px 0 transparent;
  transition: box-shadow var(--t-mid) var(--ease-out), background var(--t-mid) var(--ease-out);
}
.topbar[data-condensed="true"] { box-shadow: 0 1px 0 var(--line); }
.topbar__row { position: relative; height: var(--topbar-h); display: flex; align-items: center; gap: 12px; }

.instrument-status {
  margin: 0 0 18px; padding: 12px 14px; border: 1px solid var(--line);
  border-radius: var(--r-md); background: var(--surface-2); color: var(--muted);
}

/* Apple-Manier: zierliche, mittig gesetzte Navigation statt schwerer Reiter. */
.nav-primary {
  display: none; align-items: center;
  gap: clamp(20px, 3.4vw, 46px);
  margin-inline: auto;
}
.nav-primary a, .nav-primary button {
  padding: 0; border-radius: 0; background: none;
  color: var(--ink-2); font-size: .8rem; font-weight: 450; letter-spacing: -.005em;
  opacity: .85;
  transition: opacity var(--t-mid) var(--ease-out), color var(--t-mid) var(--ease-out);
}
.nav-primary form { display: contents; }
.nav-primary a:hover, .nav-primary button:hover { opacity: 1; color: var(--ink); background: none; }
.nav-primary a[aria-current] { opacity: 1; color: var(--ink); font-weight: 600; background: none; box-shadow: none; }

.topbar__title {
  position: absolute; left: 50%; top: 50%;
  font-size: 1rem; font-weight: 660; letter-spacing: -.022em; white-space: nowrap;
  opacity: 0; transform: translate(-50%, calc(-50% + 12px));
  transition: opacity var(--t-mid) var(--ease-out), transform var(--t-mid) var(--ease-spring);
  pointer-events: none;
}
.topbar[data-condensed="true"] .topbar__title { opacity: 1; transform: translate(-50%, -50%); }

.brand {
  display: inline-flex; align-items: center; flex: 0 0 auto;
  font-size: 1.02rem; font-weight: 700; letter-spacing: .1em;
}
.brand__dot { display: none; }
.brand__mark {
  width: 32px; height: 32px; margin-right: 11px; border-radius: 11px;
  background: var(--accent-grad); color: var(--accent-ink);
  display: inline-grid; place-items: center;
  font-size: .84rem; font-weight: 800; letter-spacing: 0;
  box-shadow: var(--e2), var(--gloss-dark);
  transition: transform var(--t-mid) var(--ease-bounce);
}
.brand:hover .brand__mark { transform: rotate(-8deg) scale(1.07); }

.search {
  flex: 1 1 auto; min-width: 0;
  height: 44px; display: flex; align-items: center; gap: 10px;
  padding-inline: 15px; border-radius: var(--r-full);
  background: var(--surface); color: var(--muted);
  box-shadow: var(--ring), var(--e1);
  transition: box-shadow var(--t-mid) var(--ease-out), transform var(--t-mid) var(--ease-spring);
}
.search:focus-within { box-shadow: 0 0 0 2px var(--ink), var(--e2); transform: translateY(-1px); }
.search svg { width: 17px; height: 17px; flex: 0 0 auto; }
.search input { flex: 1 1 auto; min-width: 0; border: 0; outline: 0; background: transparent; font-size: .875rem; }
.search input::placeholder { color: var(--faint); }
.search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.kbd { padding: 3px 6px; border-radius: 7px; background: var(--surface-2); font: 600 .65rem/1 var(--mono); color: var(--faint); }
.topbar__actions { display: flex; gap: 8px; flex: 0 0 auto; align-items: center; }

/* --- 7. Marktband ------------------------------------------------------- */
.ticker { position: relative; z-index: 50; padding-block: 14px 4px; }
.ticker__track {
  display: flex; gap: 10px;
  overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: 4px;
  scrollbar-width: none; -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
}
.ticker__track::-webkit-scrollbar { display: none; }
.ticker__item {
  flex: 0 0 auto; scroll-snap-align: start;
  display: grid; grid-template-columns: auto 50px; grid-template-rows: auto auto;
  gap: 3px 14px; align-items: center;
  min-width: 176px; padding: 12px 15px;
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: var(--ring), var(--e1), var(--gloss);
  transition: transform var(--t-mid) var(--ease-spring), box-shadow var(--t-mid) var(--ease-out);
}
.ticker__item:hover { transform: translateY(-2px); box-shadow: var(--ring), var(--e2), var(--gloss); }
.ticker__name { grid-column: 1; color: var(--muted); font-size: .688rem; font-weight: 640; letter-spacing: .06em; text-transform: uppercase; }
.ticker__row { grid-column: 1; display: flex; align-items: center; gap: 9px; }
.ticker__px { font: 660 .95rem/1.3 var(--mono); }
.ticker__spark { grid-column: 2; grid-row: 1 / -1; height: 30px; }

/* --- 8. Layout ---------------------------------------------------------- */
/* Eine zentrierte Spalte, gestapelte Flächen — wie eine Apple-Produktseite. */
.page { padding-block: 4px clamp(56px, 9vw, 104px); }
.layout { display: grid; gap: clamp(22px, 3vw, 36px); align-items: start; }
.col-main { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(22px, 3vw, 34px); }
.rail { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.view { min-width: 0; display: grid; gap: 16px; }

/* Zentrierter Auftakt mit großer, enger Headline. */
.intro {
  display: grid; gap: 16px; justify-items: center; text-align: center;
  padding-block: clamp(38px, 7vw, 88px) clamp(24px, 4vw, 46px);
}
.intro__title {
  max-width: 15ch;
  font-size: clamp(2.5rem, 6.4vw, 4.2rem);
  font-weight: 700; line-height: 1.04; letter-spacing: -.048em;
}
.intro__dek { max-width: 54ch; color: var(--muted); font-size: clamp(1.02rem, 2vw, 1.25rem); line-height: 1.5; }
.intro__actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }

/* Große Fläche im Apple-Zuschnitt. */
.tile, .panel.tile { padding: clamp(22px, 3.4vw, 40px); border-radius: var(--r-xl); }
.tile__lede { display: grid; gap: 10px; justify-items: center; text-align: center; margin-bottom: clamp(20px, 3vw, 32px); }
.tile__lede h2 { font-size: clamp(1.5rem, 3.4vw, 2.2rem); font-weight: 700; letter-spacing: -.04em; line-height: 1.1; }
.tile__lede p { max-width: 46ch; color: var(--muted); font-size: .95rem; }

.section-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
  padding: 8px 2px 18px;
}
.section-head__text { display: grid; gap: 6px; min-width: 0; }
.section-head h2 { font-size: clamp(1.4rem, 3vw, 1.75rem); font-weight: 700; letter-spacing: -.036em; }
.section-head__aside { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; padding-bottom: 3px; }

/* --- 9. Ansichtsumschaltung -------------------------------------------- */
.view:not([hidden]) { animation: viewIn var(--t-slow) var(--ease-out) both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(12px) scale(.994); } to { opacity: 1; transform: none; } }

.segmented {
  position: relative; isolation: isolate;
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  padding: 4px; margin: 6px 0 20px;
  border-radius: var(--r-full);
  background: var(--surface-3);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .07);
}
.segmented__thumb {
  position: absolute; z-index: -1; inset: 4px auto 4px 4px;
  width: calc((100% - 8px) / 3);
  border-radius: var(--r-full);
  background: var(--surface);
  box-shadow: var(--e1), var(--ring);
  transition: transform var(--t-mid) var(--ease-spring);
}
.segmented[data-active="1"] .segmented__thumb { transform: translateX(100%); }
.segmented[data-active="2"] .segmented__thumb { transform: translateX(200%); }
.segmented button {
  min-height: 38px; padding: 0 12px; border-radius: var(--r-full);
  color: var(--muted); font-size: .875rem; font-weight: 620; white-space: nowrap;
  transition: color var(--t-mid) var(--ease-out), transform var(--t-fast) var(--ease-spring);
}
.segmented button[aria-selected="true"] { color: var(--ink); }
.segmented button:active { transform: scale(.95); }

/* --- 10. Themen-Chips --------------------------------------------------- */
.chip-row {
  display: flex; gap: 9px; margin-bottom: 22px;
  overflow-x: auto; padding: 3px 2px 10px;
  scrollbar-width: none; scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}
.chip-row::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto; scroll-snap-align: start;
  display: inline-flex; align-items: center; gap: 7px;
  min-height: 40px; padding: 0 17px;
  border-radius: var(--r-full);
  background: var(--surface); color: var(--ink-2);
  font-size: .85rem; font-weight: 620;
  box-shadow: var(--ring), var(--e1), var(--gloss);
  transition: transform var(--t-fast) var(--ease-spring), box-shadow var(--t-mid) var(--ease-out), background var(--t-mid) var(--ease-out), color var(--t-mid) var(--ease-out);
}
.chip::before { content: "+"; font-weight: 600; color: var(--faint); transition: transform var(--t-mid) var(--ease-bounce), color var(--t-mid) var(--ease-out); }
.chip:hover { transform: translateY(-2px); box-shadow: var(--ring), var(--e2), var(--gloss); }
.chip:active { transform: scale(.94); }
.chip[aria-pressed="true"] { background: var(--accent-grad); color: var(--accent-ink); box-shadow: var(--e2), var(--gloss-dark); }
.chip[aria-pressed="true"]::before { content: "✓"; color: inherit; transform: scale(1.1); }

/* --- 11. Story-Karten --------------------------------------------------- */
.feed { display: grid; gap: 14px; }
.story {
  position: relative;
  padding: 20px;
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--ring), var(--e1), var(--gloss);
  animation: cardIn var(--t-slow) var(--ease-out) both;
  transition: transform var(--t-mid) var(--ease-spring), box-shadow var(--t-mid) var(--ease-out);
}
.story:hover { transform: translateY(-3px); box-shadow: var(--ring), var(--e3), var(--gloss); }
.story:active { transform: translateY(-1px) scale(.994); }
@keyframes cardIn { from { opacity: 0; transform: translateY(16px) scale(.985); } to { opacity: 1; transform: none; } }
.story:nth-child(2) { animation-delay: 55ms; }
.story:nth-child(3) { animation-delay: 110ms; }
.story:nth-child(4) { animation-delay: 165ms; }
.story:nth-child(n+5) { animation-delay: 220ms; }

.story__link { display: grid; gap: 10px; }
.story__top { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; color: var(--muted); font-size: .75rem; }
.story__top time { color: var(--faint); }
.story__head { font-size: 1.15rem; font-weight: 660; line-height: 1.28; letter-spacing: -.028em; }
.story__link:hover .story__head { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 4px; }
.story__dek { color: var(--muted); font-size: .888rem; line-height: 1.55; }
.story__tickers { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; }
.story__foot {
  display: flex; align-items: center; gap: 12px;
  margin-top: 16px; padding-top: 13px; border-top: 1px solid var(--line);
}
.story__foot .story__actions { margin-left: auto; }
.story__why { display: inline-flex; align-items: center; gap: 6px; color: var(--faint); font-size: .72rem; font-weight: 600; }
.story__why b { color: var(--muted); font-weight: 640; }

.story--lead { padding: 24px; box-shadow: var(--ring), var(--e2), var(--gloss); }
.story--lead .story__head {
  font-size: clamp(1.6rem, 4vw, 2.15rem);
  font-weight: 700; line-height: 1.1; letter-spacing: -.042em;
}
.story--lead .story__dek { font-size: .975rem; }

.story__actions { display: flex; gap: 4px; flex: 0 0 auto; }
.act {
  width: 38px; height: 38px; display: inline-grid; place-items: center;
  border-radius: var(--r-full); color: var(--faint);
  transition: transform var(--t-fast) var(--ease-spring), background var(--t-mid) var(--ease-out), color var(--t-mid) var(--ease-out);
}
.act:hover { background: var(--surface-2); color: var(--ink); transform: translateY(-1px); }
.act:active { transform: scale(.86); }
.act svg { width: 18px; height: 18px; }
.act[aria-pressed="true"] { color: var(--ink); background: var(--surface-3); }
.act[aria-pressed="true"] svg { fill: currentColor; animation: pop var(--t-mid) var(--ease-bounce); }
@keyframes pop { 0% { transform: scale(.7); } 55% { transform: scale(1.22); } 100% { transform: none; } }

/* --- 12. Panels --------------------------------------------------------- */
.panel {
  padding: 20px;
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--ring), var(--e1), var(--gloss);
  transition: box-shadow var(--t-mid) var(--ease-out);
}
.panel:hover { box-shadow: var(--ring), var(--e2), var(--gloss); }
.panel + .panel { margin-top: 16px; }
.panel__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 15px; }
.panel__head h2, .panel__head h3 { font-size: 1.02rem; font-weight: 680; letter-spacing: -.026em; }
.panel__note { margin-top: 15px; color: var(--faint); font-size: .72rem; line-height: 1.5; }
.panel__empty { padding: 28px 8px; color: var(--muted); font-size: .82rem; text-align: center; line-height: 1.55; }
.count-badge {
  min-width: 22px; height: 22px; padding-inline: 7px;
  display: inline-grid; place-items: center; border-radius: var(--r-full);
  background: var(--ink); color: var(--bg);
  font: 660 .688rem/1 var(--mono);
}

.wl { display: grid; }
.wl__row {
  display: grid; grid-template-columns: minmax(0, 1fr) 56px auto;
  gap: 12px; align-items: center;
  padding: 12px 10px; margin-inline: -10px; border-radius: var(--r-sm);
  transition: background var(--t-mid) var(--ease-out), transform var(--t-fast) var(--ease-spring);
}
.wl__row + .wl__row { box-shadow: 0 -1px 0 var(--line); }
.wl__row:hover { background: var(--surface-2); transform: translateX(3px); box-shadow: none; }
.wl__id { min-width: 0; display: grid; gap: 2px; }
.wl__sym { font: 680 .85rem/1.2 var(--mono); }
.wl__name { overflow: hidden; color: var(--muted); font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
.wl__spark { height: 28px; }
.wl__num { display: grid; gap: 4px; justify-items: end; }
.wl__px { font: 640 .82rem/1.2 var(--mono); }

.rank { display: grid; }
.rank a {
  display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 12px; align-items: center;
  padding: 12px 10px; margin-inline: -10px; border-radius: var(--r-sm);
  transition: background var(--t-mid) var(--ease-out), transform var(--t-fast) var(--ease-spring);
}
.rank li + li a { box-shadow: 0 -1px 0 var(--line); }
.rank a:hover { background: var(--surface-2); transform: translateX(3px); box-shadow: none; }
.rank__n { color: var(--faint); font: 620 .7rem/1 var(--mono); }
.rank__id { min-width: 0; display: grid; gap: 2px; }
.rank__sym { font: 680 .82rem/1.2 var(--mono); }
.rank__name { overflow: hidden; color: var(--muted); font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }

.heat { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.heat__cell {
  display: grid; gap: 4px; align-content: center;
  min-height: 76px; padding: 14px 13px; border-radius: var(--r-md);
  background: var(--surface-2); box-shadow: var(--ring);
  transition: transform var(--t-mid) var(--ease-spring);
}
.heat__cell:hover { transform: translateY(-2px); }
.heat__cell b { font-size: .78rem; font-weight: 640; }
.heat__cell span { font: 640 .78rem var(--mono); color: var(--muted); }
.heat__cell--up { background: var(--ink); }
.heat__cell--up b, .heat__cell--up span { color: var(--bg); }
.heat__cell--down { background: transparent; box-shadow: inset 0 0 0 1.5px var(--ink); }
.heat__cell--down span { color: var(--ink); }

.quick-grid { display: grid; gap: 9px; }
.quick-grid button {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 14px 16px; border-radius: var(--r-md);
  background: var(--surface-2); text-align: left;
  box-shadow: var(--ring);
  transition: transform var(--t-fast) var(--ease-spring), box-shadow var(--t-mid) var(--ease-out), background var(--t-mid) var(--ease-out), color var(--t-mid) var(--ease-out);
}
.quick-grid button:hover { transform: translateY(-2px); box-shadow: var(--ring), var(--e2); }
.quick-grid button:active { transform: scale(.97); }
.quick-grid button span { font: 680 .82rem var(--mono); }
.quick-grid button b { color: var(--muted); font-size: .72rem; font-weight: 620; }
.quick-grid button[aria-pressed="true"] { background: var(--accent-grad); color: var(--accent-ink); box-shadow: var(--e2), var(--gloss-dark); }
.quick-grid button[aria-pressed="true"] b { color: inherit; opacity: .72; }

/* --- 12b. Hero-Karte („Marktpuls“) -------------------------------------- */
.hero {
  position: relative; overflow: hidden;
  display: grid; gap: 12px;
  padding: 24px 24px 0; margin-bottom: 16px;
  border-radius: var(--r-xl);
  background: var(--accent-grad);
  color: var(--accent-ink);
  box-shadow: var(--e3), var(--gloss-dark);
}
.hero__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.hero__top .eyebrow { color: color-mix(in srgb, var(--accent-ink) 60%, transparent); }
.hero__top .pill {
  background: color-mix(in srgb, var(--accent-ink) 12%, transparent);
  color: color-mix(in srgb, var(--accent-ink) 78%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent-ink) 18%, transparent);
}
.hero__value { font-size: clamp(2.4rem, 8vw, 3.2rem); font-weight: 700; letter-spacing: -.05em; line-height: 1; }
.hero__row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.hero__row .delta {
  background: color-mix(in srgb, var(--accent-ink) 14%, transparent);
  color: color-mix(in srgb, var(--accent-ink) 82%, transparent);
  box-shadow: none;
}
.hero__row .delta--up { background: var(--accent-ink); color: var(--accent); }
.hero__row .delta--down { background: transparent; box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--accent-ink) 55%, transparent); color: var(--accent-ink); }
.hero__hint { color: color-mix(in srgb, var(--accent-ink) 52%, transparent); font-size: .75rem; }
.hero__chart { display: block; width: calc(100% + 48px); height: 110px; margin: 8px -24px 0; color: var(--accent-ink); }
.hero__grid line { stroke: color-mix(in srgb, var(--accent-ink) 12%, transparent); stroke-width: 1; }
.hero__chart .series { fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linejoin: round; vector-effect: non-scaling-stroke; }

/* --- 13. Hinweise / Anzeige --------------------------------------------- */
.notice {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 16px 18px; border-radius: var(--r-md);
  background: var(--surface); color: var(--muted);
  font-size: .78rem; line-height: 1.5;
  box-shadow: var(--ring), var(--e1), var(--gloss);
}
.notice strong { color: var(--ink); font-weight: 680; }
.notice__icon { flex: 0 0 auto; width: 17px; height: 17px; margin-top: 1px; }

.ad-slot {
  display: grid; gap: 7px; place-items: center;
  box-sizing: border-box; height: 196px; min-height: 196px; padding: 14px 24px; text-align: center;
  border-radius: var(--r-lg);
  background: transparent; color: var(--faint); font-size: .78rem;
  box-shadow: inset 0 0 0 1.5px var(--line);
}
.ad-slot__label { font-size: .625rem; font-weight: 680; letter-spacing: .16em; text-transform: uppercase; }
.ad-slot__viewport { width: min(100%, 320px); height: 100px; }
.ad-slot__viewport iframe { display: block; width: 100%; height: 100%; border: 0; }
.ad-slot__status { max-width: 34rem; margin: 0; }

/* --- 14. Detailseite ---------------------------------------------------- */
.inst-head { display: grid; gap: 20px; padding-top: 14px; }
.inst-id { display: flex; align-items: center; gap: 16px; min-width: 0; }
.monogram {
  width: 56px; height: 56px; flex: 0 0 auto;
  display: grid; place-items: center; border-radius: var(--r-md);
  background: var(--accent-grad); color: var(--accent-ink);
  font: 700 .78rem var(--mono);
  box-shadow: var(--e2), var(--gloss-dark);
}
.inst-head h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); font-weight: 700; letter-spacing: -.042em; line-height: 1.1; }
.inst-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 7px; color: var(--muted); font-size: .75rem; }
.inst-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.quote {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin-top: 22px; padding: 24px;
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--ring), var(--e2), var(--gloss);
}
.quote__px { font-size: clamp(2.4rem, 6.6vw, 3.4rem); font-weight: 700; letter-spacing: -.052em; line-height: 1; }
.quote__meta { width: 100%; margin-top: 4px; color: var(--faint); font-size: .75rem; line-height: 1.5; }

.chart-card {
  margin-top: 16px; border-radius: var(--r-lg); overflow: hidden;
  background: var(--surface); box-shadow: var(--ring), var(--e2), var(--gloss);
}
.chart-card__bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 14px; border-bottom: 1px solid var(--line);
}
.range { display: flex; gap: 3px; overflow-x: auto; scrollbar-width: none; }
.range::-webkit-scrollbar { display: none; }
.range button {
  flex: 0 0 auto; min-height: 34px; padding: 0 14px; border-radius: var(--r-full);
  color: var(--muted); font: 620 .75rem var(--mono);
  transition: background var(--t-mid) var(--ease-out), color var(--t-mid) var(--ease-out), transform var(--t-fast) var(--ease-spring);
}
.range button:hover { background: var(--surface-2); color: var(--ink); }
.range button:active { transform: scale(.93); }
.range button[aria-pressed="true"] { background: var(--accent-grad); color: var(--accent-ink); box-shadow: var(--e1), var(--gloss-dark); }
.chart-tools { display: flex; gap: 4px; }
.chart-frame { display: block; width: 100%; height: auto; color: var(--ink); }
.chart-frame .grid-line { stroke: var(--line); stroke-width: 1; }
.chart-frame .series { fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.chart-frame .series-fill { fill: url(#seriesFade); }
.chart-frame .watermark { fill: var(--faint); font: 660 20px var(--sans); opacity: .4; }

.stat-strip { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.stat-strip div {
  display: grid; gap: 5px; padding: 16px; border-radius: var(--r-md);
  background: var(--surface); box-shadow: var(--ring), var(--e1), var(--gloss);
}
.stat-strip dt { color: var(--muted); font-size: .72rem; font-weight: 600; }
.stat-strip dd { font: 660 1rem var(--mono); }

.data-section { display: grid; gap: 14px; }
.data-section h2 { font-size: 1.15rem; font-weight: 700; letter-spacing: -.03em; }
.kv { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.kv > div { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.kv > div, .kv > dt, .kv > dd { padding: 12px 0; border-bottom: 1px solid var(--line); }
.kv > div:last-child, .kv > dt:last-of-type, .kv > dd:last-of-type { border-bottom: 0; }
.kv dt { color: var(--muted); font-size: .82rem; }
.kv dd { font: 640 .82rem var(--mono); text-align: right; }

.provenance {
  padding: 16px 18px; border-radius: var(--r-md);
  background: var(--surface-2); color: var(--muted); font-size: .78rem; line-height: 1.55;
}
.provenance strong { display: block; margin-bottom: 5px; color: var(--ink); font-weight: 680; }
.steps { display: grid; gap: 12px; }

.tabular {
  width: 100%; margin-top: 16px; font-size: .8rem; table-layout: fixed;
  border-radius: var(--r-md); overflow: hidden;
  background: var(--surface); box-shadow: var(--ring), var(--e1);
}
.tabular caption { padding: 15px 18px 6px; color: var(--muted); font-size: .72rem; text-align: left; }
.tabular th, .tabular td { padding: 13px 18px; border-bottom: 1px solid var(--line); text-align: right; }
.tabular tr:last-child td { border-bottom: 0; }
.tabular th:first-child, .tabular td:first-child { text-align: left; }
.tabular th { color: var(--muted); font-size: .688rem; font-weight: 640; letter-spacing: .07em; text-transform: uppercase; }
.tabular td { font-family: var(--mono); }
.tabular td:first-child { font-family: var(--sans); }

/* --- 15. Footer --------------------------------------------------------- */
.foot { margin-top: 68px; padding-block: 44px 32px; border-top: 1px solid var(--line); }
.foot__grid { display: grid; gap: 30px; }
.foot__about { max-width: 380px; color: var(--muted); font-size: .82rem; line-height: 1.6; }
.foot__about .brand { margin-bottom: 14px; }
.foot__nav { display: grid; gap: 11px; align-content: start; }
.foot__nav b { font-size: .72rem; font-weight: 660; letter-spacing: .09em; text-transform: uppercase; color: var(--faint); }
.foot__nav a { color: var(--muted); font-size: .85rem; transition: color var(--t-mid) var(--ease-out); }
.foot__nav a:hover { color: var(--ink); }
.foot__legal { margin-top: 32px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--faint); font-size: .72rem; line-height: 1.6; }

/* --- 16. Schwebende Tableiste ------------------------------------------- */
.tabbar {
  position: fixed; z-index: 70;
  inset: auto 0 max(12px, env(safe-area-inset-bottom, 0px)) 0;
  width: min(100% - 24px, 380px); margin-inline: auto;
  isolation: isolate;
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  padding: 6px; border-radius: var(--r-full);
  background: var(--glass);
  backdrop-filter: saturate(200%) blur(28px);
  -webkit-backdrop-filter: saturate(200%) blur(28px);
  box-shadow: var(--e-pop), inset 0 1px 0 var(--glass-line), 0 0 0 1px var(--line);
}
.tabbar__thumb {
  position: absolute; z-index: -1; inset: 6px auto 6px 6px;
  width: calc((100% - 12px) / 3);
  border-radius: var(--r-full);
  background: var(--surface-3);
  transition: transform var(--t-mid) var(--ease-spring);
}
.tabbar[data-active="1"] .tabbar__thumb { transform: translateX(100%); }
.tabbar[data-active="2"] .tabbar__thumb { transform: translateX(200%); }
.tabbar a, .tabbar button {
  position: relative;
  display: grid; place-items: center; gap: 4px;
  min-height: 54px; padding: 6px 2px; border-radius: var(--r-full);
  color: var(--faint); font-size: .625rem; font-weight: 620;
  transition: color var(--t-mid) var(--ease-out), transform var(--t-fast) var(--ease-spring);
}
.tabbar a:active, .tabbar button:active { transform: scale(.9); }
.tabbar svg { width: 21px; height: 21px; transition: transform var(--t-mid) var(--ease-bounce); }
.tabbar [aria-current="page"], .tabbar [aria-selected="true"] { color: var(--ink); }
.tabbar [aria-selected="true"] svg, .tabbar [aria-current="page"] svg { transform: translateY(-1px) scale(1.08); }
.tabbar__badge {
  position: absolute; top: 5px; left: 50%; margin-left: 4px;
  min-width: 16px; height: 16px; padding-inline: 4px;
  display: grid; place-items: center; border-radius: var(--r-full);
  background: var(--ink); color: var(--bg); font: 660 .563rem/1 var(--mono);
  box-shadow: 0 0 0 2px var(--glass);
}

/* --- 17. Toast ---------------------------------------------------------- */
.toast {
  position: fixed; z-index: 90;
  left: 50%; bottom: calc(var(--tabbar-h) + 24px);
  display: flex; align-items: center; gap: 20px;
  width: max-content; max-width: min(92vw, 460px);
  padding: 15px 22px; border-radius: var(--r-full);
  background: var(--accent-grad); color: var(--accent-ink);
  box-shadow: var(--e-pop), var(--gloss-dark);
  font-size: .82rem;
  animation: toastIn var(--t-mid) var(--ease-bounce) both;
}
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 26px) scale(.92); } to { opacity: 1; transform: translate(-50%, 0) scale(1); } }
.toast { transform: translate(-50%, 0); }
.toast button { color: inherit; font-weight: 680; text-decoration: underline; text-underline-offset: 4px; }

/* --- 18. Rechtstexte ---------------------------------------------------- */
.legal-page { max-width: 780px; display: grid; gap: 30px; padding-top: 16px; }
.legal-page h1 { font-size: clamp(2rem, 5.4vw, 2.9rem); font-weight: 700; letter-spacing: -.045em; line-height: 1.05; }
.legal-page h2 { font-size: 1.3rem; font-weight: 700; letter-spacing: -.032em; }
.legal-page p { color: var(--ink-2); font-size: .938rem; line-height: 1.7; }
.legal-page code { padding: 3px 7px; border-radius: 7px; background: var(--surface-2); font: .85em var(--mono); }
.legal-page h3 { font-size: 1.02rem; font-weight: 680; letter-spacing: -.02em; }
/* Der globale Reset in §1 nimmt allen Listen die Zeichen. In einer
 * Widerrufsbelehrung ist die Nummer aber der Bezug: "nach Ziffer 3" steht so
 * im Gesetzestext. Hier bekommen Listen ihre Zeichen zurueck, nur hier. */
.legal-page ol, .legal-page ul { padding-left: 1.35em; list-style: revert; }
.legal-page li {
  margin-bottom: 7px; color: var(--ink-2);
  font-size: .938rem; line-height: 1.7;
}
.legal-page li:last-child { margin-bottom: 0; }
.legal-page li::marker { color: var(--muted); }
/* Die Subprozessorenliste. `.tabular` passt hier nicht: die ist rechtsbuendig
 * und einbreit fuer Kurse gebaut, hier steht Fliesstext in den Zellen.
 * Der Rahmen scrollt fuer sich, damit die Seite auf dem Telefon nicht
 * seitlich wandert. */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.legal-table { width: 100%; min-width: 460px; font-size: .875rem; }
.legal-table th, .legal-table td {
  padding: 11px 14px 11px 0; border-bottom: 1px solid var(--line);
  text-align: left; vertical-align: top; line-height: 1.55;
}
.legal-table th {
  color: var(--muted); font-size: .688rem; font-weight: 640;
  letter-spacing: .07em; text-transform: uppercase;
}
.legal-table td { color: var(--ink-2); }
.legal-table tr:last-child td { border-bottom: 0; }
.legal-page .form-block {
  padding: 18px; border: 1px dashed var(--line-strong); border-radius: var(--r-md);
  font: .875rem/1.75 var(--mono); color: var(--ink-2); white-space: pre-wrap;
}
.legal-page .data-section {
  padding: 24px; border-radius: var(--r-lg);
  background: var(--surface); box-shadow: var(--ring), var(--e1), var(--gloss);
}
.section-spaced { padding-top: 0; }

/* RevenueCat is isolated to the pricing page; the SDK itself is loaded only there. */
.rc-page { display: grid; gap: 22px; }
.rc-plans { display: grid; gap: 16px; }
.rc-plans .data-section { padding: 24px; }
.rc-plans h2 { margin-top: 0; }
.rc-subscription { display: grid; gap: 14px; }
.rc-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.rc-status { margin: 0; color: var(--muted); }
.rc-status[data-kind="success"], [data-rc-entitlement][data-active="true"] { color: #08783e; }
.rc-status[data-kind="warning"] { color: #8a5600; }
.rc-status[data-kind="error"] { color: #b42318; }
.rc-paywall:empty { display: none; }
.rc-paywall:not(:empty) { min-height: 480px; overflow: clip; }

/* --- 19. Breakpoints ---------------------------------------------------- */
@media (min-width: 720px) {
  .rc-plans { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .foot__grid { grid-template-columns: 1.4fr 1fr 1fr; }
  .inst-head { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
  .heat { grid-template-columns: repeat(4, 1fr); }
  .story { padding: 24px; }
  .story--lead { padding: 28px; }
}

@media (min-width: 900px) {
  :root { --topbar-h: 56px; }
  /* Exakt auf die Fenstermitte gesetzt, unabhängig von Marke und Suchfeld. */
  .nav-primary { display: flex; position: absolute; left: 50%; transform: translateX(-50%); margin: 0; }
  .search { flex: 0 1 264px; height: 38px; margin-left: auto; }
  .icon-btn { width: 38px; height: 38px; }
  .tabbar { display: none; }
  body { padding-bottom: 0 !important; }
  .toast { bottom: 28px; }
  .segmented { display: none; }
  .topbar__title { display: none; }
  .heat { grid-template-columns: repeat(3, 1fr); }
}

/* Zwischen Tablet und Desktop rücken Navigation und Suchfeld enger zusammen,
   damit die mittig gesetzte Navigation nie unter das Suchfeld läuft. */
@media (min-width: 900px) and (max-width: 1099px) {
  .nav-primary { gap: 20px; }
  .search { flex: 0 1 172px; }
}

@media (min-width: 1080px) {
  .layout { grid-template-columns: minmax(0, 1fr) 348px; }
  .rail { position: sticky; top: calc(var(--topbar-h) + 20px); }
  .story--lead .story__head { font-size: 2.2rem; }
}

@media (max-width: 899px) {
  .search { max-width: none; }
  body { padding-bottom: calc(var(--tabbar-h) + 18px); }
  .ticker__item { min-width: 162px; }
  /* iOS-Muster: das Suchfeld weicht dem kompakten Titel, sobald gescrollt wird. */
  .topbar .search { transition: opacity var(--t-mid) var(--ease-out), transform var(--t-mid) var(--ease-spring); }
  .topbar[data-condensed="true"] .search { opacity: 0; transform: scale(.96); pointer-events: none; }
}

@media (max-width: 480px) {
  .hide-sm { display: none !important; }
  .brand { font-size: .94rem; }
  .brand__mark { margin-right: 9px; }
  .story--lead .story__head { font-size: 1.62rem; }
  .tabular th, .tabular td { padding-inline: 8px; overflow-wrap: anywhere; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  [data-reveal="on"] .reveal { opacity: 1; transform: none; }
  .story:hover, .chip:hover, .panel:hover, .ticker__item:hover, .heat__cell:hover { transform: none; }
}

@media (prefers-contrast: more) {
  :root { --line: rgba(0, 0, 0, .4); --muted: #2c2c2e; --faint: #3a3a3c; }
  .pill, .btn, .icon-btn, .chip { box-shadow: inset 0 0 0 1.5px var(--line-strong); }
}

/* --- 19b. Stimmungsskala -------------------------------------------------
   Schwarz auf Weiß wie alles hier: die fünf Bänder unterscheiden sich in der
   Dichte, nicht in der Farbe. Ein Ampelbild würde die Zahl deuten, bevor sie
   gelesen ist — und gedeutet wird sie unten in Worten, einmal. */
.gauge { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.gauge__dial { width: min(320px, 100%); height: auto; display: block; }
.gauge__band { fill: var(--ink); }
.gauge__band--1 { fill-opacity: .30; }
.gauge__band--2 { fill-opacity: .19; }
.gauge__band--3 { fill-opacity: .10; }
.gauge__band--4 { fill-opacity: .19; }
.gauge__band--5 { fill-opacity: .30; }
.gauge__needle line { stroke: var(--ink); stroke-width: 4; stroke-linecap: round; }
/* Der Winkel steht als SVG-Attribut am Element, nicht als Stil: `style-src
   'self'` gilt, und ein Präsentationsattribut ist kein Inline-Stil. Es bildet
   trotzdem auf `transform` ab, deshalb greift der Übergang darauf — und
   deshalb darf hier keine `transform`-Regel stehen, die es überschreiben
   würde. Die Nabe ist der Drehpunkt und steckt im Attribut. */
.gauge__hub { fill: var(--ink); }
.gauge[data-ready] .gauge__needle { transition: transform .9s cubic-bezier(.32, .72, 0, 1); }
.gauge__read { display: flex; align-items: baseline; gap: 10px; margin: 0; }
.gauge__value { font-size: 2.4rem; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.gauge__band-name { color: var(--muted); }
.gauge__history { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 18px; margin: 14px 0 0; }
.gauge__history > div { display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); padding-top: 8px; }
.gauge__history dt { color: var(--muted); }
.gauge__history dd { margin: 0; font-variant-numeric: tabular-nums; }
.gauge__note { color: var(--faint); margin: 12px 0 0; font-size: .82rem; }

@media (prefers-reduced-motion: reduce) {
  .gauge[data-ready] .gauge__needle { transition: none; }
}

/* --- 20. Rendering-Budget ----------------------------------------------- */
.ad-slot, .foot { content-visibility: auto; }
.ad-slot { contain-intrinsic-size: auto 196px; }
.foot { contain-intrinsic-size: auto 300px; }

/* --- Trefferliste der Suche --------------------------------------------
 *
 * Sie hängt unter der Kopfleiste statt im Feld: Ein Listenelement in einem
 * <label> wäre ungültiges Markup und würde jeden Klick zum Fokussieren des
 * Feldes umdeuten. Positioniert gegen .topbar__row, die dafür schon
 * `position: relative` trägt.
 */
.search-results {
  position: absolute; top: calc(100% - 6px); right: 0; z-index: 70;
  width: min(440px, 100%); max-height: min(60vh, 26rem); overflow-y: auto;
  margin: 0; padding: 6px; list-style: none;
  border-radius: var(--r-lg, 16px);
  background: var(--bg); box-shadow: var(--ring), var(--e3, 0 18px 40px rgb(0 0 0 / .18));
  overscroll-behavior: contain;
}
.search-results[hidden] { display: none; }
.search-results__item { border-radius: 12px; }
.search-results__item[data-active],
.search-results__item:hover { background: var(--surface-2); }
.search-results__link {
  display: flex; flex-direction: column; gap: 2px;
  padding: 9px 12px; color: inherit; text-decoration: none;
}
.search-results__name { font-weight: 600; font-size: .9rem; }
.search-results__also { font-weight: 400; color: var(--muted); }
.search-results__meta { font-size: .74rem; color: var(--faint); font-family: var(--mono); }

@media (max-width: 720px) {
  .search-results { left: 0; right: 0; width: auto; }
}
