/* Northbound Explore – Stylesheet */

:root {
  color-scheme: light;
  --bg: #fbfaf7;
  --surface: #ffffff;
  --surface-2: #f3f1ec;
  --ink: #142231;
  --ink-2: #3d4b5a;
  --ink-3: #6b7785;
  --line: #e4e0d8;
  --brand: #0f766e;
  --brand-ink: #0d5f59;
  --accent: #f59e0b;
  --tint-teal: #e6f6f3;
  --tint-amber: #fdf1dc;
  --tint-indigo: #eceefe;
  --tint-rose: #fde8e4;
  --s1: #2a78d6;
  --s2: #eb6834;
  --s3: #1baf7a;
  --s4: #7b5bd6;
  --shadow: 0 1px 2px rgba(20, 34, 49, .06), 0 8px 24px rgba(20, 34, 49, .07);
  --radius: 20px;
  --font: "Source Sans 3", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --font-serif: "Source Serif 4", Georgia, "Times New Roman", serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #0f1720;
    --surface: #16212c;
    --surface-2: #1c2935;
    --ink: #eef2f5;
    --ink-2: #c3ccd5;
    --ink-3: #93a0ad;
    --line: #2a3a49;
    --brand: #2dd4bf;
    --brand-ink: #5eead4;
    --tint-teal: #12302f;
    --tint-amber: #33280f;
    --tint-indigo: #1d2343;
    --tint-rose: #3a1f1c;
    --s1: #3987e5;
    --s2: #d95926;
    --s3: #199e70;
    --s4: #9a7ef0;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 18px/1.65 var(--font); overflow-x: hidden;
}
img, svg { max-width: 100%; }
a { color: var(--brand-ink); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.01em; margin: 0; }
h1 { font-family: var(--font-serif); font-weight: 600; }
p { margin: 0 0 1em; }
strong { font-weight: 650; }
/* Seitenbreite = Inhaltsverzeichnis + Abstand + Textspalte der Kapitel (250 + 56 + 760), damit Navigation,
   Titelgrafik und Text auch bei breiten Fenstern rechts bündig sind. Gilt für alle Seiten. */
.wrap { width: min(1066px, 100% - 32px); margin-inline: auto; }
.icon { width: 1.25em; height: 1.25em; flex: none; vertical-align: -.2em; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 16px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-size: 1.08rem; letter-spacing: -.01em; }
.brand b { color: var(--brand); font-weight: 700; }
.logo { width: 34px; height: 34px; }
.header-inner .brand { margin-right: auto; }
.site-nav { display: flex; gap: 6px; }
.site-nav a {
  color: var(--ink-2); text-decoration: none; font-size: .95rem; font-weight: 550;
  padding: 8px 14px; border-radius: 999px;
}
.site-nav a:hover { background: var(--surface-2); color: var(--ink); }
.site-nav a[aria-current="page"] { background: var(--tint-teal); color: var(--brand-ink); }
.search-btn { background: none; border: 1px solid var(--line); border-radius: 12px; padding: 8px; color: var(--ink); cursor: pointer; }
.search-btn:hover { background: var(--surface-2); }
.search-btn .icon { width: 24px; height: 24px; display: block; }
.menu-btn { display: none; background: none; border: 1px solid var(--line); border-radius: 12px; padding: 8px; color: var(--ink); cursor: pointer; }
.menu-btn .icon { width: 24px; height: 24px; display: block; }
@media (max-width: 760px) {
  .menu-btn { display: block; order: 3; }
  .site-nav {
    position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; padding: 12px 16px 18px;
    background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); display: none;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 12px 14px; }
}

/* ---------- Suche ---------- */
.search-dialog {
  width: min(720px, 100vw - 32px); max-width: none; max-height: min(760px, 100dvh - 96px); margin: 64px auto auto; padding: 0;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); box-shadow: var(--shadow); overflow: hidden;
}
.search-dialog[open] { display: flex; flex-direction: column; }
.search-dialog::backdrop { background: rgba(10, 18, 26, .55); }
/* Scrollsperre am body, nicht am html: Sonst wird body (overflow-x) ein eigener Scrollbereich, und in Safari
   verschwinden Kopfzeile und Inhaltsverzeichnis (position: sticky), auch nach dem Schliessen. */
.search-open body { overflow: hidden; }
.search-form { display: flex; align-items: center; gap: 12px; padding: 6px 10px 6px 20px; color: var(--ink-3); }
.search-form input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--ink); font: inherit; font-size: 1.1rem; padding: 6px 0; appearance: none; }
.search-form input::placeholder { color: var(--ink-3); opacity: 1; }
.search-close, .search-bar button { display: grid; place-items: center; width: 40px; height: 40px; flex: none; padding: 0; border: 0; border-radius: 12px; background: none; color: inherit; cursor: pointer; }
.search-close:hover, .search-bar button:hover { background: var(--surface-2); }
.search-status { margin: 0; padding: 10px 20px; border-top: 1px solid var(--line); font-size: .9rem; color: var(--ink-2); }
.search-status:empty { display: none; }
.search-results { overflow-y: auto; overscroll-behavior: contain; padding: 0 12px; }
.search-results:not(:empty) { padding-bottom: 12px; }
.search-results ul { list-style: none; margin: 0; padding: 0; }
.search-page { display: flex; justify-content: space-between; gap: 12px; position: sticky; top: 0; padding: 10px 12px 8px; background: var(--surface); font-size: .95rem; color: var(--brand-ink); }
.search-page-count { font-weight: 400; color: var(--ink-2); }
.search-result a { display: block; padding: 10px 12px; border-radius: 12px; color: var(--ink); text-decoration: none; font-size: .95rem; line-height: 1.45; }
.search-result a:hover, .search-result a:focus-visible { background: var(--surface-2); }
.search-result span { display: block; }
.search-parent, .search-count { font-size: .82rem; color: var(--ink-2); }
.search-title { font-weight: 650; }
.search-snippet { margin-top: 2px; color: var(--ink-2); overflow-wrap: anywhere; }
.search-mark { background: #fde68a; color: #142231; border-radius: 3px; box-shadow: 0 0 0 1px #fde68a; }
.search-mark.current { background: #f59e0b; box-shadow: 0 0 0 2px #f59e0b; }
.search-mark:focus { outline: 0; }
.search-bar {
  position: fixed; z-index: 55; left: 50%; bottom: 20px; transform: translateX(-50%); max-width: calc(100vw - 24px);
  display: flex; align-items: center; gap: 2px; padding: 6px 6px 6px 18px; border-radius: 18px;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); box-shadow: var(--shadow); font-size: .95rem;
}
.search-bar[hidden] { display: none; }
.search-bar-label { display: flex; gap: 8px; min-width: 0; margin-right: 6px; white-space: nowrap; }
.search-bar-term { overflow: hidden; text-overflow: ellipsis; }
.search-bar-count { flex: none; color: var(--ink-2); font-variant-numeric: tabular-nums; }
@media (max-width: 560px) {
  .search-bar { padding-left: 14px; }
  .search-bar button { width: 36px; }
  .search-dialog { width: 100vw; max-height: none; height: 100dvh; margin: 0; border: 0; border-radius: 0; }
}

/* ---------- Heroes ---------- */
.home-hero {
  position: relative; color: #fff; overflow: hidden;
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(253, 230, 138, .35), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(45, 212, 191, .35), transparent 60%),
    linear-gradient(135deg, #10284a 0%, #0f4c5c 55%, #0f766e 100%);
  padding: 72px 0 120px;
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 48px; align-items: center; }
.hero-text h1 { font-family: var(--font-serif); font-size: clamp(2.3rem, 5vw, 3.6rem); font-weight: 600; letter-spacing: -.015em; margin-bottom: 18px; }
.home-hero .subtitle { font-size: 1.18rem; color: rgba(255, 255, 255, .86); max-width: 34em; }
.kicker { text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; font-weight: 700; margin-bottom: 14px; opacity: .85; }
.hero-art .art { width: 100%; height: auto; display: block; filter: drop-shadow(0 24px 40px rgba(0, 0, 0, .25)); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 13px 22px; border-radius: 999px;
  font-weight: 650; text-decoration: none; transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: #fde68a; color: #10284a; box-shadow: 0 8px 20px rgba(253, 230, 138, .3); }
.btn-ghost { color: #fff; border: 1.5px solid rgba(255, 255, 255, .45); }
.btn-ghost:hover { background: rgba(255, 255, 255, .1); }
.hero-wave { position: absolute; left: 0; right: 0; bottom: -1px; height: 80px; }
.hero-wave svg { width: 100%; height: 100%; display: block; }

.chapter-hero { padding: 56px 0 64px; border-bottom: 1px solid var(--line); }
.chapter-hero h1 { font-size: clamp(2.2rem, 4.8vw, 3.4rem); margin-bottom: 10px; }
.chapter-hero .subtitle { font-size: 1.25rem; color: var(--ink-2); margin-bottom: 18px; }
.chapter-hero .kicker { color: var(--brand-ink); opacity: 1; }
.meta { display: inline-flex; align-items: center; gap: 8px; font-size: .92rem; color: var(--ink-2);
  background: var(--surface); border: 1px solid var(--line); padding: 6px 14px; border-radius: 999px; }
.chapter-hero .hero-art { max-width: 420px; justify-self: end; width: 100%; }
.theme-grow.chapter-hero { background: linear-gradient(160deg, var(--tint-teal), var(--bg) 70%); }
.theme-flow.chapter-hero { background: linear-gradient(160deg, var(--tint-amber), var(--bg) 70%); }
.theme-know.chapter-hero { background: linear-gradient(160deg, var(--tint-indigo), var(--bg) 70%); }
.theme-flow .kicker { color: #c2410c; }
.theme-know .kicker { color: #4338ca; }
@media (prefers-color-scheme: dark) {
  :root .theme-flow .kicker { color: #fdba74; }
  :root .theme-know .kicker { color: #a5b4fc; }
  :root .card.theme-flow .kicker { color: #fdba74; }
  :root .card.theme-know .kicker { color: #a5b4fc; }
}

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .chapter-hero .hero-art { justify-self: start; max-width: 320px; }
  .home-hero { padding: 48px 0 100px; }
  .home-hero .hero-art { max-width: 360px; }
}

/* ---------- Progress ---------- */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60; pointer-events: none; }
.progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--brand), var(--accent)); }

/* ---------- Kapitel-Layout ---------- */
.chapter-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 56px; padding: 48px 0 80px; }
.toc { position: sticky; top: 92px; align-self: start; max-height: calc(100vh - 110px); overflow: auto; padding-right: 6px; }
.toc-title { font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; font-weight: 700; color: var(--ink-3); margin-bottom: 10px; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.toc a {
  overflow-wrap: anywhere;
  display: flex; gap: 10px; padding: 7px 12px; margin-left: -2px; border-left: 2px solid transparent;
  font-size: .9rem; line-height: 1.4; color: var(--ink-2); text-decoration: none;
}
.toc a:hover { color: var(--ink); }
.toc a.active { border-left-color: var(--brand); color: var(--brand-ink); font-weight: 600; }
.toc-num { color: var(--ink-3); font-variant-numeric: tabular-nums; min-width: 1.2em; }
@media (max-width: 1020px) {
  .chapter-layout { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 28px; }
  .toc { position: static; max-height: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 18px 10px; margin-bottom: 32px; }
  .toc ol { columns: 2; column-gap: 24px; border: 0; }
  .toc a { border: 0; padding: 5px 0; margin: 0; break-inside: avoid; }
}
@media (max-width: 560px) { .toc ol { columns: 1; } }

.chapter { max-width: 760px; }
/* Automatische Silbentrennung im Fliesstext der Inhaltskapitel (nicht Impressum/Datenschutz) */
.chapter:not(.legal) :is(p, li, blockquote, td) {
  -webkit-hyphens: auto; hyphens: auto;
  hyphenate-limit-chars: 7 3 3;
}
.intro .lead { font-size: 1.22rem; line-height: 1.6; color: var(--ink); }
.intro p { color: var(--ink-2); }
.intro { margin-bottom: 40px; }

/* ---------- Abschnitte ---------- */
.section { padding-top: 24px; margin-top: 32px; border-top: 1px solid var(--line); }
.section-head { display: flex; gap: 16px; align-items: center; margin-bottom: 24px; }
.section-icon {
  width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; flex: none;
  color: #fff; background: linear-gradient(135deg, #14b8a6, #1e3a8a); box-shadow: 0 6px 16px rgba(15, 118, 110, .28);
}
.section-icon .icon { width: 26px; height: 26px; }
.theme-flow ~ .chapter-layout .section-icon { background: linear-gradient(135deg, #fb923c, #e11d48); box-shadow: 0 6px 16px rgba(225, 29, 72, .22); }
.theme-know ~ .chapter-layout .section-icon { background: linear-gradient(135deg, #818cf8, #1e3a8a); box-shadow: 0 6px 16px rgba(67, 56, 202, .25); }
.section-num { display: block; font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-3); font-weight: 700; margin-bottom: 2px; }
.section h2 { font-family: var(--font-serif); font-weight: 600; font-size: clamp(1.55rem, 3vw, 2rem); letter-spacing: -.01em; }
.sub { margin-top: 34px; }
.sub h3 { font-size: 1.25rem; margin-bottom: 12px; }
.chapter ul, .chapter ol { padding-left: 1.3em; margin: 0 0 1.1em; }
.chapter li { margin-bottom: .45em; }
.chapter li::marker { color: var(--brand); }

.callout {
  display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; margin: 18px 0 20px;
  border-radius: 16px; border: 1px solid var(--line);
}
.callout p { margin: 0; }
.callout .icon { width: 22px; height: 22px; margin-top: 3px; }
.callout-important { background: var(--tint-amber); border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
.callout-important .icon { color: #b45309; }
.callout-note { background: var(--surface-2); font-size: .93rem; color: var(--ink-2); }
.callout-note .icon { color: var(--ink-3); }
.highlight {
  font-family: var(--font-serif); font-size: 1.25rem; line-height: 1.5; padding: 20px 24px; margin: 24px 0;
  background: linear-gradient(135deg, var(--tint-teal), var(--tint-indigo)); border-radius: var(--radius);
}
.formula {
  text-align: center; font-weight: 650; padding: 18px; margin: 20px 0; border-radius: 16px;
  background: var(--surface); border: 1px dashed var(--brand); color: var(--brand-ink);
}
.fineprint { font-size: .88rem; color: var(--ink-3); }

/* ---------- Tabellen ---------- */
.table-wrap { overflow-x: auto; margin: 18px 0 24px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: .94rem; font-variant-numeric: tabular-nums; }
th, td { padding: 11px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--surface-2); font-weight: 650; font-size: .86rem; color: var(--ink-2); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
.right { text-align: right; }
.left { text-align: left; }

/* ---------- Grafiken ---------- */
.figure {
  margin: 26px 0 30px; padding: 22px 22px 16px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.figure svg { display: block; width: 100%; height: auto; overflow: visible; }
.figure-title { font-weight: 650; margin-bottom: 8px; }
.figure figcaption { font-size: .88rem; color: var(--ink-3); margin-top: 10px; line-height: 1.55; }
.figure .grid { stroke: var(--line); stroke-width: 1; }
.figure .axis { stroke: var(--ink-3); stroke-width: 1; }
.figure .tick { fill: var(--ink-3); font-size: 12px; font-family: var(--font); }
.figure .tick.strong { fill: var(--ink-2); font-weight: 600; font-size: 13px; }
.figure .value { fill: var(--ink); font-size: 13px; font-weight: 650; font-family: var(--font); }
.figure .inbar { fill: #fff; font-size: 13px; font-weight: 650; font-family: var(--font); }
.figure .line { fill: none; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.figure .dot { stroke: var(--surface); stroke-width: 2; }
.figure .hit { fill: transparent; cursor: crosshair; }
.figure .hit:hover { fill: color-mix(in srgb, var(--ink) 5%, transparent); }
.figure.illus { background:linear-gradient(135deg, var(--surface), var(--surface-2)); }
.figure svg.narrow { max-width: 340px; margin: 4px auto 0; display: block; }
.figure svg.mid { max-width: 540px; display: block; }
.orderbook { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 6px; }
@media (max-width: 560px) { .orderbook { grid-template-columns: minmax(0, 1fr); } .orderbook svg { max-width: 340px; margin: 0 auto; } }
/* Rechner */
.calc-inputs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 22px; margin: 14px 0 20px; }
.calc-field { display: flex; flex-direction: column; gap: 8px; font-size: .92rem; color: var(--ink-2); font-weight: 600; }
.calc-field output { color: var(--brand-ink); font-variant-numeric: tabular-nums; }
.calc-field small { font-weight: 400; color: var(--ink-3); font-size: .82rem; }
.calc-money { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); overflow: hidden; }
.calc-money:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 20%, transparent); }
.calc-money input {
  flex: 1; min-width: 0; border: 0; background: transparent; padding: 10px 12px; color: var(--ink);
  font: inherit; font-size: 1.05rem; font-weight: 650; font-variant-numeric: tabular-nums; outline: none;
}
.calc-money > span { padding: 0 12px; color: var(--ink-3); font-weight: 600; }
.calc-field input[type="range"] { width: 100%; accent-color: var(--brand); margin: 6px 0 0; }
.calc-results { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.calc-result { background: var(--surface-2); border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; }
.calc-result .calc-label { flex: 1; } /* Beträge stehen unten und damit auf einer Linie */
.calc-result:first-child { background: var(--tint-teal); }
.calc-result p { margin: 0; }
.chapter .calc p { -webkit-hyphens: manual; hyphens: manual; }
.calc-label { font-size: .9rem; color: var(--ink-2); line-height: 1.45; }
.calc-value { font-family: var(--font-serif); font-size: 1.6rem; font-weight: 600; color: var(--ink); margin-top: 6px !important; font-variant-numeric: tabular-nums; }
.calc-meter { height: 10px; border-radius: 99px; background: var(--surface-2); margin: 18px 0 6px; overflow: hidden; }
.calc-meter span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--brand), var(--s1)); transition: width .2s ease; }
.calc-meter-label { font-size: .88rem; color: var(--ink-2); margin: 0; }
/* Drei Töpfe */
.pot-list { list-style: none; padding: 0 !important; margin: 14px 0 0 !important; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.pot-list li::marker { content: ""; }
.chapter .pot-list li { margin: 0; }
.pot { --pot: var(--s1); --pot-tint: var(--tint-indigo); border-radius: 16px; padding: 16px; background: var(--pot-tint); border-top: 4px solid var(--pot); display: flex; flex-direction: column; }
.pot-soon { --pot: var(--accent); --pot-tint: var(--tint-amber); }
.pot-long { --pot: var(--s3); --pot-tint: var(--tint-teal); }
.pot-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 10px; } /* Icons oben, damit sie auch bei zweizeiligem Titel auf einer Linie stehen */
.pot-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--pot); color: #fff; }
.pot-icon .icon { width: 22px; height: 22px; }
.chapter .pots p { margin: 0; }
.chapter .pots :is(p, li, dd) { -webkit-hyphens: manual; hyphens: manual; }
.pot-title { font-weight: 700; line-height: 1.25; }
.pot-horizon { font-size: .86rem; color: var(--ink-2); }
.pot-purpose { font-size: .92rem; color: var(--ink-2); line-height: 1.5; flex: 1; }
.pot-facts { margin: 12px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 10px; font-size: .86rem; align-items: center; }
.pot-facts dt { color: var(--ink-3); font-weight: 600; }
.pot-facts dd { margin: 0; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.figure .pot-wave { width: 54px; height: 16px; flex: none; }
.pot-wave path { fill: none; stroke: var(--pot); stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; }
.pot-axis { position: relative; display: flex; justify-content: space-between; margin: 14px 0 0; padding-top: 10px; font-size: .82rem; color: var(--ink-3); font-weight: 600; }
.pot-axis::before { content: ""; position: absolute; top: 0; left: 0; right: 8px; height: 3px; border-radius: 3px; background: linear-gradient(90deg, var(--s1), var(--accent), var(--s3)); }
.pot-axis::after { content: ""; position: absolute; top: -4px; right: 0; border: 5.5px solid transparent; border-left: 9px solid var(--s3); border-right: 0; }
@media (max-width: 640px) {
  .pot-list { grid-template-columns: minmax(0, 1fr); }
  .pot-axis { display: none; }
}

/* Währungsrechner: Balken um eine Nulllinie */
.fx-rows { display: grid; gap: 10px; margin: 4px 0 12px; }
.fx-row { display: grid; grid-template-columns: 200px minmax(0, 1fr) 72px; align-items: center; gap: 12px; font-size: .9rem; color: var(--ink-2); }
.fx-row.total { color: var(--ink); font-weight: 700; padding-top: 10px; border-top: 1px solid var(--line); }
.fx-track { position: relative; height: 22px; border-radius: 6px; background: var(--surface-2); }
.fx-track::after { content: ""; position: absolute; left: calc(50% - 1px); top: -4px; bottom: -4px; width: 2px; border-radius: 2px; background: var(--ink-3); }
.fx-bar { position: absolute; top: 0; bottom: 0; border-radius: 6px; background: var(--s3); transition: left .2s ease, width .2s ease; }
.fx-bar.neg { background: var(--s2); }
.fx-val { text-align: right; font-variant-numeric: tabular-nums; font-weight: 650; color: var(--ink); }
.chapter .fx-sum { margin: 0 0 4px; font-size: .95rem; color: var(--ink-2); }
.fx-sum strong { color: var(--ink); font-variant-numeric: tabular-nums; }
@media (max-width: 560px) {
  .fx-row { grid-template-columns: minmax(0, 1fr) 64px; gap: 4px 10px; }
  .fx-label { grid-column: 1 / -1; }
}

/* SPIVA: 100 Felder für 100 % der Fonds */
.figure.spiva > svg { width: 100%; height: auto; display: block; margin: 6px 0 14px; }
.spiva-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.chapter .spiva p { margin: 0; }
.chapter .spiva :is(p) { -webkit-hyphens: manual; hyphens: manual; }
.spiva-stat { --c: var(--s2); padding: 10px 14px; border-radius: 12px; background: var(--surface-2); border-left: 4px solid var(--c); font-size: .9rem; color: var(--ink-2); line-height: 1.45; }
.spiva-stat.good { --c: var(--s3); }
.spiva-stat strong { display: block; font-family: var(--font-serif); font-size: 1.35rem; font-weight: 600; color: var(--c); }
@media (max-width: 560px) { .spiva-stats { grid-template-columns: minmax(0, 1fr); } }

/* Fahrplan in «Vom Wissen zur praktischen Umsetzung» */
.road-list { list-style: none; padding: 0 !important; margin: 14px 0 0 !important; counter-reset: none; }
.road-list li::marker { content: ""; }
.chapter .road-list li { margin: 0; }
.road-step { position: relative; display: flex; gap: 16px; padding-bottom: 18px; }
.road-step::before { content: ""; position: absolute; left: 21px; top: 46px; bottom: 2px; width: 3px; border-radius: 3px; background: linear-gradient(var(--brand), var(--s3)); opacity: .35; }
.road-icon { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--brand); color: var(--surface); box-shadow: 0 0 0 5px var(--surface); position: relative; }
.road-icon .icon { width: 22px; height: 22px; }
.road-body { padding-top: 2px; min-width: 0; }
.chapter .road p { margin: 0; }
.chapter .road :is(p, li) { -webkit-hyphens: manual; hyphens: manual; }
.road-num { font-size: .76rem; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); }
.road-title { font-weight: 700; line-height: 1.3; margin-top: 2px !important; }
.road-text { font-size: .93rem; color: var(--ink-2); line-height: 1.55; margin-top: 4px !important; }
.road-link { font-size: .86rem; margin-top: 6px !important; }
.road-link a { color: var(--brand-ink); font-weight: 600; text-decoration: none; }
.road-link a:hover { text-decoration: underline; }
.chapter .road .road-end { display: flex; align-items: center; gap: 16px; margin-top: 2px; padding: 12px 14px 12px 0; font-weight: 600; color: var(--ink); }
.road-end .road-icon { background: var(--s3); }

/* Vier Felder: Risikofähigkeit und Risikobereitschaft */
.quad-wrap { display: grid; grid-template-columns: 36px minmax(0, 1fr); grid-template-rows: auto auto; gap: 8px 8px; margin-top: 8px; }
.quad-y { grid-row: 1; grid-column: 1; display: flex; flex-direction: column; justify-content: space-between; align-items: center; font-size: .8rem; color: var(--ink-3); padding: 4px 0; }
.quad-y strong { writing-mode: vertical-rl; transform: rotate(180deg); }
.quad-x { grid-row: 2; grid-column: 2; display: flex; justify-content: space-between; font-size: .8rem; color: var(--ink-3); }
.quad-y strong, .quad-x strong { color: var(--ink-2); font-weight: 650; }
.quad-y, .quad-x { position: relative; }
.quad-grid { grid-row: 1; grid-column: 2; list-style: none; padding: 0 !important; margin: 0 !important; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.quad-grid li::marker { content: ""; }
.chapter .quad-grid li { margin: 0; }
.quad-cell { --q: var(--accent); border-radius: 14px; padding: 14px 16px; background: var(--tint-amber); border-left: 4px solid var(--q); }
.quad-teal { --q: var(--s3); background: var(--tint-teal); }
.quad-rose { --q: var(--s2); background: var(--tint-rose); }
.chapter .quad p { margin: 0; }
.chapter .quad :is(p, li) { -webkit-hyphens: manual; hyphens: manual; }
.quad-tag { font-size: .76rem; font-weight: 650; letter-spacing: .02em; color: var(--ink-3); text-transform: uppercase; }
.quad-title { font-weight: 700; margin-top: 4px !important; line-height: 1.3; }
.quad-text { font-size: .9rem; color: var(--ink-2); line-height: 1.5; margin-top: 4px !important; }
@media (max-width: 560px) {
  .quad-wrap { display: block; }
  .quad-y, .quad-x { display: none; }
  .quad-grid { grid-template-columns: minmax(0, 1fr); }
  .quad-teal { order: -1; } .quad-rose { order: 1; } /* von «beides hoch» bis «beides tief» */
}

/* Risikokarte am Anfang von «Risiken und Absicherung» */
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.rm-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 0 !important; margin: 0 0 12px !important; font-size: .84rem; color: var(--ink-2); }
.chapter .rm-legend li { margin: 0; display: flex; align-items: center; gap: 7px; }
.rm-wrap { overflow-x: auto; }
.riskmap table { font-size: .9rem; }
.riskmap th, .riskmap td { padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.riskmap thead th { background: none; text-align: center; color: var(--ink); font-size: .86rem; }
.riskmap tbody th { background: none; text-align: left; white-space: normal; font-weight: 400; padding-left: 0; }
.riskmap td { text-align: center; width: 18%; }
.riskmap tr:last-child th, .riskmap tr:last-child td { border-bottom: 0; }
.rm-name { display: block; font-weight: 700; color: var(--ink); }
.rm-name a { color: inherit; text-decoration-color: var(--line); text-underline-offset: 3px; }
.rm-name a:hover { text-decoration-color: currentColor; }
.rm-note { display: block; font-size: .82rem; color: var(--ink-2); line-height: 1.4; margin-top: 2px; }
.lvl { display: inline-block; width: 16px; height: 16px; border-radius: 50%; vertical-align: middle; flex: none; }
.lvl-hi { background: var(--s2); }
.lvl-mid { border: 2.5px solid var(--s2); opacity: .75; }
.lvl-no { width: 12px; height: 3px; border-radius: 2px; background: var(--ink-3); opacity: .5; }
.chapter .riskmap :is(p, li, th, td) { -webkit-hyphens: manual; hyphens: manual; }
@media (max-width: 560px) {
  .riskmap td { width: 20%; }
  .riskmap thead th { font-size: .78rem; padding: 8px 2px; }
  .rm-note { display: none; }
}

/* Karten für Risiken: Diversifikation und Bankkonkurs */
.risk-cards { list-style: none; padding: 0 !important; margin: 14px 0 0 !important; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.risk-cards.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.risk-cards li::marker { content: ""; }
.chapter .risk-cards li { margin: 0; }
.risk-card { --pot: var(--s1); border-radius: 16px; padding: 14px 16px 16px; background: var(--surface-2); display: flex; flex-direction: column; gap: 4px; }
.risk-card.bad { --pot: var(--s2); }
.risk-card.good { --pot: var(--s3); }
.risk-card.neutral { --pot: var(--s1); }
.risk-card.alt { --pot: var(--s4); }
.risk-card.gold { --pot: var(--accent); }
.figure .risk-card > svg { width: 100%; height: auto; display: block; margin-bottom: 8px; border-radius: 8px; }
.chapter .risk p { margin: 0; }
.chapter .risk :is(p, li, dd) { -webkit-hyphens: manual; hyphens: manual; }
.rc-title { font-weight: 700; line-height: 1.25; }
.rc-note { font-size: .88rem; color: var(--ink-2); line-height: 1.45; flex: 1; }
.chapter .risk .rc-more, .rc-more { margin: auto 0 0; padding-top: 12px; font-size: .88rem; font-weight: 600; } /* Link immer am unteren Kartenrand */
.rc-value { font-family: var(--font-serif); font-size: 1.5rem; font-weight: 600; color: var(--pot); font-variant-numeric: tabular-nums; margin-top: 4px !important; }
.risk-card .pot-head { margin-bottom: 6px; }
.risk-card .cake { width: 72px; height: 72px; flex: none; }
.cake-body { fill: color-mix(in srgb, var(--pot) 28%, transparent); stroke: var(--pot); stroke-width: 2; }
.cake-piece { fill: var(--accent); stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; }
.rc-sum { margin-top: auto !important; padding-top: 10px; border-top: 1px solid var(--line); font-size: .92rem; color: var(--ink-2); }
.rc-facts:has(+ .rc-sum) { margin-bottom: 12px; }
.rc-sum strong { color: var(--pot); font-family: var(--font-serif); font-size: 1.15rem; }
.rc-facts { margin: 6px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 8px 12px; font-size: .88rem; line-height: 1.45; }
.rc-facts dt { color: var(--ink-3); font-weight: 600; }
.rc-facts dd { margin: 0; color: var(--ink); }
.risk-cards.stacked .rc-facts { grid-template-columns: minmax(0, 1fr); gap: 2px; }
.risk-cards.stacked .rc-facts dd + dt { margin-top: 8px; }
.risk-cards.stacked .rc-facts dt { color: color-mix(in srgb, var(--ink-2) 50%, var(--ink-3)); font-weight: 700; }
.chapter .risk .risk-cards.stacked :is(p, dd) { -webkit-hyphens: auto; hyphens: auto; } /* schmale Kacheln: automatisch trennen */
.mx-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 12px; }
.mx-card { background: var(--surface-2); border-radius: 16px; padding: 14px 16px; }
.chapter .metrics p.mx-title { margin: 0 0 10px; font-weight: 700; font-size: .92rem; line-height: 1.3; }
.mx-rows { list-style: none; padding: 0 !important; margin: 0 !important; display: grid; gap: 8px; }
.chapter .mx-rows li { margin: 0; display: grid; grid-template-columns: 5.6em minmax(0, 1fr) auto; gap: 8px; align-items: center; font-size: .85rem; }
.mx-rows li::marker { content: ""; }
.mx-name { color: var(--ink-2); }
.mx-track { height: 10px; border-radius: 5px; background: color-mix(in srgb, var(--ink) 8%, transparent); overflow: hidden; }
.mx-bar { display: block; height: 100%; border-radius: 5px; }
.mx-val { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink); text-align: right; min-width: 6.6em; white-space: nowrap; }
@media (max-width: 640px) { .mx-grid { grid-template-columns: minmax(0, 1fr); } }
.cycle-num { font-family: var(--font-serif); font-size: 1.25rem; font-weight: 700; }
.cycle-when { font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); }
.chapter .risk .cycle-loop { margin-top: 14px; display: flex; gap: 10px; align-items: center; padding: 10px 14px;
  border-radius: 12px; background: var(--tint-teal); color: var(--ink-2); font-size: .92rem; line-height: 1.45; }
.cycle-loop .icon { width: 22px; height: 22px; flex: none; color: var(--brand-ink); }
@media (max-width: 640px) {
  .risk-cards, .risk-cards.two { grid-template-columns: minmax(0, 1fr); }
  .figure .risk-card > svg { max-height: 140px; }
}

.chart-controls { max-width: 320px; margin: 6px 0 14px; }
.chart-controls.two { max-width: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 28px; }
@media (max-width: 560px) { .chart-controls.two { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) {
  .calc-inputs, .calc-results { grid-template-columns: minmax(0, 1fr); }
}
.legend { list-style: none; padding: 0 !important; margin: 0 0 8px !important; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .86rem; color: var(--ink-2); }
.legend li { display: inline-flex; align-items: center; gap: 8px; margin: 0; }
.legend li::marker { content: ""; }
.swatch { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.data-table { margin-top: 8px; font-size: .88rem; }
.data-table summary { cursor: pointer; color: var(--brand-ink); font-weight: 600; width: max-content; }
.data-table .table-wrap { margin: 10px 0 4px; }
.data-table th:not(:first-child) { white-space: normal; vertical-align: bottom; } /* lange Spaltentitel dürfen umbrechen */
.data-table td { white-space: nowrap; } /* «Jahr 10» und Beträge bleiben auf einer Zeile */
.chart-tip {
  position: fixed; z-index: 80; pointer-events: none; max-width: 280px;
  background: var(--ink); color: var(--bg); font-size: .84rem; line-height: 1.45;
  padding: 8px 12px; border-radius: 10px; box-shadow: var(--shadow); white-space: pre-line;
}

/* ---------- FAQ ---------- */
.faq { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); margin: 12px 0; overflow: hidden; }
.faq summary {
  list-style: none; cursor: pointer; padding: 16px 52px 16px 20px; font-weight: 650; position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq-toggle { position: absolute; right: 18px; top: 50%; width: 22px; height: 22px; margin-top: -11px; border-radius: 50%; background: var(--tint-teal); }
.faq-toggle::before, .faq-toggle::after { content: ""; position: absolute; left: 6px; right: 6px; top: 10px; height: 2px; background: var(--brand-ink); border-radius: 2px; transition: transform .2s; }
.faq-toggle::after { transform: rotate(90deg); }
.faq[open] .faq-toggle::after { transform: rotate(0); }
.faq[open] summary { border-bottom: 1px solid var(--line); }
.faq-body { padding: 16px 20px 4px; }

/* ---------- Fazit & Quellen ---------- */
.section-fazit { background: linear-gradient(135deg, var(--tint-teal), var(--tint-indigo)); border: 0; border-radius: var(--radius); padding: 28px; }
.theme-flow ~ .chapter-layout .section-fazit { background: linear-gradient(135deg, var(--tint-amber), var(--tint-rose)); }
.section-fazit .table-wrap { background: var(--surface); }
.section-sources { font-size: .92rem; color: var(--ink-2); }
.section-sources .section-icon { width: 40px; height: 40px; border-radius: 12px; }
.section-sources .section-icon .icon { width: 20px; height: 20px; }
.section-sources h2 { font-size: 1.3rem; }

/* ---------- Pager ---------- */
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 56px; }
.pager-link {
  display: block; padding: 18px 22px; border-radius: var(--radius); background: var(--surface);
  border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-weight: 650; font-size: 1.05rem;
  transition: border-color .15s, transform .15s;
}
.pager-link span { display: block; font-size: .8rem; color: var(--ink-3); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 4px; }
.pager-link:hover { border-color: var(--brand); transform: translateY(-2px); }
.pager-link.next { text-align: right; grid-column: 2; }
@media (max-width: 560px) { .pager { grid-template-columns: 1fr; } .pager-link.next { grid-column: 1; } }

/* ---------- Startseite ---------- */
.home-section { padding: 72px 0; }
.eyebrow { color: var(--brand-ink); font-weight: 700; text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; margin-bottom: 8px; }
.home-section h2, .home-band h2 { font-family: var(--font-serif); font-size: clamp(1.85rem, 3.6vw, 2.5rem); font-weight: 600; margin-bottom: 12px; }
.section-lead { color: var(--ink-2); font-size: 1.1rem; max-width: 40em; margin-bottom: 36px; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card {
  display: flex; flex-direction: column; border-radius: 26px; overflow: hidden; text-decoration: none; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 20px 40px rgba(20, 34, 49, .14); }
.card-art { padding: 18px 18px 0; }
.card-art .art { display: block; width: 100%; height: auto; }
.card-body { padding: 18px 24px 22px; display: flex; flex-direction: column; flex: 1; }
.card .kicker { color: var(--brand-ink); opacity: 1; margin-bottom: 6px; font-size: .72rem; letter-spacing: .1em; }
.card.theme-flow .kicker { color: #c2410c; }
.card.theme-know .kicker { color: #4338ca; }
.card h3 { font-family: var(--font-serif); font-weight: 600; font-size: 1.55rem; margin-bottom: 6px; }
.card p { color: var(--ink-2); font-size: .98rem; }
.chips { list-style: none; padding: 0; margin: 0 0 18px; display: flex; flex-wrap: wrap; gap: 6px; }
.chips li { font-size: .78rem; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); }
.card-meta { margin-top: auto; display: flex; align-items: center; gap: 8px; font-size: .88rem; color: var(--ink-3); }
.card-meta .arrow { margin-left: auto; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--tint-teal); color: var(--brand-ink); transition: transform .2s; }
.card:hover .arrow { transform: translateX(4px); }
@media (max-width: 960px) { .cards { grid-template-columns: 1fr; max-width: 560px; } }

.home-band { background: linear-gradient(180deg, var(--surface-2), var(--bg)); padding: 72px 0; border-block: 1px solid var(--line); }
.audiences { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 32px; }
.audience { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; }
.audience h3 { font-size: 1.15rem; margin: 14px 0 8px; }
.audience p { color: var(--ink-2); font-size: .95rem; }
.audience a { margin-top: auto; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: .92rem; text-decoration: none; }
.audience-icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; color: #fff; }
.audience-icon .icon { width: 24px; height: 24px; }
.audience:nth-child(1) .audience-icon { background: linear-gradient(135deg, #34d399, #0f766e); }
.audience:nth-child(2) .audience-icon { background: linear-gradient(135deg, #38bdf8, #1d4ed8); }
.audience:nth-child(3) .audience-icon { background: linear-gradient(135deg, #fb923c, #e11d48); }
.audience:nth-child(4) .audience-icon { background: linear-gradient(135deg, #a78bfa, #4338ca); }
@media (max-width: 1020px) { .audiences { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .audiences { grid-template-columns: 1fr; } }

.principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 32px 0 48px; }
.principle { display: flex; gap: 16px; padding: 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.principle h3 { font-size: 1.08rem; margin-bottom: 6px; }
.principle p { color: var(--ink-2); font-size: .95rem; margin: 0; }
.principle-icon { width: 44px; height: 44px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--tint-teal); color: var(--brand-ink); }
.principle-icon .icon { width: 22px; height: 22px; }
.principle:nth-child(3) .principle-icon { background: var(--tint-rose); color: #dc2626; }
@media (max-width: 900px) { .principles { grid-template-columns: 1fr; } }
.quote {
  margin: 0; padding: 36px 40px; border-radius: 28px; position: relative; overflow: hidden; color: #fff;
  background: linear-gradient(135deg, #10284a, #0f766e);
}
.quote > .icon { position: absolute; right: -30px; top: -30px; width: 180px; height: 180px; opacity: .12; }
.quote p { font-family: var(--font-serif); font-size: clamp(1.25rem, 2.5vw, 1.6rem); line-height: 1.5; max-width: 38em; position: relative; }
.quote cite { font-style: normal; font-size: .9rem; opacity: .8; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--surface-2); padding: 48px 0 36px; font-size: .92rem; color: var(--ink-2); }
.footer-inner { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px 48px; }
.footer-inner nav { display: flex; flex-direction: column; gap: 6px; }
.footer-inner nav a { color: var(--ink-2); text-decoration: none; }
.footer-inner nav a:hover { color: var(--brand-ink); text-decoration: underline; }
.footer-inner .brand { margin-bottom: 10px; }
.disclaimer { grid-column: 1 / -1; font-size: .82rem; color: var(--ink-3); border-top: 1px solid var(--line); padding-top: 20px; margin: 0; }
@media (max-width: 640px) { .footer-inner { grid-template-columns: 1fr; } }

@media print {
  .site-header, .search-bar, .toc, .pager, .progress, .hero-art, .site-footer nav { display: none; }
  .chapter-layout { display: block; }
  .faq { break-inside: avoid; }
  .faq-body { display: block; }
}

/* Diagrammschrift auf kleinen Bildschirmen vergrössern (SVG wird verkleinert) */
@media (max-width: 560px) {
  .figure { padding: 16px 14px 12px; }
  .figure .tick { font-size: 20px; }
  .figure .tick.strong { font-size: 16px; }
  .figure .tick.sub { font-size: 18px; } /* zweite Zeile unter Balken: kleiner, damit sie die erste nicht berührt */
  .figure svg.mid .tick.strong { font-size: 19px; } /* schmale Grafiken: fette Beschriftung gleich gross wie die übrigen */
  .figure .value, .figure .inbar { font-size: 19px; }
  .figure .inbar.tight { font-size: 15px; } /* Zahl in einem schmalen Balkenteil */
}

/* ---------- Rechtliche Seiten ---------- */
.legal-hero { padding: 56px 0 40px; border-bottom: 1px solid var(--line);
  background: linear-gradient(160deg, var(--surface-2), var(--bg) 70%); }
.legal-hero .kicker { color: var(--brand-ink); opacity: 1; }
.legal-hero h1 { font-size: clamp(2.2rem, 4.6vw, 3.2rem); }
.legal-layout { padding: 40px 0 80px; }
.legal { max-width: 720px; }
.legal h2 { font-family: var(--font-serif); font-weight: 600; font-size: 1.5rem; margin: 40px 0 12px; }
.legal > p:first-of-type { font-size: 1.12rem; }
.lines { line-height: 1.6; }
.placeholder { background: var(--tint-amber); color: inherit; border: 1px dashed var(--accent); border-radius: 6px; padding: 0 6px; }
.draft-note { margin-top: 0; }
.legal-links { grid-column: 1 / -1; margin: 0; }
.legal-links a { color: var(--ink-2); }
.legal-links a[aria-current="page"] { color: var(--brand-ink); font-weight: 600; }

/* Notgroschen: sechs Monatsblöcke */
[data-calc="budget"] .calc-field input[type="range"], [data-calc="smoothing"] .calc-field input[type="range"], [data-calc="longevity"] .calc-field input[type="range"] { margin-top: auto; }
[data-calc="budget"] .calc-field output, [data-calc="smoothing"] .calc-field output, [data-calc="longevity"] .calc-field output { white-space: nowrap; }
/* Vier Regler: auf breiten Bildschirmen zwei mal zwei statt drei plus einer */
@media (min-width: 561px) { [data-calc="longevity"] .calc-inputs { grid-template-columns: 1fr 1fr; } }
/* Glättung: Zwischenwert links neutral, das Ergebnis rechts hervorgehoben */
[data-calc="smoothing"] .calc-result:first-child { background: var(--surface-2); }
[data-calc="smoothing"] .calc-result:last-child { background: var(--tint-teal); }
.budget-bar { display: flex; gap: 2px; height: 34px; border-radius: 10px; overflow: hidden; background: var(--surface-2); margin: 0 0 18px; }
.budget-bar span { display: block; height: 100%; transition: width .2s ease; }
.budget-income { background: var(--s3); }
.budget-draw { background: var(--s1); }
.month-strip { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; margin: 16px 0 4px; }
.month-strip span { text-align: center; font-size: .8rem; font-weight: 650; padding: 6px 0; border-radius: 8px; font-variant-numeric: tabular-nums; }
.month-strip .core { background: var(--brand); color: var(--surface); }
.month-strip .extra { background: var(--tint-teal); color: var(--brand-ink); border: 1px dashed var(--brand); }

/* Zwei kleine Diagramme nebeneinander */
.panels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.chapter .panel-title { font-size: .9rem; font-weight: 650; color: var(--ink-2); margin: 0 0 4px; }
@media (max-width: 640px) { .panels { grid-template-columns: minmax(0, 1fr); } }
/* Die Panels sind schmal gezeichnet und werden auf dem Handy kaum verkleinert: keine Schriftvergrösserung */
.panel .tick { font-size: 12px; }
.panel .value { font-size: 13px; }
