/* LIBERYX Design System, gebündelt aus css/. Nicht von Hand ändern.   Quelle und Reihenfolge stehen in tools/build.py. */

/* ===== tokens.css ======================================================== */
/* ============================================================================
   LIBERYX Design System · TOKENS
   ----------------------------------------------------------------------------
   Einzige Quelle für Farben, Schrift, Abstände, Radien, Schatten.
   Werte stammen aus LIBERYX.fig (Canvas «WEB DESIGN»), maschinell extrahiert.

   Aufbau in zwei Ebenen:
     1. PALETTE   rohe Markenwerte, unveränderlich, nie direkt im CSS verwenden
     2. SEMANTIK  Rollen wie --lx-bg oder --lx-text, die je Theme umschalten

   Es gibt zwei Themes:
     dunkel (Standard)  Auftritt nach aussen, Marketing, Landingpages
     hell               eingeloggte Anwendung, Druck, E-Mail

   Theme setzen:  <html data-theme="light">  oder  <div data-theme="light">
   ========================================================================== */

:root,
[data-theme="dark"] {
  /* == 1. PALETTE ========================================================== */

  /* Markenblau, der einzige Akzent. 445 Vorkommen im Figma. */
  --lx-c-blue-100: #b8d9ff;
  --lx-c-blue-500: #0173e6;   /* Primär */
  --lx-c-blue-600: #005cb9;   /* Hover  */
  --lx-c-navy-800: #0b1f4a;
  --lx-c-navy-900: #02143d;

  /* Neutrale Stufen */
  --lx-c-white: #ffffff;
  --lx-c-paper: #f9fbff;      /* helle Fläche mit Blaustich */
  --lx-c-sand: #f0ede4;       /* Druck, Briefpapier, Visitenkarte */
  --lx-c-grey-100: #e6e6e6;
  --lx-c-grey-200: #d2d2d2;   /* Hover des sekundären Buttons im Figma */
  --lx-c-grey-300: #a3a3a3;
  --lx-c-grey-500: #767676;
  --lx-c-grey-700: #3a3a3a;
  --lx-c-grey-800: #252525;   /* Kartenfläche dunkel */
  --lx-c-grey-850: #1b1b1b;   /* Footer-Karte im Figma, Radius 30 */
  --lx-c-grey-900: #171717;   /* Seitengrund dunkel */
  --lx-c-black: #000000;

  /* Signalfarben. Blau und Orange stammen aus dem Figma, Grün und Rot sind
     ergänzt, weil das Figma keine Status-Zustände kennt. */
  /* Orange ist kein Statusrot, sondern der belegte Sekundärakzent aus dem
     Figma: dritte Lage im Glow-Dreiklang und Endpunkt der Bildkachel-Verläufe. */
  --lx-c-orange-500: #ff8c32;
  --lx-c-green-500: #1a9e5f;
  --lx-c-red-500: #d33a2c;
  --lx-c-amber-500: #d9930a;

  /* == 2. SEMANTIK · dunkel (Standard) ===================================== */

  --lx-bg: var(--lx-c-grey-900);
  --lx-bg-sunken: #101010;
  --lx-surface: var(--lx-c-grey-800);
  --lx-surface-hover: #303030;
  --lx-surface-raised: #2e2e2e;

  --lx-text: var(--lx-c-white);
  --lx-text-muted: rgba(255, 255, 255, 0.6);
  --lx-text-faint: rgba(255, 255, 255, 0.38);
  --lx-text-inverse: var(--lx-c-black);

  --lx-border: rgba(255, 255, 255, 0.2);
  --lx-border-strong: rgba(255, 255, 255, 0.35);
  --lx-border-faint: rgba(255, 255, 255, 0.1);

  --lx-accent: var(--lx-c-blue-500);
  --lx-accent-hover: var(--lx-c-blue-600);
  --lx-accent-soft: rgba(1, 115, 230, 0.16);
  --lx-accent-border: rgba(1, 115, 230, 0.6);
  --lx-on-accent: var(--lx-c-white);

  /* Akzent als TEXT. Das Markenblau erreicht auf dem dunklen Grund nur 3,9:1
     und verfehlt damit die geforderten 4,5:1 für kleinen Text. Für Flächen
     bleibt --lx-accent, für farbigen Text gilt dieser Wert. Beide Stufen
     stammen aus der Figma-Palette. */
  --lx-accent-text: var(--lx-c-blue-100);

  --lx-success: var(--lx-c-green-500);
  --lx-warning: var(--lx-c-amber-500);
  --lx-danger: var(--lx-c-red-500);
  --lx-success-soft: rgba(26, 158, 95, 0.16);
  --lx-warning-soft: rgba(217, 147, 10, 0.16);
  --lx-danger-soft: rgba(211, 58, 44, 0.16);

  --lx-focus: var(--lx-c-blue-100);

  /* == 3. TYPOGRAFIE ======================================================= */
  /* Eine Familie: Inter. Im Figma 212x Bold, 135x Medium, 108x Regular,
     97x Semi Bold. Andere Familien sind Altlasten. */

  --lx-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Elf Textknoten im Master tragen Axiforma Bold statt Inter, darunter die
     Hero-Überschrift der Startseite (als Style-Override, in der Knotenebene
     nicht sichtbar). Die Schrift liegt nicht lizenziert vor, deshalb zeigt
     diese Rolle auf Inter. Wer Axiforma beschafft, ändert nur diese Zeile. */
  --lx-font-display: var(--lx-font);
  --lx-font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --lx-w-regular: 400;
  --lx-w-medium: 500;
  --lx-w-semibold: 600;
  --lx-w-bold: 700;

  /* Geschlossene Skala. Was hier nicht steht, gibt es nicht. */
  --lx-fs-hero: 80px;    --lx-lh-hero: 1.0;
  --lx-fs-h1: 60px;      --lx-lh-h1: 1.08;
  --lx-fs-h2: 45px;      --lx-lh-h2: 1.44;
  --lx-fs-h3: 30px;      --lx-lh-h3: 1.0;
  --lx-fs-h4: 25px;      --lx-lh-h4: 1.2;
  --lx-fs-h5: 20px;      --lx-lh-h5: 1.5;
  --lx-fs-lead: 18px;    --lx-lh-lead: 1.4;
  --lx-fs-body: 16px;    --lx-lh-body: 1.25;
  --lx-fs-eyebrow: 14px; --lx-lh-eyebrow: 1.43;
  --lx-fs-label: 14px;   --lx-lh-label: 1.43;   /* Tabellenkopf, Feldbeschriftung */
  --lx-fs-small: 12px;   --lx-lh-small: 1.4;

  --lx-tracking-eyebrow: 0.1em;   /* 10 % aus dem Figma */
  --lx-tracking-tight: -0.01em;

  /* == 4. ABSTÄNDE ========================================================= */
  /* Aus den Auto-Layout-Paddings und Gaps im Figma. */

  --lx-space-xs: 6px;    /* Feinabstand: Symbol zu Text, Preis zu Periode */
  --lx-space-1: 10px;
  --lx-space-2: 15px;
  --lx-space-3: 20px;
  --lx-space-4: 30px;
  --lx-space-5: 40px;
  --lx-space-6: 60px;
  --lx-space-7: 100px;

  /* == 5. RADIEN =========================================================== */

  --lx-r-xs: 5px;
  --lx-r-sm: 8px;      /* Nav-Pill */
  --lx-r-md: 10px;     /* Button, häufigster Wert im Figma (274 Knoten) */
  --lx-r-lg: 20px;     /* Karte, Preisbox */
  --lx-r-xl: 30px;
  --lx-r-pill: 999px;

  /* == 6. SCHATTEN UND GLOW =============================================== */

  --lx-shadow-btn: 0 2px 5px rgba(1, 115, 230, 0.6);
  --lx-shadow-btn-light: 0 2px 5px rgba(255, 255, 255, 0.6);
  --lx-shadow-card: 0 0 5px rgba(0, 0, 0, 0.1);
  --lx-shadow-raised: 0 4px 16px rgba(0, 0, 0, 0.35);
  --lx-shadow-overlay: 0 20px 60px rgba(0, 0, 0, 0.5);
  --lx-shadow-featured: 0 0 20px rgba(1, 115, 230, 0.8);
  --lx-glow-blur: 120px;

  /* Abdunkelung hinter Overlays. Bewusst schwarz, unabhaengig vom Theme. */
  --lx-scrim: rgba(0, 0, 0, 0.5);
  --lx-backdrop: rgba(0, 0, 0, 0.6);

  /* == 7. LAYOUT =========================================================== */

  --lx-page: 1512px;      /* Artboard-Breite im Figma */
  --lx-content: 1312px;   /* Inhaltsbreite, ergibt 100 px Rand */
  --lx-gutter: 20px;
  --lx-header-h: 80px;    /* Marketing-Kopf */
  --lx-topbar-h: 64px;    /* Kopfleiste der Anwendung */
  --lx-sidebar-w: 260px;
  --lx-measure: 720px;    /* maximale Zeilenlänge für Fliesstext */

  /* == 8. BEWEGUNG ========================================================= */

  --lx-ease: cubic-bezier(0.2, 0, 0.2, 1);
  --lx-dur-fast: 0.12s;
  --lx-dur: 0.18s;
  --lx-dur-slow: 0.3s;

  /* == 9. EBENEN =========================================================== */

  --lx-z-base: 0;
  --lx-z-sticky: 20;
  --lx-z-drawer: 30;
  --lx-z-overlay: 40;
  --lx-z-toast: 50;

  /* Laufwert, kein Gestaltungstoken: 0 bis 1, wie weit die Seite gescrollt ist.
     Wird von js/liberyx.js gesetzt, wenn der Browser keine scroll-getriebenen
     Animationen kennt. Siehe .lx-scrollbar in css/layout.css. */
  --lx-scroll: 0;

  /* Laufwert: Seitenverhältnis einer Fläche mit .lx-media. */
  --lx-ratio: 16 / 9;

  color-scheme: dark;
}

/* ============================================================================
   SEMANTIK · hell
   Für die eingeloggte Anwendung, Druck und E-Mail. Palette und Skalen bleiben
   identisch, es wechseln nur die Rollen.
   ========================================================================== */

[data-theme="light"] {
  --lx-bg: var(--lx-c-paper);
  --lx-bg-sunken: #eef2f9;
  --lx-surface: var(--lx-c-white);
  --lx-surface-hover: #f2f5fb;
  --lx-surface-raised: var(--lx-c-white);

  --lx-text: var(--lx-c-black);
  --lx-text-muted: rgba(0, 0, 0, 0.6);     /* gleiche 60 % wie im dunklen Theme */
  --lx-text-faint: rgba(0, 0, 0, 0.38);
  --lx-text-inverse: var(--lx-c-white);

  --lx-border: rgba(0, 0, 0, 0.2);         /* gespiegelte 20 % aus dem Figma */
  --lx-border-strong: rgba(0, 0, 0, 0.35);
  --lx-border-faint: rgba(0, 0, 0, 0.1);

  --lx-accent-soft: rgba(1, 115, 230, 0.1);
  --lx-accent-border: rgba(1, 115, 230, 0.5);
  --lx-accent-text: var(--lx-c-blue-600);

  --lx-success-soft: rgba(26, 158, 95, 0.12);
  --lx-warning-soft: rgba(217, 147, 10, 0.12);
  --lx-danger-soft: rgba(211, 58, 44, 0.1);

  --lx-focus: var(--lx-c-blue-500);

  --lx-shadow-card: 0 0 5px rgba(0, 0, 0, 0.1);   /* Figma-Kartenschatten */
  --lx-shadow-raised: 0 4px 16px rgba(0, 0, 0, 0.1);
  --lx-shadow-overlay: 0 20px 60px rgba(0, 0, 0, 0.18);
  --lx-shadow-btn-light: 0 2px 5px rgba(0, 0, 0, 0.15);

  color-scheme: light;
}

/* ============================================================================
   RESPONSIVE TOKENS
   Das Figma kennt nur Desktop (1512). Die kleineren Stufen sind Adaption:
   dieselben Variablen, andere Werte. Nie neue Handy-Tokens erfinden.
   ========================================================================== */

@media (max-width: 1100px) {
  :root {
    --lx-fs-hero: 56px;  --lx-lh-hero: 1.05;
    --lx-fs-h1: 44px;    --lx-lh-h1: 1.1;
    --lx-fs-h2: 34px;    --lx-lh-h2: 1.25;
    --lx-space-7: 72px;
  }
}

@media (max-width: 900px) {
  :root {
    --lx-header-h: 64px;
    --lx-fs-hero: 38px;  --lx-lh-hero: 1.1;
    --lx-fs-h1: 30px;    --lx-lh-h1: 1.15;
    --lx-fs-h2: 26px;    --lx-lh-h2: 1.25;
    --lx-fs-h3: 26px;    --lx-lh-h3: 1.2;
    --lx-fs-h4: 20px;    --lx-lh-h4: 1.25;
    --lx-fs-lead: 16px;
    --lx-space-7: 56px;
    --lx-space-6: 40px;
  }
}

/* ===== base.css ========================================================== */
/* ============================================================================
   LIBERYX Design System · BASE
   Reset, Grundtypografie, Fokus, Textklassen, Hilfsklassen.
   Setzt css/tokens.css voraus.
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  /* Der Kopf klebt, also müssen Sprungziele darunter Platz lassen. Sonst
     verschwindet jeder angesprungene Titel hinter der Kopfleiste. */
  scroll-padding-top: calc(var(--lx-header-h) + var(--lx-space-3));
}

body {
  margin: 0;
  background: var(--lx-bg);
  color: var(--lx-text);
  font-family: var(--lx-font);
  font-size: var(--lx-fs-body);
  line-height: var(--lx-lh-body);
  font-weight: var(--lx-w-medium);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg, video, canvas { display: block; max-width: 100%; height: auto; }
/* Jede Komponente, die display setzt, schlaegt sonst die Browser-Regel fuer
   das Attribut hidden. Deshalb hier einmal zentral und mit Vorrang. */
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
hr { border: 0; }

/* Tastaturfokus ist überall sichtbar, Mausklicks bleiben ruhig. */
:focus-visible {
  outline: 2px solid var(--lx-focus);
  outline-offset: 2px;
  border-radius: var(--lx-r-xs);
}

::selection { background: var(--lx-accent); color: var(--lx-on-accent); }

/* --- Textklassen ---------------------------------------------------------- */
/* Immer diese Klassen verwenden, nie roh auf h1..h6 stylen. So bleibt die
   Dokumentstruktur frei wählbar, ohne dass sich das Aussehen ändert. */

.lx-hero-title {
  margin: 0;
  font-family: var(--lx-font-display);
  font-size: var(--lx-fs-hero);
  line-height: var(--lx-lh-hero);
  font-weight: var(--lx-w-bold);
  letter-spacing: var(--lx-tracking-tight);
}

.lx-h1 { margin: 0; font-family: var(--lx-font-display); font-size: var(--lx-fs-h1); line-height: var(--lx-lh-h1); font-weight: var(--lx-w-bold); }
.lx-h2 { margin: 0; font-size: var(--lx-fs-h2); line-height: var(--lx-lh-h2); font-weight: var(--lx-w-bold); }
.lx-h3 { margin: 0; font-size: var(--lx-fs-h3); line-height: var(--lx-lh-h3); font-weight: var(--lx-w-bold); }
.lx-h4 { margin: 0; font-size: var(--lx-fs-h4); line-height: var(--lx-lh-h4); font-weight: var(--lx-w-bold); }
.lx-h5 { margin: 0; font-size: var(--lx-fs-h5); line-height: var(--lx-lh-h5); font-weight: var(--lx-w-bold); }

/* Kurzes Wort in Grossbuchstaben über jedem Sektionstitel. */
.lx-eyebrow {
  margin: 0;
  font-size: var(--lx-fs-eyebrow);
  line-height: 1;
  font-weight: var(--lx-w-semibold);
  letter-spacing: var(--lx-tracking-eyebrow);
  text-transform: uppercase;
  color: var(--lx-accent-text);
}

/* Wie Eyebrow, aber fett und als eigenständige Zeile über dem Hero. */
.lx-kicker {
  margin: 0;
  font-size: var(--lx-fs-eyebrow);
  line-height: var(--lx-lh-eyebrow);
  font-weight: var(--lx-w-bold);
  letter-spacing: var(--lx-tracking-eyebrow);
  text-transform: uppercase;
  color: var(--lx-accent-text);
}

.lx-lead {
  margin: 0;
  max-width: var(--lx-measure);
  font-size: var(--lx-fs-lead);
  line-height: var(--lx-lh-lead);
  font-weight: var(--lx-w-medium);
}

.lx-body { margin: 0; font-size: var(--lx-fs-body); line-height: 1.6; max-width: var(--lx-measure); }
.lx-small { font-size: var(--lx-fs-small); line-height: var(--lx-lh-small); }

.lx-muted { color: var(--lx-text-muted); }
.lx-faint { color: var(--lx-text-faint); }
.lx-accent-text { color: var(--lx-accent-text); }

.lx-link { color: var(--lx-accent-text); text-decoration: underline; text-underline-offset: 3px; }
.lx-link:hover { color: var(--lx-accent-hover); }

.lx-code {
  font-family: var(--lx-font-mono);
  font-size: 0.9em;
  padding: 2px 6px;
  border-radius: var(--lx-r-xs);
  background: var(--lx-accent-soft);
  color: var(--lx-accent-text);
}

/* --- Hilfsklassen --------------------------------------------------------- */

.lx-center { text-align: center; }
.lx-nowrap { white-space: nowrap; }
.lx-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Nur für Screenreader, optisch entfernt aber vorlesbar. */
.lx-sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.lx-hide { display: none !important; }

/* Liste ohne Punkte und Einzug, wenn die Semantik <ol>/<ul> verlangt,
   die Optik aber von der Komponente kommt. */
.lx-list-reset { list-style: none; margin: 0; padding: 0; }

/* Abstand nach oben, wenn zwei Blöcke innerhalb einer Sektion Luft brauchen.
   Ersetzt style="margin-top: …". Nur diese Stufen, keine weiteren erfinden. */
.lx-mt-1 { margin-top: var(--lx-space-1); }
.lx-mt-2 { margin-top: var(--lx-space-2); }
.lx-mt-3 { margin-top: var(--lx-space-3); }
.lx-mt-4 { margin-top: var(--lx-space-4); }
.lx-mt-5 { margin-top: var(--lx-space-5); }
.lx-mt-6 { margin-top: var(--lx-space-6); }
/* Schiebt ein Element an den unteren Rand seines Flex-Elternteils,
   damit Buttons in unterschiedlich hohen Karten auf einer Linie stehen. */
.lx-mt-auto { margin-top: auto; }

/* Gegenstück nach unten. Gleiche Stufen, keine weiteren erfinden. */
.lx-mb-0 { margin-bottom: 0; }
.lx-mb-1 { margin-bottom: var(--lx-space-1); }
.lx-mb-2 { margin-bottom: var(--lx-space-2); }
.lx-mb-3 { margin-bottom: var(--lx-space-3); }
.lx-mb-4 { margin-bottom: var(--lx-space-4); }
.lx-mb-5 { margin-bottom: var(--lx-space-5); }
.lx-mb-6 { margin-bottom: var(--lx-space-6); }

/* Bild oder Grafik mit Rahmen und Radius, passend zu .lx-card. */
.lx-figure { margin: 0; }
/* Nur direkte Kinder rahmen. Sonst erwischt die Regel auch jedes Icon,
   das irgendwo tiefer in der Abbildung steckt. */
.lx-figure > img,
.lx-figure > canvas,
.lx-figure > svg {
  width: 100%;
  border: 1px solid var(--lx-border);
  border-radius: var(--lx-r-lg);
}
.lx-figure figcaption { margin-top: var(--lx-space-1); font-size: var(--lx-fs-small); color: var(--lx-text-muted); }

/* Fläche mit festem Seitenverhältnis, etwa für ein Canvas.
   Verhältnis über --lx-ratio setzen, Standard ist 16 zu 9. */
.lx-media { width: 100%; aspect-ratio: var(--lx-ratio, 16 / 9); }

/* Nachgestellte Ansicht: sieht aus wie die Anwendung, ist aber nicht bedienbar.
   Immer zusätzlich aria-hidden setzen, damit Hilfstechnik sie überspringt. */
.lx-static { pointer-events: none; cursor: default; user-select: none; }

@media (max-width: 900px) {
  .lx-hide-mobile { display: none !important; }
  .lx-eyebrow, .lx-kicker { font-size: 12px; letter-spacing: 0.08em; }
}
@media (min-width: 901px) {
  .lx-hide-desktop { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ===== layout.css ======================================================== */
/* ============================================================================
   LIBERYX Design System · LAYOUT
   Container, Sektionen, Raster, Stapel. Kein Aussehen, nur Anordnung.
   Setzt css/tokens.css voraus.
   ========================================================================== */

/* Inhaltsbreite 1312 px, entspricht 100 px Rand auf dem 1512er Artboard. */
.lx-container {
  width: 100%;
  max-width: var(--lx-content);
  margin-inline: auto;
  padding-inline: var(--lx-gutter);
}

.lx-container--narrow { max-width: 860px; }
.lx-container--wide { max-width: var(--lx-page); }

.lx-section { position: relative; padding-block: var(--lx-space-7); }
.lx-section--tight { padding-block: var(--lx-space-6); }
.lx-section--flush { padding-block: 0; }
.lx-section--sunken { background: var(--lx-bg-sunken); }

/* Hero: im Figma 120 px oben, 100 px unten. */
.lx-hero { padding-block: 120px 100px; }

/* Sektionskopf: Eyebrow, Titel, Lead. Zentriert, wie im Figma. */
.lx-section-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--lx-space-3);
  text-align: center;
  margin-bottom: var(--lx-space-6);
}
.lx-section-head--start { align-items: flex-start; text-align: left; }
/* Im Hero folgt kein Raster mehr, dort entfällt der Abstand nach unten. */
.lx-section-head--flush { margin-bottom: 0; }

/* --- Raster --------------------------------------------------------------- */

.lx-grid { display: grid; gap: var(--lx-space-3); }
.lx-grid > * { min-width: 0; }        /* sonst sprengt breiter Inhalt die Spalte */

.lx-grid--2 { grid-template-columns: repeat(2, 1fr); }
.lx-grid--3 { grid-template-columns: repeat(3, 1fr); }
.lx-grid--4 { grid-template-columns: repeat(4, 1fr); }
.lx-grid--sidebar { grid-template-columns: minmax(0, 1fr) 380px; gap: var(--lx-space-6); }
.lx-grid--auto { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

.lx-grid--gap-lg { gap: var(--lx-space-5); }
.lx-grid--gap-sm { gap: var(--lx-space-1); }

/* --- Stapel und Reihen ---------------------------------------------------- */

.lx-stack { display: flex; flex-direction: column; gap: var(--lx-space-3); }
.lx-stack--sm { gap: var(--lx-space-1); }
.lx-stack--lg { gap: var(--lx-space-5); }

.lx-row { display: flex; align-items: center; gap: var(--lx-space-1); flex-wrap: wrap; }
.lx-row--between { justify-content: space-between; }
.lx-row--center { justify-content: center; }
.lx-row--end { justify-content: flex-end; }
.lx-row--top { align-items: flex-start; }
.lx-row--nowrap { flex-wrap: nowrap; }

.lx-spacer { flex: 1 1 auto; }
.lx-divider { height: 1px; background: var(--lx-border); margin-block: var(--lx-space-4); }
.lx-divider--vertical { width: 1px; height: auto; align-self: stretch; margin: 0 var(--lx-space-3); }

/* --- Lesefortschritt ------------------------------------------------------ */
/* Dünne Leiste direkt unter dem klebenden Kopf. Sie zeigt, wie weit die Seite
   noch geht. Wo sie sitzt, steuert --lx-scrollbar-top: im Marketing unter dem
   80er Kopf, in der Anwendung unter der Topbar.

   Moderne Browser rechnen den Fortschritt selbst über eine scroll-getriebene
   Animation, ganz ohne Skript. Wo das fehlt, setzt js/liberyx.js die Variable
   --lx-scroll. Beide Wege enden bei derselben CSS-Regel. */

.lx-scrollbar {
  position: fixed;
  top: var(--lx-scrollbar-top, var(--lx-header-h));
  left: 0;
  right: 0;
  height: 3px;
  z-index: calc(var(--lx-z-sticky) + 1);
  background: var(--lx-accent);
  box-shadow: 0 0 12px var(--lx-accent-border);
  transform: scaleX(var(--lx-scroll, 0));
  transform-origin: 0 50%;
  pointer-events: none;
  will-change: transform;
}

/* Ohne Skript: der Fortschritt kommt direkt aus der Scrollposition. */
@supports (animation-timeline: scroll()) {
  .lx-scrollbar {
    transform: scaleX(0);
    animation: lx-scrollbar linear both;
    animation-timeline: scroll(root block);
  }
}

@keyframes lx-scrollbar {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

/* In der Anwendung scrollt nicht das Fenster, sondern die Inhaltsspalte. Eine
   scroll-getriebene Animation kann die von einem fixierten Element aus nicht
   erreichen, hier rechnet deshalb immer das Skript. */
.lx-app .lx-scrollbar {
  --lx-scrollbar-top: var(--lx-topbar-h);
  animation: none;
  transform: scaleX(var(--lx-scroll, 0));
}

@media (prefers-reduced-motion: reduce) {
  .lx-scrollbar { transition: none; }
}

/* --- Glow ----------------------------------------------------------------- */
/* Unscharfe Ellipsen hinter Hero- und Abschluss-Sektionen. Reine Dekoration,
   liegen hinter dem Inhalt, fangen keine Klicks. Masse in Prozent der Sektion,
   damit auf schmalen Geräten nie quer gescrollt wird. */

.lx-glow-wrap { position: relative; overflow: hidden; isolation: isolate; }

.lx-glow {
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  filter: blur(var(--lx-glow-blur));
  pointer-events: none;
}

.lx-glow--blue { background: radial-gradient(closest-side, var(--lx-c-blue-500), transparent); }
.lx-glow--orange { background: radial-gradient(closest-side, var(--lx-c-orange-500), transparent); }
.lx-glow--white { background: radial-gradient(closest-side, var(--lx-c-white), transparent); opacity: 0.35; }

.lx-glow--hero {
  width: min(1400px, 190%);
  aspect-ratio: 2 / 1;
  top: -22%;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0.55;
}

.lx-glow--warm {
  width: min(900px, 140%);
  aspect-ratio: 3 / 1;
  top: 25%;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0.3;
}

/* Seitlich versetzt, für Heroes mit zwei Lichtquellen wie im Figma. */
.lx-glow--side {
  width: min(1000px, 130%);
  aspect-ratio: 1.6 / 1;
  top: 5%;
  left: 8%;
  opacity: 0.35;
}

.lx-glow--cta {
  width: min(1100px, 170%);
  aspect-ratio: 2.6 / 1;
  bottom: -30%;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0.45;
}

/* --- Responsive ----------------------------------------------------------- */

@media (max-width: 1100px) {
  .lx-hero { padding-block: 96px 72px; }
  .lx-grid--3, .lx-grid--4 { grid-template-columns: repeat(2, 1fr); }
  .lx-grid--sidebar { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .lx-hero { padding-block: 64px 48px; }
  .lx-section-head { gap: var(--lx-space-2); margin-bottom: var(--lx-space-5); }
  .lx-grid--2 { grid-template-columns: 1fr; }
  .lx-grid { gap: var(--lx-space-4); }
}

@media (max-width: 600px) {
  .lx-grid--2, .lx-grid--3, .lx-grid--4, .lx-grid--auto { grid-template-columns: 1fr; }
}

/* ===== buttons.css ======================================================= */
/* ============================================================================
   LIBERYX Design System · BUTTONS
   Von Marketing und Anwendung gemeinsam genutzt. Masse aus den Figma-
   Komponenten Main-CTA, Second-CTA und Dashboard-CTA:
   200x50, Radius 10, Padding 15/20, Gap 10, Inter Medium 16.
   Hover ist im Figma als Variante hinterlegt: Blau nach #005CB9,
   Sekundär nach hellem Grau mit dunklem Text.
   ========================================================================== */

.lx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--lx-space-1);
  min-height: 50px;
  padding: var(--lx-space-2) var(--lx-space-3);
  border: 1px solid transparent;
  border-radius: var(--lx-r-md);
  font-family: inherit;
  font-size: var(--lx-fs-body);
  line-height: 1.25;
  font-weight: var(--lx-w-medium);
  color: var(--lx-text);
  background: none;
  text-align: center;
  cursor: pointer;
  user-select: none;
  transition: background-color var(--lx-dur) var(--lx-ease),
              color var(--lx-dur) var(--lx-ease),
              border-color var(--lx-dur) var(--lx-ease),
              box-shadow var(--lx-dur) var(--lx-ease);
}

/* --- Varianten ------------------------------------------------------------ */

.lx-btn--primary {
  background: var(--lx-accent);
  color: var(--lx-on-accent);
  box-shadow: var(--lx-shadow-btn);
}
.lx-btn--primary:hover { background: var(--lx-accent-hover); box-shadow: 0 2px 5px var(--lx-accent-hover); }

/* Weisser Rahmen mit weichem Schein, für dunkle Sektionen. */
.lx-btn--secondary {
  border-color: var(--lx-text);
  box-shadow: var(--lx-shadow-btn-light);
}
/* Figma: Hover des sekundären Buttons ist #D2D2D2 mit schwarzem Text. */
.lx-btn--secondary:hover { background: var(--lx-c-grey-200); color: var(--lx-c-black); border-color: var(--lx-c-grey-200); }

/* Dezenter Rahmen, der Arbeitspferd-Button in der Anwendung. */
.lx-btn--outline { border-color: var(--lx-border); }
.lx-btn--outline:hover { background: var(--lx-surface-hover); border-color: var(--lx-border-strong); }

.lx-btn--surface {
  background: var(--lx-surface);
  border-color: var(--lx-surface);
}
.lx-btn--surface:hover { background: var(--lx-surface-hover); border-color: var(--lx-surface-hover); }

/* Ohne Fläche und Rahmen, für Werkzeugleisten und Tabellenzeilen. */
.lx-btn--ghost { color: var(--lx-text-muted); }
.lx-btn--ghost:hover { background: var(--lx-surface-hover); color: var(--lx-text); }

.lx-btn--danger {
  background: var(--lx-danger);
  color: var(--lx-c-white);
  box-shadow: none;
}
.lx-btn--danger:hover { filter: brightness(1.08); }

.lx-btn--danger-quiet { color: var(--lx-danger); border-color: var(--lx-border); }
.lx-btn--danger-quiet:hover { background: var(--lx-danger-soft); border-color: var(--lx-danger); }

/* --- Grössen -------------------------------------------------------------- */
/* lg 50 px (Figma-Standard), md 40 px (Preiskarte), sm 35 px (Header) */

.lx-btn--md { min-height: 40px; padding: 0 var(--lx-space-3); font-weight: var(--lx-w-bold); }
.lx-btn--sm { min-height: 35px; padding: 0 var(--lx-space-3); font-size: var(--lx-fs-body); }
.lx-btn--xs { min-height: 28px; padding: 0 var(--lx-space-1); font-size: var(--lx-fs-small); border-radius: var(--lx-r-sm); }

/* Für Kopfzeilen auf dem Handy: optisch kompakt, aber 44 px Trefferfläche. */
.lx-btn--touch { min-height: 44px; }

.lx-btn--block { width: 100%; }
.lx-btn--pill { border-radius: var(--lx-r-pill); }

/* Quadratisch für ein einzelnes Symbol. Mindestens 44 px für den Daumen. */
.lx-btn--icon { width: 44px; min-height: 44px; padding: 0; }
.lx-btn--icon.lx-btn--sm { width: 35px; min-height: 35px; }

/* --- Zustände ------------------------------------------------------------- */

.lx-btn[disabled],
.lx-btn[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
  pointer-events: none;
}

.lx-btn[aria-busy="true"] { position: relative; color: transparent; pointer-events: none; }
.lx-btn[aria-busy="true"]::after {
  content: "";
  position: absolute;
  width: 16px; height: 16px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  color: var(--lx-on-accent);
  animation: lx-spin 0.7s linear infinite;
}
.lx-btn--outline[aria-busy="true"]::after,
.lx-btn--ghost[aria-busy="true"]::after { color: var(--lx-text); }

@keyframes lx-spin { to { transform: rotate(360deg); } }

/* --- Gruppe --------------------------------------------------------------- */
/* Mehrere Buttons als zusammenhängender Block, etwa Ansichtsumschalter. */

.lx-btn-group { display: inline-flex; }
.lx-btn-group .lx-btn { border-radius: 0; margin-left: -1px; }
.lx-btn-group .lx-btn:first-child { border-radius: var(--lx-r-md) 0 0 var(--lx-r-md); margin-left: 0; }
.lx-btn-group .lx-btn:last-child { border-radius: 0 var(--lx-r-md) var(--lx-r-md) 0; }
.lx-btn-group .lx-btn[aria-pressed="true"] { background: var(--lx-accent); color: var(--lx-on-accent); border-color: var(--lx-accent); }

/* --- Navigationslink ------------------------------------------------------ */
/* Pill im Header, Radius 8. Auf dem Handy wird daraus eine Zeile in der
   Schublade, siehe css/marketing.css. */

.lx-navlink {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 35px;
  padding: 0 var(--lx-space-1);
  border-radius: var(--lx-r-sm);
  font-size: var(--lx-fs-body);
  font-weight: var(--lx-w-medium);
  color: var(--lx-text);
  cursor: pointer;
}
.lx-navlink:hover { background: var(--lx-surface-hover); }
.lx-navlink[aria-current] { color: var(--lx-accent-text); }

/* --- Symbole -------------------------------------------------------------- */
/* Strichsymbole erben Farbe und Strichstärke vom Button. */

.lx-icon {
  width: 1em;
  height: 1em;
  flex: 0 0 auto;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}
.lx-icon--lg { width: 20px; height: 20px; }

@media (max-width: 600px) {
  .lx-btn--stack-mobile { width: 100%; }
}

/* ===== brand.css ========================================================= */
/* ============================================================================
   LIBERYX Design System · BRAND
   Wortmarke, Signet, Schutzraum, Logo-Animation und die Bausteine der
   Markenseite (pages/brand.html).
   Setzt css/tokens.css voraus. Erfindet keine Farben, Grössen oder Radien.

   Zwei Bauformen, beide tragen dieselben Klassen:
     a) eingebettetes <svg>  mit den Teilklassen .lx-brand-*  (Theme-fähig,
        animierbar, Schrift folgt currentColor)
     b) <img src="../brand/logo-*.svg">  (feste Farben, für Druck und E-Mail)
   ========================================================================== */

/* --- Wortmarke ------------------------------------------------------------ */
/* Seitenverhältnis 6:1 (1200x200 aus dem Figma). Gesteuert wird über die Höhe
   --lx-logo-h; die Breite folgt. Die Variable wird vererbt, Grössenklassen
   dürfen darum auch am Elternelement stehen (siehe Schutzraum). */

.lx-logo {
  --lx-logo-h: var(--lx-space-4);            /* 30 px Standardhöhe */
  display: block;
  width: calc(var(--lx-logo-h) * 6);
  max-width: 100%;
  height: auto;
  aspect-ratio: 6 / 1;
  color: inherit;                            /* Schrift folgt dem Textton */
}

/* Klickbare Hülle um die Wortmarke, etwa im Kopf oder in der Sidebar.
   Sie trägt die Trefferfläche, das SVG bleibt reine Grafik. */
.lx-logo-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: inherit;
}

/* --- Signet --------------------------------------------------------------- */
/* Quadratisch, 200x200. Für Favicon, App-Symbol, kleine Flächen und überall
   dort, wo die Wortmarke unter die Mindestgrösse fiele. */

.lx-mark {
  --lx-logo-h: var(--lx-space-4);
  display: block;
  width: var(--lx-logo-h);
  max-width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  color: inherit;
}

/* --- Teile ---------------------------------------------------------------- */
/* Buchstaben und i-Stamm tragen den Textton, Querbalken und Endpunkt das
   Markenblau. So funktioniert dieselbe Datei in beiden Themes. */

.lx-brand-letters,
.lx-brand-stem { fill: currentColor; }

.lx-brand-bar,
.lx-brand-dot { fill: var(--lx-accent); }

/* Einfarbig: für Prägung, Gravur, Stempel und einfarbigen Druck. */
.lx-logo--mono .lx-brand-bar,
.lx-logo--mono .lx-brand-dot,
.lx-mark--mono .lx-brand-bar { fill: currentColor; }

/* Feste Töne, wenn der Untergrund nicht vom Theme kommt (Bild, Farbfläche). */
.lx-logo--on-dark, .lx-mark--on-dark { color: var(--lx-c-white); }
.lx-logo--on-light, .lx-mark--on-light { color: var(--lx-c-black); }

/* --- Grössen -------------------------------------------------------------- */
/* Werte aus der Abstandsskala. Setzen nur die Variable, wirken darum auch
   auf einem Elternelement (Schutzraum-Rahmen, Lockup).
   Mindestgrösse Wortmarke ist --sm (20 px hoch, 120 px breit).
   --xs ist allein dem Signet vorbehalten. */

.lx-logo--xs, .lx-mark--xs { --lx-logo-h: var(--lx-space-2); }    /* 15 px */
.lx-logo--sm, .lx-mark--sm { --lx-logo-h: var(--lx-space-3); }    /* 20 px */
.lx-logo--md, .lx-mark--md { --lx-logo-h: var(--lx-space-4); }    /* 30 px */
.lx-logo--lg, .lx-mark--lg { --lx-logo-h: var(--lx-space-5); }    /* 40 px */
.lx-logo--xl, .lx-mark--xl { --lx-logo-h: var(--lx-space-6); }    /* 60 px */
.lx-logo--hero, .lx-mark--hero { --lx-logo-h: var(--lx-space-7); }/* 100 px */

@media (max-width: 900px) {
  .lx-logo--hero { --lx-logo-h: var(--lx-space-6); }
  .lx-logo--xl { --lx-logo-h: var(--lx-space-5); }
}

/* --- Schutzraum ----------------------------------------------------------- */
/* Ringsum ein Viertel der Logohöhe frei halten. Das entspricht ungefähr der
   Kantenlänge des blauen Endpunkts. Nichts darf hineinragen: kein Text, keine
   Linie, keine Bildkante. */

.lx-logo-guard {
  display: inline-block;
  padding: calc(var(--lx-logo-h, var(--lx-space-4)) / 4);
}

/* Nur zur Erklärung auf der Markenseite: macht den Schutzraum sichtbar. */
.lx-logo-guard--shown {
  background: var(--lx-accent-soft);
  outline: 1px dashed var(--lx-accent-border);
  outline-offset: -1px;
}

/* --- Lockup --------------------------------------------------------------- */
/* Wortmarke plus ein einzelnes Zusatzwort, getrennt durch eine Haarlinie.
   Nur für Produktnamen wie «Portal». Nie ein Claim, nie zwei Wörter. */

.lx-lockup {
  display: inline-flex;
  align-items: center;
  gap: var(--lx-space-1);
}
.lx-lockup__rule {
  width: 1px;
  align-self: stretch;
  background: var(--lx-border);
}
.lx-lockup__word {
  font-size: var(--lx-fs-eyebrow);
  line-height: 1;
  font-weight: var(--lx-w-semibold);
  letter-spacing: var(--lx-tracking-eyebrow);
  text-transform: uppercase;
  color: var(--lx-text-muted);
}

/* --- Animation ------------------------------------------------------------ */
/* Aufbau der Wortmarke, übernommen aus der bestehenden Anwendung:
     1. grosses I  (Stamm auf voller Höhe, kein Querbalken)
     2. Stamm verkürzt sich zum kleinen i, blauer Punkt erscheint darüber
     3. der Punkt wächst nach links zum Querbalken
     4. der quadratische Endpunkt hinter dem X ploppt auf
   Eine gemeinsame Zeitachse von 6 s, damit --loop nahtlos wiederholt.
   Die eigentliche Bewegung dauert wie bisher rund 2,8 s, danach steht das
   Logo ruhig. Die Kurve stammt unverändert aus der alten Fassung. */

.lx-logo, .lx-mark { --lx-logo-ease: cubic-bezier(0.2, 0.8, 0.2, 1); }

.lx-logo--animate .lx-brand-stem,
.lx-logo--loop .lx-brand-stem,
.lx-mark--animate .lx-brand-stem,
.lx-mark--loop .lx-brand-stem {
  transform-box: fill-box;
  transform-origin: 50% 100%;                /* wächst vom Boden her */
  animation: lx-brand-stem 6s var(--lx-logo-ease) both;
}

.lx-logo--animate .lx-brand-bar,
.lx-logo--loop .lx-brand-bar,
.lx-mark--animate .lx-brand-bar,
.lx-mark--loop .lx-brand-bar {
  transform-box: fill-box;
  transform-origin: 100% 50%;                /* wächst vom i-Stamm nach links */
  animation: lx-brand-bar 6s var(--lx-logo-ease) both;
}

.lx-logo--animate .lx-brand-dot,
.lx-logo--loop .lx-brand-dot {
  transform-box: fill-box;
  transform-origin: 50% 50%;
  animation: lx-brand-dot 6s var(--lx-logo-ease) both;
}

/* Endlos, für die Markenseite und Ladezustände. */
.lx-logo--loop .lx-brand-stem,
.lx-logo--loop .lx-brand-bar,
.lx-logo--loop .lx-brand-dot,
.lx-mark--loop .lx-brand-stem,
.lx-mark--loop .lx-brand-bar { animation-iteration-count: infinite; }

@keyframes lx-brand-stem {
  0%, 16.8%   { transform: scaleY(1.538); }  /* volle Höhe, grosses I */
  23.1%, 100% { transform: scaleY(1); }      /* Höhe des kleinen i */
}

@keyframes lx-brand-bar {
  0%, 19.3%     { transform: scaleX(0.34); opacity: 0; }  /* noch unsichtbar */
  23.8%, 27.6%  { transform: scaleX(0.34); opacity: 1; }  /* Punkt über dem i */
  38.3%, 100%   { transform: scaleX(1); opacity: 1; }     /* wird zum Balken */
}

@keyframes lx-brand-dot {
  0%, 39.2%   { opacity: 0; transform: scale(0); }
  43.7%       { opacity: 1; transform: scale(1.3); }
  46.7%, 100% { opacity: 1; transform: scale(1); }
}

/* Ohne Bewegung steht das fertige Logo sofort da. */
@media (prefers-reduced-motion: reduce) {
  .lx-logo--animate .lx-brand-stem,
  .lx-logo--animate .lx-brand-bar,
  .lx-logo--animate .lx-brand-dot,
  .lx-logo--loop .lx-brand-stem,
  .lx-logo--loop .lx-brand-bar,
  .lx-logo--loop .lx-brand-dot,
  .lx-mark--animate .lx-brand-stem,
  .lx-mark--animate .lx-brand-bar {
    animation: none;
    transform: none;
    opacity: 1;
  }
}

/* ============================================================================
   BAUSTEINE DER MARKENSEITE
   Farbfelder, Beispielflächen, richtig und falsch. Nur für pages/brand.html
   und die Dokumentation, nicht für Produktoberflächen.
   ========================================================================== */

/* --- Farbfeld ------------------------------------------------------------- */

.lx-swatch {
  border: 1px solid var(--lx-border-faint);
  border-radius: var(--lx-r-md);
  overflow: hidden;
  background: var(--lx-surface);
}
.lx-swatch__chip { height: var(--lx-space-7); }
.lx-swatch__meta {
  padding: var(--lx-space-1) var(--lx-space-2);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.lx-swatch__name { font-size: var(--lx-fs-body); font-weight: var(--lx-w-semibold); }
.lx-swatch__value {
  font-family: var(--lx-font-mono);
  font-size: var(--lx-fs-small);
  color: var(--lx-text-muted);
}

/* --- Beispielfläche ------------------------------------------------------- */
/* Zeigt das Logo auf einem definierten Untergrund. */

.lx-stage-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 140px;
  padding: var(--lx-space-4);
  border-radius: var(--lx-r-md);
  border: 1px solid var(--lx-border-faint);
}
.lx-stage-tile--dark { background: var(--lx-c-grey-900); color: var(--lx-c-white); }
.lx-stage-tile--light { background: var(--lx-c-paper); color: var(--lx-c-black); }
.lx-stage-tile--sand { background: var(--lx-c-sand); color: var(--lx-c-black); }
.lx-stage-tile--navy { background: var(--lx-c-navy-900); color: var(--lx-c-white); }
.lx-stage-tile--blue { background: var(--lx-accent); color: var(--lx-c-white); }

/* --- Richtig und falsch --------------------------------------------------- */

.lx-usage { display: flex; flex-direction: column; gap: var(--lx-space-1); }

.lx-usage__frame {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 140px;
  padding: var(--lx-space-4);
  overflow: hidden;
  border-radius: var(--lx-r-md);
  border: 1px solid var(--lx-border-faint);
  background: var(--lx-c-paper);
  color: var(--lx-c-black);
}

.lx-usage__label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--lx-fs-small);
  line-height: var(--lx-lh-small);
  font-weight: var(--lx-w-semibold);
}
.lx-usage__label::before {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  border-radius: var(--lx-r-pill);
  font-size: var(--lx-fs-small);
  color: var(--lx-c-white);
}
.lx-usage--do .lx-usage__label::before { content: "\2713"; background: var(--lx-success); }
.lx-usage--dont .lx-usage__label::before { content: "\2715"; background: var(--lx-danger); }
.lx-usage--dont .lx-usage__frame { border-color: var(--lx-danger); }

/* Die Fehlerfälle. Bewusst kaputt, ausschliesslich zur Anschauung. */
.lx-logo--err-stretch { transform: scaleX(1.45); }
.lx-logo--err-color { color: var(--lx-c-orange-500); }
.lx-logo--err-color .lx-brand-bar,
.lx-logo--err-color .lx-brand-dot { fill: var(--lx-c-green-500); }
.lx-logo--err-rotate { transform: rotate(-12deg); }
.lx-logo--err-shadow { filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.55)); } /* lint-ok: Gegenbeispiel, zeigt absichtlich falsche Verwendung */

/* Unruhiger Grund: Streifen aus vorhandenen Palettenwerten, kein neues Bild. */
.lx-usage__frame--noise {
  background:
    repeating-linear-gradient(
      45deg,
      var(--lx-c-blue-500) 0 18px,
      var(--lx-c-navy-900) 18px 36px,
      var(--lx-c-orange-500) 36px 54px,
      var(--lx-c-grey-100) 54px 72px
    );
}

/* ===== marketing.css ===================================================== */
/* ============================================================================
   LIBERYX Design System · MARKETING
   ----------------------------------------------------------------------------
   Komponenten der Marketing-Ebene: Header mit Navigationsschublade, Wortmarke,
   Karten, Feature-Kacheln, Preiskarten, Bänder, Testimonials, Kundenlogos,
   Statistiken, FAQ, Abschluss-CTA und Footer.

   Setzt voraus (in dieser Reihenfolge eingebunden):
     fonts/fonts.css · css/tokens.css · css/base.css · css/layout.css · css/buttons.css

   Regeln: nur Variablen aus tokens.css, kein rohes Hex, Präfix .lx-,
   Breakpoints ausschliesslich 1100 / 900 / 600 px.
   ========================================================================== */

/* ============================================================================
   1. SPRUNGMARKE
   Erste fokussierbare Stelle der Seite. Liegt ausserhalb des Bildes, bis sie
   per Tabulator erreicht wird, damit Tastaturnutzende den Header überspringen.
   ========================================================================== */

.lx-skiplink {
  position: absolute;
  top: var(--lx-space-1);
  left: var(--lx-space-1);
  z-index: var(--lx-z-overlay);
  padding: var(--lx-space-1) var(--lx-space-3);
  border-radius: var(--lx-r-md);
  background: var(--lx-accent);
  color: var(--lx-on-accent);
  font-weight: var(--lx-w-semibold);
  transform: translateY(calc(-100% - var(--lx-space-4)));
  transition: transform var(--lx-dur) var(--lx-ease);
}
.lx-skiplink:focus-visible { transform: translateY(0); }

/* ============================================================================
   2. WORTMARKE
   Schriftzug in Textfarbe, quadratischer Punkt in Markenblau. Der Punkt ist
   das einzige Markenzeichen im Header, deshalb bewusst klein und ruhig.
   ========================================================================== */

/* Die Wortmarke ist eine Markenkomponente und lebt in css/brand.css.
   Hier stand frueher eine Textfassung, die .lx-logo ueberschrieb. */

/* ============================================================================
   3. HEADER
   80 px hoch, klebend, Inhalt auf 1312 px begrenzt. Unter 900 px wird die
   Navigation zur Schublade hinter dem Menübutton.
   ========================================================================== */

.lx-header {
  position: sticky;
  top: 0;
  z-index: var(--lx-z-sticky);
  height: var(--lx-header-h);
  display: flex;
  align-items: center;
  background: var(--lx-bg);
  border-bottom: 1px solid var(--lx-border-faint);
}

.lx-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--lx-space-3);
  min-width: 0;
}

.lx-nav {
  display: flex;
  align-items: center;
  gap: var(--lx-space-1);
}

.lx-header__actions {
  display: flex;
  align-items: center;
  gap: var(--lx-space-1);
}
/* Beschriftungen im Header brechen nie um, sonst wächst der Header. */
.lx-header__actions .lx-btn { white-space: nowrap; }

/* Zweitaktion, die erst in der Schublade auftaucht. */
.lx-nav__cta { display: none; }

/* Menübutton. 44 px, damit er mit dem Daumen sicher zu treffen ist. */
.lx-burger {
  display: none;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--lx-border);
  border-radius: var(--lx-r-sm);
  background: none;
  color: var(--lx-text);
  cursor: pointer;
}
.lx-burger:hover { background: var(--lx-surface); }

/* Drei Striche aus einem Element plus zwei Pseudoelementen. Im offenen
   Zustand wird daraus ein Kreuz, gesteuert über data-open am Header. */
.lx-burger__icon {
  position: relative;
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: background-color var(--lx-dur) var(--lx-ease);
}
.lx-burger__icon::before,
.lx-burger__icon::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 2px;
  background: currentColor;
  transition: transform var(--lx-dur) var(--lx-ease);
}
.lx-burger__icon::before { transform: translateY(-6px); }
.lx-burger__icon::after { transform: translateY(6px); }

.lx-header[data-open] .lx-burger__icon { background: transparent; }
.lx-header[data-open] .lx-burger__icon::before { transform: rotate(45deg); }
.lx-header[data-open] .lx-burger__icon::after { transform: rotate(-45deg); }

/* ============================================================================
   4. KARTE
   Fläche, 1 px Rahmen, Radius 20. Karten tragen keinen Schlagschatten, der
   bleibt Buttons und der hervorgehobenen Preisstufe vorbehalten.
   ========================================================================== */

.lx-card {
  display: flex;
  flex-direction: column;
  gap: var(--lx-space-2);
  height: 100%;
  padding: var(--lx-space-4);
  border: 1px solid var(--lx-border);
  border-radius: var(--lx-r-lg);
  background: var(--lx-surface);
}

.lx-card--ghost { background: none; }

/* Ganze Karte anklickbar: Rahmen und Fläche reagieren gemeinsam. */
.lx-card--link { transition: background-color var(--lx-dur) var(--lx-ease), border-color var(--lx-dur) var(--lx-ease); }
.lx-card--link:hover { background: var(--lx-surface-hover); border-color: var(--lx-border-strong); }

.lx-card__icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: var(--lx-space-1);
  border-radius: var(--lx-r-md);
  background: var(--lx-accent-soft);
  color: var(--lx-accent);
}
.lx-card__icon .lx-icon { width: 20px; height: 20px; }

.lx-card__title {
  margin: 0;
  font-size: var(--lx-fs-h4);
  line-height: var(--lx-lh-h4);
  font-weight: var(--lx-w-bold);
}

.lx-card__text {
  margin: 0;
  font-size: var(--lx-fs-body);
  line-height: 1.6;
  color: var(--lx-text-muted);
}

/* Liste in der Karte, ohne Aufzählungszeichen, mit blauem Haken davor. */
.lx-card__list {
  margin: var(--lx-space-1) 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--lx-space-1);
  font-size: var(--lx-fs-body);
}
/* Der Punkt sitzt absolut, nicht als Flex-Geschwister. So darf ein Eintrag
   beliebig viele Kinder haben, etwa <strong>Titel:</strong> gefolgt von Text,
   ohne dass daraus zwei Spalten werden. */
.lx-card__list li {
  position: relative;
  padding-left: calc(var(--lx-space-1) + 6px);
}
/* Negativliste: was eine Lösung ausdrücklich nicht leistet. Das Kreuz ist ein
   eigenes Zeichen, damit die Abgrenzung nicht allein an der Farbe hängt. */
.lx-card__list--no li::before {
  width: 10px;
  height: 10px;
  top: 5px;
  border-radius: 0;
  background: none;
  border: 0;
  content: "\00d7";
  font-size: 14px;
  line-height: 10px;
  color: var(--lx-text-faint);
}

/* Nummerierte Liste in einer Karte. Die Reihenfolge ist die Information,
   deshalb bleiben die Zahlen und werden nicht durch Punkte ersetzt. */
.lx-card__list--ordered {
  counter-reset: lx-schritt;
  list-style: none;
}
.lx-card__list--ordered li { counter-increment: lx-schritt; }
.lx-card__list--ordered li::before {
  content: counter(lx-schritt) ".";
  position: absolute;
  left: 0;
  top: 0;
  width: auto;
  min-width: 16px;
  height: auto;
  border-radius: 0;
  background: none;
  font-variant-numeric: tabular-nums;
  font-weight: var(--lx-w-bold);
  color: var(--lx-accent-text);
}

/* Freistehende Liste ausserhalb einer Karte, gleiche Optik. */
.lx-bullets {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--lx-space-1);
}
/* Wie bei .lx-card__list sitzt der Punkt absolut. Als Flex-Geschwister würde
   ein Link im Eintrag zu einer eigenen Spalte und der Satz risse auf. */
.lx-bullets li { position: relative; padding-left: calc(var(--lx-space-1) + 6px); }
.lx-bullets li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 6px;
  height: 6px;
  border-radius: var(--lx-r-pill);
  background: var(--lx-accent);
}

.lx-card__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 6px;
  height: 6px;
  border-radius: var(--lx-r-pill);
  background: var(--lx-accent);
}

/* ============================================================================
   5. FEATURE-KACHEL MIT NUMMER
   Für Abläufe in Schritten. Die Nummer ersetzt das Symbol und macht die
   Reihenfolge auch dann sichtbar, wenn die Kacheln einspaltig untereinander
   stehen.
   ========================================================================== */

/* Reine Schrittliste ohne Titel: Nummer und Text rücken zusammen. */
.lx-tile--plain { gap: var(--lx-space-1); }

.lx-tile {
  display: flex;
  flex-direction: column;
  gap: var(--lx-space-2);
  height: 100%;
  padding: var(--lx-space-4);
  border: 1px solid var(--lx-border);
  border-radius: var(--lx-r-lg);
  background: var(--lx-surface);
}

.lx-tile__num {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: var(--lx-space-1);
  border: 1px solid var(--lx-accent-border);
  border-radius: var(--lx-r-md);
  background: var(--lx-accent-soft);
  color: var(--lx-accent);
  font-size: var(--lx-fs-h5);
  font-weight: var(--lx-w-bold);
  line-height: 1;
}

.lx-tile__title {
  margin: 0;
  font-size: var(--lx-fs-h5);
  line-height: var(--lx-lh-h5);
  font-weight: var(--lx-w-bold);
}

.lx-tile__text {
  margin: 0;
  font-size: var(--lx-fs-body);
  line-height: 1.6;
  color: var(--lx-text-muted);
}

/* ============================================================================
   6. PREISKARTE
   Figma «4_Preise»: Spalten à 300 px, Radius 20, Kopfbereich mit Name, Preis,
   Periode und Beschreibung, darunter Feature-Kästchen à 40 px, unten ein
   Button à 40 px. Die hervorgehobene Stufe trägt blauen Kopf und Glow.
   ========================================================================== */

.lx-price {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--lx-space-3);
  height: 100%;
  padding: var(--lx-space-4);
  border: 1px solid var(--lx-border);
  border-radius: var(--lx-r-lg);
  background: var(--lx-surface);
}

/* Der Kopf zieht sich in die Kartenecken, deshalb negative Aussenabstände. */
.lx-price__head {
  margin: calc(var(--lx-space-4) * -1) calc(var(--lx-space-4) * -1) 0;
  padding: var(--lx-space-4);
  border-bottom: 1px solid var(--lx-border-faint);
  border-radius: var(--lx-r-lg) var(--lx-r-lg) 0 0;
}

.lx-price__name {
  margin: 0;
  font-size: var(--lx-fs-h4);
  line-height: var(--lx-lh-h4);
  font-weight: var(--lx-w-bold);
}

.lx-price__amount {
  margin: var(--lx-space-1) 0 0;
  font-size: var(--lx-fs-h3);
  line-height: var(--lx-lh-h3);
  font-weight: var(--lx-w-bold);
}

/* Wenn eine Stufe noch keinen Preis hat, steht dort ein Satz statt einer Zahl. */
.lx-price__amount--offen { font-size: var(--lx-fs-h5); line-height: var(--lx-lh-h5); }

.lx-price__period {
  margin: 6px 0 0;
  font-size: var(--lx-fs-small);
  line-height: var(--lx-lh-small);
  color: var(--lx-text-muted);
}

.lx-price__desc {
  margin: var(--lx-space-2) 0 0;
  font-size: var(--lx-fs-small);
  line-height: var(--lx-lh-small);
  color: var(--lx-text-muted);
}

.lx-price__features {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--lx-space-1);
}

/* Jede Leistung ein eigenes Kästchen, 40 px hoch, damit die Karten trotz
   unterschiedlich langer Texte gleich ruhig wirken. */
.lx-price__feature {
  display: flex;
  align-items: center;
  gap: var(--lx-space-1);
  min-height: 40px;
  padding: 6px var(--lx-space-2);
  border: 1px solid var(--lx-border);
  border-radius: var(--lx-r-md);
  font-size: var(--lx-fs-small);
  line-height: var(--lx-lh-small);
  font-weight: var(--lx-w-bold);
}
.lx-price__feature .lx-icon { width: 14px; height: 14px; color: var(--lx-accent); }

/* Button sitzt immer am unteren Rand, egal wie lang die Liste ist. */
.lx-price > .lx-btn { margin-top: auto; }

/* Hervorgehobene Stufe: blauer Kopf, blauer Rahmen, Glow 0 0 20 Blau 80 %. */
.lx-price--featured {
  border-color: var(--lx-accent-border);
  box-shadow: var(--lx-shadow-featured);
}
.lx-price--featured .lx-price__head {
  background: var(--lx-accent);
  color: var(--lx-on-accent);
  border-bottom-color: transparent;
}
/* Volles Weiss statt 60 %: auf Blau reicht gedämpfter Text im Kontrast nicht. */
.lx-price--featured .lx-price__period,
.lx-price--featured .lx-price__desc { color: var(--lx-on-accent); }

.lx-price__badge {
  position: absolute;
  top: calc(var(--lx-space-3) * -1);
  right: var(--lx-space-3);
  padding: 4px var(--lx-space-1);
  border-radius: var(--lx-r-pill);
  background: var(--lx-text);
  color: var(--lx-text-inverse);
  font-size: var(--lx-fs-small);
  font-weight: var(--lx-w-bold);
  letter-spacing: var(--lx-tracking-eyebrow);
  text-transform: uppercase;
}

/* Fusszeile unter den Preiskarten, etwa Hinweis auf Mehrwertsteuer. */
.lx-price__note {
  margin: var(--lx-space-4) 0 0;
  text-align: center;
  font-size: var(--lx-fs-small);
  color: var(--lx-text-muted);
}

/* ============================================================================
   7. BAND
   Breite Karte über die volle Inhaltsbreite, Text links, Aktion rechts.
   Standardhöhe 200 px, schlanke Variante 120 px.
   ========================================================================== */

.lx-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--lx-space-5);
  min-height: 200px;
  padding: var(--lx-space-5);
  border: 1px solid var(--lx-border);
  border-radius: var(--lx-r-lg);
  background: var(--lx-surface);
}

.lx-band--slim { min-height: 120px; padding: var(--lx-space-4) var(--lx-space-5); }

/* Blau hinterlegt für Angebote, die auffallen sollen. */
.lx-band--accent {
  background: var(--lx-accent-soft);
  border-color: var(--lx-accent-border);
}

.lx-band__body {
  display: flex;
  flex-direction: column;
  gap: var(--lx-space-1);
  min-width: 0;
}

.lx-band__title {
  margin: 0;
  font-size: var(--lx-fs-h4);
  line-height: var(--lx-lh-h4);
  font-weight: var(--lx-w-bold);
}

.lx-band__text {
  margin: 0;
  max-width: var(--lx-measure);
  font-size: var(--lx-fs-body);
  line-height: 1.6;
  color: var(--lx-text-muted);
}

.lx-band__action { flex: 0 0 auto; }

/* Kleine Merkmalsliste im Band, etwa Zertifizierungen. */
.lx-band__items {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: var(--lx-space-1) var(--lx-space-4);
  font-size: var(--lx-fs-small);
  font-weight: var(--lx-w-semibold);
  color: var(--lx-text-muted);
}
.lx-band__items li { display: flex; align-items: center; gap: 6px; }
.lx-band__items .lx-icon { width: 14px; height: 14px; color: var(--lx-accent); }

/* ============================================================================
   8. TESTIMONIAL
   Zitat mit Autor und Rolle. Höhe 100 %, damit nebeneinander stehende Zitate
   unterschiedlicher Länge auf gleicher Grundlinie enden.
   ========================================================================== */

/* Quellenhinweis unter der Kennzahlenreihe. */
.lx-note {
  margin: var(--lx-space-2) 0 0;
  font-size: var(--lx-fs-small);
  line-height: var(--lx-lh-small);
  color: var(--lx-text-muted);
  text-align: center;
}

.lx-stats__note {
  margin: var(--lx-space-1) 0 0;
  font-size: var(--lx-fs-small);
  line-height: var(--lx-lh-small);
  color: var(--lx-text-muted);
  text-align: center;
}

.lx-quote {
  display: flex;
  flex-direction: column;
  gap: var(--lx-space-3);
  height: 100%;
  margin: 0;
  padding: var(--lx-space-4);
  border: 1px solid var(--lx-border);
  border-radius: var(--lx-r-lg);
  background: var(--lx-surface);
}

.lx-quote__text {
  margin: 0;
  font-size: var(--lx-fs-lead);
  line-height: var(--lx-lh-lead);
  font-weight: var(--lx-w-medium);
}

/* Autorzeile klebt unten, auch wenn das Zitat kurz ist. */
.lx-quote__author {
  display: flex;
  align-items: center;
  gap: var(--lx-space-2);
  margin-top: auto;
}

.lx-quote__avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: var(--lx-r-pill);
  background: var(--lx-accent-soft);
  /* Textfarbe statt Akzent: Blau auf blauer Fläche bliebe unter 4.5:1. */
  color: var(--lx-text);
  font-size: var(--lx-fs-eyebrow);
  font-weight: var(--lx-w-bold);
}

.lx-quote__name {
  display: block;
  font-size: var(--lx-fs-body);
  font-weight: var(--lx-w-semibold);
  font-style: normal;
}

.lx-quote__role {
  display: block;
  font-size: var(--lx-fs-small);
  line-height: var(--lx-lh-small);
  color: var(--lx-text-muted);
}

/* ============================================================================
   9. KUNDENLOGO-LEISTE
   Logos 30 px hoch, Graustufen und leicht zurückgenommen, damit sie den
   Sektionstitel nicht überstrahlen.
   ========================================================================== */

.lx-logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--lx-space-4) var(--lx-space-6);
}

.lx-logos__item {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  color: var(--lx-text-muted);
  font-size: var(--lx-fs-h5);
  font-weight: var(--lx-w-bold);
  filter: grayscale(1);
  opacity: 0.75;
  transition: opacity var(--lx-dur) var(--lx-ease);
}
.lx-logos__item:hover { opacity: 1; }
.lx-logos__item img,
.lx-logos__item svg { height: 30px; width: auto; }

/* ============================================================================
   10. STATISTIK-REIHE
   Grosse Zahl, kleines Label. Trennlinien statt Karten, damit die Reihe als
   ein Block gelesen wird.
   ========================================================================== */

.lx-stats {
  display: grid;
  /* Passt sich der Anzahl an, statt vier Spalten zu erzwingen. */
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  border: 1px solid var(--lx-border);
  border-radius: var(--lx-r-lg);
  background: var(--lx-surface);
  overflow: hidden;
}

/* Einzelne Kennzahl in der Reihe. Heisst bewusst .lx-stats__item und nicht
   .lx-stat, weil .lx-stat in css/app.css die Kennzahlkachel der Anwendung ist. */
.lx-stats__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: var(--lx-space-4) var(--lx-space-3);
  border-left: 1px solid var(--lx-border-faint);
  text-align: center;
}
.lx-stats__item:first-child { border-left: 0; }

.lx-stats__num {
  font-size: var(--lx-fs-h2);
  line-height: 1.1;
  font-weight: var(--lx-w-bold);
}

.lx-stats__label {
  font-size: var(--lx-fs-small);
  line-height: var(--lx-lh-small);
  color: var(--lx-text-muted);
}

/* ============================================================================
   11. FAQ
   Native <details>, damit Tastatur, Screenreader und Suchfunktion des Browsers
   ohne JavaScript funktionieren.
   ========================================================================== */

.lx-faq {
  display: flex;
  flex-direction: column;
  gap: var(--lx-space-1);
  max-width: 860px;
  margin-inline: auto;
}

.lx-faq__item {
  border: 1px solid var(--lx-border);
  border-radius: var(--lx-r-md);
  background: var(--lx-surface);
}
.lx-faq__item[open] { border-color: var(--lx-border-strong); }

.lx-faq__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--lx-space-3);
  min-height: 60px;
  padding: var(--lx-space-2) var(--lx-space-3);
  border-radius: var(--lx-r-md);
  font-size: var(--lx-fs-lead);
  font-weight: var(--lx-w-semibold);
  cursor: pointer;
  list-style: none;                   /* Standarddreieck aus */
}
.lx-faq__q::-webkit-details-marker { display: none; }
.lx-faq__q:hover { background: var(--lx-surface-hover); }

.lx-faq__arrow {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  color: var(--lx-accent);
  transition: transform var(--lx-dur) var(--lx-ease);
}
.lx-faq__item[open] .lx-faq__arrow { transform: rotate(180deg); }

.lx-faq__a {
  margin: 0;
  padding: 0 var(--lx-space-3) var(--lx-space-3);
  font-size: var(--lx-fs-body);
  line-height: 1.6;
  color: var(--lx-text-muted);
}

/* ============================================================================
   12. ABSCHLUSS-CTA
   Band am Seitenende mit eigenem Glow. Eigener Stapelkontext, damit die
   Ellipse hinter dem Text bleibt und nicht über den Rand tritt.
   ========================================================================== */

.lx-cta {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--lx-space-3);
  padding: var(--lx-space-6) var(--lx-space-5);
  border: 1px solid var(--lx-border);
  border-radius: var(--lx-r-xl);
  background: var(--lx-surface);
  text-align: center;
}

.lx-cta__title {
  margin: 0;
  font-size: var(--lx-fs-h2);
  line-height: var(--lx-lh-h2);
  font-weight: var(--lx-w-bold);
}

.lx-cta__text {
  margin: 0;
  max-width: var(--lx-measure);
  font-size: var(--lx-fs-lead);
  line-height: var(--lx-lh-lead);
  color: var(--lx-text-muted);
}

.lx-cta__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--lx-space-2);
  margin-top: var(--lx-space-1);
}

/* ============================================================================
   13. FOOTER
   Vier Spalten: Marke, Produkt, Inhalte, Unternehmen. Darunter die Rechtszeile.
   ========================================================================== */

.lx-footer {
  border-top: 1px solid var(--lx-border-faint);
  background: var(--lx-bg-sunken);
  padding-block: var(--lx-space-6) var(--lx-space-4);
}

.lx-footer__cols {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: var(--lx-space-5);
}

.lx-footer__brand {
  display: flex;
  flex-direction: column;
  gap: var(--lx-space-2);
  max-width: 320px;
}

/* Eine Spalte im Footer. Klammert Titel und Liste zusammen. */
.lx-footer__col { display: flex; flex-direction: column; gap: var(--lx-space-1); }

.lx-footer__title {
  margin: 0 0 var(--lx-space-2);
  font-size: var(--lx-fs-eyebrow);
  line-height: 1;
  font-weight: var(--lx-w-semibold);
  letter-spacing: var(--lx-tracking-eyebrow);
  text-transform: uppercase;
  color: var(--lx-text-muted);
}

.lx-footer__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.lx-footer__link {
  display: flex;
  align-items: center;
  min-height: 32px;
  color: var(--lx-text-muted);
  transition: color var(--lx-dur) var(--lx-ease);
}
.lx-footer__link:hover { color: var(--lx-text); }
/* Aktive Seite auch optisch, nicht nur für Hilfstechnik. */
.lx-footer__link[aria-current] { color: var(--lx-text); font-weight: var(--lx-w-semibold); }

/* Aktionen und Sozialsymbole in der Markenspalte des Fusses. */
.lx-footer__actions { display: flex; flex-wrap: wrap; gap: var(--lx-space-1); margin-top: var(--lx-space-2); }

.lx-footer__soc { display: flex; gap: var(--lx-space-xs); }
.lx-footer__soc a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--lx-border);
  border-radius: var(--lx-r-sm);
  color: var(--lx-text-muted);
  transition: color var(--lx-dur) var(--lx-ease), border-color var(--lx-dur) var(--lx-ease);
}
.lx-footer__soc a:hover { color: var(--lx-text); border-color: var(--lx-border-strong); }
.lx-footer__soc svg { width: 18px; height: 18px; }

.lx-footer__legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--lx-space-2) var(--lx-space-4);
  margin-top: var(--lx-space-6);
  padding-top: var(--lx-space-4);
  border-top: 1px solid var(--lx-border-faint);
  font-size: var(--lx-fs-small);
  color: var(--lx-text-muted);
}

.lx-footer__legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--lx-space-1) var(--lx-space-3);
}
.lx-footer__legal-links a:hover { color: var(--lx-text); }

/* ============================================================================
   14. HELLES THEME
   Die Glows sind für den dunklen Grund gebaut. Auf hellem Papier werden sie
   sonst zu Farbflecken, deshalb deutlich zurückgenommen.
   ========================================================================== */

[data-theme="light"] .lx-glow { opacity: 0.18; }
[data-theme="light"] .lx-glow--white { opacity: 0; }   /* Weiss auf Papier unsichtbar */

/* Auf hellem Grund braucht der Kartenrand etwas mehr Halt. */
[data-theme="light"] .lx-card,
[data-theme="light"] .lx-tile,
[data-theme="light"] .lx-price,
[data-theme="light"] .lx-band,
[data-theme="light"] .lx-quote,
[data-theme="light"] .lx-stats,
[data-theme="light"] .lx-faq__item,
[data-theme="light"] .lx-cta { box-shadow: var(--lx-shadow-card); }

/* ============================================================================
   15. RESPONSIVE
   Nur die drei Stufen aus tokens.css: 1100 Tablet, 900 Handy, 600 schmal.
   ========================================================================== */

@media (max-width: 1100px) {
  /* Vier Statistiken passen nicht mehr nebeneinander, zwei Reihen à zwei. */
  .lx-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lx-stats__item:nth-child(3) { border-left: 0; }
  .lx-stats__item:nth-child(n + 3) { border-top: 1px solid var(--lx-border-faint); }

  .lx-footer__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lx-footer__brand { grid-column: 1 / -1; max-width: none; }
}

@media (max-width: 900px) {
  /* Header trägt nur noch Wortmarke, primären CTA und Menübutton. */
  .lx-burger { display: inline-flex; }
  .lx-header__actions .lx-btn--outline { display: none; }
  /* Wortmarke im Kopf eine Stufe kleiner. Gesteuert wird die Höhe. */
  .lx-header .lx-logo { --lx-logo-h: var(--lx-space-3); }

  /* Navigation als Schublade unter dem Header. Sie wird vom Skript über
     data-open am .lx-header geöffnet, nicht über eine eigene Klasse. */
  .lx-nav {
    display: none;
    position: fixed;
    top: var(--lx-header-h);
    left: 0;
    right: 0;
    z-index: var(--lx-z-drawer);
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    max-height: calc(100dvh - var(--lx-header-h));
    padding: var(--lx-space-2) var(--lx-gutter) var(--lx-space-4);
    background: var(--lx-bg);
    border-bottom: 1px solid var(--lx-border);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .lx-header[data-open] .lx-nav { display: flex; }

  /* Zeilen statt Pillen: 48 px hoch, volle Breite, mit dem Daumen treffbar. */
  .lx-nav .lx-navlink {
    min-height: 48px;
    padding-inline: var(--lx-space-2);
    font-size: var(--lx-fs-lead);
  }
  .lx-nav__cta {
    display: inline-flex;
    width: 100%;
    margin-top: var(--lx-space-2);
  }

  /* Touch-Ziele: im Header und in den Preiskarten werden aus den kompakten
     35 bzw. 40 px die vollen 44 bzw. 50 px, damit der Daumen sicher trifft. */
  .lx-header__actions .lx-btn { min-height: 44px; }
  .lx-price > .lx-btn { min-height: 50px; }

  .lx-card,
  .lx-tile,
  .lx-price,
  .lx-quote { padding: var(--lx-space-3); }

  /* Band bricht auf: Text oben, Aktion darunter, Aktion volle Breite. */
  .lx-band,
  .lx-band--slim {
    flex-direction: column;
    align-items: flex-start;
    min-height: 0;
    padding: var(--lx-space-4) var(--lx-space-3);
  }
  .lx-band__action { width: 100%; }
  .lx-band__action .lx-btn { width: 100%; }

  .lx-cta { padding: var(--lx-space-5) var(--lx-space-3); }
  .lx-faq__q { min-height: 56px; font-size: var(--lx-fs-body); }

  .lx-logos { gap: var(--lx-space-3) var(--lx-space-5); }
  .lx-logos__item { height: 24px; font-size: var(--lx-fs-body); }

  /* Footer-Links werden zu Touch-Zielen. */
  .lx-footer__link { min-height: 44px; }
}

@media (max-width: 600px) {
  /* Enger Header: Wortmarke, CTA und Menübutton müssen in eine Zeile passen. */
  .lx-header__inner { gap: var(--lx-space-2); }
  .lx-header__actions .lx-btn { padding-inline: var(--lx-space-1); }

  .lx-stats { grid-template-columns: 1fr; }
  
.lx-stats__item { border-left: 0; }
  .lx-stats__item:nth-child(n + 2) { border-top: 1px solid var(--lx-border-faint); }

  .lx-footer__cols { grid-template-columns: 1fr; gap: var(--lx-space-4); }
  .lx-footer__legal { flex-direction: column; align-items: flex-start; }

  /* CTA-Paare stapeln sich und füllen die Breite, Höhe bleibt bei 50 px. */
  .lx-hero .lx-row,
  .lx-cta__actions,
  .lx-section-head .lx-row {
    flex-direction: column;
    align-self: stretch;
    width: 100%;
  }
  .lx-hero .lx-row .lx-btn,
  .lx-cta__actions .lx-btn,
  .lx-section-head .lx-row .lx-btn { width: 100%; }
}

/* Solange die Schublade offen ist, bleibt die Seite dahinter stehen. */
body:has(.lx-header[data-open]) { overflow: hidden; }

/* ===== app.css =========================================================== */
/* ============================================================================
   LIBERYX Design System · APP
   ----------------------------------------------------------------------------
   Die eingeloggte Anwendung: Gerüst (Sidebar + Inhaltsspalte), Topbar und alle
   Bausteine, die Daten anzeigen (Tabelle, Trefferliste, Kennzahl, Leerzustand).

   Setzt voraus: tokens.css, base.css, layout.css, buttons.css.
   Ergänzt diese nur, überschreibt sie nie.

   Grundgedanke: Marketing zeigt, die Anwendung arbeitet. Darum hier weniger
   Weissraum, kleinere Radien und ruhigere Flächen als auf den Landingpages.
   Alle Werte kommen aus tokens.css, es gibt kein rohes Hex.
   ========================================================================== */

/* ============================================================================
   1. GERÜST
   Zwei Spalten: Sidebar 260 px (--lx-sidebar-w), daneben die Inhaltsspalte.
   Die Inhaltsspalte bekommt minmax(0, 1fr), sonst sprengt eine breite Tabelle
   das Raster und die ganze Seite scrollt quer.
   ========================================================================== */

/* base.css setzt svg auf display:block. Das schlägt die Regel des Browsers für
   das hidden-Attribut, ein verstecktes Symbol bliebe also sichtbar. Diese eine
   Zeile stellt das für alle SVG im System richtig, auch für den Symbolvorrat
   am Anfang des Body. */
.lx-sprite { display: none; }

/* Rasterzellen oben ausrichten, statt sie auf die Höhe der längsten Spalte zu
   ziehen. Ergänzt .lx-grid aus layout.css, ohne es zu verändern. */
.lx-align-start { align-items: start; }

.lx-app {
  display: grid;
  grid-template-columns: var(--lx-sidebar-w) minmax(0, 1fr);
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--lx-bg);
}

/* Inhaltsspalte. Eigener Stapelkontext, damit die klebende Topbar nicht mit
   dem Schubladen-Overlay der Sidebar konkurriert. */
.lx-app__main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Der eigentliche Arbeitsbereich unter der Topbar. */
.lx-main {
  flex: 1 1 auto;
  padding: var(--lx-space-4) var(--lx-space-4) var(--lx-space-6);
  min-width: 0;
}

/* Seitenkopf im Arbeitsbereich: Titel links, Aktionen rechts. */
.lx-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--lx-space-3);
  flex-wrap: wrap;
  margin-bottom: var(--lx-space-4);
}

.lx-page-head__text { display: flex; flex-direction: column; gap: 6px; min-width: 0; }

/* ============================================================================
   2. SIDEBAR
   Klebt auf Desktopbreite über die volle Höhe und scrollt für sich allein,
   damit lange Navigationen den Inhalt nicht mitziehen.
   ========================================================================== */

.lx-sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--lx-bg-sunken);
  border-right: 1px solid var(--lx-border-faint);
  z-index: var(--lx-z-drawer);
}

/* Wortmarke, gleiche Höhe wie die Topbar, damit die Linien durchlaufen. */
.lx-sidebar__head {
  display: flex;
  align-items: center;
  gap: var(--lx-space-1);
  min-height: var(--lx-header-h);
  padding-inline: var(--lx-space-3);
  border-bottom: 1px solid var(--lx-border-faint);
  flex: 0 0 auto;
}

.lx-sidebar__nav {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: var(--lx-space-3) var(--lx-space-2);
}

.lx-sidebar__foot {
  flex: 0 0 auto;
  padding: var(--lx-space-2);
  border-top: 1px solid var(--lx-border-faint);
}

/* Wortmarke. Der Punkt hinter dem Namen ist das einzige Markenzeichen. */
/* Wortmarke: siehe css/brand.css. Fruehere Textfassung entfernt. */

/* --- Navigationsgruppen --------------------------------------------------- */

.lx-navgroup + .lx-navgroup { margin-top: var(--lx-space-3); }

.lx-navgroup__title {
  margin: 0 0 6px;
  padding-inline: var(--lx-space-1);
  font-size: var(--lx-fs-small);
  line-height: var(--lx-lh-small);
  font-weight: var(--lx-w-semibold);
  letter-spacing: var(--lx-tracking-eyebrow);
  text-transform: uppercase;
  color: var(--lx-text-faint);
}

.lx-navgroup__list { list-style: none; margin: 0; padding: 0; }

/* Zeile in der Sidebar. 44 px hoch, damit sie in der Schublade mit dem Daumen
   getroffen wird. Der aktive Zustand ist eine weiche Akzentfläche, keine
   Volltonfläche: die Sidebar soll ruhig bleiben. */
.lx-sidelink {
  display: flex;
  align-items: center;
  gap: var(--lx-space-1);
  min-height: 44px;
  padding: 0 var(--lx-space-1);
  border-radius: var(--lx-r-sm);
  color: var(--lx-text-muted);
  font-size: var(--lx-fs-body);
  font-weight: var(--lx-w-medium);
  transition: background-color var(--lx-dur) var(--lx-ease),
              color var(--lx-dur) var(--lx-ease);
}
.lx-sidelink:hover { background: var(--lx-surface-hover); color: var(--lx-text); }

.lx-sidelink[aria-current="page"] {
  background: var(--lx-accent-soft);
  color: var(--lx-accent);
  font-weight: var(--lx-w-semibold);
}
.lx-sidelink[aria-current="page"] .lx-icon { stroke-width: 2.2; }

/* Zähler am rechten Rand einer Navigationszeile. */
.lx-sidelink__count {
  margin-left: auto;
  font-size: var(--lx-fs-small);
  font-weight: var(--lx-w-semibold);
  color: var(--lx-text-faint);
  font-variant-numeric: tabular-nums;
}
.lx-sidelink[aria-current="page"] .lx-sidelink__count { color: var(--lx-accent); }

/* ============================================================================
   3. TOPBAR
   Klebt oben, trägt Menübutton (nur Handy), Suchfeld, Aktionen und Konto.
   ========================================================================== */

.lx-topbar {
  position: sticky;
  top: 0;
  z-index: var(--lx-z-sticky);
  display: flex;
  align-items: center;
  gap: var(--lx-space-2);
  min-height: var(--lx-header-h);
  padding-inline: var(--lx-space-4);
  background: var(--lx-bg);
  border-bottom: 1px solid var(--lx-border-faint);
}

/* Das Suchfeld darf wachsen, hat aber eine Obergrenze, sonst wandert das
   Konto-Menü auf breiten Schirmen an den äussersten Rand. */
.lx-topbar__search { flex: 1 1 420px; max-width: 520px; min-width: 0; }
.lx-topbar__actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }

/* Runder Punkt auf dem Glockensymbol, wenn es Neues gibt. */
.lx-topbar__dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  border-radius: var(--lx-r-pill);
  background: var(--lx-accent);
  border: 2px solid var(--lx-bg);
}
.lx-has-dot { position: relative; }

/* --- Konto-Menü ----------------------------------------------------------- */
/* Natives <details>: kein JS nötig, Tastatur und Screenreader funktionieren
   von sich aus. liberyx.js schliesst offene Menüs nur bei Klick daneben. */

.lx-menu-wrap { position: relative; }

.lx-menu-wrap > summary {
  display: flex;
  align-items: center;
  gap: var(--lx-space-1);
  min-height: 44px;
  padding: 0 var(--lx-space-1);
  border-radius: var(--lx-r-sm);
  cursor: pointer;
  list-style: none;
  color: var(--lx-text);
}
.lx-menu-wrap > summary::-webkit-details-marker { display: none; }
.lx-menu-wrap > summary:hover { background: var(--lx-surface-hover); }
.lx-menu-wrap[open] > summary { background: var(--lx-surface-hover); }
.lx-menu-wrap > summary .lx-icon { color: var(--lx-text-muted); }

.lx-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: var(--lx-z-overlay);
  min-width: 240px;
  padding: 6px;
  background: var(--lx-surface-raised);
  border: 1px solid var(--lx-border);
  border-radius: var(--lx-r-md);
  box-shadow: var(--lx-shadow-raised);
}

.lx-menu__label {
  padding: var(--lx-space-1);
  border-bottom: 1px solid var(--lx-border-faint);
  margin-bottom: 6px;
}

.lx-menu__item {
  display: flex;
  align-items: center;
  gap: var(--lx-space-1);
  width: 100%;
  min-height: 40px;
  padding: 0 var(--lx-space-1);
  border: 0;
  border-radius: var(--lx-r-sm);
  background: none;
  color: var(--lx-text);
  font-size: var(--lx-fs-body);
  text-align: left;
  cursor: pointer;
}
.lx-menu__item:hover { background: var(--lx-surface-hover); }
.lx-menu__item--danger { color: var(--lx-danger); }

/* ============================================================================
   4. PANEL
   Die Arbeitsfläche der Anwendung: Kopf, Körper, Fuss. Ersetzt in der App die
   Marketing-Karte. Radius 20 wie im Figma, aber ohne Schlagschatten.
   ========================================================================== */

.lx-panel {
  background: var(--lx-surface);
  border: 1px solid var(--lx-border-faint);
  border-radius: var(--lx-r-lg);
  overflow: hidden;          /* schneidet Tabellenecken sauber ab */
}

.lx-panel__head {
  display: flex;
  align-items: center;
  gap: var(--lx-space-2);
  flex-wrap: wrap;
  padding: var(--lx-space-2) var(--lx-space-3);
  border-bottom: 1px solid var(--lx-border-faint);
}
.lx-panel__title { margin: 0; font-size: var(--lx-fs-h5); font-weight: var(--lx-w-bold); }
.lx-panel__head .lx-row { margin-left: auto; }

.lx-panel__body { padding: var(--lx-space-3); }
.lx-panel__body--flush { padding: 0; }   /* für Tabellen und Listen */

.lx-panel__foot {
  display: flex;
  align-items: center;
  gap: var(--lx-space-2);
  flex-wrap: wrap;
  padding: var(--lx-space-2) var(--lx-space-3);
  border-top: 1px solid var(--lx-border-faint);
  background: var(--lx-bg-sunken);
}

/* Panel ohne Fläche, nur als Gruppierung. */
.lx-panel--quiet { background: none; border-style: dashed; }

/* ============================================================================
   5. TABELLE
   Klebender Kopf, dezentes Zebra, auf dem Handy Kartenliste.
   Wichtig: jedes <td> braucht data-label, sonst fehlt auf dem Handy die
   Beschriftung. Der Wrapper macht die Tabelle auf Tablets quer scrollbar,
   ohne dass die Seite scrollt.
   ========================================================================== */

.lx-table-wrap { width: 100%; overflow-x: auto; }

/* Klebender Kopf braucht einen eigenen Scrollbereich: ein Element klebt immer
   nur im nächsten scrollenden Vorfahren, und das ist hier der Wrapper, nicht
   die Seite. Darum die Variante mit fester Maximalhöhe. */
.lx-table-wrap--sticky { max-height: 60vh; overflow: auto; }

.lx-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--lx-fs-body);
}

.lx-table th,
.lx-table td {
  padding: var(--lx-space-1) var(--lx-space-3);
  text-align: left;
  vertical-align: middle;
}

/* 14 px ist die einzige Stufe zwischen 12 und 16 und daher der Kopfzeilenwert. */
.lx-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--lx-bg-sunken);
  font-size: var(--lx-fs-eyebrow);
  line-height: var(--lx-lh-eyebrow);
  font-weight: var(--lx-w-semibold);
  color: var(--lx-text-muted);
  white-space: nowrap;
  border-bottom: 1px solid var(--lx-border-faint);
}

.lx-table tbody tr { border-bottom: 1px solid var(--lx-border-faint); }
.lx-table tbody tr:last-child { border-bottom: 0; }
.lx-table tbody tr:nth-child(even) { background: color-mix(in srgb, var(--lx-text) 3%, transparent); }
.lx-table tbody tr:hover { background: var(--lx-surface-hover); }

.lx-table td { min-height: 44px; height: 44px; }

/* Zellen mit Zahlen rechtsbündig und mit gleicher Ziffernbreite. */
.lx-table .lx-num { text-align: right; font-variant-numeric: tabular-nums; }
.lx-table .lx-table__strong { font-weight: var(--lx-w-semibold); }

/* Aktionsspalte bleibt schmal und bricht nicht um. */
.lx-table /* Vergleichsmatrix: Ja und Nein tragen ein Zeichen, nicht nur eine Farbe. */
.lx-yes, .lx-no { display: inline-flex; align-items: center; gap: var(--lx-space-xs); }
.lx-yes { color: var(--lx-success); }
.lx-no { color: var(--lx-text-faint); }

.lx-table__actions { width: 1%; white-space: nowrap; text-align: right; }

/* ============================================================================
   6. TREFFERLISTE
   Titel, Metazeile, Auszug. Das Arbeitspferd der Rechtsrecherche.
   ========================================================================== */

.lx-list { list-style: none; margin: 0; padding: 0; }

.lx-list__item {
  display: block;
  padding: var(--lx-space-2) var(--lx-space-3);
  border-bottom: 1px solid var(--lx-border-faint);
}
.lx-list__item:last-child { border-bottom: 0; }
.lx-list__item:hover { background: var(--lx-surface-hover); }

/* Wenn die ganze Zeile ein Link ist, trägt sie den Fokusring. */
a.lx-list__item { color: inherit; }

.lx-list__title {
  margin: 0 0 4px;
  font-size: var(--lx-fs-lead);
  line-height: 1.3;
  font-weight: var(--lx-w-semibold);
  color: var(--lx-text);
}
a.lx-list__item:hover .lx-list__title { color: var(--lx-accent); }

/* Metazeile: Quelle, SR-Nummer, Datum. Punkte als Trenner, keine Striche. */
.lx-list__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px var(--lx-space-1);
  margin: 0 0 6px;
  font-size: var(--lx-fs-small);
  line-height: var(--lx-lh-small);
  color: var(--lx-text-muted);
}
.lx-list__meta > * + *::before {
  content: "·";
  margin-right: var(--lx-space-1);
  color: var(--lx-text-faint);
}

.lx-list__excerpt {
  margin: 0;
  font-size: var(--lx-fs-body);
  line-height: 1.5;
  color: var(--lx-text-muted);
  max-width: var(--lx-measure);
}
/* Fundstelle im Auszug. <mark> wird sonst gelb und bricht das Theme. */
.lx-list__excerpt mark {
  background: var(--lx-accent-soft);
  color: var(--lx-text);
  border-radius: var(--lx-r-xs);
  padding: 0 3px;
  font-weight: var(--lx-w-semibold);
}

.lx-list__foot { display: flex; flex-wrap: wrap; gap: 6px; margin-top: var(--lx-space-1); }

/* ============================================================================
   7. SCHLÜSSEL UND WERT
   Dokumentdetails: links die Bezeichnung, rechts der Wert. Auf dem Handy
   gestapelt, sonst wird die rechte Spalte zu schmal.
   ========================================================================== */

.lx-kv { margin: 0; display: grid; grid-template-columns: minmax(120px, 38%) minmax(0, 1fr); gap: var(--lx-space-1) var(--lx-space-2); }
.lx-kv dt { font-size: var(--lx-fs-small); color: var(--lx-text-muted); align-self: center; }
.lx-kv dd { margin: 0; font-size: var(--lx-fs-body); font-weight: var(--lx-w-medium); min-width: 0; overflow-wrap: anywhere; }
.lx-kv--stacked { grid-template-columns: 1fr; gap: 2px var(--lx-space-2); }

/* ============================================================================
   8. TABS
   Verhalten liefert liberyx.js über [data-lx-tabs].
   ========================================================================== */

/* Wurzel der Komponente. Traegt den Haken fuers Skript und den Abstand
   zwischen Reiterleiste und Inhalt. */
.lx-tabs { display: flex; flex-direction: column; gap: var(--lx-space-3); }

.lx-tabs__list {
  display: flex;
  gap: var(--lx-space-2);
  border-bottom: 1px solid var(--lx-border-faint);
  overflow-x: auto;
  scrollbar-width: none;
}
.lx-tabs__list::-webkit-scrollbar { display: none; }

.lx-tab {
  position: relative;
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0 2px;
  border: 0;
  background: none;
  color: var(--lx-text-muted);
  font-size: var(--lx-fs-body);
  font-weight: var(--lx-w-medium);
  cursor: pointer;
  white-space: nowrap;
}
.lx-tab:hover { color: var(--lx-text); }

/* Der aktive Reiter trägt einen 2 px starken Balken in Markenblau. */
.lx-tab[aria-selected="true"] { color: var(--lx-text); font-weight: var(--lx-w-semibold); }
.lx-tab[aria-selected="true"]::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  background: var(--lx-accent);
  border-radius: var(--lx-r-pill);
}

.lx-tabs__panel { padding-top: var(--lx-space-3); }
.lx-tabs__panel[hidden] { display: none; }

/* ============================================================================
   9. BROTKRUMEN
   ========================================================================== */

.lx-breadcrumb { margin: 0 0 var(--lx-space-1); padding: 0; list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: var(--lx-fs-small); color: var(--lx-text-muted); }
.lx-breadcrumb li { display: flex; align-items: center; gap: 6px; }
.lx-breadcrumb li + li::before { content: "›"; color: var(--lx-text-faint); }
.lx-breadcrumb a:hover { color: var(--lx-accent); }
.lx-breadcrumb [aria-current="page"] { color: var(--lx-text); font-weight: var(--lx-w-medium); }

/* ============================================================================
   10. SEITENZAHLEN
   ========================================================================== */

.lx-pagination { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.lx-pagination__list { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }

.lx-pagination__item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0 6px;
  border: 1px solid transparent;
  border-radius: var(--lx-r-sm);
  background: none;
  color: var(--lx-text-muted);
  font-size: var(--lx-fs-body);
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}
.lx-pagination__item:hover { background: var(--lx-surface-hover); color: var(--lx-text); }
.lx-pagination__item[aria-current="page"] {
  background: var(--lx-accent);
  border-color: var(--lx-accent);
  color: var(--lx-on-accent);
  font-weight: var(--lx-w-semibold);
}
.lx-pagination__gap { min-width: 24px; text-align: center; color: var(--lx-text-faint); }

/* ============================================================================
   11. AVATAR
   Initialen, weil es in der Anwendung keine Profilbilder gibt.
   ========================================================================== */

.lx-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  border-radius: var(--lx-r-pill);
  background: var(--lx-accent-soft);
  color: var(--lx-accent);
  font-size: var(--lx-fs-small);
  font-weight: var(--lx-w-bold);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.lx-avatar--lg { width: 44px; height: 44px; font-size: var(--lx-fs-body); }
.lx-avatar--solid { background: var(--lx-accent); color: var(--lx-on-accent); }

/* ============================================================================
   12. TASTENKAPPE
   Für Tastaturkürzel im Suchfeld und in Hilfetexten.
   ========================================================================== */

.lx-kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border: 1px solid var(--lx-border);
  border-bottom-width: 2px;
  border-radius: var(--lx-r-xs);
  background: var(--lx-surface-raised);
  color: var(--lx-text-muted);
  font-family: var(--lx-font-mono);
  font-size: var(--lx-fs-small);
  line-height: 1;
}

/* ============================================================================
   13. KENNZAHL
   Label, Wert, Trend. Der Trend ist grün bei Zuwachs, rot bei Rückgang,
   grau wenn er nichts bedeutet.
   ========================================================================== */

.lx-stat {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: var(--lx-space-2) var(--lx-space-3);
  background: var(--lx-surface);
  border: 1px solid var(--lx-border-faint);
  border-radius: var(--lx-r-lg);
}

.lx-stat__label {
  font-size: var(--lx-fs-small);
  line-height: var(--lx-lh-small);
  font-weight: var(--lx-w-semibold);
  letter-spacing: var(--lx-tracking-eyebrow);
  text-transform: uppercase;
  color: var(--lx-text-muted);
}

.lx-stat__value {
  font-size: var(--lx-fs-h3);
  line-height: 1.1;
  font-weight: var(--lx-w-bold);
  letter-spacing: var(--lx-tracking-tight);
  font-variant-numeric: tabular-nums;
}

.lx-stat__trend {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--lx-fs-small);
  line-height: var(--lx-lh-small);
  color: var(--lx-text-muted);
}
.lx-stat__trend--up { color: var(--lx-success); }
.lx-stat__trend--down { color: var(--lx-danger); }

/* ============================================================================
   14. LEERZUSTAND
   Symbol, ein Satz Erklärung, genau eine Aktion.
   ========================================================================== */

.lx-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--lx-space-2);
  padding: var(--lx-space-5) var(--lx-space-3);
}

.lx-empty__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: var(--lx-r-pill);
  background: var(--lx-accent-soft);
  color: var(--lx-accent);
}
.lx-empty__icon .lx-icon { width: 26px; height: 26px; }

.lx-empty__title { margin: 0; font-size: var(--lx-fs-h5); font-weight: var(--lx-w-bold); }
.lx-empty__text { margin: 0; max-width: 46ch; color: var(--lx-text-muted); line-height: 1.5; }

/* ============================================================================
   15. WERKBANK
   Dreispaltige Rechercheansicht: Filter, Treffer, Detail. Die Detailspalte
   weicht zuerst nach unten, weil sie ohne Auswahl ohnehin leer ist. Filter
   wandern erst auf dem Handy in ein <details> über der Trefferliste.
   ========================================================================== */

.lx-workbench {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr) 340px;
  gap: var(--lx-space-3);
  align-items: start;
}

/* Filter und Detail bleiben beim Scrollen der Treffer stehen. */
.lx-workbench__side,
.lx-workbench__detail {
  position: sticky;
  top: calc(var(--lx-header-h) + var(--lx-space-3));
  min-width: 0;
}
.lx-workbench__results { min-width: 0; }

@media (max-width: 1300px) {
  .lx-workbench { grid-template-columns: 260px minmax(0, 1fr); }
  .lx-workbench__detail { grid-column: 1 / -1; position: static; }
}

@media (max-width: 900px) {
  .lx-workbench { grid-template-columns: minmax(0, 1fr); }
  .lx-workbench__side { position: static; }
}

/* Filterspalte als natives <details>. Auf dem Handy klappt sie zu, auf dem
   Desktop ist sie eine gewöhnliche Spalte: dort wird die Zusammenfassung
   ausgeblendet, das Attribut open bleibt gesetzt und der Inhalt sichtbar.
   So braucht der Wechsel kein Skript und keine doppelte Auszeichnung. */
/* Koerper der Filterspalte. Auf dem Handy klappt ihn <details> weg. */
.lx-filters__body { display: flex; flex-direction: column; gap: var(--lx-space-3); }

.lx-filters__summary {
  display: flex;
  align-items: center;
  gap: var(--lx-space-1);
  min-height: 48px;
  padding-inline: var(--lx-space-3);
  cursor: pointer;
  list-style: none;
  font-weight: var(--lx-w-bold);
}
.lx-filters__summary::-webkit-details-marker { display: none; }
.lx-filters__summary:hover { background: var(--lx-surface-hover); }
.lx-filters__caret { margin-left: auto; color: var(--lx-text-muted); transition: transform var(--lx-dur) var(--lx-ease); }
.lx-filters[open] > .lx-filters__summary { border-bottom: 1px solid var(--lx-border-faint); }
.lx-filters[open] > .lx-filters__summary .lx-filters__caret { transform: rotate(180deg); }

@media (min-width: 901px) {
  .lx-filters__summary { display: none; }
}

/* ============================================================================
   16. ANMELDUNG
   Eigene Seite ohne App-Gerüst: eine zentrierte Karte, sonst nichts.
   ========================================================================== */

.lx-auth {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--lx-space-3);
  min-height: 100vh;
  min-height: 100dvh;
  padding: var(--lx-space-4) var(--lx-space-3);
  background: var(--lx-bg);
}

.lx-auth__card {
  width: 100%;
  max-width: 420px;
  padding: var(--lx-space-4);
  background: var(--lx-surface);
  border: 1px solid var(--lx-border-faint);
  border-radius: var(--lx-r-lg);
  box-shadow: var(--lx-shadow-card);
}

.lx-auth__foot { font-size: var(--lx-fs-small); color: var(--lx-text-muted); text-align: center; }

/* Der Theme-Umschalter sitzt oben rechts und stört die Karte nicht. */
.lx-auth__corner { position: absolute; top: var(--lx-space-2); right: var(--lx-space-2); }

@media (max-width: 600px) {
  .lx-auth { padding: var(--lx-space-3) var(--lx-space-2); justify-content: flex-start; padding-top: var(--lx-space-6); }
  .lx-auth__card { padding: var(--lx-space-3); }
}

/* ============================================================================
   17. SCHUBLADE UND SCRIM
   Unter 901 px wird die Sidebar zur Schublade. liberyx.js setzt data-open
   auf .lx-app (bzw. auf .lx-header im Marketing).
   ========================================================================== */

.lx-scrim {
  position: fixed;
  inset: 0;
  z-index: calc(var(--lx-z-drawer) - 1);
  /* Über color-mix aus der Palette abgeleitet, damit auch der Scrim keinen
     eigenen Farbwert einführt. tokens.css kennt keine Abdunkelungs-Rolle. */
  background: var(--lx-scrim);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--lx-dur) var(--lx-ease), visibility var(--lx-dur) var(--lx-ease);
}

/* ============================================================================
   18. RESPONSIVE
   ========================================================================== */

@media (max-width: 1100px) {
  .lx-main { padding: var(--lx-space-3) var(--lx-space-3) var(--lx-space-5); }
  .lx-topbar { padding-inline: var(--lx-space-3); }
}

/* Handy und kleines Tablet: eine Spalte, Sidebar fährt von links ein. */
@media (max-width: 900px) {
  .lx-app { grid-template-columns: minmax(0, 1fr); }

  .lx-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    height: auto;
    width: min(300px, 86vw);
    transform: translateX(-100%);
    transition: transform var(--lx-dur-slow) var(--lx-ease);
    box-shadow: var(--lx-shadow-overlay);
    visibility: hidden;
  }

  .lx-app[data-open] .lx-sidebar { transform: none; visibility: visible; }
  .lx-app[data-open] .lx-scrim { opacity: 1; visibility: visible; }

  /* Solange die Schublade offen ist, steht die Seite still. */
  body:has(.lx-app[data-open]) { overflow: hidden; }

  .lx-topbar__search { flex-basis: auto; }
  .lx-page-head { margin-bottom: var(--lx-space-3); }

  /* Auf Touchgeräten gibt es keine Tastatur für das Kürzel, der Hinweis nimmt
     dem Suchfeld dort nur Platz weg. */
  .lx-search__kbd { display: none; }
}

/* Handy: Tabelle wird Kartenliste. Jede Zeile ist eine Karte, jede Zelle
   trägt ihre Beschriftung aus data-label vor sich her. */
@media (max-width: 600px) {
  .lx-main { padding: var(--lx-space-2) var(--lx-space-2) var(--lx-space-5); }
  .lx-topbar { padding-inline: var(--lx-space-2); gap: 6px; }

  .lx-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .lx-table, .lx-table tbody, .lx-table tr, .lx-table td { display: block; width: 100%; }

  .lx-table tbody tr {
    padding: var(--lx-space-2);
    border: 1px solid var(--lx-border-faint);
    border-radius: var(--lx-r-md);
    margin-bottom: var(--lx-space-1);
    background: var(--lx-surface);
  }
  .lx-table tbody tr:nth-child(even) { background: var(--lx-surface); }

  .lx-table td {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--lx-space-2);
    height: auto;
    min-height: 0;
    padding: 4px 0;
    text-align: right;
  }
  .lx-table td::before {
    content: attr(data-label);
    flex: 0 0 auto;
    font-size: var(--lx-fs-small);
    font-weight: var(--lx-w-semibold);
    color: var(--lx-text-muted);
    text-align: left;
  }
  .lx-table td:empty { display: none; }
  .lx-table .lx-table__actions { width: auto; justify-content: flex-end; padding-top: var(--lx-space-1); }

  .lx-panel__body--flush .lx-table-wrap { padding: var(--lx-space-2); }

  .lx-list__item { padding: var(--lx-space-2); }
  .lx-kv { grid-template-columns: 1fr; gap: 2px; }
  .lx-kv dd { margin-bottom: var(--lx-space-1); }

  .lx-page-head { flex-direction: column; align-items: stretch; }
}

/* ===== forms.css ========================================================= */
/* ============================================================================
   LIBERYX Design System · FORMS
   ----------------------------------------------------------------------------
   Eingabeelemente für Anwendung und Anmeldung.

   Zwei Masse liegen allem zugrunde:
     Höhe  44 px  Daumenmass, passt neben .lx-btn--icon (ebenfalls 44)
     Radius 10 px (--lx-r-md), derselbe Wert wie beim Button

   Zustände werden über echte Attribute gesteuert, nicht über Zusatzklassen:
   [disabled], [readonly], [aria-invalid="true"]. So bleiben Aussehen und
   Barrierefreiheit zwangsläufig synchron.
   ========================================================================== */

/* ============================================================================
   1. FELD
   Klammer um Label, Kontrolle, Hilfetext und Fehlertext.
   ========================================================================== */

.lx-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }

.lx-label {
  font-size: var(--lx-fs-eyebrow);
  line-height: var(--lx-lh-eyebrow);
  font-weight: var(--lx-w-semibold);
  color: var(--lx-text);
}

/* Sternchen für Pflichtfelder. Der Screenreader bekommt required am Feld. */
.lx-label__req { color: var(--lx-accent); margin-left: 2px; }

.lx-hint {
  font-size: var(--lx-fs-small);
  line-height: var(--lx-lh-small);
  color: var(--lx-text-muted);
}

/* Fehlertext. Immer über aria-describedby mit dem Feld verbunden. */
.lx-error {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: var(--lx-fs-small);
  line-height: var(--lx-lh-small);
  font-weight: var(--lx-w-medium);
  color: var(--lx-danger);
}
.lx-error .lx-icon { width: 14px; height: 14px; margin-top: 1px; }

/* Feld mit Kontrolle links und Text rechts, etwa Kontrollkästchen. */
.lx-field--inline { flex-direction: row; align-items: center; gap: var(--lx-space-1); }

/* ============================================================================
   2. KONTROLLEN
   .lx-input, .lx-textarea und .lx-select teilen sich einen Sockel.
   ========================================================================== */

.lx-input,
.lx-textarea,
.lx-select {
  width: 100%;
  min-height: 44px;
  padding: 0 var(--lx-space-2);
  border: 1px solid var(--lx-border);
  border-radius: var(--lx-r-md);
  background: var(--lx-surface);
  color: var(--lx-text);
  font-family: inherit;
  font-size: var(--lx-fs-body);
  line-height: 1.25;
  transition: border-color var(--lx-dur) var(--lx-ease),
              box-shadow var(--lx-dur) var(--lx-ease),
              background-color var(--lx-dur) var(--lx-ease);
}

.lx-input::placeholder,
.lx-textarea::placeholder { color: var(--lx-text-faint); }

.lx-input:hover:not([disabled]):not([readonly]),
.lx-textarea:hover:not([disabled]):not([readonly]),
.lx-select:hover:not([disabled]) { border-color: var(--lx-border-strong); }

/* Fokus: Rahmen wird blau und bekommt einen weichen Ring. Der Ring nutzt
   --lx-accent-soft, damit er in beiden Themes sichtbar bleibt.
   :focus-visible aus base.css bleibt zusätzlich aktiv (Tastatur). */
.lx-input:focus,
.lx-textarea:focus,
.lx-select:focus {
  outline: none;
  border-color: var(--lx-accent);
  box-shadow: 0 0 0 3px var(--lx-accent-soft);
}
.lx-input:focus-visible,
.lx-textarea:focus-visible,
.lx-select:focus-visible { outline: 2px solid var(--lx-focus); outline-offset: 1px; }

.lx-textarea {
  min-height: 120px;
  padding: var(--lx-space-1) var(--lx-space-2);
  line-height: 1.5;
  resize: vertical;
}

/* --- Zustände ------------------------------------------------------------- */

.lx-input[aria-invalid="true"],
.lx-textarea[aria-invalid="true"],
.lx-select[aria-invalid="true"] { border-color: var(--lx-danger); background: var(--lx-danger-soft); }

.lx-input[aria-invalid="true"]:focus,
.lx-textarea[aria-invalid="true"]:focus,
.lx-select[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px var(--lx-danger-soft); }

.lx-input[disabled],
.lx-textarea[disabled],
.lx-select[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  background: var(--lx-bg-sunken);
}

/* Nur lesbar: sieht aus wie Text, bleibt aber fokussierbar und kopierbar. */
.lx-input[readonly],
.lx-textarea[readonly] { background: var(--lx-bg-sunken); color: var(--lx-text-muted); }

/* --- Auswahlliste --------------------------------------------------------- */
/* Eigener Pfeil als Inline-SVG in der Datei-URL, damit keine externe Grafik
   nötig ist. Die Farbe steckt im SVG und ist der Grauton --lx-c-grey-300;
   in beiden Themes lesbar, darum eine Grafik für alle Fälle. */

.lx-select {
  appearance: none;
  padding-right: var(--lx-space-5);
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a3a3a3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--lx-space-2) center;
  background-size: 18px 18px;
  cursor: pointer;
}
/* Die Optionsliste zeichnet das Betriebssystem. Ohne diese Zeile steht im
   dunklen Theme weisse Schrift auf weissem Grund. */
.lx-select option { background: var(--lx-surface); color: var(--lx-text); }

/* ============================================================================
   3. KONTROLLKÄSTCHEN, RADIO, SCHALTER
   Das native Element bleibt bestehen und wird nur umgefärbt, wo möglich.
   Kästchen und Radio nutzen accent-color, das ist die kürzeste korrekte
   Lösung und behält Tastatur und Screenreader.
   ========================================================================== */

.lx-checkbox,
.lx-radio {
  display: flex;
  align-items: flex-start;
  gap: var(--lx-space-1);
  min-height: 44px;          /* Zeile bleibt mit dem Daumen treffbar */
  padding-block: var(--lx-space-1);
  cursor: pointer;
  font-size: var(--lx-fs-body);
}

.lx-checkbox input,
.lx-radio input {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--lx-accent);
  cursor: pointer;
}
.lx-checkbox input { border-radius: var(--lx-r-xs); }

.lx-checkbox__text,
.lx-radio__text { display: flex; flex-direction: column; gap: 2px; line-height: 1.35; min-width: 0; }

.lx-checkbox:has(input[disabled]),
.lx-radio:has(input[disabled]) { opacity: 0.5; cursor: not-allowed; }

/* --- Schalter ------------------------------------------------------------- */
/* Sofort wirksame Einstellung, kein Formularfeld zum Absenden. Das native
   Kästchen liegt unsichtbar darüber und trägt Fokus und Zustand. */

.lx-switch {
  display: inline-flex;
  align-items: center;
  gap: var(--lx-space-1);
  min-height: 44px;
  cursor: pointer;
  font-size: var(--lx-fs-body);
}

.lx-switch input {
  appearance: none;
  position: relative;
  flex: 0 0 auto;
  width: 44px;
  height: 26px;
  margin: 0;
  border: 1px solid var(--lx-border);
  border-radius: var(--lx-r-pill);
  background: var(--lx-bg-sunken);
  cursor: pointer;
  transition: background-color var(--lx-dur) var(--lx-ease), border-color var(--lx-dur) var(--lx-ease);
}
.lx-switch input::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: var(--lx-r-pill);
  background: var(--lx-text-muted);
  transition: transform var(--lx-dur) var(--lx-ease), background-color var(--lx-dur) var(--lx-ease);
}
.lx-switch input:checked { background: var(--lx-accent); border-color: var(--lx-accent); }
.lx-switch input:checked::after { transform: translateX(18px); background: var(--lx-on-accent); }
.lx-switch input[disabled] { opacity: 0.5; cursor: not-allowed; }

/* ============================================================================
   4. SUCHFELD
   Lupe links, Löschen rechts. Der Löschknopf ist ein echter Button mit
   44 px Trefferfläche und wird von liberyx.js bedient.
   ========================================================================== */

.lx-search { position: relative; display: block; width: 100%; }

.lx-search .lx-input {
  padding-left: 42px;
  padding-right: 48px;
  background: var(--lx-bg-sunken);
}
.lx-search .lx-input:focus { background: var(--lx-surface); }

.lx-search__icon {
  position: absolute;
  left: var(--lx-space-2);
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--lx-text-faint);
  pointer-events: none;
}

.lx-search__clear {
  position: absolute;
  right: 2px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: var(--lx-r-sm);
  background: none;
  color: var(--lx-text-muted);
  cursor: pointer;
}
.lx-search__clear:hover { background: var(--lx-surface-hover); color: var(--lx-text); }
/* Sichtbar bleiben 40 px, damit der Knopf in das 44er Feld passt. Auf dem
   Handy wächst die Trefferfläche unsichtbar über die geforderten 44 px. */
@media (pointer: coarse) {
  .lx-search__clear::before { content: ""; position: absolute; inset: -4px; }
}
/* Leeres Feld braucht keinen Löschknopf. liberyx.js setzt hidden. */
.lx-search__clear[hidden] { display: none; }

/* Tastaturkürzel rechts im Feld, solange nichts getippt wurde. */
.lx-search__kbd {
  position: absolute;
  right: var(--lx-space-1);
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}
.lx-search__kbd[hidden] { display: none; }

/* ============================================================================
   5. FILTER-CHIP
   Zeigt einen aktiven Filter. Die entfernbare Variante trägt ein x, das ein
   eigener Button ist, damit der Chip selbst klickbar bleiben kann.
   ========================================================================== */

.lx-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 var(--lx-space-1);
  border: 1px solid var(--lx-border);
  border-radius: var(--lx-r-pill);
  background: var(--lx-surface);
  color: var(--lx-text);
  font-size: var(--lx-fs-small);
  font-weight: var(--lx-w-medium);
  line-height: 1;
  white-space: nowrap;
  max-width: 100%;
}
.lx-chip__label { overflow: hidden; text-overflow: ellipsis; }

/* Als Umschalter verwendbar, etwa für Rechtsgebiete. */
button.lx-chip { cursor: pointer; }
button.lx-chip:hover { background: var(--lx-surface-hover); border-color: var(--lx-border-strong); }
.lx-chip[aria-pressed="true"] {
  background: var(--lx-accent-soft);
  border-color: var(--lx-accent-border);
  color: var(--lx-accent);
}

.lx-chip--accent { background: var(--lx-accent-soft); border-color: var(--lx-accent-border); color: var(--lx-accent); }
.lx-chip--removable { padding-right: 3px; }

.lx-chip__remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  border: 0;
  border-radius: var(--lx-r-pill);
  background: none;
  color: inherit;
  opacity: 0.7;
  cursor: pointer;
}
.lx-chip__remove:hover { background: var(--lx-surface-hover); opacity: 1; }
.lx-chip__remove .lx-icon { width: 12px; height: 12px; }

/* Auf dem Handy ist der 24er Knopf zu klein, die Trefferfläche wächst über
   ein unsichtbares Pseudoelement statt über die sichtbare Grösse. */
@media (pointer: coarse) {
  .lx-chip__remove { position: relative; }
  .lx-chip__remove::before { content: ""; position: absolute; inset: -10px; }
}

.lx-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

/* ============================================================================
   6. FELDGRUPPE
   <fieldset> hat einen eigenwilligen Standardrahmen, darum voll zurückgesetzt.
   ========================================================================== */

.lx-fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }

.lx-fieldset > legend {
  padding: 0;
  margin-bottom: var(--lx-space-1);
  font-size: var(--lx-fs-eyebrow);
  line-height: var(--lx-lh-eyebrow);
  font-weight: var(--lx-w-semibold);
  color: var(--lx-text);
}

/* Gerahmte Variante, wenn die Gruppe optisch zusammenhalten muss. */
.lx-fieldset--boxed {
  padding: var(--lx-space-2);
  border: 1px solid var(--lx-border-faint);
  border-radius: var(--lx-r-md);
}

/* Einklappbare Filtergruppe: natives <details>, kein JS nötig. */
.lx-filter-group { border-bottom: 1px solid var(--lx-border-faint); }
.lx-filter-group:last-child { border-bottom: 0; }

.lx-filter-group > summary {
  display: flex;
  align-items: center;
  gap: var(--lx-space-1);
  min-height: 44px;
  cursor: pointer;
  list-style: none;
  font-size: var(--lx-fs-body);
  font-weight: var(--lx-w-semibold);
}
.lx-filter-group > summary::-webkit-details-marker { display: none; }
.lx-filter-group > summary .lx-icon { margin-left: auto; color: var(--lx-text-muted); transition: transform var(--lx-dur) var(--lx-ease); }
.lx-filter-group[open] > summary .lx-icon { transform: rotate(180deg); }
.lx-filter-group__body { padding-bottom: var(--lx-space-2); }

/* ============================================================================
   7. FORMULARZEILEN
   ========================================================================== */

/* Zwei Felder nebeneinander, auf dem Handy untereinander. */
.lx-form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--lx-space-2); }

/* Eingabe plus Knopf in einer Zeile, etwa Suchen oder Hinzufügen. */
.lx-input-row { display: flex; gap: var(--lx-space-1); align-items: stretch; }
.lx-input-row > .lx-search,
.lx-input-row > .lx-input { flex: 1 1 auto; min-width: 0; }
.lx-input-row > .lx-btn { flex: 0 0 auto; }

@media (max-width: 600px) {
  .lx-form-row { grid-template-columns: 1fr; }
  .lx-input-row { flex-wrap: wrap; }
  .lx-input-row > .lx-btn { width: 100%; }
}

/* ===== feedback.css ====================================================== */
/* ============================================================================
   LIBERYX Design System · FEEDBACK
   ----------------------------------------------------------------------------
   Alles, was der Anwendung eine Rückmeldung gibt: Status, Hinweis, Meldung,
   Dialog, Wartezustand.

   Farbregel: Blau ist der Akzent und gehört der Marke. Grün, Gelb und Rot
   sind ausschliesslich Statusfarben und kommen nur hier und in .lx-stat vor.
   Alle Statusflächen nutzen die weichen Varianten (--lx-*-soft), damit sie im
   hellen wie im dunklen Theme lesbar bleiben.

   @keyframes lx-spin stammt aus buttons.css und wird hier mitbenutzt.
   ========================================================================== */

/* ============================================================================
   1. BADGE
   Kurzer Status an einem Objekt: in Kraft, aufgehoben, neu.
   ========================================================================== */

.lx-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px var(--lx-space-1);
  border: 1px solid transparent;
  border-radius: var(--lx-r-pill);
  font-size: var(--lx-fs-small);
  line-height: var(--lx-lh-small);
  font-weight: var(--lx-w-semibold);
  white-space: nowrap;
  background: var(--lx-surface-hover);
  color: var(--lx-text-muted);
}

.lx-badge--accent { background: var(--lx-accent-soft); border-color: var(--lx-accent-border); color: var(--lx-accent); }
.lx-badge--success { background: var(--lx-success-soft); border-color: var(--lx-success); color: var(--lx-success); }
.lx-badge--warning { background: var(--lx-warning-soft); border-color: var(--lx-warning); color: var(--lx-warning); }
.lx-badge--danger { background: var(--lx-danger-soft); border-color: var(--lx-danger); color: var(--lx-danger); }

/* Punkt vor dem Text, wenn die Farbe allein den Status nicht trägt. */
.lx-badge__dot { width: 6px; height: 6px; border-radius: var(--lx-r-pill); background: currentColor; flex: 0 0 auto; }

.lx-badge .lx-icon { width: 12px; height: 12px; }

/* ============================================================================
   2. ALERT
   Eingebetteter Hinweis im Seitenfluss. Bei Fehlern role="alert", sonst
   role="status" oder gar keine Rolle.
   ========================================================================== */

.lx-alert {
  display: flex;
  align-items: flex-start;
  gap: var(--lx-space-2);
  padding: var(--lx-space-2);
  border: 1px solid var(--lx-border-faint);
  border-radius: var(--lx-r-md);
  background: var(--lx-surface);
  font-size: var(--lx-fs-body);
  line-height: 1.45;
}

.lx-alert__icon { flex: 0 0 auto; margin-top: 2px; }
.lx-alert__icon .lx-icon { width: 20px; height: 20px; }
/* flex:1 1 auto, sonst wächst der Textblock nicht auf die freie Breite und der
   Satz bricht früher um, als der Rahmen es verlangt. */
.lx-alert__body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.lx-alert__title { margin: 0; font-size: var(--lx-fs-body); font-weight: var(--lx-w-bold); }
.lx-alert__text { margin: 0; color: var(--lx-text-muted); }
.lx-alert__close { flex: 0 0 auto; margin-left: auto; }

.lx-alert--info { background: var(--lx-accent-soft); border-color: var(--lx-accent-border); }
.lx-alert--info .lx-alert__icon { color: var(--lx-accent); }

.lx-alert--success { background: var(--lx-success-soft); border-color: var(--lx-success); }
.lx-alert--success .lx-alert__icon { color: var(--lx-success); }

.lx-alert--warning { background: var(--lx-warning-soft); border-color: var(--lx-warning); }
.lx-alert--warning .lx-alert__icon { color: var(--lx-warning); }

.lx-alert--danger { background: var(--lx-danger-soft); border-color: var(--lx-danger); }
.lx-alert--danger .lx-alert__icon { color: var(--lx-danger); }

/* Auf dem Handy rutscht die Aktion unter den Text. Nebeneinander bliebe für
   beide zu wenig Breite und der Satz bräche nach jedem zweiten Wort um. */
@media (max-width: 600px) {
  .lx-alert { flex-wrap: wrap; }
  /* Basis 0 statt auto: sonst beansprucht der Text seine volle Wunschbreite
     und drängt sich unter das Symbol statt daneben. */
  .lx-alert__body { flex: 1 1 0; }
  /* 1 0 100% erzwingt eine eigene Zeile, Symbol und Text bleiben oben zusammen. */
  .lx-alert__close { flex: 1 0 100%; margin-left: 0; }
}

/* ============================================================================
   3. TOAST
   Kurze Meldung über allem. Der Host liegt fest am unteren rechten Rand,
   auf dem Handy über die volle Breite. window.lxToast() legt ihn bei Bedarf an.
   ========================================================================== */

.lx-toast-host {
  position: fixed;
  right: var(--lx-space-3);
  bottom: var(--lx-space-3);
  z-index: var(--lx-z-toast);
  display: flex;
  flex-direction: column;
  gap: var(--lx-space-1);
  width: min(380px, calc(100vw - 2 * var(--lx-space-3)));
  pointer-events: none;      /* der Host selbst fängt keine Klicks */
}

.lx-toast {
  display: flex;
  align-items: flex-start;
  gap: var(--lx-space-1);
  padding: var(--lx-space-1) var(--lx-space-2);
  border: 1px solid var(--lx-border);
  border-left-width: 3px;
  border-radius: var(--lx-r-md);
  background: var(--lx-surface-raised);
  color: var(--lx-text);
  box-shadow: var(--lx-shadow-raised);
  font-size: var(--lx-fs-body);
  line-height: 1.4;
  pointer-events: auto;
  animation: lx-toast-in var(--lx-dur-slow) var(--lx-ease);
}

.lx-toast[data-leaving] { animation: lx-toast-out var(--lx-dur-slow) var(--lx-ease) forwards; }

.lx-toast__icon { flex: 0 0 auto; margin-top: 3px; }
.lx-toast__text { min-width: 0; flex: 1 1 auto; padding-block: 4px; }
.lx-toast__close { flex: 0 0 auto; }

.lx-toast--info { border-left-color: var(--lx-accent); }
.lx-toast--info .lx-toast__icon { color: var(--lx-accent); }
.lx-toast--success { border-left-color: var(--lx-success); }
.lx-toast--success .lx-toast__icon { color: var(--lx-success); }
.lx-toast--warning { border-left-color: var(--lx-warning); }
.lx-toast--warning .lx-toast__icon { color: var(--lx-warning); }
.lx-toast--danger { border-left-color: var(--lx-danger); }
.lx-toast--danger .lx-toast__icon { color: var(--lx-danger); }

@keyframes lx-toast-in {
  from { opacity: 0; transform: translateY(var(--lx-space-2)); }
  to { opacity: 1; transform: none; }
}
@keyframes lx-toast-out {
  to { opacity: 0; transform: translateY(var(--lx-space-1)); }
}

@media (max-width: 600px) {
  .lx-toast-host {
    right: var(--lx-space-2);
    left: var(--lx-space-2);
    bottom: var(--lx-space-2);
    width: auto;
  }
}

/* ============================================================================
   4. DIALOG
   Natives <dialog>. showModal() liefert Fokusfalle, Escape und inert für den
   Rest der Seite gratis, darum kein Nachbau in JS.
   ========================================================================== */

.lx-dialog {
  width: min(560px, calc(100vw - 2 * var(--lx-space-3)));
  max-height: min(80vh, 720px);
  padding: 0;
  border: 1px solid var(--lx-border);
  border-radius: var(--lx-r-lg);
  background: var(--lx-surface-raised);
  color: var(--lx-text);
  box-shadow: var(--lx-shadow-overlay);
  overflow: hidden;
}

/* <dialog> erbt die Theme-Variablen nicht zuverlässig, wenn es im Top-Layer
   liegt. Die Vererbung über :root greift trotzdem, weil die Variablen dort
   definiert sind. Die Schriftfamilie muss aber gesetzt werden. */
.lx-dialog { font-family: var(--lx-font); font-size: var(--lx-fs-body); }

/* Wie beim Scrim aus der Palette gemischt, tokens.css kennt keine eigene
   Rolle für Abdunkelung hinter Overlays. */
.lx-dialog::backdrop {
  background: color-mix(in srgb, var(--lx-c-black) 60%, transparent);
  backdrop-filter: blur(2px);
}

.lx-dialog[open] { animation: lx-dialog-in var(--lx-dur-slow) var(--lx-ease); }

@keyframes lx-dialog-in {
  from { opacity: 0; transform: translateY(var(--lx-space-2)) scale(0.98); }
  to { opacity: 1; transform: none; }
}

.lx-dialog__head {
  display: flex;
  align-items: flex-start;
  gap: var(--lx-space-2);
  padding: var(--lx-space-2) var(--lx-space-3);
  border-bottom: 1px solid var(--lx-border-faint);
}
.lx-dialog__title { margin: 0; font-size: var(--lx-fs-h5); font-weight: var(--lx-w-bold); }
.lx-dialog__close { margin-left: auto; flex: 0 0 auto; }

.lx-dialog__body {
  padding: var(--lx-space-3);
  overflow-y: auto;
  max-height: 60vh;
  line-height: 1.5;
}

.lx-dialog__foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--lx-space-1);
  flex-wrap: wrap;
  padding: var(--lx-space-2) var(--lx-space-3);
  border-top: 1px solid var(--lx-border-faint);
  background: var(--lx-bg-sunken);
}

@media (max-width: 600px) {
  .lx-dialog { width: calc(100vw - 2 * var(--lx-space-2)); }
  .lx-dialog__foot { flex-direction: column-reverse; align-items: stretch; }
  .lx-dialog__foot .lx-btn { width: 100%; }
}

/* ============================================================================
   5. TOOLTIP
   Nur als Ergänzung, nie als einzige Informationsquelle. Der Text steht im
   Attribut data-lx-tip und wird per CSS eingeblendet, damit kein JS und kein
   zusätzliches Markup nötig ist. Der Auslöser braucht eine eigene Beschriftung
   (aria-label), sonst hören Screenreader den Hinweis nicht.
   ========================================================================== */

.lx-tooltip { position: relative; display: inline-flex; }

.lx-tooltip::after {
  content: attr(data-lx-tip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  z-index: var(--lx-z-overlay);
  padding: 6px var(--lx-space-1);
  border-radius: var(--lx-r-sm);
  background: var(--lx-surface-raised);
  border: 1px solid var(--lx-border);
  color: var(--lx-text);
  font-size: var(--lx-fs-small);
  line-height: var(--lx-lh-small);
  font-weight: var(--lx-w-medium);
  white-space: nowrap;
  box-shadow: var(--lx-shadow-raised);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--lx-dur) var(--lx-ease), transform var(--lx-dur) var(--lx-ease), visibility var(--lx-dur);
}

/* :has(:focus-visible) statt :focus-within: den Hinweis soll sehen, wer mit der
   Tastatur navigiert. Nach einem Mausklick bliebe er sonst stehen, weil der
   Knopf den Fokus behält. */
.lx-tooltip:hover::after,
.lx-tooltip:has(:focus-visible)::after {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%);
}

/* Am rechten Bildschirmrand würde die Sprechblase überstehen. */
.lx-tooltip--end::after { left: auto; right: 0; transform: translateY(4px); }
.lx-tooltip--end:hover::after,
.lx-tooltip--end:has(:focus-visible)::after { transform: none; }

/* In der Topbar ist über dem Knopf kein Platz, dort klappt der Hinweis nach
   unten auf. */
.lx-tooltip--below::after { bottom: auto; top: calc(100% + 8px); transform: translateX(-50%) translateY(-4px); }
.lx-tooltip--below:hover::after,
.lx-tooltip--below:has(:focus-visible)::after { transform: translateX(-50%); }

.lx-tooltip--below.lx-tooltip--end::after { transform: translateY(-4px); }
.lx-tooltip--below.lx-tooltip--end:hover::after,
.lx-tooltip--below.lx-tooltip--end:has(:focus-visible)::after { transform: none; }

/* Auf Touchgeräten gibt es kein Hover, dort bleibt der Hinweis aus. */
@media (pointer: coarse) {
  .lx-tooltip::after { display: none; }
}

/* ============================================================================
   6. SKELETT
   Platzhalter während des Ladens. Immer mit aria-hidden="true" und einem
   Text für Screenreader daneben, sonst wird Leere vorgelesen.
   ========================================================================== */

.lx-skeleton {
  display: block;
  height: 1em;
  border-radius: var(--lx-r-xs);
  background: linear-gradient(
    90deg,
    var(--lx-surface-hover) 25%,
    var(--lx-surface-raised) 50%,
    var(--lx-surface-hover) 75%
  );
  background-size: 200% 100%;
  animation: lx-shimmer 1.4s linear infinite;
}

.lx-skeleton--title { height: 20px; width: 60%; }
.lx-skeleton--text { height: 12px; }
.lx-skeleton--text:nth-of-type(even) { width: 85%; }
.lx-skeleton--block { height: 88px; border-radius: var(--lx-r-md); }
.lx-skeleton--avatar { width: 32px; height: 32px; border-radius: var(--lx-r-pill); }

@keyframes lx-shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

/* ============================================================================
   7. FORTSCHRITT
   Eigene Elemente statt <progress>, weil <progress> je Betriebssystem anders
   aussieht und sich kaum färben lässt. Rolle und Werte kommen aus ARIA.
   ========================================================================== */

.lx-progress {
  display: block;
  width: 100%;
  height: 8px;
  border-radius: var(--lx-r-pill);
  background: var(--lx-surface-hover);
  overflow: hidden;
}

.lx-progress__bar {
  display: block;
  height: 100%;
  width: 0;
  border-radius: var(--lx-r-pill);
  background: var(--lx-accent);
  transition: width var(--lx-dur-slow) var(--lx-ease);
}
.lx-progress__bar--success { background: var(--lx-success); }
.lx-progress__bar--warning { background: var(--lx-warning); }

/* Unbestimmter Fortschritt: der Balken wandert. */
.lx-progress--indeterminate .lx-progress__bar {
  width: 35%;
  animation: lx-progress-slide 1.2s var(--lx-ease) infinite;
}
@keyframes lx-progress-slide {
  from { transform: translateX(-100%); }
  to { transform: translateX(300%); }
}

/* ============================================================================
   8. SPINNER
   Ring aus currentColor. Nutzt lx-spin aus buttons.css.
   ========================================================================== */

.lx-spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: var(--lx-r-pill);
  animation: lx-spin 0.7s linear infinite;
}
.lx-spinner--lg { width: 28px; height: 28px; border-width: 3px; }
.lx-spinner--accent { color: var(--lx-accent); }

/* Ladezeile: Spinner plus Text, mittig in einem Panel. */
.lx-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--lx-space-1);
  padding: var(--lx-space-4);
  color: var(--lx-text-muted);
}

/* ===== print.css ========================================================= */
/* ============================================================================
   LIBERYX Design System · PRINT
   Zwei Teile:
     1. Druckregeln für jede Seite des Systems (@media print)
     2. Druckvorlagen: A4-Briefbogen und Visitenkarte, masshaltig in Millimetern

   Setzt css/tokens.css und css/brand.css voraus.
   Druck ist immer hell: <html data-theme="light">.

   Masse: im Druck ist 1 px genau 1/96 Zoll. Die Skala aus tokens.css ergibt
   darum 16 px = 12 pt, 14 px = 10,5 pt, 12 px = 9 pt. Es braucht also keine
   eigene Druckskala, die vorhandenen Tokens reichen.
   ========================================================================== */

/* ============================================================================
   1. ALLGEMEINE DRUCKREGELN
   ========================================================================== */

@page {
  size: A4;
  margin: 15mm;                    /* Rand wie im Figma-Briefbogen */
}

@media print {
  html, body {
    background: var(--lx-c-white);
    color: var(--lx-c-black);
  }

  /* Bildschirmbeiwerk verschwindet. */
  .lx-no-print { display: none !important; }
  .lx-print-only { display: revert !important; }

  /* Marken- und Farbflächen müssen gedruckt werden, sonst fehlt der Akzent. */
  .lx-sheet,
  .lx-print-exact,
  .lx-brand-bar,
  .lx-brand-dot {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* Umbrüche */
  h1, h2, h3, h4, h5, h6,
  .lx-h1, .lx-h2, .lx-h3, .lx-h4, .lx-h5 { break-after: avoid; }
  p, li, blockquote { orphans: 3; widows: 3; }
  table, figure, .lx-avoid-break { break-inside: avoid; }
  thead { display: table-header-group; }
  .lx-page-break { break-before: page; }

  /* Ziel eines Links steht sonst nirgends. Nur im Fliesstext, nicht in Menüs. */
  .lx-print-links a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: var(--lx-fs-small);
    word-break: break-all;
  }

  /* Schatten und Glow drucken nur grau. */
  .lx-glow { display: none !important; }
  * { box-shadow: none !important; }
}

.lx-print-only { display: none; }

/* ============================================================================
   2. DRUCKVORLAGEN
   Ein Bogen ist am Bildschirm massgleich sichtbar und wird im Druck 1:1
   ausgegeben. Er bekommt eine eigene @page-Regel ohne Rand, weil der Rand
   im Bogen selbst steckt.
   ========================================================================== */

@page lx-a4 { size: A4; margin: 0; }
@page lx-card { size: 85mm 55mm; margin: 0; }

.lx-sheet {
  position: relative;
  box-sizing: border-box;
  overflow: hidden;
  background: var(--lx-c-white);
  color: var(--lx-c-black);
  font-family: var(--lx-font);
  font-weight: var(--lx-w-regular);
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.lx-sheet--a4 { width: 210mm; height: 296.9mm; page: lx-a4; }
.lx-sheet--card { width: 85mm; height: 55mm; page: lx-card; }

/* Am Bildschirm liegt der Bogen wie Papier auf der Fläche. */
@media screen {
  .lx-sheet { box-shadow: var(--lx-shadow-overlay); }
}

/* Seite, die nur eine Druckvorlage zeigt: Papier liegt auf ruhigem Grund. */
.lx-print-page {
  background: var(--lx-bg-sunken);
  padding-block: var(--lx-space-5);
}
.lx-print-page > .lx-container { padding-bottom: var(--lx-space-5); }

@media print {
  .lx-print-page { background: none; padding: 0; }
}

/* --- Bühne ---------------------------------------------------------------- */
/* Hält den Bogen mittig und schrumpft ihn auf schmalen Geräten, damit nie quer
   gescrollt wird. Der Bogen selbst behält seine Millimeter, nur die Darstellung
   wird skaliert. Im Druck greift keine dieser Regeln. */

.lx-stage {
  --lx-stage-scale: 1;
  width: calc(var(--lx-sheet-w, 210mm) * var(--lx-stage-scale));
  height: calc(var(--lx-sheet-h, 296.9mm) * var(--lx-stage-scale));
  margin-inline: auto;
}
.lx-stage > .lx-sheet {
  transform: scale(var(--lx-stage-scale));
  transform-origin: top left;
}
.lx-stage--a4 { --lx-sheet-w: 210mm; --lx-sheet-h: 296.9mm; }
.lx-stage--card { --lx-sheet-w: 85mm; --lx-sheet-h: 55mm; }

@media screen and (max-width: 900px) {
  .lx-stage--a4 { --lx-stage-scale: 0.55; }
}
@media screen and (max-width: 560px) {
  .lx-stage--a4 { --lx-stage-scale: 0.42; }
}

@media print {
  .lx-stage {
    --lx-stage-scale: 1;
    width: auto;
    height: auto;
    margin: 0;
  }
  .lx-stage > .lx-sheet { transform: none; }
  .lx-sheet + .lx-sheet,
  .lx-stage + .lx-stage { break-before: page; }
}

/* ============================================================================
   BRIEFBOGEN A4
   Aus dem Figma «Aç_Vorlage» (2100x2970 bei 10-facher Auflösung):
     Wortmarke  60 x 10 mm, oben rechts, 15 mm Rand
     Signet     10 x 10 mm, unten links, 15 mm Rand
   Anschriftfeld, Falzmarken und Informationsblock folgen DIN 5008 Form B,
   damit der Bogen in ein Fenstercouvert C5/C6 passt.
   ========================================================================== */

.lx-letter { font-size: var(--lx-fs-eyebrow); line-height: 1.45; }  /* 10,5 pt */

.lx-letter__logo {
  position: absolute;
  top: 15mm;
  right: 15mm;
  width: 60mm;
  height: 10mm;
}

/* Falz- und Lochmarken am linken Rand. */
.lx-letter__marks { position: absolute; inset: 0; pointer-events: none; }
.lx-letter__marks span {
  position: absolute;
  left: 0;
  height: 0.2mm;
  background: var(--lx-c-grey-300);
}
.lx-letter__marks span:nth-child(1) { top: 105mm; width: 4mm; }    /* Falz 1 */
.lx-letter__marks span:nth-child(2) { top: 148.5mm; width: 6mm; }  /* Lochung */
.lx-letter__marks span:nth-child(3) { top: 210mm; width: 4mm; }    /* Falz 2 */

/* Anschriftfeld: sitzt im Couvertfenster. */
.lx-letter__address {
  position: absolute;
  left: 20mm;
  top: 45mm;
  width: 85mm;
  height: 40mm;
  font-style: normal;
}
.lx-letter__sender {
  display: block;
  margin-bottom: 2mm;
  padding-bottom: 1mm;
  font-size: var(--lx-fs-small);          /* 9 pt */
  color: var(--lx-c-grey-500);
  border-bottom: 0.2mm solid var(--lx-c-grey-100);
}

/* Informationsblock rechts neben dem Anschriftfeld. */
.lx-letter__meta {
  position: absolute;
  right: 20mm;
  top: 45mm;
  width: 55mm;
  font-size: var(--lx-fs-small);
  line-height: 1.5;
}
.lx-letter__meta dl { display: grid; grid-template-columns: auto 1fr; gap: 0 3mm; margin: 0; }
.lx-letter__meta dt { color: var(--lx-c-grey-500); }
.lx-letter__meta dd { margin: 0; }

/* Textfeld. Beginnt bei 100 mm, endet über der Fusszeile. */
.lx-letter__body {
  position: absolute;
  left: 20mm;
  right: 20mm;
  top: 100mm;
  bottom: 40mm;
}
.lx-letter__subject {
  margin: 0 0 5mm;
  font-size: var(--lx-fs-body);           /* 12 pt */
  font-weight: var(--lx-w-bold);
}
.lx-letter__body p { margin: 0 0 3.5mm; }

/* Fusszeile mit Signet unten links, Firmenangaben in drei Spalten. */
.lx-letter__foot {
  position: absolute;
  left: 15mm;
  right: 15mm;
  bottom: 15mm;
  display: flex;
  align-items: flex-end;
  gap: 8mm;
  padding-top: 3mm;
  border-top: 0.2mm solid var(--lx-c-grey-100);
  font-size: var(--lx-fs-small);          /* 9 pt */
  line-height: 1.5;
  color: var(--lx-c-grey-700);
}
.lx-letter__mark { width: 10mm; height: 10mm; flex: 0 0 auto; }
.lx-letter__foot-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0 6mm;
  flex: 1 1 auto;
}
.lx-letter__foot-cols p { margin: 0; }
.lx-letter__foot strong { font-weight: var(--lx-w-semibold); color: var(--lx-c-black); }

/* Folgeseiten: nur Signet oben rechts, kein Anschriftfeld. */
.lx-letter--follow .lx-letter__logo { width: 40mm; height: 6.67mm; }
.lx-letter--follow .lx-letter__body { top: 40mm; }

/* ============================================================================
   VISITENKARTE 85 x 55 mm
   Aus dem Figma «Visitenkarte_VW» und «Visitenkarte_RT» (1038x696 je Seite).
   Umgerechnet: Rand 6,5 mm, Signet 13 mm unten rechts, Wortmarke der Rückseite
   59 mm breit und mittig. Vorderseite hell mit schwarzer Schrift, Rückseite
   schwarz mit weisser Wortmarke.
   ========================================================================== */

/* Vorder- und Rückseite nebeneinander am Bildschirm, im Druck je eine Seite. */
.lx-card-pair {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--lx-space-4);
}
.lx-card-pair > .lx-stage { margin-inline: 0; }
@media print {
  .lx-card-pair { display: block; gap: 0; }
}

.lx-bizcard { display: block; }

.lx-bizcard--front {
  background: var(--lx-c-paper);
  color: var(--lx-c-black);
  padding: 6.5mm;
}

.lx-bizcard--back {
  background: var(--lx-c-black);
  color: var(--lx-c-white);
  display: flex;
  align-items: center;
  justify-content: center;
}

.lx-bizcard__name {
  margin: 0;
  font-size: var(--lx-fs-eyebrow);        /* 10,5 pt */
  line-height: 1.3;
  font-weight: var(--lx-w-bold);
}
.lx-bizcard__role {
  margin: 0;
  font-size: var(--lx-fs-small);          /* 9 pt */
  line-height: 1.3;
  font-weight: var(--lx-w-medium);
}
/* Am unteren Rand verankert, damit der Block bei mehr oder weniger Zeilen
   immer 6,5 mm über der Kante endet. Beginn liegt damit bei rund 22 mm,
   wie im Figma. */
.lx-bizcard__contact {
  position: absolute;
  left: 6.5mm;
  bottom: 6.5mm;
  margin: 0;
  font-size: var(--lx-fs-small);
  line-height: 1.3;
  font-weight: var(--lx-w-bold);
  font-style: normal;
}
.lx-bizcard__contact span { display: block; }
.lx-bizcard__contact span:empty { height: 1.5mm; }

.lx-bizcard__mark {
  position: absolute;
  right: 6.5mm;
  bottom: 6.5mm;
  width: 13mm;
  height: 13mm;
}
.lx-bizcard__logo { width: 59mm; height: 9.83mm; }
