/* ==========================================================================
   Geschichte der Mathematik – Stylesheet
   Aufbau: Fonts · Tokens · Basis · Layout · Header · Hero · Sektionen ·
           Karten · Artikel · Prose-Komponenten · Tabellen · Footer · Utilities
   ========================================================================== */

/* ---------- Fonts (selbst gehostet, SIL Open Font License) ---------- */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("../fonts/inter-latin.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: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("../fonts/inter-latin-ext.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: "Fraunces"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("../fonts/fraunces-latin.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: "Fraunces"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("../fonts/fraunces-latin-ext.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: "Fraunces"; font-style: italic; font-weight: 100 900; font-display: swap;
  src: url("../fonts/fraunces-latin-italic.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+2212; }

/* ---------- Design-Tokens ---------- */
:root {
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Fraunces", ui-serif, Georgia, "Times New Roman", serif;
  --font-mono: ui-monospace, "Cascadia Code", "SF Mono", Consolas, monospace;

  --bg: #ffffff;
  --bg-alt: #f4f6fb;
  --surface: #ffffff;
  --surface-2: #f1f4f9;
  --text: #0f172a;
  --text-soft: #334155;
  --muted: #64748b;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --primary: #3346c4;
  --primary-hover: #25349b;
  --primary-soft: #eef1fe;
  --on-primary: #ffffff;
  --accent: #0891b2;
  --accent-text: #0e7490;
  --accent-soft: #e3f6fa;
  --green: #15803d;  --green-soft: #e8f7ee;
  --red: #c2410c;    --red-soft: #fff1ea;
  --violet: #7c3aed; --violet-soft: #f3eefe;
  --mark: #c7d2fe;

  --brand-bg: #3346c4;
  --brand-fg: #ffffff;
  --brand-accent: #5ee0f5;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgb(15 23 42 / .06), 0 1px 1px rgb(15 23 42 / .04);
  --shadow: 0 1px 2px rgb(15 23 42 / .05), 0 8px 24px -8px rgb(15 23 42 / .14);
  --shadow-lg: 0 2px 6px rgb(15 23 42 / .06), 0 24px 48px -16px rgb(15 23 42 / .22);

  --container: 1200px;
  --gutter: clamp(16px, 4vw, 32px);
  --header-h: 68px;
  --measure: 70ch;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1020; --bg-alt: #0f1529; --surface: #131a30; --surface-2: #1a2240;
    --text: #e8ecf5; --text-soft: #c9d1e3; --muted: #94a0bb; --border: #232c48; --border-strong: #33405f;
    --primary: #9db0ff; --primary-hover: #c3cfff; --primary-soft: #1c2650; --on-primary: #0b1020;
    --accent: #38d6f0; --accent-text: #67e3f7; --accent-soft: #0d2a36;
    --green: #6ee7a0; --green-soft: #0f2a1d; --red: #fdba8c; --red-soft: #33190f; --violet: #c4b1ff; --violet-soft: #231b42;
    --mark: #34407a;
    --brand-bg: #3346c4;
    --shadow-sm: 0 1px 2px rgb(0 0 0 / .4);
    --shadow: 0 1px 2px rgb(0 0 0 / .35), 0 10px 28px -10px rgb(0 0 0 / .6);
    --shadow-lg: 0 2px 8px rgb(0 0 0 / .4), 0 28px 56px -18px rgb(0 0 0 / .7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b1020; --bg-alt: #0f1529; --surface: #131a30; --surface-2: #1a2240;
  --text: #e8ecf5; --text-soft: #c9d1e3; --muted: #94a0bb; --border: #232c48; --border-strong: #33405f;
  --primary: #9db0ff; --primary-hover: #c3cfff; --primary-soft: #1c2650; --on-primary: #0b1020;
  --accent: #38d6f0; --accent-text: #67e3f7; --accent-soft: #0d2a36;
  --green: #6ee7a0; --green-soft: #0f2a1d; --red: #fdba8c; --red-soft: #33190f; --violet: #c4b1ff; --violet-soft: #231b42;
  --mark: #34407a;
  --brand-bg: #3346c4;
  --shadow-sm: 0 1px 2px rgb(0 0 0 / .4);
  --shadow: 0 1px 2px rgb(0 0 0 / .35), 0 10px 28px -10px rgb(0 0 0 / .6);
  --shadow-lg: 0 2px 8px rgb(0 0 0 / .4), 0 28px 56px -18px rgb(0 0 0 / .7);
  color-scheme: dark;
}

/* ---------- Basis ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: clip; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0; min-height: 100vh; overflow-x: hidden;
  font-family: var(--font-sans); font-size: 1rem; line-height: 1.6; color: var(--text); background: var(--bg);
  font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, svg, video { max-width: 100%; height: auto; }
img { display: block; }
a { color: var(--primary); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--primary-hover); }
h1, h2, h3, h4 { font-family: var(--font-serif); font-weight: 620; line-height: 1.18; letter-spacing: -.012em; color: var(--text); font-variation-settings: "SOFT" 30, "WONK" 0; text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 1.5rem + 2.6vw, 3.4rem); margin: .2em 0 .35em; font-weight: 640; }
p { text-wrap: pretty; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--accent-soft); color: var(--text); }
button { font: inherit; color: inherit; }
main:focus { outline: none; }
math { font-size: 1.08em; }
math[display="block"] { font-size: 1.15em; }
hr { border: 0; border-top: 1px solid var(--border); margin: 2.5rem 0; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--primary); color: var(--on-primary); padding: .6rem 1rem; border-radius: var(--radius-sm); text-decoration: none; font-weight: 600; }
.skip-link:focus { top: 12px; color: var(--on-primary); }
.muted { color: var(--muted); }

.icon { width: 20px; height: 20px; flex: none; }
.icon-sm { width: 16px; height: 16px; }

.eyebrow { margin: 0 0 .4rem; font-size: .78rem; font-weight: 650; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-text); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 44px; padding: .65rem 1.2rem; border-radius: 999px; border: 1px solid transparent; font-weight: 600; font-size: .95rem; text-decoration: none; cursor: pointer; transition: background-color .2s, color .2s, border-color .2s, transform .2s, box-shadow .2s; }
.btn-primary { background: var(--primary); color: var(--on-primary); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--primary-hover); color: var(--on-primary); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover { background: var(--surface); color: var(--primary); border-color: var(--primary); }
.linkish { background: none; border: 0; padding: 0; color: inherit; text-decoration: underline; text-underline-offset: .18em; cursor: pointer; font-size: inherit; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--border); }
.header-inner { display: flex; align-items: center; gap: 1.5rem; height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; color: var(--text); flex: none; }
.brand:hover { color: var(--text); }
.brand-mark { width: 38px; height: 38px; border-radius: 10px; box-shadow: var(--shadow-sm); }
.brand-text { font-family: var(--font-serif); font-weight: 650; font-size: 1.12rem; line-height: 1.05; letter-spacing: -.01em; display: flex; flex-direction: column; }
.brand-text span { font-weight: 450; font-style: italic; color: var(--muted); font-size: .92em; }

.main-nav { margin-left: auto; }
.nav-list { display: flex; align-items: center; gap: .25rem; list-style: none; margin: 0; padding: 0; }
.nav-link { display: inline-flex; align-items: center; gap: .3rem; padding: .55rem .85rem; border-radius: 999px; color: var(--text-soft); text-decoration: none; font-weight: 550; font-size: .95rem; transition: background-color .2s, color .2s; }
.nav-link:hover, .nav-link[aria-expanded="true"] { background: var(--surface-2); color: var(--text); }
.nav-link[aria-current="page"] { color: var(--primary); background: var(--primary-soft); }
.nav-link .icon { transition: transform .2s; }
.nav-link[aria-expanded="true"] .icon { transform: rotate(180deg); }

.has-mega { position: relative; }
.mega { position: absolute; top: calc(100% + 10px); left: 50%; translate: -50% 0; width: min(760px, 92vw); padding: 1.25rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .18s, transform .18s, visibility .18s; }
.has-mega.is-open .mega, .has-mega:focus-within .mega { opacity: 1; visibility: visible; transform: none; }
@media (hover: hover) and (min-width: 960px) { .has-mega:hover .mega { opacity: 1; visibility: visible; transform: none; } }
.mega-title { margin: 0 0 .75rem .5rem; font-size: .8rem; font-weight: 650; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-text); }
.mega-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 2px 1rem; counter-reset: ep; }
.mega-list a { display: flex; flex-direction: column; padding: .5rem .6rem; border-radius: var(--radius-sm); text-decoration: none; color: var(--text); }
.mega-list a:hover { background: var(--surface-2); }
.mega-name { font-weight: 600; font-size: .93rem; }
.mega-meta { font-size: .8rem; color: var(--muted); }

.header-actions { display: flex; align-items: center; gap: .25rem; }
.icon-btn { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 999px; border: 0; background: transparent; color: var(--text-soft); cursor: pointer; transition: background-color .2s, color .2s; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-sun { display: none; }
:root[data-theme="dark"] .icon-sun { display: block; } :root[data-theme="dark"] .icon-moon { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .icon-sun { display: block; } :root:not([data-theme="light"]) .icon-moon { display: none; } }
.nav-toggle { display: none; }
.icon-close { display: none; }
.nav-open .icon-close { display: block; } .nav-open .icon-menu { display: none; }

.search-panel { border-top: 1px solid var(--border); background: var(--surface); padding-block: .9rem; }
.search-form { display: flex; align-items: center; gap: .6rem; }
.search-form > .icon { color: var(--muted); }
.search-form input { flex: 1; min-width: 0; min-height: 46px; padding: .6rem .9rem; border: 1px solid var(--border-strong); border-radius: 999px; background: var(--bg); color: var(--text); font: inherit; font-size: 1rem; }
.search-form input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.search-form-page { max-width: 640px; margin-top: 1.25rem; padding: .4rem .4rem .4rem 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; box-shadow: var(--shadow-sm); }
.search-form-page input { border: 0; background: transparent; padding-inline: 0; }
.search-form-page input:focus { box-shadow: none; }

.lesefortschritt { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 60; pointer-events: none; }
.lesefortschritt span { display: block; height: 100%; width: 100%; transform-origin: 0 50%; transform: scaleX(var(--p, 0)); background: linear-gradient(90deg, var(--primary), var(--accent)); }

@media (max-width: 959px) {
  .nav-toggle { display: inline-grid; }
  .header-inner { gap: .75rem; }
  .header-actions { margin-left: auto; }
  .main-nav { position: fixed; inset: var(--header-h) 0 0 0; margin: 0; background: var(--bg); padding: 1rem var(--gutter) 2rem; overflow-y: auto; opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(-8px); transition: opacity .2s ease, transform .2s ease, visibility .2s; border-top: 1px solid var(--border); }
  .nav-open .main-nav { opacity: 1; visibility: visible; pointer-events: auto; transform: none; }
  .nav-list { flex-direction: column; align-items: stretch; gap: .25rem; }
  .nav-link { font-size: 1.1rem; padding: .85rem 1rem; border-radius: var(--radius); justify-content: space-between; }
  .mega { position: static; translate: none; width: auto; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding: .25rem 0 .5rem .5rem; display: none; background: transparent; }
  .has-mega.is-open .mega { display: block; }
  .mega-title { display: none; }
  .mega-list { grid-template-columns: 1fr; }
  body.nav-open { overflow: hidden; }
}
@media (max-width: 420px) { .brand-text { font-size: 1rem; } .brand-mark { width: 34px; height: 34px; } }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: clamp(2.5rem, 6vw, 5.5rem) 0 clamp(2.5rem, 5vw, 4.5rem); background:
  radial-gradient(1100px 520px at 88% -12%, color-mix(in srgb, var(--primary) 13%, transparent), transparent 62%),
  radial-gradient(760px 420px at -8% 112%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 60%),
  var(--bg); border-bottom: 1px solid var(--border); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: center; }
.hero h1 { font-size: clamp(2.6rem, 1.6rem + 4.2vw, 4.6rem); line-height: 1.02; margin: .1em 0 .3em; letter-spacing: -.025em; }
.hero-lead { font-size: clamp(1.08rem, 1rem + .4vw, 1.3rem); color: var(--text-soft); max-width: 36em; margin: 0 0 1.75rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 2.5rem; margin: 2.25rem 0 0; padding: 0; }
.hero-stats div { display: flex; flex-direction: column-reverse; }
.hero-stats dt { font-size: .85rem; color: var(--muted); }
.hero-stats dd { margin: 0; font-family: var(--font-serif); font-size: 2.1rem; font-weight: 650; line-height: 1.1; color: var(--text); }
.hero-art { position: relative; }
.hero-svg { width: 100%; max-width: 520px; margin-inline: auto; display: block; }
.hs-grid line { stroke: var(--border); stroke-width: 1; }
.hs-line { fill: none; stroke: var(--text); stroke-width: 2; opacity: .8; }
.hs-line2 { fill: none; stroke: var(--muted); stroke-width: 1.5; stroke-dasharray: 5 6; }
.hs-accent { fill: color-mix(in srgb, var(--accent) 18%, transparent); stroke: var(--accent); stroke-width: 3; stroke-linejoin: round; }
.hs-curve { fill: none; stroke: var(--primary); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 900; stroke-dashoffset: 900; animation: draw 2.4s .3s ease forwards; }
.hs-dot { fill: var(--surface); stroke: var(--text); stroke-width: 2; }
.hs-dot-acc { fill: var(--accent); stroke: var(--accent); }
.hs-text { font-family: var(--font-serif); font-size: 26px; font-style: italic; fill: var(--text); opacity: .85; }
.hs-small { font-size: 17px; fill: var(--muted); opacity: 1; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } .hero-art { order: -1; max-width: 340px; margin-inline: auto; } .hero-stats { gap: 1.75rem; } }

/* ---------- Sektionen ---------- */
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section-alt { background: var(--bg-alt); border-block: 1px solid var(--border); }
.section-head { max-width: 760px; margin-bottom: 2.25rem; }
.section-head h2, .section-title { font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem); margin: 0 0 .6rem; }
.section-head p { color: var(--text-soft); margin: 0; font-size: 1.05rem; }
.section-head-row { max-width: none; display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.section-head-row > div { max-width: 720px; }

/* Zeitstrahl der Epochen */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; display: grid; gap: 1.25rem; }
.timeline::before { content: ""; position: absolute; top: 8px; bottom: 8px; left: 50%; width: 2px; translate: -1px 0; background: linear-gradient(var(--accent), var(--primary)); opacity: .45; border-radius: 2px; }
.timeline-item { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 3.5rem; }
.timeline-item:nth-child(odd) .timeline-card { grid-column: 1; }
.timeline-item:nth-child(even) .timeline-card { grid-column: 2; }
.timeline-dot { position: absolute; left: 50%; top: 28px; width: 16px; height: 16px; translate: -50% 0; border-radius: 50%; background: var(--surface); border: 3px solid var(--accent); box-shadow: 0 0 0 5px var(--bg); z-index: 1; }
.timeline-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); overflow: hidden; transition: transform .2s, box-shadow .2s, border-color .2s; }
.timeline-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--border-strong); }
.timeline-link { display: grid; grid-template-columns: 120px 1fr; gap: 1rem; padding: 1rem; color: inherit; text-decoration: none; align-items: start; }
.timeline-link:hover { color: inherit; }
.timeline-link:hover .timeline-title { color: var(--primary); }
.timeline-media { width: 120px; aspect-ratio: 1; border-radius: var(--radius); overflow: hidden; background: var(--surface-2); }
.timeline-media img { width: 100%; height: 100%; object-fit: cover; }
.timeline-link:not(:has(.timeline-media)) { grid-template-columns: 1fr; }
.timeline-period { display: inline-block; font-size: .78rem; font-weight: 650; letter-spacing: .04em; color: var(--accent-text); background: var(--accent-soft); padding: .15rem .55rem; border-radius: 999px; }
.timeline-title { font-size: 1.3rem; margin: .45rem 0 .3rem; transition: color .2s; }
.timeline-text { display: block; font-size: .93rem; color: var(--muted); line-height: 1.5; }
.timeline-people { display: flex; flex-wrap: wrap; gap: .35rem; margin: 0; padding: 0 1rem 1rem; }
.timeline-people a { font-size: .8rem; padding: .2rem .6rem; border-radius: 999px; background: var(--surface-2); color: var(--text-soft); text-decoration: none; border: 1px solid var(--border); }
.timeline-people a:hover { border-color: var(--primary); color: var(--primary); }
.timeline-people .more { font-weight: 650; }
@media (max-width: 820px) {
  .timeline::before { left: 11px; }
  .timeline-item { grid-template-columns: 1fr; padding-left: 36px; gap: 0; }
  .timeline-item:nth-child(even) .timeline-card, .timeline-item:nth-child(odd) .timeline-card { grid-column: 1; }
  .timeline-dot { left: 12px; top: 26px; }
  .timeline-link { grid-template-columns: 84px 1fr; gap: .85rem; }
  .timeline-media { width: 84px; }
}

/* Personen */
.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .85rem; }
.people-grid-sm { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .6rem; }
.person { display: flex; align-items: center; gap: .9rem; padding: .75rem .9rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); text-decoration: none; color: var(--text); transition: border-color .2s, transform .2s, box-shadow .2s; }
.person:hover { border-color: var(--primary); color: var(--text); transform: translateY(-2px); box-shadow: var(--shadow); }
.avatar { flex: none; width: 56px; height: 56px; border-radius: 50%; overflow: hidden; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; font-family: var(--font-serif); font-weight: 650; font-size: 1.4rem; box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--border); }
.avatar img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.avatar-sm { width: 36px; height: 36px; font-size: 1rem; }
.person-body { display: flex; flex-direction: column; min-width: 0; }
.person-name { font-weight: 650; line-height: 1.25; }
.person-meta { font-size: .82rem; color: var(--accent-text); font-weight: 550; }
.person-known { font-size: .82rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Themen-Kacheln */
.topic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1rem; }
.topic-grid-sm { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .75rem; }
.topic { position: relative; display: flex; flex-direction: column; gap: .35rem; padding: 1.15rem 1.2rem 1.2rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); text-decoration: none; color: var(--text); transition: border-color .2s, transform .2s, box-shadow .2s; overflow: hidden; }
.topic::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: linear-gradient(var(--primary), var(--accent)); opacity: .0; transition: opacity .2s; }
.topic:hover { border-color: var(--border-strong); transform: translateY(-2px); box-shadow: var(--shadow); color: var(--text); }
.topic:hover::before { opacity: 1; }
.topic-title { font-family: var(--font-serif); font-weight: 640; font-size: 1.15rem; }
.topic-text { font-size: .9rem; color: var(--muted); line-height: 1.5; }
.topic-meta { margin-top: auto; padding-top: .35rem; font-size: .78rem; font-weight: 650; color: var(--primary); }

/* Karten */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.1rem; }
.card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; text-decoration: none; color: var(--text); transition: transform .2s, box-shadow .2s, border-color .2s; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--border-strong); color: var(--text); }
.card-media { display: block; aspect-ratio: 16 / 10; background: var(--surface-2); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.card-mathematiker .card-media img { object-position: 50% 22%; }
.card:hover .card-media img { transform: scale(1.03); }
.card-placeholder { display: grid; place-items: center; height: 100%; font-family: var(--font-serif); font-size: 3rem; color: var(--primary); background: linear-gradient(135deg, var(--primary-soft), var(--accent-soft)); }
.card-body { display: flex; flex-direction: column; gap: .3rem; padding: 1rem 1.1rem 1.2rem; }
.card-kicker { font-size: .78rem; font-weight: 650; color: var(--accent-text); letter-spacing: .03em; }
.card-title { font-size: 1.2rem; margin: 0; }
.card-text { font-size: .9rem; color: var(--muted); line-height: 1.5; }

/* ---------- Artikel ---------- */
.article-header { padding: clamp(1.25rem, 3vw, 2.25rem) 0 clamp(1.25rem, 3vw, 2rem); }
.article-header .container { max-width: calc(var(--container) - 0px); }
.article-header h1 { max-width: 22ch; }
.article-lead { font-size: clamp(1.1rem, 1rem + .5vw, 1.35rem); line-height: 1.55; color: var(--text-soft); max-width: 46em; margin: 0 0 1rem; font-family: var(--font-serif); font-weight: 400; }
.article-meta { display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; margin: 0; font-size: .87rem; color: var(--muted); }
.article-meta span { display: inline-flex; align-items: center; gap: .35rem; }

.breadcrumbs { margin-bottom: 1.1rem; font-size: .85rem; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: .25rem; list-style: none; margin: 0; padding: 0; color: var(--muted); }
.breadcrumbs li:not(:last-child)::after { content: "›"; margin-left: .35rem; color: var(--border-strong); }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--primary); text-decoration: underline; }
.breadcrumbs [aria-current] { color: var(--text-soft); }

.article-hero { margin: 0 auto 2rem; }
.article-hero-frame { display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.article-hero img { width: auto; max-width: 100%; max-height: 440px; object-fit: contain; }
.article-hero figcaption { margin-top: .6rem; font-size: .85rem; color: var(--muted); }

.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: clamp(2rem, 4vw, 4rem); align-items: start; padding-bottom: 3rem; }
.article-layout.no-aside { grid-template-columns: minmax(0, 1fr); }
.article-layout.no-aside .article-main { max-width: 780px; margin-inline: auto; width: 100%; }
.article-main { grid-column: 1; grid-row: 1; min-width: 0; }
.article-aside { grid-column: 2; grid-row: 1; display: flex; flex-direction: column; gap: 1.25rem; align-self: stretch; }
.toc { position: sticky; top: calc(var(--header-h) + 20px); }
.toc details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .9rem 1rem; }
.toc summary { display: flex; align-items: center; gap: .45rem; cursor: pointer; font-weight: 650; font-size: .9rem; list-style: none; color: var(--text); }
.toc summary::-webkit-details-marker { display: none; }
.toc ol { list-style: none; margin: .75rem 0 0; padding: 0; counter-reset: toc; max-height: calc(100vh - var(--header-h) - 160px); overflow-y: auto; }
.toc li { counter-increment: toc; }
.toc a { display: grid; grid-template-columns: 1.6rem 1fr; padding: .32rem .4rem; border-radius: 6px; font-size: .86rem; line-height: 1.4; color: var(--muted); text-decoration: none; border-left: 2px solid transparent; }
.toc a::before { content: counter(toc) "."; color: var(--border-strong); font-variant-numeric: tabular-nums; }
.toc a:hover { color: var(--text); background: var(--surface-2); }
.toc a.is-active { color: var(--primary); background: var(--primary-soft); font-weight: 600; }
.toc a.is-active::before { color: var(--primary); }

.steckbrief { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1rem; box-shadow: var(--shadow-sm); display: grid; gap: 1.25rem; }
.sb-person + .sb-person { border-top: 1px solid var(--border); padding-top: 1.25rem; }
.sb-portrait { margin: 0 0 .75rem; }
.sb-portrait img { width: 100%; max-height: 360px; object-fit: cover; object-position: 50% 18%; border-radius: var(--radius); background: var(--surface-2); }
.sb-portrait .credit { display: block; margin-top: .4rem; font-size: .7rem; line-height: 1.4; color: var(--muted); }
.sb-name { font-family: var(--font-serif); font-weight: 650; font-size: 1.25rem; margin: 0 0 .6rem; line-height: 1.2; }
.sb-facts { margin: 0; display: grid; gap: .55rem; font-size: .87rem; }
.sb-facts div { display: grid; grid-template-columns: 6.2rem 1fr; gap: .5rem; }
.sb-facts dt { color: var(--muted); font-weight: 550; }
.sb-facts dd { margin: 0; color: var(--text-soft); }
.sb-tags { display: flex; flex-wrap: wrap; gap: .3rem; list-style: none; margin: 0; padding: 0; }
.sb-tags li { font-size: .78rem; padding: .12rem .5rem; border-radius: 999px; background: var(--primary-soft); color: var(--primary); }

@media (max-width: 999px) {
  .article-layout { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
  .article-aside { grid-column: 1; grid-row: auto; }
  .article-main { grid-row: auto; }
  .toc { position: static; }
  .steckbrief { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
  .sb-person + .sb-person { border-top: 0; padding-top: 0; }
  .sb-person { display: grid; grid-template-columns: 112px 1fr; gap: 0 1rem; align-items: start; }
  .sb-portrait { grid-row: span 2; margin: 0; }
  .sb-portrait img { aspect-ratio: 3 / 4; max-height: none; }
  .sb-portrait .credit { display: none; }
  .sb-facts div { grid-template-columns: 1fr; gap: 0; }
}
@media (max-width: 480px) { .sb-person { grid-template-columns: 88px 1fr; } }

/* Fließtext */
.prose { font-size: clamp(1.02rem, .98rem + .2vw, 1.105rem); line-height: 1.75; color: var(--text-soft); max-width: var(--measure); }
.prose-wrap { padding-block: 0 3.5rem; }
.prose-narrow { max-width: 760px; }
.prose > :first-child { margin-top: 0; }
.prose p, .prose ul, .prose ol, .prose dl { margin: 0 0 1.15em; }
.prose h2 { font-size: clamp(1.55rem, 1.25rem + 1vw, 2rem); margin: 2.4em 0 .65em; padding-top: .2em; color: var(--text); }
.prose h3 { font-size: clamp(1.22rem, 1.1rem + .5vw, 1.42rem); margin: 1.9em 0 .55em; color: var(--text); }
.prose h4 { font-family: var(--font-sans); font-size: 1.02rem; font-weight: 700; margin: 1.6em 0 .5em; color: var(--text); letter-spacing: 0; }
.prose h2 + h3 { margin-top: .9em; }
.prose strong { color: var(--text); font-weight: 650; }
.prose ul, .prose ol { padding-left: 1.35em; }
.prose li { margin: .3em 0; }
.prose li::marker { color: var(--accent); }
.prose ol > li::marker { font-weight: 650; }
.prose a { font-weight: 500; text-decoration-color: color-mix(in srgb, var(--primary) 40%, transparent); }
.prose a:hover { text-decoration-color: currentColor; }
.prose sup, .prose sub { line-height: 0; }
.prose abbr[title] { text-decoration: underline dotted; cursor: help; }
.prose blockquote { margin: 1.8em 0; padding: .4em 0 .4em 1.4em; border-left: 3px solid var(--accent); font-family: var(--font-serif); font-size: 1.12em; font-style: italic; color: var(--text); }
.prose blockquote p { margin: 0 0 .5em; }
.prose blockquote footer { font-family: var(--font-sans); font-style: normal; font-size: .8em; color: var(--muted); }
.prose code { font-family: var(--font-mono); font-size: .9em; background: var(--surface-2); padding: .1em .35em; border-radius: 4px; }
.prose dl dt { font-weight: 650; color: var(--text); }
.prose dl dd { margin: 0 0 .9em 0; }
.prose mark, mark { background: var(--mark); color: inherit; padding: 0 .15em; border-radius: 3px; }
.cols-2 { columns: 2 220px; }

/* Abbildungen */
.prose figure, .bild { margin: 2em 0; }
.bild img { width: 100%; height: auto; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--border); }
.bild figcaption, .diagramm figcaption { margin-top: .6rem; font-size: .86rem; line-height: 1.5; color: var(--muted); }
.credit { font-size: .76rem; color: var(--muted); opacity: .9; }
.credit a { color: inherit; }
.bild.rechts { float: right; width: min(300px, 45%); margin: .3em 0 1.2em 1.75em; }
.bild.rechts img { max-height: 420px; object-fit: cover; }
@media (max-width: 640px) { .bild.rechts { float: none; width: 100%; margin: 1.5em 0; } .bild.rechts img { max-height: none; } }
.prose h2, .prose h3 { clear: both; }

/* SVG-Diagramme */
.diagramm { margin: 2em 0; padding: 1.25rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); }
.diagramm svg { display: block; width: 100%; max-width: 560px; height: auto; margin-inline: auto; overflow: visible; font-family: var(--font-sans); }
.diagramm .akzent { stroke: var(--primary); }
.diagramm .akzent2 { stroke: var(--accent); }
.diagramm text.akzent, .diagramm .text-akzent { fill: var(--primary); stroke: none; }
.diagramm text.akzent2 { fill: var(--accent-text); stroke: none; }
.diagramm .flaeche { fill: color-mix(in srgb, var(--primary) 16%, transparent); }
.diagramm .flaeche2 { fill: color-mix(in srgb, var(--accent) 22%, transparent); }
.diagramm .raster { stroke: var(--border); }
.diagramm .punkt { fill: var(--primary); }
.diagramm .punkt2 { fill: var(--accent); }

/* Formeln */
.formel { margin: 1.5em 0; padding: 1rem 1.25rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow-x: auto; text-align: center; color: var(--text); }
.formel math { margin-inline: auto; }

/* Kästen */
.box { position: relative; margin: 1.8em 0; padding: 1.1rem 1.25rem 1.1rem 1.35rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--primary); font-size: .97em; }
.box > :last-child { margin-bottom: 0; }
.box-title { margin: 0 0 .45em !important; font-family: var(--font-sans); font-size: .78rem !important; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; color: var(--primary); }
.box ul, .box ol { margin-bottom: .4em; }
.box-kurz { background: linear-gradient(135deg, var(--primary-soft), var(--surface) 70%); border-left-color: var(--primary); }
.box-info { border-left-color: var(--violet); background: color-mix(in srgb, var(--violet-soft) 70%, var(--surface)); }
.box-info .box-title { color: var(--violet); }
.box-merke { border-left-color: var(--accent); background: color-mix(in srgb, var(--accent-soft) 75%, var(--surface)); }
.box-merke .box-title { color: var(--accent-text); }
.box-beispiel { border-left-color: var(--green); background: color-mix(in srgb, var(--green-soft) 70%, var(--surface)); }
.box-beispiel .box-title { color: var(--green); }
.box-achtung { border-left-color: var(--red); background: color-mix(in srgb, var(--red-soft) 65%, var(--surface)); }
.box-achtung .box-title { color: var(--red); }
.box-uebung { border-left-color: var(--text); border-style: solid; }
.box-uebung .box-title { color: var(--text); }
.box details { margin-top: .75rem; border-top: 1px dashed var(--border-strong); padding-top: .6rem; }
.box summary { cursor: pointer; font-weight: 650; color: var(--primary); }
.box details[open] summary { margin-bottom: .5rem; }

/* Zeitleiste im Text */
.zeitleiste { list-style: none; margin: 1.5em 0 2em !important; padding: 0 !important; position: relative; }
.zeitleiste::before { content: ""; position: absolute; left: 6.6rem; top: .4rem; bottom: .4rem; width: 2px; background: var(--border-strong); }
.zeitleiste li { position: relative; display: grid; grid-template-columns: 5.8rem 1fr; gap: 1.6rem; margin: 0 !important; padding: .45rem 0; }
.zeitleiste li::before { content: ""; position: absolute; left: calc(6.6rem - 5px); top: .95rem; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 3px solid var(--accent); }
.zeitleiste .zeit { font-weight: 700; color: var(--accent-text); font-variant-numeric: tabular-nums; text-align: right; font-size: .92em; padding-top: .1em; }
@media (max-width: 520px) {
  .zeitleiste::before { left: 5px; }
  .zeitleiste li { grid-template-columns: 1fr; gap: 0; padding-left: 1.6rem; }
  .zeitleiste li::before { left: 0; }
  .zeitleiste .zeit { text-align: left; }
}

/* FAQ */
.faq { margin: 0 0 .6rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); transition: border-color .2s; }
.faq[open] { border-color: var(--border-strong); }
.faq summary { cursor: pointer; padding: .9rem 1.1rem; font-weight: 650; color: var(--text); list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.3rem; line-height: 1; color: var(--primary); transition: transform .2s; }
.faq[open] summary::after { transform: rotate(45deg); }
.faq > :not(summary) { padding: 0 1.1rem; }
.faq > :last-child { padding-bottom: .9rem; margin-bottom: 0; }

/* Quellen */
.quellen { font-size: .9em; color: var(--muted); }
.quellen li { margin: .45em 0; }

/* Glossar */
.prose dl.glossar dt { font-family: var(--font-serif); font-size: 1.15em; margin-top: 1.2em; scroll-margin-top: calc(var(--header-h) + 20px); }
.prose dl.glossar dt:target { color: var(--primary); }
.prose dl.glossar dd { margin-left: 0; padding-left: 1rem; border-left: 2px solid var(--border); }
.glossar-abc { display: flex; flex-wrap: wrap; gap: .3rem; list-style: none; padding: 0 !important; margin: 0 0 2rem !important; }
.glossar-abc a { display: grid; place-items: center; width: 2.2rem; height: 2.2rem; border-radius: 8px; background: var(--surface); border: 1px solid var(--border); text-decoration: none; font-weight: 650; }
.glossar-abc a:hover { border-color: var(--primary); }

/* Tabellen */
.tabelle { overflow-x: auto; margin: 1.8em 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); -webkit-overflow-scrolling: touch; }
.tabelle table { width: 100%; border-collapse: collapse; font-size: .93em; line-height: 1.5; }
.tabelle caption { caption-side: top; text-align: left; padding: .8rem 1rem; font-weight: 650; color: var(--text); border-bottom: 1px solid var(--border); }
.tabelle th, .tabelle td { padding: .65rem 1rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
.tabelle thead th { background: var(--surface-2); color: var(--text); font-weight: 650; font-size: .92em; white-space: nowrap; }
.tabelle tbody tr:last-child td { border-bottom: 0; }
.tabelle tbody tr:hover { background: color-mix(in srgb, var(--primary-soft) 40%, transparent); }
.prose .tabelle { max-width: none; }

/* Einmaleins */
table.einmaleins { text-align: center; font-variant-numeric: tabular-nums; }
table.einmaleins th, table.einmaleins td { text-align: center; padding: .45rem .3rem; min-width: 2.4rem; }
table.einmaleins td.hl, table.einmaleins th.hl { background: var(--primary-soft); color: var(--primary); }
table.einmaleins td.hl-x { background: var(--primary); color: var(--on-primary); font-weight: 700; }

/* Blöcke unter dem Artikel */
.block { margin-top: 3rem; }
.block-title { font-size: 1.5rem; margin: 0 0 1rem; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--border); }
.pager-link { display: flex; flex-direction: column; gap: .25rem; padding: 1rem 1.2rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); text-decoration: none; color: var(--text); transition: border-color .2s, box-shadow .2s; }
.pager-link:hover { border-color: var(--primary); box-shadow: var(--shadow); color: var(--text); }
.pager-next { text-align: right; grid-column: 2; }
.pager-next .pager-label { justify-content: flex-end; }
.pager-label { display: flex; align-items: center; gap: .35rem; font-size: .8rem; color: var(--muted); font-weight: 550; }
.pager-title { font-family: var(--font-serif); font-weight: 640; font-size: 1.1rem; }
@media (max-width: 560px) { .pager { grid-template-columns: 1fr; } .pager-next { grid-column: 1; } }
.related { margin-top: 0; }

/* Mathematiker-Zeittafel */
.liste-intro { margin-bottom: 2rem; }
.filter { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin: 0 0 1rem; padding: .75rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); position: sticky; top: calc(var(--header-h) + 8px); z-index: 5; box-shadow: var(--shadow-sm); }
.filter-field { display: flex; align-items: center; gap: .5rem; flex: 1 1 260px; padding: 0 .75rem; border: 1px solid var(--border-strong); border-radius: 999px; background: var(--bg); color: var(--muted); }
.filter-field:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.filter-field input, .filter-field select { flex: 1; min-width: 0; min-height: 42px; border: 0; background: transparent; color: var(--text); font: inherit; font-size: .95rem; outline: none; }
.filter-field select { cursor: pointer; }
.filter-check { display: inline-flex; align-items: center; gap: .45rem; font-size: .9rem; color: var(--text-soft); cursor: pointer; }
.filter-check input { width: 18px; height: 18px; accent-color: var(--primary); }
.filter-count { margin: 0 0 0 auto; font-size: .85rem; color: var(--muted); }
.zeittafel-wrap { margin-top: 0; margin-bottom: 4rem; }
.zeittafel { font-size: .92rem; }
.zeittafel thead th { position: sticky; top: 0; }
.zt-zeit { white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--accent-text); font-weight: 600; width: 10rem; }
.zt-name { min-width: 13rem; }
.zt-person { display: inline-flex; align-items: center; gap: .6rem; font-weight: 650; text-decoration: none; }
.zt-person:hover span:last-child { text-decoration: underline; }
.zt-anon { color: var(--muted); }
.zt-herkunft { color: var(--muted); min-width: 8rem; }
.zeittafel tr[hidden] { display: none; }
@media (max-width: 720px) {
  .zeittafel thead { display: none; }
  .zeittafel tr { display: grid; grid-template-columns: 1fr auto; gap: .2rem .75rem; padding: .85rem 1rem; border-bottom: 1px solid var(--border); }
  .zeittafel td { border: 0; padding: 0; }
  .zt-name { grid-column: 1; grid-row: 1; min-width: 0; }
  .zt-zeit { grid-column: 2; grid-row: 1; width: auto; font-size: .8rem; align-self: center; }
  .zt-herkunft { grid-column: 1 / -1; font-size: .82rem; min-width: 0; }
  .zt-leistung { grid-column: 1 / -1; }
  .filter { position: static; }
}

/* Suche */
.search-results { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: 1rem; max-width: 780px; }
.search-results li { padding: 1rem 1.2rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.sr-title { font-family: var(--font-serif); font-size: 1.25rem; font-weight: 640; text-decoration: none; }
.sr-type { display: block; font-size: .8rem; color: var(--accent-text); font-weight: 600; margin: .15rem 0 .4rem; }
.sr-snippet { margin: 0; font-size: .92rem; color: var(--muted); }

/* Bildnachweise */
.credits { list-style: none; padding: 0; margin: 2rem 0 4rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: .75rem; }
@media (max-width: 480px) { .credits { grid-template-columns: 1fr; } }
.credit-item { display: flex; gap: .9rem; padding: .8rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.credit-thumb img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; }
.credit-body { display: flex; flex-direction: column; gap: .2rem; min-width: 0; font-size: .85rem; }
.credit-title { font-weight: 650; overflow-wrap: anywhere; }
.credit-meta, .credit-used { color: var(--muted); overflow-wrap: anywhere; }

/* ---------- Footer ---------- */
.site-footer { position: relative; margin-top: 0; background: var(--surface); border-top: 1px solid var(--border); font-size: .92rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 2.5rem; padding-block: 3.5rem 2.5rem; }
.footer-brand p { color: var(--muted); max-width: 34ch; }
.footer-small { font-size: .82rem; }
.brand-footer { margin-bottom: .5rem; }
.footer-title { margin: .4rem 0 .9rem; font-weight: 700; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-text); }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.footer-col a { color: var(--text-soft); text-decoration: none; }
.footer-col a:hover { color: var(--primary); text-decoration: underline; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; padding-block: 1.25rem 1.5rem; border-top: 1px solid var(--border); color: var(--muted); font-size: .85rem; }
.footer-bottom p { margin: 0; }
.footer-legal { display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; list-style: none; margin: 0; padding: 0; }
.footer-legal a, .footer-legal .linkish { color: var(--muted); text-decoration: none; }
.footer-legal a:hover, .footer-legal .linkish:hover { color: var(--primary); text-decoration: underline; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; gap: 1.75rem; } }

.to-top { position: fixed; right: 18px; bottom: 18px; z-index: 40; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); color: var(--text); box-shadow: var(--shadow); cursor: pointer; opacity: 0; visibility: hidden; transform: translateY(10px); transition: opacity .2s, transform .2s, visibility .2s; }
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { color: var(--primary); border-color: var(--primary); }

/* Fehlerseite */
.error-page .article-header { padding-top: clamp(2.5rem, 8vw, 5rem); }

/* ---------- Bewegung reduzieren ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .hs-curve { stroke-dashoffset: 0; }
}

/* ---------- Druck ---------- */
@media print {
  .site-header, .site-footer, .article-aside .toc, .pager, .related, .to-top, .lesefortschritt, .filter, .skip-link, .hero-art { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .article-layout { display: block; }
  .prose { max-width: none; color: #000; }
  .prose a::after { content: " (" attr(href) ")"; font-size: .8em; color: #555; }
  .box, .tabelle, .formel, .diagramm, .steckbrief { break-inside: avoid; box-shadow: none; }
}

/* Wusstest du? (Startseite) */
.facts { padding: clamp(2rem, 5vw, 3rem) 0 0; }
.facts-title { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.75rem); margin: 0 0 1rem; display: flex; align-items: center; gap: .5rem; }
.facts-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
.fact { position: relative; display: flex; flex-direction: column; gap: .75rem; padding: 1.25rem 1.3rem 1.1rem; border-radius: var(--radius-lg); background: linear-gradient(145deg, var(--violet-soft), var(--surface) 75%); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.fact:nth-child(2) { background: linear-gradient(145deg, var(--accent-soft), var(--surface) 75%); }
.fact:nth-child(3) { background: linear-gradient(145deg, var(--primary-soft), var(--surface) 75%); }
.fact-text { margin: 0; font-size: 1rem; line-height: 1.6; color: var(--text-soft); }
.fact-link { margin-top: auto; display: inline-flex; align-items: center; gap: .35rem; font-weight: 650; font-size: .9rem; text-decoration: none; }
.fact-link:hover { text-decoration: underline; }
