/* SIHTRA – Design-System
   Hell als Basis, viel Weißraum, Orange nur als Akzent.
   Mobil zuerst, Breakpoints 48em und 64em. Keine externen Ressourcen. */

/* ---------- Schrift ---------- */
@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-variable.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  color-scheme: dark;
  --c-bg: #26292E;
  --c-text: #D3D6DA;
  --c-text-muted: #A9AEB5;
  --c-heading: #ECEEF0;
  --c-accent: #F29A3A;
  --c-accent-text: #2B2E33;
  --c-link: #F29A3A;
  --c-surface: #2F3338;
  --c-card: #2C3035;
  --c-border: #3D4249;
  --c-border-strong: #7A818B;
  --c-field: #1F2226;
  --c-focus: #F29A3A;
  --c-error: #FF8A80;
  --c-zebra: #2B2F34;
  --c-logo-ink: #D3D6DA;
  --c-logo-acc: #F29A3A;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow-md: 0 1px 2px rgba(0, 0, 0, .25), 0 12px 28px -14px rgba(0, 0, 0, .6);
  --c-bg-glow1: rgba(242, 154, 58, .07);
  --c-bg-glow2: rgba(242, 154, 58, .045);
  --c-bg-shade: rgba(0, 0, 0, .16);
  --c-illu: #E9EBEE;
  --glass-bg: rgba(44, 48, 53, .78);
  --glass-border: rgba(255, 255, 255, .08);
  --glass-edge: rgba(0, 0, 0, .18);
  --glass-spec: rgba(255, 255, 255, .09);
  --glass-shadow: 0 8px 24px rgba(0, 0, 0, .22);
  --glass-sweep: rgba(255, 255, 255, .045);
  --font: "Archivo", system-ui, sans-serif;
  --skew: -14deg;
  --header-h: 4rem;
  --measure: 55ch; /* Archivo: 55ch ≈ 70–75 Zeichen pro Zeile */
  --radius: .5rem;
  --radius-lg: .875rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --space-section: clamp(3rem, 2rem + 4vw, 5.5rem);
  --glass-blur: blur(14px) saturate(1.1);
  --c-hover-border: color-mix(in srgb, var(--c-accent) 45%, transparent);
}

:root[data-theme="light"] {
  color-scheme: light;
  --c-bg: #FFFFFF;
  --c-text: #4A4F57;
  --c-text-muted: #5F656E;
  --c-heading: #2B2E33;
  --c-accent: #EE8A1E;
  --c-accent-text: #2B2E33;
  --c-link: #A85A05;
  --c-surface: #F4F5F7;
  --c-card: #FFFFFF;
  --c-border: #E1E4E8;
  --c-border-strong: #868C95;
  --c-field: #FFFFFF;
  --c-focus: #A85A05;
  --c-error: #B3261E;
  --c-zebra: #F7F8F9;
  --c-logo-ink: #4A4F57;
  --c-logo-acc: #EE8A1E;
  --shadow-sm: 0 1px 2px rgba(43, 46, 51, .05);
  --shadow-md: 0 1px 2px rgba(43, 46, 51, .04), 0 10px 28px -14px rgba(43, 46, 51, .18);
  --c-bg-glow1: rgba(238, 138, 30, .07);
  --c-bg-glow2: rgba(238, 138, 30, .045);
  --c-bg-shade: rgba(74, 79, 87, .04);
  --c-illu: var(--c-card);
  --glass-bg: rgba(255, 255, 255, .82);
  --glass-border: rgba(255, 255, 255, .55);
  --glass-edge: rgba(43, 46, 51, .07);
  --glass-spec: rgba(255, 255, 255, .95);
  --glass-shadow: 0 8px 24px rgba(43, 46, 51, .06);
  --glass-sweep: rgba(255, 255, 255, .28);
}

@media (max-width: 63.99em) {
  :root { --header-h: 3.5rem; }
}

/* ---------- Basis ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

[id] { scroll-margin-top: calc(var(--header-h) + 1rem); }

body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--font);
  font-stretch: 100%;
  font-weight: 400;
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.125rem);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--c-heading);
  font-stretch: 112%;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.012em;
  margin: 0 0 .6em;
  text-wrap: balance;
  hyphens: auto;
  -webkit-hyphens: auto;
  hyphenate-limit-chars: 10 4 4;
}
h1 { font-size: clamp(2.1rem, 1.5rem + 2.6vw, 3.4rem); line-height: 1.05; }
h2 { font-size: clamp(1.55rem, 1.25rem + 1.3vw, 2.2rem); }
h3 { font-size: clamp(1.15rem, 1.08rem + .35vw, 1.35rem); font-stretch: 108%; line-height: 1.25; }
h4, h5, h6 { font-size: 1rem; font-stretch: 105%; font-weight: 700; letter-spacing: 0; line-height: 1.35; }

p, ul, ol, dl, blockquote, figure, table { margin: 0 0 1.1em; }
ul, ol { padding-left: 1.25em; }
li + li { margin-top: .35em; }
li::marker { color: var(--c-text-muted); }
strong, b { color: var(--c-heading); font-weight: 700; }
hr { border: 0; border-top: 1px solid var(--c-border); margin: 2.5rem 0; }

img, svg, video { max-width: 100%; height: auto; }
img { display: block; border-radius: var(--radius); }

a {
  color: var(--c-link);
  text-decoration: underline;
  text-decoration-thickness: .08em;
  text-underline-offset: .15em;
}
a:hover { text-decoration-thickness: .14em; }

:focus-visible {
  outline: 3px solid var(--c-focus);
  outline-offset: 3px;
  border-radius: 2px;
}
main:focus { outline: none; }

/* Hintergrund: weiche Eckflächen hinter dem Inhalt (body::before).
   Mobil über die Seitenhöhe, Desktop fixiert; die langsame Drift steht im Effekte-Block. */
body { position: relative; }
body::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 60% 65% at 92% 8%, var(--c-bg-glow1), transparent 72%),
    radial-gradient(ellipse 50% 55% at 6% 96%, var(--c-bg-glow2), transparent 72%),
    radial-gradient(ellipse 45% 50% at 0% 30%, var(--c-bg-shade), transparent 72%);
}
@media (min-width: 64em) {
  body::before { position: fixed; inset: -3%; }
}

::selection { background: var(--c-accent); color: var(--c-accent-text); }

.container {
  width: 100%;
  max-width: 74rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Skip-Link ---------- */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -10rem;
  z-index: 100;
  padding: .75rem 1.25rem;
  background: var(--c-heading);
  color: var(--c-bg);
  font-weight: 700;
  text-decoration: none;
  border-radius: var(--radius);
}
.skip-link:focus { top: .5rem; }

/* ---------- Buttons ---------- */
/* Eine Form für alle Buttons: Pille, gleiches Padding, weicher Schatten,
   1px Anheben beim Hover. Nur die Farben hängen vom Untergrund ab. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 44px;
  padding: .85rem 1.75rem;
  border: 2px solid transparent;
  border-radius: 999px;
  background: var(--c-accent);
  color: var(--c-accent-text);
  font: inherit;
  font-weight: 700;
  font-stretch: 106%;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(43, 46, 51, .22), inset 0 1px 0 rgba(255, 255, 255, .08);
  transition: transform .2s ease, filter .2s ease, box-shadow .2s ease, background-color .2s ease, color .2s ease;
}
.btn:hover,
.btn:focus-visible {
  filter: brightness(.95);
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(43, 46, 51, .28), inset 0 1px 0 rgba(255, 255, 255, .1);
}
.btn:active { transform: none; }
/* Button auf der Orange-Fläche: dunkel mit weißer Schrift */
.btn--on-accent {
  background: #2B2E33;
  color: #FFFFFF;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--c-bg);
  border-bottom: 1px solid var(--c-border);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  height: var(--header-h);
}
.brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  flex: none;
}
.brand svg { display: block; height: 1.3rem; width: auto; }

.burger {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-right: -.5rem;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--c-heading);
  cursor: pointer;
}
.burger__bars,
.burger__bars::before,
.burger__bars::after {
  display: block;
  width: 1.375rem;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform .2s ease, background-color .2s ease;
}
.burger__bars { position: relative; }
.burger__bars::before,
.burger__bars::after { content: ""; position: absolute; left: 0; }
.burger__bars::before { top: -7px; }
.burger__bars::after { top: 7px; width: .95rem; }
.burger[aria-expanded="true"] .burger__bars { background: transparent; }
.burger[aria-expanded="true"] .burger__bars::before { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] .burger__bars::after { transform: translateY(-7px) rotate(-45deg); width: 1.375rem; }

.mainnav ul,
.subnav { list-style: none; margin: 0; padding: 0; }
.mainnav li + li,
.subnav li + li { margin-top: 0; }
.mainnav a,
.subnav a {
  color: var(--c-heading);
  text-decoration: none;
}

.mainnav__toggle {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--c-text-muted);
  cursor: pointer;
}
.mainnav__toggle::before {
  content: "";
  width: .5rem;
  height: .5rem;
  margin-top: -.25rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform .2s ease;
}
.mainnav__toggle[aria-expanded="true"]::before { transform: translateY(.2rem) rotate(-135deg); }

.site-menu__tools {
  display: flex;
  align-items: center;
  gap: .25rem;
}
.lang-switch {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 .75rem;
  border-radius: var(--radius);
  color: var(--c-text-muted);
  font-size: .9rem;
  font-weight: 600;
  text-decoration: none;
}
.lang-switch:hover { color: var(--c-heading); }
.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--c-text-muted);
  cursor: pointer;
}
.theme-toggle:hover { color: var(--c-heading); background: var(--c-surface); }
.theme-toggle .icon { display: block; width: 20px; height: 20px; }
.theme-toggle .icon-sun { display: none; }
:root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
:root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
/* Ohne JS kann das Theme nicht gewechselt werden. */
html.no-js .theme-toggle { display: none; }

/* Mobil: Burger + Panel */
@media (max-width: 63.99em) {
  .site-menu {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    max-height: calc(100vh - var(--header-h));
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto;
    padding: .5rem var(--gutter) 1.5rem;
    background: var(--c-bg);
    border-bottom: 1px solid var(--c-border);
    box-shadow: var(--shadow-md);
  }
  body.menu-open { overflow: hidden; }
  body.menu-open .site-menu { display: block; }

  .mainnav__item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    border-bottom: 1px solid var(--c-border);
  }
  .mainnav__item > a {
    flex: 1;
    display: flex;
    align-items: center;
    min-height: 3.25rem;
    font-weight: 700;
    font-stretch: 108%;
    font-size: 1.1rem;
  }
  .mainnav__item > a[aria-current="page"] { color: var(--c-link); }
  .subnav { flex-basis: 100%; padding: 0 0 .75rem .75rem; display: block; }
  .subnav[hidden] { display: none; }
  .subnav a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding-left: .75rem;
    border-left: 2px solid var(--c-border);
    color: var(--c-text);
  }
  .site-menu__tools { justify-content: space-between; padding-top: .75rem; }
  .lang-switch { margin-left: -.75rem; }

  /* Ohne JS: Menü als einfache Liste unter dem Kopf. */
  html.no-js .burger { display: none; }
  html.no-js .site-header { position: relative; }
  html.no-js .site-header__inner { height: auto; flex-wrap: wrap; padding-block: .75rem; }
  html.no-js .site-menu {
    display: block;
    position: static;
    flex-basis: 100%;
    max-height: none;
    padding: 0;
    border: 0;
    box-shadow: none;
  }
  html.no-js .mainnav__toggle { display: none; }
}

/* Desktop: horizontale Navigation mit Dropdowns */
@media (min-width: 64em) {
  .brand svg { height: 1.5rem; }
  .burger { display: none; }
  .site-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
  }
  .mainnav > ul { display: flex; align-items: center; gap: .25rem; }
  .mainnav__item { position: relative; display: flex; align-items: center; }
  .mainnav__item > a {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 .75rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: .975rem;
  }
  .mainnav__item.has-sub > a { padding-right: 0; }
  .mainnav__item > a:hover { color: var(--c-link); }
  /* Unterstrich: wächst bei Hover/Fokus von links, aktuelle Seite statisch */
  .mainnav__item > a::after {
    content: "";
    position: absolute;
    left: .75rem;
    right: .75rem;
    bottom: .35rem;
    height: 2px;
    background: var(--c-accent);
    transform: scaleX(0);
    transform-origin: left;
  }
  .mainnav__item > a:hover::after,
  .mainnav__item > a:focus-visible::after,
  .mainnav__item > a[aria-current="page"]::after { transform: none; }
  .mainnav__item.has-sub > a::after { right: 0; }
  /* 44px Zielfläche direkt neben dem Link (keine Überlappung mit dem Linktext);
     rechts nur bis an die Lücke zum nächsten Punkt heran */
  .mainnav__toggle { width: 44px; height: 44px; margin-left: 0; margin-right: -.25rem; }
  .mainnav__toggle:hover { color: var(--c-heading); }

  .subnav {
    display: none;
    position: absolute;
    top: calc(100% - .25rem);
    left: 0;
    z-index: 60;
    min-width: 17rem;
    padding: .5rem;
    background: var(--c-card);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
  }
  /* Ohne JS: Hover und Fokus öffnen das Untermenü. */
  html.no-js .has-sub:hover > .subnav,
  html.no-js .has-sub:focus-within > .subnav { display: block; }
  /* Mit JS: nur der Schalter (aria-expanded, hidden entfernt) oder der Mauszeiger;
     Escape setzt .is-dismissed bis der Zeiger den Punkt verlässt. */
  html.js .mainnav__toggle[aria-expanded="true"] + .subnav:not([hidden]),
  html.js .has-sub:hover:not(.is-dismissed) > .subnav { display: block; }
  .subnav a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: .375rem .875rem;
    border-radius: var(--radius);
    color: var(--c-text);
    font-size: .95rem;
    line-height: 1.3;
  }
  .subnav a:hover { background: var(--c-surface); color: var(--c-heading); }
  html.no-js .mainnav__toggle { display: none; }
  html.no-js .mainnav__item.has-sub > a { padding-right: .75rem; }
  html.no-js .mainnav__item.has-sub > a::after { right: .75rem; }

  .site-menu__tools {
    padding-left: 1rem;
    border-left: 1px solid var(--c-border);
  }
}

/* ---------- Seitenkopf ---------- */
.page-head {
  padding-top: clamp(2.5rem, 1.5rem + 4vw, 5rem);
  padding-bottom: clamp(1.5rem, 1rem + 2vw, 2.5rem);
}
.page-head h1 { max-width: 22ch; margin-bottom: 0; }
.page-head__intro {
  max-width: 52ch;
  margin: 1.25rem 0 0;
  font-size: 1.15em;
  color: var(--c-text-muted);
}
.page-head__intro:empty,
.hero__intro:empty { display: none; }

/* Kopfbild der Themenseite: dezent, volle Inhaltsbreite (Glasrahmen, Hover im Medien-Block) */
.page-head__image {
  position: relative;
  margin-top: clamp(1.5rem, 1rem + 2vw, 2.5rem);
}
.page-head__image picture { display: block; }
.page-head__image img {
  width: 100%;
  aspect-ratio: 21 / 9;
  max-height: 22rem;
  object-fit: cover;
  object-position: center 60%;
  border-radius: var(--radius-lg);
  filter: saturate(.8);
}

/* Fotos im Text: dezent, nicht randlos */
.section > p > picture:only-child { display: block; }
.section > p:has(> picture:only-child) { max-width: 34rem; margin-block: 1.5rem; }
.section > p > picture:only-child img {
  width: 100%;
  border-radius: var(--radius-lg);
  filter: saturate(.85);
  opacity: .95;
}
.section > p:has(> picture.foto-breit) { max-width: none; }
.section > p > picture.foto-breit img { aspect-ratio: 21 / 9; object-fit: cover; }
.section > p:has(> picture:only-child) + p:has(> em:only-child) {
  margin-top: -.75rem;
  color: var(--c-text-muted);
  font-size: .9rem;
}
.section > p > picture.illu-panel:only-child img { filter: none; opacity: 1; padding: 0; }

/* Illustrationen: helles Feld (wichtig im Dark Mode, Strich bleibt dunkel) */
.illu-panel {
  background: #E9EBEE;
  border-radius: var(--radius-lg);
  padding: .5rem;
}
/* Illustrationen im Text: Kartenlook (Radius, Fläche, Rand, Schatten wie .karte).
   Dunkel bleibt das helle Feld (--c-illu), weil der Strich dunkel ist. Kein Link: Hover hebt nur an. */
.section > p:not(.portrait) > .illu-panel:only-child {
  background: var(--c-illu);
  border: 1px solid var(--c-border);
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
picture.illu-panel { display: block; }
picture.illu-panel img { border-radius: var(--radius); }
img.illu-klein, .illu-klein img { width: 100%; }
.section > p:has(> .illu-klein:only-child) { max-width: 22rem; margin-block: 1.5rem; }
@media (min-width: 48em) {
  .section > p:has(> .illu-klein:only-child) { max-width: 50%; }
}

/* SIHTRA-Icon als Marker */
.logo-icon {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  margin-right: .45em;
  vertical-align: -.15em;
}
.logo-icon path:first-child { fill: var(--c-heading); }
.logo-icon path:last-child { fill: var(--c-accent); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(3.5rem, 2rem + 7vw, 8rem) clamp(3rem, 2rem + 5vw, 6.5rem);
  border-bottom: 1px solid var(--c-border);
}
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  bottom: -2rem;
  pointer-events: none;
  transform: skewX(var(--skew));
  transform-origin: bottom;
}
.hero::before {
  right: 9%;
  height: 46%;
  width: 6px;
  background: var(--c-accent);
}
.hero::after {
  right: calc(9% + 2.25rem);
  height: 30%;
  width: 2px;
  background: var(--c-border-strong);
  opacity: .55;
}
.hero__inner { position: relative; }
.hero__inner > svg {
  display: block;
  width: min(18rem, 80%);
  height: auto;
  margin-bottom: clamp(2rem, 1.5rem + 2vw, 3rem);
}
.hero__claim {
  max-width: 16ch;
  margin: 0;
  font-size: clamp(2.4rem, 1.5rem + 4vw, 4.5rem);
  line-height: 1.02;
  letter-spacing: -.02em;
}
.hero__intro {
  max-width: 44ch;
  margin: 1.5rem 0 0;
  font-size: clamp(1.1rem, 1rem + .5vw, 1.3rem);
  color: var(--c-text-muted);
}
.hero__actions { margin: 2.25rem 0 0; }
@media (min-width: 48em) {
  .hero__inner > svg { width: min(24rem, 60%); }
  .hero::before { right: 14%; height: 70%; width: 7px; }
  .hero::after { right: calc(14% + 3rem); height: 48%; }
}

/* ---------- Hintergrund-Motiv ----------
   Linienmotiv je Themenseite auf body::after (Variablen aus dem MOTIVE-Block, DE und EN gleich).
   Seiten ohne Variable (Kontakt, Danke, Rechtliches) zeigen kein Motiv.
   Mobil: eine Kopie rechts oben hinter dem Kopfbereich, halbe Deckkraft, scrollt mit.
   Desktop: fixiert in den Rändern; die Drift beim Scrollen steht im Effekte-Block. */
/* MOTIVE START – erzeugt von tools/build_motive.py, nicht von Hand bearbeiten */
body.page-fahrsicherheitstraining {
  --motif-l: url("data:image/svg+xml,%3Csvg xmlns='http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg' viewBox='0 0 640 480'%3E%3Cg fill='none' stroke='rgba(74,79,87,.055)' stroke-width='5' stroke-linecap='round'%3E%3Cpath d='M-7 385L5 406M14 383L27 403M34 379L49 398M55 374L71 392M75 367L92 384M95 359L113 375M115 350L133 365M134 340L154 354M154 329L174 343M174 317L194 330M193 305L213 317M212 292L233 304M232 278L252 291M251 265L272 277M270 251L291 263M290 237L311 249M310 223L330 235M330 208L350 221M350 195L370 207M370 181L390 194M391 167L411 181M412 154L432 168M434 141L454 156M456 129L475 144M479 118L498 133M503 107L520 123M527 97L544 114M551 88L567 106M576 80L591 99M601 74L616 93M627 68L641 88'%2F%3E%3Cpath d='M-1 453L11 474M25 450L38 470M50 445L65 464M75 439L91 457M99 431L116 448M122 421L140 437M145 411L164 426M167 399L187 414M189 387L209 401M210 375L230 388M231 361L251 374M251 348L271 360M271 334L292 346M290 320L311 332M310 306L331 318M329 292L350 304M349 278L370 290M368 264L389 277M467 201L487 215M488 190L507 205M508 179L527 195M529 169L547 186M551 160L568 177M572 153L589 170M594 146L609 164M616 140L631 159M639 135L652 155'%2F%3E%3Cpath d='M388 251L408 263M407 238L428 251M427 225L447 238M447 213L467 226' stroke='rgba(238,138,30,.08)'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E");
  --motif-d: url("data:image/svg+xml,%3Csvg xmlns='http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg' viewBox='0 0 640 480'%3E%3Cg fill='none' stroke='rgba(211,214,218,.04)' stroke-width='5' stroke-linecap='round'%3E%3Cpath d='M-7 385L5 406M14 383L27 403M34 379L49 398M55 374L71 392M75 367L92 384M95 359L113 375M115 350L133 365M134 340L154 354M154 329L174 343M174 317L194 330M193 305L213 317M212 292L233 304M232 278L252 291M251 265L272 277M270 251L291 263M290 237L311 249M310 223L330 235M330 208L350 221M350 195L370 207M370 181L390 194M391 167L411 181M412 154L432 168M434 141L454 156M456 129L475 144M479 118L498 133M503 107L520 123M527 97L544 114M551 88L567 106M576 80L591 99M601 74L616 93M627 68L641 88'%2F%3E%3Cpath d='M-1 453L11 474M25 450L38 470M50 445L65 464M75 439L91 457M99 431L116 448M122 421L140 437M145 411L164 426M167 399L187 414M189 387L209 401M210 375L230 388M231 361L251 374M251 348L271 360M271 334L292 346M290 320L311 332M310 306L331 318M329 292L350 304M349 278L370 290M368 264L389 277M467 201L487 215M488 190L507 205M508 179L527 195M529 169L547 186M551 160L568 177M572 153L589 170M594 146L609 164M616 140L631 159M639 135L652 155'%2F%3E%3Cpath d='M388 251L408 263M407 238L428 251M427 225L447 238M447 213L467 226' stroke='rgba(242,154,58,.07)'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E");
}
body.page-it-security {
  --motif-l: url("data:image/svg+xml,%3Csvg xmlns='http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg' viewBox='0 0 640 560'%3E%3Cg fill='none' stroke='rgba(74,79,87,.055)' stroke-width='5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M107 133 L213 87'%2F%3E%3Cpath d='M247 88 L363 142'%2F%3E%3Cpath d='M398 144 L522 106'%2F%3E%3Cpath d='M98 157 L152 283'%2F%3E%3Cpath d='M237 97 L313 273'%2F%3E%3Cpath d='M373 167 L327 273'%2F%3E%3Cpath d='M535 118 L485 312'%2F%3E%3Cpath d='M179 299 L301 291'%2F%3E%3Cpath d='M338 295 L462 325'%2F%3E%3Cpath d='M170 316 L240 434'%2F%3E%3Cpath d='M312 307 L258 433'%2F%3E%3Cpath d='M475 348 L435 482'%2F%3E%3Cpath d='M268 455 L412 495'%2F%3E%3Cpath d='M389 167 L471 313'%2F%3E%3Ccircle cx='90' cy='140' r='10'%2F%3E%3Ccircle cx='230' cy='80' r='10'%2F%3E%3Ccircle cx='380' cy='150' r='10'%2F%3E%3Ccircle cx='540' cy='100' r='10'%2F%3E%3Ccircle cx='160' cy='300' r='10'%2F%3E%3Ccircle cx='320' cy='290' r='10' stroke='rgba(238,138,30,.08)' stroke-width='7'%2F%3E%3Ccircle cx='480' cy='330' r='10'%2F%3E%3Ccircle cx='250' cy='450' r='10'%2F%3E%3Ccircle cx='430' cy='500' r='10'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E");
  --motif-d: url("data:image/svg+xml,%3Csvg xmlns='http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg' viewBox='0 0 640 560'%3E%3Cg fill='none' stroke='rgba(211,214,218,.04)' stroke-width='5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M107 133 L213 87'%2F%3E%3Cpath d='M247 88 L363 142'%2F%3E%3Cpath d='M398 144 L522 106'%2F%3E%3Cpath d='M98 157 L152 283'%2F%3E%3Cpath d='M237 97 L313 273'%2F%3E%3Cpath d='M373 167 L327 273'%2F%3E%3Cpath d='M535 118 L485 312'%2F%3E%3Cpath d='M179 299 L301 291'%2F%3E%3Cpath d='M338 295 L462 325'%2F%3E%3Cpath d='M170 316 L240 434'%2F%3E%3Cpath d='M312 307 L258 433'%2F%3E%3Cpath d='M475 348 L435 482'%2F%3E%3Cpath d='M268 455 L412 495'%2F%3E%3Cpath d='M389 167 L471 313'%2F%3E%3Ccircle cx='90' cy='140' r='10'%2F%3E%3Ccircle cx='230' cy='80' r='10'%2F%3E%3Ccircle cx='380' cy='150' r='10'%2F%3E%3Ccircle cx='540' cy='100' r='10'%2F%3E%3Ccircle cx='160' cy='300' r='10'%2F%3E%3Ccircle cx='320' cy='290' r='10' stroke='rgba(242,154,58,.07)' stroke-width='7'%2F%3E%3Ccircle cx='480' cy='330' r='10'%2F%3E%3Ccircle cx='250' cy='450' r='10'%2F%3E%3Ccircle cx='430' cy='500' r='10'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E");
}
body.page-security {
  --motif-l: url("data:image/svg+xml,%3Csvg xmlns='http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg' viewBox='0 0 640 640'%3E%3Cg fill='none' stroke='rgba(74,79,87,.055)' stroke-width='5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M262 430 V352 L320 300 L378 352 V430 Z M306 430 V392 H334 V430'%2F%3E%3Crect x='200' y='240' width='240' height='240' rx='28' stroke='rgba(238,138,30,.08)' stroke-dasharray='16 14'%2F%3E%3Crect x='135' y='175' width='370' height='370' rx='40' stroke-dasharray='16 14'%2F%3E%3Crect x='70' y='110' width='500' height='500' rx='52' stroke-dasharray='16 14'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E");
  --motif-d: url("data:image/svg+xml,%3Csvg xmlns='http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg' viewBox='0 0 640 640'%3E%3Cg fill='none' stroke='rgba(211,214,218,.04)' stroke-width='5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M262 430 V352 L320 300 L378 352 V430 Z M306 430 V392 H334 V430'%2F%3E%3Crect x='200' y='240' width='240' height='240' rx='28' stroke='rgba(242,154,58,.07)' stroke-dasharray='16 14'%2F%3E%3Crect x='135' y='175' width='370' height='370' rx='40' stroke-dasharray='16 14'%2F%3E%3Crect x='70' y='110' width='500' height='500' rx='52' stroke-dasharray='16 14'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E");
}
body.page-start {
  --motif-l: url("data:image/svg+xml,%3Csvg xmlns='http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg' viewBox='0 0 640 640'%3E%3Cg fill='none' stroke='rgba(74,79,87,.055)' stroke-width='5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M150 610 L284.6 70'%2F%3E%3Cpath d='M262 560 L361.7 160'%2F%3E%3Cpath d='M374 610 L443.8 330'%2F%3E%3Cpath d='M470 600 L502.4 470' stroke='rgba(238,138,30,.08)' stroke-width='8'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E");
  --motif-d: url("data:image/svg+xml,%3Csvg xmlns='http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg' viewBox='0 0 640 640'%3E%3Cg fill='none' stroke='rgba(211,214,218,.04)' stroke-width='5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M150 610 L284.6 70'%2F%3E%3Cpath d='M262 560 L361.7 160'%2F%3E%3Cpath d='M374 610 L443.8 330'%2F%3E%3Cpath d='M470 600 L502.4 470' stroke='rgba(242,154,58,.07)' stroke-width='8'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E");
}
/* MOTIVE END */
body::after {
  --motif: var(--motif-l, none);
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
  background-image: var(--motif);
  background-repeat: no-repeat;
  background-size: 70vw auto;
  background-position: right -14vw top calc(var(--header-h) + 1.5rem);
  opacity: .5;
}
:root:not([data-theme="light"]) body::after { --motif: var(--motif-d, none); }
@media (min-width: 64em) {
  body::after {
    --motif-drift: 22vh;
    position: fixed;
    inset: 0 0 calc(-1 * var(--motif-drift)) 0;
    height: auto;
    opacity: 1;
    background-image: var(--motif), var(--motif);
    background-size: min(42vw, 640px) auto, min(28vw, 420px) auto;
    background-position: right -8vw top 18vh, left -11vw top 66vh;
  }
  /* Start: die Hero-Linien stehen rechts, das Motiv nur links */
  body.page-start::after {
    background-image: var(--motif);
    background-size: min(34vw, 520px) auto;
    background-position: left -13vw top 54vh;
  }
}

/* ---------- Inhalte ---------- */
.home-body,
.page-body { padding-bottom: var(--space-section); }

.intro {
  max-width: 48ch; /* größere Schrift: 48ch ≈ Zeilenlänge von --measure */
  padding-top: var(--space-section);
  font-size: 1.15em;
  color: var(--c-heading);
}
.intro > :last-child { margin-bottom: 0; }
.page-head + .page-body .intro,
.topic-body > .intro { padding-top: 0; }

.section {
  padding-top: var(--space-section);
}
.section + .section { margin-top: 0; }
.home-body > .section + .section,
.home-body > .intro + .section { border-top: 1px solid var(--c-border); margin-top: var(--space-section); }
.section > h2 { max-width: 28ch; margin-bottom: .75em; }
.section > h3,
.section > h4 { margin-top: 2em; }
.section > p,
.section > ul,
.section > ol,
.section > blockquote,
.contact-body p { max-width: var(--measure); }
.contact-body .intro p { max-width: none; }
.section > :last-child { margin-bottom: 0; }
/* Rechtstexte und Hinweisseiten: kompaktere Abschnitte */
.layout-page .page-body .section { padding-top: clamp(1.75rem, 1.5rem + 1vw, 2.5rem); }
.layout-page .page-body .section > h2 { font-size: clamp(1.35rem, 1.2rem + .6vw, 1.75rem); }
/* Porträt (Startseite): mobil kompakt, ab Tablet rechts neben dem Text */
.section:has(> .portrait) { display: flow-root; }
.section > p.portrait { max-width: 16rem; margin: 0 0 1.5rem; }
.portrait picture { display: block; transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.portrait img { width: 100%; border-radius: var(--radius-lg); }
.portrait mark.ph { display: inline-block; margin-top: .5rem; font-size: .85rem; }
@media (min-width: 48em) {
  .section > p.portrait { float: right; width: clamp(14rem, 28%, 20rem); max-width: none; margin: 0 0 1.5rem 2rem; }
}

blockquote {
  margin-left: 0;
  padding-left: 1.25rem;
  border-left: 2px solid var(--c-border-strong);
  color: var(--c-text-muted);
  font-style: italic;
}

code {
  font-size: .9em;
  padding: .1em .35em;
  border-radius: 4px;
  background: var(--c-surface);
}

/* Platzhalter */
mark.ph {
  background: #FFE58A;
  color: #2B2E33;
  outline: 1px dashed #B8860B;
  padding: 0 .25em;
  border-radius: 2px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

/* Praxis: Kopf (Avatar, Name, Label) aus build.py, orange Kante als ::after
   (zeichnet sich beim Einblenden, Effekte-Block), Fazit-Absatz mit Schrägstrich */
.praxis {
  position: relative;
  max-width: var(--measure);
  margin: 2rem 0;
  padding: 1.5rem clamp(1.25rem, 1rem + 1vw, 2rem) 1.5rem calc(clamp(1.25rem, 1rem + 1vw, 2rem) + 4px);
  background: var(--c-surface);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
}
.praxis::after {
  content: "";
  position: absolute;
  left: -1px;
  top: -1px;
  bottom: -1px;
  width: 4px;
  background: var(--c-accent);
  transform-origin: top;
  pointer-events: none;
}
.praxis__head {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: .75rem;
  align-items: center;
  margin: 0 0 1rem;
}
.praxis__head > picture { display: block; grid-row: 1 / span 2; }
.praxis__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 18%;
  background: #E9EBEE;
  box-shadow: 0 0 0 2px var(--c-bg), 0 0 0 3px var(--c-border);
}
.praxis__name {
  color: var(--c-heading);
  font-weight: 700;
  font-stretch: 106%;
  line-height: 1.25;
}
.praxis__label {
  display: block;
  margin: 0;
  color: var(--c-text-muted);
  font-size: .75rem;
  font-weight: 700;
  font-stretch: 110%;
  letter-spacing: .06em;
  line-height: 1.3;
  text-transform: uppercase;
}
p.praxis__fazit {
  position: relative;
  padding-left: 1.1rem;
  color: var(--c-heading);
  font-size: 1.05em;
  font-weight: 600;
  line-height: 1.5;
}
p.praxis__fazit::before {
  content: "";
  position: absolute;
  left: .25rem;
  top: .25em;
  height: 1.05em;
  width: 3px;
  background: var(--c-accent);
  transform: skewX(var(--skew));
}
.praxis > :last-child,
.hinweis > :last-child { margin-bottom: 0; }

/* Hinweis: kleiner Info-Marker links oben ("i" wird nicht vorgelesen) */
.hinweis {
  position: relative;
  max-width: var(--measure);
  margin: 2rem 0;
  padding: 1.25rem 1.5rem 1.25rem 3.25rem;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  background: var(--c-bg);
  font-size: .95em;
}
.hinweis::after {
  content: "i";
  content: "i" / "";
  position: absolute;
  left: 1.1rem;
  top: 1.35rem;
  display: grid;
  place-items: center;
  width: 1.4rem;
  height: 1.4rem;
  border: 2px solid var(--c-border-strong);
  border-radius: 50%;
  color: var(--c-text-muted);
  font-size: .8rem;
  font-weight: 800;
  font-stretch: 100%;
  line-height: 1;
  pointer-events: none;
}

/* Stufenpfad: senkrechte Zeitleiste auf allen Breiten.
   Nummer (44 px) links in der Schiene, Inhalt als Karte rechts (max. --measure + 6rem).
   Verbinder zwischen den Nummern: Reifenspur (zwei dünne Linien mit Profilstrichen, grau);
   wird die nächste Stufe sichtbar (Reveal), füllt sich das Stück darüber orange (Effekte-Block). */
.stufenpfad {
  --dot: 44px;
  --rail: 1rem;
  --gap: clamp(1rem, .75rem + 1vw, 1.5rem);
  --stufe-pad: clamp(1rem, .8rem + .8vw, 1.5rem);
  list-style: none;
  margin: 2.5rem 0;
  padding: 0 0 0 calc(var(--dot) + var(--rail));
  counter-reset: stufe;
}
.stufe {
  --track: var(--c-border-strong);
  position: relative;
  counter-increment: stufe;
  max-width: calc(var(--measure) + 6rem);
  padding: var(--stufe-pad);
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.stufe + .stufe { margin-top: var(--gap); }
.stufe::before {
  content: counter(stufe);
  position: absolute;
  left: calc(-1 * (var(--dot) + var(--rail)) - 1px);
  top: calc(var(--stufe-pad) - 1px);
  display: grid;
  place-items: center;
  width: var(--dot);
  height: var(--dot);
  border-radius: 50%;
  background: var(--c-accent);
  color: var(--c-accent-text);
  font-weight: 800;
  font-stretch: 112%;
  font-size: 1.1rem;
  line-height: 1;
}
/* Reifenspur: 20 px breit, zwei 1-px-Linien (x 4 und 15), Profilstriche 6 × 2 px alle 6 px, versetzt */
.stufe::after,
.stufe__title::after {
  content: "";
  position: absolute;
  left: calc(-1 * (var(--dot) + var(--rail)) - 1px + var(--dot) / 2 - 10px);
  top: calc(var(--stufe-pad) + var(--dot) + .375rem);
  bottom: calc(-1 * (var(--gap) + var(--stufe-pad)) + .375rem);
  width: 20px;
  background:
    linear-gradient(var(--track), var(--track)) 4px 0 / 1px 100% no-repeat,
    linear-gradient(var(--track), var(--track)) 15px 0 / 1px 100% no-repeat,
    repeating-linear-gradient(to bottom, var(--track) 0 2px, transparent 2px 6px) 1px 0 / 7px 100% no-repeat,
    repeating-linear-gradient(to bottom, transparent 0 3px, var(--track) 3px 5px, transparent 5px 6px) 12px 0 / 7px 100% no-repeat;
  opacity: .6;
  pointer-events: none;
}
.stufe__title::after { display: none; }
.stufe:last-child::after { display: none; }
.stufe__title {
  min-height: var(--dot);
  display: flex;
  align-items: center;
  margin: 0 0 .5rem;
}
.stufe h4 { margin: 1.25rem 0 .35rem; }
.stufe ul { padding-left: 1.1em; }
.stufe p, .stufe ul { margin-bottom: .75em; }
.stufe > :last-child { margin-bottom: 0; }
p.stufe__neu {
  margin: 0 0 1rem;
  padding: .625rem .875rem;
  background: var(--c-surface);
  border-radius: var(--radius);
  font-size: .925em;
  line-height: 1.45;
}
@media (max-width: 47.99em) {
  .stufenpfad { --rail: .75rem; }
}

/* Karten */
.karten {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(16rem, 100%), 1fr));
  gap: clamp(1rem, .75rem + 1vw, 1.5rem);
  margin: 2rem 0;
}
.karte {
  --karte-pad: clamp(1.25rem, 1rem + .75vw, 1.75rem);
  display: flex;
  flex-direction: column;
  padding: var(--karte-pad);
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
.karte__title { margin: 0 0 .6rem; }
.karte p { margin-bottom: .75em; }
.karte > :last-child { margin-bottom: 0; }
/* Link-Absatz am Kartenende bündig unten, damit Links in einer Reihe stehen */
.karte > p:last-child:has(> a:only-child) { margin-top: auto; }
/* Ohne :has() bleibt das Bild ein normales Inline-Bild im Fluss. */
.karte img { width: 100%; }
/* Mit :has(): Bild-Absatz nach oben, randlos als Kartenkopf. */
.karte > p:has(> img:only-child),
.karte > p:has(> picture:only-child) {
  order: -1;
  margin: calc(-1 * var(--karte-pad)) calc(-1 * var(--karte-pad)) 1.25rem;
}
.karte > p:has(> picture:only-child) picture { display: block; padding: 0; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.karte > p:has(> picture:only-child) img,
.karte > p:has(> img:only-child) img {
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}
.karte ul { padding-left: 1.1em; }

/* Checkliste */
.checkliste { max-width: var(--measure); margin: 1.5rem 0 2rem; }
.checkliste ul { list-style: none; padding: 0; margin: 0; }
.checkliste li {
  position: relative;
  padding: .55rem 0 .55rem 2.25rem;
  border-bottom: 1px solid var(--c-border);
}
.checkliste li + li { margin-top: 0; }
.checkliste li:last-child { border-bottom: 0; }
.checkliste li::before {
  content: "";
  position: absolute;
  left: .45rem;
  top: .85rem;
  width: .45rem;
  height: .85rem;
  border-right: 2.5px solid var(--c-heading);
  border-bottom: 2.5px solid var(--c-heading);
  transform: rotate(45deg);
}

/* Schritte */
.schritte { max-width: var(--measure); margin: 1.5rem 0 2rem; }
.schritte ol {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: schritt;
}
.schritte li {
  position: relative;
  counter-increment: schritt;
  padding: .2rem 0 1.1rem 3rem;
}
.schritte li + li { margin-top: 0; }
.schritte li:last-child { padding-bottom: 0; }
.schritte li::before {
  content: counter(schritt);
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: 2px solid var(--c-accent);
  border-radius: 50%;
  color: var(--c-heading);
  font-size: .9rem;
  font-weight: 800;
  font-stretch: 112%;
  line-height: 1;
}
.schritte li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: calc(1rem - 1px);
  top: 2.25rem;
  bottom: .25rem;
  width: 2px;
  background: var(--c-border);
}

/* Tabellen */
.table-wrap {
  margin: 1.5rem 0 2rem;
  overflow-x: auto;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  -webkit-overflow-scrolling: touch;
}
.table-wrap table { margin: 0; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: .95em;
  line-height: 1.45;
}
th, td {
  padding: .75rem 1rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--c-border);
}
thead th {
  background: var(--c-surface);
  color: var(--c-heading);
  font-weight: 700;
  font-stretch: 106%;
  white-space: nowrap;
  border-bottom: 2px solid var(--c-border-strong);
}
tbody th { color: var(--c-heading); font-weight: 700; }
tbody tr:nth-child(even) { background: var(--c-zebra); }
tbody tr:last-child > * { border-bottom: 0; }
.table-wrap td:first-child { color: var(--c-heading); font-weight: 600; }
@media (max-width: 47.99em) {
  .table-wrap table { min-width: 34rem; }
}
/* Breite Vergleichstabellen (ab 6 Spalten): kompakter, Kopfzeile darf umbrechen */
.table-wrap table:has(th:nth-child(6)) { font-size: .9em; }
.table-wrap table:has(th:nth-child(6)) :is(th, td) { padding: .65rem .7rem; }
.table-wrap table:has(th:nth-child(6)) thead th { white-space: normal; }
@media (max-width: 47.99em) {
  .table-wrap table:has(th:nth-child(6)) { min-width: 50rem; }
}

/* Diagramm */
figure.diagramm { margin: 2rem 0; }
figure.diagramm img,
figure.diagramm svg {
  width: 100%;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  background: #FFFFFF;
}
figure.diagramm p { margin-bottom: .75rem; }
figure.diagramm :is(p, ul, ol) { max-width: var(--measure); }
figure.diagramm figcaption {
  margin-top: .75rem;
  color: var(--c-text-muted);
  font-size: .9rem;
}

/* Spalten */
.spalten { margin: 2rem 0; }
.spalten h3 {
  position: relative;
  margin: 1.75rem 0 .5rem;
  padding-top: 1rem;
}
.spalten h3:first-child { margin-top: 0; }
.spalten h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 2rem;
  height: 3px;
  background: var(--c-border-strong);
}
.spalten img { width: 3.5rem; height: 3.5rem; }
.spalten img.illu-panel { padding: .35rem; }
.spalten > p:has(> img:only-child) { margin: 1.75rem 0 .75rem; }
.spalten > p:has(> img:only-child):first-child { margin-top: 0; }
.spalten > p:has(> img:only-child) + h3 { margin-top: 0; padding-top: 0; }
.spalten > p:has(> img:only-child) + h3::before { display: none; }
@media (min-width: 48em) {
  .spalten > p:has(> img:only-child) { margin-top: 0; break-after: avoid; }
  .spalten > p:has(> img:only-child):not(:first-child) { break-before: column; }
  .spalten > p:has(> img:only-child) + h3 { break-before: auto; }
}
@media (min-width: 48em) {
  .spalten {
    columns: 3;
    column-gap: clamp(1.5rem, 1rem + 2vw, 3rem);
  }
  .spalten h3 { margin-top: 0; break-inside: avoid; }
  .spalten h3:not(:first-child) { break-before: column; }
  .spalten p { break-inside: avoid-column; }
}

/* ---------- Themenseite ---------- */
.topic-grid { padding-bottom: var(--space-section); }
.topic-body { min-width: 0; }
.topic-body > .section:first-child,
.topic-body > .intro + .section { padding-top: clamp(2rem, 1.5rem + 2vw, 3rem); }

.secnav__title {
  margin: 0 0 .75rem;
  color: var(--c-text-muted);
  font-size: .78rem;
  font-weight: 700;
  font-stretch: 110%;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.secnav ol { list-style: none; margin: 0; padding: 0; }
.secnav li + li { margin-top: 0; }
.secnav a {
  display: flex;
  align-items: center;
  min-height: 44px;
  color: var(--c-text-muted);
  font-size: .925rem;
  line-height: 1.3;
  text-decoration: none;
}
.secnav a:hover { color: var(--c-heading); }
.secnav a[aria-current="true"] { color: var(--c-heading); font-weight: 600; }

@media (max-width: 63.99em) {
  .topic-aside {
    position: sticky;
    top: var(--header-h);
    z-index: 40;
    margin-inline: calc(-1 * var(--gutter));
    background: var(--c-bg);
    border-bottom: 1px solid var(--c-border);
  }
  .secnav {
    position: sticky;
    top: var(--header-h);
    overflow-x: auto;
    scrollbar-width: none;
    padding-inline: var(--gutter);
  }
  .secnav::-webkit-scrollbar { display: none; }
  html.no-js .topic-aside,
  html.no-js .secnav { top: 0; }
  .secnav__title {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
  }
  .secnav ol { display: flex; gap: 1.25rem; width: max-content; }
  .secnav a {
    white-space: nowrap;
    border-bottom: 3px solid transparent;
    padding-top: 3px;
  }
  .secnav a[aria-current="true"] { border-bottom-color: var(--c-accent); }
  .layout-topic .section[id] { scroll-margin-top: calc(var(--header-h) + 3.75rem); }
  .layout-topic .section[id] h2 { scroll-margin-top: calc(var(--header-h) + 3.75rem); }
}

@media (min-width: 64em) {
  .topic-grid {
    display: grid;
    grid-template-columns: 16rem minmax(0, 1fr);
    gap: clamp(3rem, 1rem + 4vw, 5rem);
  }
  .secnav {
    position: sticky;
    top: calc(var(--header-h) + 1rem);
    padding-top: clamp(2rem, 1.5rem + 2vw, 3rem);
  }
  .secnav a {
    padding: .25rem 0 .25rem 1rem;
    border-left: 2px solid var(--c-border);
  }
  .secnav a[aria-current="true"] { border-left-color: var(--c-accent); }
}

/* ---------- Kontakt & Formular ---------- */
.contact-grid { padding-bottom: var(--space-section); }
.contact-body > .intro { padding-top: 0; }
.contact-mail { margin-top: 1.5rem; font-weight: 600; color: var(--c-heading); }
.contact-mail__label,
.site-footer__label {
  display: block;
  color: var(--c-text-muted);
  font-size: .78rem;
  font-weight: 700;
  font-stretch: 110%;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.contact-form {
  margin-top: 2.5rem;
  padding: clamp(1.25rem, 1rem + 2vw, 2.5rem);
  background: var(--c-surface);
  border-radius: var(--radius-lg);
}
@media (min-width: 64em) {
  .contact-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
    gap: clamp(3rem, 1rem + 4vw, 5rem);
    align-items: start;
  }
  .contact-form { margin-top: 0; }
}

.form { display: grid; gap: 1.35rem; }
.form__note { margin: 0; color: var(--c-text-muted); font-size: .875rem; }
.field label {
  display: block;
  margin-bottom: .4rem;
  color: var(--c-heading);
  font-weight: 600;
  font-size: .95rem;
}
.field__req { color: var(--c-link); }
.field__hint { margin: -.2rem 0 .4rem; color: var(--c-text-muted); font-size: .875rem; }
.field input:not([type="checkbox"]),
.field select,
.field textarea {
  display: block;
  width: 100%;
  min-height: 2.875rem;
  padding: .625rem .875rem;
  border: 1px solid var(--c-border-strong);
  border-radius: var(--radius);
  background-color: var(--c-field);
  color: var(--c-heading);
  font: inherit;
  font-size: 1rem;
  line-height: 1.4;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field textarea { min-height: 10rem; resize: vertical; }
.field select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 2.75rem;
  background-image:
    linear-gradient(45deg, transparent 50%, currentColor 50%),
    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 1.35rem) 50%, calc(100% - 1rem) 50%;
  background-size: .375rem .375rem;
  background-repeat: no-repeat;
}
.field input:not([type="checkbox"]):hover,
.field select:hover,
.field textarea:hover { border-color: var(--c-text); }
.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible { border-color: var(--c-focus); outline-offset: 1px; }
.field [aria-invalid="true"] { border-color: var(--c-error) !important; }

.field--check {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: .875rem;
  align-items: start;
}
.field--check input {
  width: 1.5rem;
  height: 1.5rem;
  margin: 0;
  accent-color: var(--c-accent);
  cursor: pointer;
}
.field--check label { margin: 0; font-weight: 400; font-size: .95rem; line-height: 1.5; color: var(--c-text); }
.field--check .field__error { grid-column: 2; }
.field__error {
  margin: .4rem 0 0;
  color: var(--c-error);
  font-size: .9rem;
  font-weight: 600;
}
.field__error[hidden] { display: none; }
.form .btn { justify-self: start; }

.hp { position: absolute; left: -9999px; }

/* ---------- Band ---------- */
.band {
  --c-focus: #2B2E33;
  margin-top: 0;
  padding-block: clamp(3rem, 2rem + 4vw, 5rem) calc(clamp(3rem, 2rem + 4vw, 5rem) + 1.5rem);
  background: var(--c-accent);
  color: #2B2E33;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 1.5rem), 0 100%);
}
.band h2 { color: #2B2E33; margin-bottom: .4em; }
.band p { max-width: 52ch; margin: 0; color: #2B2E33; }
.band__inner {
  display: grid;
  gap: 1.75rem;
  align-items: center;
}
.band .btn { justify-self: start; }
.band .btn--on-accent:hover,
.band .btn--on-accent:focus-visible {
  filter: none;
  background: #3A3E45;
  color: #FFFFFF;
  box-shadow: 0 10px 26px rgba(43, 46, 51, .28), inset 0 1px 0 rgba(255, 255, 255, .1);
}
@media (min-width: 48em) {
  .band__inner { grid-template-columns: minmax(0, 1fr) auto; gap: 3rem; }
}

/* ---------- Footer ---------- */
.site-footer {
  padding-block: clamp(1.25rem, 1rem + 1vw, 1.75rem) 1rem;
  color: var(--c-text-muted);
  font-size: .925rem;
}
.site-footer__inner {
  display: grid;
  gap: .5rem;
}
.site-footer p { margin: 0; }
.site-footer__name {
  color: var(--c-heading);
  font-weight: 800;
  font-stretch: 112%;
  font-size: 1.1rem;
  letter-spacing: .04em;
}
.footnav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; column-gap: 1.5rem; }
.footnav li { display: flex; margin: 0; }
.footnav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--c-text);
  text-decoration: none;
}
.footnav a:hover,
.footnav a[aria-current="page"] { color: var(--c-link); text-decoration: underline; }
.site-footer__copy { padding-top: .75rem; border-top: 1px solid var(--c-border); font-size: .85rem; }
@media (min-width: 48em) {
  .site-footer__inner { grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 2rem; row-gap: .75rem; }
  .site-footer__copy { grid-column: 1 / -1; }
}

/* ---------- Nach oben ---------- */
.to-top {
  position: fixed;
  right: clamp(1rem, 3vw, 2rem);
  bottom: clamp(1rem, 3vw, 2rem);
  z-index: 45;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--c-border);
  border-radius: 50%;
  background: var(--c-card);
  color: var(--c-heading);
  box-shadow: var(--shadow-md);
}
.to-top[hidden] { display: none; }
/* JS blendet weich ein/aus: .is-shown setzt den Endzustand, hidden folgt nach dem Ausblenden */
html.js .to-top:not(.is-shown) { opacity: 0; transform: translateY(.75rem); }
.to-top.is-shown:hover { transform: translateY(-2px); }
.to-top__icon {
  width: .6rem;
  height: .6rem;
  margin-top: .25rem;
  border-left: 2px solid currentColor;
  border-top: 2px solid currentColor;
  transform: rotate(45deg);
}

/* Fotorahmen (Kopfbild, Fotos im Text): Grundlage für Glas und Medien-Hover */
.section > p:has(> picture:only-child:not(.illu-panel)) > picture,
.page-head__image picture {
  display: block;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: var(--radius-lg);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.section > p:has(> picture:only-child:not(.illu-panel)) > picture img,
.page-head__image picture img { clip-path: inset(0 round var(--radius)); }

/* ---------- Glas ----------
   Frosted Glass für Karten, Praxis, Hinweis, Stufen, Kontaktformular, Formularfelder,
   Illustrationskarten und Fotorahmen (der Rahmen ist Glas, das Foto bleibt scharf).
   Nur mit backdrop-filter-Unterstützung (sonst bleiben die deckenden Flächen oben);
   prefers-reduced-transparency: reduce setzt wieder deckende Flächen.
   Lichtkante oben: ::before (1 px Verlauf); wo die Pseudo-Elemente belegt sind
   (.stufe, Felder, Illustrationen) als inset-Schatten. */
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .karte,
  .praxis,
  .hinweis,
  .contact-form,
  .section > p:has(> picture:only-child:not(.illu-panel)) > picture,
  .page-head__image picture,
  .portrait picture {
    position: relative;
    background: var(--glass-bg);
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    box-shadow: 0 0 0 1px var(--glass-edge), var(--glass-shadow);
  }
  .karte { overflow: hidden; }
  .karte::before,
  .praxis::before,
  .hinweis::before,
  .contact-form::before,
  .section > p:has(> picture:only-child:not(.illu-panel)) > picture::before,
  .page-head__image picture::before,
  .portrait picture::before {
    content: "";
    position: absolute;
    z-index: 1;
    top: 0;
    left: 0;
    right: 12%;
    height: 1px;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--glass-spec), transparent);
    pointer-events: none;
  }

  /* Fotorahmen: Glasrand um das Foto */
  .section > p:has(> picture:only-child:not(.illu-panel)) > picture,
  .page-head__image picture,
  .portrait picture {
    display: block;
    padding: .375rem;
    border-radius: var(--radius-lg);
  }
  .section > p:has(> picture:only-child:not(.illu-panel)) > picture img,
  .page-head__image picture img,
  .portrait picture img { border-radius: var(--radius); }
  .portrait picture.illu-panel { background: var(--glass-bg); }

  /* Illustrationskarten: Lichtkante als inset-Schatten */
  .section > p:not(.portrait) > .illu-panel:only-child {
    border-color: var(--glass-border);
    box-shadow: inset 0 1px 0 var(--glass-spec), 0 0 0 1px var(--glass-edge), var(--glass-shadow);
  }

  /* Stufen: ::before/::after und .stufe__title::after tragen Nummer und Spur → Lichtkante inset */
  .stufe {
    background: var(--glass-bg);
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
    border-color: var(--glass-border);
    box-shadow: inset 0 1px 0 var(--glass-spec), 0 0 0 1px var(--glass-edge), var(--glass-shadow);
  }

  /* Formularfelder: Glasfläche, Rand bleibt --c-border-strong (3:1 für Bedienelemente) */
  .field input:not([type="checkbox"]),
  .field select,
  .field textarea {
    background-color: var(--glass-bg);
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
    box-shadow: inset 0 1px 0 var(--glass-spec);
  }
}

/* Weniger Transparenz gewünscht: deckende Flächen wie ohne Glas */
@media (prefers-reduced-transparency: reduce) {
  .karte, .praxis, .hinweis, .contact-form, .stufe,
  .section > p:has(> picture:only-child:not(.illu-panel)) > picture,
  .page-head__image picture, .portrait picture,
  .field input:not([type="checkbox"]), .field select, .field textarea {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }
  .karte { background: var(--c-card); border-color: var(--c-border); }
  .praxis, .contact-form { background: var(--c-surface); }
  .hinweis { background: var(--c-bg); border-color: var(--c-border); }
  .stufe { background: var(--c-card); border-color: var(--c-border); }
  .field input:not([type="checkbox"]), .field select, .field textarea { background-color: var(--c-field); }
  .section > p:has(> picture:only-child:not(.illu-panel)) > picture,
  .page-head__image picture, .portrait picture { background: var(--c-surface); border-color: var(--c-border); }
  .portrait picture.illu-panel { background: var(--c-illu); }
  .karte::before, .praxis::before, .hinweis::before, .contact-form::before,
  .section > p:has(> picture:only-child:not(.illu-panel)) > picture::before,
  .page-head__image picture::before, .portrait picture::before,
  .karte:has(a)::after { display: none; }
}

/* ---------- Medien-Hover ----------
   Ein Verhalten für Karten, Illustrationen (SVG und Raster, auch das Porträt) und Fotos:
   Rand → Akzent (45 %), 200 ms. Kleine Bilder (.praxis__avatar, .spalten-Icons) liegen
   nicht in .section > p und bekommen keinen Hover;
   Anheben um 2 px und Foto-Zoom (1.02, im Rahmen beschnitten) nur im Effekte-Block.
   Fotorahmen-Grundregel steht vor dem Glas-Block (Rand transparent, Glas überschreibt). */
.karte:hover,
.section > p > .illu-panel:only-child:hover,
.section > p:has(> picture:only-child:not(.illu-panel)) > picture:hover,
.page-head__image picture:hover {
  border-color: var(--c-hover-border);
  box-shadow: var(--shadow-md);
}

/* ---------- Reveal (JS) ---------- */
html.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s, transform .5s; }
html.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Effekte (nur ohne Wunsch nach reduzierter Bewegung) ----------
   Abschalten: den jeweiligen Absatz in diesem Block löschen. */
@media (prefers-reduced-motion: no-preference) {
  /* Hero-Linien zeichnen sich einmal beim Laden von unten nach oben */
  @keyframes hero-line {
    from { transform: skewX(var(--skew)) scaleY(0); }
    to { transform: skewX(var(--skew)) scaleY(1); }
  }
  .hero::before { animation: hero-line .9s ease-out backwards; }
  .hero::after { animation: hero-line .9s ease-out .15s backwards; }

  /* Gestaffelte Einblendung: JS setzt .reveal-group und später .is-visible am Container.
     fill-mode backwards: nach der Animation gelten wieder die normalen Hover-Übergänge. */
  @keyframes reveal-in {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: none; }
  }
  html.js .reveal-group:not(.checkliste) > *,
  html.js .reveal-group.checkliste li { opacity: 0; }
  html.js .reveal-group.is-visible:not(.checkliste) > *,
  html.js .reveal-group.is-visible.checkliste li {
    opacity: 1;
    animation-name: reveal-in;
    animation-duration: .5s;
    animation-timing-function: ease-out;
    animation-fill-mode: backwards;
  }
  html.js .reveal-group.is-visible :nth-child(2) { animation-delay: 70ms; }
  html.js .reveal-group.is-visible :nth-child(3) { animation-delay: 140ms; }
  html.js .reveal-group.is-visible :nth-child(4) { animation-delay: 210ms; }
  html.js .reveal-group.is-visible :nth-child(5) { animation-delay: 280ms; }
  html.js .reveal-group.is-visible :nth-child(6) { animation-delay: 350ms; }
  html.js .reveal-group.is-visible :nth-child(n+7) { animation-delay: 420ms; }

  /* Hintergrund (Desktop): Eckflächen driften langsam (60 s, ≤ 2 %),
     das Motiv wandert beim Scrollen um --motif-drift nach oben (scroll-driven) */
  @media (min-width: 64em) {
    @keyframes bg-drift {
      from { transform: translate(0, 0); }
      to { transform: translate(-2%, 1.5%); }
    }
    body::before { animation: bg-drift 60s ease-in-out infinite alternate; }
  }
  @supports (animation-timeline: scroll()) {
    @media (min-width: 64em) {
      @keyframes motif-drift {
        from { transform: translateY(0); }
        to { transform: translateY(calc(-1 * var(--motif-drift))); }
      }
      body::after {
        will-change: transform;
        animation: motif-drift linear both;
        animation-timeline: scroll(root);
      }
    }
  }

  /* Medien-Hover: Anheben, Fotos zoomen im Rahmen (clip-path hält die Bildfläche gleich groß) */
  .karte:hover,
  .section > p > .illu-panel:only-child:hover,
  .section > p:has(> picture:only-child:not(.illu-panel)) > picture:hover,
  .page-head__image picture:hover { transform: translateY(-2px); }
  .section > p:has(> picture:only-child:not(.illu-panel)) > picture img,
  .page-head__image picture img { transition: transform .2s ease, clip-path .2s ease; }
  .section > p:has(> picture:only-child:not(.illu-panel)) > picture:hover img,
  .page-head__image picture:hover img { transform: scale(1.02); clip-path: inset(1% round var(--radius)); }

  /* Glas: Lichtschweif über Karten mit Link (600 ms nur beim Hover) */
  @supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .karte:has(a)::after {
      content: "";
      position: absolute;
      inset: 0;
      z-index: 1;
      background: linear-gradient(105deg, transparent 30%, var(--glass-sweep) 50%, transparent 70%);
      transform: translateX(-110%);
      pointer-events: none;
    }
    .karte:has(a):hover::after { transform: translateX(110%); transition: transform .6s ease; }
  }

  /* Praxis: orange Kante zeichnet sich beim Einblenden von oben (300 ms) */
  @keyframes praxis-kante {
    from { transform: scaleY(0); }
    to { transform: scaleY(1); }
  }
  html.js .praxis.reveal::after { transform: scaleY(0); }
  html.js .praxis.reveal.is-visible::after { transform: none; animation: praxis-kante .3s ease-out .15s backwards; }

  /* Stufenpfad: wird eine Stufe sichtbar, färbt sich die Spur darüber orange (von oben) */
  html.js .stufe:not(:last-child) > .stufe__title::after {
    --track: var(--c-accent);
    display: block;
    opacity: 1;
    clip-path: inset(0 0 100% 0);
    transition: clip-path .6s ease-out .1s;
  }
  html.js .stufe:has(+ .stufe.is-visible) > .stufe__title::after { clip-path: inset(0); }
  /* graue Spur darunter ausblenden, sobald die orange voll steht (keine Mischfarbe an den Kanten) */
  html.js .stufe:not(:last-child)::after { transition: opacity 0s .75s; }
  html.js .stufe:has(+ .stufe.is-visible)::after { opacity: 0; }

  /* Navigation: Unterstrich wächst von links */
  .mainnav__item > a::after { transition: transform .2s ease; }

  /* Abschnittsnavigation: Markierung blendet über statt zu springen */
  .secnav a { transition: color .2s ease, border-color .2s ease; }

  /* Nach oben: weich ein- und ausblenden */
  .to-top { transition: opacity .2s ease, transform .2s ease; }

  /* Theme-Wechsel: kurzer Überblendeffekt (Klasse setzt JS nur beim Umschalten) */
  html.theme-transition,
  html.theme-transition *,
  html.theme-transition *::before,
  html.theme-transition *::after {
    transition: background-color .3s ease, color .3s ease, border-color .3s ease, fill .3s ease !important;
  }
}

/* ---------- Reduzierte Bewegung ---------- */
@media (prefers-reduced-motion: reduce) {
  .reveal, html.js .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  html { scroll-behavior: auto; }
  .btn:hover, .to-top:hover, .to-top.is-shown:hover { transform: none; }
}

/* ---------- Druck ---------- */
@media print {
  .site-header, .site-footer, .band, .btn, .to-top, .topic-aside, .skip-link { display: none !important; }
  :root { --c-bg: #FFFFFF; --c-text: #000000; --c-heading: #000000; --c-link: #000000; --c-surface: #FFFFFF; }
  body { font-size: 11pt; }
  .hero::before, .hero::after, body::before, body::after { display: none; }
  html.js .reveal, html.js .reveal-group * { opacity: 1 !important; transform: none !important; animation: none !important; }
  .topic-grid { display: block; }
  .section, .karte, .praxis, .stufe, table { break-inside: avoid; }
  a { color: inherit; }
}
