
:root {
  --bg: #FBFAF7; --bg-2: #F1EEE7; --surface: #FFFFFF; --surface-2: #F7F5F0;
  --line: #E3E0D9; --line-2: #ECE9E2;
  --text: #14181A; --text-body: #3F484C; --text-muted: #5B6569; --text-soft: #8A9599;
  --drive: #D2451E; --drive-deep: #A83C1B; --drive-soft: #F6EEE9;
  --code-bg: #14181A; --code-text: #E9EDEE; --code-line: #2A3033;
  --ok: #1F7A4D; --ok-bg: #E8F3EC; --info: #1D5F8C; --info-bg: #E7F0F6;
  --warn: #8A5A00; --warn-bg: #FBF1DC; --danger: #A3261B; --danger-bg: #FAE9E6;
  --radius: 8px;
  --schrift: 'Instrument Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --anzeige: 'Bricolage Grotesque', 'Instrument Sans', ui-sans-serif, system-ui, sans-serif;
  --mono: ui-monospace, 'SFMono-Regular', 'JetBrains Mono', Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111416; --bg-2: #171B1D; --surface: #1B2023; --surface-2: #20262A;
    --line: #2A3033; --line-2: #242A2D;
    --text: #F1F3F3; --text-body: #C6CFD1; --text-muted: #A9B3B6; --text-soft: #8A9599;
    --drive: #EE6A43; --drive-deep: #F08A69; --drive-soft: #2A1C17;
    --code-bg: #0B0D0E; --code-text: #E9EDEE; --code-line: #23292C;
    --ok: #5CC596; --ok-bg: #14261D; --info: #7DB8E0; --info-bg: #13212B;
    --warn: #E5B454; --warn-bg: #2A2112; --danger: #F08A7E; --danger-bg: #2C1614;
    color-scheme: dark;
  }
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body { margin: 0; background: var(--bg); color: var(--text-body); font: 16px/1.65 var(--schrift); }
a { color: var(--drive-deep); text-underline-offset: 3px; }
a:hover { color: var(--drive); }
img { max-width: 100%; height: auto; }
:focus-visible { outline: 2px solid var(--drive); outline-offset: 2px; }
.sprung { position: absolute; left: -9999px; top: 8px; background: var(--surface); padding: 8px 12px; border-radius: var(--radius); z-index: 50; }
.sprung:focus { left: 16px; }

/* Kopf */
.kopf { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.kopf-innen { max-width: 1440px; margin: 0 auto; padding: 12px 24px; display: flex; align-items: center; gap: 16px; }
.marke { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font: 600 16px/1 var(--anzeige); letter-spacing: -0.01em; white-space: nowrap; }
.marke:hover { color: var(--text); }
.marke-zeichen { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 7px; background: var(--drive); color: #fff; font-size: 12px; font-weight: 700; letter-spacing: 0; }
.marke-zusatz { color: var(--text-muted); font-weight: 500; }
.suche { flex: 1; max-width: 420px; margin-left: auto; position: relative; }
.suche input { width: 100%; font: inherit; font-size: 14px; padding: 8px 36px 8px 12px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); color: var(--text); }
.suche kbd { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); font: 12px var(--mono); color: var(--text-soft); border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; }
.kopf-links { display: flex; gap: 18px; font-size: 14px; }
.kopf-links a { color: var(--text-muted); text-decoration: none; font-weight: 500; }
.kopf-links a:hover { color: var(--text); }
.suche-link { display: none; font-size: 14px; font-weight: 500; padding: 7px 12px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); color: var(--text); text-decoration: none; margin-left: auto; }
.menue-knopf { display: none; font: inherit; font-size: 14px; font-weight: 500; padding: 7px 12px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; }

.band { border-bottom: 1px solid var(--line); padding: 10px 24px; font-size: 14px; text-align: center; }
.band-info { background: var(--info-bg); color: var(--info); }
.band-warnung { background: var(--warn-bg); color: var(--warn); }
.band-vorschau { background: var(--drive-soft); color: var(--drive-deep); font-weight: 600; }

/* Rahmen */
.rahmen { max-width: 1440px; margin: 0 auto; padding: 0 24px; display: grid; grid-template-columns: 250px minmax(0, 1fr) 220px; gap: 48px; }
.rahmen.ohne-toc { grid-template-columns: 250px minmax(0, 1fr); }
.seitennav { position: sticky; top: 64px; align-self: start; max-height: calc(100vh - 64px); overflow-y: auto; padding: 28px 4px 40px 0; font-size: 14.5px; }
.seitennav h2 { font: 600 11.5px/1 var(--schrift); text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-soft); margin: 22px 0 8px; }
.seitennav h2:first-child { margin-top: 0; }
.seitennav h2 a { color: inherit; text-decoration: none; }
.seitennav ul { list-style: none; margin: 0; padding: 0; }
.seitennav li a { display: block; padding: 5px 10px; margin-left: -10px; border-radius: 6px; color: var(--text-muted); text-decoration: none; line-height: 1.4; }
.seitennav li a:hover { background: var(--surface-2); color: var(--text); }
.seitennav li a[aria-current="page"] { background: var(--drive-soft); color: var(--drive-deep); font-weight: 600; }
.haupt { min-width: 0; padding: 32px 0 64px; }
.pfad { font-size: 13.5px; color: var(--text-soft); margin-bottom: 14px; }
.pfad a { color: var(--text-muted); text-decoration: none; }
.pfad a:hover { color: var(--text); }
.pfad span[aria-hidden] { margin: 0 7px; }

/* Artikel */
.artikel { max-width: 780px; }
.artikel h1 { font: 700 clamp(30px, 4vw, 40px)/1.12 var(--anzeige); letter-spacing: -0.03em; color: var(--text); margin: 0 0 12px; }
.artikel .lead { font-size: 18.5px; line-height: 1.55; color: var(--text-muted); margin: 0 0 28px; }
.artikel h2 { font: 650 24px/1.25 var(--anzeige); letter-spacing: -0.02em; color: var(--text); margin: 48px 0 12px; padding-top: 8px; }
.artikel h3 { font: 600 18.5px/1.35 var(--schrift); color: var(--text); margin: 32px 0 8px; }
.artikel h4 { font: 600 16px/1.4 var(--schrift); color: var(--text); margin: 24px 0 6px; }
.artikel h1 + .lead + h2, .artikel h1 + h2 { margin-top: 24px; }
.artikel .anker { float: left; margin-left: -1.1em; width: 1.1em; color: var(--text-soft); text-decoration: none; opacity: 0; font-weight: 400; }
.artikel h2:hover .anker, .artikel h3:hover .anker, .artikel h4:hover .anker, .artikel .anker:focus { opacity: 1; }
.artikel h1 .anker { display: none; }
.artikel p, .artikel ul, .artikel ol { margin: 0 0 16px; }
.artikel li { margin: 4px 0; }
.artikel li > p { margin: 0; }
.artikel strong { color: var(--text); font-weight: 600; }
.artikel hr { border: 0; border-top: 1px solid var(--line); margin: 40px 0; }
.artikel code { font: 0.88em/1.5 var(--mono); background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 5px; padding: 1px 5px; color: var(--text); word-break: break-word; }
.artikel blockquote { margin: 0 0 16px; padding: 4px 18px; border-left: 3px solid var(--line); color: var(--text-muted); }
.artikel input[type="checkbox"] { margin-right: 8px; accent-color: var(--drive); }
.artikel li:has(> input[type="checkbox"]) { list-style: none; margin-left: -1.3em; }

/* Code */
.code { position: relative; margin: 16px 0 20px; border-radius: var(--radius); background: var(--code-bg); border: 1px solid var(--code-line); }
.code pre { margin: 0; padding: 16px 18px; overflow-x: auto; }
.code code, .artikel .code code { background: none; border: 0; padding: 0; color: var(--code-text); font: 13.5px/1.6 var(--mono); white-space: pre; word-break: normal; }
.code-sprache { position: absolute; left: 14px; top: -10px; font: 600 11px/1 var(--mono); color: var(--text-soft); background: var(--bg); padding: 3px 7px; border-radius: 4px; border: 1px solid var(--line); }
.kopieren { position: absolute; right: 8px; top: 8px; font: 500 12px/1 var(--schrift); padding: 6px 9px; border-radius: 6px; border: 1px solid var(--code-line); background: #1F2528; color: #C6CFD1; cursor: pointer; opacity: 0; transition: opacity .15s; }
.code:hover .kopieren, .kopieren:focus { opacity: 1; }
.kopieren.fertig { color: #8FE0B5; }
@media (hover: none) { .kopieren { opacity: 1; } }

/* Tabellen */
.tabelle { overflow-x: auto; margin: 0 0 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.tabelle table { border-collapse: collapse; width: 100%; font-size: 14.5px; line-height: 1.5; }
.tabelle th { text-align: left; font-weight: 600; color: var(--text); background: var(--surface-2); padding: 9px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tabelle td { padding: 9px 14px; border-top: 1px solid var(--line-2); vertical-align: top; }
.tabelle tr:first-child td { border-top: 0; }
.tabelle td:first-child { white-space: nowrap; }
.tabelle.breit table { min-width: 720px; }
.tabelle code { white-space: nowrap; }
.werte { display: inline-flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.werte code { font-size: 12px; }
.alias { font-size: 12.5px; color: var(--text-soft); }
.feldliste { display: flex; flex-wrap: wrap; gap: 6px; }
.methode { display: inline-block; font: 700 11px/1 var(--mono); padding: 4px 6px; border-radius: 4px; letter-spacing: 0.03em; }
.methode-get { background: var(--ok-bg); color: var(--ok); }
.methode-post { background: var(--info-bg); color: var(--info); }
.marke-sandbox { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 7px; border-radius: 999px; background: var(--warn-bg); color: var(--warn); white-space: nowrap; }

/* Hinweise */
.hinweis { margin: 0 0 20px; padding: 12px 16px; border-radius: var(--radius); border: 1px solid transparent; border-left-width: 4px; }
.hinweis > :last-child { margin-bottom: 0; }
.hinweis-titel { font-weight: 700; font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase; margin: 0 0 4px !important; }
.hinweis-info { background: var(--info-bg); border-color: var(--info); }
.hinweis-info .hinweis-titel { color: var(--info); }
.hinweis-tipp { background: var(--ok-bg); border-color: var(--ok); }
.hinweis-tipp .hinweis-titel { color: var(--ok); }
.hinweis-wichtig { background: var(--drive-soft); border-color: var(--drive); }
.hinweis-wichtig .hinweis-titel { color: var(--drive-deep); }
.hinweis-warnung { background: var(--warn-bg); border-color: var(--warn); }
.hinweis-warnung .hinweis-titel { color: var(--warn); }
.hinweis-vorsicht { background: var(--danger-bg); border-color: var(--danger); }
.hinweis-vorsicht .hinweis-titel { color: var(--danger); }

/* Beispiele, Szenarien */
details.beispiel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); margin: 0 0 10px; }
details.beispiel > summary { cursor: pointer; padding: 10px 14px; font-weight: 500; color: var(--text); }
details.beispiel[open] > summary { border-bottom: 1px solid var(--line); }
details.beispiel .code { margin: 12px; }
.szenarien { display: grid; gap: 14px; margin: 0 0 20px; }
.szenario { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 14px 18px; }
.szenario p { margin: 0 0 8px; }
.szenario-titel { color: var(--text); }
.szenario ol { margin: 0; padding-left: 1.3em; font-size: 14.5px; }
.szenario ol code { font-size: 12px; margin-left: 2px; }

/* Inhaltsverzeichnis rechts */
.toc { position: sticky; top: 64px; align-self: start; max-height: calc(100vh - 64px); overflow-y: auto; padding: 32px 0 40px; font-size: 13.5px; }
.toc p { font: 600 11.5px/1 var(--schrift); text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-soft); margin: 0 0 10px; }
.toc ul { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc li a { display: block; padding: 4px 0 4px 12px; margin-left: -1px; border-left: 2px solid transparent; color: var(--text-muted); text-decoration: none; line-height: 1.4; }
.toc li.tief a { padding-left: 24px; }
.toc li a:hover { color: var(--text); }
.toc li a.aktiv { color: var(--drive-deep); border-left-color: var(--drive); }
details.toc-klein { display: none; margin: 0 0 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 10px 14px; font-size: 14px; }
details.toc-klein summary { cursor: pointer; font-weight: 600; color: var(--text); }
details.toc-klein ul { margin: 8px 0 0; padding-left: 18px; }

/* Seitenfuss */
.seitenfuss { max-width: 780px; margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 14px; color: var(--text-muted); }
.weiter { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0 0 24px; }
.weiter a { display: block; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; background: var(--surface); }
.weiter a:hover { border-color: var(--drive); }
.weiter small { display: block; color: var(--text-soft); font-size: 12.5px; }
.weiter span { color: var(--text); font-weight: 600; }
.weiter .naechste { text-align: right; grid-column: 2; }
.fuss { border-top: 1px solid var(--line); padding: 28px 24px; font-size: 13.5px; color: var(--text-soft); }
.fuss-innen { max-width: 1440px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 8px 22px; }
.fuss a { color: var(--text-muted); text-decoration: none; }
.fuss a:hover { color: var(--text); }

/* Startseite */
.start { max-width: 1100px; }
.start-kopf { padding: 24px 0 8px; }
.start-kopf h1 { font: 750 clamp(34px, 5vw, 52px)/1.05 var(--anzeige); letter-spacing: -0.035em; color: var(--text); margin: 0 0 16px; }
.start-kopf .lead { max-width: 720px; font-size: 19px; line-height: 1.55; color: var(--text-muted); }
.schnell { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 8px; }
.knopf { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: var(--radius); font-weight: 600; font-size: 14.5px; text-decoration: none; border: 1px solid var(--line); background: var(--surface); color: var(--text); }
.knopf:hover { border-color: var(--drive); color: var(--text); }
.knopf-haupt { background: var(--drive); border-color: var(--drive); color: #fff; }
.knopf-haupt:hover { background: var(--drive-deep); border-color: var(--drive-deep); color: #fff; }
.karten { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; margin: 28px 0 8px; }
.karte { display: block; padding: 18px 20px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); text-decoration: none; color: var(--text-body); transition: border-color .15s, transform .15s; }
.karte:hover { border-color: var(--drive); transform: translateY(-1px); color: var(--text-body); }
.karte strong { display: block; color: var(--text); font-size: 16px; margin-bottom: 4px; }
.karte span { font-size: 14px; line-height: 1.5; color: var(--text-muted); }
.karte small { display: block; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--drive-deep); margin-bottom: 8px; }
.kapitelraster { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 28px 40px; margin: 40px 0 16px; }
.kapitelraster h2 { font: 650 20px/1.3 var(--anzeige); margin: 0 0 4px; color: var(--text); }
.kapitelraster h2 a { color: inherit; text-decoration: none; }
.kapitelraster p { margin: 0 0 10px; font-size: 14.5px; color: var(--text-muted); }
.kapitelraster ul { margin: 0; padding: 0; list-style: none; font-size: 15px; }
.kapitelraster li { padding: 3px 0; }
.kapitelraster li a { text-decoration: none; }

/* Suche */
.treffer { list-style: none; padding: 0; margin: 20px 0 0; }
.treffer li { padding: 16px 0; border-top: 1px solid var(--line); }
.treffer a { font-size: 17px; font-weight: 600; text-decoration: none; }
.treffer small { display: block; font-size: 12.5px; color: var(--text-soft); margin: 2px 0 4px; }
.treffer p { margin: 0; font-size: 14.5px; color: var(--text-muted); }
.treffer mark { background: var(--drive-soft); color: var(--text); padding: 0 2px; border-radius: 3px; }
.suchfeld { display: flex; gap: 8px; max-width: 560px; margin: 8px 0 0; }
.suchfeld input { flex: 1; font: inherit; padding: 10px 12px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); color: var(--text); }
.suchfeld button { font: inherit; font-weight: 600; padding: 10px 16px; border-radius: var(--radius); border: 0; background: var(--drive); color: #fff; cursor: pointer; }

/* Schmal */
@media (max-width: 1200px) {
  .rahmen, .rahmen.ohne-toc { grid-template-columns: 230px minmax(0, 1fr); gap: 40px; }
  .toc { display: none; }
  details.toc-klein { display: block; }
}
@media (max-width: 900px) {
  .kopf-innen { padding: 10px 16px; gap: 10px; }
  .kopf-links { display: none; }
  .menue-knopf { display: inline-block; }
  .marke-zusatz { display: none; }
  .suche { display: none; }
  .suche-link { display: inline-block; }
  .rahmen, .rahmen.ohne-toc { grid-template-columns: minmax(0, 1fr); padding: 0 16px; gap: 0; }
  .seitennav { display: none; position: static; max-height: none; order: 2; padding: 8px 0 32px; border-top: 1px solid var(--line); }
  .ohne-js .seitennav, .nav-offen .seitennav { display: block; }
  .nav-offen .seitennav { order: 0; border-top: 0; border-bottom: 1px solid var(--line); padding-top: 20px; }
  .haupt { padding-top: 24px; }
  .weiter { grid-template-columns: 1fr; }
  .weiter .naechste { grid-column: 1; }
}
@media (max-width: 440px) {
  .marke-text { display: none; }
}
@media print {
  .kopf, .seitennav, .toc, .toc-klein, .kopieren, .weiter, .fuss, .band { display: none !important; }
  .rahmen { display: block; }
  .code { border: 1px solid #999; background: #fff; }
  .code code { color: #000; }
}
