/* =============================================================================
   basis.css — gemeinsame MECHANIK fuer alle drei Varianten (Neuß Dachtechnik)
   Besitzer: Kern (BAUANLEITUNG §3). Stand 27.09.2026 (Feinschliff).

   Was hier steht: Reset, Skip-Link, Fokus, .visually-hidden, Raster mit
   min-width:0, .wrap, Formular-, Dock- und Menue-Mechanik, Platzhalter
   (mark.ph, .ph-foto), reduced-motion, 100svh-Muster — und eine ruhige,
   neutrale Grundgestalt des Klassen-Vokabulars (§5), damit jede Seite auch
   ohne theme.css benutzbar ist.
   Was hier NICHT steht: eigene Farben, eigene Schriften, eigene Groessen.
   Alles laeuft ueber die Tokens aus themes/<v>/tokens.css (§4).

   WICHTIG FUER DIE THEME-AGENTEN
   Die ganze Datei liegt in @layer basis. Jede Regel in theme.css (ohne Layer)
   gewinnt deshalb IMMER, egal wie spezifisch sie ist — kein !important noetig.
   Ausnahme mit Absicht: die !important-Regeln fuer prefers-reduced-motion
   (in einem Layer schlagen sie auch unlayered !important).
   Vorsicht beim Ueberschreiben von Mechanik:
     - Navigation: unter 75em klappt .nav per JS (.ist-offen); ab 75em ist sie
       eine Zeile mit Aufklapp-Menue. display-Regeln fuer .nav/.nav-sub-liste
       in theme.css nur INNERHALB derselben Media Queries setzen. (Der Kopf
       traegt Logo, fuenf Punkte, Telefon und Termin-Knopf — gemessen braucht
       das rund 1160 px, deshalb 75em und nicht 64em.)
     - Dock: nur unter 64em sichtbar, .ruht/.weg blenden es aus (app.js).
     - Breakpoints (fest, weil var() in Media Queries nicht geht):
       48em (768 px) · 56em (896 px) · 64em (1024 px, Dock/Raster) ·
       75em (1200 px, Menue-Umbruch; app.js nutzt denselben Wert).

   NEU 27.09.2026 (Feinschliff, BAUANLEITUNG §5 „Neu seit …", Abschnitt 11b):
     .split--bild   Text | grosses Foto. Markup: <div class="wrap split
                    split--bild [split--umgekehrt]"> mit .stapel (Text) und
                    <figure class="split-medium [referenz]"> (bild() + figcaption).
                    Mobil gestapelt in DOM-Reihenfolge, ab 56em nebeneinander;
                    das Foto bekommt die breitere Spalte, egal auf welcher Seite
                    es steht (Bild links: .split--umgekehrt ODER Figure zuerst im
                    DOM). Ab 56em Bildhoehe begrenzt (Hochformate, object-fit:
                    cover) und Foto sticky neben langem Text.
     .bildband      <figure class="bildband"> als direktes Kind von <main> oder
                    <section>, NICHT in .wrap: volle Fensterbreite ueber width:
                    100 % des Elternteils (kein 100vw — das zaehlt die
                    Scrollleiste mit und erzeugt waagerechten Ueberlauf). Bild
                    als Band mit begrenzter Hoehe (object-fit: cover), die
                    figcaption bekommt den Gutter von .wrap (auch ohne Klasse).
                    In .wrap gesetzt bleibt es in der Spalte (kein Ausbruch).
                    Helfer: bildband() in helpers.php.
     .kennwerte     <dl class="kennwerte"> → <div class="kennwert"><dt>Wert</dt>
                    <dd>Erklaerung <span class="quelle">…</span></dd></div>;
                    auto-fit-Raster, min-width:0; Werte brechen nicht vor der
                    Einheit (U+00A0 aus fw()/euro()/nbsp_recht()).
     .merksatz      <p class="merksatz">: der Kern einer Sektion in einem Satz
                    (nie ein erfundenes Zitat), auch in Kasten oder Split.
     .weiter-link   <p class="weiter-link"><a>…</a></p>: leichter Weiter-Weg,
                    Trefferflaeche >= 44 px; ebenso teil('cta', ['art' =>
                    'leicht']) → .weiter-link.cta-leicht.
     .shero-figur / .shero-caption   Hero-Bild mit Bildunterschrift ('bild_caption').
     .material-teil Material-/Beleg-Stichwort aus material_html(): nie ein „·"
                    am Zeilenanfang.
     .stellen--zeilen  Stellen als Registerzeilen statt Karten (job-seite.php).
     .vorschau-lang Langfassung der Vorschau-Leiste, erst ab 48em sichtbar
                    (mobil nur visuell versteckt, Screenreader lesen sie).
   ============================================================================= */

@layer basis {

/* ---------- 1. Reset und Grundsatz ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: var(--kopf-h);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: var(--fs-body);
  font-weight: var(--wght-body);
  font-stretch: var(--wdth-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
h1, h2, h3, h4 {
  font-family: var(--disp);
  line-height: 1.12;
  text-wrap: balance;
  overflow-wrap: break-word;
}
/* Silbentrennung statt harter Brueche in Ueberschriften (KRITIK-a Nr. 5:
   „Unternehmererklär|ung", „Stegdoppelpl|atten" ohne Trennstrich). Kurze
   Woerter bleiben ganz; overflow-wrap greift nur noch, wenn keine Silbe passt. */
h1, h2, h3 {
  -webkit-hyphens: auto;
  hyphens: auto;
  -webkit-hyphenate-limit-before: 4;
  -webkit-hyphenate-limit-after: 4;
  hyphenate-limit-chars: 10 4 4;
}
h1 {
  font-size: var(--fs-h1);
  font-weight: var(--wght-display);
  font-stretch: var(--wdth-display);
  letter-spacing: var(--track-display);
}
h2 { font-size: var(--fs-h2); font-weight: var(--wght-h2); }
h3 { font-size: var(--fs-h3); font-weight: var(--wght-h3); }
p, li, dd, figcaption { text-wrap: pretty; }
img, svg, video, picture, iframe { display: block; max-width: 100%; }
img { height: auto; }
svg { flex-shrink: 0; }
a { color: var(--accent-text); text-underline-offset: 0.18em; text-decoration-thickness: 0.08em; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; }
address { font-style: normal; }
table { border-collapse: collapse; }
[hidden] { display: none !important; }
[id] { scroll-margin-top: var(--kopf-h); }
.ico { width: 1.25em; height: 1.25em; }

/* ---------- 2. Skip-Link ---------- */
.skip-link {
  position: absolute;
  left: var(--s-2);
  top: -10rem;
  z-index: 1000;
  padding: 0.75rem 1rem;
  background: var(--text);
  color: var(--bg);
  font-weight: var(--wght-label);
  border-radius: var(--radius-sm);
  text-decoration: none;
}
.skip-link:focus { top: var(--s-2); }

/* ---------- 3. Fokus (WCAG 2.4.7 / 2.4.11) ---------- */
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
main:focus { outline: none; }   /* Ziel des Skip-Links, bekommt den Fokus nur programmatisch */

/* ---------- 4. Nur fuer Screenreader ---------- */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ---------- 5. Layout ---------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: max(1rem, var(--s-3));   /* nie unter 16 px Randabstand */
}
.sek { padding-block: var(--s-7); }
.sek--flach { padding-block: var(--s-5); }
.sek--flaeche { background: var(--bg-2); }
.stapel > * + * { margin-top: var(--s-3); }

/* Raster: min-width:0 auf JEDEM Rasterelement — sonst ist das Minimum das
   laengste deutsche Wort („Zwischensparrendämmung") und sprengt die Spalte. */
.raster, .split, .shero-raster, .fuss-raster { display: grid; grid-template-columns: minmax(0, 1fr); }
.raster { gap: var(--s-4); }
.split { gap: var(--s-5); }
.raster > *, .split > *, .shero-raster > *, .fuss-raster > *,
.leistungen-liste > *, .stellen > *, .galerie > * { min-width: 0; }
@media (min-width: 48em) {
  .raster--2, .raster--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 56em) {
  .split { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .split--umgekehrt > :first-child { order: 2; }
}
@media (min-width: 64em) {
  .raster--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.split-medium { align-self: center; }
.split-medium img, .shero-medium img, .referenz img, .galerie-bild img { width: 100%; }
/* Mobil Silbentrennung fuer Fliesstext in Rastern (lang="de" trennt nach Silben).
   .schritte seit 30.09.2026 (Abnahme P2-4): „Gebaeudemodernisierungsgesetz" im
   Ablauf der Dachfenster-Seite lief bei 320 px in allen Varianten ueber. */
@media (max-width: 47.99em) {
  .raster > *, .split > *, .shero-text, .prose, .kasten, .leistungen-liste, .faq-antwort, .schritte {
    -webkit-hyphens: auto;
    hyphens: auto;
    overflow-wrap: break-word;
  }
  /* Tabellenzellen (Wunsch leist-b Nr. 1): „Dachflächenfenster" sprengte bei
     375 px die Breite. Die Silbentrennung senkt die Mindestbreite der Spalte.
     overflow-wrap:anywhere (vorher hier) brach dagegen kurze Zahlen- und
     Materialspalten zeichenweise („Ja/hr/e", „≥ / 50", „Ti-tanz-ink";
     KRITIK-a Nr. 14, KRITIK-b Nr. 8, WUENSCHE-inhalt-2 Nr. 8) — jetzt nur
     noch break-word als Notnagel, Woerter unter 10 Zeichen bleiben ganz.
     Zahlenspalte ohne jeden Umbruch: Klasse .zahl an th/td. */
  .tabelle th, .tabelle td {
    -webkit-hyphens: auto;
    hyphens: auto;
    hyphenate-limit-chars: 10 4 4;
    overflow-wrap: break-word;
  }
  .tabelle .zahl { -webkit-hyphens: manual; hyphens: manual; white-space: nowrap; }
}
.prose, .recht { max-width: var(--wrap-text); }
/* Zeilenlaenge auch fuer Listen, Hinweis-Boxen und Quellenzeilen (KRITIK-a
   Nr. 11: bis ~140 Zeichen pro Zeile neben 66ch-Absaetzen). Nur klassenlose
   Listen — Register, Galerien, Stellen, Sprungleiste bleiben frei. */
.sek :is(ul, ol):not([class]), .sek .checkliste, .hinweis-box, p.quelle { max-width: var(--wrap-text); }
.hinweis-box { max-width: min(100%, 72ch); }
.prose > * + *, .recht > * + * { margin-top: 1em; }
.prose h2, .recht h2 { margin-top: 1.6em; }

/* ---------- 6. Typo-Helfer ---------- */
.lead { font-size: var(--fs-lead); max-width: var(--wrap-text); }
.klein, .micro, .quelle, .formular-note, .feld-hinweis { font-size: var(--fs-klein); }
.micro, .quelle, .formular-note, .feld-hinweis, .quelle-stand { color: var(--muted); }
.quelle a { color: inherit; }
.kicker {
  font-size: var(--fs-klein);
  font-weight: var(--wght-label);
  font-stretch: var(--wdth-label);
  letter-spacing: var(--track-label);
}
.material { font-family: var(--mono); font-size: var(--fs-klein); color: var(--muted); }
.h1-zusatz {
  display: block;
  margin-top: var(--s-2);
  font-size: var(--fs-lead);
  font-weight: var(--wght-h3);
  font-stretch: var(--wdth-body);
  letter-spacing: 0;
  line-height: 1.3;
}
.antwort { max-width: var(--wrap-text); }
.tel-link { white-space: nowrap; }

/* ---------- 7. Knoepfe (Tap-Ziel >= 44 px) ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  min-height: 44px;
  padding: 0.7em 1.25em;
  border: 2px solid transparent;
  border-radius: var(--radius);
  font-family: var(--sans);
  font-weight: var(--wght-label);
  font-stretch: var(--wdth-label);
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--dauer) var(--ease-signatur),
              border-color var(--dauer) var(--ease-signatur),
              color var(--dauer) var(--ease-signatur);
}
.btn .ico { width: 1.2em; height: 1.2em; }
.btn--primaer { background: var(--accent-fill); color: var(--on-accent); }
.btn--primaer:hover { background: color-mix(in oklch, var(--accent-fill) 82%, var(--text)); }
.btn--sekundaer { background: transparent; color: var(--text); border-color: var(--field-border); }
.btn--sekundaer:hover { border-color: var(--text); background: var(--tint-weak); }
.btn[aria-busy="true"] { opacity: 0.75; cursor: progress; }
.btn-reihe { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); }

/* ---------- 8. Vorschau-Leiste (nur !IS_PROD) ---------- */
.vorschau { background: var(--text); color: var(--bg); font-size: var(--fs-klein); padding-block: 0.5rem; }
.vorschau .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.35rem var(--s-3); }
.vorschau-ph { background: var(--ph-bg); color: var(--on-ph-bg); padding: 0 0.3em; border-radius: 2px; }
.vorschau-varianten { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.vorschau-varianten ul { display: flex; flex-wrap: wrap; gap: 0.35rem; list-style: none; margin: 0; padding: 0; }
.vorschau-varianten a {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;          /* das Leerzeichen vor „Firstlinie" faellt im Flex-Item weg („AFirstlinie", Abnahme P4-9) */
  min-height: 32px;
  padding: 0.2rem 0.65rem;
  color: inherit;
  border: 1px solid color-mix(in oklch, var(--bg) 50%, transparent);
  border-radius: var(--radius-sm);
  text-decoration: none;
}
.vorschau-varianten a:hover { background: color-mix(in oklch, var(--bg) 14%, transparent); }
.vorschau-varianten a[aria-current="true"] { background: var(--bg); color: var(--text); font-weight: var(--wght-label); }
.vorschau-varianten a:focus-visible, .vorschau a:focus-visible { outline-color: var(--bg); }
/* Mobil EINE Zeile: „Vorschau · Gelb = Platzhalter" + A B C (KRITIK-b Nr. 13:
   drei Zeilen, ~125 px, schoben die Hero-Knoepfe unter den Knick). Die
   Langfassung (.vorschau-lang) ist mobil nur visuell versteckt — Screenreader
   lesen „A Firstlinie" usw. weiter. Knoepfe A/B/C >= 32 px (Ziel >= 24 px). */
.vorschau-varianten a { min-width: 32px; justify-content: center; }
@media (max-width: 47.99em) {
  .vorschau { padding-block: 0.3rem; }
  .vorschau .wrap { flex-wrap: nowrap; gap: var(--s-2); }
  .vorschau p { min-width: 0; line-height: 1.3; }
  .vorschau-varianten, .vorschau-varianten ul { flex-wrap: nowrap; }
  .vorschau-varianten a { padding-inline: 0.5rem; }
  .vorschau-lang {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
  }
}

/* ---------- 9. Kopf und Navigation ---------- */
.site-kopf { position: relative; z-index: 50; background: var(--bg); }
.kopf-innen { display: flex; align-items: center; gap: var(--s-3); min-height: var(--kopf-h); }
.logo { display: block; flex: 0 0 auto; margin-right: auto; }
.logo img { width: clamp(7.5rem, 5rem + 12vw, 12rem); height: auto; }   /* 576×116, WebP mit PNG-Rueckfall im <picture>, CSS begrenzt */
.nav-links, .nav-sub-liste { list-style: none; margin: 0; padding: 0; }
.nav a { color: var(--text); text-decoration: none; }
.nav a:hover { text-decoration: underline; text-underline-offset: 0.35em; }
.nav a[aria-current="page"], .nav .is-active > a {
  text-decoration: underline;
  text-underline-offset: 0.35em;
  text-decoration-thickness: 2px;
  text-decoration-color: var(--accent-fill);
}
.nav-links a, .nav-sub-knopf, .nav-tel, .menue-knopf { display: inline-flex; align-items: center; min-height: 44px; }
.nav-links a, .nav-tel, .nav-cta { white-space: nowrap; }
.nav-tel { gap: 0.4em; color: var(--text); text-decoration: none; font-weight: var(--wght-label); white-space: nowrap; }
.nav-sub-knopf, .menue-knopf {
  justify-content: center;
  min-width: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
}
.nav-sub-knopf .ico { transition: transform var(--dauer) var(--ease-signatur); }
.nav-sub-knopf[aria-expanded="true"] .ico { transform: rotate(180deg); }
.menue-knopf .ico { width: 1.6rem; height: 1.6rem; }
.menue-knopf .menue-zu, .menue-knopf[aria-expanded="true"] .menue-auf { display: none; }
.menue-knopf[aria-expanded="true"] .menue-zu { display: block; }
@media (max-width: 47.99em) {
  .nav-cta { display: none; }   /* mobil uebernimmt das Dock den Termin-Knopf */
}

/* Desktop: eine Zeile, Leistungen als Aufklapp-Menue */
@media (min-width: 75em) {
  .menue-knopf { display: none; }
  .nav-links { display: flex; align-items: center; gap: var(--s-3); }
  .nav-sub { position: relative; display: flex; align-items: center; }
  .nav-sub-liste {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 60;
    min-width: 17rem;
    padding: var(--s-1) 0;
    background: var(--bg);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    box-shadow: 0 18px 40px -18px color-mix(in oklch, var(--text) 35%, transparent);
  }
  .nav-sub-liste a { display: flex; width: 100%; padding: 0.45rem var(--s-3); }
  .nav-sub-liste a:hover { background: var(--tint-weak); }
  /* offen per Knopf (JS: .ist-offen), per Maus (:hover, Escape setzt .zu —
     WCAG 1.4.13) und ohne JS per Tastatur (:focus-within) */
  .nav-sub.ist-offen > .nav-sub-liste,
  .nav-sub:hover:not(.zu) > .nav-sub-liste,
  .js-aus .nav-sub:focus-within > .nav-sub-liste { display: block; }
}
/* Knapper Bereich direkt nach dem Umbruch (Kern-Pruefer 26.09.2026): mit den
   normalen Abstaenden brauchte der Kopf 1235–1263 px; bei 1200 px ragte der
   Termin-Knopf in A 53 px, in B 47 px, in C 31 px ueber den Rand. Hier enger
   setzen statt den Umbruch zu verschieben (75em ist mit den Themes vereinbart).
   Wer in theme.css Kopf-Abstaende oder die Logo-Breite aendert: bei 1200 px
   nachmessen (kein Element rechts ausserhalb von .kopf-innen). */
@media (min-width: 75em) and (max-width: 84.99em) {
  .kopf-innen, .nav-links { gap: var(--s-2); }
  .logo img { width: 10.5rem; }
}

/* Mobil: Menue klappt unter dem Kopf auf (mit JS); ohne JS steht es als
   eigene Zeile offen da, alle Links bleiben erreichbar. */
@media (max-width: 74.99em) {
  .nav-links { display: flex; flex-direction: column; }
  .nav-links > li { border-bottom: 1px solid var(--line); }
  .nav-links a { width: 100%; }
  .nav-sub { display: flex; flex-wrap: wrap; align-items: center; }
  .nav-sub > a { flex: 1 1 auto; width: auto; }
  .nav-sub-liste { display: none; flex-basis: 100%; padding: 0 0 var(--s-2) var(--s-3); }
  .nav-sub.ist-offen > .nav-sub-liste, .js-aus .nav-sub-liste { display: block; }
  .js-aus .nav-sub-knopf, .js-aus .menue-knopf { display: none; }
  .js-aus .kopf-innen { flex-wrap: wrap; }
  .js-aus .nav { order: 10; flex-basis: 100%; padding-bottom: var(--s-2); }
  .js .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: calc(100vh - var(--kopf-h));
    max-height: calc(100dvh - var(--kopf-h));
    overflow-y: auto;
    padding: var(--s-2) max(1rem, var(--s-3)) var(--s-4);
    background: var(--bg);
    border-top: 1px solid var(--line);
    box-shadow: 0 24px 40px -24px color-mix(in oklch, var(--text) 40%, transparent);
  }
  .js .nav.ist-offen { display: block; }
}

/* ---------- 10. Seitenkopf (Teil seiten-hero) ---------- */
.shero { padding-block: var(--s-5) var(--s-6); }
.shero-raster { gap: var(--s-5); align-items: center; }
@media (min-width: 56em) {
  .shero-raster:has(> .shero-medium) { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); }
}
.shero-text > * + * { margin-top: var(--s-3); }
.shero-medium img { border-radius: var(--radius); }
.brotkrumen ol {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.6rem;
  list-style: none; margin: 0; padding: 0;
  font-size: var(--fs-klein);
}
.brotkrumen li { display: inline-flex; align-items: center; gap: 0.6rem; }
.brotkrumen li + li::before {
  content: "";
  width: 0.4em; height: 0.4em;
  border-top: 1.5px solid var(--muted);
  border-right: 1.5px solid var(--muted);
  transform: rotate(45deg);
}
.brotkrumen a { display: inline-flex; align-items: center; min-height: 24px; color: var(--muted); }
.brotkrumen [aria-current="page"] { color: var(--text); }
.sprungleiste { margin-top: var(--s-4); }
.sprungleiste-titel { font-size: var(--fs-klein); font-weight: var(--wght-label); color: var(--muted); }
.sprungleiste ul { display: flex; flex-wrap: wrap; gap: var(--s-1); list-style: none; margin: var(--s-1) 0 0; padding: 0; }
.sprungleiste a {
  display: inline-flex; align-items: center; min-height: 44px;
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--field-border);
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
}
.sprungleiste a:hover { border-color: var(--text); }

/* ---------- 11. Bausteine ---------- */
.checkliste { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6em; }
.checkliste li { display: grid; grid-template-columns: 1.35em minmax(0, 1fr); gap: 0.6em; align-items: start; }
.checkliste-ico { width: 1.35em; height: 1.35em; color: var(--accent-text); }
.fakten { display: grid; gap: var(--s-2); }
.fakt dt, .stellen-fakten dt { font-size: var(--fs-klein); color: var(--muted); }
.stellen-fakten { display: grid; }
.stellen-fakten > div {
  display: grid;
  grid-template-columns: minmax(6.5rem, 34%) minmax(0, 1fr);
  gap: var(--s-2);
  padding-block: 0.55rem;
  border-top: 1px solid var(--line);
}
.stellen-fakten dd { margin: 0; }
.schritte { padding-left: 1.4em; }
.schritt + .schritt { margin-top: var(--s-3); }
.schritt::marker { font-weight: var(--wght-label); }
.schritt > * + * { margin-top: 0.4em; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-2);
  min-height: 44px;
  padding-block: var(--s-2);
  cursor: pointer;
  list-style: none;
  font-weight: var(--wght-h3);
}
.faq summary::-webkit-details-marker { display: none; }
.faq-frage { font: inherit; margin: 0; }
.faq-ico { transition: transform var(--dauer) var(--ease-signatur); }
.faq details[open] .faq-ico { transform: rotate(45deg); }
.faq-antwort { max-width: var(--wrap-text); padding-bottom: var(--s-3); }
.faq-antwort > * + * { margin-top: 0.75em; }
.kasten { padding: var(--s-4); background: var(--bg); border: 1px solid var(--line-strong); border-radius: var(--radius); }
.kasten > * + * { margin-top: var(--s-2); }
/* Aufzaehlung ohne Klasse im Kasten (Wunsch leist-b Nr. 4): schmaler Einzug
   statt 40 px Browser-Standard; margin bleibt bei .kasten > * + *. */
.kasten ul:not([class]), .kasten ol:not([class]) { padding-left: 1.2em; }
.kasten ul:not([class]) > li + li, .kasten ol:not([class]) > li + li { margin-top: 0.4em; }
.kasten--einwand { border-color: var(--accent-fill); background: var(--tint-weak); }
.hinweis-box { padding: var(--s-3); border-left: 4px solid var(--accent-fill); background: var(--tint-weak); }
.hinweis-box > * + * { margin-top: 0.6em; }
.tabelle { width: 100%; }
.tabelle th, .tabelle td { padding: 0.6rem 0.75rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.tabelle th { font-weight: var(--wght-label); }
/* Tabellentitel (Wunsch leist-b Nr. 2): links statt Browser-Mitte. */
.tabelle caption { caption-side: top; text-align: left; font-weight: var(--wght-label); padding-bottom: 0.5rem; }
/* auto-fit statt auto-fill (KRITIK-c Nr. 2): leere Spuren fallen weg, zwei
   oder drei Bilder strecken sich ueber die ganze Breite statt als 285-px-Kacheln
   neben einer leeren Spalte zu stehen. */
.galerie { display: grid; gap: var(--s-2); grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); }
.referenz figcaption, .galerie-bild figcaption { margin-top: 0.5rem; font-size: var(--fs-klein); color: var(--muted); }
.leistungen-liste {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: var(--s-4) var(--s-5);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr));
}
.leistungen-liste li > * + * { margin-top: 0.5rem; }
.leistungen-liste h2, .leistungen-liste h3 { font-size: var(--fs-h3); }
.leistungen-liste h2 a, .leistungen-liste h3 a { color: var(--text); text-decoration-color: var(--accent-fill); }
.stellen {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: var(--s-3);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr));
}
.stelle { padding: var(--s-3); border: 1px solid var(--line-strong); border-radius: var(--radius); }
.stelle > * + * { margin-top: 0.4rem; }
.cta-zeile { margin-top: var(--s-5); padding-top: var(--s-4); border-top: 1px solid var(--line); }
.cta-zeile > * + * { margin-top: var(--s-2); }
.cta-titel { font-size: var(--fs-lead); font-weight: var(--wght-h3); }
.cta-band { padding-block: var(--s-7); background: var(--bg-2); }
.cta-band .wrap > * + * { margin-top: var(--s-3); }
.warnung { padding: var(--s-3); border-left: 4px solid var(--err); background: var(--err-bg); }

/* ---------- 11b. Bausteine des Feinschliffs (27.09.2026) ----------
   Nur Mechanik; Gestalt (Schrift, Farbe, Linie, Bildrand) in theme.css.
   Markup und Regeln: Kopf dieser Datei und BAUANLEITUNG §5. */

/* .split--bild — Text | grosses Foto */
.split--bild > .split-medium { margin: 0; align-self: start; }
.split--bild .split-medium img, .split--bild .split-medium picture { width: 100%; }
@media (min-width: 56em) {
  .split--bild { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); align-items: start; }
  /* Foto links (Figure zuerst im DOM ohne --umgekehrt, oder Text zuerst mit
     --umgekehrt): die breitere Spalte wandert mit auf die Bildseite. */
  .split--bild:not(.split--umgekehrt):has(> .split-medium:first-child),
  .split--bild.split--umgekehrt:has(> .split-medium:last-child) {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  }
  /* Hochformate (pavillon-metall, fassade-wellprofil, dachfenster-innen) nicht
     hoeher als der Bildschirm; der Ausschnitt fuellt den Rahmen. */
  .split--bild .split-medium img {
    max-height: 44rem;
    max-height: min(80svh, 46rem);
    object-fit: cover;
    object-position: var(--fokus, 50% 50%);
  }
  /* Neben langem Text bleibt das Foto im Blick (Kopf ist nicht sticky). */
  .split--bild > .split-medium { position: sticky; top: var(--s-4); }
}

/* .bildband — ein Foto in voller Breite (direktes Kind von main/section) */
.bildband { width: 100%; margin: 0; }
.bildband picture, .bildband img { width: 100%; }
.bildband img {
  min-height: 13rem;
  max-height: 40rem;
  max-height: min(70svh, 44rem);
  object-fit: cover;
  object-position: var(--fokus, 50% 50%);
}
.bildband > figcaption {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: max(1rem, var(--s-3));   /* Gutter wie .wrap, auch ohne Klasse */
  padding-top: 0.6rem;
  font-size: var(--fs-klein);
  color: var(--muted);
}
.wrap .bildband > figcaption { padding-inline: 0; }   /* in der Spalte: kein zweiter Gutter */
.sek > .bildband:not(:first-child) { margin-top: var(--s-5); }
.sek > .bildband:not(:last-child) { margin-bottom: var(--s-5); }

/* .kennwerte — echte Zahlen mit Erklaerung und Quelle */
.kennwerte {
  display: grid;
  gap: var(--s-3) var(--s-4);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
  margin: 0;
}
.kennwert { min-width: 0; display: grid; align-content: start; gap: 0.35rem; padding-top: var(--s-2); border-top: 1px solid var(--line-strong); }
.kennwert dt {
  font-family: var(--disp);
  font-size: var(--fs-h3);
  font-weight: var(--wght-h2);
  line-height: 1.1;
  -webkit-hyphens: manual;
  hyphens: manual;
  overflow-wrap: break-word;   /* nur als Notnagel: Einheiten haengen per U+00A0 an der Zahl */
}
.kennwert dd { margin: 0; }
.kennwert dd > * + * { margin-top: 0.35rem; }
.kennwert .quelle, .kennwert .quelle-stand { display: block; margin-top: 0.35rem; }

/* .merksatz — der Kern einer Sektion in einem Satz */
.merksatz {
  max-width: 38ch;
  padding-left: var(--s-3);
  border-left: 3px solid var(--accent-fill);
  font-size: var(--fs-lead);
  font-weight: var(--wght-h3);
  line-height: 1.35;
  text-wrap: balance;
}
.kasten .merksatz, .split .merksatz { max-width: none; }

/* .weiter-link — leichter Weiter-Weg (auch teil('cta', ['art' => 'leicht'])) */
.weiter-link { margin-top: var(--s-4); max-width: var(--wrap-text); }
.weiter-link a {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  min-height: 44px;
  font-weight: var(--wght-label);
}
.weiter-link a:not(.tel-link)::after {   /* Winkel wie in den Brotkrumen, rein dekorativ */
  content: "";
  flex: 0 0 auto;
  width: 0.45em; height: 0.45em;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
}
.cta-leicht-oder { color: var(--muted); }

/* Hero-Bild mit Bildunterschrift ('bild_caption' der Hero-Teile) */
.shero-figur { margin: 0; }
.shero-caption { margin-top: 0.5rem; font-size: var(--fs-klein); color: var(--muted); }

/* Material-/Beleg-Zeile aus material_html(): Stichwort + Trennpunkt als Einheit */
.material-teil { display: inline-block; }

/* .stellen--zeilen — Stellen als Registerzeilen (job-seite.php) */
.stellen--zeilen { grid-template-columns: minmax(0, 1fr); gap: 0; }
.stellen--zeilen .stelle {
  position: relative;
  display: grid;
  gap: 0.25rem var(--s-4);
  padding: var(--s-2) 0;
  border: 0;
  border-top: 1px solid var(--line-strong);
  border-radius: 0;
}
.stellen--zeilen .stelle:last-child { border-bottom: 1px solid var(--line-strong); }
.stellen--zeilen .stelle > * + * { margin-top: 0; }
.stellen--zeilen .stelle a { display: inline-flex; align-items: center; min-height: 44px; }
.stellen--zeilen .stelle a::after { content: ""; position: absolute; inset: 0; }   /* ganze Zeile klickbar */
@media (min-width: 48em) {
  .stellen--zeilen .stelle { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; }
}
.stellen-schluss { margin-top: var(--s-3); max-width: var(--wrap-text); }

/* ---------- 12. Platzhalter (gelb + gestrichelt, nie wegformatieren) ---------- */
mark.ph {
  background: var(--ph-bg);
  color: var(--on-ph-bg);
  padding: 0 0.2em;
  border-radius: 2px;
  outline: 1px dashed color-mix(in oklch, var(--on-ph-bg) 55%, transparent);
  outline-offset: 1px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.ph-foto {
  display: grid; place-items: center; align-content: center; gap: 0.5rem;
  margin: 0;
  padding: var(--s-3);
  aspect-ratio: 4 / 3;
  background: var(--ph-bg);
  color: var(--on-ph-bg);
  border: 2px dashed color-mix(in oklch, var(--on-ph-bg) 45%, transparent);
  border-radius: var(--radius);
  text-align: center;
}
.ph-foto--43 { aspect-ratio: 4 / 3; }
.ph-foto--32 { aspect-ratio: 3 / 2; }
.ph-foto--11 { aspect-ratio: 1 / 1; }
.ph-foto--45 { aspect-ratio: 4 / 5; }
.ph-foto-ico { width: 2.5rem; height: 2.5rem; }
.ph-foto figcaption { display: grid; gap: 0.25rem; font-size: var(--fs-klein); }
.ph-foto figcaption b { font-size: var(--fs-body); }
.bild-fehlt span { font-family: var(--mono); font-size: var(--fs-klein); overflow-wrap: anywhere; }

/* ---------- 13. Formular ---------- */
.formular { display: grid; gap: var(--s-3); }
.feld { display: grid; gap: 0.4rem; min-width: 0; margin: 0; padding: 0; border: 0; }
.feld > label, .feld > legend { padding: 0; font-weight: var(--wght-label); }
fieldset.feld > legend { margin-bottom: 0.2rem; }
.feld input:not([type="radio"]):not([type="checkbox"]),
.feld select,
.feld textarea {
  width: 100%;
  min-height: 48px;
  padding: 0.65rem 0.8rem;
  background: var(--bg);
  color: var(--text);
  border: 1.5px solid var(--field-border);
  border-radius: var(--radius-sm);
  font-size: max(1rem, var(--fs-body));   /* >= 16 px: kein Auto-Zoom auf iOS */
}
.feld textarea { min-height: 7.5rem; resize: vertical; }
.feld input:hover, .feld select:hover, .feld textarea:hover { border-color: var(--text); }
.feld [aria-invalid="true"]:not([type="radio"]) { border-color: var(--err); border-width: 2px; }
input[type="radio"], input[type="checkbox"] { accent-color: var(--accent-fill); }
.wahl { display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-3); }
.wahl label { display: inline-flex; align-items: center; gap: 0.5rem; min-height: 44px; cursor: pointer; font-weight: var(--wght-body); }
.wahl input { width: 1.25rem; height: 1.25rem; margin: 0; }
.feld-fehler { display: flex; align-items: flex-start; gap: 0.4rem; color: var(--err); font-size: var(--fs-klein); font-weight: var(--wght-label); }
.feld-fehler-ico { width: 1.2em; height: 1.2em; margin-top: 0.1em; }
.hp { position: absolute !important; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.hinweis { padding: var(--s-3); border: 1px solid var(--line-strong); border-radius: var(--radius); }
.hinweis--ok { background: var(--ok-bg); border-color: var(--ok); }
.hinweis--fehler, .fehler-box { padding: var(--s-3); background: var(--err-bg); border: 2px solid var(--err); border-radius: var(--radius); }
.fehler-box h2 { font-size: var(--fs-lead); color: var(--err); }
.fehler-box ul { margin: 0.5rem 0 0; padding-left: 1.2em; }
.fehler-box a { color: var(--err); }
.kanaele { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.kanal {
  display: inline-flex; align-items: center; gap: 0.75rem;
  min-height: 44px;
  padding: 0.6rem 1rem;
  color: var(--text);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  text-decoration: none;
}
.kanal:hover { border-color: var(--text); }
.kanal > span { display: grid; }
.kanal b { font-weight: var(--wght-label); }
.kanal > span > span { font-size: var(--fs-klein); color: var(--muted); }
.karte { display: grid; gap: var(--s-2); justify-items: start; }
.karte iframe { width: 100%; aspect-ratio: 4 / 3; border: 0; border-radius: var(--radius); }
@media (min-width: 48em) { .karte iframe { aspect-ratio: 16 / 10; } }

/* ---------- 14. Fuss ---------- */
.site-fuss { padding-block: var(--s-6) var(--s-5); background: var(--bg-2); }
.fuss-raster { gap: var(--s-4); }
@media (min-width: 48em) { .fuss-raster { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 64em) { .fuss-raster { grid-template-columns: minmax(0, 1.3fr) repeat(3, minmax(0, 1fr)); } }
.fuss-spalte > * + * { margin-top: var(--s-2); }
.fuss-spalte h3 { font-family: var(--sans); font-size: var(--fs-body); font-weight: var(--wght-label); }
.fuss-spalte ul { list-style: none; margin: 0; padding: 0; }
.fuss-spalte li a, .fuss-spalte address a { display: inline-flex; align-items: center; min-height: 32px; }
.fuss-spalte address a { min-height: 44px; }   /* Kontaktwege (tel:/mailto:) >= 44 px, BAUANLEITUNG §1 */
.fuss-unten {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-2);
  margin-top: var(--s-5);
  padding-top: var(--s-3);
  border-top: 1px solid var(--line);
  font-size: var(--fs-klein);
  color: var(--muted);
}
.fuss-unten a { color: inherit; }

/* ---------- 15. Dock (mobile Aktionsleiste) ---------- */
.dock { display: none; }
@media (max-width: 63.99em) {
  .dock {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-1);
    padding: var(--s-1) max(1rem, var(--s-2)) calc(var(--s-1) + env(safe-area-inset-bottom, 0px));
    background: var(--bg);
    border-top: 1px solid var(--line-strong);
    transition: transform var(--dauer) var(--ease-signatur), visibility 0s linear 0s;
  }
  /* .ruht: Kopf-Knoepfe sichtbar · .weg: Formularfeld hat den Fokus (Tastatur) */
  .dock.ruht, .dock.weg {
    transform: translateY(110%);
    visibility: hidden;
    transition: transform var(--dauer) var(--ease-signatur), visibility 0s linear var(--dauer);
  }
  .dock-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
    min-height: 48px;
    padding: 0.5rem;
    background: var(--accent-fill);
    color: var(--on-accent);
    border: 1.5px solid transparent;
    border-radius: var(--radius);
    font-weight: var(--wght-label);
    text-decoration: none;
  }
  .dock-btn--zweit { background: var(--bg); color: var(--text); border-color: var(--field-border); }
  /* Platz unter dem Fuss, damit die Leiste nichts verdeckt */
  body { padding-bottom: calc(48px + 2 * var(--s-1) + env(safe-area-inset-bottom, 0px)); }
}

/* ---------- 16. Druck ---------- */
@media print {
  .dock, .vorschau, .menue-knopf, .skip-link, .nav, .karte-laden { display: none !important; }
  body { padding-bottom: 0; }
}

/* ---------- 17. Weniger Bewegung: ALLES sofort im Endzustand ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
    scroll-behavior: auto !important;
  }
}

} /* Ende @layer basis */
