/* =========================================================================
   EHBS Knecht – Modernes Web-Designsystem (Erste Hilfe & Brandschutz)
   Skill: ehbs-knecht-web-modern. Gleiche Markenregeln wie ehbs-knecht-web,
   modernes Erscheinungsbild: Geist (selbst gehostet), weiche Radien,
   Tiefe über getönte Schatten, Hell/Dunkel, Bewegung mit klarer Absicht.
   Klassen-API kompatibel zu ehbs-web.css (alle ehbs-* Klassen existieren).
   Marke:  <html lang="de" data-marke="ehbs-ingenieure"> bzw. "dba"
   Thema:  automatisch per System, erzwingen mit data-theme="hell" | "dunkel"
   Keine neuen Hex-Werte hinzufügen, nur Tokens verwenden.
   ========================================================================= */

/* ---------- Schrift: Geist, lokal ausgeliefert (DSGVO, kein CDN) ---------- */
@font-face {
  font-family: "Geist";
  font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("../static/fonts/geist-latin-wght-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Geist";
  font-style: italic; font-weight: 100 900; font-display: swap;
  src: url("../static/fonts/geist-latin-wght-italic.woff2") format("woff2");
}

:root {
  color-scheme: light;

  /* Markenfarben (offizielles Farb-PDF, unverändert) */
  --ehbs-blue:       #232e6a;
  --ehbs-blue-dark:  #19214d;
  --ehbs-red:        #ac1410;
  --ehbs-red-dark:   #870f0c;
  --ehbs-yellow:     #f7a941;
  --ehbs-orange:     #eb5c2e;
  --ehbs-grey:       #706f6f;
  --ehbs-anthracite: #575756;
  --ehbs-dark:       #2B2B2B;

  /* Leitfarbe der aktiven Marke */
  --ehbs-primary:      var(--ehbs-blue);
  --ehbs-primary-dark: var(--ehbs-blue-dark);
  --ehbs-primary-tint: #e9ebf3;

  /* Flächen – hell */
  --ehbs-white:   #ffffff;
  --ehbs-bg:      #ffffff;
  --ehbs-bg-soft: #f5f6fa;   /* Abschnittsfläche, aus der Leitfarbe getönt */
  --ehbs-bg-light:#EDEDED;
  --ehbs-surface: #ffffff;   /* Karten, Tabellen, Formulare */
  --ehbs-line:    #D9D9D9;
  --ehbs-line-soft: color-mix(in srgb, var(--ehbs-primary) 10%, transparent);
  --ehbs-tint-hinweis: #FDF6E9;
  --ehbs-tint-warnung: #F7E7E6;

  /* Text */
  --ehbs-text:         #000000;
  --ehbs-text-sek:     #595959;
  --ehbs-text-on-dark: #ffffff;
  --ehbs-link:         var(--ehbs-primary);
  --ehbs-error:        #C0392B;

  /* Akzentlinie (Rot auf hell, Gelb auf dunkel) und Fokus */
  --ehbs-accent-line: var(--ehbs-red);
  --ehbs-focus:       var(--ehbs-primary);

  /* Fachliche Ampel – NICHT Markenfarben */
  --ampel-green:  #2E7D32;
  --ampel-yellow: #E3A615;
  --ampel-red:    #C0392B;
  --ampel-dark:   #2B2B2B;

  /* Typografie */
  --ehbs-font: "Geist", Arial, "Liberation Sans", Helvetica, sans-serif;
  --fs-small: 0.875rem;
  --fs-base:  1.0625rem;
  --fs-lg:    clamp(1.125rem, 1.05rem + .35vw, 1.3rem);
  --fs-h3:    1.25rem;
  --fs-h2:    clamp(1.75rem, 1.3rem + 1.8vw, 2.75rem);
  --fs-h1:    clamp(2.375rem, 1.6rem + 3.6vw, 4.5rem);
  --fs-kpi:   clamp(2.25rem, 1.8rem + 2vw, 3.5rem);
  --tracking-tight: -0.035em;
  --tracking-head:  -0.02em;

  /* Raster */
  --space-1: .25rem; --space-2: .5rem;  --space-3: .75rem; --space-4: 1rem;
  --space-6: 1.5rem; --space-8: 2rem;   --space-12: 3rem;  --space-16: 4rem;
  --space-24: 6rem;
  --section-y: clamp(4rem, 3rem + 4vw, 7rem);
  --container: 1200px;

  /* Radien nach Hierarchie, nicht ein Wert für alles */
  --radius-sm: 8px;    /* Badges, Eingabefelder */
  --radius:    12px;   /* Buttons, Boxen */
  --radius-lg: 20px;   /* Karten, Tabellencontainer */
  --radius-xl: 28px;   /* Hero-Medien, große Flächen */

  /* Tiefe: Schatten in der Leitfarbe getönt, mehrschichtig */
  --shadow-sm: 0 1px 2px color-mix(in srgb, var(--ehbs-primary) 8%, transparent);
  --shadow:    0 1px 2px color-mix(in srgb, var(--ehbs-primary) 6%, transparent),
               0 4px 12px -2px color-mix(in srgb, var(--ehbs-primary) 10%, transparent);
  --shadow-lg: 0 2px 4px color-mix(in srgb, var(--ehbs-primary) 6%, transparent),
               0 18px 40px -12px color-mix(in srgb, var(--ehbs-primary) 28%, transparent);

  /* Bewegung (Emil Kowalski: kurz, ease-out, nur transform/opacity) */
  --ease-out:    cubic-bezier(.23, 1, .32, 1);
  --ease-in-out: cubic-bezier(.77, 0, .175, 1);
  --dur-fast: 150ms;   /* Hover, Farbe, Press */
  --dur:      220ms;   /* Hover-Lift, Menüs */
  --dur-slow: 600ms;   /* Scroll-Reveal, Akzentlinie */
}

/* ---------- Markenschalter ---------- */
[data-marke="ehbs-ingenieure"] {
  --ehbs-primary: var(--ehbs-grey); --ehbs-primary-dark: var(--ehbs-anthracite); --ehbs-primary-tint: var(--ehbs-bg-light);
}
[data-marke="dba"] {
  --ehbs-primary: var(--ehbs-anthracite); --ehbs-primary-dark: var(--ehbs-dark); --ehbs-primary-tint: var(--ehbs-bg-light);
}

/* ---------- Dunkles Thema ----------
   Grund ist ein aus Dunkelblau abgeleitetes Nachtblau. Text Weiß, Links und
   Akzentlinie Gelb (Rot hätte nur 2,6:1). Kontrastwerte: references/farben-kontrast.md */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="hell"]) {
    color-scheme: dark;
    --ehbs-bg:      #0c1029;
    --ehbs-bg-soft: #141a3d;
    --ehbs-surface: #141a3d;
    --ehbs-surface-2: #1b2350;
    --ehbs-line:    #2e3870;
    --ehbs-line-soft: rgba(255,255,255,.08);
    --ehbs-primary-tint: #1b2350;
    --ehbs-tint-hinweis: #1b2350;
    --ehbs-tint-warnung: #1b2350;
    --ehbs-text:     #ffffff;
    --ehbs-text-sek: #b8bdd6;
    --ehbs-link:     var(--ehbs-yellow);
    --ehbs-error:    #ef7a6d;
    --ehbs-accent-line: var(--ehbs-yellow);
    --ehbs-focus:    var(--ehbs-yellow);
    --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
    --shadow:    0 1px 2px rgba(0,0,0,.4), 0 6px 16px -4px rgba(0,0,0,.5);
    --shadow-lg: 0 2px 4px rgba(0,0,0,.4), 0 24px 48px -12px rgba(0,0,0,.7);
  }
}
:root[data-theme="dunkel"] {
  color-scheme: dark;
  --ehbs-bg:      #0c1029;
  --ehbs-bg-soft: #141a3d;
  --ehbs-surface: #141a3d;
  --ehbs-surface-2: #1b2350;
  --ehbs-line:    #2e3870;
  --ehbs-line-soft: rgba(255,255,255,.08);
  --ehbs-primary-tint: #1b2350;
  --ehbs-tint-hinweis: #1b2350;
  --ehbs-tint-warnung: #1b2350;
  --ehbs-text:     #ffffff;
  --ehbs-text-sek: #b8bdd6;
  --ehbs-link:     var(--ehbs-yellow);
  --ehbs-error:    #ef7a6d;
  --ehbs-accent-line: var(--ehbs-yellow);
  --ehbs-focus:    var(--ehbs-yellow);
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow:    0 1px 2px rgba(0,0,0,.4), 0 6px 16px -4px rgba(0,0,0,.5);
  --shadow-lg: 0 2px 4px rgba(0,0,0,.4), 0 24px 48px -12px rgba(0,0,0,.7);
}

/* ---------- Basis ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  margin: 0;
  font-family: var(--ehbs-font);
  font-size: var(--fs-base);
  line-height: 1.6;
  color: var(--ehbs-text);
  background: var(--ehbs-bg);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { line-height: 1.1; margin: 0 0 var(--space-4); color: var(--ehbs-text); font-weight: 650; letter-spacing: var(--tracking-head); text-wrap: balance; }
h1 { font-size: var(--fs-h1); letter-spacing: var(--tracking-tight); font-weight: 700; line-height: 1.02; }
h2 { font-size: var(--fs-h2); letter-spacing: var(--tracking-tight); }
h3 { font-size: var(--fs-h3); line-height: 1.25; }
p  { margin: 0 0 var(--space-4); text-wrap: pretty; }
a  { color: var(--ehbs-link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px;
     transition: color var(--dur-fast) var(--ease-out), text-decoration-color var(--dur-fast) var(--ease-out); }
a:hover { color: var(--ehbs-red); text-decoration-thickness: 2px; }
:root[data-theme="dunkel"] a:hover { color: var(--ehbs-text); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="hell"]) a:hover { color: var(--ehbs-text); } }
:focus-visible { outline: 3px solid var(--ehbs-focus); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--ehbs-yellow); color: #000; }

/* Dunkle Markenflächen: Fokus und Akzent Gelb, Text Weiß */
.ehbs-topbar, .ehbs-hero, .ehbs-cta-band, .ehbs-footer, .ehbs-sidenav, .ehbs-on-dark {
  --ehbs-focus: var(--ehbs-yellow); --ehbs-accent-line: var(--ehbs-yellow); --ehbs-link: var(--ehbs-text-on-dark);
}

.ehbs-container { max-width: var(--container); margin: 0 auto; padding: 0 clamp(1rem, .5rem + 2vw, 2rem); }
.ehbs-section { padding: var(--section-y) 0; }
.ehbs-section--soft { background: var(--ehbs-bg-soft); }
.ehbs-section__intro { max-width: 44rem; margin-bottom: var(--space-12); }
.ehbs-section__intro p { font-size: var(--fs-lg); color: var(--ehbs-text); }
.ehbs-visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.ehbs-skip { position: absolute; left: -9999px; top: var(--space-2); background: var(--ehbs-primary); color: var(--ehbs-text-on-dark); padding: var(--space-2) var(--space-4); z-index: 100; border-radius: var(--radius-sm); }
.ehbs-skip:focus { left: var(--space-4); }
.ehbs-meta { font-size: var(--fs-small); color: var(--ehbs-text-sek); }

/* ---------- Überschrift mit Akzentlinie (Markenzeichen) ----------
   Die Linie zeichnet sich beim Einblenden einmal von links ein. */
.ehbs-heading { position: relative; padding-bottom: var(--space-4); margin-bottom: var(--space-6); }
.ehbs-heading::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 64px; height: 4px; border-radius: 2px; background: var(--ehbs-accent-line);
  transform-origin: left center;
}
.ehbs-heading--center { text-align: center; }
.ehbs-heading--center::after { left: 50%; margin-left: -32px; transform-origin: center; }
.js [data-reveal] .ehbs-heading::after, .js .ehbs-heading[data-reveal]::after { transform: scaleX(0); transition: transform var(--dur-slow) var(--ease-out) 150ms; }
.js .is-visible .ehbs-heading::after, .js .ehbs-heading.is-visible::after { transform: scaleX(1); }

/* ---------- Topbar + Header ---------- */
.ehbs-topbar { background: var(--ehbs-primary); color: var(--ehbs-text-on-dark); font-size: var(--fs-small); }
.ehbs-topbar .ehbs-container { display: flex; justify-content: flex-end; gap: var(--space-6); padding-top: var(--space-2); padding-bottom: var(--space-2); flex-wrap: wrap; }
.ehbs-topbar a { color: var(--ehbs-text-on-dark); text-decoration: none; }
.ehbs-topbar a:hover { text-decoration: underline; color: var(--ehbs-text-on-dark); }

.ehbs-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--ehbs-bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(14px); backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out);
}
.ehbs-header.is-scrolled { border-bottom-color: var(--ehbs-line-soft); box-shadow: var(--shadow-sm); }
.ehbs-header .ehbs-container { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); min-height: 76px; }
/* Logo immer auf Weiß (Markenregel) – im dunklen Thema als weiße Plakette */
.ehbs-logo { display: inline-flex; background: var(--ehbs-white); border-radius: var(--radius); padding: 6px 10px; margin-left: -10px; }
.ehbs-logo img { height: 52px; width: auto; }
.ehbs-nav ul { list-style: none; display: flex; gap: var(--space-2); margin: 0; padding: 0; align-items: center; }
.ehbs-nav a:not(.ehbs-btn) { color: var(--ehbs-text); }
.ehbs-nav a {
  position: relative; text-decoration: none; font-weight: 550;
  padding: var(--space-2) var(--space-3); min-height: 44px; display: inline-flex; align-items: center; border-radius: var(--radius-sm);
  transition: background-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.ehbs-nav a:not(.ehbs-btn):hover { background: var(--ehbs-line-soft); color: var(--ehbs-text); }
.ehbs-nav a[aria-current="page"]::after {
  content: ""; position: absolute; left: var(--space-3); right: var(--space-3); bottom: 4px; height: 3px; border-radius: 2px; background: var(--ehbs-accent-line);
}
.ehbs-nav a.ehbs-btn { margin-left: var(--space-2); }
.ehbs-header__tools { display: flex; align-items: center; gap: var(--space-2); }
.ehbs-nav-toggle, .ehbs-theme-toggle {
  display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; padding: 0 var(--space-3);
  background: transparent; color: var(--ehbs-text); border: 1px solid var(--ehbs-line); border-radius: var(--radius);
  font: inherit; font-weight: 600; cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.ehbs-nav-toggle:hover, .ehbs-theme-toggle:hover { background: var(--ehbs-line-soft); }
.ehbs-nav-toggle:active, .ehbs-theme-toggle:active { transform: scale(.96); }
.ehbs-nav-toggle { display: none; }
.ehbs-theme-toggle svg { width: 20px; height: 20px; }
.ehbs-theme-toggle .i-mond { display: none; }
:root[data-theme="dunkel"] .ehbs-theme-toggle .i-sonne { display: none; }
:root[data-theme="dunkel"] .ehbs-theme-toggle .i-mond { display: block; }

@media (max-width: 920px) {
  .ehbs-nav-toggle { display: inline-grid; }
  .ehbs-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--ehbs-bg); border-bottom: 1px solid var(--ehbs-line-soft); box-shadow: var(--shadow-lg);
    opacity: 0; transform: translateY(-8px); visibility: hidden; pointer-events: none;
    transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out), visibility 0s linear var(--dur);
  }
  .ehbs-nav.is-open { opacity: 1; transform: none; visibility: visible; pointer-events: auto; transition-delay: 0s; }
  .ehbs-nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: var(--space-2) var(--space-4) var(--space-4); }
  .ehbs-nav a:not(.ehbs-btn) { display: flex; padding: var(--space-3); }
  .ehbs-nav a[aria-current="page"]::after { left: 0; right: auto; top: 12px; bottom: 12px; width: 3px; height: auto; }
  .ehbs-nav a.ehbs-btn { margin: var(--space-3) 0 0; justify-content: center; }
  .ehbs-logo img { height: 40px; }
}

/* ---------- Buttons ---------- */
.ehbs-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: 48px; padding: 0 var(--space-6); border-radius: var(--radius);
  font: inherit; font-weight: 600; letter-spacing: -0.005em; text-decoration: none; cursor: pointer;
  border: 1px solid transparent; position: relative;
  transition: background-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.ehbs-btn:active { transform: scale(.97); }
.ehbs-btn svg { width: 18px; height: 18px; transition: transform var(--dur) var(--ease-out); }
.ehbs-btn:hover svg { transform: translateX(2px); }
/* Hauptaktion: Leitfarbe mit feinem Innenlicht */
.ehbs-btn--primary { background: var(--ehbs-primary); color: var(--ehbs-text-on-dark); box-shadow: inset 0 1px 0 rgba(255,255,255,.14), var(--shadow-sm); }
.ehbs-btn--primary:hover { background: var(--ehbs-primary-dark); color: var(--ehbs-text-on-dark); text-decoration: none; box-shadow: inset 0 1px 0 rgba(255,255,255,.14), var(--shadow); }
/* Rot NUR auf Landingpages zu Anzeigen (Domäne D) und bei Alarmthemen, max. 1 pro Ansicht */
.ehbs-btn--cta { background: var(--ehbs-red); color: var(--ehbs-text-on-dark); box-shadow: inset 0 1px 0 rgba(255,255,255,.16), var(--shadow-sm); }
.ehbs-btn--cta:hover { background: var(--ehbs-red-dark); color: var(--ehbs-text-on-dark); text-decoration: none; }
.ehbs-btn--outline { background: transparent; color: var(--ehbs-text); border-color: var(--ehbs-line); }
.ehbs-btn--outline:hover { border-color: var(--ehbs-text); color: var(--ehbs-text); text-decoration: none; }
.ehbs-btn--on-dark { background: var(--ehbs-white); color: var(--ehbs-blue); }
[data-marke="ehbs-ingenieure"] .ehbs-btn--on-dark, [data-marke="dba"] .ehbs-btn--on-dark { color: var(--ehbs-primary-dark); }
.ehbs-btn--on-dark:hover { background: var(--ehbs-primary-tint); color: var(--ehbs-blue); text-decoration: none; }
.ehbs-btn--ghost-dark { background: rgba(255,255,255,.06); color: var(--ehbs-text-on-dark); border-color: rgba(255,255,255,.45); }
.ehbs-btn--ghost-dark:hover { background: rgba(255,255,255,.14); border-color: var(--ehbs-white); color: var(--ehbs-text-on-dark); text-decoration: none; }
.ehbs-btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }
/* Dunkles Thema: Hauptaktion wird Weiß (Blau auf Nachtblau trennt sich nicht) */
:root[data-theme="dunkel"] .ehbs-btn--primary { background: var(--ehbs-white); color: var(--ehbs-blue); }
:root[data-theme="dunkel"] .ehbs-btn--primary:hover { background: var(--ehbs-primary-tint); color: var(--ehbs-white); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="hell"]) .ehbs-btn--primary { background: var(--ehbs-white); color: var(--ehbs-blue); }
  :root:not([data-theme="hell"]) .ehbs-btn--primary:hover { background: var(--ehbs-primary-tint); color: var(--ehbs-white); }
}

/* ---------- Hero ----------
   Leitfarbe mit Tiefe: zwei weiche Lichtfelder aus der Leitfarbe, feines Raster,
   roter Randstreifen links (Markenregel). */
.ehbs-hero {
  position: relative; overflow: hidden; isolation: isolate;
  background:
    radial-gradient(60rem 30rem at 85% -10%, color-mix(in srgb, var(--ehbs-white) 14%, var(--ehbs-primary)) 0%, transparent 60%),
    radial-gradient(40rem 26rem at -10% 110%, var(--ehbs-primary-dark) 0%, transparent 70%),
    var(--ehbs-primary);
  color: var(--ehbs-text-on-dark);
  padding: clamp(4.5rem, 3rem + 6vw, 8.5rem) 0 clamp(4rem, 3rem + 4vw, 7rem);
}
.ehbs-hero::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--ehbs-red); z-index: 1; }
.ehbs-hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse at 70% 30%, #000 0%, transparent 70%); mask-image: radial-gradient(ellipse at 70% 30%, #000 0%, transparent 70%);
}
.ehbs-hero h1, .ehbs-hero h2, .ehbs-hero p { color: var(--ehbs-text-on-dark); }
.ehbs-hero__grid { display: grid; gap: clamp(2rem, 1rem + 4vw, 4.5rem); grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); align-items: center; }
.ehbs-hero__grid--single { grid-template-columns: minmax(0, 52rem); }
.ehbs-hero__lead { font-size: var(--fs-lg); max-width: 36rem; line-height: 1.55; color: var(--ehbs-text-on-dark); }
.ehbs-hero__actions { display: flex; gap: var(--space-3); flex-wrap: wrap; margin-top: var(--space-8); }
.ehbs-hero__media { position: relative; border-radius: var(--radius-xl); overflow: hidden; aspect-ratio: 4 / 5; box-shadow: 0 30px 60px -20px rgba(0,0,0,.55); outline: 1px solid rgba(255,255,255,.12); outline-offset: -1px; }
.ehbs-hero__media img { width: 100%; height: 100%; object-fit: cover; }
.ehbs-hero__media .ehbs-placeholder { height: 100%; border-radius: 0; background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.35); color: var(--ehbs-text-on-dark); }
.ehbs-hero__facts { display: flex; flex-wrap: wrap; gap: var(--space-6) var(--space-8); margin: var(--space-12) 0 0; padding: var(--space-6) 0 0; border-top: 1px solid rgba(255,255,255,.18); list-style: none; }
.ehbs-hero__facts li { display: flex; align-items: center; gap: var(--space-2); font-weight: 500; }
.ehbs-hero__facts svg { width: 20px; height: 20px; color: var(--ehbs-yellow); flex: none; }
@media (max-width: 860px) { .ehbs-hero__grid { grid-template-columns: 1fr; } .ehbs-hero__media { aspect-ratio: 16 / 10; } }

/* ---------- Raster & Karten ---------- */
.ehbs-grid { display: grid; gap: var(--space-6); grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
/* Bento: asymmetrisch statt drei gleicher Karten. Erstes Element groß. */
.ehbs-bento { display: grid; gap: var(--space-6); grid-template-columns: repeat(6, minmax(0, 1fr)); }
.ehbs-bento > :nth-child(1) { grid-column: span 4; grid-row: span 2; }
.ehbs-bento > :nth-child(n+2) { grid-column: span 2; }
.ehbs-bento > :nth-child(n+4) { grid-column: span 3; }
@media (max-width: 860px) { .ehbs-bento { grid-template-columns: 1fr; } .ehbs-bento > * { grid-column: auto !important; grid-row: auto !important; } }

.ehbs-card {
  position: relative; display: flex; flex-direction: column;
  background: var(--ehbs-surface); border: 1px solid var(--ehbs-line-soft); border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 1.2rem + 1vw, 2.25rem); box-shadow: var(--shadow);
  transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out);
}
/* Markenkante oben: kurze Linie statt voller Balken */
.ehbs-card::before { content: ""; position: absolute; top: -1px; left: clamp(1.5rem, 1.2rem + 1vw, 2.25rem); width: 40px; height: 3px; border-radius: 0 0 3px 3px; background: var(--ehbs-primary); }
:root[data-theme="dunkel"] .ehbs-card::before { background: var(--ehbs-yellow); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="hell"]) .ehbs-card::before { background: var(--ehbs-yellow); } }
.ehbs-card--accent::before { background: var(--ehbs-red) !important; width: 64px; }
/* Hover-Lift nur bei echten Zeigegeräten, nur wenn die Karte klickbar ist */
@media (hover: hover) and (pointer: fine) {
  .ehbs-card--link:hover, .ehbs-card:has(.ehbs-card__link:hover) { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--ehbs-primary) 22%, transparent); }
}
.ehbs-card h3 { margin-bottom: var(--space-2); }
.ehbs-card--feature h3 { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); letter-spacing: var(--tracking-tight); }
.ehbs-card--feature { background: linear-gradient(160deg, var(--ehbs-primary-tint), var(--ehbs-surface) 60%); }
.ehbs-card__icon { width: 48px; height: 48px; border-radius: 14px; background: var(--ehbs-primary); color: var(--ehbs-text-on-dark); display: grid; place-items: center; margin-bottom: var(--space-6); box-shadow: inset 0 1px 0 rgba(255,255,255,.18); }
.ehbs-card__icon svg { width: 24px; height: 24px; }
.ehbs-card__footer { margin-top: auto; padding-top: var(--space-6); }
.ehbs-card__meta { font-size: var(--fs-small); color: var(--ehbs-text-sek); }
/* Ganze Karte klickbar über einen Link (Stretched Link) */
.ehbs-card__link { font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: var(--space-2); }
.ehbs-card__link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.ehbs-card__link:hover { text-decoration: underline; }

/* ---------- Ablauf (nur für echte Reihenfolgen) ---------- */
.ehbs-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-6); grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); counter-reset: schritt; }
.ehbs-steps li { counter-increment: schritt; position: relative; padding-top: var(--space-12); }
.ehbs-steps li::before { content: counter(schritt); position: absolute; top: 0; left: 0; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: var(--ehbs-primary); color: var(--ehbs-text-on-dark); font-variant-numeric: tabular-nums; }
.ehbs-steps li::after { content: ""; position: absolute; top: 18px; left: 48px; right: 0; height: 1px; background: var(--ehbs-line); }
.ehbs-steps li:last-child::after { display: none; }

/* ---------- Badges ---------- */
.ehbs-badge { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-small); font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--ehbs-yellow); color: #000; }
.ehbs-badge--orange { background: var(--ehbs-orange); color: #000; }
.ehbs-badge--blue { background: var(--ehbs-primary); color: var(--ehbs-text-on-dark); }
.ehbs-badge--soft { background: var(--ehbs-primary-tint); color: var(--ehbs-text); }

/* ---------- Status (Ampel) – immer mit Text ---------- */
.ehbs-status { display: inline-flex; align-items: center; gap: var(--space-2); font-weight: 600; color: var(--ehbs-text); white-space: nowrap; }
.ehbs-status::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: currentColor; flex: none; box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 0%, transparent); }
.ehbs-status--ok::before   { background: var(--ampel-green);  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ampel-green) 20%, transparent); }
.ehbs-status--mid::before  { background: var(--ampel-yellow); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ampel-yellow) 25%, transparent); }
.ehbs-status--bad::before  { background: var(--ampel-red);    box-shadow: 0 0 0 3px color-mix(in srgb, var(--ampel-red) 20%, transparent); }
.ehbs-status--none::before { background: var(--ampel-dark); }
:root[data-theme="dunkel"] .ehbs-status--none::before { background: var(--ehbs-text-sek); }

/* ---------- Tabelle ---------- */
.ehbs-table-wrap { position: relative; overflow-x: auto; border: 1px solid var(--ehbs-line-soft); border-radius: var(--radius-lg); background: var(--ehbs-surface); box-shadow: var(--shadow); }
.ehbs-table { width: 100%; border-collapse: collapse; min-width: 640px; font-variant-numeric: tabular-nums; }
.ehbs-table th { background: var(--ehbs-grey); color: var(--ehbs-text-on-dark); text-align: left; font-weight: 600; font-size: var(--fs-small); letter-spacing: .01em; padding: var(--space-4) var(--space-6); }
.ehbs-table td { padding: var(--space-4) var(--space-6); border-top: 1px solid var(--ehbs-line-soft); vertical-align: middle; }
.ehbs-table tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--ehbs-bg-soft) 70%, transparent); }
.ehbs-table tbody tr { transition: background-color var(--dur-fast) var(--ease-out); }
.ehbs-table tbody tr:hover td { background: var(--ehbs-primary-tint); }
.ehbs-table .num { text-align: right; white-space: nowrap; }
.ehbs-table .ehbs-btn { min-height: 40px; padding: 0 var(--space-4); }

/* ---------- Hinweisboxen ---------- */
.ehbs-box { position: relative; background: var(--ehbs-primary-tint); padding: var(--space-6) var(--space-6) var(--space-6) calc(var(--space-6) + 6px); border-radius: var(--radius); margin: var(--space-8) 0; overflow: hidden; }
.ehbs-box::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--ehbs-primary); }
.ehbs-box__title { font-weight: 650; margin-bottom: var(--space-1); }
.ehbs-box > :last-child { margin-bottom: 0; }
.ehbs-box--hinweis { background: var(--ehbs-tint-hinweis); }
.ehbs-box--hinweis::before { background: var(--ehbs-yellow); }
.ehbs-box--warnung { background: var(--ehbs-tint-warnung); }
.ehbs-box--warnung::before { background: var(--ehbs-red); }
:root[data-theme="dunkel"] .ehbs-box--warnung::before { background: var(--ehbs-orange); }

/* ---------- KPI-Kacheln ---------- */
.ehbs-kpis { display: grid; gap: var(--space-6); grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.ehbs-kpi { position: relative; padding: var(--space-6) 0 0; border-top: 1px solid var(--ehbs-line); }
.ehbs-kpi::before { content: ""; position: absolute; top: -2px; left: 0; width: 40px; height: 3px; background: var(--ehbs-accent-line); border-radius: 2px; }
.ehbs-kpi__value { font-size: var(--fs-kpi); font-weight: 650; line-height: 1; letter-spacing: var(--tracking-tight); color: var(--ehbs-text); font-variant-numeric: tabular-nums; }
.ehbs-kpi__label { margin-top: var(--space-3); color: var(--ehbs-text); max-width: 18rem; }
/* App-Variante: als Kachel */
.ehbs-kpi--tile { background: var(--ehbs-surface); border: 1px solid var(--ehbs-line-soft); border-radius: var(--radius-lg); padding: var(--space-6); box-shadow: var(--shadow-sm); }
.ehbs-kpi--tile::before { top: -1px; left: var(--space-6); }

/* ---------- Formulare ---------- */
.ehbs-form { display: grid; gap: var(--space-6); max-width: 680px; }
.ehbs-form--card { background: var(--ehbs-surface); border: 1px solid var(--ehbs-line-soft); border-radius: var(--radius-lg); padding: clamp(1.5rem, 1rem + 2vw, 2.5rem); box-shadow: var(--shadow); }
.ehbs-form__row { display: grid; gap: var(--space-6); grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.ehbs-field label { display: block; font-weight: 600; font-size: .95rem; margin-bottom: var(--space-2); }
.ehbs-field input, .ehbs-field select, .ehbs-field textarea {
  width: 100%; min-height: 48px; padding: var(--space-3) var(--space-4);
  font: inherit; color: var(--ehbs-text); background: var(--ehbs-bg);
  border: 1px solid var(--ehbs-anthracite); border-radius: var(--radius-sm);
  transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
:root[data-theme="dunkel"] .ehbs-field :is(input, select, textarea) { border-color: #b8bdd6; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="hell"]) .ehbs-field :is(input, select, textarea) { border-color: #b8bdd6; } }
.ehbs-field textarea { min-height: 140px; resize: vertical; }
.ehbs-field :is(input, select, textarea):hover { border-color: var(--ehbs-text); }
.ehbs-field :is(input, select, textarea):focus { outline: none; border-color: var(--ehbs-focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ehbs-focus) 35%, transparent), 0 0 0 1px var(--ehbs-focus); }
.ehbs-field__hint { font-size: var(--fs-small); margin-top: var(--space-2); color: var(--ehbs-text-sek); }
.ehbs-field--error :is(input, select, textarea) { border: 2px solid var(--ehbs-error); }
.ehbs-field__error { color: var(--ehbs-error); font-size: var(--fs-small); font-weight: 600; margin-top: var(--space-2); }
.ehbs-check { display: flex; gap: var(--space-3); align-items: flex-start; }
.ehbs-check input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--ehbs-primary); flex: none; }

/* ---------- CTA-Band ---------- */
.ehbs-cta-band { padding: var(--section-y) 0; }
.ehbs-cta-band__inner {
  position: relative; overflow: hidden; border-radius: var(--radius-xl);
  background: radial-gradient(40rem 20rem at 100% 0%, color-mix(in srgb, var(--ehbs-white) 12%, var(--ehbs-primary)), transparent 70%), var(--ehbs-primary);
  color: var(--ehbs-text-on-dark); padding: clamp(2rem, 1rem + 4vw, 4rem);
  display: flex; justify-content: space-between; align-items: center; gap: var(--space-8); flex-wrap: wrap;
}
.ehbs-cta-band__inner::before { content: ""; position: absolute; left: 0; top: 0; right: 0; height: 4px; background: var(--ehbs-red); }
.ehbs-cta-band--rot .ehbs-cta-band__inner { background: var(--ehbs-red); }
.ehbs-cta-band--rot .ehbs-cta-band__inner::before { background: var(--ehbs-red-dark); }
.ehbs-cta-band h2, .ehbs-cta-band p { color: var(--ehbs-text-on-dark); margin: 0; }
.ehbs-cta-band h2 { margin-bottom: var(--space-2); max-width: 30ch; }
.ehbs-cta-band { --ehbs-focus: var(--ehbs-yellow); }

/* ---------- Seitliche Navigation (Web-App) ---------- */
.ehbs-app { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: 100vh; }
.ehbs-sidenav { background: var(--ehbs-primary); color: var(--ehbs-text-on-dark); padding: var(--space-4) var(--space-3); display: flex; flex-direction: column; gap: 2px; }
:root[data-theme="dunkel"] .ehbs-sidenav { background: var(--ehbs-bg-soft); border-right: 1px solid var(--ehbs-line-soft); }
.ehbs-sidenav a { display: flex; align-items: center; gap: var(--space-3); color: var(--ehbs-text-on-dark); text-decoration: none; padding: var(--space-2) var(--space-3); min-height: 44px; border-radius: var(--radius-sm); position: relative; transition: background-color var(--dur-fast) var(--ease-out); }
.ehbs-sidenav a:hover { background: rgba(255,255,255,.08); color: var(--ehbs-text-on-dark); }
.ehbs-sidenav a[aria-current="page"] { background: rgba(255,255,255,.12); font-weight: 600; }
.ehbs-sidenav a[aria-current="page"]::before { content: ""; position: absolute; left: -12px; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--ehbs-red); }
.ehbs-sidenav svg { width: 20px; height: 20px; flex: none; opacity: .9; }
.ehbs-app__main { padding: clamp(1.25rem, 1rem + 1.5vw, 2.5rem); background: var(--ehbs-bg-soft); }
@media (max-width: 860px) { .ehbs-app { grid-template-columns: 1fr; } .ehbs-sidenav { flex-direction: row; overflow-x: auto; } .ehbs-sidenav a[aria-current="page"]::before { left: 10px; right: 10px; top: auto; bottom: 0; width: auto; height: 3px; } }

/* ---------- Footer ---------- */
.ehbs-footer { background: var(--ehbs-primary-dark); color: var(--ehbs-text-on-dark); padding: var(--space-16) 0 var(--space-8); font-size: var(--fs-small); }
:root[data-theme="dunkel"] .ehbs-footer { background: #070a1c; border-top: 1px solid var(--ehbs-line-soft); }
.ehbs-footer h2, .ehbs-footer h3 { color: var(--ehbs-text-on-dark); font-size: var(--fs-base); letter-spacing: 0; }
.ehbs-footer a { color: var(--ehbs-text-on-dark); text-decoration-color: rgba(255,255,255,.4); }
.ehbs-footer a:hover { color: var(--ehbs-yellow); text-decoration-color: currentColor; }
.ehbs-footer__grid { display: grid; gap: var(--space-8); grid-template-columns: 1.4fr repeat(auto-fit, minmax(180px, 1fr)); }
.ehbs-footer ul { list-style: none; margin: 0; padding: 0; }
.ehbs-footer li { margin-bottom: var(--space-2); }
.ehbs-footer .ehbs-logo { margin: 0 0 var(--space-4); }
.ehbs-footer__legal { border-top: 1px solid rgba(255,255,255,.18); margin-top: var(--space-12); padding-top: var(--space-6); display: flex; justify-content: space-between; gap: var(--space-4); flex-wrap: wrap; }
.ehbs-footer__legal ul { display: flex; gap: var(--space-6); flex-wrap: wrap; }
@media (max-width: 720px) { .ehbs-footer__grid { grid-template-columns: 1fr; } }

/* ---------- Platzhalter ---------- */
.ehbs-placeholder { background: var(--ehbs-bg-light); border: 2px dashed var(--ehbs-grey); display: grid; place-items: center; min-height: 200px; text-align: center; padding: var(--space-4); border-radius: var(--radius-lg); font-size: var(--fs-small); color: #000; }
:root[data-theme="dunkel"] .ehbs-placeholder { background: var(--ehbs-surface-2); color: var(--ehbs-text); border-color: var(--ehbs-text-sek); }

/* ---------- Scroll-Reveal (opt-in, sparsam) ----------
   Nur mit data-reveal, nur wenn JS läuft (.js am <html>). Ohne JS bleibt alles sichtbar.
   data-reveal-stagger am Elternteil staffelt direkte Kinder um je 60 ms. */
.js [data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out); }
.js [data-reveal].is-visible { opacity: 1; transform: none; }
.js [data-reveal-stagger] > * { opacity: 0; transform: translateY(16px); transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out), box-shadow var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out); }
.js [data-reveal-stagger].is-visible > * { opacity: 1; transform: none; }
.js [data-reveal-stagger].is-visible > *:nth-child(2) { transition-delay: 60ms, 60ms, 0ms, 0ms; }
.js [data-reveal-stagger].is-visible > *:nth-child(3) { transition-delay: 120ms, 120ms, 0ms, 0ms; }
.js [data-reveal-stagger].is-visible > *:nth-child(4) { transition-delay: 180ms, 180ms, 0ms, 0ms; }
.js [data-reveal-stagger].is-visible > *:nth-child(5) { transition-delay: 240ms, 240ms, 0ms, 0ms; }
/* Nach dem Einblenden normale Hover-Übergänge zurückgeben */
.js [data-reveal-stagger].is-done > * { transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out); }
/* Hero: ein orchestrierter Auftritt beim Laden */
@keyframes ehbs-rise { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
.js .ehbs-hero [data-hero] { animation: ehbs-rise 700ms var(--ease-out) both; }
.js .ehbs-hero [data-hero="2"] { animation-delay: 80ms; }
.js .ehbs-hero [data-hero="3"] { animation-delay: 160ms; }
.js .ehbs-hero [data-hero="4"] { animation-delay: 240ms; }
@keyframes ehbs-line { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.js .ehbs-hero .ehbs-heading::after { animation: ehbs-line var(--dur-slow) var(--ease-out) 450ms both; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 1ms !important; animation-delay: 0ms !important; transition-duration: 1ms !important; transition-delay: 0ms !important; }
  .js [data-reveal], .js [data-reveal-stagger] > * { opacity: 1 !important; transform: none !important; }
  .js .ehbs-heading::after { transform: none !important; }
  .ehbs-card:hover, .ehbs-btn:active { transform: none !important; }
}
@media print {
  .ehbs-topbar, .ehbs-nav, .ehbs-nav-toggle, .ehbs-theme-toggle, .ehbs-cta-band { display: none; }
  .ehbs-header { position: static; backdrop-filter: none; }
  .ehbs-hero, .ehbs-footer { background: none; color: #000; }
  .ehbs-hero *, .ehbs-footer * { color: #000 !important; }
  .js [data-reveal], .js [data-reveal-stagger] > * { opacity: 1; transform: none; }
}
/* Reihenfolge wie zuvor in shared/theme.py: nach dem Designsystem
   (assets/web/ehbs-modern.css, in main.ts eingebunden) erst die Regeln der
   Seite, zuletzt der Wizard. *//* =========================================================================
   Seite: Rahmen, Kopf und Fuß, Startseite, Banner, Rahmen des Assistenten.
   Übernommen aus shared/theme.py (Brücke zu Streamlit, Stand 1.58), das
   Aussehen bleibt gleich. Die Karte des Wizards und alles darin steht in
   wizard.css.

   Reihenfolge wie zuvor: ehbs-modern.css (main.ts) vor dieser Datei.
   Keine neuen Hex-Werte, nur die Tokens aus ehbs-modern.css und
   color-mix-Mischungen daraus.

   Wo theme.py ein .stApp vorangestellt hatte, steht jetzt :root. Gleiche
   Spezifität (eine Klasse bzw. Pseudoklasse), damit die Regeln weiter
   genauso gegen ehbs-modern.css und untereinander gewinnen, zum Beispiel
   die Linkfarbe im Kopf gegen die Hover-Regel des dunklen Themas.

   Hell und Dunkel folgen prefers-color-scheme wie ehbs-modern.css.
   Bewegung nur per CSS: Ladeauftritt im Hero und scrollgebundene
   Einblendungen als Progressive Enhancement, prefers-reduced-motion
   schaltet alles ab. Im Testbereich bewegt sich nichts.
   ========================================================================= */

/* ── Grundstile, die bisher Streamlit mitbrachte ──────────────────────────
   Die Seite wurde mit Streamlits globalem CSS gestaltet, ihr Aussehen hängt
   daran: Absätze und Listen in 1rem statt der Grundgröße 1.0625rem von
   ehbs-modern.css, Listen ohne Einzug, schmale Scrollleisten, die erst
   beim Hovern sichtbar werden. Nur die Regeln, die hier etwas bewirken.
   In :where(), also ohne Spezifität: Streamlit lud sie vor dem
   Designsystem, jede Regel aus ehbs-modern.css und dieser Datei geht vor. */
:where(body) { -webkit-tap-highlight-color: transparent; }
:where(p, ol, ul, dl) { margin: 0 0 1rem; padding: 0; font-size: 1rem; font-weight: 400; }
:where(ol, ul) :where(ol, ul) { margin-bottom: 0; }
:where(img, svg) { vertical-align: middle; }
:where(input, button, select, optgroup, textarea) {
    margin: 0; font-family: inherit; line-height: inherit; font-size: inherit;
}
:where(button, input) { overflow: visible; }
:where(button:not(:disabled), [role="button"]:not(:disabled)) { cursor: pointer; }
:where([hidden]) { display: none !important; }
@supports (scrollbar-color: transparent transparent) {
    :where(*) { scrollbar-width: thin; scrollbar-color: transparent transparent; }
    :where(:hover) { scrollbar-color: rgba(0, 0, 0, .4) transparent; }
    @media (prefers-color-scheme: dark) {
        :where(:hover) { scrollbar-color: rgba(255, 255, 255, .4) transparent; }
    }
}

/* ── Seitenrahmen ─────────────────────────────────────────────────────────
   Landingpage-Bänder (Hero, Abschnitte, Footer) laufen über die volle
   Breite, die Inhalte begrenzt .ehbs-container. Schrift, Text- und
   Grundfarbe setzt ehbs-modern.css am body. */

/* Browser-Oberflächen aus der Palette (Impeccable craft-floor). Gescrollt
   wird jetzt das Dokument selbst, nicht mehr ein Streamlit-Container. */
input, textarea { caret-color: var(--ehbs-focus); }
html { scrollbar-color: color-mix(in srgb, var(--ehbs-primary) 35%, transparent) transparent; }
@media (prefers-color-scheme: dark) {
    html { scrollbar-color: var(--ehbs-line) transparent; }
}

/* Sprungziele landen unter dem sticky Header, nicht dahinter. Am Ziel
   statt per scroll-padding-top am html (ehbs-modern.css, 96px): Unter
   Streamlit scrollte ein innerer Container, das scroll-padding des html
   wirkte nie. Jetzt scrollt das Dokument selbst, und scroll-padding würde
   auch die scrollgebundenen Einblendungen verschieben (view() rechnet den
   Bereich ohne view-timeline-inset ab dem scroll-padding). Das weiche
   Scrollen aus ehbs-modern.css (scroll-behavior am html) greift dagegen
   jetzt, unter Streamlit sprangen die Anker hart. */
html { scroll-padding-top: 0; }
section[id], .bso-test-intro { scroll-margin-top: 96px; }

/* ── Kopf und Fuß wie ehbs-knecht.de (shared/website.py) ─────────────────
   1:1 aus der LE-App. Maße aus dem Stylesheet der Website, Farben aus den
   Tokens von ehbs-modern.css, Mischungen statt neuer Hex-Werte:
   --le-text-auf-blau ≈ #e6e8f1, --le-linie-web ≈ #d9d9d7,
   --le-flaeche-web ≈ #f3f3f2 der Website. Beide Bänder sehen hell und
   dunkel gleich aus wie auf der Website, der Kopf bleibt weiß (Logo auf
   Weiß), der Fuß Dunkelblau. Schrift Archivo wie auf der Website, nur in
   Kopf und Fuß, selbst gehostet unter static/fonts (relativ zum gebauten
   CSS in assets/). Reduced Motion deckt die globale Regel in
   ehbs-modern.css ab. */
@font-face {
    font-family: "Archivo"; font-style: normal; font-weight: 100 900; font-display: swap;
    src: url("../static/fonts/archivo-latin-wght-normal.woff2") format("woff2");
}
:root {
    --le-font-web: "Archivo", Arial, sans-serif;
    --le-text-auf-blau: color-mix(in srgb, var(--ehbs-white) 89%, var(--ehbs-blue));
    --le-linie-web: color-mix(in srgb, var(--ehbs-grey) 27%, var(--ehbs-white));
    --le-flaeche-web: color-mix(in srgb, var(--ehbs-bg-light) 60%, var(--ehbs-white));
    --le-schatten-menue: 0 24px 48px -24px color-mix(in srgb, var(--ehbs-blue-dark) 45%, transparent);
}
/* Icons als Maske in der Textfarbe, je Name eine Regel aus website.icon_css(). */
.web-icon {
    display: inline-block; flex: none; width: 20px; height: 20px; background-color: currentColor;
    -webkit-mask: var(--web-icon) center / contain no-repeat; mask: var(--web-icon) center / contain no-repeat;
}
:root :is(.web-header, .web-footer), :root :is(.web-header, .web-footer) * {
    font-family: var(--le-font-web);
}
/* Listen und Absätze in Kopf und Fuß ohne Einzug und Abstände. */
:root :is(.web-header, .web-footer) ul { list-style: none; margin: 0; padding: 0; }
:root :is(.web-header, .web-footer) li { margin: 0; padding: 0; }
:root :is(.web-header, .web-footer) p { margin: 0; }
/* Breite wie .wrap der Website (--maxw 1280px, --gutter), nicht wie
   .ehbs-container (1200px inkl. Innenabstand). */
:is(.web-header, .web-footer) > .ehbs-container {
    --web-gutter: clamp(1rem, 4vw, 3rem);
    max-width: calc(1280px + 2 * var(--web-gutter)); padding-inline: var(--web-gutter);
}

/* Kopf klebt beim Scrollen. Unter Streamlit klebte der Elementcontainer um
   den Kopf, jetzt steht der Kopf direkt im body und klebt selbst. Sticky
   ist zugleich Bezug für das absolut positionierte Mobilmenü. */
.web-header {
    --ehbs-focus: var(--ehbs-blue);
    position: sticky; top: 0; z-index: 50;
    background: var(--ehbs-white); color: var(--ehbs-anthracite);
    font-size: 1.125rem; line-height: 1.65;
}
/* Schatten erst nach dem Scrollen, scrollgebunden statt per Skript.
   Browser ohne animation-timeline zeigen den Kopf ohne Schatten. */
@keyframes kopf-schatten {
    from { box-shadow: 0 6px 24px -12px transparent; }
    to   { box-shadow: 0 6px 24px -12px color-mix(in srgb, var(--ehbs-blue) 28%, transparent); }
}
@supports (animation-timeline: scroll()) {
    .web-header {
        animation: kopf-schatten linear both;
        animation-timeline: scroll(nearest block); animation-range: 0 48px;
    }
}
.web-header__innen { display: flex; align-items: center; gap: 2rem; height: 88px; }
.web-logo { display: block; flex: none; }
.web-logo img { height: 52px; width: auto; }
.web-nav { margin-left: auto; }
.web-nav > ul { display: flex; gap: clamp(1rem, 2vw, 2.25rem); }
.web-nav li { position: relative; }
/* Link-Farben mit :root vorn, sonst gewinnt im dunklen Thema die
   Hover-Regel des Skill-CSS (Weiß auf weißem Kopf). */
:root .web-header a, :root .web-header a:hover { color: var(--ehbs-blue); text-decoration: none; }
:root .web-header :is(.web-nav, .web-menue__nav) a {
    font-size: 1rem; font-weight: 500; line-height: 1.65; padding-block: .5rem;
    background: linear-gradient(var(--ehbs-orange), var(--ehbs-orange)) no-repeat left bottom / 0 2px;
    transition: background-size .35s var(--ease-out);
}
:root .web-header :is(.web-nav, .web-menue__nav) a:hover { background-size: 100% 2px; }
/* Aufklappmenü unter Leistungen und Kurse, öffnet bei Maus und Tastatur. */
:root .web-nav .web-nav__sub {
    position: absolute; left: -1rem; top: calc(100% + .9rem); z-index: 60;
    width: 270px; padding: .5rem; background: var(--ehbs-white);
    box-shadow: var(--le-schatten-menue), inset 0 0 0 1px var(--le-linie-web);
    opacity: 0; visibility: hidden; transform: translateY(8px);
    transition: opacity .3s var(--ease-out), transform .3s var(--ease-out), visibility .3s;
}
.web-nav .web-nav__sub::before { content: ""; position: absolute; left: 0; right: 0; top: -1rem; height: 1rem; }
/* :has(:focus-visible) statt :focus-within: Nach einem Mausklick (Link
   öffnet neuen Tab) behält der Link den Fokus, das Menü bliebe sonst offen. */
.web-nav li:hover > .web-nav__sub, .web-nav li:has(:focus-visible) > .web-nav__sub {
    opacity: 1; visibility: visible; transform: none;
}
:root .web-header .web-nav .web-nav__sub a {
    display: block; padding: .65rem .85rem; font-size: .975rem; background: none;
    box-shadow: inset 3px 0 0 0 transparent;
    transition: background-color .2s var(--ease-out), box-shadow .2s var(--ease-out);
}
:root .web-header .web-nav .web-nav__sub a:hover {
    background: var(--le-flaeche-web); box-shadow: inset 3px 0 0 0 var(--ehbs-orange);
}
:root .web-header .web-nav .web-nav__unter a { padding: .45rem .9rem .45rem 1.9rem; font-size: .9375rem; }
:root .web-header .web-nav__unter a { color: var(--ehbs-anthracite); }
.web-nav__mehr { border-top: 1px solid var(--le-linie-web); }
.web-nav__mehr + .web-nav__mehr { border-top: 0; }
:root .web-header .web-nav__mehr a { font-weight: 600; }
/* Telefon und Anfrage-Knopf (eckig, Orange-Kante beim Hover). */
.web-header__cta { display: flex; align-items: center; gap: 1.25rem; }
:root .web-header .web-header__tel {
    display: inline-flex; align-items: center; gap: .5rem; font-weight: 600;
    white-space: nowrap; font-variant-numeric: tabular-nums;
}
.web-header__tel .web-icon { width: 18px; height: 18px; }
:root .web-header .web-btn {
    display: inline-flex; align-items: center; padding: .85rem 1.2rem;
    font-size: 1rem; font-weight: 600; line-height: 1; letter-spacing: .01em;
    background: var(--ehbs-blue); color: var(--ehbs-white);
    box-shadow: inset 0 -4px 0 0 transparent;
    transition: background-color .35s var(--ease-out), box-shadow .35s var(--ease-out);
}
:root .web-header .web-btn:hover {
    background: var(--ehbs-blue-dark); color: var(--ehbs-white);
    box-shadow: inset 0 -4px 0 0 var(--ehbs-orange);
}
@media (max-width: 1100px) { .web-header__cta .web-header__nummer { display: none; } }
/* Unter 960 px: Menüknopf statt Navigation, das Menü legt sich über den
   Inhalt und scrollt in sich. */
.web-menue { display: none; }
@media (max-width: 960px) {
    .web-header__innen { height: 72px; }
    .web-logo img { height: 42px; }
    .web-nav, .web-header__cta { display: none; }
    .web-menue { display: block; margin-left: auto; }
}
.web-menue > summary {
    list-style: none; display: grid; place-items: center; min-width: 44px; min-height: 44px;
    padding: .5rem; color: var(--ehbs-blue); cursor: pointer;
}
.web-menue > summary::-webkit-details-marker { display: none; }
.web-menue > summary .web-icon { width: 28px; height: 28px; }
.web-menue__panel {
    position: absolute; left: 0; right: 0; top: 100%;
    max-height: calc(100dvh - 72px); overflow-y: auto; overscroll-behavior: contain;
    padding: 0 clamp(1rem, .5rem + 2vw, 2rem) 1.5rem;
    background: var(--ehbs-white); box-shadow: var(--le-schatten-menue);
}
:root .web-header .web-menue__nav > ul > li > a {
    display: block; padding: .95rem 0; font-size: 1.15rem;
    border-top: 1px solid var(--le-linie-web);
}
:root .web-menue__nav .web-nav__sub { padding: 0 0 .5rem 1rem; }
:root .web-header .web-menue__nav .web-nav__sub a { display: block; padding: .55rem 0; background: none; }
.web-menue__cta {
    display: flex; align-items: center; justify-content: space-between; gap: 1.25rem;
    padding-top: 1rem; border-top: 1px solid var(--le-linie-web);
}

/* Fuß (Tokens und Schrift siehe Kopf) */
.web-footer {
    --ehbs-focus: var(--ehbs-yellow);
    margin-top: var(--space-16); padding-top: clamp(4rem, 8vw, 6.5rem);
    background: var(--ehbs-blue); color: var(--le-text-auf-blau);
    font-size: 1rem; line-height: 1.65;
}
:root .web-footer a { color: var(--ehbs-white); text-decoration: none; }
:root .web-footer a:hover {
    color: var(--ehbs-white); text-decoration: underline;
    text-decoration-color: var(--ehbs-orange); text-decoration-thickness: 1px;
}
.web-footer__grid {
    display: grid; grid-template-columns: minmax(0, 3fr) repeat(3, minmax(0, 2fr));
    gap: clamp(2rem, 4vw, 4rem);
}
.web-footer__logo { display: inline-block; }
.web-footer__logo img { height: 56px; width: auto; }
:root .web-footer .web-footer__claim {
    margin: 1.75rem 0 0; max-width: 14ch; color: var(--ehbs-white);
    font-size: clamp(1.6rem, 2.4vw, 2.25rem); font-weight: 700; line-height: 1.1; letter-spacing: -.02em;
}
:root .web-footer h2 {
    margin: 0 0 1rem; padding: 0; color: var(--ehbs-white);
    font-size: .9375rem; font-weight: 600; line-height: 1.65; letter-spacing: normal;
}
.web-footer__grid ul { display: grid; gap: .6rem; }
/* Einzug am <li>, damit umbrochene Unterpunkte eingerückt bleiben. */
:root .web-footer .web-footer__unter { padding-left: 1rem; }
:root .web-footer .web-footer__unter a { font-size: .9375rem; }
.web-footer address { font-style: normal; line-height: 1.7; }
.web-social { display: flex; gap: .75rem; margin-top: 1.5rem; }
:root .web-footer .web-social a {
    display: grid; place-items: center; width: 44px; height: 44px;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.35); transition: box-shadow .3s var(--ease-out);
}
:root .web-footer .web-social a:hover {
    text-decoration: none;
    box-shadow: inset 0 0 0 1px var(--ehbs-white), inset 0 -3px 0 0 var(--ehbs-orange);
}
.web-social .web-icon { width: 20px; height: 20px; }
.web-marken {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px;
    margin-top: clamp(3.5rem, 7vw, 5rem);
}
.web-marke { padding: 1.5rem; background: rgba(255,255,255,.06); }
.web-marke strong { display: block; font-weight: 600; color: var(--ehbs-white); }
.web-marke span { font-size: .9375rem; }
.web-footer__unten {
    display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem;
    margin-top: clamp(3rem, 6vw, 4.5rem); padding-block: 1.5rem;
    border-top: 1px solid rgba(255,255,255,.18); font-size: .9375rem;
}
.web-footer__unten ul { display: flex; flex-wrap: wrap; gap: 1.5rem; }
@media (max-width: 960px) {
    .web-footer__grid { grid-template-columns: 1fr 1fr; }
    .web-footer__grid > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 700px) { .web-marken { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .web-footer__grid { grid-template-columns: 1fr; } }

/* Ohne Akzentbalken: Hero (rot links), Hinweisboxen (links) und CTA-Band
   (rot oben) tragen ihre Gliederung über Fläche und Radius. Override statt
   Änderung, weil ehbs-modern.css unverändert aus dem Skill bleibt. */
:root :is(.ehbs-hero, .ehbs-box, .ehbs-cta-band__inner)::before { content: none; }


/* ── Schlanker Kopf des LE-Ermittlers ─────────────────────────────────────
   Logo links, rechts Zweitknopf mit Rahmen und Hauptknopf, beide mit dem
   Radius der übrigen Knöpfe. Im Assistenten nur der leise Link. */
.le-kopf__innen { justify-content: space-between; }
.le-kopf__rechts { display: flex; align-items: center; gap: clamp(.5rem, 1.5vw, 1rem); }
:root .web-header .web-btn { border-radius: var(--radius); }
:root .web-header .le-kopf__haupt { box-shadow: var(--shadow-sm); }
:root .web-header .le-kopf__haupt:hover { box-shadow: var(--shadow); }
:root .web-header .le-kopf__zweit {
    background: transparent; color: var(--ehbs-blue);
    box-shadow: inset 0 0 0 2px var(--ehbs-blue);
}
:root .web-header .le-kopf__zweit:hover {
    background: var(--ehbs-primary-tint); color: var(--ehbs-blue);
    box-shadow: inset 0 0 0 2px var(--ehbs-blue);
}
:root .web-header .le-kopf__leise {
    font-size: .9375rem; font-weight: 500; color: var(--ehbs-anthracite);
    text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--ehbs-blue) 35%, transparent);
    text-underline-offset: .25em;
}
:root .web-header .le-kopf__leise:hover { color: var(--ehbs-blue); text-decoration-color: var(--ehbs-orange); }
@media (max-width: 760px) {
    .le-kopf__innen { height: auto; min-height: 72px; flex-wrap: wrap; padding-block: .5rem; gap: .25rem 1rem; }
    .le-kopf__rechts { gap: .5rem; flex-wrap: wrap; justify-content: flex-end; }
    :root .web-header .le-kopf__zweit { display: none; }
    :root .web-header .le-kopf__leise { font-size: .875rem; }
}

/* ── Banner der Weihnachtsaktion ──────────────────────────────────────────
   Das Frontend füllt #le-banner und nimmt hidden weg. Ruhig, eine Zeile,
   auf dem Handy umbrechend, kein Alarm. */
.le-banner {
    background: var(--ehbs-primary-dark); color: var(--ehbs-text-on-dark);
    padding: .65rem clamp(1rem, 4vw, 3rem); text-align: center;
    font-size: var(--fs-small); line-height: 1.5; letter-spacing: .01em;
}
.le-banner[hidden] { display: none; }
.le-banner p { margin: 0; font-size: inherit; }
.le-banner strong { font-weight: 600; }

/* ── Gemeinsame Bausteine ─────────────────────────────────────────────── */
.le-lead { font-size: var(--fs-lg); max-width: 44rem; }
.le-sr {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.le-icon { width: 24px; height: 24px; flex: none; }
.le-icon--gross { width: 32px; height: 32px; }
.le-icon--pfeil { width: 20px; height: 20px; transition: transform var(--dur) var(--ease-out); }
.ehbs-btn:hover .le-icon--pfeil { transform: translateX(3px); }
.le-btn-gross { min-height: 56px; padding-inline: 1.6rem; font-size: 1.0625rem; gap: .6rem; }
.le-knopf { justify-content: center; text-align: center; }
.le-haken { list-style: none; margin: 0; padding: 0; }
.le-haken li { position: relative; padding-left: 2rem; margin-bottom: var(--space-3); }
.le-haken li:last-child { margin-bottom: 0; }
.le-haken li::before {
    content: ""; position: absolute; left: 0; top: .15em; width: 1.3rem; height: 1.3rem; border-radius: 50%;
    background: color-mix(in srgb, var(--ampel-green) 14%, transparent);
}
.le-haken li::after {
    content: ""; position: absolute; left: .42rem; top: .42em; width: .45rem; height: .7rem;
    border-right: 2px solid var(--ampel-green); border-bottom: 2px solid var(--ampel-green);
    transform: rotate(40deg);
}
.le-pfeil-link { font-weight: 600; }
.le-pfeil-link::after { content: " →"; }

/* ── Hero mit Grundriss ─────────────────────────────────────────────────── */
.le-hero { padding: clamp(3rem, 2rem + 4vw, 6rem) 0 clamp(3.5rem, 2rem + 5vw, 7rem); }
.le-hero {
    background:
        radial-gradient(34rem 30rem at 82% 40%, color-mix(in srgb, var(--ehbs-white) 18%, var(--ehbs-primary)) 0%, transparent 70%),
        radial-gradient(48rem 34rem at 0% 100%, color-mix(in srgb, black 35%, var(--ehbs-primary-dark)) 0%, transparent 70%),
        linear-gradient(155deg, var(--ehbs-primary-dark) 0%, var(--ehbs-primary) 48%, color-mix(in srgb, var(--ehbs-white) 6%, var(--ehbs-primary)) 100%);
    box-shadow: inset 0 -1px 0 rgba(255,255,255,.08);
}
.le-hero::after, .ehbs-cta-band__inner::after {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background-image: url("../static/korn.svg"); background-size: 160px 160px;
    opacity: .07; mix-blend-mode: overlay;
    -webkit-mask-image: none; mask-image: none; z-index: -1;
}
:root .le-hero::before {
    content: ""; position: absolute; inset: 0; width: auto; z-index: -1; pointer-events: none;
    background: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
                linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
    background-size: 56px 56px;
    -webkit-mask-image: radial-gradient(ellipse at 75% 20%, #000 0%, transparent 75%);
    mask-image: radial-gradient(ellipse at 75% 20%, #000 0%, transparent 75%);
}
@media (prefers-contrast: more) { .le-hero::after, :root .le-hero::before { display: none; } }
.le-hero__grid {
    display: grid; align-items: center; gap: clamp(2.5rem, 1rem + 4vw, 5rem);
    grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
}
.le-hero__text { max-width: 40rem; }
.le-hero__kicker {
    display: inline-block; margin: 0 0 1.5rem; padding: .35rem .8rem; border-radius: 999px; line-height: 1.35;
    font-size: var(--fs-small); font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
    color: var(--ehbs-dark); background: var(--ehbs-yellow);
}
.le-hero h1 { font-size: clamp(2.125rem, 1.3rem + 2.8vw, 3.5rem); hyphens: manual; text-wrap: balance; }
.le-hero__aktionen { margin-top: var(--space-8); }
.le-hero__fakten {
    list-style: none; margin: var(--space-10, 2.5rem) 0 0; padding: var(--space-6) 0 0;
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-4);
    border-top: 1px solid rgba(255,255,255,.18);
}
.le-hero__fakten li { margin: 0; font-size: var(--fs-small); color: rgba(255,255,255,.82); line-height: 1.45; }
.le-hero__fakten strong { display: block; color: var(--ehbs-white); font-size: 1rem; font-weight: 700; margin-bottom: .15rem; }

/* Grundriss als weißes Blatt, leicht gedreht, mit zwei Ergebnis-Chips. */
.le-plan { position: relative; margin: 0; padding: 1.5rem 1.5rem 2.25rem; }
.le-plan__blatt {
    background: var(--ehbs-white); border-radius: var(--radius-lg); padding: .9rem .9rem 1rem;
    box-shadow: 0 30px 60px -20px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.4);
    transform: rotate(-1.5deg);
}
.le-plan__kopf {
    display: flex; justify-content: space-between; gap: 1rem; margin: 0 .2rem .6rem;
    font-size: .8125rem; font-weight: 700; color: var(--ehbs-blue); letter-spacing: .02em;
}
:root .le-hero .le-plan__kopf span { color: var(--ehbs-blue); }
:root .le-hero .le-plan__kopf span + span { font-weight: 500; color: #595959; }
.le-plan__svg { display: block; width: 100%; height: auto; border-radius: var(--radius-sm); }
.le-plan__chip {
    position: absolute; margin: 0; display: inline-flex; align-items: center; gap: .55rem;
    padding: .6rem .95rem .6rem .6rem; border-radius: 999px; font-size: .9375rem; font-weight: 700;
    color: var(--ehbs-white); box-shadow: 0 14px 30px -10px rgba(0,0,0,.5);
}
.le-plan__chip span {
    display: grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 50%;
    background: rgba(255,255,255,.22); font-size: .95rem; line-height: 1;
}
.le-plan__chip--ok { background: var(--ampel-green); left: -.25rem; bottom: 4.5rem; }
.le-plan__chip--luecke { background: var(--ampel-red); right: -.75rem; top: 38%; }
@media (max-width: 960px) {
    .le-hero__grid { grid-template-columns: minmax(0, 1fr); }
    .le-plan { max-width: 560px; }
}
@media (max-width: 560px) {
    .le-hero__kicker { font-size: .75rem; letter-spacing: .04em; border-radius: 10px; }
    .le-hero__fakten { grid-template-columns: minmax(0, 1fr); gap: var(--space-3); }
    .le-plan { padding: 1rem .5rem 1.5rem; }
    .le-plan__chip { font-size: .8125rem; padding: .45rem .75rem .45rem .45rem; }
    .le-plan__chip--ok { bottom: 2.5rem; }
    .le-plan__chip--luecke { top: 36%; right: -.25rem; }
}

/* ── Für wen: vier Karten mit Symbol ─────────────────────────────────────── */
.le-zielgruppen {
    list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-6);
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
.le-ziel {
    margin: 0; position: relative; background: var(--ehbs-surface); border-radius: var(--radius-lg);
    padding: 1.75rem 1.5rem 1.6rem; box-shadow: var(--shadow); border: 1px solid var(--ehbs-line-soft);
    transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out);
}
.le-ziel::before {
    content: ""; position: absolute; left: 1.5rem; right: 1.5rem; top: 0; height: 4px;
    border-radius: 0 0 4px 4px; background: var(--ehbs-red);
}
@media (hover: hover) { .le-ziel:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); } }
.le-ziel__icon {
    display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; margin-bottom: 1.1rem;
    background: var(--ehbs-primary-tint); color: var(--ehbs-primary);
}
.le-ziel__icon .le-icon { width: 28px; height: 28px; }
.le-ziel h3 { margin: 0 0 .5rem; font-size: 1.125rem; }
.le-ziel p { margin: 0; color: var(--ehbs-text-sek); font-size: var(--fs-small); line-height: 1.55; }
@media (max-width: 1060px) { .le-zielgruppen { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .le-zielgruppen { grid-template-columns: minmax(0, 1fr); } }

/* ── Ablauf: vier Schritte mit Verbindungslinie, Zeitbox ─────────────────── */
.le-schritte {
    list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-6);
    grid-template-columns: repeat(4, minmax(0, 1fr)); position: relative;
}
.le-schritte::before {
    content: ""; position: absolute; top: 28px; left: 28px; right: 12%; height: 3px; border-radius: 3px;
    background: linear-gradient(90deg, var(--ehbs-primary) 0%, color-mix(in srgb, var(--ehbs-primary) 25%, transparent) 100%);
}
.le-schritte li { margin: 0; position: relative; }
.le-schritte__nr {
    position: relative; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%;
    margin-bottom: 1.1rem; font-size: 1.375rem; font-weight: 800; font-variant-numeric: tabular-nums;
    background: var(--ehbs-primary); color: var(--ehbs-white);
    box-shadow: 0 0 0 6px var(--ehbs-bg), var(--shadow);
}
.le-schritte li:last-child .le-schritte__nr { background: var(--ampel-green); }
.le-schritte h3 { margin: 0 0 .4rem; font-size: 1.125rem; }
.le-schritte p { margin: 0; color: var(--ehbs-text-sek); max-width: 22rem; }
@media (max-width: 960px) {
    .le-schritte { grid-template-columns: minmax(0, 1fr); gap: var(--space-6); }
    .le-schritte::before { top: 28px; bottom: 28px; left: 26px; right: auto; width: 3px; height: auto;
        background: color-mix(in srgb, var(--ehbs-primary) 35%, transparent); }
    .le-schritte li { padding-left: 4.5rem; min-height: 56px; }
    .le-schritte__nr { position: absolute; left: 0; top: 0; margin: 0; }
}

.le-zeit {
    margin-top: clamp(3rem, 2rem + 3vw, 4.5rem); display: grid; gap: clamp(1.5rem, 1rem + 2vw, 3rem);
    grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); align-items: start;
    background: var(--ehbs-tint-hinweis); border-radius: var(--radius-xl);
    padding: clamp(1.5rem, 1rem + 2vw, 2.75rem); border: 1px solid color-mix(in srgb, var(--ehbs-yellow) 45%, transparent);
}
.le-zeit__kopf { display: flex; gap: 1.1rem; align-items: flex-start; }
.le-zeit__icon {
    display: grid; place-items: center; flex: none; width: 60px; height: 60px; border-radius: 50%;
    background: var(--ehbs-yellow); color: var(--ehbs-dark);
}
.le-zeit h3 { margin: .2rem 0 .6rem; font-size: clamp(1.2rem, 1.05rem + .6vw, 1.5rem); }
.le-zeit p { margin: 0; }
.le-zeit__liste {
    background: var(--ehbs-surface); border-radius: var(--radius-lg); padding: 1.4rem 1.5rem; box-shadow: var(--shadow-sm);
}
.le-zeit__titel { font-weight: 700; margin: 0 0 1rem !important; }
@media (max-width: 960px) { .le-zeit { grid-template-columns: minmax(0, 1fr); } }

/* ── Beispiel: dunkles Band mit Galerie aller Seiten ─────────────────────── */
.le-beispiel {
    background: linear-gradient(160deg, var(--ehbs-primary-dark) 0%, var(--ehbs-primary) 100%);
    color: var(--ehbs-text-on-dark); overflow: hidden;
}
.le-beispiel .ehbs-heading, .le-beispiel h2 { color: var(--ehbs-white); }
.le-beispiel .ehbs-heading::after { background: var(--ehbs-yellow); }
.le-beispiel .le-lead { color: rgba(255,255,255,.88); }
.le-beispiel__kopf {
    display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: clamp(1.5rem, 1rem + 3vw, 4rem);
    align-items: end; margin-bottom: clamp(2rem, 1.5rem + 2vw, 3rem);
}
.le-haken--hell li { color: var(--ehbs-white); }
.le-haken--hell li::before { background: rgba(255,255,255,.16); }
.le-haken--hell li::after { border-color: var(--ehbs-yellow); }
.le-galerie {
    list-style: none; margin: 0 calc(-1 * clamp(1rem, .5rem + 2vw, 2rem)); padding: .5rem clamp(1rem, .5rem + 2vw, 2rem) 1.5rem;
    display: grid; grid-auto-flow: column; grid-auto-columns: min(78%, 620px); gap: 1.5rem;
    overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
    scrollbar-color: rgba(255,255,255,.45) transparent;
}
.le-galerie li { margin: 0; scroll-snap-align: start; }
.le-galerie__seite { margin: 0; }
.le-galerie__seite a { display: block; border-radius: var(--radius); outline-offset: 4px; }
.le-galerie__seite img {
    display: block; width: 100%; height: auto; border-radius: var(--radius);
    background: var(--ehbs-white); box-shadow: 0 24px 48px -18px rgba(0,0,0,.6);
    transition: transform var(--dur) var(--ease-out);
}
@media (hover: hover) { .le-galerie__seite a:hover img { transform: translateY(-4px); } }
.le-galerie__seite a:focus-visible { outline: 3px solid var(--ehbs-yellow); }
.le-galerie__seite figcaption { margin-top: .85rem; font-size: var(--fs-small); color: rgba(255,255,255,.85); }
.le-galerie__seite figcaption span {
    display: inline-block; margin-right: .4rem; padding: .1rem .55rem; border-radius: 999px;
    background: var(--ehbs-yellow); color: var(--ehbs-dark); font-weight: 700;
}
.le-galerie__hinweis { margin: .25rem 0 0; font-size: var(--fs-small); color: rgba(255,255,255,.7); }
@media (max-width: 960px) { .le-beispiel__kopf { grid-template-columns: minmax(0, 1fr); align-items: start; } }
@media (max-width: 560px) { .le-galerie { grid-auto-columns: 88%; } }

/* ── Grenzen und Plan-Angebot ────────────────────────────────────────────── */
.le-grenzen {
    list-style: none; margin: 0 0 clamp(2.5rem, 2rem + 2vw, 4rem); padding: 0; display: grid; gap: var(--space-6);
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.le-grenzen li {
    margin: 0; padding: 1.5rem; border-radius: var(--radius-lg); background: var(--ehbs-surface);
    border: 1px solid var(--ehbs-line-soft); box-shadow: var(--shadow-sm);
}
.le-grenzen__icon {
    display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; margin-bottom: .9rem;
    background: color-mix(in srgb, var(--ehbs-yellow) 22%, transparent); color: var(--ehbs-dark);
}
.le-grenzen h3 { margin: 0 0 .35rem; font-size: 1.0625rem; }
.le-grenzen p { margin: 0; color: var(--ehbs-text-sek); font-size: var(--fs-small); }
@media (prefers-color-scheme: dark) { .le-grenzen__icon { color: var(--ehbs-yellow); } }
@media (max-width: 860px) { .le-grenzen { grid-template-columns: minmax(0, 1fr); } }

.le-angebot {
    display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); overflow: hidden;
    border-radius: var(--radius-xl); background: var(--ehbs-surface); box-shadow: var(--shadow-lg);
    border: 1px solid var(--ehbs-line-soft);
}
.le-angebot__text { padding: clamp(1.75rem, 1.25rem + 2vw, 3rem); }
.le-angebot__kicker {
    margin: 0 0 .6rem; font-size: var(--fs-small); font-weight: 700; letter-spacing: .06em;
    text-transform: uppercase; color: var(--ehbs-red);
}
.le-angebot h3 { margin: 0 0 .8rem; font-size: clamp(1.35rem, 1.1rem + 1vw, 1.85rem); line-height: 1.2; }
.le-angebot__text > p { margin-bottom: 1.4rem; }
.le-angebot__preise {
    display: flex; flex-direction: column; gap: 1rem; justify-content: center;
    padding: clamp(1.75rem, 1.25rem + 2vw, 3rem);
    background: linear-gradient(160deg, var(--ehbs-primary-dark) 0%, var(--ehbs-primary) 100%);
    color: var(--ehbs-white);
}
.le-preis {
    border-radius: var(--radius-lg); padding: 1.1rem 1.25rem; background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.16);
}
.le-preis--haupt { background: var(--ehbs-white); color: var(--ehbs-dark); border-color: transparent; }
.le-preis p { margin: 0; }
.le-preis__name { font-weight: 700; font-size: .9375rem; }
.le-preis__betrag { font-size: clamp(2rem, 1.6rem + 1.4vw, 2.6rem); font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.le-preis--haupt .le-preis__betrag { color: var(--ehbs-blue); }
.le-preis__betrag span { font-size: 1rem; font-weight: 600; letter-spacing: 0; opacity: .75; }
.le-preis__info { font-size: var(--fs-small); color: #595959; }
.le-angebot__preise .ehbs-btn--primary { background: var(--ehbs-yellow); color: var(--ehbs-dark); margin-top: .25rem; }
.le-angebot__preise .ehbs-btn--primary:hover { background: color-mix(in srgb, var(--ehbs-yellow) 85%, var(--ehbs-white)); color: var(--ehbs-dark); }
@media (max-width: 960px) { .le-angebot { grid-template-columns: minmax(0, 1fr); } }

/* ── Zu aufwendig: blaues Panel ──────────────────────────────────────────── */
.le-uebernahme {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 1rem + 3vw, 4rem);
    align-items: center; border-radius: var(--radius-xl); padding: clamp(2rem, 1.25rem + 3vw, 4rem);
    background:
        radial-gradient(30rem 20rem at 100% 0%, color-mix(in srgb, var(--ehbs-white) 14%, var(--ehbs-primary)) 0%, transparent 70%),
        linear-gradient(150deg, var(--ehbs-primary-dark) 0%, var(--ehbs-primary) 100%);
    color: var(--ehbs-white); box-shadow: var(--shadow-lg);
}
.le-uebernahme h2 { color: var(--ehbs-white); }
.le-uebernahme .ehbs-heading::after { background: var(--ehbs-yellow); }
.le-uebernahme .le-lead { color: rgba(255,255,255,.9); margin-bottom: 1.75rem; }
.le-uebernahme__schritte { list-style: none; margin: 0; padding: 0; display: grid; gap: .9rem; }
.le-uebernahme__schritte li {
    margin: 0; display: flex; gap: 1rem; align-items: flex-start; padding: 1.1rem 1.2rem;
    border-radius: var(--radius-lg); background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14);
}
.le-uebernahme__schritte li > span {
    flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
    background: var(--ehbs-yellow); color: var(--ehbs-dark); font-weight: 800;
}
.le-uebernahme__schritte h3 { margin: 0 0 .2rem; font-size: 1.0625rem; color: var(--ehbs-white); }
.le-uebernahme__schritte p { margin: 0; font-size: var(--fs-small); color: rgba(255,255,255,.82); }
@media (max-width: 960px) { .le-uebernahme { grid-template-columns: minmax(0, 1fr); } }

/* ── Über die EHBS mit Foto ──────────────────────────────────────────────── */
.le-ueber {
    display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
    gap: clamp(2rem, 1rem + 4vw, 5rem); align-items: center;
}
.le-ueber__bild { margin: 0; }
.le-ueber__bild img {
    display: block; width: 100%; height: auto; border-radius: var(--radius-xl);
    background:
        radial-gradient(70% 60% at 50% 35%, color-mix(in srgb, var(--ehbs-white) 22%, var(--ehbs-primary)) 0%, transparent 75%),
        linear-gradient(170deg, var(--ehbs-primary) 0%, var(--ehbs-primary-dark) 100%);
    box-shadow: var(--shadow-lg);
}
.le-ueber__bild figcaption { margin-top: .75rem; font-size: var(--fs-small); color: var(--ehbs-text-sek); text-align: center; }
.le-ueber__zahlen {
    list-style: none; margin: 1.75rem 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem;
}
.le-ueber__zahlen li {
    margin: 0; padding: 1rem 1.1rem; border-radius: var(--radius-lg); background: var(--ehbs-surface);
    border: 1px solid var(--ehbs-line-soft); box-shadow: var(--shadow-sm);
}
.le-ueber__zahlen strong { display: block; font-size: 1.25rem; font-weight: 800; color: var(--ehbs-primary); }
.le-ueber__zahlen span { font-size: var(--fs-small); color: var(--ehbs-text-sek); }
@media (prefers-color-scheme: dark) { .le-ueber__zahlen strong { color: var(--ehbs-yellow); } }
@media (max-width: 860px) { .le-ueber { grid-template-columns: minmax(0, 1fr); } .le-ueber__bild { max-width: 460px; } }
@media (max-width: 480px) { .le-ueber__zahlen { grid-template-columns: minmax(0, 1fr); } }

/* ── Häufige Fragen ──────────────────────────────────────────────────────── */
.le-faq { max-width: 52rem; }
.le-faq__liste { display: grid; gap: .75rem; }
.le-frage {
    border-radius: var(--radius-lg); background: var(--ehbs-surface); border: 1px solid var(--ehbs-line);
    padding: 0 1.25rem; transition: box-shadow var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out);
}
.le-frage[open] { box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--ehbs-primary) 35%, var(--ehbs-line)); }
.le-frage summary {
    list-style: none; cursor: pointer; padding: 1.1rem 2.5rem 1.1rem 0;
    font-weight: 600; position: relative; transition: color var(--dur-fast) var(--ease-out);
}
.le-frage summary::-webkit-details-marker { display: none; }
.le-frage summary::after {
    content: ""; position: absolute; right: .5rem; top: 50%; width: .6rem; height: .6rem;
    border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
    transform: translateY(-70%) rotate(45deg); transition: transform var(--dur) var(--ease-out);
}
.le-frage[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.le-frage summary:hover { color: var(--ehbs-primary); }
.le-frage summary:focus-visible { outline: 3px solid var(--ehbs-focus); outline-offset: 2px; border-radius: 4px; }
.le-frage p { margin: 0 0 1.1rem; max-width: 44rem; color: var(--ehbs-text-sek); }
@media (prefers-color-scheme: dark) { .le-frage summary:hover { color: var(--ehbs-yellow); } }

@media (prefers-reduced-motion: reduce) {
    .le-ziel, .le-galerie__seite img, .le-icon--pfeil { transition: none; }
    .le-ziel:hover, .le-galerie__seite a:hover img { transform: none; }
}


/* ── Nachbesserungen nach der Gestaltungsprüfung (12.11.2026) ─────────────── */
/* Tippflächen im Kopf mindestens 44 px. */
:root .web-header .le-kopf__haupt, :root .web-header .le-kopf__zweit { min-height: 44px; }
.le-pfeil-link { display: inline-block; padding-block: .6rem; }

/* Für wen: ohne roten Streifen, ruhiger, auf dem Handy kompakt als Zeile. */
.le-ziel::before { display: none; }
@media (max-width: 560px) {
    .le-ziel { display: grid; grid-template-columns: 48px minmax(0, 1fr); column-gap: 1rem; padding: 1.1rem 1.1rem 1.2rem; }
    .le-ziel__icon { grid-row: span 2; width: 48px; height: 48px; margin: 0; }
    .le-ziel h3 { margin-top: .15rem; }
}

/* Grundriss-Chips: verdecken keine Raumnamen. */
.le-plan__chip--ok { left: -.75rem; bottom: auto; top: 44%; }
.le-plan__chip--luecke { right: -.75rem; top: 22%; }
@media (max-width: 560px) {
    .le-plan__chip--ok { top: 28%; left: -.25rem; }
    .le-plan__chip--luecke { top: 18%; right: -.25rem; }
}

/* Handy: Knöpfe im Hero in voller Breite. */
@media (max-width: 560px) {
    .le-hero__aktionen .ehbs-btn, .le-uebernahme .ehbs-btn, .le-abschluss .ehbs-btn { width: 100%; justify-content: center; }
}

/* Galerie: Seiten groß genug, dass die Tabellen lesbar sind. */
.le-galerie { grid-auto-columns: min(86%, 900px); }
@media (max-width: 560px) { .le-galerie { grid-auto-columns: 92%; } }

/* Angebot: Knopf auf Blau weiß wie alle Hauptknöpfe auf dunklem Grund. */
.le-angebot__text h3 { margin-top: 0; }
.le-angebot__preise .le-knopf { margin-top: .25rem; white-space: normal; text-align: left; justify-content: space-between; }

/* Grenzen kompakt unter dem Angebot. */
.le-grenzen__titel { margin: clamp(2.5rem, 2rem + 2vw, 3.5rem) 0 1.25rem; font-size: 1.25rem; }
.le-grenzen { margin-bottom: 0; }
.le-grenzen li { display: flex; gap: 1rem; align-items: flex-start; padding: 1.25rem; }
.le-grenzen__icon { flex: none; margin: 0; }
.le-grenzen h4 { margin: .1rem 0 .3rem; font-size: 1rem; }

/* Dunkles Farbschema: Kicker und Ziel-Symbole gut lesbar. */
@media (prefers-color-scheme: dark) {
    .le-ziel__icon { color: var(--ehbs-yellow); }
}

/* Schlussaufruf vor dem Fuß. */
.le-abschluss { padding-block: clamp(2.5rem, 2rem + 2vw, 4rem); background: var(--ehbs-bg-soft); }
.le-abschluss__innen {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem 2rem;
    border-radius: var(--radius-xl); padding: clamp(1.75rem, 1.25rem + 2vw, 2.75rem) clamp(1.5rem, 1rem + 3vw, 3.5rem);
    background: linear-gradient(150deg, var(--ehbs-primary-dark) 0%, var(--ehbs-primary) 100%); color: var(--ehbs-white);
    box-shadow: var(--shadow-lg);
}
.le-abschluss__titel { margin: 0 0 .35rem; color: var(--ehbs-white); font-size: clamp(1.35rem, 1.1rem + 1vw, 1.9rem); }
.le-abschluss p { margin: 0; color: rgba(255,255,255,.85); }


/* ── Zweite Runde nach Durchsicht Thomas (12.11.2026) ─────────────────────── */
/* Weniger Weißraum zwischen den Abschnitten der Startseite. */
.le-seite--start .ehbs-section { padding-block: clamp(2.75rem, 2rem + 2.5vw, 4.25rem); }
.le-seite--start .ehbs-section__intro { margin-bottom: clamp(1.5rem, 1.2rem + 1vw, 2.25rem); }
.le-seite--start .ehbs-section__intro .le-lead { margin-bottom: 0; }
.le-hero { padding: clamp(2.5rem, 1.75rem + 3vw, 4.5rem) 0 clamp(3rem, 2rem + 3.5vw, 5rem); }
.le-zeit { margin-top: clamp(2rem, 1.5rem + 2vw, 3rem); }
.le-abschluss { padding-block: clamp(2rem, 1.5rem + 1.5vw, 3rem); }
.le-uebernahme-abschnitt { padding-block: clamp(2rem, 1.5rem + 2vw, 3.25rem); }

/* Für wen: farbig hinterlegt, beim Überfahren kräftiger. */
.le-ziel {
    background: var(--ehbs-primary-tint); border-color: color-mix(in srgb, var(--ehbs-primary) 14%, transparent);
    box-shadow: none; transition: background-color var(--dur) var(--ease-out), transform var(--dur) var(--ease-out),
        box-shadow var(--dur) var(--ease-out), color var(--dur) var(--ease-out);
}
.le-ziel__icon { background: var(--ehbs-white); transition: background-color var(--dur) var(--ease-out), color var(--dur) var(--ease-out); }
.le-ziel p { color: var(--ehbs-text); opacity: .78; }
@media (hover: hover) {
    .le-ziel:hover { background: var(--ehbs-primary); color: var(--ehbs-white); box-shadow: var(--shadow-lg); }
    .le-ziel:hover h3, .le-ziel:hover p { color: var(--ehbs-white); }
    .le-ziel:hover p { opacity: .88; }
    .le-ziel:hover .le-ziel__icon { background: var(--ehbs-yellow); color: var(--ehbs-dark); }
}
@media (prefers-color-scheme: dark) {
    .le-ziel { background: var(--ehbs-surface); }
    .le-ziel__icon { background: var(--ehbs-primary-tint); }
}

/* Zeitbedarf: deutlich gelb hinterlegt. */
.le-zeit {
    background: color-mix(in srgb, var(--ehbs-yellow) 34%, var(--ehbs-white));
    border: 2px solid var(--ehbs-yellow);
}
@media (prefers-color-scheme: dark) {
    .le-zeit { background: color-mix(in srgb, var(--ehbs-yellow) 18%, var(--ehbs-bg)); }
}

/* Galerie: eine große Seite, Vorschaubilder darunter zum Anklicken, kein Querscrollen. */
.le-galerie {
    display: block; overflow: visible; margin: 0; padding: 0;
    grid-auto-flow: initial; grid-auto-columns: initial; scroll-snap-type: none;
}
.le-galerie__buehne { max-width: 980px; margin: 0 auto; }
.le-galerie__gross { display: none; margin: 0; }
#le-seite-1:checked ~ .le-galerie__buehne .le-galerie__gross--1,
#le-seite-2:checked ~ .le-galerie__buehne .le-galerie__gross--2,
#le-seite-5:checked ~ .le-galerie__buehne .le-galerie__gross--5,
#le-seite-6:checked ~ .le-galerie__buehne .le-galerie__gross--6 { display: block; }
.le-galerie__gross a { display: block; border-radius: var(--radius); }
.le-galerie__gross a:focus-visible { outline: 3px solid var(--ehbs-yellow); outline-offset: 4px; }
.le-galerie__gross img {
    display: block; width: 100%; height: auto; border-radius: var(--radius);
    background: var(--ehbs-white); box-shadow: 0 30px 60px -22px rgba(0,0,0,.65);
}
.le-galerie__gross figcaption { margin-top: .9rem; font-size: var(--fs-small); color: rgba(255,255,255,.88); text-align: center; }
.le-galerie__gross figcaption span {
    display: inline-block; margin-right: .4rem; padding: .1rem .55rem; border-radius: 999px;
    background: var(--ehbs-yellow); color: var(--ehbs-dark); font-weight: 700;
}
.le-galerie__daumen {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem;
    max-width: 980px; margin: 1.5rem auto 0;
}
.le-galerie__daumen label {
    position: relative; display: block; cursor: pointer; border-radius: var(--radius-sm); padding: 4px;
    background: rgba(255,255,255,.08); box-shadow: inset 0 0 0 2px rgba(255,255,255,.18);
    transition: box-shadow var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
}
.le-galerie__daumen img { display: block; width: 100%; height: auto; border-radius: 4px; background: var(--ehbs-white); opacity: .7; transition: opacity var(--dur) var(--ease-out); }
.le-galerie__daumen span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
@media (hover: hover) { .le-galerie__daumen label:hover { transform: translateY(-2px); } .le-galerie__daumen label:hover img { opacity: 1; } }
#le-seite-1:checked ~ .le-galerie__daumen .le-galerie__daumen--1,
#le-seite-2:checked ~ .le-galerie__daumen .le-galerie__daumen--2,
#le-seite-5:checked ~ .le-galerie__daumen .le-galerie__daumen--5,
#le-seite-6:checked ~ .le-galerie__daumen .le-galerie__daumen--6 { box-shadow: inset 0 0 0 3px var(--ehbs-yellow); }
#le-seite-1:checked ~ .le-galerie__daumen .le-galerie__daumen--1 img,
#le-seite-2:checked ~ .le-galerie__daumen .le-galerie__daumen--2 img,
#le-seite-5:checked ~ .le-galerie__daumen .le-galerie__daumen--5 img,
#le-seite-6:checked ~ .le-galerie__daumen .le-galerie__daumen--6 img { opacity: 1; }
#le-seite-1:focus-visible ~ .le-galerie__daumen .le-galerie__daumen--1,
#le-seite-2:focus-visible ~ .le-galerie__daumen .le-galerie__daumen--2,
#le-seite-5:focus-visible ~ .le-galerie__daumen .le-galerie__daumen--5,
#le-seite-6:focus-visible ~ .le-galerie__daumen .le-galerie__daumen--6 { outline: 3px solid var(--ehbs-white); outline-offset: 3px; }
.le-galerie__hinweis { display: none; }
@media (max-width: 560px) { .le-galerie__daumen { gap: .5rem; } }

/* Angebot: linke Seite leicht blau hinterlegt. */
.le-angebot__text { background: var(--ehbs-primary-tint); }
@media (prefers-color-scheme: dark) { .le-angebot__text { background: var(--ehbs-surface); } }

/* Grenzen: Symbole in Leitfarbe statt hellem Gelb. */
.le-grenzen__icon { background: var(--ehbs-primary); color: var(--ehbs-white); }
@media (prefers-color-scheme: dark) { .le-grenzen__icon { background: var(--ehbs-primary-tint); color: var(--ehbs-yellow); } }

/* Foto ohne Hintergrundfläche, freigestellt auf dem Abschnittsgrund. */
.le-ueber__bild { display: flex; flex-direction: column; align-items: center; }
.le-ueber__bild img { background: none; box-shadow: none; border-radius: 0; width: auto; max-width: 100%; max-height: 640px; }
.le-ueber__bild figcaption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.le-ueber-abschnitt { padding-bottom: 0 !important; }
.le-ueber { align-items: end; }
.le-ueber__bild figcaption { margin-bottom: 1.25rem; }
.le-ueber__text { padding-bottom: clamp(2.75rem, 2rem + 2.5vw, 4.25rem); }

/* Querformat-Foto (Polo, heller Flur): Überschrift über beide Spalten,
   darunter Bild und Text auf gleicher Höhe. Das Bild steht auf der
   Unterkante, auf dem Handy unter dem Text. */
.le-ueber {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
    grid-template-areas: "kopf zahlen" "bild text";
    row-gap: clamp(1.25rem, .75rem + 1.5vw, 2rem); align-items: end;
}
.le-ueber__kopf { grid-area: kopf; margin: 0; align-self: end; }
.le-ueber .le-ueber__zahlen { grid-area: zahlen; margin: 0; align-self: end; gap: .75rem; }
.le-ueber .le-ueber__zahlen li { padding: .85rem 1rem; }
.le-ueber .le-ueber__zahlen span { white-space: nowrap; }
.le-ueber__bild { grid-area: bild; justify-content: flex-end; }
.le-ueber__bild img { width: 100%; max-width: none; max-height: none; }
.le-ueber__text { grid-area: text; align-self: end; padding-top: 0; }
.le-ueber__text > .le-lead:first-child { margin-top: 0; }
@media (prefers-color-scheme: dark) {
    /* Dunkle Polos heben sich sonst nicht vom dunklen Grund ab. */
    .le-ueber__bild {
        background: radial-gradient(60% 70% at 50% 72%, color-mix(in srgb, var(--ehbs-white) 30%, transparent) 0%,
            color-mix(in srgb, var(--ehbs-white) 10%, transparent) 45%, transparent 72%);
    }
}
@media (max-width: 1100px) {
    .le-ueber { grid-template-columns: minmax(0, 1fr); grid-template-areas: "kopf" "text" "zahlen" "bild"; }
    .le-ueber .le-ueber__zahlen span { white-space: normal; }
}
@media (max-width: 480px) {
    .le-ueber .le-ueber__zahlen { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
    .le-ueber .le-ueber__zahlen li { padding: .7rem .65rem; }
    .le-ueber .le-ueber__zahlen strong { font-size: 1rem; }
    .le-ueber .le-ueber__zahlen span { font-size: .75rem; line-height: 1.3; display: block; }
    .le-ueber__bild { max-width: 520px; width: 100%; margin-inline: auto; }
    .le-ueber__text { padding-bottom: 0; }
}

/* ── Assistent-Seite: Rahmen um die Karte ─────────────────────────────── */
.le-assistent { background: var(--ehbs-bg-soft); padding: var(--section-y) clamp(1rem, .5rem + 2vw, 2rem); }
.le-assistent__karte { width: 100%; max-width: 920px; margin: 0 auto; }
.le-noscript { margin: 0; }

/* ── Scrollgebundene Einblendungen (nur Startseite) ───────────────────────
   Nur die Akzentlinie unter den Überschriften, Inhalte bleiben immer sichtbar. */
@supports (animation-timeline: view()) {
    @media (prefers-reduced-motion: no-preference) {
        .le-seite--start .ehbs-section .ehbs-heading { view-timeline-name: --le-kopf; }
        .le-seite--start .ehbs-section .ehbs-heading::after {
            animation: ehbs-line linear both; animation-timeline: --le-kopf;
            animation-range: entry 60% cover 40%;
        }
    }
}

/* ── Bezahlter Zugang (#133): Preis, Kauf- und Buchungsseite ─────────── */
.le-preis__hinweis, .le-assistent__hinweis {
    font-size: var(--fs-small); color: var(--ehbs-text-sek); max-width: 44rem;
    border-left: 3px solid var(--ehbs-yellow); padding: .25rem 0 .25rem .9rem;
}
.le-assistent__hinweis { margin: 0 auto 1rem; max-width: 920px; box-sizing: border-box; width: 100%; }
.le-preis-abschnitt h3 { margin-top: var(--space-6); font-size: 1.15rem; }
.le-kauf { padding: clamp(2rem, 1.5rem + 3vw, 4rem) 0; background: var(--ehbs-surface); }
.le-kauf__innen { max-width: 42rem; }
.le-kauf__kicker { color: var(--ehbs-primary); font-weight: 600; margin: 0 0 .5rem; }
.le-kauf__lead { font-size: var(--fs-lg); margin-bottom: 1.5rem; }
.le-kauf__hinweis {
    background: var(--ehbs-primary-tint); border-radius: var(--radius); padding: .8rem 1rem;
}
.le-kauf__fehler {
    border: 1px solid var(--ehbs-orange); border-radius: var(--radius); padding: .8rem 1rem; margin-bottom: 1rem;
    background: color-mix(in srgb, var(--ehbs-orange) 8%, var(--ehbs-white));
}
.le-kauf__fehler p, .le-kauf__fehler ul { margin: 0; }
.le-kauf__fehler ul { padding-left: 1.2rem; }
.le-kauf__formular {
    background: var(--ehbs-white); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
    padding: clamp(1.25rem, 1rem + 2vw, 2rem); display: grid; gap: 1.25rem;
}
.le-kauf__formular fieldset {
    border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: .9rem 1rem; grid-template-columns: 8rem minmax(0, 1fr);
}
.le-kauf__formular legend { font-weight: 600; margin-bottom: .6rem; padding: 0; }
.le-kauf__feld { display: grid; gap: .3rem; grid-column: 1 / -1; }
.le-kauf__feld--plz { grid-column: 1; }
.le-kauf__feld--ort { grid-column: 2; }
.le-kauf__feld span { font-size: var(--fs-small); font-weight: 600; }
.le-kauf__feld input, .le-kauf__feld textarea {
    font: inherit; padding: .65rem .8rem; border: 1px solid var(--ehbs-line); border-radius: var(--radius);
    width: 100%; min-width: 0; box-sizing: border-box;
    background: var(--ehbs-white); min-height: 2.75rem;
}
.le-kauf__feld input:focus-visible, .le-kauf__feld textarea:focus-visible {
    outline: 2px solid var(--ehbs-primary); outline-offset: 1px; border-color: var(--ehbs-primary);
}
.le-kauf__haken { display: flex; gap: .7rem; align-items: flex-start; font-size: var(--fs-small); }
.le-kauf__haken input { width: 1.2rem; height: 1.2rem; margin-top: .15rem; flex: none; }
.le-kauf__klein { font-size: var(--fs-small); color: var(--ehbs-text-sek); margin: 0; }
.le-kauf h2 { font-size: 1.15rem; margin-top: 1.5rem; }
@media (max-width: 520px) {
    .le-kauf__formular fieldset { grid-template-columns: 1fr; }
    .le-kauf__feld--plz, .le-kauf__feld--ort { grid-column: 1; }
}

/* Preisliste, Abschluss mit zwei Knöpfen, Nutzungsbedingungen (Issue #133, Texte vom 15.11.2026). */
.le-preise__titel { margin: 0; font-size: 1.25rem; color: var(--ehbs-white); }
.le-angebot__preise > .le-preis__info { color: color-mix(in srgb, var(--ehbs-white) 85%, transparent); }
.le-abschluss__knoepfe { display: flex; flex-wrap: wrap; gap: .75rem; }
.le-nutzung { padding-left: 1.25rem; }
.le-nutzung li { margin-bottom: .5rem; }
.le-preis:not(.le-preis--haupt) .le-preis__info { color: color-mix(in srgb, var(--ehbs-white) 82%, transparent); }
.le-preis__betrag--text { font-size: 1.5rem; }
.le-preis-abschnitt .le-haken + p { margin-top: var(--space-4, 1rem); }
.le-angebot__preise .le-preise__titel { margin-top: 0; }

/* ── Hero: Nebenlink unter den Knöpfen (Nachtrag #133) ───────────────────── */
.le-hero__nebenlink { margin: var(--space-3) 0 0; font-size: var(--fs-small); }
.le-hero__nebenlink a { color: rgba(255,255,255,.86); text-underline-offset: .2em; }
.le-hero__nebenlink a:hover { color: var(--ehbs-white); }

/* ── LE-Rechner Lite (Nachtrag #133) ─────────────────────────────────────── */
.le-lite__wahl { display: flex; flex-wrap: wrap; gap: .4rem 1.5rem; align-items: center; }
.le-lite__wahl > span { flex-basis: 100%; }
.le-lite__tabelle4 { grid-column: 1 / -1; margin: 0; font-size: var(--fs-small); color: var(--ehbs-text-sek); }
.le-lite__ergebnis { margin-top: 2rem; }
.le-lite__titel { font-size: 1.15rem; margin: 0 0 .75rem; }
.le-lite__angaben { color: var(--ehbs-text-sek); margin: 0 0 1rem; }
.le-lite__zahlen { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.le-lite__zahlen p {
  margin: 0; padding: 1rem 1.25rem; border-radius: 12px; background: var(--ehbs-white);
  border: 1px solid color-mix(in srgb, var(--ehbs-primary) 18%, transparent);
  display: grid; gap: .2rem;
}
.le-lite__zahlen strong {
  font-size: clamp(2rem, 1.6rem + 2vw, 2.75rem); line-height: 1; color: var(--ehbs-primary);
  font-variant-numeric: tabular-nums;
}
.le-lite__zahlen span { font-size: var(--fs-small); }
.le-lite__drucken { margin: 1rem 0 2rem; }
.le-lite__tabelle { overflow-x: auto; margin-bottom: 1.25rem; }
.le-lite__tabelle table { width: 100%; border-collapse: collapse; font-size: var(--fs-small); }
.le-lite__tabelle th, .le-lite__tabelle td {
  text-align: left; padding: .55rem .6rem; border-bottom: 1px solid color-mix(in srgb, var(--ehbs-text) 12%, transparent);
  vertical-align: top;
}
.le-lite__tabelle thead th { font-weight: 700; }
.le-lite__tabelle tbody th { font-weight: 600; }
@media (max-width: 34rem) {
  .le-lite__zahlen { grid-template-columns: 1fr; }
  .le-lite .le-btn-gross { width: 100%; justify-content: center; }
}

/* Schlichte Druckansicht ohne EHBS-Vorlage: nur Angaben, Ergebnis und Hinweis. */
@media print {
  .le-seite--lite .le-kopf, .le-seite--lite footer, .le-seite--lite .ehbs-skip,
  .le-seite--lite .le-lite__formular, .le-seite--lite .le-lite__drucken,
  .le-seite--lite .le-lite__vergleich, .le-seite--lite .le-banner { display: none !important; }
  .le-seite--lite, .le-seite--lite .le-kauf { background: #fff; color: #000; padding: 0; }
  .le-seite--lite .le-lite__zahlen p { border-color: #999; background: #fff; }
  .le-seite--lite .le-lite__zahlen strong { color: #000; }
}
/* ── Wizard im Testbereich ──────────────────────────────────────────────────
   Nachfolger der Widget-Regeln aus shared/theme.py. Die Maße kommen aus dem
   gemessenen Streamlit-1.58-Stand (Parity-Baseline): Die Karte ist ein
   senkrechter Stapel mit 1rem Abstand wie Streamlits stVerticalBlock, jedes
   Kind entspricht einem stElementContainer. Wo Streamlit Abstände über
   negative Ränder seiner Markdown-Container setzt (Überschriften, Linien),
   steht hier dieselbe Summe als Rand am Element.
   Farben nur aus den Tokens von ehbs-modern.css; wo Streamlit eigene
   Mischungen rechnete (Hinweisboxen, Kopf des offenen Aufklappbereichs),
   stehen die gemessenen Werte.
   Hell/Dunkel über prefers-color-scheme wie die übrige Seite. */

@font-face {
    /* Teilmenge mit den Ligaturen des Wizards (static/fonts/LICENSE-MaterialSymbols.txt) */
    font-family: "Material Symbols Rounded"; font-style: normal; font-weight: 400; font-display: block;
    src: url("../static/fonts/material-symbols-rounded.woff2") format("woff2");
}

:root {
    /* Feldrahmen: Anthrazit, im Dunklen der Nebentextton (wie .ehbs-field). */
    --lw-feldrand: var(--ehbs-anthracite);
    --lw-abstand: 1rem;
    /* Hinweisboxen und roter Hinweistext wie Streamlits Ampelfarben (config.toml) */
    --lw-rot-text: rgb(129, 39, 29);
    --lw-box-fehler-bg: rgba(192, 57, 43, .1);   --lw-box-fehler-text: rgb(129, 39, 29);
    --lw-box-erfolg-bg: rgba(46, 125, 50, .1);   --lw-box-erfolg-text: rgb(26, 71, 28);
    --lw-box-info-bg: rgba(28, 131, 255, .1);    --lw-box-info-text: rgb(0, 84, 163);
    --lw-box-warnung-bg: rgba(255, 255, 18, .1); --lw-box-warnung-text: rgb(146, 108, 5);
    --lw-aufklapp-kopf-offen: rgb(250, 251, 253);
    --lw-checkbox-bg: var(--ehbs-bg);
    --lw-hilfe-farbe: rgba(0, 0, 0, .6);
    /* Platzhalter: Streamlits Regel schlug die aus theme.py (Text 60 %) */
    --lw-platzhalter: rgba(0, 0, 0, .6);
}
@media (prefers-color-scheme: dark) {
    :root {
        --lw-feldrand: var(--ehbs-text-sek);
        --lw-rot-text: rgb(246, 184, 177);
        --lw-box-fehler-bg: rgba(239, 122, 109, .2); --lw-box-fehler-text: rgb(246, 184, 177);
        --lw-box-erfolg-bg: rgba(46, 125, 50, .2);   --lw-box-erfolg-text: rgb(67, 182, 73);
        --lw-box-info-bg: rgba(61, 157, 243, .2);    --lw-box-info-text: rgb(61, 157, 243);
        --lw-box-warnung-bg: rgba(255, 255, 18, .2); --lw-box-warnung-text: rgb(255, 255, 194);
        --lw-aufklapp-kopf-offen: rgb(16, 21, 51);
        --lw-checkbox-bg: rgb(15, 20, 51);
        --lw-hilfe-farbe: rgba(255, 255, 255, .6);
        --lw-platzhalter: rgba(255, 255, 255, .6);
    }
}

/* ── Karte ───────────────────────────────────────────────────────────────── */
.lw-testkarte {
    position: relative; width: 100%; max-width: 920px; margin: 0 auto;
    display: flex; flex-direction: column; gap: var(--lw-abstand);
    background: var(--ehbs-surface); border: 1px solid var(--ehbs-line-soft);
    border-radius: var(--radius-xl); box-shadow: var(--shadow-lg);
    padding: clamp(1.25rem, .75rem + 2vw, 2.75rem);
    color: var(--ehbs-text);
}
.lw-testkarte::before {
    content: ""; position: absolute; top: -1px; left: clamp(1.25rem, .75rem + 2vw, 2.75rem);
    width: 64px; height: 3px; border-radius: 0 0 3px 3px; background: var(--ehbs-primary);
}
@media (prefers-color-scheme: dark) {
    .lw-testkarte { border-color: var(--ehbs-line); }
    .lw-testkarte::before { background: var(--ehbs-yellow); }
}
.lw-noscript { margin: 0; }

/* Senkrechter Stapel in Spalten, Aufklappbereichen und im Formular */
.lw-stapel { display: flex; flex-direction: column; gap: var(--lw-abstand); min-width: 0; }

/* ── Fortschrittsanzeige (Port von landing.stepper) ─────────────────────── */
.lw-stepper {
    list-style: none; margin: 0; padding: 0;
    display: grid; gap: var(--space-2); grid-template-columns: repeat(4, minmax(0, 1fr));
}
.lw-stepper > li {
    margin: 0; display: flex; align-items: center; gap: var(--space-3); min-width: 0;
    font-size: var(--fs-small); font-weight: 600; color: var(--ehbs-text-sek);
}
.lw-stepper > li:not(:last-child)::after {
    content: ""; flex: 1 1 auto; min-width: 12px; height: 2px; border-radius: 1px; background: var(--ehbs-line);
}
.lw-stepper > li.is-done::after { background: var(--ehbs-primary); }
.lw-stepper > li.is-current, .lw-stepper > li.is-done { color: var(--ehbs-text); }
.lw-stepper__nr {
    flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
    border: 1.5px solid var(--ehbs-line); background: var(--ehbs-surface); color: var(--ehbs-text-sek);
    font-variant-numeric: tabular-nums; font-weight: 650;
}
.lw-stepper__nr img { width: 16px; height: 16px; }
.is-done .lw-stepper__nr, .is-current .lw-stepper__nr {
    background: var(--ehbs-primary); border-color: var(--ehbs-primary); color: var(--ehbs-text-on-dark);
}
.is-current .lw-stepper__nr { box-shadow: 0 0 0 4px color-mix(in srgb, var(--ehbs-primary) 16%, transparent); }
.lw-stepper__label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (prefers-color-scheme: dark) {
    .is-done .lw-stepper__nr, .is-current .lw-stepper__nr {
        background: var(--ehbs-yellow); border-color: var(--ehbs-yellow); color: #000;
    }
    .is-done .lw-stepper__nr img { filter: brightness(0); }
    .lw-stepper > li.is-done::after { background: var(--ehbs-yellow); }
    .is-current .lw-stepper__nr { box-shadow: 0 0 0 4px color-mix(in srgb, var(--ehbs-yellow) 22%, transparent); }
}

/* "Schritt N von 4": für Screenreader immer im DOM, sichtbar nur schmal.
   absolute nimmt sie wie Streamlits Elementcontainer aus dem Stapel. */
.lw-fortschritt {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip-path: inset(50%); white-space: nowrap;
}
.lw-fortschritt__text { margin: 0; font-size: var(--fs-small); font-weight: 400; line-height: normal; }
@media (max-width: 640px) {
    .lw-stepper__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
    .lw-fortschritt {
        position: static; width: auto; height: auto; overflow: visible; clip-path: none;
        align-self: flex-start; padding-bottom: var(--space-2);
    }
}

/* ── Linien, Überschriften, Text ─────────────────────────────────────────── */
/* Streamlit: 24px Rand, Container -16px nach unten. */
.lw-trenner {
    border: 0; border-top: 1px solid var(--ehbs-line-soft); height: 0; overflow: hidden;
    margin: var(--space-6) 0 calc(var(--space-6) - var(--lw-abstand));
}
@media (prefers-color-scheme: dark) { .lw-trenner { border-top-color: var(--ehbs-line); } }

/* Zwischenüberschriften mit Akzentlinie wie .ehbs-heading */
.lw-ueberschrift {
    font-size: 1.375rem; font-weight: 650; line-height: 1.2; letter-spacing: var(--tracking-head);
    color: var(--ehbs-text); position: relative;
    padding: 0 0 var(--space-3); margin: 0 0 calc(var(--space-2) - var(--lw-abstand));
}
.lw-ueberschrift::after {
    content: ""; position: absolute; left: 0; bottom: 0; width: 48px; height: 3px;
    border-radius: 2px; background: var(--ehbs-accent-line);
}

/* position: relative wie Streamlits stElementContainer: sonst unsichtbar,
   aber Chrome nimmt die Caption dann wie dort in die Compositing-Ebene eines
   fokussierten Felds darüber auf (gleiche Graustufen-Glättung, Zustand w16). */
.lw-caption {
    position: relative; margin: 0; font-size: var(--fs-small); line-height: 1.6; color: var(--ehbs-text-sek);
    overflow-wrap: break-word; word-break: break-word;
}
.lw-rot { color: var(--lw-rot-text); }
.lw-hinweis[hidden] { display: none; }

/* st.markdown/st.write: 1rem, Absatz ohne Rand */
.lw-md { font-size: 1rem; line-height: 1.6; }
.lw-md > p { margin: 0; overflow-wrap: break-word; word-break: break-word; }
.lw-md strong { font-weight: 600; }
/* Abstände (#20): Zeilen, die nur aus einem fetten Label bestehen, rücken
   enger an das Folgende (theme.py; der Selektor ignoriert Textknoten, trifft
   also auch "**Label:** Wert", nicht aber "**Label:** _(leer)_"). */
.lw-md:has(> p:only-child > strong:only-child) { margin-bottom: -.5rem; }

/* st.write(""): belegt nur einen Blockabstand */
.lw-luecke { height: 0; }

/* Inhalt aus st.html (gesperrte Vorschau) in Markdown-Schriftgröße */
.lw-html { font-size: 1rem; line-height: 1.6; }

/* ── Spalten (st.columns) ────────────────────────────────────────────────── */
.lw-zeile { display: flex; flex-wrap: wrap; align-items: stretch; gap: var(--lw-abstand); }
.lw-spalte { display: flex; flex-direction: column; gap: var(--lw-abstand); min-width: 0; }
.lw-spalte--1v2 { width: calc(50% - var(--lw-abstand)); flex: 1 1 calc(50% - var(--lw-abstand)); }
.lw-spalte--6v7 { width: calc(85.7143% - var(--lw-abstand)); flex: 1 1 calc(85.7143% - var(--lw-abstand)); }
.lw-spalte--1v7 { width: calc(14.2857% - var(--lw-abstand)); flex: 1 1 calc(14.2857% - var(--lw-abstand)); }
.lw-spalte--5v7 { width: calc(71.4286% - var(--lw-abstand)); flex: 1 1 calc(71.4286% - var(--lw-abstand)); }
.lw-spalte--2v7 { width: calc(28.5714% - var(--lw-abstand)); flex: 1 1 calc(28.5714% - var(--lw-abstand)); }
.lw-spalte--1v5 { width: calc(20% - var(--lw-abstand)); flex: 1 1 calc(20% - var(--lw-abstand)); }
@media (max-width: 640px) { .lw-spalte { min-width: calc(100% - 1.5rem); } }
/* Streamlit setzte den Löschknopf mit "<br>" eine Markdown-Zeile tiefer */
.lw-br { height: calc(1.6rem - var(--lw-abstand)); }

/* ── Textfelder ──────────────────────────────────────────────────────────── */
.lw-feld { position: relative; min-width: 0; }
.lw-feld__kopf { display: flex; align-items: center; min-height: 1.5rem; margin-bottom: .25rem; }
.lw-label {
    font-size: var(--fs-small); font-weight: 600; line-height: 1.6; color: var(--ehbs-text);
    overflow-wrap: break-word; word-break: break-word;
}
.lw-feld__hilfe { flex: 1 1 0%; display: flex; justify-content: flex-end; }
.lw-eingabe {
    display: flex; height: 2.5rem; overflow: hidden;
    border: 1px solid var(--lw-feldrand); border-radius: var(--radius-sm); background: var(--ehbs-bg);
    font-size: var(--fs-small); line-height: 1.6;
    transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.lw-eingabe:hover { border-color: var(--ehbs-text); }
.lw-eingabe:focus-within {
    border-color: var(--ehbs-focus);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--ehbs-focus) 30%, transparent), 0 0 0 1px var(--ehbs-focus);
}
/* 46 px im 40 px hohen Rahmen wie bei Streamlit (min-height aus theme.py),
   der Text sitzt dadurch etwas unter der Mitte. */
.lw-eingabe__feld {
    flex: 1 1 auto; width: 100%; min-width: 0; min-height: 46px; margin: 0;
    /* Nur die Rahmenart: Farbe bleibt die des Browsers wie bei Streamlit,
       der Radius kommt beim Fokus aus :focus-visible (ehbs-modern.css). */
    padding: 8px 8px 8px 12px; border-style: none; background: transparent;
    font: inherit; font-size: var(--fs-base); line-height: 1.4; color: var(--ehbs-text);
    caret-color: var(--ehbs-focus);
}
/* Platzhalter kursiv, damit sie sich von echten Eingaben abheben (#20) */
.lw-eingabe__feld::placeholder { font-style: italic; color: var(--lw-platzhalter); opacity: 1; }

/* ── Hilfe-Symbol und Tooltip ────────────────────────────────────────────── */
.lw-hilfe {
    display: flex; align-items: center; justify-content: center; flex: none;
    width: 16px; height: 16px; margin: 0; padding: 0; border: 0; background: none;
    color: var(--ehbs-text); font-size: var(--fs-small); line-height: 0; cursor: pointer;
}
.lw-hilfe svg { width: 16px; height: 16px; stroke: var(--lw-hilfe-farbe); stroke-width: 2.25px; vertical-align: middle; }

.lw-tooltip {
    position: absolute; left: 0; top: 0; z-index: 1000;
    border-radius: var(--radius); box-shadow: 0 1px 4px rgba(0, 0, 0, .16);
    pointer-events: none;
    /* Eigene Ebene wie Streamlits Popover: Text wird in Graustufen geglättet */
    will-change: transform;
}
.lw-tooltip__flaeche {
    position: relative; border-radius: var(--radius); background: var(--ehbs-surface); color: var(--ehbs-text);
    font-size: var(--fs-small); line-height: 1.6;
}
.lw-tooltip__inhalt { max-width: 42rem; padding: 6px 12px; }
/* Schmal bricht Streamlit den Text 32 px vor der Breite des Tooltips um */
@media (max-width: 576px) { .lw-tooltip__inhalt { max-width: calc(100% - 32px); } }
.lw-tooltip__inhalt p { margin: 0; font-size: var(--fs-small); line-height: 1.6; overflow-wrap: break-word; }

/* ── Knöpfe ──────────────────────────────────────────────────────────────── */
.lw-icon {
    display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
    width: 16px; height: 16px; overflow: hidden;
    font-family: "Material Symbols Rounded"; font-weight: 400; font-style: normal; font-size: 16px;
    line-height: 1; letter-spacing: normal; text-transform: none; white-space: nowrap; direction: ltr;
    word-wrap: normal; font-feature-settings: "liga"; -webkit-font-smoothing: antialiased; user-select: none;
}

/* Hauptaktion in der Leitfarbe, Nebenaktion fein umrandet, Press-Feedback
   scale(.97) wie .ehbs-btn */
.lw-knopf {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 48px; margin: 0; padding: 4px 12px; border: 1px solid transparent; border-radius: var(--radius);
    font: inherit; font-weight: 600; line-height: 1.6; text-align: center; cursor: pointer; user-select: none;
    transition: background-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out),
                border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur) var(--ease-out),
                transform var(--dur-fast) var(--ease-out);
}
.lw-knopf--voll { width: 100%; }
/* Ohne use_container_width so breit wie der Inhalt, auch in Spalten */
.lw-knopf:not(.lw-knopf--voll) { align-self: flex-start; }
.lw-knopf:active:not(:disabled) { transform: scale(.97); }
.lw-knopf__inhalt { display: flex; align-items: center; justify-content: center; gap: var(--space-2); min-width: 0; }
.lw-knopf__text {
    font-size: var(--fs-small); font-weight: 600; line-height: 1.6;
    overflow-wrap: break-word; word-break: break-word;
}
.lw-knopf--primaer {
    background: var(--ehbs-primary); border-color: var(--ehbs-primary); color: var(--ehbs-text-on-dark);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), var(--shadow-sm);
}
.lw-knopf--primaer:hover:not(:disabled) {
    background: var(--ehbs-primary-dark); border-color: var(--ehbs-primary-dark); color: var(--ehbs-text-on-dark);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), var(--shadow);
}
.lw-knopf--sekundaer { background: var(--ehbs-surface); border-color: var(--ehbs-line); color: var(--ehbs-text); }
.lw-knopf--sekundaer:hover:not(:disabled) { border-color: var(--ehbs-text); }
@media (prefers-color-scheme: dark) {
    .lw-knopf--primaer { background: var(--ehbs-white); border-color: var(--ehbs-white); color: var(--ehbs-blue); }
    .lw-knopf--primaer:hover:not(:disabled) {
        background: var(--ehbs-primary-tint); border-color: var(--ehbs-primary-tint); color: var(--ehbs-white);
    }
}
/* Absenden im Formular: theme.py erfasste st.form_submit_button nicht
   (stBaseButton-primaryFormSubmit), er blieb in Streamlits primaryColor
   ohne Schatten, dunkel also Gelb mit weißer Schrift. Hover: Streamlits
   primaryColor um 15 % Helligkeit abgedunkelt, in 1.58 gemessen. */
.lw-knopf--primaer.lw-knopf--formular { box-shadow: none; }
.lw-knopf--primaer.lw-knopf--formular:hover:not(:disabled) {
    background: #111632; border-color: #111632; box-shadow: none;
}
@media (prefers-color-scheme: dark) {
    .lw-knopf--primaer.lw-knopf--formular { background: var(--ehbs-yellow); border-color: var(--ehbs-yellow); color: var(--ehbs-white); }
    .lw-knopf--primaer.lw-knopf--formular:hover:not(:disabled) {
        background: #e18409; border-color: #e18409; color: var(--ehbs-white);
    }
}
.lw-knopf:focus-visible { outline: 3px solid var(--ehbs-focus); outline-offset: 2px; }
.lw-knopf:disabled {
    cursor: not-allowed; box-shadow: none;
    color: color-mix(in srgb, var(--ehbs-text) 40%, transparent);
    border-color: color-mix(in srgb, var(--ehbs-line) 60%, transparent);
    background: transparent;
}

/* ── Schalter (st.toggle) ────────────────────────────────────────────────── */
.lw-schalter { align-self: flex-start; display: flex; align-items: center; min-height: 1.5rem; max-width: 100%; }
.lw-spalte > .lw-schalter { margin-top: var(--space-2); }
.lw-schalter__label { position: relative; display: flex; align-items: flex-start; cursor: pointer; user-select: none; }
.lw-schalter__input, .lw-checkbox__input {
    position: absolute; top: 0; left: 0; width: 1px; height: 1px; margin: 0; padding: 0;
    opacity: 0; overflow: hidden; clip-path: inset(50%); pointer-events: none;
}
.lw-schalter__spur {
    display: flex; align-items: center; flex: none; width: 32px; height: 16px; margin-top: 4px; padding: 0 2px;
    border-radius: 9999px; background: transparent;
    /* Toggle-Kontrast (#20): sichtbarer Rahmen statt hellgrauer Fläche */
    border: 1.5px solid var(--lw-feldrand);
    transition: background-color var(--dur-fast) var(--ease-out);
}
.lw-schalter__knopf {
    width: 12px; height: 12px; border-radius: 50%; background: var(--ehbs-white);
    transition: transform var(--dur-fast) var(--ease-out);
}
.lw-schalter__input:checked + .lw-schalter__spur { background: var(--ehbs-primary); border: 0; }
.lw-schalter__input:checked + .lw-schalter__spur .lw-schalter__knopf { transform: translateX(16px); }
.lw-schalter__input:focus-visible + .lw-schalter__spur { outline: 3px solid var(--ehbs-focus); outline-offset: 2px; }
@media (prefers-color-scheme: dark) {
    .lw-schalter__input:checked + .lw-schalter__spur { background: var(--ehbs-yellow); }
}
.lw-schalter__beschriftung {
    position: relative; display: flex; align-items: center; padding-left: var(--space-2);
    font-size: var(--fs-small); line-height: 1.5;
}
.lw-schalter__text { font-size: var(--fs-small); font-weight: 600; line-height: 1.5; color: var(--ehbs-text); }
.lw-schalter__hilfe { position: relative; display: flex; margin-left: 6px; }

/* Ausstattung: jeder Schalter als Kachel, ausgewählt in der Leitfarbe getönt */
.lw-kachel {
    border: 1px solid var(--ehbs-line); border-radius: var(--radius); background: var(--ehbs-surface);
    padding: var(--space-3);
    transition: border-color var(--dur-fast) ease, background-color var(--dur-fast) ease;
}
.lw-kachel:has(.lw-schalter__input:checked) { border-color: var(--ehbs-primary); background: var(--ehbs-primary-tint); }
.lw-kachel .lw-schalter { align-self: stretch; }
.lw-kachel .lw-schalter__beschriftung { flex: 1 1 auto; min-width: 0; }
.lw-kachel .lw-schalter__text {
    font-size: .9375rem; line-height: 1.3; overflow-wrap: normal; word-break: normal;
}
@media (prefers-color-scheme: dark) {
    .lw-kachel:has(.lw-schalter__input:checked) { border-color: var(--ehbs-yellow); }
}

/* ── Checkbox (Einwilligung) ─────────────────────────────────────────────── */
.lw-checkbox { align-self: flex-start; display: flex; align-items: center; min-height: 1.5rem; max-width: 100%; }
.lw-checkbox__label { position: relative; display: flex; align-items: flex-start; cursor: pointer; user-select: none; }
.lw-checkbox__kaestchen {
    flex: none; width: 16px; height: 16px; margin: 4px 2px 0 0; outline-width: 0;
    border: 1px solid var(--ehbs-line); border-radius: 5.6px; background-color: var(--lw-checkbox-bg);
    background-position: 50% 50%; background-repeat: no-repeat; background-size: contain;
    transition: background-color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}
.lw-checkbox__input:checked + .lw-checkbox__kaestchen {
    background-color: var(--ehbs-primary); border-color: var(--ehbs-primary);
    background-image: url("data:image/svg+xml,%0A%20%20%20%20%3Csvg%20width%3D%2217%22%20height%3D%2213%22%20viewBox%3D%220%200%2017%2013%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%20%20%20%20%20%20%3Cpath%20d%3D%22M6.50002%2012.6L0.400024%206.60002L2.60002%204.40002L6.50002%208.40002L13.9%200.900024L16.1%203.10002L6.50002%2012.6Z%22%20fill%3D%22%23f0f2f6%22%2F%3E%0A%20%20%20%20%3C%2Fsvg%3E%0A%20%20");
}
.lw-checkbox__input:focus-visible + .lw-checkbox__kaestchen { outline: 3px solid var(--ehbs-focus); outline-offset: 2px; }
@media (prefers-color-scheme: dark) {
    .lw-checkbox__input:checked + .lw-checkbox__kaestchen { background-color: var(--ehbs-yellow); border-color: var(--ehbs-yellow); }
}
.lw-checkbox__beschriftung { position: relative; padding-left: var(--space-2); font-size: var(--fs-small); line-height: 1.5; }
.lw-checkbox__text { display: block; font-size: var(--fs-small); font-weight: 600; line-height: 1.5; color: var(--ehbs-text); }

/* ── Aufklappbereiche (st.expander) ──────────────────────────────────────── */
.lw-aufklapp {
    border: 1px solid var(--ehbs-line); border-radius: var(--radius); background: var(--ehbs-surface);
}
.lw-aufklapp__kopf {
    position: relative; display: flex; align-items: center; min-height: 48px; padding: 4px 12px;
    border-radius: var(--radius); list-style: none; cursor: pointer; overflow: hidden;
}
.lw-aufklapp__kopf::-webkit-details-marker { display: none; }
.lw-aufklapp[open] > .lw-aufklapp__kopf { background: var(--lw-aufklapp-kopf-offen); }
.lw-aufklapp__zeile { display: flex; align-items: center; gap: var(--space-2); flex: 1 1 auto; min-width: 0; overflow: hidden; }
.lw-aufklapp__titel { font-size: var(--fs-small); font-weight: 600; line-height: 1.6; }
.lw-aufklapp__inhalt { padding: var(--space-4); border-top: 1px solid var(--ehbs-line); }

/* ── Hinweisboxen (st.info/success/warning/error) ────────────────────────── */
.lw-box { padding: var(--space-4); border-radius: var(--radius); line-height: 1.5; }
.lw-box__inhalt p { margin: 0; font-size: 1rem; line-height: 1.5; overflow-wrap: break-word; word-break: break-word; }
.lw-box__inhalt p + p { margin-top: var(--space-4); }
.lw-box--fehler { background: var(--lw-box-fehler-bg); color: var(--lw-box-fehler-text); }
.lw-box--erfolg { background: var(--lw-box-erfolg-bg); color: var(--lw-box-erfolg-text); }
.lw-box--info { background: var(--lw-box-info-bg); color: var(--lw-box-info-text); }
.lw-box--warnung { background: var(--lw-box-warnung-bg); color: var(--lw-box-warnung-text); }

/* ── Spinner (st.spinner) ────────────────────────────────────────────────── */
.lw-spinner { align-self: flex-start; display: flex; gap: var(--space-2); font-size: 1rem; line-height: 1.6; }
.lw-spinner__huelle { display: flex; align-items: center; justify-content: center; align-self: center; width: 20px; height: 20px; }
.lw-spinner__kreis {
    width: 16px; height: 16px; border-radius: 50%;
    border: 2px solid color-mix(in srgb, currentColor 20%, transparent); border-top-color: currentColor;
    animation: lw-drehen 1s linear infinite;
}
.lw-spinner__text p { margin: 0; }
@keyframes lw-drehen { to { transform: rotate(360deg); } }
/* Reduzierte Bewegung: ehbs-modern.css kürzt nur die Dauer auf 1 ms, ein
   endloser Kreis würde dann flackern. Stehender Ring, der Text bleibt. */
@media (prefers-reduced-motion: reduce) { .lw-spinner__kreis { animation: none; } }

/* ── Kontaktformular (st.form) ───────────────────────────────────────────── */
.lw-formular { margin: 0; padding: 15px; border: 1px solid var(--ehbs-line); border-radius: var(--radius); }
.lw-formular > .lw-stapel { min-width: 0; }
/* Honeypot (#26): display:none statt nur visuell versteckt, damit es auch
   per Tab nicht erreichbar ist. Die Hülle bleibt als leerer Block stehen. */
.lw-honeypot { display: none; }
/* ── LE-Ermittler: Ergänzungen zum Assistenten ─────────────────────────────
   Bausteine, die der BSO-Assistent (wizard.css) nicht hatte. Farben nur aus
   den Tokens von ehbs-modern.css und den Variablen aus wizard.css. */

/* Acht Schritte: auf breiten Bildschirmen mit Text, schmaler nur die Nummern
   und der aktuelle Schritt ausgeschrieben. */
.lw-stepper { grid-template-columns: repeat(8, minmax(0, 1fr)); }
@media (min-width: 641px) {
    .lw-stepper > li:not(.is-current) .lw-stepper__label {
        position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%);
    }
    .lw-stepper { display: flex; }
    .lw-stepper > li { flex: 1 1 0; }
    .lw-stepper > li.is-current { flex: 3 1 0; }
}
@media (max-width: 640px) {
    .lw-stepper { grid-template-columns: repeat(8, minmax(0, 1fr)); }
    .lw-stepper > li.is-current { grid-column: auto; }
    .lw-stepper > li:not(:last-child)::after { min-width: 4px; }
    .lw-stepper__nr { width: 28px; height: 28px; }
}

/* Auswahlliste und Textbereich im selben Rahmen wie Textfelder */
.lw-auswahl { appearance: auto; cursor: pointer; background: transparent; }
.lw-eingabe:has(.lw-textbereich) { height: auto; }
.lw-textbereich { resize: vertical; min-height: 4.5rem; padding-top: .5rem; padding-bottom: .5rem; font: inherit; }

/* Radiogruppe als Segmente */
.lw-gruppe { border: 0; margin: 0; padding: 0; min-width: 0; }
.lw-legende { display: flex; align-items: center; gap: .35rem; padding: 0; margin-bottom: .35rem; }
.lw-segmente { display: flex; flex-wrap: wrap; gap: .5rem; }
.lw-segment { position: relative; display: inline-flex; cursor: pointer; }
.lw-segment__input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.lw-segment__text {
    display: inline-flex; align-items: center; min-height: 2.5rem; padding: 0 1rem;
    border: 1px solid var(--lw-feldrand); border-radius: var(--radius-sm); background: var(--ehbs-bg);
    font-size: var(--fs-small); font-weight: 550; color: var(--ehbs-text);
    transition: background-color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}
.lw-segment:hover .lw-segment__text { border-color: var(--ehbs-text); }
.lw-segment__input:checked + .lw-segment__text {
    background: var(--ehbs-primary); border-color: var(--ehbs-primary); color: var(--ehbs-text-on-dark);
}
.lw-segment__input:focus-visible + .lw-segment__text { outline: 2px solid var(--ehbs-primary); outline-offset: 2px; }
@media (prefers-color-scheme: dark) {
    .lw-segment__input:checked + .lw-segment__text { background: var(--ehbs-yellow); border-color: var(--ehbs-yellow); color: #000; }
}

/* Brandklassen als Raster */
.lw-klassen { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); gap: .5rem 1rem; }

.lw-einrueckung {
    display: flex; flex-direction: column; gap: .75rem; padding: .75rem 1rem;
    background: var(--ehbs-bg-soft); border-radius: var(--radius-md);
}

/* Leiser Link (Knopf in Textform) */
.lw-leise {
    appearance: none; border: 0; background: none; padding: .6rem 0; min-height: 44px; cursor: pointer; font: inherit; text-align: left;
    font-size: var(--fs-small); font-weight: 600; color: var(--ehbs-primary);
    text-decoration: underline; text-underline-offset: .2em; text-decoration-thickness: 1px;
}
.lw-leise:hover { text-decoration-thickness: 2px; }
@media (prefers-color-scheme: dark) { .lw-leise { color: var(--ehbs-yellow); } }

.lw-werkzeuge { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; padding-top: .25rem; }
.lw-werkzeuge > :last-child { margin-left: auto; }
.lw-navigation { position: sticky; bottom: 0; z-index: 2; background: var(--ehbs-surface); padding: .5rem 0; }

.lw-aktionen { display: flex; flex-wrap: wrap; gap: .5rem; }
.lw-aktionen .lw-knopf { width: auto; }

/* Vorab-Kasten (bereithalten, Ablauf) */
.lw-vorab {
    background: var(--ehbs-bg-soft); border-radius: var(--radius-md); padding: 1rem 1.25rem;
    display: flex; flex-direction: column; gap: .5rem;
}
.lw-vorab__titel { margin: 0; font-weight: 650; }
.lw-liste { margin: 0; padding-left: 1.25rem; display: flex; flex-direction: column; gap: .25rem; font-size: var(--fs-small); }

/* Bereichskarten und Abschnitte je Bereich */
.lw-bereich[open] { border-color: var(--ehbs-primary); }
.lw-aufklapp__zeile .lw-ampel { margin-left: auto; }
.lw-abschnitt {
    border: 1px solid var(--ehbs-line-soft); border-radius: var(--radius-md); padding: 1rem 1.25rem;
    display: flex; flex-direction: column; gap: .75rem;
}
.lw-abschnitt__kopf { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; }
.lw-abschnitt__titel { margin: 0; font-size: 1rem; font-weight: 650; }
.lw-abschnitt__wert { font-size: var(--fs-small); color: var(--ehbs-text-sek); font-variant-numeric: tabular-nums; }
.lw-abschnitt__kopf .lw-ampel { margin-left: auto; }

/* Löscherzeile */
.lw-loescher {
    display: flex; flex-direction: column; gap: .5rem; padding-bottom: .75rem;
    border-bottom: 1px dashed var(--ehbs-line-soft);
}
.lw-loescher__zahlen { display: grid; grid-template-columns: minmax(0, 2fr) minmax(5rem, 1fr) auto; gap: .75rem; align-items: end; }
.lw-loescher__zahlen:not(:has(> button)) { grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); }
.lw-le { font-size: var(--fs-small); font-weight: 600; color: var(--ehbs-text-sek); font-variant-numeric: tabular-nums; }
.lw-le:empty { display: none; }
.lw-le--null { color: var(--lw-rot-text); }

/* Ampel */
/* Fachfarben der EHBS-Ampel (ehbs-knecht-web, farben-kontrast.md): Grün, Gelb, Rot mit weißer
   bzw. bei Gelb schwarzer Schrift. Status immer mit Symbol und Wort, nie nur über die Farbe. */
:root {
    --lw-ampel-gruen: #2E7D32; --lw-ampel-gelb: #E3A615; --lw-ampel-rot: #C0392B;
}
.lw-ampel {
    display: inline-flex; align-items: center; gap: .4rem; max-width: 100%;
    font-size: .8125rem; font-weight: 700; line-height: 1.25; padding: .3rem .75rem .3rem .55rem; border-radius: 1rem;
    color: #fff; background: var(--lw-ampel-gruen);
}
.lw-tabelle .lw-ampel { white-space: nowrap; }
.lw-tabelle .lw-zelle-name { flex-wrap: nowrap; }
.lw-ampel__symbol { flex: none; width: 1rem; height: 1rem; }
.lw-ampel__text { min-width: 0; overflow-wrap: anywhere; }
.lw-ampel--gruen { background: var(--lw-ampel-gruen); color: #fff; }
.lw-ampel--gelb { background: var(--lw-ampel-gelb); color: #000; }
.lw-ampel--rot { background: var(--lw-ampel-rot); color: #fff; }

/* Hinweiskasten je Bereich: Lücke mit kräftigem Rand links, erfüllt als grüne Bestätigung. */
.lw-kasten {
    display: flex; align-items: flex-start; gap: .75rem; padding: .85rem 1rem; border-radius: var(--radius-md);
    background: color-mix(in srgb, var(--k) 8%, var(--ehbs-surface));
    border: 1px solid color-mix(in srgb, var(--k) 28%, transparent); border-left: 5px solid var(--k);
}
.lw-kasten--gruen { --k: var(--lw-ampel-gruen); }
.lw-kasten--gelb { --k: var(--lw-ampel-gelb); }
.lw-kasten--rot { --k: var(--lw-ampel-rot); }
.lw-kasten__marke {
    flex: none; display: grid; place-items: center; width: 1.75rem; height: 1.75rem; border-radius: 50%;
    background: var(--k); color: #fff;
}
.lw-kasten--gelb .lw-kasten__marke { color: #000; }
.lw-kasten__marke .lw-ampel__symbol { width: 1rem; height: 1rem; }
.lw-kasten__inhalt { min-width: 0; }
.lw-kasten__inhalt p { margin: 0; overflow-wrap: anywhere; }
.lw-kasten__titel { font-weight: 700; color: var(--ehbs-text); line-height: 1.35; }
.lw-kasten__text { margin-top: .15rem !important; font-size: var(--fs-small); color: var(--ehbs-text-sek); }
.lw-kasten-liste { gap: .6rem; }

/* Gesamtergebnis: große, ruhige Karte oben in Schritt 6 und 7. */
.lw-ampelkarte {
    display: flex; align-items: center; gap: 1rem; padding: 1.15rem 1.35rem; border-radius: var(--radius-lg);
    background: color-mix(in srgb, var(--k) 9%, var(--ehbs-surface));
    border: 1px solid color-mix(in srgb, var(--k) 40%, transparent);
}
.lw-ampelkarte--gruen { --k: var(--lw-ampel-gruen); }
.lw-ampelkarte--gelb { --k: var(--lw-ampel-gelb); }
.lw-ampelkarte--rot { --k: var(--lw-ampel-rot); }
.lw-ampelkarte__marke {
    flex: none; display: grid; place-items: center; width: 3.25rem; height: 3.25rem; border-radius: 50%;
    background: var(--k); color: #fff;
}
.lw-ampelkarte--gelb .lw-ampelkarte__marke { color: #000; }
.lw-ampelkarte__marke .lw-ampel__symbol { width: 1.75rem; height: 1.75rem; }
.lw-ampelkarte__inhalt { min-width: 0; }
.lw-ampelkarte__titel { margin: 0; font-size: 1.25rem; line-height: 1.25; font-weight: 750; color: var(--ehbs-text); overflow-wrap: anywhere; }
.lw-ampelkarte__text { margin: .3rem 0 0; font-size: var(--fs-small); color: var(--ehbs-text-sek); }
@media (max-width: 640px) {
    .lw-ampelkarte { padding: 1rem; gap: .85rem; }
    .lw-ampelkarte__marke { width: 2.75rem; height: 2.75rem; }
    .lw-ampelkarte__titel { font-size: 1.125rem; }
}

/* Tabellen */
.lw-tabelle__huelle { overflow-x: auto; }
.lw-tabelle { width: 100%; border-collapse: collapse; font-size: var(--fs-small); font-variant-numeric: tabular-nums; }
.lw-tabelle th, .lw-tabelle td { text-align: left; padding: .5rem .6rem; border-bottom: 1px solid var(--ehbs-line-soft); }
.lw-tabelle th { font-weight: 650; color: var(--ehbs-text-sek); white-space: nowrap; }
.lw-tabelle td:nth-child(n+3), .lw-tabelle th:nth-child(n+3) { text-align: right; }
.lw-tabelle tfoot td { font-weight: 700; border-bottom: 0; border-top: 2px solid var(--ehbs-line); }
.lw-zelle-name { display: inline-flex; align-items: center; gap: .5rem; flex-wrap: wrap; }

/* Vorschlag und Plan-Kasten */
.lw-vorschlag { display: flex; flex-direction: column; gap: .35rem; }
.lw-vorschlag__summe { margin: 0; font-weight: 600; font-size: var(--fs-small); }
.lw-plan {
    background: var(--ehbs-primary); color: var(--ehbs-text-on-dark); border-radius: var(--radius-lg);
    padding: clamp(1.25rem, 1rem + 1vw, 2rem); display: flex; flex-direction: column; gap: .75rem;
}
.lw-plan p { margin: 0; }
.lw-plan__titel { margin: 0; font-size: 1.25rem; font-weight: 650; }

.lw-plan__knoepfe { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.5rem; }
.lw-plan .lw-knopf--primaer { background: var(--ehbs-yellow); border-color: var(--ehbs-yellow); color: #000; width: auto; }
.lw-plan .lw-leise { color: var(--ehbs-text-on-dark); }
.lw-plan__preis { margin: 0; font-size: var(--fs-small); color: var(--ehbs-text-sek); }

.lw-box--mit-knopf { display: flex; flex-direction: column; gap: .5rem; align-items: flex-start; padding: 1rem 1.25rem; }
.lw-box--mit-knopf p { margin: 0; }

/* Datei laden: Eingabe unsichtbar über dem Knopf */
.lw-datei__label { position: relative; cursor: pointer; }
.lw-datei { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }

@media (max-width: 640px) {
    .lw-loescher__zahlen { grid-template-columns: minmax(0, 1fr) minmax(4.5rem, .6fr) auto; }
    .lw-tabelle th, .lw-tabelle td { padding: .45rem .4rem; }
}

.lw-plan .lw-plan__preis { color: var(--ehbs-text-on-dark); opacity: .88; }

/* Dokument-Ansicht vor der Kontaktabfrage (wizard/vorschau.ts): A4-Blätter quer auf grauem Grund,
   gebaut wie das Word-Dokument. Nur zum Ansehen. Auf dem Handy bleibt jedes Blatt lesbar groß und
   die Bühne wischt seitlich, die Seite selbst läuft nie über. */

.lw-vorschau { display: flex; flex-direction: column; gap: .75rem; min-width: 0; }
.lw-vorschau__titel { margin: 0; font-size: 1.125rem; }
.lw-vorschau__lead { margin: 0; color: var(--ehbs-text-sek); font-size: var(--fs-small); }
.lw-vorschau__botschaft { margin: 0; font-weight: 650; }
.lw-vorschau__wischen { display: none; margin: 0; font-size: var(--fs-small); color: var(--ehbs-text-sek); }

.lw-vorschau__buehne {
    container-type: inline-size; min-width: 0;
    background: #d6d9e3; border-radius: var(--radius-md);
    padding: clamp(.5rem, 2.4vw, 1.25rem);
    overflow-x: auto; overscroll-behavior-x: contain;
}
.lw-vorschau__buehne:focus-visible { outline: 2px solid var(--ehbs-primary); outline-offset: 2px; }
.lw-vorschau__blaetter { display: flex; flex-direction: column; gap: clamp(.75rem, 2.4vw, 1.25rem); min-width: 760px; }

/* Das Blatt: Papier bleibt hell, auch im dunklen Modus. */
.lw-blatt {
    --papier-text: #1a1a1a;
    position: relative; display: flex; flex-direction: column; gap: .8em; box-sizing: border-box;
    aspect-ratio: 297 / 210; overflow: clip;
    padding: 2.6% 3.2% 2.2%;
    background: #fff; color: var(--papier-text);
    font-family: Arial, "Liberation Sans", Helvetica, sans-serif;
    font-size: clamp(10px, 1.15cqw, 13px); line-height: 1.35;
    box-shadow: 0 1px 2px rgba(20, 26, 61, .25), 0 8px 22px rgba(20, 26, 61, .16);
}
/* Schriftzug „Vorschau“: schräg, blass, nicht anklickbar und nicht Teil des Textes. */
.lw-blatt::after {
    content: attr(data-marke); position: absolute; inset: 0; display: grid; place-items: center;
    font-size: 11em; font-weight: 800; letter-spacing: .06em; white-space: nowrap; text-transform: uppercase;
    color: rgba(35, 46, 106, .075); transform: rotate(-22deg); pointer-events: none; user-select: none;
}
.lw-blatt > * { position: relative; }

.lw-blatt__titelzeile { display: flex; align-items: flex-start; justify-content: space-between; gap: 1em; }
.lw-blatt__titel { margin: 0; font-family: inherit; font-size: 1.7em; line-height: 1.15; font-weight: 700; color: #232e6a; }
.lw-blatt__logo { flex: none; height: 3.4em; width: auto; max-width: 40%; object-fit: contain; }
.lw-blatt__unter { margin: .9em 0 0; font-family: inherit; font-size: 1.1em; font-weight: 700; color: #232e6a; }
.lw-blatt__text { margin: 0; }
.lw-blatt__haftung {
    margin: .8em 0 0; padding: .7em .9em; border: 1px solid #9a9aa6; background: #f2f2f2; font-size: .92em;
}
.lw-blatt__zeilen > div { white-space: normal; }
.lw-blatt__zeilen > div + div { margin-top: .15em; }
.lw-blatt__fuss { margin-top: auto; padding-top: .8em; text-align: right; font-size: .85em; color: #5a5a62; }

/* Kopf wie im Dokument: Beschriftung links grau, Wert rechts. */
.lw-blatt__kopf { display: grid; border: 1px solid #8b8b96; }
.lw-blatt__feld, .lw-blatt__feldreihe > .lw-blatt__feld { display: grid; grid-template-columns: 17em 1fr; }
.lw-blatt__feldreihe { display: grid; grid-template-columns: 1fr 1fr; }
.lw-blatt__feldreihe > .lw-blatt__feld { grid-template-columns: 17em 1fr; }
.lw-blatt__kopf > * + * { border-top: 1px solid #8b8b96; }
.lw-blatt__feldreihe > .lw-blatt__feld + .lw-blatt__feld { border-left: 1px solid #8b8b96; grid-template-columns: 8em 1fr; }
.lw-blatt__feldname { padding: .3em .6em; background: #d9d9d9; font-weight: 700; }
.lw-blatt__feldwert { padding: .3em .6em; min-width: 0; overflow-wrap: break-word; }
.lw-blatt__haken { display: inline-flex; align-items: center; gap: .35em; margin-right: 1.2em; }
.lw-blatt__kaestchen {
    position: relative; display: inline-block; width: .95em; height: .95em; border: 1.5px solid #1a1a1a; box-sizing: border-box;
}
.lw-blatt__kaestchen.ist-an::before, .lw-blatt__kaestchen.ist-an::after {
    content: ""; position: absolute; left: 50%; top: 50%; width: 120%; height: 1.5px; background: #1a1a1a;
    transform: translate(-50%, -50%) rotate(45deg);
}
.lw-blatt__kaestchen.ist-an::after { transform: translate(-50%, -50%) rotate(-45deg); }

/* Tabellen: dünne Linien, grauer Kopf, Summenzeile hervorgehoben. */
.lw-blatt__huelle { min-width: 0; }
.lw-blatt__huelle--schmal { max-width: 64%; }
.lw-blatt__tabelle { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.lw-blatt p { font-size: inherit; line-height: inherit; }
.lw-blatt__tabelle th, .lw-blatt__tabelle td {
    border: 1px solid #8b8b96; padding: .3em .5em; text-align: left; vertical-align: top; overflow-wrap: break-word;
}
.lw-blatt__tabelle th { background: #d9d9d9; font-weight: 700; overflow-wrap: normal; hyphens: none; }
.lw-blatt__tabelle--le th:nth-child(2), .lw-blatt__tabelle--le th:nth-child(10),
.lw-blatt__tabelle--le td:nth-child(2) { white-space: nowrap; }
.lw-blatt__tabelle tbody tr:nth-child(even) td { background: #f7f7f7; }
.lw-blatt__tabelle tfoot td { background: #f2f2f2; font-weight: 700; }
.lw-blatt__tabelle--le td:nth-child(n+3):nth-child(-n+3),
.lw-blatt__tabelle--le td:nth-child(n+8) { text-align: right; }
.lw-blatt__tabelle--le td:nth-child(11), .lw-blatt__tabelle--le th:nth-child(11) { text-align: center; }
.lw-blatt__minus { color: #C0392B; font-weight: 700; }

@media (max-width: 720px) {
    .lw-vorschau__wischen { display: block; }
    .lw-blatt { font-size: 11px; }
    .lw-blatt__huelle--schmal { max-width: 100%; }
}
@media (prefers-color-scheme: dark) {
    .lw-vorschau__buehne { background: #0a0e24; }
}
@media print {
    .lw-vorschau { display: none; }
}
