/* Das Stylesheet der Handbücher — dieselbe Bildsprache wie die Portale (portal.css der Vorlage):
 * kühles Hellgrau als Grund, Karten mit Haarlinie, Hierarchie über Größe und Gewicht, Akzent
 * 032-Grün in der dunklen Stufe, weil es hier als Text auf Weiß steht.
 *
 * ⚠️ Kein Tailwind, kein Framework: eine Doku-Seite braucht Fließtext-Typografie, und genau die
 * kennt portal.css nicht. Die Tokens sind dieselben Werte. */

:root {
  --bg: #F6F7F9;
  --surface: #FFFFFF;
  --sunken: #F1F3F6;
  --line: #E4E7EC;
  --line-soft: #EEF1F4;
  --ink: #1A1F2B;
  --ink-2: #5B6478;
  --ink-3: #8A93A6;
  --accent: #2F8F65;
  --accent-soft: #E6F4EC;
  --radius: 8px;
  --leiste: 260px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }

/* ── Kopfzeile ── */
.kopf {
  position: sticky; top: 0; z-index: 3;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  height: 56px; padding: 0 24px;
  background: var(--surface); border-bottom: 1px solid var(--line);
}
.marke { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 600; font-size: 15px; }
.marke:hover { text-decoration: none; }
.marke img { border-radius: 5px; }
.marke .dim { color: var(--ink-3); font-weight: 400; }
.kopf-rechts { display: flex; align-items: center; gap: 18px; }
.sprachen { display: flex; gap: 10px; font-size: 13px; }
.sprachen .aktiv { color: var(--ink); font-weight: 600; }
.sprachen a { color: var(--ink-2); }
.zentrum {
  font-size: 13px; font-weight: 500; color: var(--ink);
  border: 1px solid var(--line); border-radius: 6px; padding: 6px 12px; background: var(--surface);
}
.zentrum:hover { background: var(--sunken); text-decoration: none; }

/* ── Rahmen: Leiste + Inhalt ── */
.rahmen { display: flex; align-items: flex-start; gap: 28px; max-width: 1180px; margin: 0 auto; padding: 28px 24px 56px; }

/* ⚠️ Die Leiste bleibt stehen, wenn der Text scrollt — sticky mit eigenem Scroll. Das
 * Elternelement (`.rahmen`, flex, align-items: flex-start) ist so hoch wie der Inhalt, also hat
 * sticky Raum. Wer hier `height: 100%` an die Leiste schreibt, nimmt ihn wieder weg (dieselbe
 * Falle wie am 02.09.2026 in den Portalen). */
.leiste { flex: 0 0 var(--leiste); position: sticky; top: 76px; max-height: calc(100vh - 96px); overflow-y: auto; }
.leiste-mobil { display: none; }
.einstieg { display: block; font-size: 13px; font-weight: 600; color: var(--ink); padding: 6px 10px; border-radius: 6px; margin-bottom: 6px; }
.einstieg[aria-current="page"], .kapitel a[aria-current="page"] { background: var(--accent-soft); color: var(--ink); }
.kapitel { list-style: none; margin: 0; padding: 0; }
.kapitel a { display: flex; gap: 10px; align-items: baseline; padding: 6px 10px; border-radius: 6px; color: var(--ink-2); font-size: 13.5px; line-height: 1.4; }
.kapitel a:hover { background: var(--sunken); text-decoration: none; color: var(--ink); }
.kapitel a[aria-current="page"] { font-weight: 600; }
.kapitel .nr { flex: 0 0 18px; font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }

.inhalt { flex: 1 1 auto; min-width: 0; }
.prosa {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 32px 36px 36px; max-width: 78ch;
}
.uebersicht { padding-left: 22px; }
.uebersicht li { margin: 4px 0; }

/* ── Fließtext ── */
.prosa h1 { font-size: 26px; font-weight: 600; letter-spacing: -0.01em; margin: 0 0 18px; line-height: 1.25; }
.prosa h2 { font-size: 18px; font-weight: 600; margin: 30px 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.prosa h3 { font-size: 15.5px; font-weight: 600; margin: 24px 0 8px; }
.prosa p { margin: 0 0 12px; }
.prosa ul, .prosa ol { padding-left: 24px; margin: 0 0 12px; }
.prosa li { margin-bottom: 6px; }
.prosa li > p { margin: 0 0 6px; }
.prosa strong { font-weight: 600; }
.prosa code { background: var(--sunken); border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; font-size: 13px; }
.prosa blockquote {
  margin: 14px 0; padding: 10px 16px; border-left: 3px solid var(--accent);
  background: var(--sunken); border-radius: 0 var(--radius) var(--radius) 0; color: var(--ink-2);
}
.prosa blockquote p { margin: 4px 0; }
.prosa table { border-collapse: collapse; font-size: 14px; margin: 14px 0; display: block; overflow-x: auto; max-width: 100%; }
.prosa th, .prosa td { border: 1px solid var(--line); padding: 7px 11px; text-align: left; vertical-align: top; }
.prosa thead th { background: var(--sunken); font-weight: 600; color: var(--ink-2); }
.prosa td[align="right"], .prosa th[align="right"] { text-align: right; font-variant-numeric: tabular-nums; }
.prosa hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }

/* ── Blättern ── */
.blaettern { display: flex; justify-content: space-between; gap: 16px; margin-top: 18px; font-size: 14px; }
.blaettern a { color: var(--ink-2); }
.blaettern a:hover { color: var(--ink); }
.blaettern .weiter { text-align: right; margin-left: auto; }

/* ── Fuß ── */
.fuss {
  display: flex; flex-wrap: wrap; gap: 8px 22px; justify-content: center;
  padding: 18px 24px 28px; border-top: 1px solid var(--line);
  font-size: 12.5px; color: var(--ink-3);
}
.fuss a { color: var(--ink-3); }

/* ── Schmal ── */
@media (max-width: 860px) {
  .kopf { padding: 0 16px; height: auto; min-height: 52px; flex-wrap: wrap; row-gap: 6px; padding-top: 8px; padding-bottom: 8px; }
  .rahmen { flex-direction: column; gap: 14px; padding: 16px 12px 40px; }
  .leiste { position: static; flex: none; width: 100%; max-height: none; overflow: visible; }
  .leiste-breit { display: none; }
  .leiste-mobil { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 12px; }
  .leiste-mobil summary { cursor: pointer; font-weight: 600; font-size: 14px; padding: 4px 0; }
  .leiste-mobil .kapitel { margin-top: 6px; }
  .prosa { padding: 20px 18px 24px; max-width: none; }
  .prosa h1 { font-size: 22px; }
}
