/* ==========================================================================
   Stasi-Kompass — Archival Reading Room ("Lesesaal" Light & Dark)
   Zero external assets: self-hosted OFL-1.1 WOFF2 fonts & pure CSS styling.
   ========================================================================== */

/* ---------- Self-Hosted Fonts (latin-ext + latin) ---------- */
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/source-serif-4-latin-ext-400-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C4,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/source-serif-4-latin-400-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'Source Serif 4';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/source-serif-4-latin-ext-400-italic.woff2') format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C4,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: 'Source Serif 4';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/source-serif-4-latin-400-italic.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../assets/fonts/source-serif-4-latin-ext-600-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C4,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../assets/fonts/source-serif-4-latin-600-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../assets/fonts/source-serif-4-latin-ext-700-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C4,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../assets/fonts/source-serif-4-latin-700-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/ibm-plex-sans-latin-ext-400-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/ibm-plex-sans-latin-400-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../assets/fonts/ibm-plex-sans-latin-ext-500-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../assets/fonts/ibm-plex-sans-latin-500-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../assets/fonts/ibm-plex-sans-latin-ext-600-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../assets/fonts/ibm-plex-sans-latin-600-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../assets/fonts/ibm-plex-sans-latin-ext-700-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../assets/fonts/ibm-plex-sans-latin-700-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/ibm-plex-mono-latin-ext-400-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/ibm-plex-mono-latin-400-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../assets/fonts/ibm-plex-mono-latin-ext-500-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../assets/fonts/ibm-plex-mono-latin-500-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

/* Metric-matched local fallback fonts to minimize font-swap CLS */
@font-face {
  font-family: 'Source Serif 4 Fallback';
  src: local('Georgia'), local('Times New Roman');
  size-adjust: 93%;
  ascent-override: 111.4%;
  descent-override: 36%;
  line-gap-override: 0%;
}
@font-face {
  font-family: 'IBM Plex Sans Fallback';
  src: local('Arial'), local('Helvetica Neue'), local('Liberation Sans');
  size-adjust: 102%;
  ascent-override: 100.5%;
  descent-override: 27%;
  line-gap-override: 0%;
}
@font-face {
  font-family: 'IBM Plex Mono Fallback';
  src: local('Menlo'), local('Consolas'), local('Courier New');
  size-adjust: 100%;
  ascent-override: 102.5%;
  descent-override: 27.5%;
  line-gap-override: 0%;
}

/* ---------- Design Tokens ---------- */
:root,
[data-theme="light"] {
  --bg-paper: #F5F1E8;
  --bg-paper-deep: #EBE4D6;
  --bg-card: #FDFCFA;
  --bg-inset: #F8F4EC;
  --bg-header: rgba(253, 252, 250, 0.94);

  --border-archival: #DDD5C7;
  --border-strong: #C6BCA9;

  --ink-primary: #1C1B19;
  --ink-secondary: #3A3733;
  --ink-muted: #57534C;

  --accent-burgundy: #7C2D23;
  --accent-burgundy-hover: #602119;
  --accent-burgundy-soft: #F7EAE7;
  --accent-burgundy-border: #D9B4AD;

  --accent-sage: #2B5642;
  --accent-sage-soft: #EAF2ED;
  --accent-sage-border: #B3CDBE;

  --accent-slate: #2F4B63;
  --accent-slate-soft: #ECF1F6;
  --accent-slate-border: #B6C8D8;

  --accent-ochre: #8A621C;
  --accent-ochre-soft: #F9F2E2;
  --accent-ochre-border: #E0CAA0;

  --figure-stage: #22201E;
  --figure-ink: #EAE4D8;

  --font-serif: 'Source Serif 4', 'Source Serif 4 Fallback', Georgia, serif;
  --font-sans: 'IBM Plex Sans', 'IBM Plex Sans Fallback', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', 'IBM Plex Mono Fallback', ui-monospace, SFMono-Regular, Menlo, monospace;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --shadow-card: 0 2px 10px rgba(28, 27, 25, 0.045), 0 1px 2px rgba(28, 27, 25, 0.04);
  --shadow-elevated: 0 8px 24px rgba(28, 27, 25, 0.08);

  --max-width: 1100px;
  --reading-width: 820px;
  --transition-fast: 150ms ease;
}

[data-theme="dark"] {
  --bg-paper: #141619;
  --bg-paper-deep: #1D2025;
  --bg-card: #1B1E23;
  --bg-inset: #22262C;
  --bg-header: rgba(20, 22, 25, 0.94);

  --border-archival: #2F343D;
  --border-strong: #434A57;

  --ink-primary: #EAE4D8;
  --ink-secondary: #CCC5B8;
  --ink-muted: #9E988D;

  --accent-burgundy: #DC8577;
  --accent-burgundy-hover: #EAA397;
  --accent-burgundy-soft: #2E1F1D;
  --accent-burgundy-border: #6E3A32;

  --accent-sage: #7CC29F;
  --accent-sage-soft: #1B2B23;
  --accent-sage-border: #3B6650;

  --accent-slate: #89B3D6;
  --accent-slate-soft: #1B2530;
  --accent-slate-border: #3B556B;

  --accent-ochre: #DFB56B;
  --accent-ochre-soft: #2C2416;
  --accent-ochre-border: #6A532A;

  --figure-stage: #0F1114;
  --figure-ink: #EAE4D8;

  --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.28);
  --shadow-elevated: 0 10px 28px rgba(0, 0, 0, 0.42);
}

/* ---------- Reset & Base Typography ---------- */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-paper);
  color: var(--ink-primary);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  color: var(--ink-primary);
  line-height: 1.26;
  margin-top: 0;
  font-weight: 700;
}

p {
  margin-top: 0;
  margin-bottom: 1rem;
}

a {
  color: var(--accent-burgundy);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--accent-burgundy-hover);
}

button, input, select {
  font-family: inherit;
}

button {
  cursor: pointer;
}

:focus-visible {
  outline: 3px solid var(--accent-slate);
  outline-offset: 2px;
}

.mono {
  font-family: var(--font-mono);
  font-size: 0.85em;
  overflow-wrap: anywhere;
}

.muted-note {
  color: var(--ink-muted);
  font-size: 0.88rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

main:focus,
h1[tabindex="-1"]:focus,
h2[tabindex="-1"]:focus,
section[tabindex="-1"]:focus,
.glossary-card[tabindex="-1"]:focus,
.explanation-heading[tabindex="-1"]:focus {
  outline: none;
}

.noscript-notice {
  margin-bottom: 1.25rem;
}

/* ---------- Skip Link & Sticky Topbar ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink-primary);
  color: var(--bg-card);
  padding: 0.75rem 1.1rem;
  z-index: 1000;
  border-radius: 0 0 var(--radius-sm) 0;
  text-decoration: none;
  font-weight: 600;
}

.skip-link:hover,
.skip-link:focus {
  color: var(--bg-card);
}

.skip-link:focus {
  left: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-header);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-archival);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--ink-primary);
  background: none;
  border: none;
  padding: 0.15rem 0;
  text-align: left;
}

.brand-mark {
  width: 6px;
  height: 36px;
  border-radius: 2px;
  background: var(--accent-burgundy);
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-title {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-primary);
}

.brand-subtitle {
  font-size: 0.74rem;
  color: var(--ink-muted);
  letter-spacing: 0.01em;
}

.header-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}

.main-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
}

.nav-btn {
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 0.44rem 0.72rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-secondary);
  text-decoration: none;
  transition: background-color var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}

.nav-btn:hover {
  background: var(--bg-paper-deep);
  color: var(--ink-primary);
}

.nav-btn.is-active {
  background: var(--accent-burgundy-soft);
  color: var(--accent-burgundy);
  border-color: var(--accent-burgundy-border);
  font-weight: 600;
}

.utility-controls {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding-left: 0.5rem;
  border-left: 1px solid var(--border-archival);
}

.util-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--bg-inset);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 0.36rem 0.62rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--ink-primary);
  transition: background-color var(--transition-fast), border-color var(--transition-fast);
}

.util-btn:hover {
  background: var(--bg-paper-deep);
}

/* ---------- Main Container ---------- */
main {
  flex: 1 0 auto;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.25rem 3.5rem;
}

.reading-shell {
  max-width: var(--reading-width);
  margin: 0 auto;
}

/* ---------- Shared Buttons, Badges & Progress ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.62rem 1.1rem;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 600;
  border: 1px solid transparent;
  text-decoration: none;
  transition: background-color var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

.btn-primary {
  background: var(--accent-burgundy);
  color: #FDFCFA;
  border-color: var(--accent-burgundy);
}

[data-theme="dark"] .btn-primary {
  color: #141619;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--accent-burgundy-hover);
  border-color: var(--accent-burgundy-hover);
  color: #FDFCFA;
}

[data-theme="dark"] .btn-primary:hover,
[data-theme="dark"] .btn-primary:focus-visible {
  color: #141619;
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--ink-primary);
  border-color: var(--border-strong);
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
  background: var(--bg-paper-deep);
  color: var(--ink-primary);
}

.btn-subtle {
  background: transparent;
  color: var(--ink-muted);
  border-color: transparent;
  padding: 0.4rem 0.65rem;
  font-size: 0.85rem;
}

.btn-subtle:hover {
  color: var(--ink-primary);
  background: var(--bg-paper-deep);
}

.btn-full {
  width: 100%;
}

.btn-inline-sm {
  padding: 0.36rem 0.72rem;
  font-size: 0.84rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 600;
  border: 1px solid var(--border-strong);
  background: var(--bg-inset);
  color: var(--ink-secondary);
}

a.badge {
  text-decoration: none;
  transition: background-color var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

a.badge:hover {
  background: var(--bg-paper-deep);
  border-color: var(--accent-burgundy-border);
  color: var(--accent-burgundy);
}

.badge-done {
  background: var(--accent-sage-soft);
  color: var(--accent-sage);
  border-color: var(--accent-sage-border);
}

.badge-reflection {
  background: var(--accent-slate-soft);
  color: var(--accent-slate);
  border-color: var(--accent-slate-border);
}

.badge-jargon {
  background: var(--accent-ochre-soft);
  color: var(--accent-ochre);
  border-color: var(--accent-ochre-border);
}

.badge-official {
  background: var(--accent-burgundy-soft);
  color: var(--accent-burgundy);
  border-color: var(--accent-burgundy-border);
}

.notice-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.52rem;
  border-radius: var(--radius-sm);
  font-size: 0.74rem;
  font-weight: 600;
  background: var(--accent-ochre-soft);
  color: var(--accent-ochre);
  border: 1px solid var(--accent-ochre-border);
}

.sig-pill {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 0.14rem 0.48rem;
  border-radius: 4px;
  background: var(--bg-paper-deep);
  border: 1px solid var(--border-strong);
  color: var(--ink-secondary);
  overflow-wrap: anywhere;
}

progress.progress-meter {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 7px;
  border: none;
  border-radius: 999px;
  background: var(--bg-paper-deep);
  overflow: hidden;
  display: block;
}

progress.progress-meter::-webkit-progress-bar {
  background: var(--bg-paper-deep);
  border-radius: 999px;
}

progress.progress-meter::-webkit-progress-value {
  background: var(--accent-burgundy);
  border-radius: 999px;
  transition: width 220ms ease;
}

progress.progress-meter::-moz-progress-bar {
  background: var(--accent-burgundy);
  border-radius: 999px;
}

progress.progress-meter-done::-webkit-progress-value {
  background: var(--accent-sage);
}

progress.progress-meter-done::-moz-progress-bar {
  background: var(--accent-sage);
}

/* ---------- Hero & Home Overview ---------- */
.hero {
  background: var(--bg-card);
  border: 1px solid var(--border-archival);
  border-left: 5px solid var(--accent-burgundy);
  border-radius: var(--radius-lg);
  padding: 1.65rem 1.85rem;
  box-shadow: var(--shadow-card);
  margin-bottom: 1.35rem;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-burgundy);
  margin-bottom: 0.55rem;
}

.hero h1 {
  font-size: clamp(1.65rem, 3vw, 2.2rem);
  margin-bottom: 0.75rem;
}

.hero-lead {
  font-size: 1.04rem;
  color: var(--ink-secondary);
  max-width: 76ch;
  margin-bottom: 1.15rem;
}

.hero-progress-panel {
  background: var(--bg-inset);
  border: 1px solid var(--border-archival);
  border-radius: var(--radius-md);
  padding: 1rem 1.2rem;
  margin-bottom: 0;
}

.hero-progress-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-bottom: 0.55rem;
}

.reset-confirm-inline {
  margin-top: 0.8rem;
  padding: 0.75rem 0.95rem;
  border-radius: var(--radius-sm);
  background: var(--accent-burgundy-soft);
  border: 1px solid var(--accent-burgundy-border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  font-size: 0.88rem;
}

.reset-confirm-actions {
  display: flex;
  gap: 0.5rem;
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.filter-pill {
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 0.34rem 0.82rem;
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--ink-secondary);
  transition: background-color var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

.filter-pill:hover {
  background: var(--bg-paper-deep);
  color: var(--ink-primary);
}

.filter-pill.is-active {
  background: var(--accent-burgundy);
  border-color: var(--accent-burgundy);
  color: #FDFCFA;
}

[data-theme="dark"] .filter-pill.is-active {
  color: #141619;
}

.dossier-section {
  margin-bottom: 2.5rem;
}

.section-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--border-strong);
  margin-bottom: 1.2rem;
}

.section-kicker {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-burgundy);
  margin-bottom: 0.2rem;
}

.section-header h2 {
  font-size: 1.38rem;
  margin-bottom: 0.25rem;
}

.section-subtitle {
  font-size: 0.93rem;
  color: var(--ink-muted);
  margin-bottom: 0;
}

.dossier-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(305px, 1fr));
  gap: 1.15rem;
}

.dossier-card {
  background: var(--bg-card);
  border: 1px solid var(--border-archival);
  border-radius: var(--radius-md);
  padding: 1.3rem;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.dossier-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.dossier-code {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--accent-burgundy);
  letter-spacing: 0.04em;
}

.dossier-duration {
  font-size: 0.8rem;
  color: var(--ink-muted);
}

.dossier-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.1rem;
}

.dossier-card-subtitle {
  font-size: 0.91rem;
  color: var(--ink-secondary);
  margin-bottom: auto;
}

.dossier-card-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding-top: 0.35rem;
}

/* ---------- Dossier Player & Stations ---------- */
.dossier-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.dossier-header-card {
  background: var(--bg-card);
  border: 1px solid var(--border-archival);
  border-radius: var(--radius-md);
  padding: 1.45rem;
  box-shadow: var(--shadow-card);
  margin-bottom: 1.15rem;
}

.dossier-header-card h1 {
  font-size: clamp(1.38rem, 2.6vw, 1.8rem);
  margin-bottom: 0.4rem;
}

.content-notice-box {
  margin-top: 0.9rem;
  padding: 0.82rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--accent-ochre-soft);
  border: 1px solid var(--accent-ochre-border);
  font-size: 0.88rem;
  color: var(--ink-primary);
}

.station-stepper {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1.25rem;
}

.step-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  padding: 0.46rem 0.8rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg-card);
  color: var(--ink-secondary);
  font-size: 0.84rem;
  font-weight: 500;
  text-decoration: none;
  transition: background-color var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

.step-btn:hover {
  background: var(--bg-paper-deep);
  color: var(--ink-primary);
}

.step-btn.is-current,
.step-btn.is-current:hover {
  border-color: var(--accent-burgundy);
  background: var(--accent-burgundy-soft);
  color: var(--accent-burgundy);
  font-weight: 600;
}

.step-btn.is-answered,
.step-btn.is-answered:hover {
  border-color: var(--accent-sage-border);
  background: var(--accent-sage-soft);
  color: var(--accent-sage);
}

.step-btn.is-answered.is-current,
.step-btn.is-answered.is-current:hover {
  border: 2px solid var(--accent-burgundy);
  box-shadow: 0 0 0 2px var(--accent-burgundy-soft);
  font-weight: 700;
}

.station-card {
  background: var(--bg-card);
  border: 1px solid var(--border-archival);
  border-radius: var(--radius-lg);
  padding: 1.65rem;
  box-shadow: var(--shadow-card);
}

.station-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.station-card h2 {
  font-size: 1.38rem;
  margin-bottom: 0.65rem;
}

.station-prompt {
  font-size: 1.03rem;
  color: var(--ink-primary);
  margin-bottom: 1.2rem;
}

.source-box {
  background: var(--bg-inset);
  border: 1px solid var(--border-strong);
  border-left: 4px solid var(--accent-slate);
  border-radius: var(--radius-sm);
  padding: 1rem 1.15rem;
  margin-bottom: 1.35rem;
}

.source-box-label {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--accent-slate);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.55rem;
}

.source-quote {
  margin: 0 0 0.75rem;
  font-family: var(--font-serif);
  font-size: 1.03rem;
  line-height: 1.55;
  color: var(--ink-primary);
}

.source-original-toggle {
  margin: 0.6rem 0;
  font-size: 0.88rem;
}

.source-original-toggle summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--accent-slate);
}

.source-original-quote {
  margin-top: 0.5rem;
  padding-left: 0.85rem;
  border-left: 2px solid var(--border-strong);
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--ink-secondary);
}

.source-meta {
  font-size: 0.84rem;
  color: var(--ink-secondary);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.source-sig-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.9rem;
}

/* ---------- Archival Photography Figure & Fallback ---------- */
.archival-figure {
  margin: 0 0 1.4rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--bg-inset);
  overflow: hidden;
}

.media-stage {
  background: var(--figure-stage);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
}

.media-img {
  display: block;
  max-width: 100%;
  max-height: 460px;
  height: auto;
  object-fit: contain;
}

.media-fallback {
  display: none;
  width: 100%;
  padding: 1.25rem;
  color: var(--figure-ink);
}

.media-stage.is-error .media-img {
  display: none;
}

.media-stage.is-error .media-fallback {
  display: block;
}

.fallback-frame {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-sm);
  padding: 1rem;
  background: rgba(255, 255, 255, 0.04);
}

.fallback-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  margin-bottom: 0.65rem;
}

.archival-figcaption {
  padding: 0.85rem 1.05rem;
  font-size: 0.86rem;
  color: var(--ink-secondary);
  border-top: 1px solid var(--border-archival);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.figcaption-credit {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.6rem;
  font-size: 0.8rem;
  color: var(--ink-muted);
}

/* ---------- Options & Explanations ---------- */
.options-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 1.25rem;
}

.option-btn {
  width: 100%;
  text-align: left;
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  padding: 0.9rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-strong);
  background: var(--bg-card);
  color: var(--ink-primary);
  font-size: 0.96rem;
  line-height: 1.48;
  transition: border-color var(--transition-fast), background-color var(--transition-fast);
}

.option-btn:hover:not(:disabled) {
  background: var(--bg-inset);
  border-color: var(--accent-burgundy);
}

.option-btn:disabled {
  cursor: default;
}

.option-key {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg-inset);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
}

.option-btn.is-correct {
  background: var(--accent-sage-soft);
  border-color: var(--accent-sage);
}

.option-btn.is-correct .option-key {
  background: var(--accent-sage);
  border-color: var(--accent-sage);
  color: #FDFCFA;
}

.option-btn.is-wrong {
  background: var(--accent-burgundy-soft);
  border-color: var(--accent-burgundy);
}

.option-btn.is-wrong .option-key {
  background: var(--accent-burgundy);
  border-color: var(--accent-burgundy);
  color: #FDFCFA;
}

.option-btn.is-reflected {
  background: var(--accent-slate-soft);
  border-color: var(--accent-slate);
}

.option-btn.is-reflected .option-key {
  background: var(--accent-slate);
  border-color: var(--accent-slate);
  color: #FDFCFA;
}

[data-theme="dark"] .option-btn.is-correct .option-key,
[data-theme="dark"] .option-btn.is-wrong .option-key,
[data-theme="dark"] .option-btn.is-reflected .option-key {
  color: #141619;
}

.explanation-box {
  margin-top: 1.25rem;
  padding: 1.2rem 1.25rem;
  border-radius: var(--radius-md);
  background: var(--bg-inset);
  border: 1px solid var(--border-strong);
  border-left: 4px solid var(--accent-sage);
}

.explanation-box.is-reflection {
  border-left-color: var(--accent-slate);
}

.explanation-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.65rem;
}

.explanation-head h3 {
  font-size: 1.12rem;
  margin-bottom: 0;
}

.citations-list {
  margin: 0.65rem 0 0;
  padding-left: 1.2rem;
  font-size: 0.86rem;
  color: var(--ink-secondary);
}

.citations-list li {
  margin-bottom: 0.35rem;
}

.station-footer-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1.4rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--border-archival);
}

/* ---------- Completion Card ---------- */
.completion-card {
  background: var(--bg-card);
  border: 1px solid var(--border-archival);
  border-top: 4px solid var(--accent-sage);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-card);
}

.completion-card.is-incomplete {
  border-top-color: var(--accent-slate);
}

.completion-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.9rem;
  margin: 1.15rem 0 1.4rem;
}

.stat-tile {
  background: var(--bg-inset);
  border: 1px solid var(--border-archival);
  border-radius: var(--radius-md);
  padding: 0.95rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.stat-number {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ink-primary);
}

.stat-label {
  font-size: 0.85rem;
  color: var(--ink-muted);
}

.review-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.35rem;
  border: 1px solid var(--border-archival);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.review-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding: 0.72rem 1rem;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-archival);
}

.review-item:last-child {
  border-bottom: none;
}

.review-item-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.support-callout {
  padding: 1rem 1.15rem;
  border-radius: var(--radius-md);
  background: var(--accent-slate-soft);
  border: 1px solid var(--accent-slate-border);
  font-size: 0.9rem;
  margin: 1.2rem 0;
}

/* ---------- Timeline View ---------- */
.view-header-card {
  background: var(--bg-card);
  border: 1px solid var(--border-archival);
  border-radius: var(--radius-lg);
  padding: 1.65rem;
  box-shadow: var(--shadow-card);
  margin-bottom: 1.5rem;
}

.controls-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-archival);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.25rem;
  margin-bottom: 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.control-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem 1rem;
}

.era-banner {
  background: var(--bg-inset);
  border: 1px solid var(--border-archival);
  border-left: 4px solid var(--accent-burgundy);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1.1rem;
  margin-bottom: 1.25rem;
}

.timeline-rail {
  position: relative;
  padding-left: 1.6rem;
  border-left: 2px solid var(--border-strong);
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.timeline-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-archival);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: var(--shadow-card);
}

.timeline-card::before {
  content: '';
  position: absolute;
  left: -1.98rem;
  top: 1.45rem;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--accent-burgundy);
  border: 2px solid var(--bg-paper);
}

.home-controls-panel {
  padding: 0.9rem 1.15rem;
  margin-bottom: 1rem;
}

.section-jump-nav,
.az-jump-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.15rem;
}

.glossary-card,
[id^="sec-"],
#hilfe-anker,
.explanation-heading {
  scroll-margin-top: 5.5rem;
}

.section-jump-link,
.az-jump-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.34rem 0.68rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-archival);
  background: var(--bg-card);
  color: var(--ink-secondary);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  text-decoration: none;
  transition: background-color var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

.section-jump-link:hover,
.az-jump-link:hover {
  background: var(--bg-paper-deep);
  border-color: var(--border-strong);
  color: var(--ink-primary);
}

.timeline-filters-details {
  border-top: 1px solid var(--border-archival);
  padding-top: 0.65rem;
}

.timeline-filters-summary {
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent-slate);
  list-style-position: inside;
  padding: 0.25rem 0;
}

.timeline-filters-body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.timeline-card h2 {
  font-size: 1.22rem;
  margin-bottom: 0.45rem;
}

.timeline-card-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem 0.9rem;
  margin-bottom: 0.45rem;
}

.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent-burgundy);
}

.timeline-links-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.75rem;
}

/* ---------- Glossary View ---------- */
.search-field {
  flex: 1 1 280px;
}

.search-input-wrap {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex: 1 1 280px;
}

.search-input {
  width: 100%;
  min-height: 44px;
  padding: 0.58rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg-inset);
  color: var(--ink-primary);
  font-size: 1rem;
}

.search-input::placeholder {
  color: var(--ink-muted);
  opacity: 1;
}

.glossary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.1rem;
}

.glossary-card {
  background: var(--bg-card);
  border: 1px solid var(--border-archival);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.glossary-card.is-highlighted {
  border-color: var(--accent-burgundy);
  box-shadow: var(--shadow-elevated);
}

.glossary-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.glossary-head h2,
.glossary-head h3 {
  font-size: 1.22rem;
  margin-bottom: 0.15rem;
}

.plain-reality-box {
  background: var(--accent-ochre-soft);
  border: 1px solid var(--accent-ochre-border);
  border-radius: var(--radius-sm);
  padding: 0.72rem 0.88rem;
  font-size: 0.89rem;
}

/* ---------- Editorial & Legal Pages ---------- */
.editorial-card {
  background: var(--bg-card);
  border: 1px solid var(--border-archival);
  border-radius: var(--radius-lg);
  padding: 1.85rem;
  box-shadow: var(--shadow-card);
  margin-bottom: 1.4rem;
}

.editorial-card h2 {
  font-size: 1.32rem;
  margin: 1.4rem 0 0.55rem;
}

.editorial-card h2:first-child {
  margin-top: 0;
}

.ledger-table-wrap {
  overflow-x: auto;
  margin-top: 0.85rem;
}

.ledger-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.89rem;
}

.ledger-table th,
.ledger-table td {
  text-align: left;
  padding: 0.7rem 0.75rem;
  border-bottom: 1px solid var(--border-archival);
  vertical-align: top;
}

.ledger-table th {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  background: var(--bg-inset);
}

.support-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.support-card {
  background: var(--bg-inset);
  border: 1px solid var(--border-archival);
  border-radius: var(--radius-md);
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.legal-address {
  font-style: normal;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--bg-inset);
  border: 1px solid var(--border-archival);
  display: inline-block;
  margin-bottom: 0.75rem;
}

/* ---------- Global Footer ---------- */
.site-footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border-archival);
  padding: 1.25rem;
  font-size: 0.86rem;
  color: var(--ink-secondary);
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.footer-brand-name {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 0.96rem;
  color: var(--ink-primary);
}

.footer-inline-links {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.footer-inline-links a {
  color: var(--ink-secondary);
  text-decoration: none;
}

.footer-inline-links a:hover {
  color: var(--accent-burgundy);
  text-decoration: underline;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  font-size: 0.84rem;
  color: var(--ink-muted);
}

/* ---------- Mobile, Reduced Motion & Print ---------- */
@media (max-width: 768px) {
  .site-header {
    position: static;
  }

  .glossary-card,
  [id^="sec-"],
  #hilfe-anker,
  .explanation-heading {
    scroll-margin-top: 1rem;
  }

  .header-inner {
    padding: 0.6rem 0.9rem;
    gap: 0.35rem 0.5rem;
  }

  .header-controls {
    display: contents;
  }

  .brand {
    order: 1;
    min-height: 44px;
    gap: 0.55rem;
  }

  .brand-title {
    font-size: 1.02rem;
    letter-spacing: 0.06em;
  }

  .main-nav {
    order: 3;
    width: 100%;
    gap: 0.15rem 0.2rem;
  }

  .nav-btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.42rem;
    font-size: 0.84rem;
  }

  .utility-controls {
    order: 2;
    padding-left: 0;
    border-left: none;
  }

  .util-btn {
    min-height: 44px;
    padding: 0.45rem 0.58rem;
    font-size: 0.76rem;
  }

  .filter-group {
    gap: 0.5rem;
  }

  .filter-pill,
  .step-btn,
  .btn-inline-sm,
  .btn-subtle,
  .section-jump-link,
  .az-jump-link,
  .timeline-filters-summary {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  .az-jump-link {
    min-width: 44px;
  }

  .filter-pill {
    padding: 0.5rem 0.88rem;
  }

  a.badge {
    min-width: 44px;
    min-height: 44px;
    justify-content: center;
    padding: 0.4rem 0.72rem;
  }

  .timeline-links-row {
    gap: 0.5rem;
  }

  .citations-list li {
    margin-bottom: 0.55rem;
  }

  .citations-list a {
    display: inline-block;
    padding: 0.45rem 0;
  }

  .citations-list a.mono,
  .figcaption-credit a,
  .source-sig-row a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0.25rem 0;
  }

  .hero-progress-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .footer-inline-links {
    gap: 0.5rem 0.85rem;
  }

  .footer-inline-links a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding: 0.25rem;
  }

  main {
    padding: 1.25rem 0.95rem 2.5rem;
  }

  .hero,
  .station-card,
  .editorial-card {
    padding: 1.25rem;
  }

  .station-footer-nav {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .station-footer-nav .btn {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .ledger-table-wrap {
    overflow-x: visible;
  }

  .ledger-table,
  .ledger-table tbody,
  .ledger-table tr,
  .ledger-table td {
    display: block;
    width: 100%;
  }

  .ledger-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .ledger-table tr {
    background: var(--bg-inset);
    border: 1px solid var(--border-archival);
    border-radius: var(--radius-md);
    padding: 0.85rem 1rem;
    margin-bottom: 0.9rem;
  }

  .ledger-table td {
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--border-archival);
  }

  .ledger-table td:last-child {
    border-bottom: none;
  }

  .ledger-table td::before {
    content: attr(data-label);
    display: block;
    font-family: var(--font-mono);
    font-size: 0.74rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ink-muted);
    margin-bottom: 0.2rem;
  }

  .ledger-table td a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    min-width: 44px;
    padding: 0.35rem 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  .site-header,
  .site-footer,
  .controls-panel,
  .station-stepper,
  .station-footer-nav {
    display: none !important;
  }

  body {
    background: #FFFFFF;
    color: #000000;
  }

  .station-card,
  .editorial-card {
    box-shadow: none;
    border-color: #999999;
  }
}
