:root { --bg: #f6f6f2; --ink: #15201b; --muted: #55625c; --gold: #ffc82e; --line: rgba(21, 32, 27, 0.14); }
@media (prefers-color-scheme: dark) {
  :root { --bg: #101312; --ink: #f1f1ec; --muted: #a5b0aa; --line: rgba(241, 241, 236, 0.16); }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
main { max-width: 760px; margin: 0 auto; padding: 28px 20px 56px; overflow-wrap: break-word; }
h1 { font-size: 34px; margin: 12px 0 8px; letter-spacing: -0.01em; }
h2 { font-size: 21px; margin: 32px 0 6px; }
h3 { font-size: 17px; margin: 20px 0 4px; }
a { color: inherit; text-decoration-color: var(--gold); text-decoration-thickness: 2px; text-underline-offset: 3px; }
p, li { color: var(--ink); }
.muted { color: var(--muted); font-size: 15px; }
ul { padding-left: 22px; }
table { border-collapse: collapse; width: 100%; margin: 12px 0; font-size: 15px; }
th, td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--line); }
footer { margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 15px; }
footer a { margin-right: 16px; text-decoration: none; display: inline-block; padding: 10px 0; } /* Tippziel mindestens 44 px hoch */
footer a:hover { text-decoration: underline; }

ol { padding-left: 22px; }
.muted a { color: inherit; }
footer .social { display: block; margin-top: 10px; }
footer .social a { margin: 0 0 0 10px; }
/* Schmale Handys: lange Wörter in Tabellen umbrechen, statt die Seite seitlich scrollen zu lassen. */
@media (max-width: 480px) { table { font-size: 13px; } th, td { padding: 6px; overflow-wrap: anywhere; hyphens: auto; } }

/* Inhaltsverzeichnis langer Seiten (toc.js füllt <nav class="toc" hidden>): zwei Spalten, wo Platz ist, Unterabschnitte eingerückt;
   „↑ Inhalt“ unten rechts, sobald das Verzeichnis aus dem Bild ist. */
.toc { margin: 20px 0 8px; padding: 12px 18px 10px; border: 1px solid var(--line); border-radius: 16px; }
.toc-title { margin: 0 0 4px; font-weight: 800; }
.toc ol { list-style: none; margin: 0; padding: 0; columns: 2 280px; column-gap: 28px; font-size: 15px; line-height: 1.35; }
.toc li { break-inside: avoid; }
.toc li.sub { padding-left: 18px; }
.toc a { display: flex; align-items: center; min-height: 44px; padding: 4px 0; text-decoration: none; } /* Tipphöhe mindestens 44 px (Usability-Lauf 5) */
.toc a:hover, .toc a:focus-visible { text-decoration: underline; }
main h2[id] { scroll-margin-top: 12px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
.toc-back { position: fixed; right: 16px; bottom: max(16px, env(safe-area-inset-bottom)); z-index: 5; display: none; align-items: center;
  min-height: 44px; padding: 0 18px; border-radius: 99px; background: var(--gold); color: #15201b; font-weight: 800; font-size: 15px;
  text-decoration: none; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2); }
.toc-back.show { display: inline-flex; }
@media print { .toc-back { display: none !important; } }
