/* =========================================================================
   albert-einstein.info — Design System
   Self-hosted fonts · light/dark themes · editorial science layout
   ========================================================================= */

/* ---------- Fonts (self-hosted, GDPR-friendly) ---------- */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/inter-var-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+2074,
    U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215;
}
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/fraunces-var-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+2074,
    U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215;
}

/* ---------- Theme tokens ---------- */
:root {
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;

  /* Light theme (warm paper) */
  --bg: #faf8f3;
  --bg-soft: #f2efe7;
  --bg-elevated: #ffffff;
  --surface: #ffffff;
  --surface-2: #f6f3ec;
  --ink: #1c1b19;
  --ink-soft: #4a4742;
  --ink-faint: #6f6b63;
  --line: #e3ddd1;
  --line-strong: #d2cabb;
  --accent: #2f5fd0;
  --accent-ink: #234aa8;
  --accent-soft: #e7edfb;
  --gold: #b9871f;
  --gold-soft: #f4e9cf;
  /* Gedankenlabor: festes Farbpaar Beobachter A (Bahnsteig/Erde) und B (Zug/Rakete) in ALLEN Experimenten */
  --beob-a: #1f8a7e; --beob-a-soft: #d7efec; --beob-b: #d4573f; --beob-b-soft: #f8e1dc;
  --danger: #c0392b;
  --shadow-sm: 0 1px 2px rgba(28, 27, 25, .06), 0 2px 8px rgba(28, 27, 25, .05);
  --shadow-md: 0 8px 24px rgba(28, 27, 25, .10), 0 2px 6px rgba(28, 27, 25, .06);
  --shadow-lg: 0 24px 60px rgba(28, 27, 25, .16);
  --radius: 14px;
  --radius-lg: 22px;
  --radius-sm: 9px;
  --maxw: 1180px;
  --readw: 720px;
  --header-h: 64px;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #0d1017;
  --bg-soft: #11151f;
  --bg-elevated: #161b27;
  --surface: #161b27;
  --surface-2: #1c2230;
  --ink: #eef1f6;
  --ink-soft: #b9c1d0;
  --ink-faint: #8a93a6;
  --line: #262d3c;
  --line-strong: #313a4d;
  --accent: #7aa2ff;
  --accent-ink: #a9c2ff;
  --accent-soft: #18233d;
  --gold: #e8b84b;
  --gold-soft: #2a2415;
  --beob-a: #4cc3b4; --beob-a-soft: #12302d; --beob-b: #f08166; --beob-b-soft: #3a1f19;
  --danger: #ff6b5e;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, .45);
  --shadow-lg: 0 30px 70px rgba(0, 0, 0, .55);
  color-scheme: dark;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
  font-size: 1.0625rem;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background-color .4s ease, color .4s ease;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: var(--accent-ink); text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
::selection { background: color-mix(in srgb, var(--accent) 30%, transparent); }

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: clamp(1.1rem, 4vw, 2.5rem); }
/* Vorlese-Leiste als EIGENSTÄNDIGER Container (nicht .wrap) → gleiche Inhaltsbreite wie der Content,
   ohne mit konkurrierenden .wrap-Regeln zu kollidieren. */
.ra-band { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: clamp(1.1rem, 4vw, 2.5rem); }
.read { max-width: var(--readw); margin-inline: auto; }
.section { padding-block: clamp(3rem, 8vw, 6rem); }
.section--tight { padding-block: clamp(2rem, 5vw, 3.5rem); }
.section--alt { background: var(--bg-soft); }
.divider { height: 1px; background: var(--line); border: 0; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.12; letter-spacing: -.01em; color: var(--ink); }
h1 { font-size: clamp(2.3rem, 6vw, 4rem); font-weight: 600; }
h2 { font-size: clamp(1.8rem, 4vw, 2.75rem); }
h3 { font-size: clamp(1.3rem, 2.6vw, 1.7rem); }
h4 { font-size: 1.15rem; font-family: var(--font-sans); font-weight: 700; letter-spacing: 0; }
p { margin-block: 0 1.1em; }
.read p, .read ul, .read ol { font-size: 1.09rem; }
.lead { font-size: clamp(1.15rem, 2.2vw, 1.4rem); line-height: 1.55; color: var(--ink-soft); font-weight: 400; }
strong, b { font-weight: 650; color: var(--ink); }
.read ul, .read ol { padding-left: 1.3em; margin-block: 0 1.2em; }
.read li { margin-block: .35em; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .5em;
  font-family: var(--font-sans); font-weight: 600; font-size: .82rem;
  letter-spacing: .14em; text-transform: uppercase; color: var(--accent-ink);
}
.eyebrow::before { content: ""; width: 1.6em; height: 2px; background: var(--accent); display: inline-block; }
.section-head { max-width: 760px; margin-bottom: clamp(1.5rem, 4vw, 2.5rem); }
.section-head .lead { margin-top: .7em; }
.muted { color: var(--ink-faint); }
mark { background: color-mix(in srgb, var(--gold) 28%, transparent); color: inherit; padding: 0 .15em; border-radius: 3px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease, background-color .3s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); box-shadow: var(--shadow-sm); }
.nav {
  height: var(--header-h);
  display: flex; align-items: center; gap: .55rem;
  max-width: var(--maxw); margin-inline: auto;
  padding-inline: clamp(1rem, 3vw, 2rem);
}
.brand { display: inline-flex; align-items: center; gap: .6rem; min-width: 0; font-family: var(--font-display); font-weight: 600; font-size: 1.18rem; color: var(--ink); text-decoration: none; letter-spacing: -.01em; white-space: nowrap; }
.brand > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.brand .brand-mark {
  width: 34px; height: 34px; flex: none; border-radius: 50%;
  display: grid; place-items: center; color: #fff; font-family: var(--font-display); font-weight: 600; font-size: 1.05rem;
  background: radial-gradient(120% 120% at 30% 20%, #4f7ae6, var(--accent) 60%, var(--accent-ink));
  box-shadow: var(--shadow-sm);
}
.brand small { display: block; font-family: var(--font-sans); font-weight: 500; font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint); }
.nav-spacer { flex: 1 1 auto; }
.nav-links { display: flex; align-items: center; gap: .1rem; list-style: none; padding: 0; margin: 0; }
.nav-links a {
  display: inline-block; padding: .45rem .6rem; border-radius: 9px; white-space: nowrap;
  color: var(--ink-soft); text-decoration: none; font-weight: 500; font-size: .93rem;
  transition: background-color .2s, color .2s;
}
.nav-links a:hover { background: var(--surface-2); color: var(--ink); }
.nav-links a[aria-current="page"] { color: var(--accent-ink); background: var(--accent-soft); }
.nav-tools { display: flex; align-items: center; gap: .4rem; flex: none; }
/* On narrow phones, the brand tagline can push the language switcher / theme
   toggle / menu off the right edge — hide the tagline so the controls stay put. */
@media (max-width: 480px) { .brand small { display: none; } }

/* dropdown (Explore + Language) */
.menu { position: relative; }
.menu-btn, .icon-btn {
  display: inline-flex; align-items: center; gap: .35rem; white-space: nowrap;
  height: 40px; padding: 0 .6rem; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); color: var(--ink-soft); font-weight: 500; font-size: .9rem;
  transition: border-color .2s, background-color .2s, color .2s;
}
.icon-btn { width: 40px; padding: 0; justify-content: center; }
.menu-btn:hover, .icon-btn:hover { border-color: var(--line-strong); color: var(--ink); background: var(--surface-2); }
.menu-btn.is-current { color: var(--accent-ink); background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 32%, var(--line)); }
.menu-btn svg, .icon-btn svg { width: 18px; height: 18px; }
.menu-panel {
  position: absolute; right: 0; top: calc(100% + .5rem);
  min-width: 19rem; max-width: min(24rem, calc(100vw - 2rem)); background: var(--bg-elevated); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: .5rem;
  opacity: 0; visibility: hidden; transform: translateY(-6px) scale(.98); transform-origin: top right;
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
  max-height: min(70vh, 540px); overflow-y: auto;
}
.menu.open .menu-panel { opacity: 1; visibility: visible; transform: none; }
/* Tür „Sein Leben“ (06.11.2026): Überblick + 13 Kapitel in drei Gruppen, auf breiten Schirmen zweispaltig */
.menu-panel--breit { max-width: min(40rem, calc(100vw - 2rem)); max-height: min(78vh, 640px); }
@media (min-width: 900px) { .menu-panel--breit { display: grid; grid-template-columns: 1fr 1fr; gap: 0 .5rem; min-width: 34rem; } }
.mp-gruppe { display: flex; flex-direction: column; }
.mp-gruppe + .mp-gruppe { margin-top: .25rem; }
.kompass-knopf[hidden] { display: none; }
.menu-panel a, .menu-panel button {
  display: flex; align-items: center; gap: .6rem; width: 100%; text-align: left;
  padding: .55rem .7rem; border-radius: 9px; border: 0; background: none;
  color: var(--ink-soft); text-decoration: none; font-size: .95rem; font-weight: 500;
}
.menu-panel a:hover, .menu-panel button:hover { background: var(--surface-2); color: var(--ink); }
.menu-panel a[aria-current="page"], .menu-panel [aria-pressed="true"] { color: var(--accent-ink); background: var(--accent-soft); }
.menu-panel .mp-emoji { font-size: 1.1rem; width: 1.4em; text-align: center; }
.menu-panel .mp-label { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.menu-panel .mp-label small { color: var(--ink-faint); font-size: .76rem; font-weight: 500; white-space: normal; }
.menu-group-title { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint); padding: .5rem .7rem .25rem; font-weight: 600; }

.theme-toggle { display: inline-grid; place-items: center; }
/* Sonne und Mond liegen übereinander: das gehende dreht weg und schrumpft, das kommende dreht herein */
.theme-toggle svg { grid-area: 1 / 1; transition: opacity .25s, rotate .35s cubic-bezier(.2,.7,.2,1), scale .35s cubic-bezier(.2,.7,.2,1); }
.theme-toggle .sun { opacity: 0; rotate: 40deg; scale: .5; }
[data-theme="dark"] .theme-toggle .sun { opacity: 1; rotate: 0deg; scale: 1; }
[data-theme="dark"] .theme-toggle .moon { opacity: 0; rotate: -40deg; scale: .5; }

/* mobile nav toggle */
.nav-burger { display: none; }
.reading-progress { position: absolute; left: 0; bottom: -1px; height: 3px; width: 0; background: linear-gradient(90deg, var(--accent), var(--gold)); transition: width .1s linear; }

@media (max-width: 1180px) {
  .nav-links { display: none; }
  .nav-burger { display: inline-flex; }
  .nav-links.is-open {
    display: flex; flex-direction: column; align-items: stretch; gap: .1rem;
    position: absolute; top: var(--header-h); left: 0; right: 0;
    background: var(--bg-elevated); border-bottom: 1px solid var(--line);
    padding: .8rem clamp(1.1rem, 4vw, 2.5rem) 1.2rem; box-shadow: var(--shadow-md);
  }
  .nav-links.is-open a { padding: .7rem .8rem; font-size: 1.02rem; }
  /* Gruppen-Dropdowns im Burger-Menü: im Fluss aufklappen (Akkordeon) statt als
     absolutes Desktop-Overlay, das Menüpunkte und Inhalt überdeckt. */
  .nav-links.is-open .menu { position: static; }
  .nav-links.is-open .menu-btn { width: 100%; justify-content: space-between; }
  .nav-links.is-open .menu-panel {
    position: static; display: none;
    opacity: 1; visibility: visible; transform: none; transition: none;
    min-width: 0; max-height: none;
    border: 0; box-shadow: none; background: none;
    padding: .15rem 0 .5rem .6rem;
  }
  .nav-links.is-open .menu.open .menu-panel { display: block; }
  .nav-links.is-open .menu-panel a { white-space: normal; }
}

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding-top: clamp(2rem, 5vw, 3.5rem); }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(60% 50% at 85% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%),
    radial-gradient(50% 60% at 0% 100%, color-mix(in srgb, var(--gold) 14%, transparent), transparent 70%);
}
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
.hero h1 { margin-bottom: .4em; }
.hero h1 .accent { background: linear-gradient(120deg, var(--accent), var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-portrait { position: relative; }
.hero-portrait img { width: 100%; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.hero-portrait .credit { margin-top: .6rem; }
.hero-badges { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.6rem; }
.badge {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .4rem .8rem; border-radius: 999px; background: var(--surface);
  border: 1px solid var(--line); font-size: .9rem; font-weight: 500; color: var(--ink-soft);
  box-shadow: var(--shadow-sm);
}
.badge b { color: var(--ink); font-weight: 650; }
a.badge { text-decoration: none; transition: border-color .2s, box-shadow .2s, transform .2s; }
a.badge:hover, a.badge:focus-visible { border-color: var(--accent); box-shadow: var(--shadow-md); transform: translateY(-1px); }
@media (prefers-reduced-motion: reduce) { a.badge:hover, a.badge:focus-visible { transform: none; } }
@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-portrait { max-width: 360px; margin-inline: auto; order: -1; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .8rem 1.3rem; border-radius: 12px; font-weight: 600; font-size: 1rem;
  text-decoration: none; border: 1px solid transparent; transition: transform .15s, box-shadow .2s, background-color .2s;
}
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--accent-ink); transform: translateY(-2px); box-shadow: var(--shadow-md); }
/* Dunkel: Weiß auf Hellblau hatte nur 2,5 : 1 (Nacharbeit 06.11.2026) → dunkle Schrift, ≈ 7 : 1 */
[data-theme="dark"] .btn-primary, [data-theme="dark"] .to-top { color: #0d1530; }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--surface-2); transform: translateY(-2px); }
.btn-row { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.8rem; }

/* ---------- Figures & image credits (legally required, shown at image) ---------- */
figure { margin: 0; }
.figure { margin-block: clamp(1.6rem, 4vw, 2.4rem); }
.figure img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow-md); background: var(--surface-2); }
.figure figcaption { margin-top: .65rem; }
.figure .cap { font-size: .96rem; color: var(--ink-soft); line-height: 1.5; }
.credit {
  font-size: .76rem; color: var(--ink-faint); line-height: 1.45; margin-top: .3rem;
  display: block;
}
.credit a { color: var(--ink-faint); text-decoration-color: color-mix(in srgb, var(--ink-faint) 40%, transparent); }
.credit a:hover { color: var(--ink-soft); }
.credit .lic { white-space: nowrap; }
.figure--float { float: right; width: min(42%, 380px); margin: .4rem 0 1.2rem 1.8rem; }
.figure--wide img { width: 100%; }
@media (max-width: 640px) {
  .figure--float { float: none; width: 100%; margin: 1.6rem 0; }
}

/* ---------- Source / citation block ---------- */
.sources {
  margin-top: 1rem; padding: .55rem .9rem; border-left: 3px solid var(--accent);
  background: var(--accent-soft); border-radius: 0 9px 9px 0;
  font-size: .82rem; color: var(--ink-soft);
}
.sources b { font-weight: 650; color: var(--ink); }
.sources ol, .sources ul { margin: .2rem 0 0; padding-left: 1.2rem; }
.sources li { margin: .15rem 0; }
.sources a { word-break: break-word; }
.ref { font-size: .72em; vertical-align: super; line-height: 0; color: var(--accent-ink); font-weight: 700; text-decoration: none; padding: 0 .1em; }
.ref:hover { text-decoration: underline; }

/* ---------- Cards / fact grid ---------- */
.grid { display: grid; gap: clamp(1rem, 2.5vw, 1.6rem); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 860px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(1.1rem, 2.5vw, 1.6rem); box-shadow: var(--shadow-sm);
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.card.is-link:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }
.card h3 { font-size: 1.25rem; margin-bottom: .35em; }
.card .card-emoji { font-size: 1.7rem; display: block; margin-bottom: .5rem; }
.card p { color: var(--ink-soft); font-size: .98rem; margin-bottom: 0; }
a.card { text-decoration: none; color: inherit; display: block; }
a.card .more { color: var(--accent-ink); font-weight: 600; font-size: .92rem; margin-top: .8rem; display: inline-flex; gap: .3rem; align-items: center; }
/* card with a cover image on top + the source named directly on the image */
.card--media { padding: 0; overflow: hidden; }
.card--media .card__body { padding: clamp(1.1rem, 2.5vw, 1.6rem); }
.card__media { position: relative; display: block; background: var(--surface-2); }
.card__media img { width: 100%; aspect-ratio: 16 / 10; height: auto; object-fit: cover; object-position: center 28%; display: block; }
.card__credit { position: absolute; left: 0; right: 0; bottom: 0; font-size: .6rem; line-height: 1.3; color: rgba(255,255,255,.92);
  background: linear-gradient(transparent, rgba(0,0,0,.62)); padding: .9rem .55rem .35rem; }
.card-cell { display: flex; flex-direction: column; }
.card-cell > .card { flex: 1 1 auto; }
.card-credit { display: block; margin: .5rem .3rem 0; line-height: 1.4; }

/* stat */
.stat { text-align: center; }
.stat .num { font-family: var(--font-display); font-weight: 600; font-size: clamp(2.2rem, 6vw, 3.4rem); color: var(--accent-ink); line-height: 1; letter-spacing: -.02em; }
.stat .lbl { color: var(--ink-soft); font-size: .95rem; margin-top: .4rem; }

/* ---------- Pull quote ---------- */
.pullquote {
  margin: clamp(2rem, 5vw, 3rem) auto; max-width: 820px; text-align: center;
  font-family: var(--font-display); font-size: clamp(1.5rem, 3.4vw, 2.2rem);
  line-height: 1.32; font-weight: 500; color: var(--ink); position: relative;
}
.pullquote::before { content: "\201C"; font-size: 3em; line-height: 0; color: var(--gold); display: block; margin-bottom: .15em; }
.pullquote cite { display: block; font-family: var(--font-sans); font-style: normal; font-size: 1rem; font-weight: 600; color: var(--ink-faint); margin-top: 1rem; letter-spacing: .02em; }
.pullquote cite small { display: block; font-weight: 500; color: var(--ink-faint); }

/* ---------- Callout / deep dive ---------- */
.callout {
  border: 1px solid var(--line); border-left: 4px solid var(--gold);
  background: var(--surface); border-radius: var(--radius); padding: 1.2rem 1.4rem;
  margin-block: 1.8rem; box-shadow: var(--shadow-sm);
}
.callout .callout-title { font-family: var(--font-sans); font-weight: 700; font-size: 1.15rem; line-height: 1.3; color: var(--gold); display: flex; align-items: center; gap: .5rem; margin-bottom: .5rem; }
.callout p:last-child { margin-bottom: 0; }
.callout--accent { border-left-color: var(--accent); }
.callout--accent .callout-title { color: var(--accent-ink); }

details.deep { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); margin-block: 1.4rem; overflow: hidden; box-shadow: var(--shadow-sm); }
details.deep > summary { list-style: none; cursor: pointer; padding: 1rem 1.3rem; font-weight: 650; display: flex; align-items: center; gap: .7rem; color: var(--ink); }
details.deep > summary::-webkit-details-marker { display: none; }
details.deep > summary > .chev { margin-left: auto; flex: none; display: inline-flex; transition: transform .25s; color: var(--ink-faint); }
details.deep > summary > .chev svg { width: 20px; height: 20px; display: block; }
details.deep[open]:not([data-schliesst]) > summary > .chev { transform: rotate(180deg); }
details.deep > summary .tag { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--gold); font-weight: 700; }
details.deep .deep-body { padding: 0 1.3rem 1.2rem; }
details.deep .deep-body > *:first-child { margin-top: 0; }

/* ---------- Timeline (centered line, alternating left/right) ---------- */
.timeline { position: relative; margin-top: 2rem; padding: 0; list-style: none; }
.timeline::before { content: ""; position: absolute; left: 50%; transform: translateX(-50%); top: 6px; bottom: 6px; width: 2px; background: var(--line-strong); }
.tl-item { position: relative; width: 50%; box-sizing: border-box; padding-bottom: 2.2rem; }
.tl-item:nth-child(odd)  { left: 0;   text-align: right; padding-right: 2.7rem; }
.tl-item:nth-child(even) { left: 50%; text-align: left;  padding-left: 2.7rem; }
.tl-item::before {
  content: ""; position: absolute; top: 4px; width: 17px; height: 17px; border-radius: 50%;
  background: var(--bg); border: 3px solid var(--accent); box-shadow: 0 0 0 4px var(--bg);
}
.tl-item:nth-child(odd)::before  { right: -8.5px; }
.tl-item:nth-child(even)::before { left: -8.5px; }
.tl-item.feature::before { border-color: var(--gold); background: var(--gold-soft); box-shadow: 0 0 0 4px var(--bg), 0 0 0 7px color-mix(in srgb, var(--gold) 22%, transparent); }
.tl-item .tl-year { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; color: var(--accent-ink); }
.tl-item h3 { font-size: 1.16rem; margin: .1rem 0 .3rem; }
.tl-item p { color: var(--ink-soft); margin-bottom: .3rem; font-size: .96rem; }
.tl-item .figure { margin: .8rem 0 .2rem; max-width: 270px; }
.tl-item:nth-child(odd) .figure { margin-left: auto; }   /* hug the centre line */
.tl-item .figure img { border-radius: 12px; }
.tl-item .figure figcaption { margin-top: .45rem; }
.tl-item .figure .cap { font-size: .88rem; }

/* timeline era headers (centered over the line) */
.tl-era { margin: clamp(2.4rem, 5vw, 3.6rem) 0 1rem; text-align: center; }
.tl-era:first-child { margin-top: .3rem; }
.tl-era .eyebrow { justify-content: center; margin-bottom: .3rem; }
.tl-era h2 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); }
.tl-era p { color: var(--ink-soft); margin: .35rem auto 0; max-width: 56ch; }

/* stack to a single left-aligned column on narrow screens */
@media (max-width: 760px) {
  .timeline::before { left: 19px; transform: none; }
  .tl-item, .tl-item:nth-child(odd), .tl-item:nth-child(even) { width: 100%; left: 0; text-align: left; padding: 0 0 1.8rem 3.4rem; }
  .tl-item::before, .tl-item:nth-child(odd)::before, .tl-item:nth-child(even)::before { left: 12px; right: auto; }
  .tl-item:nth-child(odd) .figure { margin-left: 0; }
  .tl-item .figure { max-width: 340px; }
}

/* ---------- Step reveal sequence ---------- */
.steps { counter-reset: step; display: grid; gap: 1rem; margin-top: 1.5rem; }
.step { display: grid; grid-template-columns: auto 1fr; gap: 1rem 1.1rem; align-items: start; padding: 1.1rem 1.2rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.step::before { counter-increment: step; content: counter(step); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; }
.step .step-title { font-family: var(--font-sans); font-weight: 700; font-size: 1.12rem; line-height: 1.3; margin-bottom: .2rem; color: var(--ink); }
.step p { margin: 0; color: var(--ink-soft); font-size: .98rem; }

/* ---------- Interactive widgets ---------- */
.widget { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(1.3rem, 3vw, 2rem); box-shadow: var(--shadow-md); margin-block: 2rem; }
.widget h3 { display: flex; align-items: center; gap: .6rem; }
.widget .widget-tag { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); font-weight: 700; margin-bottom: .3rem; }
.field-row { display: flex; flex-wrap: wrap; gap: 1.2rem; align-items: flex-end; margin-top: 1rem; }
.field { flex: 1 1 200px; }
.field label { display: block; font-size: .85rem; font-weight: 600; color: var(--ink-soft); margin-bottom: .35rem; }
.field input[type="number"], .field input[type="text"], .field select {
  width: 100%; padding: .65rem .8rem; border: 1px solid var(--line-strong); border-radius: 10px;
  background: var(--bg); color: var(--ink); font: inherit; font-size: 1rem;
}
input[type="range"] { width: 100%; accent-color: var(--accent); height: 28px; }
.range-val { font-family: var(--font-display); font-weight: 600; color: var(--accent-ink); }
.result-box { margin-top: 1.2rem; padding: 1rem 1.2rem; border-radius: 12px; background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent); }
.result-box .big { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.4rem, 4vw, 2rem); color: var(--accent-ink); line-height: 1.15; }
.result-box .sub { color: var(--ink-soft); font-size: .9rem; margin-top: .3rem; }
.chip-row { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.chip { padding: .4rem .8rem; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--bg); font-size: .88rem; font-weight: 500; color: var(--ink-soft); transition: all .15s; }
.chip:hover { border-color: var(--accent); color: var(--accent-ink); }
.chip.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* equation display */
.equation { font-family: var(--font-display); text-align: center; font-size: clamp(1.8rem, 5vw, 3rem); margin-block: 1.5rem; color: var(--ink); letter-spacing: .01em; }
.equation .var { color: var(--accent-ink); }
.equation sub, .equation sup { font-size: .55em; }
.formula { font-family: var(--font-display); font-style: italic; }

/* light-speed / comparison bar */
.bars { display: grid; gap: .7rem; margin-top: 1.2rem; }
.bar-row { display: grid; grid-template-columns: 130px 1fr auto; gap: .8rem; align-items: center; font-size: .9rem; }
.bar-track { height: 12px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent), var(--gold)); width: 0; transition: width 1.2s cubic-bezier(.2,.7,.2,1); }
@media (max-width: 520px) { .bar-row { grid-template-columns: 92px 1fr; } .bar-row .bar-num { grid-column: 2; text-align: right; } }

/* ---------- Pager (prev / next) ---------- */
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 3rem; }
.pager a { text-decoration: none; padding: 1.1rem 1.3rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); transition: transform .15s, box-shadow .2s, border-color .2s; display: block; }
.pager a:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }
.pager small { display: block; color: var(--ink-faint); font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 600; }
.pager .pg-title { display: block; font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; color: var(--ink); margin-top: .25rem; }
.pager .next { text-align: right; }
@media (max-width: 560px) { .pager { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--bg-soft); border-top: 1px solid var(--line); padding-block: clamp(2.5rem, 6vw, 4rem) 2rem; margin-top: 2rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2rem; }
.footer-grid h2 { font-family: var(--font-sans); font-weight: 600; font-size: .82rem; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-faint); margin-bottom: .9rem; line-height: 1.3; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: .5rem; }
.footer-grid a { color: var(--ink-soft); text-decoration: none; font-size: .95rem; }
.footer-grid a:hover { color: var(--accent-ink); text-decoration: underline; }
.footer-about p { color: var(--ink-soft); font-size: .95rem; max-width: 32ch; }
.footer-bottom { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: center; margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); color: var(--ink-faint); font-size: .85rem; }
.footer-bottom a { color: var(--ink-faint); }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 460px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); will-change: opacity, transform; }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .08s; }
.reveal[data-delay="2"] { transition-delay: .16s; }
.reveal[data-delay="3"] { transition-delay: .24s; }
.reveal[data-delay="4"] { transition-delay: .32s; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

/* ---------- Word-by-word reveal (quotes, leads, intro headings) ---------- */
.wsplit .word { display: inline-block; white-space: pre-wrap; }
.wsplit .word > span {
  display: inline-block; opacity: 0; transform: translateY(-0.5em) rotate(-3deg);
  transition: opacity .55s ease, transform .55s cubic-bezier(.2,.7,.2,1);
  transition-delay: var(--d, 0ms); will-change: opacity, transform;
}
.wsplit.in .word > span { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .wsplit .word > span { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* ---------- Light-clock time-dilation animation ---------- */
.lightclock { margin-top: 1rem; }
.lightclock canvas {
  width: 100%; height: auto; display: block; border-radius: var(--radius);
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 10%, var(--surface-2)), var(--surface-2));
  border: 1px solid var(--line);
}
.lc-readout { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; margin-top: .9rem; }
.lc-cell { text-align: center; padding: .7rem .6rem; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.lc-cell .lc-emoji { font-size: 1.3rem; }
.lc-cell .lc-num { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.5rem, 5vw, 2.1rem); line-height: 1; color: var(--accent-ink); margin: .15rem 0; }
.lc-cell.rocket .lc-num { color: var(--gold); }
.lc-cell .lc-lbl { font-size: .82rem; color: var(--ink-soft); }
.lc-controls { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; margin-top: 1rem; }
.lc-controls .btn-mini { display: inline-flex; align-items: center; gap: .4rem; padding: .45rem .9rem; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--bg); font-weight: 600; font-size: .9rem; color: var(--ink-soft); }
.lc-controls .btn-mini:hover { border-color: var(--accent); color: var(--accent-ink); }

/* back to top */
.to-top { position: fixed; right: 1.1rem; bottom: 1.1rem; z-index: 80; width: 46px; height: 46px; border-radius: 50%; background: var(--accent); color: #fff; border: 0; display: grid; place-items: center; box-shadow: var(--shadow-md); opacity: 0; visibility: hidden; transform: translateY(10px); transition: all .25s; }
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top svg { width: 20px; height: 20px; }

/* ---------- Misc helpers ---------- */
.center { text-align: center; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 1rem; } .mt-2 { margin-top: 2rem; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--accent); color: #fff; padding: .6rem 1rem; border-radius: 0 0 8px 0; z-index: 200; }
.skip-link:focus { left: 0; }
.tag-pill { display: inline-block; font-size: .75rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--accent-ink); background: var(--accent-soft); padding: .2rem .6rem; border-radius: 999px; }
.kicker-row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: 1rem; }
.note { font-size: .9rem; color: var(--ink-faint); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* data table */
.table-wrap { overflow-x: auto; margin-block: 1.5rem; border: 1px solid var(--line); border-radius: var(--radius); }
table.data { width: 100%; border-collapse: collapse; font-size: .95rem; }
table.data th, table.data td { padding: .7rem .9rem; text-align: left; border-bottom: 1px solid var(--line); }
table.data thead th { background: var(--surface-2); font-weight: 650; color: var(--ink); position: sticky; top: 0; }
table.data tbody tr:hover { background: var(--surface-2); }
table.data td:first-child { font-weight: 600; white-space: nowrap; color: var(--accent-ink); }

/* ---------- Glossary: marked terms + tooltip ---------- */
.gloss {
  color: inherit; text-decoration: none; cursor: help;
  border-bottom: 1.5px dashed color-mix(in srgb, var(--accent) 55%, var(--line-strong));
  transition: background-color .15s, border-color .15s;
}
.gloss:hover, .gloss:focus-visible {
  border-bottom-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  border-radius: 3px;
}
.gloss-tip {
  position: fixed; z-index: 200; max-width: 290px;
  background: var(--bg-elevated); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: var(--shadow-lg); padding: .75rem .9rem;
  font-size: .9rem; color: var(--ink-soft); line-height: 1.5;
  opacity: 0; visibility: hidden; transform: translateY(4px);
  transition: opacity .16s ease, transform .16s ease, visibility .16s;
  pointer-events: none;
}
.gloss-tip.show { opacity: 1; visibility: visible; transform: none; pointer-events: auto; }
.gloss-tip .gt-img { display: block; width: 100%; height: auto; max-height: 240px; object-fit: contain; border-radius: 8px; margin-bottom: .55rem; background: var(--bg-2, rgba(128,128,128,.12)); }
/* invisible bridge so the mouse can travel from the word to the tooltip without losing hover */
.gloss-tip::before { content: ""; position: absolute; left: -10px; right: -10px; top: 100%; height: 16px; }
.gloss-tip.below::before { top: auto; bottom: 100%; }
.gloss-tip .gt-title { color: var(--ink); font-family: var(--font-sans); font-weight: 700; }
.gloss-tip .gt-link { display: block; margin-top: .55rem; font-weight: 600; color: var(--accent-ink); text-decoration: none; font-size: .85rem; }
.gloss-tip .gt-link:hover { text-decoration: underline; }
.gloss-card h3 { font-size: 1.15rem; }
.gloss-cell { display: flex; flex-direction: column; }
.gloss-cell .gloss-card { flex: 1 1 auto; padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.gloss-thumb { display: block; position: relative; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.gloss-thumb img { width: 100%; aspect-ratio: 16 / 10; height: auto; object-fit: cover; object-position: center 28%; display: block; }
.gloss-thumb__credit { position: absolute; left: 0; right: 0; bottom: 0; font-size: .58rem; line-height: 1.25;
  color: rgba(255,255,255,.92); background: linear-gradient(transparent, rgba(0,0,0,.68)); padding: .85rem .5rem .3rem;
  pointer-events: none; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.gloss-thumb--ph { display: grid; place-items: center; aspect-ratio: 16 / 10; color: var(--gold);
  background: radial-gradient(120% 130% at 50% 0%, color-mix(in srgb, var(--gold) 12%, transparent), transparent 62%), var(--surface-2); }
.gloss-thumb--ph svg { width: 56%; height: auto; opacity: .5; transition: opacity .25s, transform .5s var(--ease); }
.gloss-card:hover .gloss-thumb--ph svg { opacity: .65; transform: rotate(8deg); }
.gloss-card-body { display: block; padding: clamp(1.05rem, 2.4vw, 1.5rem); }
.gloss-card-body h3 { margin-top: 0; }
.gloss-card-body .more { margin-top: .8rem; }
.gloss-credit { display: block; margin: .5rem .3rem 0; line-height: 1.4; }

/* ---------- News feed ---------- */
.news-grid { display: grid; gap: 1.3rem; grid-template-columns: repeat(2, 1fr); }
@media (max-width: 680px) { .news-grid { grid-template-columns: 1fr; } }
.news-cell { display: flex; flex-direction: column; }
.news-cell .news-card { flex: 1 1 auto; padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.news-thumb { display: block; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.news-thumb img { width: 100%; aspect-ratio: 16 / 9; height: auto; object-fit: cover; object-position: center 28%; display: block; transition: transform .5s var(--ease); }
.news-card:hover .news-thumb img { transform: scale(1.04); }
.news-card-body { display: flex; flex-direction: column; gap: .4rem; padding: clamp(1.05rem, 2.4vw, 1.4rem); flex: 1; }
.news-date { font-family: var(--font-sans); font-size: .74rem; letter-spacing: .09em; text-transform: uppercase; color: var(--gold); font-weight: 700; }
.news-card-body h3 { margin: 0; font-size: 1.12rem; line-height: 1.3; }
.news-card-body p { margin: 0; color: var(--ink-soft); font-size: .93rem; }
.news-card-body .more { margin-top: auto; padding-top: .3rem; color: var(--gold); font-weight: 600; font-size: .85rem; }
.news-card-body .more svg { width: 1.05em; height: 1.05em; flex: none; }
.news-sources__list svg { width: .9em; height: .9em; flex: none; }
.news-credit { display: block; margin: .5rem .3rem 0; line-height: 1.4; }
/* News list card is a <div> (not one big <a>): the image links to detail and carries its
   full linked credit directly beneath it; the title is a separate link. Clip the thumb so
   its hover-zoom never creeps over the credit. */
.news-thumb { overflow: hidden; }
.news-thumb-link { display: block; }
.news-card-media .news-credit { margin: .5rem .9rem .1rem; }
.news-card-body h3 a { color: inherit; text-decoration: none; }
.news-card-body h3 a:hover { color: var(--gold); }
.news-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }
.news-date + h1 { margin-top: .15rem; }
.news-sources { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--gold); border-radius: var(--radius); padding: 1.1rem 1.3rem; margin-top: 2.2rem; }
.news-sources__h { font-size: 1.15rem; margin: 0 0 .7rem; }
.news-sources__list { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.news-sources__list a { font-weight: 600; text-decoration: none; }
.news-sources__list a:hover { text-decoration: underline; }
.news-src-tag { font-weight: 400; color: var(--ink-faint); font-size: .9em; }

/* ---------- Image lightbox ---------- */
.figure img, .hero-portrait img { cursor: zoom-in; }
.lightbox {
  position: fixed; inset: 0; z-index: 300; display: grid; place-items: center;
  padding: clamp(1rem, 4vmin, 3rem);
  background: rgba(8, 10, 16, .88); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  opacity: 0; visibility: hidden; transition: opacity .2s ease, visibility .2s;
}
.lightbox.open { opacity: 1; visibility: visible; }
.lb-figure { margin: 0; display: flex; flex-direction: column; align-items: center; max-width: 96vw; max-height: 92vh; }
.lb-img {
  max-width: 96vw; max-height: 80vh; width: auto; height: auto;
  border-radius: 10px; box-shadow: 0 24px 70px rgba(0, 0, 0, .6); background: #fff;
}
.lb-cap { margin-top: 1rem; max-width: min(760px, 94vw); text-align: center; font-size: .95rem; line-height: 1.5; color: #e7e9ee; }
.lb-cap .cap { display: block; color: #eef1f6; margin-bottom: .25rem; }
.lb-cap .credit { display: block; color: #aab2c2; font-size: .82rem; }
.lb-cap .credit a, .lb-cap a { color: #cdd5e6; }
.lb-cap .credit a:hover, .lb-cap a:hover { color: #fff; }
.lb-close {
  position: fixed; top: 1rem; right: 1rem; z-index: 1; width: 46px; height: 46px;
  border-radius: 50%; border: 0; background: rgba(255, 255, 255, .14); color: #fff;
  font-size: 1.7rem; line-height: 1; cursor: pointer; display: grid; place-items: center;
}
.lb-close:hover { background: rgba(255, 255, 255, .26); }
@media (prefers-reduced-motion: reduce) { .lightbox { transition: none; } }

/* hr ornament */
.orn { border: 0; text-align: center; margin-block: 2.5rem; color: var(--gold); }
.orn::before { content: "·  ·  ·"; letter-spacing: .6em; font-size: 1.2rem; }

/* print */
@media print {
  .site-header, .to-top, .pager, .nav-tools, .ra-bar { display: none; }
  body { background: #fff; color: #000; }
}

/* =========================================================================
   Read-aloud player (AI voice) — sits at the top of the article, whole page.
   The card is a TRIGGER: click loads its audio into the ONE global sticky bar (.ra-bar)
   pinned under the header; it keeps playing across page changes, collapses on stop (X),
   and a new audio stops a running one. Logic in main.js; <noscript> keeps a plain inline player.
   ========================================================================= */
.readaloud { margin: 1.6rem 0 1.9rem; }
.readaloud__btn { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; width: 100%;
  text-align: left; color: inherit; font: inherit; cursor: pointer;
  padding: .55rem .8rem; background: var(--surface-2);
  border: 1px solid color-mix(in srgb, var(--ink) 12%, transparent); border-radius: var(--radius);
  transition: border-color .15s ease, background-color .15s ease; }
.readaloud__btn:hover { border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.readaloud__ico { display: inline-flex; color: var(--accent); flex: 0 0 auto; }
/* Label+Dauer links (wächst), KI-Notiz rechts direkt vor dem Play. */
.readaloud__label { flex: 1 1 auto; font-size: .95rem; font-weight: 700; color: var(--ink); }
.readaloud__dur { font-weight: 400; color: var(--ink-faint); font-size: .82rem; }
.readaloud__note { flex: 0 0 auto; font-size: .72rem; color: var(--ink-faint); text-align: right; }
/* Play/Pause-Glyph rechts — spiegelt den Balken-Zustand (JS toggelt .is-playing am Button). */
.readaloud__play { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; color: var(--accent); }
.readaloud__play::before { content: ""; display: block; width: 0; height: 0;
  border-style: solid; border-width: 6px 0 6px 11px; border-color: transparent transparent transparent currentColor; }
.readaloud__btn.is-playing .readaloud__play::before { display: none; }
.readaloud__btn.is-playing .readaloud__play::after { content: ""; display: block; width: 10px; height: 12px;
  border-left: 3px solid currentColor; border-right: 3px solid currentColor; }
.readaloud__audio { height: 38px; flex: 1 1 220px; min-width: 190px; max-width: 460px; }
@media (max-width: 540px) { .readaloud__audio { flex-basis: 100%; max-width: none; } }

/* Global sticky read-aloud bar (created by main.js, appended to <body>). */
.ra-bar { position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 90;
  display: flex; justify-content: center; align-items: center; padding: .5rem clamp(.7rem, 4vw, 1.6rem);
  background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -4px 20px rgba(0, 0, 0, .12);
  transition: transform .28s ease, opacity .6s ease; }
.ra-bar[hidden] { display: none; }
/* Nach 10 s Ruhe faehrt die Leiste sanft zum Rand weg (main.js planeWeg, Niels 2026-09-24, wie
   heimseiten.de); 3 s lang holt die Maus sie am Rand zurueck. transform statt Hoehe: die Seite springt nicht. */
.ra-bar.is-weg { transform: translateY(calc(100% + 12px)); opacity: 0; pointer-events: none;
  transition: transform .6s cubic-bezier(.4, 0, .2, 1), opacity .6s ease; }
.ra-bar.is-weg.is-oben { transform: translateY(calc(-100% - 12px)); }
.ra-bar__inner { display: flex; align-items: center; gap: .55rem; width: 100%; max-width: var(--maxw); }
.ra-bar__ico { flex: 0 0 auto; display: inline-flex; color: var(--accent); }
.ra-bar__skip { flex: 0 0 auto; font: inherit; font-size: .72rem; font-weight: 700; color: var(--ink-faint);
  background: none; border: 1px solid var(--line); border-radius: 5px; padding: .18rem .38rem; min-width: 1.9rem; cursor: pointer; }
.ra-bar__skip:hover { color: var(--ink); border-color: var(--ink); }
.ra-bar__play { flex: 0 0 auto; width: 2rem; height: 2rem; display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 50%; background: var(--accent); color: #fff; font-size: .78rem; line-height: 1; cursor: pointer; }
.ra-bar__play:hover { filter: brightness(1.08); }
.ra-bar__body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: .22rem; }
.ra-bar__label { display: block; min-width: 0; max-width: 100%; font-size: .82rem; font-weight: 600; color: var(--ink); text-decoration: none;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ra-bar__label:hover { text-decoration: underline; }
.ra-bar__seek { position: relative; height: 8px; background: var(--line); border-radius: 4px; cursor: pointer; touch-action: none; }
.ra-bar__played { position: absolute; left: 0; top: 0; height: 100%; width: 0; background: var(--accent); border-radius: 4px; }
.ra-bar__knob { position: absolute; top: 50%; left: 0; width: 13px; height: 13px; margin-left: -6px; transform: translateY(-50%);
  background: var(--accent); border: 2px solid var(--surface); border-radius: 50%; box-shadow: 0 0 2px rgba(0, 0, 0, .3); }
.ra-bar__seek:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ra-bar__time { flex: 0 0 auto; font-size: .76rem; color: var(--ink-faint); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ra-bar__audio { display: none; }
.ra-bar__close { flex: 0 0 auto; background: transparent; border: 0; font-size: 1.5rem; line-height: 1;
  color: var(--ink-faint); cursor: pointer; padding: 0 .25rem; }
.ra-bar__close:hover { color: var(--ink); }
@media (max-width: 560px) { .ra-bar__label { display: none; } }
@media (max-width: 400px) { .ra-bar__skip { display: none; } }
@media (prefers-reduced-motion: reduce) { .ra-bar, .ra-bar.is-weg { transition: none; } }

/* Sanfte Seitenübergänge (View Transitions), wie heimseiten.de (Niels 2026-09-24) */
@view-transition { navigation: auto; }
/* ohne main-Präfix — die Pseudo-Elemente hängen am Wurzelelement (Niels 2026-09-24) */
::view-transition-old(root) { animation: fade-out 0.4s ease forwards; }
::view-transition-new(root) { animation: fade-in 0.4s ease forwards; }
@keyframes fade-out { to { opacity: 0; } }
@keyframes fade-in { from { opacity: 0; } }
