/* Layout „Fachbuch“. Baut auf assets/css/style.css auf, eingebunden nur über $page['css'].
   Dieselbe Seite wie die Startseite, nur als Handbuch: Papier, Bahn, Etikett, H2 um 40 px.
   Farbe: Titelplatte Blau tief, höchstens ein Band Anthrazit, dazwischen getönte Flächen Hellblau und helles Cyan.
   Bausteine aus inc/fachbuch.php: Kapitel (.kap), Zeile (.z: Stichwort, Text, Rand), Liste (.liste, .folge), Tafel (.tafel). */

:root {
  --ton-cyan: #d3efff;       /* style.css .ref, Tönung Cyan */
  --ton-blau: #d5e3fb;       /* style.css .ref.ton-2, Tönung Blau */
  --ton-rand: #eef7ff;       /* style.css .ref, helle Tönung Cyan: Tabellenkopf, aktive Zeile */
  --griff: 2.875rem;         /* 46 px */
  --stich: 12rem;            /* Stichwortspalte samt Abstand */
  --rand: 17rem;             /* Randspalte */
  --luft: 1.5rem;            /* halber Abstand Text zu Rand */
  --L: max(1.5rem, calc((100% - var(--max)) / 2));   /* wie .wrap und die Bahn der Startseite */
  --R: max(4.2rem, calc((100% - var(--max)) / 2));   /* rechts Platz für das Griffregister */
  --ein: 2.6rem;             /* Einzug von der Bahn */
  --platte: var(--blau-tief);
}

html { scroll-padding-top: 6.75rem; }
.site-header { background: var(--papier); }  /* deckend, nichts scheint durch */

/* Fokus: Tinte mit weißem Rand, auf jeder Fläche sichtbar */
a:focus-visible, button:focus-visible, summary:focus-visible, .btn:focus-visible, .teilen-link:focus-visible, .skip:focus-visible {
  outline: 2px solid var(--tinte); outline-offset: 2px; box-shadow: 0 0 0 2px #fff, 0 0 0 6px #fff;
}

.fb { position: relative; display: block; counter-reset: kap; }
.fb::after { content: ""; position: absolute; z-index: 3; bottom: -6px; left: calc(var(--L) - 5px); width: 12px; height: 12px; background: var(--punkt); }  /* die Bahn endet im Quadrat wie auf der Startseite */
.fb p { margin: 0 0 1em; }
.fb figure { margin: 0; }

/* ---------- Griffregister: Griffe an der Papierkante, in einer Schiene über die Länge von .fb ---------- */
.griff { position: absolute; top: 0; bottom: 0; right: 0; width: var(--griff); z-index: 40; pointer-events: none; }
.griff ol { position: sticky; top: calc(74px + 1.25rem); list-style: none; margin: 1.25rem 0 0; padding: 0; display: grid; gap: 3px; counter-reset: griff; pointer-events: auto; }
.griff li { counter-increment: griff; }
.griff a { position: relative; display: grid; place-items: center; width: var(--griff); height: min(var(--griff), calc((100vh - 7rem) / var(--n))); background: var(--papier); color: var(--blau-tief); text-decoration: none; font: 700 1rem/1 var(--kopf); box-shadow: inset 0 0 0 1.5px var(--blau-tief), 0 0 0 1.5px #fff; }
.griff a::before { content: counter(griff); font-variant-numeric: tabular-nums; }
.griff a span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.griff a:hover { background: var(--papier-2); color: var(--blau-tief); }
.griff a:hover span, .griff a:focus-visible span { position: absolute; right: calc(100% + 3px); top: 0; bottom: 0; width: auto; height: auto; clip-path: none; display: flex; align-items: center; padding-inline: .9rem; background: var(--blau-tief); color: #fff; font: 600 .875rem/1 var(--kopf); box-shadow: 0 0 0 1.5px #fff; }
.griff a[aria-current] { background: var(--blau-tief); color: #fff; }
.griff a[aria-current]:hover { background: var(--blau-tief); color: #fff; }
.griff a:focus-visible { outline-offset: -5px; outline-color: var(--tinte); box-shadow: inset 0 0 0 5px #fff, 0 0 0 1.5px #fff; }
.griff a[aria-current]:focus-visible { background: #fff; color: var(--blau-tief); }
/* Abzweig nur, wo rechts freier Rand ist */
@media (min-width: 1344px) {
  .griff a[aria-current]::after { content: ""; position: absolute; right: 100%; top: calc(50% - 6px); width: 1.5rem; height: 12px; background: radial-gradient(circle 6px at 6px 50%, #fff 3px, var(--blau-tief) 3.4px 5.4px, transparent 5.8px), linear-gradient(var(--blau-tief), var(--blau-tief)) right center / calc(100% - 10px) 2px no-repeat; pointer-events: none; }
}
.griffzeile { display: none; }

/* ---------- Titelei: harter Schnitt wie im Hero der Startseite, rechts die Platte ---------- */
.fb-hero { --pb: clamp(22rem, 33vw, 30rem); position: relative; overflow: clip; background: linear-gradient(90deg, var(--papier) 0 calc(100% - var(--L) - var(--pb)), var(--platte) calc(100% - var(--L) - var(--pb)) 100%); }
.fb-hero::before { content: ""; position: absolute; z-index: 1; top: 0; bottom: 0; left: var(--L); width: 2px; background: var(--bahn); }
.fb-hero::after { content: ""; position: absolute; z-index: 1; left: 0; width: calc(100% - var(--L) - var(--pb)); bottom: 0; height: 22px; border-top: 1px solid var(--linie); opacity: .6; background:
  repeating-linear-gradient(90deg, var(--haar) 0 1px, transparent 1px 8px) left top / 100% 6px no-repeat,
  repeating-linear-gradient(90deg, var(--haar) 0 1px, transparent 1px 40px) left top / 100% 12px no-repeat; }
.hero-raster { margin-inline: var(--L); display: grid; grid-template-columns: minmax(0, 1fr) var(--pb); column-gap: 3rem; align-items: stretch; }
.hero-text { position: relative; padding: clamp(2.6rem, 5vw, 4rem) 0 calc(clamp(2.4rem, 4vw, 3.4rem) + 22px) var(--ein); }
.hero-text::before { content: ""; position: absolute; z-index: 2; left: -9px; top: calc(clamp(2.6rem, 5vw, 4rem) + .05rem); width: 20px; height: 20px; border-radius: 50%; background: var(--logo-verlauf); box-shadow: 0 0 0 3px var(--papier), 0 0 0 5px var(--bahn); }
.hero-text::after { content: ""; position: absolute; left: 11px; top: calc(clamp(2.6rem, 5vw, 4rem) + .62rem); width: calc(var(--ein) - 16px); height: 2px; background: var(--bahn); }
.hero-text .breadcrumb { margin-bottom: 1rem; line-height: 1.5; }
.hero-text .kicker { margin-bottom: 1rem; }
.hero-text h1 { margin-bottom: 1.1rem; font-size: clamp(2.2rem, 4.2vw, 3.2rem); font-weight: 700; }
.hero-text h1 .hervor { color: var(--bahn); }
.fb .byline { margin: 0 0 1rem; }
.fb .einstieg { font-size: 1.08rem; color: var(--grau); margin: 0; }
.hero-text .btn-row { margin-top: 1.7rem; }
/* ---------- Kurz gesagt (08.11.2026): Kernaussagen direkt nach der Einleitung ---------- */
.fb .kurz { margin: 1.5rem 0 0; padding: .95rem 1.2rem 1rem 1.3rem; border-left: 2px solid var(--bahn); background: var(--papier-2); }
.fb .kurz .kicker { margin: 0 0 .6rem; }
.fb .kurz ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.fb .kurz li { position: relative; padding-left: 1.1rem; font-size: .97rem; line-height: 1.5; color: var(--tinte); }
.fb .kurz li::before { content: ""; position: absolute; left: 0; top: .6em; width: 6px; height: 6px; background: var(--punkt); }
.flaeche .kurz { background: rgba(255, 255, 255, .55); }

.platte { display: flex; color: #fff; margin-right: calc(max(1.5rem, calc((100vw - var(--max)) / 2)) * -1); padding: clamp(1.6rem, 2.6vw, 2.2rem) 0; }
.platte-inhalt { flex: 1; display: flex; flex-direction: column; justify-content: center; padding-left: clamp(1.6rem, 2.6vw, 2.4rem); }
.platte-inhalt .kicker { color: rgba(255,255,255,.82); margin-bottom: 1rem; }
.platte-inhalt ol { list-style: none; margin: 0; padding: 0; }
.platte-inhalt li { border-top: 1px solid rgba(255,255,255,.3); }
.platte-inhalt li:last-child { border-bottom: 1px solid rgba(255,255,255,.3); }
.platte-inhalt a { display: flex; align-items: center; gap: .8rem; padding: clamp(.65rem, 1.1vw, .95rem) 5.4rem clamp(.65rem, 1.1vw, .95rem) 0; color: #fff; text-decoration: none; font: 600 clamp(1.02rem, 1.45vw, 1.26rem)/1.2 var(--kopf); }
.platte-inhalt a::before { content: ""; flex: none; width: 7px; height: 7px; background: var(--cyan-hell); }
.platte-inhalt a:hover { color: #fff; text-decoration: underline; }

/* ---------- Baustein Kapitel: Pad auf der Bahn, Etikett, H2 wie auf der Startseite ---------- */
.fb .kap { position: relative; padding: clamp(2.2rem, 4vw, 3.05rem) 0; counter-increment: kap; }
.kap::before { content: ""; position: absolute; z-index: 1; top: 0; bottom: 0; left: var(--L); width: 2px; background: var(--k-bahn, var(--bahn)); }
.satz { position: relative; margin-left: var(--L); margin-right: var(--R); padding-left: var(--ein); }
.kap-nr.etikett { position: relative; margin: 0 0 .7rem; }
.kap-nr::before { content: counter(kap, decimal-leading-zero) " / " attr(data-n); color: var(--tinte); font-weight: 700; letter-spacing: .14em; }
.kap-nr::after { content: ""; display: inline-block; width: 6px; height: 6px; background: var(--punkt); }
.kap > .satz::before { content: ""; position: absolute; z-index: 2; left: -8px; top: .05rem; width: 18px; height: 18px; border-radius: 50%; background: var(--k-papier, var(--papier)); border: 2.5px solid var(--k-bahn, var(--bahn)); }
.kap > .satz::after { content: ""; position: absolute; left: 10px; top: .55rem; width: calc(var(--ein) - 16px); height: 2px; background: var(--k-bahn, var(--bahn)); }
.kap h2 { font-size: clamp(1.7rem, 3vw, 2.45rem); margin: 0 0 1.5rem; max-width: 26em; }

/* Getönte Flächen im Kapitelrhythmus */
.flaeche { --k-papier: var(--f); --k-linie: var(--f-linie); background: var(--f); }
.flaeche-cyan { --f: var(--ton-cyan); --f-linie: #8fd6f5; --k-bahn: var(--blau-tief); }
.flaeche-blau { --f: var(--ton-blau); --f-linie: #9cbaf0; --k-bahn: var(--blau-tief); }
.flaeche a:not(.btn):not(.teilen-link) { color: var(--blau-tief); }
.flaeche .kap-nr { color: var(--tinte-2); }
.flaeche .einstieg { color: var(--tinte); }

/* Das eine farbige Band */
.band { background: var(--tinte); color: #fff; --k-bahn: var(--cyan); --k-papier: var(--tinte); --k-linie: var(--dunkel-linie); }
.band h2, .band h3 { color: #fff; }
.band .kap-nr { color: rgba(255,255,255,.8); }
.band .kap-nr::before { color: #fff; }
.band a { color: var(--cyan-hell); }
.band a:hover { color: #fff; }

/* ---------- Baustein Zeile: Stichwort, Text, Rand ---------- */
.z { display: grid; grid-template-columns: var(--stich) minmax(0, 1fr) var(--rand); align-items: start; }
.z + .z, .spalten + .z, .z + .spalten { margin-top: 1rem; }
.z.mit-stich { padding-top: 1rem; border-top: 1px solid var(--k-linie, var(--linie-2)); margin-top: 1.1rem; }
.s { grid-column: 1; margin: 0; padding-right: 1.4rem; hyphens: auto; font-size: 1.15rem; line-height: 1.25; font-weight: 700; letter-spacing: -.01em; }
.t { grid-column: 2; margin-right: calc(var(--luft) * 2); min-width: 0; }
.r { grid-column: 3; }
.fb .t p, .fb .t li { font-size: 1.0625rem; line-height: 1.66; }
.fb .t p:last-child { margin-bottom: 0; }
.fb .t code { font-family: var(--mono); font-size: .9em; background: var(--papier); border: 1px solid var(--linie); padding: 0 .3em; overflow-wrap: anywhere; }
.band .t p, .band .t li { color: rgba(255,255,255,.94); }
.fb .band-kurz .t p { max-width: 58rem; font: 500 clamp(1.15rem, 1.7vw, 1.4rem)/1.42 var(--kopf); color: #fff; letter-spacing: -.008em; }
/* Zeilen ohne Stichwort beginnen an der Kapitelkante, der Rand bleibt rechts */
.z:not(.mit-stich) { grid-template-columns: minmax(0, 1fr) var(--rand); }
.z:not(.mit-stich) > .t { grid-column: 1; }
.z:not(.mit-stich) > .r { grid-column: 2; }
.fb .z:not(.mit-stich) > .t > p, .z:not(.mit-stich) > .t > .folge, .z:not(.mit-stich) > .t > .liste:not(.zwei) { max-width: 48rem; }
/* Zeile über die volle Breite, Text in zwei Spalten */
.z.breit .t, .z.weit .t { margin-right: 0; }
.z.breit { display: block; }
.z.mit-stich.weit .t { grid-column: 2 / -1; columns: 2; column-gap: 3rem; }
.z.weit li { break-inside: avoid; }
/* Mehrere Zeilen nebeneinander, wo der Rand nichts zu tragen hat */
.spalten { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 3rem; align-items: start; }
.spalten.drei { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 2.2rem; }
.spalten .z, .spalten .z.mit-stich, .spalten .z + .z { display: block; margin: 0 0 1.1rem; }
.spalten { margin-top: 1.1rem; }
.spalten > .z:last-child, .spalten > .z:nth-last-child(2):nth-child(odd) { margin-bottom: 0; }
.spalten .s { padding-right: 0; margin-bottom: .45rem; }
.spalten .t { margin-right: 0; }
.spalten .r { margin-top: .8rem; }

/* Randsatz: ein Satz des Texts, im Rand gesetzt */
.fb .randsatz { margin: 0; padding-left: .9rem; border-left: 3px solid var(--blau-tief); font: 700 1.16rem/1.28 var(--kopf); letter-spacing: -.012em; color: var(--blau-tief); }
.fb .band .randsatz { border-left-color: var(--cyan); color: #fff; }
.r > * + * { margin-top: .9rem; }

/* Beleg: nur bei der ersten Nennung */
.beleg { padding-left: .9rem; border-left: 2px solid var(--bahn); }
.fb .beleg p { margin: 0 0 .7rem; font-size: .84rem; line-height: 1.42; color: var(--tinte-2); overflow-wrap: anywhere; }
.fb .beleg p:last-child { margin-bottom: 0; }
.beleg p::before { content: attr(data-n); display: inline-block; min-width: 1.05rem; margin-right: .35rem; font: 700 .78rem/1 var(--kopf); color: var(--blau-tief); }
.beleg a { color: var(--blau-tief); }
.band .beleg { border-left-color: var(--cyan); }
.fb .band .beleg p { color: #d8d8d8; }
.band .beleg p::before { color: #fff; }
.band .beleg a { color: #9fdcf7; }
.fz { display: inline-grid; place-items: center; min-width: 24px; height: 24px; margin: 0 .1em; vertical-align: .05em; font: 700 .72rem/1 var(--kopf); color: var(--blau-tief); background: var(--papier); box-shadow: inset 0 0 0 1px var(--blau-tief); text-decoration: none; }
.flaeche a.fz { color: var(--blau-tief); }
.fz:hover { background: var(--blau-tief); color: #fff; }
.flaeche a.fz:hover { color: #fff; }
.band .fz { background: transparent; color: #fff; box-shadow: inset 0 0 0 1px #fff; }
.band .fz:hover { background: #fff; color: var(--blau-tief); }

/* ---------- Baustein Liste ---------- */
.fb .liste, .fb .folge { list-style: none; margin: .2rem 0 1rem; padding: 0; }
.fb .t .liste:last-child, .fb .t .folge:last-child { margin-bottom: 0; }
.liste li { position: relative; padding: .55rem 0 .6rem 1.2rem; border-top: 1px solid var(--k-linie, var(--linie-2)); }
.liste li::before { content: ""; position: absolute; left: 0; top: 1.2rem; width: 6px; height: 6px; background: var(--punkt); }
.flaeche .liste li::before { background: var(--blau-tief); }
.liste b, .folge b { font-family: var(--kopf); font-weight: 700; line-height: 1; color: var(--tinte-2); }
.liste.zwei { columns: 2; column-gap: 3rem; }
.liste.zwei li { break-inside: avoid; }
/* Aufzählung als ein Satz: Einträge enden auf Komma, deshalb ohne Linien und eng geführt */
.liste.satz li { padding: .12rem 0 .18rem 1.2rem; border: 0; }
.liste.satz li::before { top: .78rem; }
/* Folge: Pads an einer Bahn, das letzte im Logo-Verlauf */
.folge { counter-reset: fo; }
.folge li { position: relative; counter-increment: fo; padding: 0 0 1.1rem 3.2rem; min-height: 2.6rem; }
.folge li::before { content: counter(fo); position: absolute; z-index: 1; left: 0; top: 0; display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 50%; background: var(--papier); border: 2.5px solid var(--bahn); color: var(--bahn); font: 700 1rem/1 var(--kopf); }
.folge li::after { content: ""; position: absolute; left: calc(1.125rem - 1px); top: 2.25rem; bottom: 0; width: 2px; background: var(--bahn); }
.folge li:last-child { padding-bottom: 0; }
.folge li:last-child::after { display: none; }
.folge li:last-child::before { background: var(--logo-verlauf); border: 0; color: #fff; }
.band .folge li::before { background: var(--k-papier); border-color: var(--cyan); color: #fff; }
.band .folge li::after { background: var(--cyan); }
.band .folge li:last-child::before { background: var(--logo-verlauf); border: 0; }
.band .folge b, .band .liste b { color: #fff; }

/* ---------- Baustein Tafel: Regel für jede Tabelle ---------- */
.tafel { margin: .9rem 0 1.4rem; }
.tafel table { width: 100%; border-collapse: collapse; font-size: .95rem; line-height: 1.4; font-variant-numeric: tabular-nums; background: var(--papier); }
.tafel th { padding: .55rem .7rem; text-align: left; vertical-align: bottom; font: 700 .86rem/1.25 var(--kopf); color: var(--tinte); border-bottom: 2px solid var(--blau-tief); background: var(--ton-rand); }
.tafel td { padding: .5rem .7rem; vertical-align: top; color: var(--tinte-2); border-bottom: 1px solid var(--linie); }
.tafel td:first-child { font-weight: 600; color: var(--tinte); }
.tafel.kopf2 td:first-child { font-weight: 400; font-size: .88rem; color: var(--grau); }
.tafel.kopf2 td:nth-child(2) { font-weight: 600; color: var(--tinte); }
.tafel tr.gruppe td { border-top: 2px solid var(--haar); }

/* ---------- Zeichnungen: nur mit Wörtern aus dem Text ---------- */
.zeichnung-z { margin-top: 1.1rem; margin-bottom: .6rem; }
.zeichnung-z:not(.breit) { grid-template-columns: var(--stich) minmax(0, 1fr); }
.zeichnung-z:not(.breit) > .t { grid-column: 2; margin-right: 0; }

/* Quellcode ins Suchergebnis: fest beim Titel, gestrichelt bei der Meta-Description */
.durchfuehrung { display: grid; grid-template-columns: minmax(0, 1.05fr) 3.2rem minmax(0, 1fr); row-gap: .7rem; align-items: stretch; }
.fb .t .lage-kopf { margin: 0; font: 500 .72rem/1.5 var(--text); letter-spacing: .26em; text-transform: uppercase; color: var(--tinte); }
.lk-a { grid-column: 1; }
.lk-b { grid-column: 3; }
.fb .t .lk-m { display: none; margin-bottom: .35rem; }
.df-q { grid-column: 1; line-height: 1.42; padding: .7rem .85rem; background: var(--tinte); color: #e8e8e8; overflow-wrap: anywhere; }
.df-n { display: block; margin-bottom: .3rem; font: 600 .72rem/1.3 var(--text); letter-spacing: .08em; color: var(--cyan-hell); }
.fb .df-q code { font: .78rem/1.42 var(--mono); background: none; border: 0; padding: 0; color: #e8e8e8; }
.df-s { grid-column: 3; padding: .7rem .85rem; background: var(--papier); border: 1px solid var(--linie-2); font-size: .9rem; line-height: 1.45; color: var(--tinte-2); }
.df-adr { display: block; margin-bottom: .2rem; font-size: .78rem; color: var(--grau); overflow-wrap: anywhere; }
.df-t { display: block; font: 600 1.08rem/1.25 var(--kopf); color: var(--bahn); }
.df-cap { display: block; margin-top: .55rem; padding-top: .45rem; border-top: 1px solid var(--linie); font: 600 .78rem/1.35 var(--kopf); color: var(--blau-tief); }
.df-b { grid-column: 2; position: relative; }
.df-b::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; margin-top: -1px; border-top: 2px solid var(--bahn); }
.df-b.gestrichelt::before { border-top-style: dashed; }
.df-b::after { content: ""; position: absolute; left: 6px; top: 50%; width: 12px; height: 12px; margin-top: -6px; border-radius: 50%; background: var(--papier); border: 2.2px solid var(--bahn); }
.q1, .b1, .s1 { grid-row: 2; }
.q2, .b2, .s2 { grid-row: 3; }

/* Überschriftenbaum */
.baum { font-size: .82rem; line-height: 1.32; color: var(--tinte-2); padding-top: .15rem; }
.baum ol { list-style: none; margin: 0; padding: 0; }
.baum ol ol { margin-top: .35rem; padding-left: .85rem; border-left: 1.5px solid var(--bahn); }
.baum li + li { margin-top: .35rem; }
.baum li li { position: relative; }
.baum li li::before { content: ""; position: absolute; left: -.85rem; top: .62em; width: .6rem; height: 1.5px; background: var(--bahn); }
.baum b { font: 700 .72rem/1 var(--kopf); color: var(--blau-tief); margin-right: .15rem; }

/* Bestandsliste: Spaltenköpfe aus dem Satz, eine Zeile dieser Seite, darunter was man darin sieht */
.bestand { background: var(--papier); box-shadow: 0 0 0 1px var(--f-linie, var(--linie-2)); }
.bestand table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: .86rem; line-height: 1.38; }
.bestand th { width: 8%; padding: .5rem .65rem; text-align: left; font: 700 .84rem/1.25 var(--kopf); color: #fff; background: var(--blau-tief); }
.bestand th:nth-child(1) { width: 28%; }
.bestand th:nth-child(2) { width: 32%; }
.bestand th:nth-child(5) { width: 12%; }
.bestand th:nth-child(3) { width: 20%; }
.bestand td { padding: .55rem .65rem; vertical-align: top; color: var(--tinte-2); border-left: 1px solid var(--linie); overflow-wrap: anywhere; }
.bestand td:first-child { border-left: 0; color: var(--bahn); font-weight: 600; }
.bestand-sieht { display: flex; flex-wrap: wrap; gap: .3rem 1.4rem; padding: .55rem .65rem .6rem; border-top: 1px solid var(--linie-2); font: 600 .9rem/1.3 var(--kopf); color: var(--blau-tief); }
.bestand-sieht span::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: .45rem; background: var(--punkt); vertical-align: middle; }

/* Regel als Ziffern */
.fb .regel { margin: 0 0 1.4rem; }
.regel ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 2.2rem; }
.regel li { font: 600 1.02rem/1.25 var(--kopf); color: var(--tinte-2); border-top: 2px solid var(--blau-tief); padding-top: .55rem; }
.regel b { display: block; font: 700 3.2rem/1 var(--kopf); letter-spacing: -.03em; color: var(--blau-tief); margin-bottom: .25rem; }

/* Ablauf: fünf Schritte an einer Bahn, wie Abschnitt 08 der Startseite */
.fb .ablauf-z { margin: 1.4rem 0 2rem; }
.ablauf-z ol { position: relative; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); column-gap: 1.2rem; }
.ablauf-z ol::before { content: ""; position: absolute; left: 1.2rem; right: 16%; top: 1.15rem; height: 2px; background: var(--cyan); }
.ablauf-z li { position: relative; font: 600 .95rem/1.25 var(--kopf); color: #fff; counter-increment: ab; }
.ablauf-z ol { counter-reset: ab; }
.ablauf-z li::before { content: counter(ab); position: relative; z-index: 1; display: grid; place-items: center; width: 2.4rem; height: 2.4rem; margin-bottom: .6rem; border-radius: 50%; background: var(--k-papier); border: 2.5px solid var(--cyan); font: 700 1rem/1 var(--kopf); }
.ablauf-z li:last-child::before { background: var(--logo-verlauf); border: 0; }

/* Quellen mit Rücksprung */
.fb .quellen { list-style: none; columns: 2; column-gap: 3rem; margin: 0; padding: 0; counter-reset: q; }
.quellen li { position: relative; counter-increment: q; break-inside: avoid; padding: .6rem 0 .7rem 2rem; border-top: 1px solid var(--k-linie, var(--linie-2)); font-size: .92rem; line-height: 1.45; overflow-wrap: anywhere; }
.quellen li::before { content: counter(q); position: absolute; left: 0; top: .68rem; font: 700 .86rem/1.3 var(--kopf); color: var(--blau-tief); }
.quellen li.ohne { counter-increment: none; }
.quellen li.ohne::before { content: none; }
.quellen li:target { background: var(--ton-rand); }
.zurueck { display: inline-grid; place-items: center; min-width: 24px; height: 24px; text-decoration: none; font-size: .95rem; line-height: 1; }

/* Schluss: Teilen, Weiterlesen, Register */
.ende { display: grid; grid-template-columns: minmax(0, 1fr) var(--rand); column-gap: 3rem; align-items: start; margin-top: 1.8rem; }
.ende .teilen { margin-top: 0; }
.ende .siehe { padding-top: 1.7rem; }
.siehe .kicker { margin-bottom: .5rem; }
.flaeche .siehe .kicker, .flaeche .teilen .kicker { color: var(--tinte-2); }
.fb .siehe .related { list-style: none; margin: 0; padding: 0; display: block; }
.siehe .related li { border-top: 1px solid var(--k-linie, var(--linie-2)); }
.siehe .related a { display: block; padding: .4rem 0; font-weight: 500; font-size: .95rem; color: var(--tinte); text-decoration: none; }
.siehe .related a:hover { color: var(--bahn); text-decoration: underline; }

.register .kicker { margin-bottom: .7rem; }
.fb .register h2 { margin-bottom: 1.2rem; }
.reg { display: grid; grid-template-columns: var(--stich) minmax(0, 1fr) 7.5rem; padding: .9rem 0 1rem; border-top: 1px solid var(--linie-2); }
.fb .reg-a { margin: 0; font-size: .84rem; line-height: 1.6; color: var(--grau); padding-right: 1rem; }
.reg h3 { margin: 0 0 .3rem; font-size: 1.12rem; line-height: 1.25; }
.fb .reg p:not(.reg-a) { margin: 0; font-size: .95rem; line-height: 1.5; color: var(--grau); max-width: 52em; padding-right: 2rem; }
.reg > a { font-weight: 600; font-size: .93rem; justify-self: end; text-decoration: none; white-space: nowrap; }
.reg > a::after { content: ""; display: inline-block; width: 6px; height: 6px; background: currentColor; margin-left: .5em; vertical-align: middle; }
.reg > a:hover { text-decoration: underline; }
.fb .reg-alle { margin: 0; padding-top: .9rem; border-top: 1px solid var(--linie-2); font-weight: 600; }

/* Kontaktblock der echten Seite ist das letzte Kapitel */
.fb .kontakt section { padding: 0; }
.kontakt .wrap { width: auto; margin-left: calc(var(--L) + var(--ein)); margin-right: var(--R); }
.kontakt .kontakt-kopf .kap-nr { margin-bottom: 1rem; }
.kap > .satz.kontakt-fuss::before, .kap > .satz.kontakt-fuss::after { display: none; }
.kontakt-fuss { margin-top: 1.4rem; max-width: calc(34rem + var(--L) + var(--ein)); }
.fb .contact-panel p:not(.kicker) { margin-bottom: 1em; }
.fb .contact-form p { margin-bottom: 1.2em; }

/* ---------- Bewegung nur, wenn gewünscht ---------- */
@media (prefers-reduced-motion: no-preference) {
  .griff a { transition: background-color .15s ease, color .15s ease; }
}

/* ---------- Unter dem vollen Satzspiegel: Stichwort rückt über den Text ---------- */
@media (max-width: 1179px) {
  :root { --rand: 13.5rem; --luft: 1.1rem; }
  .z { grid-template-columns: minmax(0, 1fr) var(--rand); }
  .s { grid-column: 1; padding-right: 0; margin-bottom: .4rem; }
  .t { grid-column: 1; }
  .r { grid-column: 2; grid-row: 1 / span 2; }
  .z.mit-stich.weit .t { grid-column: 1 / -1; }
  .zeichnung-z:not(.breit) { grid-template-columns: minmax(0, 1fr); }
  .zeichnung-z:not(.breit) > .t { grid-column: 1; }
  .spalten.drei { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .reg { grid-template-columns: 8rem minmax(0, 1fr) 7rem; }
}

/* ---------- Wie die Startseite: Hero einspaltig ---------- */
@media (max-width: 980px) {
  .fb-hero { background: var(--papier); }
  .fb-hero::before, .fb-hero::after { display: none; }
  .hero-raster { display: block; margin: 0; }
  .hero-text { margin-left: var(--L); margin-right: var(--R); border-left: 2px solid var(--bahn); padding-bottom: 2.2rem; }
  .hero-text::before { left: -11px; }
  .hero-text::after { left: 9px; }
  .platte { position: relative; margin: 0; background: var(--platte); }
  .platte::before { content: ""; position: absolute; top: 0; bottom: 0; left: var(--L); width: 2px; background: var(--cyan-hell); }
  .platte-inhalt { padding-left: calc(var(--L) + var(--ein)); }
  .platte-inhalt a { padding-right: var(--R); }
  .fb .quellen { columns: 1; }
  .ende { grid-template-columns: minmax(0, 1fr); row-gap: 1.2rem; }
  .ende .siehe { padding-top: 0; }
}

/* ---------- Eine Spalte unter 860 px: statt Griffen eine aufklappbare Zeile ---------- */
@media (max-width: 859px) {
  :root { --L: 1rem; --R: 1rem; --ein: 1.8rem; --rand: 100%; --luft: 0px; }
  html { scroll-padding-top: 10.25rem; }
  .griff { display: none; }
  .griffzeile { display: block; position: sticky; top: 74px; z-index: 45; background: var(--papier); border-bottom: 1px solid var(--linie-2); font-family: var(--kopf); }
  .griffzeile summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 2.75rem; padding: .55rem 1rem; font-weight: 600; font-size: .95rem; line-height: 1.25; color: var(--blau-tief); cursor: pointer; list-style: none; }
  .griffzeile summary::-webkit-details-marker { display: none; }
  .griffzeile summary::after { content: ""; flex: none; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); }
  .griffzeile[open] summary::after { transform: rotate(225deg); }
  .griffzeile summary:focus-visible { outline-offset: -4px; box-shadow: inset 0 0 0 6px #fff; }
  .griffzeile nav { max-height: calc(100vh - 124px); overflow-y: auto; border-top: 1px solid var(--linie); }
  .griffzeile ol { list-style: none; margin: 0; padding: 0; counter-reset: gz; }
  .griffzeile li { counter-increment: gz; }
  .griffzeile a { display: grid; grid-template-columns: 2rem minmax(0, 1fr); align-items: center; min-height: 2.75rem; padding: .4rem 1rem; color: var(--tinte); text-decoration: none; font-weight: 500; font-size: .95rem; line-height: 1.25; border-bottom: 1px solid var(--linie); }
  .griffzeile a::before { content: counter(gz); font-weight: 700; color: var(--blau-tief); }
  .griffzeile a[aria-current] { background: var(--ton-rand); font-weight: 700; }
  .griffzeile a:focus-visible { outline-offset: -4px; box-shadow: inset 0 0 0 6px #fff; }

  .z, .z.weit, .z:not(.mit-stich) { display: block; }
  .z.mit-stich.weit .t, .liste.zwei { columns: 1; }
  .z.mit-stich { margin-top: .9rem; padding-top: .8rem; }
  .t { margin-right: 0; }
  .r { margin-top: .8rem; }
  .spalten, .spalten.drei { display: block; }
  .spalten .z, .spalten .z + .z, .spalten > .z:nth-last-child(2):nth-child(odd) { margin: 0 0 1rem; }
  .spalten > .z:last-child { margin-bottom: 0; }
  .baum { max-width: 24rem; }
  .fb .quellen li { padding-left: 1.7rem; }
  .ablauf-z { display: none; }  /* die Folge darunter ist selbst der senkrechte Ablauf */

  /* Zeichnung: Lagen untereinander, Bahn senkrecht */
  .durchfuehrung { display: block; }
  .fb .t .lk-b { display: none; }
  .fb .t .lk-m { display: block; }
  .df-b { height: 2rem; }
  .df-b::before { left: 1.5rem; right: auto; top: 0; bottom: 0; margin: 0; border-top: 0; border-left: 2px solid var(--bahn); }
  .df-b.gestrichelt::before { border-top: 0; border-left-style: dashed; }
  .df-b::after { left: calc(1.5rem - 5px); top: 50%; }
  .df-s { margin-bottom: 1rem; }

  .bestand thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .bestand table, .bestand tbody, .bestand tr, .bestand td { display: block; }
  .bestand td, .bestand td:first-child { display: grid; grid-template-columns: 6.6rem minmax(0, 1fr); column-gap: .7rem; padding: .35rem .65rem; border: 0; border-top: 1px solid var(--linie); }
  .bestand td:first-child { border-top: 0; }
  .bestand td:empty { display: none; }
  .bestand td::before { content: attr(data-k); font-size: .8rem; font-weight: 500; color: var(--grau); }
  .regel b { font-size: 2.4rem; }
  .regel li { font-size: .9rem; }
  .regel ol { column-gap: 1rem; }

  /* Tabellenregel: unter 860 px wird jede Zeile ein Eintrag mit Beschriftung, nichts scrollt seitlich */
  .tafel thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .tafel table, .tafel tbody, .tafel tr, .tafel td { display: block; }
  .tafel table { padding-inline: .6rem; }
  .tafel tr { padding: .5rem 0 .6rem; border-top: 1px solid var(--linie-2); }
  .tafel tr.gruppe { border-top: 2px solid var(--blau-tief); }
  .tafel td, .tafel tr.gruppe td { display: grid; grid-template-columns: 7.2rem minmax(0, 1fr); column-gap: .7rem; padding: .1rem 0; border: 0; font-size: .92rem; }
  .tafel td::before { content: attr(data-k); font-size: .8rem; font-weight: 500; color: var(--grau); }
  /* Die erste Spalte ist der Kopf des Eintrags */
  .tafel td:first-child, .tafel tr.gruppe td:first-child { display: block; padding: 0 0 .15rem; }
  .tafel td:first-child::before { content: none; }
  /* Variante mit zwei Kopfspalten, zum Beispiel Anbieter und Modell */
  .tafel.kopf2 td:nth-child(-n+2), .tafel.kopf2 tr.gruppe td:nth-child(-n+2) { display: inline; padding: 0; }
  .tafel.kopf2 td:nth-child(2)::before { content: none; }
  .tafel.kopf2 td:first-child::after { content: " · "; }

  .reg { display: block; }
  .reg > a { display: inline-block; margin-top: .5rem; }
  .fb .reg p:not(.reg-a) { padding-right: 0; }
  .fb .einstieg { font-size: 1.04rem; }
}
