/* =====================================================================
   relmos.net – Inhaltsseiten (Blog, Leistungen, Fragen, Beispiele)
   Baut auf den Tokens von styles.css auf (Farben, Abstände, Kopf, Fusszeile, .cta).
   Eine Webschrift (Inter, lokal), Code in der Festbreitenschrift des Systems.
   Kein GSAP, kein Lenis; ohne JavaScript ist alles lesbar.
   Vorgaben: DF-20261118-194607-3864c1, DF-20261118-200250-b6448a.
   Blog ruhiger (20.11.): Kartenraster nach 21st.dev «Blog Grid Section» (ncdai, blog-01),
   Lesebreite um 68 Zeichen, leichtere Code-, Quellen- und Bildblöcke.
   ===================================================================== */

/* ----- Schrift: Inter lokal (OFL, assets/fonts/OFL.txt) ----- */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/inter-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/inter-latin-wght-italic.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --r: 14px;            /* Radius der Markenkarten und Bildrahmen */
  --measure: 37em;      /* Satzspiegel Lesetext: um 68 Zeichen je Zeile bei Inter 17 px */
  --lesen-gap: clamp(40px, 5vw, 96px);
  --grau-alt: #8B8681;  /* entfernte Codezeile */
}

/* ----- Kopf, Sprache, Sprung zum Inhalt ----- */
.site-header { background: var(--bg); }
.menu-toggle[hidden] { display: none; }  /* ohne JavaScript kein toter Knopf; die Fusszeile führt überallhin */
.springen { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 14px; background: var(--ink); color: var(--bg); font-size: 0.9rem; border-radius: 6px; }
.springen:focus { top: 12px; }
.lang-switch a, .lang-switch span.is-active { padding: 4px 6px; text-transform: uppercase; }
.lang-switch a { color: var(--muted); transition: color 0.25s var(--ease); }
.lang-switch a:hover { color: var(--accent); }
.lang-switch span.is-active { color: var(--ink); }
body.nav-open .lang-switch a { color: rgba(255,255,255,0.6); }
body.nav-open .lang-switch span.is-active { color: #fff; }

/* ----- Seitenkopf ----- */
main { display: block; padding-top: clamp(124px, 19svh, 196px); }
.seite__kopf h1 {
  font-size: clamp(2.25rem, 3.9vw, 3.5rem);   /* Beiträge: höchstens 56 px, am Handy 36 px */
  line-height: 1.08; max-width: 21em; text-wrap: balance;
  overflow-wrap: break-word;
}
@media (max-width: 399px) {
  /* Beiträge und Beispiele unter 400 px: längstes Wort («Lenkungsausschuss,» 9,27 em) passt mit Luft in den Kasten (320 px: 28,8 px Schrift, 268 von 280 px). */
  .seite__kopf h1 { font-size: clamp(1.8rem, 9vw, 2.25rem); }
}
.seite__kopf h1.gross { font-size: clamp(2.25rem, 1.2rem + 5vw, 6.2rem); line-height: 1.04; max-width: 12em; }
.seite__kopf .lead { margin-top: clamp(22px, 3.4svh, 36px); max-width: min(44rem, 75ch); }
.seite__kopf--zwei { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(24px, 4vw, 40px); }
.seite__kopf--zwei .aussage { font-size: clamp(1.3rem, 2.4vw, 2.05rem); font-weight: 200; line-height: 1.34; letter-spacing: -0.015em; max-width: 30em; }
@media (min-width: 900px) {
  .seite__kopf--zwei { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr); gap: clamp(28px, 5vw, 80px); align-items: end; }
  /* Linke Spalte ist ab 900 px schmal (~271–413 px): H1 nach oben begrenzen, damit kein Wort bricht. */
  .seite__kopf--zwei h1.gross { font-size: clamp(2.25rem, 4.2vw, 3.625rem); }
}

/* Brotkrume und Datum: eine ruhige Zeile unter dem Vorspann, Rubrik nur hier und grau */
.weg { margin-top: clamp(24px, 3.4svh, 34px); display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 28px; font-size: 0.9rem; color: var(--muted-2); }
.weg time { color: var(--muted); font-variant-numeric: tabular-nums; }
.weg span { color: var(--muted); }
.brotkrumen ol { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 10px; }
.brotkrumen li { display: inline-flex; gap: 10px; align-items: baseline; }
.brotkrumen li:not(:last-child) { white-space: nowrap; }
.brotkrumen li:not(:last-child)::after { content: "/"; color: var(--muted); }
.brotkrumen a { border-bottom: 1px solid var(--hairline); transition: color 0.25s var(--ease), border-color 0.25s var(--ease); }
.brotkrumen a:hover { color: var(--accent); border-color: var(--accent); }
@media (max-width: 960px) {
  .brotkrumen li { align-items: center; }
  .brotkrumen a {
    display: inline-flex; align-items: center; min-height: 44px;
    border-bottom: 0;
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-thickness: 1px;
    text-decoration-color: var(--hairline);
  }
  .brotkrumen a:hover { text-decoration-color: var(--accent); }
}
.brotkrumen [aria-current] { color: var(--muted); }

/* ----- Titelbild: echtes Kernstück des Beitrags auf weisser Fläche, ohne Rahmen ----- */
.flaeche { background: var(--white); border-radius: var(--r); overflow: hidden; }
.flaeche img { width: 100%; height: auto; }
.flaeche picture { display: block; }
.titelbild { margin-top: clamp(48px, 8svh, 96px); max-width: 920px; }
.titelbild figcaption { margin-top: 14px; font-size: 0.88rem; color: var(--muted); max-width: 44rem; line-height: 1.55; }

/* ----- Hinweis «veraltet» und Test-Angaben ----- */
.hinweis--veraltet { margin-top: clamp(32px, 5svh, 48px); padding: 16px 0 16px 20px; border-left: 2px solid var(--accent); max-width: 44rem; color: var(--ink); }
.hinweis--veraltet a { border-bottom: 1px solid var(--hairline); }
.hinweis--stand { margin-top: clamp(28px, 4svh, 40px); padding: 2px 0 2px 16px; border-left: 1px solid var(--hairline); max-width: 42rem; color: var(--muted-2); font-size: 0.95rem; line-height: 1.55; }
.hinweis--stand time { color: var(--ink); }
.stand { display: grid; grid-template-columns: minmax(0, 1fr); margin-top: clamp(40px, 6svh, 64px); border-top: 1px solid var(--hairline); }
.stand > div { padding: 16px 0; border-bottom: 1px solid var(--hairline-2); display: grid; grid-template-columns: minmax(0, 9.5rem) minmax(0, 1fr); gap: 16px; }
.stand dt { font-size: 0.86rem; color: var(--muted); }
.stand dd { margin: 0; font-size: 0.98rem; line-height: 1.55; }
.stand a { border-bottom: 1px solid var(--hairline); transition: color 0.25s var(--ease); }
.stand a:hover { color: var(--accent); }
@media (min-width: 900px) {
  .stand { grid-template-columns: 1fr 1fr 2.2fr 1fr; column-gap: 40px; }
  .stand > div { grid-template-columns: minmax(0, 1fr); gap: 6px; border-bottom: 0; padding: 20px 0 0; }
}

/* ----- Lesen: Verzeichnis links, Text, freie Spalte rechts ----- */
.lesen { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; margin-top: clamp(56px, 9svh, 112px); padding-bottom: var(--section-y); }
@media (min-width: 1000px) {
  .lesen { grid-template-columns: minmax(170px, 2.4fr) minmax(0, 7.6fr) minmax(0, 2fr); gap: var(--lesen-gap); }
  .lesen--schmal .text { grid-column: 2; }
}
.verzeichnis { display: none; }
@media (min-width: 1000px) {
  .verzeichnis { display: block; position: sticky; top: 120px; align-self: start; }
  .verzeichnis-mobil { display: none; }
}
.verzeichnis p { font-size: 0.9rem; color: var(--muted); }
.verzeichnis ol, .verzeichnis-mobil ol { list-style: none; padding: 0; margin-top: 16px; display: grid; gap: 11px; }
.verzeichnis li, .verzeichnis-mobil li { font-size: 0.92rem; line-height: 1.4; font-weight: 300; }
.verzeichnis a { display: flex; gap: 12px; align-items: flex-start; color: var(--muted-2); transition: color 0.25s var(--ease); }
.verzeichnis a::before { content: ""; width: 14px; height: 1px; margin-top: 0.72em; background: transparent; flex: none; transition: background 0.25s var(--ease); }
.verzeichnis a:hover, .verzeichnis-mobil a:hover { color: var(--accent); }
.verzeichnis a[aria-current="true"] { color: var(--accent); }
.verzeichnis-mobil { border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); padding-block: 16px; margin-bottom: 40px; }
.verzeichnis-mobil summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; color: var(--ink); font-size: 0.95rem; }
.verzeichnis-mobil summary::-webkit-details-marker { display: none; }
.verzeichnis-mobil summary::after { content: "+"; color: var(--muted); font-weight: 300; }
.verzeichnis-mobil[open] summary::after { content: "\2212"; }
.verzeichnis-mobil a { color: var(--muted-2); }

/* ----- Lesetext ----- */
.text { min-width: 0; max-width: var(--measure); font-size: 1.0625rem; line-height: 1.72; }
.text :is(h2, h3, h4) { text-wrap: balance; overflow-wrap: break-word; scroll-margin-top: 110px; }
.text h2 { font-size: clamp(1.6rem, 2.2vw, 2rem); font-weight: 300; line-height: 1.18; letter-spacing: -0.015em; margin: clamp(56px, 8svh, 80px) 0 20px; }
.text h3 { font-size: 1.2rem; font-weight: 500; letter-spacing: -0.005em; line-height: 1.35; margin: 40px 0 10px; }
.text h4 { font-size: 1.0625rem; font-weight: 500; letter-spacing: 0; line-height: 1.45; margin: 28px 0 8px; color: var(--muted-2); }
.rumpf > :first-child { margin-top: 0; }
.text p, .text ul, .text ol { margin-bottom: 1.15em; }
.text ul, .text ol { padding-left: 1.3em; }
.text li { margin-bottom: 0.45em; padding-left: 0.2em; }
.text li > ul, .text li > ol { margin: 0.45em 0 0; }
.text li::marker { color: var(--muted); }
.text strong { font-weight: 500; }
/* Die Antwort vorweg: der erste Absatz steht grösser, ohne Kasten */
.lesen .rumpf > p:first-child { font-size: clamp(1.15rem, 1.5vw, 1.3rem); font-weight: 300; line-height: 1.6; color: var(--ink); margin-bottom: 1.4em; }
.text a:not(.cta) { border-bottom: 1px solid rgba(179,91,95,0.45); transition: color 0.25s var(--ease), border-color 0.25s var(--ease); overflow-wrap: anywhere; }
.text a:not(.cta):hover { color: var(--accent); border-color: var(--accent); }
.text :not(pre) > code { font-family: var(--mono); font-size: 0.88em; background: rgba(20,20,20,0.05); padding: 0.1em 0.35em; border-radius: 4px; overflow-wrap: anywhere; }
.text hr { border: 0; border-top: 1px solid var(--hairline); margin: 48px 0; }
.text blockquote { margin: 34px 0; padding-left: 22px; border-left: 1px solid var(--accent); font-size: 1.2rem; font-weight: 300; line-height: 1.55; color: var(--ink); }
.text blockquote p:last-child { margin-bottom: 0; }
.text .hinweis { margin: 34px 0; padding: 4px 0 4px 20px; border-left: 2px solid var(--accent); }
.text .hinweis--warnung { border-left-color: var(--ink); }
.text .hinweis p:last-child { margin-bottom: 0; }

/* Bilder im Text: weisse Fläche ohne Rahmen, Unterschrift darunter */
.rumpf figure:not(.code) { margin: 44px 0; }
.rumpf figure:not(.code) > img { width: 100%; height: auto; background: var(--white); border-radius: var(--r); }
.rumpf figcaption { margin-top: 11px; font-size: 0.86rem; color: var(--muted); line-height: 1.5; }

/* Quellen am Schluss: klein und grau, damit der Text vorne bleibt */
.rumpf > :is(h2#quellen, h2#sources) { font-size: 1.15rem; font-weight: 500; letter-spacing: 0; line-height: 1.4; padding-top: 28px; border-top: 1px solid var(--hairline-2); }
.rumpf > :is(h2#quellen, h2#sources) + :is(ul, ol) { font-size: 0.875rem; line-height: 1.6; color: var(--muted-2); padding-left: 1.1em; }
.rumpf > :is(h2#quellen, h2#sources) + :is(ul, ol) li { margin-bottom: 0.6em; }
.rumpf > :is(h2#quellen, h2#sources) + :is(ul, ol) a:not(.cta) { border-bottom-color: var(--hairline); }

/* ----- Codeblock, Terminal, Änderung ----- */
.code { margin: 34px 0 40px; }
.code pre {
  background: rgba(20,20,20,0.035); border: 0; border-radius: 10px;
  padding: 20px 22px; overflow-x: auto;
  font-family: var(--mono); font-size: 0.84rem; line-height: 1.75; color: var(--ink); tab-size: 2;
}
.code code { display: flex; flex-direction: column; width: max-content; min-width: 100%; font-family: inherit; font-size: inherit; }
/* Zeilen stehen wie im Editor und brechen nie um; ist eine Zeile länger als der Block, rollt der Block waagrecht. */
.code .z { white-space: pre; min-height: 1.75em; }
.code .e { white-space: pre; }  /* Einzug bricht nie für sich allein um */
.code--terminal pre { background: rgba(20,20,20,0.035); color: var(--ink); }
.code--terminal .ein, .code--terminal .info { color: var(--muted); }
.code--terminal .fehl { color: var(--accent-2); }
.code--terminal .gut { color: var(--ink); font-weight: 500; }
.code--diff pre { padding-inline: 0; }
.code--diff .z { padding-inline: 22px; }
.code--diff .kopf { color: var(--muted); }
.code--diff .raus { background: rgba(20,20,20,0.045); color: var(--grau-alt); }
.code--diff .rein { background: rgba(179,91,95,0.09); color: var(--ink); }
@media (max-width: 599px) {
  .code pre { padding: 16px; font-size: 0.8125rem; }
  .code--diff pre { padding-inline: 0; }
  .code--diff .z { padding-inline: 16px; }
}
.code figcaption { margin-top: 11px; }

/* ----- Tabellen: in sich rollend, erste Spalte steht, Seite selbst ohne Überlauf ----- */
.tabelle {
  margin: 34px 0 40px; overflow-x: auto; -webkit-overflow-scrolling: touch;
  border-top: 1px solid var(--ink); border-bottom: 1px solid var(--hairline);
  /* Randschatten rechts, solange es weiterzuschieben gibt */
  background: linear-gradient(to left, var(--bg) 30%, rgba(247,245,243,0)) right / 32px 100% no-repeat local,
              linear-gradient(to left, rgba(20,20,20,0.10), rgba(20,20,20,0)) right / 12px 100% no-repeat scroll;
}
.tabelle table { border-collapse: collapse; width: 100%; font-size: 0.94rem; line-height: 1.45; }
.tabelle th, .tabelle td { text-align: left; vertical-align: top; padding: 16px 14px; border-bottom: 1px solid var(--hairline-2); }
.tabelle tbody tr:last-child > * { border-bottom: 0; }
.tabelle thead th { font-weight: 500; font-size: 0.84rem; color: var(--muted-2); padding-block: 14px; }
.tabelle :is(th, td):first-child { position: sticky; left: 0; z-index: 1; background: var(--bg); padding-left: 0; color: var(--ink); }
.tabelle :is(th, td):not(:first-child) { min-width: 6.5rem; }
.tabelle .zahl { text-align: right; font-variant-numeric: tabular-nums; }
.tabelle .mitte { text-align: center; }
@media (max-width: 999px) { .tabelle :is(th, td):first-child { border-right: 1px solid var(--hairline-2); } }
/* Handy: Spalte «Aufgabe» etwa 130 px, der Rest rollt */
@media (max-width: 599px) {
  .tabelle table { font-size: 0.88rem; }
  .tabelle :is(th, td):first-child { width: 130px; min-width: 130px; max-width: 130px; padding-right: 12px; overflow-wrap: break-word; }
}
/* Handy: Tabellen bis vier Spalten werden zu ruhigen Zeilenblöcken, der Spaltenname steht klein über dem Wert */
@media (max-width: 599px) {
  .tabelle--stapel { overflow: visible; background: none; border-bottom: 0; }
  .tabelle--stapel thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .tabelle--stapel table, .tabelle--stapel tbody, .tabelle--stapel tr, .tabelle--stapel td { display: block; }
  .tabelle--stapel tr { padding: 16px 0 18px; border-bottom: 1px solid var(--hairline-2); }
  .tabelle--stapel tbody tr:last-child { border-bottom: 1px solid var(--hairline); }
  .tabelle--stapel :is(th, td):first-child { position: static; width: auto; min-width: 0; max-width: none; padding: 0; border-right: 0; background: none; font-weight: 500; }
  .tabelle--stapel td, .tabelle--stapel td:not(:first-child) { min-width: 0; padding: 0; border-bottom: 0; text-align: left; }
  .tabelle--stapel td + td { margin-top: 10px; }
  .tabelle--stapel td[data-spalte]::before { content: attr(data-spalte); display: block; margin-bottom: 2px; font-size: 0.78rem; color: var(--muted); }
}
/* Breite Tabellen und Codeblöcke dürfen ab 1000 px in die freie rechte Spalte reichen */
@media (min-width: 1000px) {
  .lesen .rumpf > :is(.tabelle, .code) { width: calc(100% * (1 + 2 / 7.6) + var(--lesen-gap)); max-width: calc(100vw - 2 * var(--pad)); }
  .lesen--schmal .rumpf > :is(.tabelle, .code) { width: 100%; }
}
/* Ab 1100 px passen auch breite Ergebnistabellen ohne Rollen: Spalten dürfen schmal werden */
@media (min-width: 1100px) {
  .tabelle :is(th, td):not(:first-child) { min-width: 0; }
  .tabelle :is(th, td):first-child { min-width: 9rem; }
  .tabelle th, .tabelle td { padding-inline: 0 12px; }
  .tabelle :is(th, td):last-child { padding-right: 0; }
}

/* ----- Schluss eines Beitrags: ein Satz, zwei Textlinks ----- */
.verweis { margin-top: clamp(64px, 9svh, 104px); padding-top: clamp(32px, 4svh, 44px); border-top: 1px solid var(--hairline); }
.verweis p { font-size: clamp(1.15rem, 1.5vw, 1.3rem); font-weight: 300; line-height: 1.5; letter-spacing: -0.005em; }
.verweis__links { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 36px; margin-top: 26px; }
.verweis .contact__mail { display: inline-block; width: auto; margin-top: 0; font-size: 1.05rem; line-height: 1.4; letter-spacing: 0; align-self: center; }

/* ----- Listen von Seiten ----- */
.eintraege { list-style: none; padding: 0; border-top: 1px solid var(--hairline); }
.eintraege > li { border-bottom: 1px solid var(--hairline-2); }
.eintrag { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; padding-block: clamp(28px, 4.5svh, 48px); }
.eintrag__titel { font-size: clamp(1.4rem, 2.1vw, 2rem); line-height: 1.15; text-wrap: balance; overflow-wrap: break-word; transition: color 0.3s var(--ease); }
.eintrag__kurz { margin-top: 14px; color: var(--muted-2); font-weight: 300; max-width: 36rem; }
.eintrag__meta { margin-top: 14px; font-size: 0.88rem; color: var(--muted); }
.eintrag:hover .eintrag__titel { color: var(--accent); }
@media (min-width: 900px) {
  .eintrag:has(.eintrag__bild) { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(40px, 5vw, 96px); align-items: start; }
  .eintrag__bild { max-width: 420px; justify-self: end; width: 100%; }
}
/* Blog: eine ruhige Kartenreihe, alle Karten gleich (Bild 1200:630, Titel, ein Satz, Rubrik und Datum klein).
   Anordnung nach 21st.dev «Blog Grid Section» (ncdai, blog-01): 1, 2, 3 Spalten, Bild oben. */
.eintraege--raster { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(48px, 7svh, 72px) clamp(24px, 3vw, 48px); border-top: 0; margin-top: clamp(40px, 6svh, 64px); padding-bottom: var(--section-y); }
.eintraege--raster > li { border-bottom: 0; }
.eintraege--raster .eintrag, .eintraege--raster .eintrag:has(.eintrag__bild) { display: flex; flex-direction: column; gap: 0; padding-block: 0; height: 100%; }
.eintraege--raster .eintrag__bild { order: -1; max-width: none; width: 100%; aspect-ratio: 1200 / 630; margin-bottom: 22px; justify-self: auto; }
.eintraege--raster .eintrag__bild picture, .eintraege--raster .eintrag__bild img { width: 100%; height: 100%; }
.eintraege--raster .eintrag__bild img { object-fit: cover; transition: opacity 0.3s var(--ease); }
.eintraege--raster .eintrag:hover .eintrag__bild img { opacity: 0.88; }
.eintraege--raster .eintrag__titel { font-size: clamp(1.2rem, 1.45vw, 1.4rem); font-weight: 400; letter-spacing: -0.01em; line-height: 1.3; }
.eintraege--raster .eintrag__kurz { margin-top: 10px; font-size: 0.98rem; line-height: 1.55; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; }
.eintraege--raster .eintrag__meta { margin-top: 14px; font-size: 0.84rem; }
@media (min-width: 800px) { .eintraege--raster { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .eintraege--raster { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* Kurze Liste (weitere Beiträge, Beiträge zum Thema): Titel links, Rubrik und Datum rechts */
.eintraege--kurz .eintrag { padding-block: 20px; gap: 4px; }
.eintraege--kurz .eintrag__titel { font-size: 1.1rem; font-weight: 300; letter-spacing: 0; line-height: 1.4; }
.eintraege--kurz .eintrag__kurz { display: none; }
.eintraege--kurz .eintrag__meta { margin-top: 0; font-size: 0.85rem; }
@media (min-width: 800px) {
  .eintraege--kurz .eintrag__text { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; align-items: baseline; }
}
.weitere { padding-bottom: var(--section-y); }
.weitere h2 { font-size: clamp(1.5rem, 2.2vw, 2rem); margin-bottom: 24px; }

/* ----- Blog: Reiter als eine ruhige Textzeile; am Handy rollt die Zeile seitlich statt umzubrechen ----- */
.rubriken { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: clamp(40px, 6svh, 64px); font-size: 0.95rem; color: var(--muted); }
.rubriken a { white-space: nowrap; padding-bottom: 3px; border-bottom: 1px solid transparent; transition: color 0.25s var(--ease); }
@media (max-width: 639px) {
  .rubriken {
    flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none;
    margin-inline: calc(-1 * var(--pad)); padding-left: var(--pad); padding-right: calc(var(--pad) + 40px);
    scroll-padding-inline: var(--pad);
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent);
    mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent);
  }
  .rubriken::-webkit-scrollbar { display: none; }
  .rubriken a {
    position: relative; display: inline-flex; align-items: center;
    min-height: 44px; padding-bottom: 0; border-bottom: 0;
  }
  .rubriken a::after {
    content: ""; position: absolute; left: 0; right: 0; top: calc(50% + 0.85em);
    height: 1px; background: transparent; pointer-events: none;
  }
  .rubriken a:hover::after { background: var(--accent); }
  .rubriken a[aria-current="page"]::after { background: currentColor; }
}
@media (min-width: 640px) and (max-width: 960px) {
  .rubriken a { position: relative; }
  .rubriken a::before {
    content: ""; position: absolute; left: -6px; right: -6px; top: 50%;
    height: 44px; transform: translateY(-50%);
  }
}
.rubriken a:hover { color: var(--accent); }
.rubriken a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); }
.uebersicht__text { margin-top: clamp(32px, 5svh, 56px); }
.uebersicht .eintraege:not(.eintraege--raster) { margin-top: clamp(48px, 8svh, 96px); }

/* ----- Leistung und Fragen: Titel links, Text rechts, Haarlinie je Abschnitt ----- */
.abschnitte { margin-top: clamp(56px, 9svh, 112px); }
.abschnitte + .abschnitte { margin-top: 0; }
.abschnitte > h2, .frage > h2 { font-size: clamp(1.75rem, 2.7vw, 2.45rem); text-wrap: balance; overflow-wrap: break-word; }
/* Die Frage selbst nicht auf den Satzspiegel begrenzen: sonst liegt der ganze Block
   nur links und die Fragespalte wird auf rund 200 px gedrückt. */
.abschnitte > :not(h2):not(.frage), .frage .antwort { font-size: 1.0625rem; line-height: 1.72; max-width: var(--measure); }
.abschnitte p, .abschnitte ul, .abschnitte ol, .antwort p, .antwort ul, .antwort ol { margin-bottom: 1.1em; }
.abschnitte ul, .abschnitte ol, .antwort ul, .antwort ol { padding-left: 1.3em; }
.abschnitte a:not(.cta):not(.eintrag), .antwort a { border-bottom: 1px solid rgba(179,91,95,0.45); transition: color 0.25s var(--ease); }
.abschnitte a:not(.cta):not(.eintrag):hover, .antwort a:hover { color: var(--accent); }
.abschnitte > h2 { margin-top: clamp(48px, 8svh, 96px); padding-top: clamp(28px, 4svh, 44px); border-top: 1px solid var(--hairline-2); margin-bottom: 20px; }
.abschnitte > figure { margin-block: clamp(40px, 6svh, 72px); }
.abschnitte > figure > img { width: 100%; height: auto; background: var(--white); border: 1px solid var(--hairline-2); border-radius: var(--r); }
.abschnitte > figure figcaption { margin-top: 14px; font-size: 0.88rem; color: var(--muted); max-width: 44rem; line-height: 1.55; }
.abschnitte > .eintraege { padding-left: 0; }
.frage { padding-block: clamp(28px, 4svh, 44px); border-top: 1px solid var(--hairline-2); display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; font-size: 1.0625rem; line-height: 1.72; }
.frage > h2 { font-size: clamp(1.35rem, 2vw, 1.75rem); line-height: 1.2; min-width: 0; }
.frage .antwort > :last-child { margin-bottom: 0; }
@media (min-width: 900px) {
  .abschnitte { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr); column-gap: clamp(28px, 5vw, 80px); }
  .abschnitte > * { grid-column: 2; }
  .abschnitte > h2 { grid-column: 1; margin-bottom: 0; }
  .abschnitte > h2 + * { margin-top: clamp(48px, 8svh, 96px); padding-top: clamp(28px, 4svh, 44px); border-top: 1px solid var(--hairline-2); }
  .abschnitte > h2 + .eintraege { padding-top: 0; }
  .abschnitte.rumpf > h2:first-child + * { margin-top: 0; }
  .abschnitte > figure { grid-column: 1 / -1; }
  .fragen__liste { display: block; }
  .frage { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr); column-gap: clamp(28px, 5vw, 80px); }
  .frage > h2 { overflow-wrap: normal; hyphens: auto; }
}
.fragen__einleitung { margin-top: clamp(40px, 6svh, 64px); }

/* ----- Kontakt am Schluss ----- */
.kontakt-ende { margin-top: clamp(56px, 9svh, 112px); padding-block: clamp(72px, 12svh, 160px); border-top: 1px solid var(--hairline-2); }
.kontakt-ende h2 { font-size: clamp(2.2rem, 5.4vw, 4.4rem); max-width: 14em; text-wrap: balance; }
.kontakt-ende .contact__mail { margin-top: clamp(28px, 4svh, 44px); }
.kontakt-ende .contact__mail + .contact__mail { margin-top: 4px; }
.kontakt-ende .weiter { margin-top: 18px; color: var(--muted); font-size: 0.9rem; }
.textseite .kontakt-ende { margin-top: 0; }
a[href^="tel:"] { white-space: nowrap; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }
