/* =============================================================================
   ho.Systeme – Design-System-Basis (ho-base.css)
   -----------------------------------------------------------------------------
   Verbindliches Grundgerüst für alle internen ho.Systeme-Tools.
   Marken-Farben, Typografie (Red Hat Display), Abstands- und Schriftskala,
   Komponenten (Buttons, Formulare, Karten, Badges, Tabellen, Hinweise).
   Dark- und Light-Mode, Tastaturbedienung, reduzierte Bewegung.

   Verwendung:
   1. Font-Dateien (WOFF2) unter /assets/fonts/ ablegen (siehe assets/fonts/README.md).
   2. Einbinden:  <link rel="stylesheet" href="/assets/css/ho-base.css">
   3. Marken-Werte nur über :root überschreiben – nie Komponenten-Regeln kopieren.

   Aufbau
     01  Schriftart
     02  Marken-Tokens (Farbe)
     03  System-Tokens (Maß, Typo, Radius, Schatten, Bewegung)
     04  Neutraltöne & semantische Farben (Dark / Light / System)
     05  Reset & Basis
     06  Fokus & Barrierefreiheit
     07  Layout (Container, Header, Stack, Grid)
     08  Typografie
     09  Buttons
     10  Formulare
     11  Karten, Badges, Hinweise
     12  Kennzahlen, Reiter, Leerzustand
     13  Tabellen
     14  Code & Snippets
     15  Symbole
     16  Hilfsklassen
   ============================================================================= */


/* == 01  Schriftart ==========================================================
   Red Hat Display + Red Hat Mono, self-hosted (DSGVO-konform, kein Abruf bei
   fonts.googleapis.com). SIL Open Font License 1.1 – self-hosting ausdrücklich
   erlaubt. Je Familie eine variable Datei, die die ganze Gewichtsachse abdeckt;
   deshalb kein unicode-range-Split und keine statischen Schnitte.

   Die Dateien liegen im Repo (~71 KB zusammen). Das ist Absicht: die
   Marken-Schrift IST das Design-System. Greift die Fallback-Kette, sieht das
   Tool aus wie jedes andere – genau das soll dieses Repo verhindern.

   font-display: block statt swap – ein sichtbarer Umbruch von der System-
   schrift auf die Marken-Schrift ist schlimmer als 100 ms unsichtbarer Text,
   und bei 41 KB aus dem eigenen Netz ist die Wartezeit ohnehin kaum messbar. */
@font-face {
  font-family: 'Red Hat Display';
  font-style: normal;
  font-weight: 300 900;              /* Achse der Variable Font: Light … Black */
  font-display: block;
  src: url('/assets/fonts/red-hat-display-vf.woff2') format('woff2-variations'),
       url('/assets/fonts/red-hat-display-vf.woff2') format('woff2');
}
@font-face {
  font-family: 'Red Hat Display';
  font-style: italic;
  font-weight: 300 900;
  font-display: block;
  src: url('/assets/fonts/red-hat-display-italic-vf.woff2') format('woff2-variations'),
       url('/assets/fonts/red-hat-display-italic-vf.woff2') format('woff2');
}
@font-face {
  font-family: 'Red Hat Mono';
  font-style: normal;
  font-weight: 300 700;
  font-display: block;
  src: url('/assets/fonts/red-hat-mono-vf.woff2') format('woff2-variations'),
       url('/assets/fonts/red-hat-mono-vf.woff2') format('woff2');
}


/* == 02  Marken-Tokens (Farbe) ================================================
   Diese Werte sind die Marke. In Dark und Light identisch – nur die Neutraltöne
   wechseln (siehe 04). Nichts anderes darf Markenfarbe sein.

   Herkunft: hdgroup-BrandGuide.pdf, Kapitel 02 "Farben ho.Systeme" und
   "hd.group Symbiose". Das ist die maßgebliche Quelle – nicht die Werte, die
   eine einzelne Seite gerade ausliefert.

     Tinte     050537            (hd.group/Dark – Text, dunkle Flächen)
     Primär    173BBF → 1F50FF → 1F6CFF          ho.Systeme/primary
     Sekundär  261766 → 2F1D80 → 3E26A6 → 472CBF ho.Systeme/Secondary

   Die Sekundärpalette ist von der hd.group geerbt: laut Guide erben alle
   Schwesterunternehmen dieselbe Sekundärfarbe, damit eine gemeinsame Farbwelt
   entsteht, während die Primärfarbe je Marke eigen bleibt.

   #050537 fehlte dem System zunächst ganz – an seiner Stelle standen neutrale
   Graublautöne, die jedes beliebige Projekt benutzt. Genau daran erkennt man
   ein Tool ohne Design-System.
   ========================================================================== */
:root {
  /* Marken-Tinte – Textfarbe im Light-Mode, Grundfläche im Dark-Mode */
  --ho-ink: #050537;

  /* Primärpalette – exakt die drei Werte aus dem Brand Guide */
  --ho-primary-700: #173BBF;
  --ho-primary-500: #1F50FF;   /* Leitfarbe */
  --ho-primary-400: #1F6CFF;

  /* Aufhellungen für Flächen, Diagramme und Zustände.
     Keine neuen Markenfarben: aus --ho-primary-400 gemischt, damit nichts
     dazuerfunden wird, was nicht im Guide steht. */
  --ho-primary-300: color-mix(in srgb, var(--ho-primary-400) 72%, #fff);
  --ho-primary-200: color-mix(in srgb, var(--ho-primary-400) 42%, #fff);
  --ho-primary-100: color-mix(in srgb, var(--ho-primary-400) 18%, #fff);

  /* Sekundärpalette – von der hd.group geerbt */
  --ho-secondary-800: #261766;
  --ho-secondary-700: #2F1D80;
  --ho-secondary-600: #3E26A6;
  --ho-secondary-500: #472CBF;

  /* Kurznamen (Kompatibilität zur ersten base.css-Fassung) */
  --accent-dark:    var(--ho-primary-700);
  --accent:         var(--ho-primary-500);
  --accent-2:       var(--ho-primary-400);
  --secondary-dark: var(--ho-secondary-800);
  --secondary:      var(--ho-secondary-700);
  --secondary-2:    var(--ho-secondary-600);
  --secondary-3:    var(--ho-secondary-500);

  /* Marken-Verlauf – der einzige erlaubte Farbverlauf für Flächen.
     Sparsam: Primär-Button, Logo-Symbol, Akzentkanten. Keine großen Flächen. */
  --ho-gradient: linear-gradient(135deg, var(--ho-primary-500), var(--ho-secondary-600));
}


/* == 03  System-Tokens ========================================================
   Maß-, Schrift- und Radiusskala. Abstände immer aus dieser Skala nehmen –
   keine krummen px-Werte in Komponenten. Basis 4px.
   ========================================================================== */
:root {
  /* Abstände */
  --ho-space-1:  4px;
  --ho-space-2:  8px;
  --ho-space-3:  12px;
  --ho-space-4:  16px;
  --ho-space-5:  24px;
  --ho-space-6:  32px;
  --ho-space-7:  48px;
  --ho-space-8:  64px;
  --ho-space-9:  96px;

  /* Schriftgrößen – Fließtext 16px, Überschriften skalieren mit dem Viewport.
     Die Website setzt Fließtext auf 20px und Überschriften bis 96px. Ein
     Werkzeug ist dichter als eine Marketingseite, übernimmt aber die Haltung:
     lieber eine Stufe größer und mutiger als zu vorsichtig. */
  --ho-text-xs:   12px;
  --ho-text-sm:   14px;
  --ho-text-base: 16px;
  --ho-text-md:   17px;
  --ho-text-lg:   20px;
  --ho-text-xl:   clamp(22px, 1.4vw + 18px, 25px);
  --ho-text-2xl:  clamp(26px, 2vw + 19px, 32px);
  --ho-text-3xl:  clamp(32px, 3vw + 21px, 42px);
  --ho-text-4xl:  clamp(40px, 5vw + 22px, 64px);

  /* Schriftgewichte */
  --ho-weight-normal:   400;
  --ho-weight-medium:   500;
  --ho-weight-semibold: 600;
  --ho-weight-bold:     700;
  --ho-weight-display:  750;

  /* Zeilenhöhen */
  --ho-leading-tight: 1.2;
  --ho-leading-snug:  1.35;
  --ho-leading-body:  1.55;

  /* Laufweite – große Displaygrößen brauchen negatives Tracking */
  --ho-tracking-display: -.03em;
  --ho-tracking-tight:   -.02em;
  --ho-tracking-wide:    .04em;

  /* Radien
     Die Website benutzt große Radien (20px) für Flächen und fast scharfe Kanten
     für Schaltflächen. Dieser Gegensatz ist ein Markenmerkmal – überall die
     gleichen 10px sind der Standardlook, den jedes Framework mitbringt. */
  --ho-radius-sm:   3px;    /* Eingabefelder, kleine Schaltflächen */
  --ho-radius-md:   4px;    /* Schaltflächen */
  --ho-radius-lg:   8px;    /* Karten und Kacheln – kantig, nicht verspielt */
  --ho-radius-xl:   16px;   /* Marken-Flächen, Kopfbereiche */
  --ho-radius-full: 999px;
  --radius: var(--ho-radius-lg);            /* Kompatibilität */

  /* Schriftfamilien */
  --ho-font: 'Red Hat Display', 'Segoe UI Variable', 'Segoe UI', system-ui,
             -apple-system, 'Helvetica Neue', Arial, sans-serif;
  --ho-font-mono: 'Red Hat Mono', 'Cascadia Code', 'JetBrains Mono',
                  Consolas, 'SF Mono', monospace;
  --font: var(--ho-font);                   /* Kompatibilität */

  /* Bewegung */
  --ho-motion-fast: .14s;
  --ho-motion-base: .22s;
  --ho-motion-slow: .42s;
  /* Schnell anlaufen, sanft auslaufen – die Standardkurve für alles. */
  --ho-ease: cubic-bezier(.32, .72, 0, 1);
  /* Leichtes Überschwingen. Nur für Dinge, die erscheinen oder einrasten –
     nie für Farben oder Deckkraft, dort wirkt es wie ein Wackler. */
  --ho-ease-spring: cubic-bezier(.34, 1.4, .64, 1);

  /* Ebenen */
  --ho-z-base: 1;
  --ho-z-sticky: 20;
  --ho-z-overlay: 40;
  --ho-z-toast: 60;

  /* Maximalbreiten */
  --ho-width-prose: 68ch;
  --ho-width-page:  1180px;
  --ho-width-narrow: 980px;
}


/* == 04  Neutraltöne & semantische Farben ====================================
   Jeder Wert steht hier GENAU EINMAL, als light-dark(hell, dunkel).

   Warum das wichtig ist:
   Vorher gab es drei Blöcke – einen für Dark, einen für [data-theme="light"]
   und einen für prefers-color-scheme. Die mussten von Hand deckungsgleich
   gehalten werden, und waren es nicht: im System-Hell fehlten elf Tokens
   (darunter --ho-card und --ho-card-hover), --ho-border-strong stand einmal
   auf 24% und einmal auf 26%, und --ho-overlay benutzte zwei verschiedene
   Grundfarben. Sichtbar wurde das daran, dass "System hell" anders aussah als
   "Hell" – obwohl beides derselbe Modus sein soll.

   Mit light-dark() kann das nicht mehr passieren: es gibt nur noch eine Zeile
   je Token. Umgeschaltet wird ausschließlich über color-scheme (siehe unten),
   nicht über eine zweite Farbliste.

   Statusfarben und Link-Farbe sind je Modus verschieden, weil sonst der
   Kontrast auf hellem Grund unter 4,5:1 fällt.

   Browser ohne light-dark() (vor 2024) bekommen die Zeile davor – also die
   Dark-Fassung. Das ist der Standardmodus, die Seite bleibt benutzbar.
   ========================================================================== */
:root {
  /* Der Schalter. Alles Weitere folgt daraus. */
  color-scheme: light dark;

  --ho-bg:          #050537;
  --ho-bg:          light-dark(#F3F3F6, #050537);
  --ho-bg-soft:     #0A0A47;
  --ho-bg-soft:     light-dark(#ffffff, #0A0A47);
  --ho-bg-sunken:   #030325;
  --ho-bg-sunken:   light-dark(#E7E7EE, #030325);
  --ho-surface:     #0E0E52;
  --ho-surface:     light-dark(#ffffff, #0E0E52);
  --ho-surface-2:   #17175E;
  --ho-surface-2:   light-dark(#F3F3F6, #17175E);

  --ho-text:        #EEF0FA;
  --ho-text:        light-dark(#050537, #EEF0FA);
  --ho-text-dim:    #A3A8CC;
  --ho-text-dim:    light-dark(#55557A, #A3A8CC);
  --ho-text-faint:  #7378A6;
  --ho-text-faint:  light-dark(#8686A3, #7378A6);
  --ho-nodata:      #2B2B6B;
  --ho-nodata:      light-dark(#C9C9D8, #2B2B6B);

  /* Statusfarben – auf hellem Grund kräftiger, sonst reißt der Kontrast */
  --ho-success: #10b981;
  --ho-success: light-dark(#059669, #10b981);
  --ho-warning: #f59e0b;
  --ho-warning: light-dark(#b45309, #f59e0b);
  --ho-danger:  #ef4444;
  --ho-danger:  light-dark(#dc2626, #ef4444);
  --ho-info:    #38bdf8;
  --ho-info:    light-dark(#0369a1, #38bdf8);
  --ho-neutral: #64748b;
  --ho-neutral: light-dark(#52607a, #64748b);

  /* Links: dunkles Blau auf Weiß, helles Blau auf Tinte */
  --ho-link: var(--ho-primary-400);
  --ho-link: light-dark(var(--ho-primary-700), var(--ho-primary-400));

  /* Abgeleitet. Die Flächen liegen auf der Markengrafik, deshalb sind sie
     deckend genug, um Text sicher zu tragen – nicht durchsichtig wie Glas. */
  --ho-border:        color-mix(in srgb, var(--ho-text) 14%, transparent);
  --ho-border-strong: color-mix(in srgb, var(--ho-text) 26%, transparent);

  --ho-card:       color-mix(in srgb, #0E0E52 94%, transparent);
  --ho-card:       light-dark(color-mix(in srgb, #fff 96%, transparent),
                              color-mix(in srgb, #0E0E52 94%, transparent));
  --ho-card-hover: color-mix(in srgb, #17175E 97%, transparent);
  --ho-card-hover: light-dark(#ffffff, color-mix(in srgb, #17175E 97%, transparent));

  --ho-overlay: color-mix(in srgb, var(--ho-ink) 55%, transparent);

  --ho-shadow-sm: 0 1px 2px rgb(0 0 0 / .4);
  --ho-shadow-sm: 0 1px 2px light-dark(rgb(5 5 55 / .10), rgb(0 0 0 / .4));
  --ho-shadow-md: 0 4px 16px rgb(0 0 0 / .35);
  --ho-shadow-md: 0 4px 16px light-dark(rgb(5 5 55 / .12), rgb(0 0 0 / .35));
  --ho-shadow-lg: 0 18px 48px rgb(0 0 0 / .45);
  --ho-shadow-lg: 0 18px 48px light-dark(rgb(5 5 55 / .16), rgb(0 0 0 / .45));

  --ho-glow: 0 4px 18px color-mix(in srgb, var(--ho-primary-500) 40%, transparent);
}

/* Die Umschaltung. Mehr braucht es nicht – alle Farben oben folgen von selbst. */
:root[data-theme="dark"]  { color-scheme: dark; }
:root[data-theme="light"] { color-scheme: light; }

/* Kurznamen für Bestandscode */
:root {
  --bg: var(--ho-bg);
  --bg-soft: var(--ho-bg-soft);
  --card-solid: var(--ho-surface);
  --card: var(--ho-card);
  --text: var(--ho-text);
  --text-dim: var(--ho-text-dim);
  --border: var(--ho-border);
  --nodata: var(--ho-nodata);
  --up: var(--ho-success);
  --degraded: var(--ho-warning);
  --down: var(--ho-danger);
  --maintenance: #eab308;
}


/* == 05  Reset & Basis ======================================================= */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
[hidden] { display: none !important; }

/* color-scheme steht in Abschnitt 04 – dort, wo auch die Farben stehen. */

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

body {
  font-family: var(--ho-font);
  font-size: var(--ho-text-base);
  font-weight: var(--ho-weight-normal);
  line-height: var(--ho-leading-body);
  background: var(--ho-bg);
  color: var(--ho-text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background var(--ho-motion-base), color var(--ho-motion-base);
}

/* Marken-Hintergrund: die Markengrafik über die ganze Seite.

   Sie sitzt auf <html>, nicht auf einem fixierten Element. Grund: ein
   `position: fixed`-Element ist genau einen Bildschirm hoch – auf einer langen
   Seite endet das Bild dann auf halber Höhe und darunter liegt nichts.
   `background-attachment: fixed` auf <html> steht ebenfalls still, deckt aber
   die gesamte Seite.

   Über der Grafik liegt ein Verlauf, damit Text sicher sitzt: auf Dunkel
   abdunkelnd, auf Hell aufhellend. Seine beiden Farben kommen aus Tokens, die
   per light-dark() umschalten – deshalb steht diese Regel nur einmal hier und
   nicht je Modus erneut. Genau diese Doppelung war der Grund, warum
   "System hell" heller war als "Hell": dort standen 78%/86% statt 60%/72%.

   Ein background-image kann light-dark() nicht selbst benutzen, eine Farbe
   darin sehr wohl. */
:root {
  --ho-scrim-oben:  rgb(5 5 55 / .15);
  --ho-scrim-oben:  light-dark(rgb(255 255 255 / .60), rgb(5 5 55 / .15));
  --ho-scrim-unten: rgb(5 5 55 / .32);
  --ho-scrim-unten: light-dark(rgb(255 255 255 / .72), rgb(5 5 55 / .32));
}

html {
  background-color: var(--ho-bg);
  background-image:
    linear-gradient(160deg, var(--ho-scrim-oben) 0%, var(--ho-scrim-unten) 100%),
    url('/assets/img/brand-bg-960.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}
@media (min-width: 900px) {
  html {
    background-image:
      linear-gradient(160deg, var(--ho-scrim-oben) 0%, var(--ho-scrim-unten) 100%),
      url('/assets/img/brand-bg-1920.webp');
  }
}

/* Der Grund selbst ist durchsichtig, damit die Grafik von <html> trägt.
   Sonst würde der Body-Hintergrund sie sofort wieder zudecken. */
body { background: transparent; }

img, svg, video, canvas { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
ul, ol { list-style-position: outside; padding-left: 1.25em; }

::selection {
  background: color-mix(in srgb, var(--ho-primary-500) 35%, transparent);
  color: var(--ho-text);
}

/* Bewegung nur, wenn gewünscht */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}


/* == 06  Fokus & Barrierefreiheit ============================================
   Sichtbarer Fokusring für Tastaturbedienung – nie entfernen, nur gestalten. */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--ho-primary-400);
  outline-offset: 2px;
  border-radius: var(--ho-radius-sm);
}
:focus:not(:focus-visible) { outline: none; }

.ho-visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap; border: 0;
}

.ho-skip-link {
  position: absolute; left: var(--ho-space-4); top: -100px;
  z-index: var(--ho-z-toast);
  padding: var(--ho-space-2) var(--ho-space-4);
  background: var(--ho-surface); color: var(--ho-text);
  border: 1px solid var(--ho-border-strong);
  border-radius: var(--ho-radius-md);
  transition: top var(--ho-motion-base) var(--ho-ease);
}
.ho-skip-link:focus { top: var(--ho-space-4); }


/* == 07  Layout ============================================================== */
.ho-container {
  width: 100%;
  max-width: var(--ho-width-page);
  margin-inline: auto;
  padding-inline: var(--ho-space-5);
  position: relative;
  z-index: var(--ho-z-base);
}
.ho-container--narrow { max-width: var(--ho-width-narrow); }
.container { /* Kompatibilität */
  max-width: var(--ho-width-narrow); margin: 0 auto;
  padding: 0 var(--ho-space-5); position: relative; z-index: var(--ho-z-base);
}

.ho-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--ho-space-3);
  padding-block: var(--ho-space-6);
}
.site-header { /* Kompatibilität */
  display: flex; align-items: center; justify-content: space-between;
  padding: 28px 0; gap: var(--ho-space-3);
}

/* Logo: Symbol + Wortmarke links. Das Symbol tauscht theme.js per
   data-logo-role / data-logo-light / data-logo-dark je Modus aus. */
.ho-logo, .logo {
  display: inline-flex; align-items: center; gap: var(--ho-space-3);
  text-decoration: none; color: var(--ho-text);
}
.ho-logo__mark, .logo-mark {
  width: 38px; height: 38px; display: block;
  filter: drop-shadow(var(--ho-glow));
}
/* Breite Wortmarke: feste Hoehe, freie Breite. Sie darf NICHT in .logo-mark
   stehen - das ist ein Quadrat, und eine Wortmarke wird darin gequetscht. */
.ho-logo__wordmark, .logo-wordmark {
  height: 26px; width: auto; display: block;
  filter: drop-shadow(var(--ho-glow));
}
.site-foot__grid .logo-wordmark, .site-foot__grid .ho-logo__wordmark { height: 20px; }
.ho-logo__text, .logo-text {
  font-size: var(--ho-text-lg);
  font-weight: var(--ho-weight-bold);
  letter-spacing: var(--ho-tracking-tight);
}
.ho-logo__text .thin, .logo-text .thin {
  font-weight: var(--ho-weight-normal); color: var(--ho-text-dim);
}
.ho-header__actions, .header-actions {
  display: flex; align-items: center; gap: var(--ho-space-2);
}
/* Innere Schiene der Kopfzeile: das Band laeuft ueber die volle Breite, die Zeile
   sitzt im Satzspiegel - wie in der Fusszeile. Zentriert sich als Flex-Element
   selbst, deshalb muss .site-header nicht angefasst werden. */
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--ho-space-3); width: 100%; margin-inline: auto;
}

/* --- Fusszeile ------------------------------------------------------------
   Aufbau, Masse und Farben aus dem Design-System (site.css, .site-foot). Sie
   standen bisher in jedem Werkzeug einzeln - dadurch sah jede Fusszeile ein
   wenig anders aus. Der abgesetzte Hintergrund laeuft ueber die volle Breite,
   deshalb liegt die Fusszeile AUSSERHALB des Satzspiegels und traegt ihn innen:

     <footer class="site-foot">
       <div class="ho-container">
         <div class="site-foot__grid"> Spalten </div>
         <div class="site-foot__base"> Copyright + Signet </div>
       </div>
     </footer>

   Gebaut wird sie von assets/ho/kopf-fuss.js - damit alle Werkzeuge dieselbe
   Struktur haben und nicht nur dieselben Klassen.                           */
.site-foot {
  margin-top: var(--ho-space-9);
  padding-block: var(--ho-space-7) var(--ho-space-5);
  border-top: 1px solid var(--ho-border);
  background: color-mix(in srgb, var(--ho-bg) 60%, transparent);
  font-size: var(--ho-text-sm); color: var(--ho-text-dim);
}
.site-foot__grid {
  display: grid; gap: var(--ho-space-6);
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.site-foot__grid .logo, .site-foot__grid .ho-logo { margin-bottom: var(--ho-space-3); }
.site-foot__grid .logo-mark, .site-foot__grid .ho-logo__mark { width: 26px; height: 26px; }
.site-foot__grid .logo-text, .site-foot__grid .ho-logo__text { font-size: var(--ho-text-md); }
.site-foot__grid p { max-width: 34ch; }
/* Die Spaltenueberschrift ist ein h6 - im Design-System klein, gesperrt, in
   Grossbuchstaben und gedaempft. Keine eigene Klasse noetig. */
.site-foot__list { list-style: none; padding: 0; margin-top: var(--ho-space-2); }
.site-foot__list li { padding-block: 3px; }
.site-foot__list a { font-size: var(--ho-text-sm); text-decoration: none; }
.site-foot__list a:hover { text-decoration: underline; }
.site-foot__base {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--ho-space-4); flex-wrap: wrap;
  margin-top: var(--ho-space-6); padding-top: var(--ho-space-4);
  border-top: 1px solid var(--ho-border);
}
.site-foot__base img { height: 18px; width: auto; display: block; }
/* Signet "powered by ho.Systeme": in der Fusszeile und daneben verwendbar. */
.powered-by { display: inline-flex; align-items: center; gap: var(--ho-space-2); text-decoration: none; }
.powered-by img { height: 18px; width: auto; display: block; }

/* --- Kopfzeilen-Menü -------------------------------------------------------
   Waagerechtes Hauptmenü wie auf der Website: fette Beschriftung in Textfarbe,
   der aktive Punkt trägt aria-current="page". Auf schmalen Geräten klappt es
   über <details> auf – ohne JavaScript, damit es auch dann funktioniert, wenn
   ein Skript scheitert.

     <nav class="ho-menu" aria-label="Hauptmenü">
       <a class="ho-menu__item" href="#a" aria-current="page">Punkt</a>
     </nav>                                                                  */
/* Segmentleiste: die Punkte sitzen in einer gemeinsamen Wanne, der aktive
   bekommt eine eigene Fläche. Das liest sich als Werkzeugleiste – anders als
   lose Textlinks nebeneinander, bei denen man den aktiven Punkt suchen muss. */
.ho-menu {
  display: flex; align-items: center; gap: 2px;
  padding: 3px;
  background: color-mix(in srgb, var(--ho-text) 6%, transparent);
  border: 1px solid var(--ho-border);
  border-radius: var(--ho-radius-md);
}
.ho-menu__item {
  position: relative;
  padding: 6px var(--ho-space-3);
  border-radius: 2px;
  color: var(--ho-text-dim);
  text-decoration: none; white-space: nowrap;
  font-size: var(--ho-text-sm); font-weight: var(--ho-weight-semibold);
  transition: color var(--ho-motion-fast) var(--ho-ease),
              background var(--ho-motion-fast) var(--ho-ease);
}
.ho-menu__item:hover { color: var(--ho-text); background: color-mix(in srgb, var(--ho-text) 7%, transparent); }
.ho-menu__item[aria-current] {
  color: var(--ho-text);
  background: var(--ho-surface);
  box-shadow: var(--ho-shadow-sm);
}
/* Schmale Markenkante am aktiven Punkt – die Richtung, ohne Verspieltheit. */
.ho-menu__item[aria-current]::after {
  content: '';
  position: absolute; left: var(--ho-space-3); right: var(--ho-space-3); bottom: 3px;
  height: 2px; border-radius: var(--ho-radius-full);
  background: var(--ho-primary-500);
  animation: ho-in-up .28s var(--ho-ease-spring) both;
}

/* --- Menü-Schublade -------------------------------------------------------
   Statt einer waagerechten Leiste, die ab neun Punkten neben Logo und Aktionen
   nicht mehr passt und sich darüberschiebt: ein Knopf öffnet eine Fläche über
   der ganzen Seite. Das skaliert mit jeder Anzahl von Punkten und auf jeder
   Breite – der Überlappungsfehler kann nicht wiederkommen.

   Auf breiten Geräten fährt sie von oben ein, auf schmalen von unten (dort ist
   der Daumen). Vorbild: das Responsive-Header-Muster von ui-layouts, hier ohne
   React, Tailwind und Framer Motion umgesetzt.

     <button data-drawer-open aria-controls="hauptmenue" aria-expanded="false">
     <div class="ho-drawer" id="hauptmenue" hidden> … </div>                  */
.ho-drawer { position: fixed; inset: 0; z-index: var(--ho-z-overlay); }
.ho-drawer[hidden] { display: none; }

.ho-drawer__blende {
  position: absolute; inset: 0;
  background: var(--ho-overlay);
  backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity var(--ho-motion-base) var(--ho-ease);
}
.ho-drawer.is-offen .ho-drawer__blende { opacity: 1; }

.ho-drawer__blatt {
  position: absolute; left: 0; right: 0; top: 0;
  max-height: 92vh; overflow-y: auto;
  padding-block: var(--ho-space-5) var(--ho-space-7);
  background: color-mix(in srgb, var(--ho-bg) 94%, transparent);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--ho-border-strong);
  box-shadow: var(--ho-shadow-lg);
  transform: translateY(-100%);
  transition: transform var(--ho-motion-slow) var(--ho-ease);
}
.ho-drawer.is-offen .ho-drawer__blatt { transform: none; }

/* Schmale Geräte: von unten, mit Griff – wie ein Bottom Sheet. */
@media (max-width: 767px) {
  .ho-drawer__blatt {
    top: auto; bottom: 0;
    border-bottom: 0; border-top: 1px solid var(--ho-border-strong);
    border-radius: var(--ho-radius-xl) var(--ho-radius-xl) 0 0;
    padding-block: var(--ho-space-6) var(--ho-space-6);
    transform: translateY(100%);
  }
  .ho-drawer__griff {
    position: absolute; top: var(--ho-space-3); left: 50%;
    transform: translateX(-50%);
    width: 56px; height: 5px; border-radius: var(--ho-radius-full);
    background: var(--ho-text-faint);
  }
}
@media (min-width: 768px) { .ho-drawer__griff { display: none; } }

.ho-drawer__kopf {
  display: flex; align-items: center; gap: var(--ho-space-4);
  padding-bottom: var(--ho-space-4);
  border-bottom: 1px solid var(--ho-border);
}
.ho-drawer__titel {
  margin-inline: auto;
  font-size: var(--ho-text-lg); font-weight: var(--ho-weight-bold);
  letter-spacing: var(--ho-tracking-tight);
}

.ho-drawer__inhalt {
  display: grid; gap: var(--ho-space-6);
  padding-top: var(--ho-space-5);
}
@media (min-width: 900px) {
  .ho-drawer__inhalt { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
}

.ho-drawer__nav { list-style: none; padding: 0; margin: 0; }
.ho-drawer__nav li + li { margin-top: var(--ho-space-2); }

/* Große Zeile mit Strich, der von rechts nach links aufzieht – dieselbe
   Bewegung wie im Vorbild, nur mit unseren Tokens. */
.ho-drawer__link {
  position: relative;
  display: flex; align-items: center; gap: var(--ho-space-3);
  padding-block: 4px;
  color: var(--ho-text); text-decoration: none;
  font-size: var(--ho-text-2xl); font-weight: var(--ho-weight-bold);
  letter-spacing: var(--ho-tracking-tight);
  width: fit-content;
  transition: color var(--ho-motion-fast) var(--ho-ease);
}
.ho-drawer__link::after {
  content: '';
  position: absolute; left: 0; bottom: 2px;
  width: 100%; height: 2px;
  background: var(--ho-primary-500);
  transform: scaleX(0); transform-origin: bottom right;
  transition: transform var(--ho-motion-slow) cubic-bezier(.65, .05, .36, 1);
}
.ho-drawer__link:hover::after,
.ho-drawer__link:focus-visible::after { transform: scaleX(1); transform-origin: bottom left; }
.ho-drawer__link[aria-current="page"] { color: var(--ho-link); }
.ho-drawer__link[aria-current="page"]::after { transform: scaleX(1); transform-origin: bottom left; }
.ho-drawer__link .ho-icon { color: var(--ho-text-faint); }
.ho-drawer__kurz {
  font-size: var(--ho-text-sm); font-weight: var(--ho-weight-normal);
  color: var(--ho-text-dim); letter-spacing: 0;
}

/* Die Einträge kommen gestaffelt herein, sobald die Fläche steht. */
.ho-drawer__nav li { opacity: 0; transform: translateY(10px); }
.ho-drawer.is-offen .ho-drawer__nav li {
  opacity: 1; transform: none;
  transition: opacity .32s var(--ho-ease), transform .32s var(--ho-ease-spring);
  transition-delay: calc(60ms + var(--n, 0) * 35ms);
}

.ho-drawer__vorschau { display: grid; gap: var(--ho-space-3); grid-template-columns: repeat(3, 1fr); }
.ho-drawer__kachel {
  aspect-ratio: 3 / 4;
  border-radius: var(--ho-radius-lg);
  border: 1px solid var(--ho-border);
  background: var(--ho-card);
  display: grid; place-items: center; gap: var(--ho-space-2);
  padding: var(--ho-space-3);
  color: inherit; text-decoration: none; text-align: center;
  transition: border-color var(--ho-motion-fast), transform var(--ho-motion-base) var(--ho-ease-spring);
}
.ho-drawer__kachel:hover { border-color: var(--ho-primary-500); transform: translateY(-3px); }
.ho-drawer__kachel span { font-size: var(--ho-text-xs); color: var(--ho-text-dim); }
@media (max-width: 899px) { .ho-drawer__vorschau { display: none; } }

@media (prefers-reduced-motion: reduce) {
  .ho-drawer__blatt { transition: none; }
  .ho-drawer__nav li { opacity: 1; transform: none; transition: none; }
}

/* Im Aufklappmenü ist es eine Liste, keine Leiste. */
.ho-menu-toggle__panel {
  background: var(--ho-surface); border-radius: var(--ho-radius-lg); padding: var(--ho-space-2);
}
.ho-menu-toggle__panel.ho-menu { border: 1px solid var(--ho-border-strong); }
.ho-menu-toggle__panel .ho-menu__item { border-radius: var(--ho-radius-md); }
.ho-menu-toggle__panel .ho-menu__item::after { display: none; }
.ho-menu-toggle__panel .ho-menu__item[aria-current] {
  background: color-mix(in srgb, var(--ho-primary-500) 16%, transparent);
  color: var(--ho-link); box-shadow: none;
}

/* Aufklapp-Menü für schmale Geräte. Der Auslöser ist ein <summary>. */
.ho-menu-toggle { position: relative; }
.ho-menu-toggle > summary {
  list-style: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: var(--ho-space-2);
}
.ho-menu-toggle > summary::-webkit-details-marker { display: none; }
.ho-menu-toggle__panel {
  position: absolute; right: 0; top: calc(100% + var(--ho-space-2));
  z-index: var(--ho-z-overlay);
  display: flex; flex-direction: column; align-items: stretch;
  min-width: 220px;
  padding: var(--ho-space-2);
  background: var(--ho-surface);
  border: 1px solid var(--ho-border-strong);
  border-radius: var(--ho-radius-lg);
  box-shadow: var(--ho-shadow-lg);
}

/* --- Überschriften-Strich --------------------------------------------------
   Der kurze blaue Balken unter einer Überschrift. Signaturelement der Marke –
   sparsam einsetzen: einmal je Abschnitt, nicht unter jeder Zeile. */
.ho-rule {
  width: 96px; height: 3px; border: 0;
  margin: var(--ho-space-4) 0 0;
  background: var(--ho-primary-500);
  border-radius: var(--ho-radius-full);
}
.ho-rule--wide { width: 100%; max-width: 480px; }

/* --- Marken-Fläche ---------------------------------------------------------
   Die Original-Markengrafik als Hintergrund. Für genau eine Fläche je Seite:
   den Kopfbereich. Nicht als Seitenhintergrund und nie hinter Fließtext.

   Der Text liegt immer auf einer abgedunkelten Schicht, sonst reißt der
   Kontrast auf den helleren Flächen der Grafik ein. Farbe ist hier fest weiß,
   weil die Fläche in beiden Modi dunkel ist – sie folgt dem Modus nicht.

     <section class="ho-brand-panel">
       <div class="ho-brand-panel__inner"> … </div>
     </section>                                                              */
.ho-brand-panel {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: var(--ho-radius-xl);
  padding: var(--ho-space-7) var(--ho-space-6);
  color: #fff;
  background-color: var(--ho-secondary-700);   /* trägt, bevor das Bild da ist */
  background-image: url('/assets/img/brand-bg-960.webp');
  background-size: cover;
  background-position: center;
}
@media (min-width: 900px) {
  .ho-brand-panel {
    padding: var(--ho-space-8) var(--ho-space-7);
    background-image: url('/assets/img/brand-bg-1920.webp');
  }
}
/* Abdunkelnde Schicht – ohne sie ist heller Text auf den hellen Flächen der
   Grafik nicht mehr sicher lesbar. */
.ho-brand-panel::before {
  content: '';
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(105deg,
    color-mix(in srgb, var(--ho-ink) 78%, transparent) 0%,
    color-mix(in srgb, var(--ho-ink) 45%, transparent) 55%,
    color-mix(in srgb, var(--ho-ink) 20%, transparent) 100%);
}
.ho-brand-panel a { color: #fff; }
.ho-brand-panel .ho-rule { background: #fff; }
/* Text im Panel folgt nicht den Modus-Tokens – die Fläche ist immer dunkel. */
.ho-brand-panel .ho-muted,
.ho-brand-panel .ho-lead { color: color-mix(in srgb, #fff 78%, transparent); }
.ho-brand-panel .ho-eyebrow { color: #fff; }

/* --- Wabe ------------------------------------------------------------------
   Inhalt in Sechseckform – das Markenmotiv aus Logo und Bildsprache.
   Für Symbole, Kennzahlen und Bilder. Nicht für Text: in einer Wabe ist der
   nutzbare Bereich viel kleiner, als er aussieht. */
.ho-hex {
  display: grid; place-items: center;
  aspect-ratio: 1 / 1.1547;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  background: var(--ho-surface-2);
  overflow: hidden;
}
.ho-hex--brand { background: var(--ho-gradient); color: #fff; }
.ho-hex img { width: 100%; height: 100%; object-fit: cover; }

.ho-stack   { display: flex; flex-direction: column; gap: var(--ho-space-4); }
.ho-stack-2 { display: flex; flex-direction: column; gap: var(--ho-space-2); }
.ho-stack-6 { display: flex; flex-direction: column; gap: var(--ho-space-6); }
.ho-row     { display: flex; align-items: center; gap: var(--ho-space-3); flex-wrap: wrap; }
.ho-grid {
  display: grid; gap: var(--ho-space-4);
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.ho-section { padding-block: var(--ho-space-7); }
.ho-section + .ho-section { border-top: 1px solid var(--ho-border); }

.ho-footer {
  padding-block: var(--ho-space-6);
  border-top: 1px solid var(--ho-border);
  color: var(--ho-text-dim);
  font-size: var(--ho-text-sm);
}


/* == 08  Typografie ========================================================== */
h1, .ho-h1 {
  font-size: var(--ho-text-4xl); font-weight: var(--ho-weight-display);
  line-height: var(--ho-leading-tight); letter-spacing: var(--ho-tracking-display);
}
h2, .ho-h2 {
  font-size: var(--ho-text-3xl); font-weight: var(--ho-weight-bold);
  line-height: var(--ho-leading-tight); letter-spacing: var(--ho-tracking-display);
}
h3, .ho-h3 {
  font-size: var(--ho-text-2xl); font-weight: var(--ho-weight-bold);
  line-height: var(--ho-leading-snug); letter-spacing: var(--ho-tracking-tight);
}
h4, .ho-h4 {
  font-size: var(--ho-text-xl); font-weight: var(--ho-weight-semibold);
  line-height: var(--ho-leading-snug); letter-spacing: var(--ho-tracking-tight);
}
h5, .ho-h5 {
  font-size: var(--ho-text-lg); font-weight: var(--ho-weight-semibold);
  line-height: var(--ho-leading-snug);
}
h6, .ho-h6 {
  font-size: var(--ho-text-sm); font-weight: var(--ho-weight-semibold);
  letter-spacing: var(--ho-tracking-wide); text-transform: uppercase;
  color: var(--ho-text-dim);
}

.ho-lead { font-size: var(--ho-text-lg); color: var(--ho-text-dim); max-width: var(--ho-width-prose); }
.ho-prose { max-width: var(--ho-width-prose); }
.ho-prose > * + * { margin-top: var(--ho-space-4); }
.ho-muted { color: var(--ho-text-dim); }
.ho-faint { color: var(--ho-text-faint); }
.ho-small { font-size: var(--ho-text-sm); }
.ho-eyebrow {
  font-size: var(--ho-text-xs); font-weight: var(--ho-weight-semibold);
  letter-spacing: var(--ho-tracking-wide); text-transform: uppercase;
  color: var(--ho-primary-400);
}
.ho-numeric { font-variant-numeric: tabular-nums; }

a { color: var(--ho-link); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }

hr {
  border: 0; height: 1px; background: var(--ho-border);
  margin-block: var(--ho-space-5);
}


/* == 09  Buttons =============================================================
   Varianten: (Standard) · --primary · --ghost · --danger
   Größen:    --sm · (Standard) · --lg
   Zustände:  hover · active · :disabled · [aria-busy="true"]
   ========================================================================== */
.ho-btn, .btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: var(--ho-space-2);
  padding: 9px 18px;
  border-radius: var(--ho-radius-md);
  border: 1px solid var(--ho-border-strong);
  background: var(--ho-card);
  color: var(--ho-text);
  font-family: inherit; font-size: var(--ho-text-base);
  font-weight: var(--ho-weight-semibold);
  line-height: 1.2;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background var(--ho-motion-fast), border-color var(--ho-motion-fast),
              transform var(--ho-motion-fast), filter var(--ho-motion-fast);
}
.ho-btn:hover, .btn:hover {
  background: var(--ho-card-hover); border-color: var(--ho-border-strong);
  transform: translateY(-1px);
}
.ho-btn:active, .btn:active { transform: translateY(1px); }
.ho-btn:disabled, .btn:disabled,
.ho-btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; transform: none; }
.ho-btn[aria-busy="true"] { cursor: progress; opacity: .7; }

.ho-btn--sm, .btn-sm { padding: 6px 12px; font-size: var(--ho-text-sm); border-radius: var(--ho-radius-sm); }
.ho-btn--lg { padding: 14px 28px; font-size: var(--ho-text-md); }
.ho-btn--block { width: 100%; }

/* Primär: flaches Markenblau, wie auf der Website – kein Verlauf.
   Ein Verlauf auf jeder Schaltfläche ist der schnellste Weg zum Baukasten-Look. */
.ho-btn--primary, .btn-primary {
  background: var(--ho-primary-500); border-color: transparent; color: #fff;
}
.ho-btn--primary:hover, .btn-primary:hover {
  background: var(--ho-primary-700); border-color: transparent;
}

/* Verlauf nur, wo er wirklich gewollt ist – eine Aktion pro Seite, höchstens. */
.ho-btn--gradient {
  background: var(--ho-gradient); border-color: transparent; color: #fff;
}
.ho-btn--gradient:hover { filter: brightness(1.08); border-color: transparent; }

.ho-btn--ghost { background: transparent; border-color: transparent; color: var(--ho-text-dim); }
.ho-btn--ghost:hover { background: var(--ho-card); color: var(--ho-text); }

.ho-btn--danger, .btn-danger {
  color: var(--ho-danger); background: transparent;
  border-color: color-mix(in srgb, var(--ho-danger) 40%, transparent);
}
.ho-btn--danger:hover, .btn-danger:hover {
  background: color-mix(in srgb, var(--ho-danger) 14%, transparent);
  border-color: var(--ho-danger);
}

.ho-btn__icon { width: 1.05em; height: 1.05em; flex: none; }

/* Symbolhalter in Schaltflächen dürfen nicht schrumpfen. Sie sind Flex-Kinder;
   ohne diese Regel drückt eine enge Kopfzeile sie auf Breite 0 und das Symbol
   verschwindet – auf dem Handy gemessen. */
.ho-btn > span:has(> .ho-icon),
[data-theme-icon] { display: inline-flex; flex: none; }

.ho-btn-group { display: inline-flex; gap: var(--ho-space-2); flex-wrap: wrap; }


/* == 10  Formulare =========================================================== */
.ho-field { display: flex; flex-direction: column; gap: var(--ho-space-2); }
.ho-label {
  font-size: var(--ho-text-sm); font-weight: var(--ho-weight-semibold);
  color: var(--ho-text);
}
.ho-label__optional { font-weight: var(--ho-weight-normal); color: var(--ho-text-faint); }
.ho-hint { font-size: var(--ho-text-sm); color: var(--ho-text-dim); }
.ho-error { font-size: var(--ho-text-sm); color: var(--ho-danger); font-weight: var(--ho-weight-medium); }

.ho-input, .ho-select, .ho-textarea {
  width: 100%;
  padding: 9px 12px;
  background: var(--ho-bg-soft);
  color: var(--ho-text);
  border: 1px solid var(--ho-border-strong);
  border-radius: var(--ho-radius-md);
  font-size: var(--ho-text-base);
  transition: border-color var(--ho-motion-fast), box-shadow var(--ho-motion-fast);
}
.ho-input::placeholder, .ho-textarea::placeholder { color: var(--ho-text-faint); }
.ho-input:hover, .ho-select:hover, .ho-textarea:hover { border-color: var(--ho-text-faint); }
.ho-input:focus, .ho-select:focus, .ho-textarea:focus {
  outline: none;
  border-color: var(--ho-primary-500);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ho-primary-500) 25%, transparent);
}
.ho-input:disabled, .ho-select:disabled, .ho-textarea:disabled {
  opacity: .5; cursor: not-allowed; background: var(--ho-bg-sunken);
}
.ho-input[aria-invalid="true"], .ho-textarea[aria-invalid="true"], .ho-select[aria-invalid="true"] {
  border-color: var(--ho-danger);
}
.ho-input[aria-invalid="true"]:focus {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ho-danger) 25%, transparent);
}
.ho-textarea { min-height: 96px; resize: vertical; }
.ho-select { appearance: none; padding-right: 34px;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%),
                    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: right 16px center, right 11px center;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

/* Das aufgeklappte Menue ist ein Bedienelement des Betriebssystems. Ohne eigene
   Regel nimmt es SEINEN Hintergrund (im Systemmodus hell: weiss) und ERBT die
   Textfarbe vom <select> — in Werkzeugen mit dunklen Tokens also hell auf weiss,
   praktisch unlesbar. Deshalb beide Farben ausdruecklich und aus DERSELBEN
   Token-Familie setzen: dann passen sie auch dann zusammen, wenn ein Browser
   light-dark() nicht kennt und alle Tokens auf ihren dunklen Ausgangswerten
   stehen bleiben.

   --ho-surface statt --ho-card: das Menue liegt ueber der Seite und braucht eine
   deckende Flaeche; --ho-card ist absichtlich leicht durchscheinend. */
.ho-select option, .ho-select optgroup,
select option, select optgroup {
  background-color: var(--ho-surface);
  color: var(--ho-text);
}
.ho-select option:disabled, select option:disabled { color: var(--ho-text-faint); }

.ho-check { display: inline-flex; align-items: center; gap: var(--ho-space-2); cursor: pointer; }
.ho-check input { width: 17px; height: 17px; accent-color: var(--ho-primary-500); cursor: pointer; }

/* Schalter */
.ho-switch { display: inline-flex; align-items: center; gap: var(--ho-space-3); cursor: pointer; }
.ho-switch input { position: absolute; opacity: 0; pointer-events: none; }
.ho-switch__track {
  width: 40px; height: 22px; flex: none;
  background: var(--ho-nodata); border-radius: var(--ho-radius-full);
  position: relative; transition: background var(--ho-motion-base) var(--ho-ease);
}
.ho-switch__track::after {
  content: ''; position: absolute; top: 3px; left: 3px;
  width: 16px; height: 16px; border-radius: 50%;
  background: #fff; box-shadow: var(--ho-shadow-sm);
  transition: transform var(--ho-motion-base) var(--ho-ease);
}
.ho-switch input:checked + .ho-switch__track { background: var(--ho-primary-500); }
.ho-switch input:checked + .ho-switch__track::after { transform: translateX(18px); }
.ho-switch input:focus-visible + .ho-switch__track {
  outline: 2px solid var(--ho-primary-400); outline-offset: 2px;
}


/* == 11  Karten, Badges, Hinweise ============================================ */
/* Flächen liegen auf der Markengrafik. backdrop-filter beruhigt, was
   durchscheint – ohne ihn wirkt jede Kante unruhig. */
.ho-card, .card {
  background: var(--ho-card);
  border: 1px solid var(--ho-border);
  border-radius: var(--ho-radius-lg);
  padding: var(--ho-space-5);
  backdrop-filter: blur(10px);
}
.ho-card--solid { background: var(--ho-surface); }

/* Klickbare Karte: hebt sich an, die Kante nimmt Markenfarbe an und ein
   schmaler Lichtstreifen läuft über die Oberkante. Alles zusammen unter
   250 ms – es soll reagieren, nicht auffallen. */
.ho-card--interactive {
  position: relative; overflow: hidden;
  transition: border-color var(--ho-motion-base) var(--ho-ease),
              background var(--ho-motion-base) var(--ho-ease),
              transform var(--ho-motion-base) var(--ho-ease-spring),
              box-shadow var(--ho-motion-base) var(--ho-ease);
}
.ho-card--interactive::before {
  content: '';
  position: absolute; inset: 0 0 auto 0; height: 1px;
  background: linear-gradient(90deg, transparent,
    color-mix(in srgb, var(--ho-primary-400) 85%, transparent), transparent);
  opacity: 0;
  transition: opacity var(--ho-motion-base) var(--ho-ease);
}
.ho-card--interactive:hover {
  background: var(--ho-card-hover);
  border-color: color-mix(in srgb, var(--ho-primary-500) 45%, var(--ho-border-strong));
  transform: translateY(-3px);
  box-shadow: var(--ho-shadow-md);
}
.ho-card--interactive:hover::before { opacity: 1; }
.ho-card--interactive:active { transform: translateY(-1px); }
.ho-card__title { font-size: var(--ho-text-lg); font-weight: var(--ho-weight-semibold); }
.ho-card__meta { font-size: var(--ho-text-sm); color: var(--ho-text-dim); }

/* --- Kachel mit Kopfzeile --------------------------------------------------
   Die Arbeitsfläche für Werkzeuge: Titel und Aktionen oben, Inhalt darunter,
   optional eine ruhige Fußzeile. Anders als .ho-card ist sie deckend und
   gegliedert – dafür gedacht, dass viele davon nebeneinander stehen und man
   trotzdem sofort sieht, wo eine anfängt und die nächste aufhört.

     <section class="ho-panel">
       <header class="ho-panel__head">
         <h3 class="ho-panel__title">Titel</h3>
         <div class="ho-panel__actions"> … </div>
       </header>
       <div class="ho-panel__body"> … </div>
       <footer class="ho-panel__foot"> … </footer>
     </section>                                                              */
.ho-panel {
  display: flex; flex-direction: column;
  min-width: 0;
  background: var(--ho-surface);
  border: 1px solid var(--ho-border);
  border-radius: var(--ho-radius-lg);
  box-shadow: var(--ho-shadow-sm);
  overflow: hidden;
}
.ho-panel__head {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--ho-space-3);
  padding: var(--ho-space-3) var(--ho-space-4);
  background: var(--ho-surface-2);
  border-bottom: 1px solid var(--ho-border);
}
.ho-panel__title {
  display: flex; align-items: center; gap: var(--ho-space-2);
  font-size: var(--ho-text-sm); font-weight: var(--ho-weight-bold);
  letter-spacing: 0; text-transform: none;
  color: var(--ho-text);
}
.ho-panel__actions { display: flex; align-items: center; gap: var(--ho-space-2); }
.ho-panel__body { padding: var(--ho-space-4); flex: 1; }
.ho-panel__body--flush { padding: 0; }
.ho-panel__foot {
  padding: var(--ho-space-3) var(--ho-space-4);
  border-top: 1px solid var(--ho-border);
  background: color-mix(in srgb, var(--ho-surface-2) 60%, transparent);
  font-size: var(--ho-text-sm); color: var(--ho-text-dim);
}
/* Farbige Oberkante zur Einordnung – höchstens eine Farbe je Ansicht. */
.ho-panel--success { border-top: 2px solid var(--ho-success); }
.ho-panel--warning { border-top: 2px solid var(--ho-warning); }
.ho-panel--danger  { border-top: 2px solid var(--ho-danger); }
.ho-panel--brand   { border-top: 2px solid var(--ho-primary-500); }

/* Wird die Kachel als <dialog> genutzt, überschreibt .ho-panel{display:flex} die
   Browser-Regel dialog:not([open]){display:none} – ein geschlossener Dialog stünde
   sonst sichtbar in der Seite. Wieder ausblenden; offen mittig statt in der Ecke. */
dialog.ho-panel:not([open]) { display: none; }
dialog.ho-panel[open] { margin: auto; }

/* Feedback-Dialog (assets/ho/feedback.js): Screenshot zum Markieren. Der Rest
   des Dialogs kommt aus ho-panel, ho-btn, ho-textarea, ho-check und ho-alert. */
.ho-feedback { width: min(960px, calc(100vw - 2 * var(--ho-space-4))); max-height: calc(100dvh - 2 * var(--ho-space-4)); }
.ho-feedback .ho-panel__body { overflow: auto; }
.ho-feedback__werkzeuge { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ho-space-2); }
.ho-feedback__farbe {
  width: 24px; height: 24px; padding: 0;
  border-radius: var(--ho-radius-full);
  border: 2px solid var(--ho-surface);
  background: var(--farbe);
  box-shadow: 0 0 0 1px var(--ho-border-strong);
  cursor: pointer;
}
.ho-feedback__farbe[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--ho-primary-500); }
/* Zoom (100 %/200 %): Dialog so breit wie möglich, der Rahmen scrollt. */
.ho-feedback--zoom { width: calc(100vw - 2 * var(--ho-space-4)); }
.ho-feedback__rahmen {
  max-height: 60dvh;
  overflow: auto;
  border: 1px solid var(--ho-border-strong);
  border-radius: var(--ho-radius-md);
}
.ho-feedback__leinwand {
  display: block; width: 100%; height: auto;
  max-width: none; /* ein Reset mit canvas { max-width: 100% } verhinderte das Scrollen beim Zoom */
  cursor: crosshair;
  touch-action: none; /* sonst scrollt der Finger statt zu zeichnen */
}
.ho-feedback__leinwand--aus { opacity: .35; }
.ho-feedback__ablage { padding: var(--ho-space-6) var(--ho-space-4); text-align: center; }
/* Zustand am Bildbereich (data-bild, siehe feedback.js): auto | eigen | keins */
[data-bild="keins"] .ho-feedback__mitbild,
[data-bild]:not([data-bild="keins"]) .ho-feedback__ohnebild,
[data-bild]:not([data-bild="eigen"]) .ho-feedback__eigen { display: none; }
[data-bild="keins"] .ho-feedback__rahmen { border-style: dashed; }
.ho-feedback__fuss { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: var(--ho-space-2); }
/* Meldung (Erfolg, Warnung, Fehler) links neben den Knöpfen – immer sichtbar, auch
   wenn der Body mit dem Screenshot gescrollt ist. Leer nimmt sie keinen Platz ein. */
.ho-feedback__meldung { flex: 1 1 16rem; margin: 0 auto 0 0; }
.ho-feedback__meldung:empty { display: none; }

/* Liegt eine Tabelle direkt in der Kachel, stört ihr eigener Rahmen. */
.ho-panel__body--flush .ho-table-wrap {
  border: 0; border-radius: 0; background: transparent; backdrop-filter: none;
}

/* --- Befehlsleiste ---------------------------------------------------------
   Die Aktionsreihe über einem Inhalt. Aktionen links, Suche und Filter rechts. */
.ho-commandbar {
  display: flex; align-items: center; gap: var(--ho-space-2); flex-wrap: wrap;
  padding: var(--ho-space-2) var(--ho-space-3);
  background: var(--ho-surface-2);
  border: 1px solid var(--ho-border);
  border-radius: var(--ho-radius-lg);
}
.ho-commandbar__spacer { flex: 1 1 auto; min-width: var(--ho-space-4); }
.ho-commandbar__sep {
  width: 1px; align-self: stretch; margin-inline: var(--ho-space-1);
  background: var(--ho-border);
}

.ho-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px;
  border-radius: var(--ho-radius-full);
  font-size: var(--ho-text-xs); font-weight: var(--ho-weight-semibold);
  letter-spacing: .01em;
  background: color-mix(in srgb, var(--ho-neutral) 18%, transparent);
  color: var(--ho-text);
  border: 1px solid color-mix(in srgb, var(--ho-neutral) 35%, transparent);
}
.ho-badge--success { background: color-mix(in srgb, var(--ho-success) 16%, transparent);
  color: var(--ho-success); border-color: color-mix(in srgb, var(--ho-success) 40%, transparent); }
.ho-badge--warning { background: color-mix(in srgb, var(--ho-warning) 16%, transparent);
  color: var(--ho-warning); border-color: color-mix(in srgb, var(--ho-warning) 40%, transparent); }
.ho-badge--danger  { background: color-mix(in srgb, var(--ho-danger) 16%, transparent);
  color: var(--ho-danger); border-color: color-mix(in srgb, var(--ho-danger) 40%, transparent); }
.ho-badge--brand   { background: color-mix(in srgb, var(--ho-primary-500) 16%, transparent);
  color: var(--ho-link); border-color: color-mix(in srgb, var(--ho-primary-500) 40%, transparent); }

.ho-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }

.ho-alert {
  display: flex; gap: var(--ho-space-3);
  padding: var(--ho-space-4);
  border-radius: var(--ho-radius-lg);
  border: 1px solid var(--ho-border-strong);
  background: var(--ho-card);
  backdrop-filter: blur(10px);
  border-left-width: 3px;
}
.ho-alert--info    { border-left-color: var(--ho-info); }
.ho-alert--success { border-left-color: var(--ho-success); }
.ho-alert--warning { border-left-color: var(--ho-warning); }
.ho-alert--danger  { border-left-color: var(--ho-danger); }
.ho-alert__title { font-weight: var(--ho-weight-semibold); }


/* == 12  Kennzahlen, Reiter, Leerzustand =====================================
   Bausteine, die praktisch jedes interne Tool braucht. Sie stehen hier, damit
   nicht jedes Projekt seine eigene Variante baut.
   ========================================================================== */

/* --- Kennzahl -------------------------------------------------------------
   Eine Zahl mit Beschriftung. Die Zahl ist tabellarisch gesetzt, damit sie
   beim Aktualisieren nicht springt. */
.ho-stat {
  display: flex; flex-direction: column; gap: var(--ho-space-1);
  padding: var(--ho-space-4) var(--ho-space-5);
  background: var(--ho-card);
  border: 1px solid var(--ho-border);
  border-radius: var(--ho-radius-lg);
  backdrop-filter: blur(10px);
}
.ho-stat__label {
  display: flex; align-items: center; gap: var(--ho-space-2);
  font-size: var(--ho-text-xs); font-weight: var(--ho-weight-semibold);
  letter-spacing: var(--ho-tracking-wide); text-transform: uppercase;
  color: var(--ho-text-dim);
}
.ho-stat__value {
  font-size: var(--ho-text-3xl); font-weight: var(--ho-weight-display);
  line-height: var(--ho-leading-tight); letter-spacing: var(--ho-tracking-display);
  font-variant-numeric: tabular-nums;
}
.ho-stat__unit { font-size: var(--ho-text-lg); font-weight: var(--ho-weight-semibold); color: var(--ho-text-dim); }
.ho-stat__note { font-size: var(--ho-text-sm); color: var(--ho-text-dim); }
.ho-stat__delta {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: var(--ho-text-sm); font-weight: var(--ho-weight-semibold);
  font-variant-numeric: tabular-nums;
}
/* Richtung ist nie allein durch Farbe erkennbar – immer mit Pfeilsymbol. */
.ho-stat__delta--up   { color: var(--ho-success); }
.ho-stat__delta--down { color: var(--ho-danger); }
.ho-stat__delta--flat { color: var(--ho-text-dim); }

/* Farbige Kante links – sparsam einsetzen, sonst leuchtet das Raster */
.ho-stat--success { border-left: 3px solid var(--ho-success); }
.ho-stat--warning { border-left: 3px solid var(--ho-warning); }
.ho-stat--danger  { border-left: 3px solid var(--ho-danger); }
.ho-stat--brand   { border-left: 3px solid var(--ho-primary-500); }

/* --- Reiter ---------------------------------------------------------------
   Ansichtswechsel innerhalb einer Seite. Als <a href="#ansicht"> auszeichnen –
   die Navigation läuft über location.hash, nicht über einen Router.
   Der aktive Reiter trägt aria-current="page". */
.ho-tabs {
  display: flex; gap: var(--ho-space-1);
  border-bottom: 1px solid var(--ho-border);
  overflow-x: auto; scrollbar-width: none;
}
.ho-tabs::-webkit-scrollbar { display: none; }
.ho-tab {
  display: inline-flex; align-items: center; gap: var(--ho-space-2);
  padding: var(--ho-space-3) var(--ho-space-4);
  border: 0; background: none; cursor: pointer;
  color: var(--ho-text-dim); text-decoration: none; white-space: nowrap;
  font-size: var(--ho-text-base); font-weight: var(--ho-weight-semibold);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color var(--ho-motion-fast), border-color var(--ho-motion-fast);
}
.ho-tab:hover { color: var(--ho-text); }
.ho-tab[aria-current="page"], .ho-tab[aria-selected="true"] {
  color: var(--ho-text); border-bottom-color: var(--ho-primary-500);
}
.ho-tab__count {
  padding: 1px 7px; border-radius: var(--ho-radius-full);
  background: color-mix(in srgb, var(--ho-text) 10%, transparent);
  font-size: var(--ho-text-xs); font-variant-numeric: tabular-nums;
}

/* --- Werkzeugleiste -------------------------------------------------------
   Suche und Filter über einer Liste. Bricht auf schmalen Geräten um. */
.ho-toolbar {
  display: flex; align-items: center; gap: var(--ho-space-3); flex-wrap: wrap;
}
.ho-toolbar__search { flex: 1 1 220px; min-width: 0; position: relative; }

/* Bedienelemente in einer Werkzeugleiste duerfen NICHT die volle Breite nehmen.
   .ho-input/.ho-select/.ho-textarea sind fuer Formulare auf width:100% gesetzt;
   in einem Flex-Container mit Umbruch bedeutet das eine ganze Zeile je Element,
   und aus einer Leiste wird eine Liste untereinander. Hier zaehlt der Inhalt:
   die Auswahl ist so breit wie ihr laengster Eintrag, das Feld waechst bis zu
   einer sinnvollen Grenze mit. */
.ho-toolbar > .ho-select, .ho-toolbar > label > .ho-select { width: auto; flex: 0 1 auto; }
.ho-toolbar > .ho-input, .ho-toolbar > .ho-textarea { width: auto; flex: 1 1 180px; max-width: 320px; }
.ho-toolbar__search .ho-input { padding-left: 38px; }
.ho-toolbar__search .ho-icon {
  position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
  color: var(--ho-text-faint); pointer-events: none;
}

/* --- Leerzustand ----------------------------------------------------------
   Kein leerer Kasten: sagen, warum nichts da ist und was zu tun ist. */
.ho-empty {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: var(--ho-space-3);
  padding: var(--ho-space-8) var(--ho-space-5);
  color: var(--ho-text-dim);
}
.ho-empty .ho-icon { color: var(--ho-text-faint); }
.ho-empty__title { font-size: var(--ho-text-lg); font-weight: var(--ho-weight-semibold); color: var(--ho-text); }
.ho-empty__text { max-width: 44ch; font-size: var(--ho-text-sm); }


/* == 13  Tabellen ============================================================ */
/* min-width: 0 ist hier kein Schönheitsfehler, sondern nötig: als Flex- oder
   Grid-Kind hat ein Element min-width: auto und wächst mit seinem Inhalt. Eine
   breite Tabelle schiebt dann die ganze Seite auf und erzeugt waagerechtes
   Scrollen – auf dem Handy gemessene 182px, bevor das hier stand. */
.ho-table-wrap {
  overflow-x: auto;
  min-width: 0; max-width: 100%;
  border: 1px solid var(--ho-border);
  border-radius: var(--ho-radius-lg);
  background: var(--ho-card);
  backdrop-filter: blur(10px);
}
.ho-table { width: 100%; border-collapse: collapse; font-size: var(--ho-text-base); }
.ho-table th, .ho-table td {
  padding: var(--ho-space-3) var(--ho-space-4);
  text-align: left;
  border-bottom: 1px solid var(--ho-border);
}
.ho-table thead th {
  position: sticky; top: 0; z-index: var(--ho-z-sticky);
  background: var(--ho-surface-2);
  font-size: var(--ho-text-xs); font-weight: var(--ho-weight-semibold);
  letter-spacing: var(--ho-tracking-wide); text-transform: uppercase;
  color: var(--ho-text-dim);
}
.ho-table tbody tr:last-child td { border-bottom: 0; }
.ho-table tbody tr:hover { background: var(--ho-card); }
.ho-table td.ho-numeric, .ho-table th.ho-numeric { text-align: right; font-variant-numeric: tabular-nums; }


/* == 13  Code & Snippets ===================================================== */
code, kbd, samp, pre { font-family: var(--ho-font-mono); font-size: .92em; }
:not(pre) > code {
  padding: .15em .4em;
  border-radius: 6px;
  background: color-mix(in srgb, var(--ho-text) 8%, transparent);
  border: 1px solid var(--ho-border);
}
pre {
  padding: var(--ho-space-4);
  background: color-mix(in srgb, var(--ho-bg-sunken) 88%, transparent);
  border: 1px solid var(--ho-border);
  border-radius: var(--ho-radius-md);
  overflow-x: auto;
  line-height: 1.5;
}
pre code { background: none; border: 0; padding: 0; }

/* Snippet-Block mit Kopf und Kopier-Schaltfläche */
.ho-snippet {
  border: 1px solid var(--ho-border);
  border-radius: var(--ho-radius-lg);
  overflow: hidden;
  background: var(--ho-card);
  backdrop-filter: blur(10px);
}
.ho-snippet__head {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--ho-space-3);
  padding: var(--ho-space-2) var(--ho-space-3);
  background: var(--ho-surface-2);
  border-bottom: 1px solid var(--ho-border);
  font-size: var(--ho-text-xs); font-weight: var(--ho-weight-semibold);
  letter-spacing: var(--ho-tracking-wide); text-transform: uppercase;
  color: var(--ho-text-dim);
}
.ho-snippet pre { border: 0; border-radius: 0; }

/* Rückmeldung nach dem Kopieren.
   Schaltflächen, die nur Text enthalten, tauschen ihre Beschriftung (das macht
   theme.js). Alles mit eigenem Aufbau – eine Farbkachel, eine Symbol-Kachel –
   würde dabei zerstört; die bekommen stattdessen [data-copy-state] und hier
   eine Plakette darüber. */
[data-copy-state] { position: relative; }
[data-copy-state]::after {
  content: attr(data-copy-message);
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  padding: 4px 12px;
  border-radius: var(--ho-radius-full);
  background: var(--ho-surface);
  border: 1px solid var(--ho-border-strong);
  color: var(--ho-text);
  font-size: var(--ho-text-xs); font-weight: var(--ho-weight-semibold);
  box-shadow: var(--ho-shadow-md);
  white-space: nowrap; pointer-events: none;
}
[data-copy-state="ok"]::after   { border-color: var(--ho-success); color: var(--ho-success); }
[data-copy-state="fail"]::after { border-color: var(--ho-danger);  color: var(--ho-danger); }


/* == 14  Symbole =============================================================
   Strichsymbole aus /assets/img/icons.svg. Keine Emojis – nirgends, auch nicht
   in Fließtext, Überschriften, Meldungen oder Commit-Nachrichten.

   Warum: Emojis werden auf jedem Betriebssystem anders gezeichnet, sind bei
   Windows farbig und stilfremd, lassen sich nicht einfärben, skalieren nicht
   sauber mit der Schrift und werden vom Screenreader vorgelesen ("Roboter-
   gesicht"). Ein Strichsymbol erbt Farbe und Größe vom Text und sieht überall
   gleich aus.

     <svg class="ho-icon" aria-hidden="true">
       <use href="/assets/img/icons.svg#check"></use>
     </svg>

   fill/stroke werden hier gesetzt und vererben sich in den Symbol-Inhalt –
   deshalb genügt color: … am Elternelement, um ein Symbol einzufärben. */
.ho-icon {
  width: 1.25em;
  height: 1.25em;
  flex: none;
  vertical-align: -.22em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ho-icon--sm { width: 1em;    height: 1em;    stroke-width: 2; }
.ho-icon--lg { width: 1.75em; height: 1.75em; stroke-width: 1.6; }
.ho-icon--xl { width: 2.5em;  height: 2.5em;  stroke-width: 1.4; }

/* Symbol in einem farbigen Kreis – für Hinweise und leere Zustände */
.ho-icon-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; flex: none;
  border-radius: var(--ho-radius-full);
  background: color-mix(in srgb, currentColor 14%, transparent);
}
.ho-icon-badge--success { color: var(--ho-success); }
.ho-icon-badge--warning { color: var(--ho-warning); }
.ho-icon-badge--danger  { color: var(--ho-danger); }
.ho-icon-badge--info    { color: var(--ho-info); }
.ho-icon-badge--brand   { color: var(--ho-link); }

/* Reine Symbol-Schaltfläche – braucht immer ein aria-label */
.ho-btn--icon { padding: 9px; aspect-ratio: 1; }
.ho-btn--icon.ho-btn--sm { padding: 6px; }


/* == 15b  Bewegung ===========================================================
   Bewegung erklärt, woher etwas kommt und dass etwas passiert. Sie ist kein
   Schmuck: alles hier ist kurz, einmalig und richtungsgebunden. Nichts pulsiert
   dauerhaft, nichts wackelt, nichts fliegt quer über den Schirm.

   Alle Klassen respektieren prefers-reduced-motion – die globale Regel in
   Abschnitt 05 dreht die Dauer auf ~0. Deshalb dürfen Endzustände nie nur in
   der Animation stehen, sonst bleibt der Inhalt unsichtbar.
   ========================================================================== */

/* --- Einblenden beim Scrollen ---------------------------------------------
   motion.js setzt [data-reveal] auf sichtbar, sobald das Element ins Bild
   kommt. Ohne JavaScript bleibt alles sichtbar – der Startzustand wird erst
   von motion.js gesetzt (Klasse auf <html>), nicht hier. */
.ho-motion [data-reveal] {
  opacity: 0;
  transform: translateY(18px) scale(.985);
  filter: blur(6px);
}
.ho-motion [data-reveal].is-visible {
  opacity: 1;
  transform: none;
  filter: none;
  /* Weg und Unschärfe federn, die Deckkraft nicht – sonst blitzt sie über 1
     hinaus und flackert. */
  transition: opacity .45s var(--ho-ease),
              filter .45s var(--ho-ease),
              transform .55s var(--ho-ease-spring);
}
/* Gestaffelt – für Raster. Mehr als fünf Stufen wirkt zäh. */
[data-reveal-delay="1"] { transition-delay: .06s; }
[data-reveal-delay="2"] { transition-delay: .12s; }
[data-reveal-delay="3"] { transition-delay: .18s; }
[data-reveal-delay="4"] { transition-delay: .24s; }
[data-reveal-delay="5"] { transition-delay: .30s; }

/* --- Ladezustände ---------------------------------------------------------- */
@keyframes ho-spin { to { transform: rotate(360deg); } }
.ho-spinner {
  width: 1.15em; height: 1.15em; flex: none;
  border: 2px solid color-mix(in srgb, currentColor 25%, transparent);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: ho-spin .7s linear infinite;
}

/* Platzhalter, solange Daten fehlen. Sagt "es kommt noch etwas" – anders als
   ein leerer Bereich, der wie ein Fehler aussieht. */
@keyframes ho-shimmer { to { background-position-x: -200%; } }
.ho-skeleton {
  border-radius: var(--ho-radius-sm);
  background: linear-gradient(90deg,
    var(--ho-nodata) 0%,
    color-mix(in srgb, var(--ho-nodata) 45%, transparent) 40%,
    var(--ho-nodata) 80%);
  background-size: 200% 100%;
  animation: ho-shimmer 1.4s linear infinite;
  color: transparent; user-select: none;
}
.ho-skeleton--text { height: 1em; margin-block: .25em; }
.ho-skeleton--title { height: 1.5em; width: 55%; }

/* --- Einblenden von Meldungen ---------------------------------------------- */
@keyframes ho-in-up {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}
.ho-animate-in { animation: ho-in-up .28s var(--ho-ease) both; }

/* --- Zustandswechsel ------------------------------------------------------- */
/* Karten heben sich beim Zeigen leicht an – nur, wo auch etwas passiert. */
.ho-card--interactive { transition: border-color var(--ho-motion-fast),
                                    background var(--ho-motion-fast),
                                    transform var(--ho-motion-fast); }
.ho-card--interactive:hover { transform: translateY(-2px); }

@media (prefers-reduced-motion: reduce) {
  .ho-card--interactive:hover { transform: none; }
  .ho-spinner { animation-duration: 1.6s; }
  .ho-skeleton { animation: none; }
}


/* == 15c  Diagramme ==========================================================
   Balken, Linie, Fläche, Ring und Sparkline – ohne Fremdbibliothek.

   Die Serienfarben sind NICHT die Marken-Blautöne. Fünf Blau- und Violetttöne
   nebeneinander sind nicht unterscheidbar: gemessen lagen #472CBF und #3E26A6
   bei ΔE 4,6 – auch für normale Farbsicht zu wenig, und drei der Töne kamen
   auf dem dunklen Grund nicht auf 3:1 Kontrast.

   Die Reihe unten ist gerechnet, nicht gewählt: alle fünf liegen im selben
   Helligkeitsband, jeder hat genug Buntheit, das schwächste benachbarte Paar
   erreicht ΔE 14,8 bei Deuteranopie und 12,0 bei Tritanopie, und alle fünf
   haben mindestens 3:1 gegen Fläche – in Dark UND Light mit denselben Werten.
   Auch die Reihenfolge ist Teil des Ergebnisses: Blau und Cyan direkt
   nebeneinander wäre das schwächste Paar gewesen, Rot dazwischen löst das.

   Wer eine Farbe tauscht, misst nach. Sonst ist das Diagramm für rund acht
   Prozent der Männer nicht lesbar.

   Herkunft: Blau ist die Marke, Rot kommt von HDNET, Cyan von viewport –
   beides Schwestermarken aus dem Brand Guide.
   ========================================================================== */
:root {
  --ho-serie-1: #1F6CFF;   /* ho.Systeme */
  --ho-serie-2: #F03137;   /* HDNET */
  --ho-serie-3: #0C9DB2;   /* viewport */
  --ho-serie-4: #8B5CF6;
  --ho-serie-5: #B0871A;

  /* Für Größenverhältnisse (eine Reihe, hell → dunkel), nicht für Kategorien */
  --ho-verlauf-1: color-mix(in srgb, var(--ho-primary-400) 22%, transparent);
  --ho-verlauf-2: color-mix(in srgb, var(--ho-primary-400) 45%, transparent);
  --ho-verlauf-3: color-mix(in srgb, var(--ho-primary-400) 70%, transparent);
  --ho-verlauf-4: var(--ho-primary-400);
  --ho-verlauf-5: var(--ho-primary-700);
}

.ho-chart { display: flex; flex-direction: column; gap: var(--ho-space-3); min-width: 0; }
.ho-chart__kopf { display: flex; align-items: baseline; justify-content: space-between; gap: var(--ho-space-3); }
.ho-chart__titel { font-size: var(--ho-text-sm); font-weight: var(--ho-weight-semibold); }
.ho-chart__notiz { font-size: var(--ho-text-xs); color: var(--ho-text-dim); }

/* --- Legende --------------------------------------------------------------
   Ab zwei Reihen immer vorhanden: Farbe allein darf nie das einzige
   Unterscheidungsmerkmal sein. */
.ho-legend { display: flex; flex-wrap: wrap; gap: var(--ho-space-2) var(--ho-space-4); }
.ho-legend__eintrag {
  display: inline-flex; align-items: center; gap: var(--ho-space-2);
  font-size: var(--ho-text-xs); color: var(--ho-text-dim);
}
.ho-legend__punkt {
  width: 10px; height: 10px; flex: none; border-radius: 2px;
  background: var(--farbe, var(--ho-serie-1));
}

/* --- Balken, waagerecht ---------------------------------------------------
   Reine HTML/CSS-Lösung: der Wert steht in --wert, die Breite wächst beim
   Einblenden von 0 auf diesen Wert. Ohne JavaScript steht der Balken sofort
   auf der richtigen Breite. */
.ho-bars { display: flex; flex-direction: column; gap: var(--ho-space-3); }
.ho-bars__zeile {
  display: grid; gap: var(--ho-space-3); align-items: center;
  grid-template-columns: minmax(84px, 22%) minmax(0, 1fr) auto;
}
.ho-bars__name { font-size: var(--ho-text-sm); color: var(--ho-text-dim);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ho-bars__bahn {
  height: 10px; border-radius: var(--ho-radius-full);
  background: color-mix(in srgb, var(--ho-text) 9%, transparent);
  overflow: hidden;
}
.ho-bars__wert-balken {
  height: 100%; width: var(--wert, 0%);
  border-radius: var(--ho-radius-full);
  background: var(--farbe, var(--ho-serie-1));
}
.ho-bars__zahl {
  font-size: var(--ho-text-sm); font-variant-numeric: tabular-nums;
  color: var(--ho-text); min-width: 5ch; text-align: right;
}
/* Aufbau beim Einblenden – der Balken wächst aus dem Nullpunkt. */
.ho-motion [data-reveal] .ho-bars__wert-balken { width: 0; }
.ho-motion [data-reveal].is-visible .ho-bars__wert-balken {
  width: var(--wert, 0%);
  transition: width .8s var(--ho-ease);
}

/* --- Gestapelter Balken ---------------------------------------------------
   2px Lücke zwischen den Abschnitten, damit die Grenzen auch ohne Farbe
   erkennbar sind. */
.ho-bar-stack {
  display: flex; gap: 2px; height: 12px;
  border-radius: var(--ho-radius-full); overflow: hidden;
  background: color-mix(in srgb, var(--ho-text) 9%, transparent);
}
.ho-bar-stack__teil { background: var(--farbe, var(--ho-serie-1)); width: var(--wert, 0%); }
.ho-motion [data-reveal] .ho-bar-stack__teil { width: 0; }
.ho-motion [data-reveal].is-visible .ho-bar-stack__teil {
  width: var(--wert, 0%); transition: width .8s var(--ho-ease);
}

/* --- Linie und Fläche (SVG, von charts.js erzeugt) ------------------------ */
.ho-chart__flaeche { width: 100%; height: auto; display: block; overflow: visible; }
.ho-chart__gitter { stroke: var(--ho-border); stroke-width: 1; }
.ho-chart__achse   { fill: var(--ho-text-faint); font-size: 10px; font-family: var(--ho-font-mono); }
.ho-chart__linie   { fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ho-chart__fuellung { opacity: .16; }
.ho-chart__punkt   { r: 4; stroke: var(--ho-surface); stroke-width: 2; }

/* Die Linie zeichnet sich beim Einblenden. pathLength="1" setzt charts.js,
   damit die Länge unabhängig von der tatsächlichen Pfadlänge ist. */
.ho-motion [data-reveal] .ho-chart__linie { stroke-dasharray: 1; stroke-dashoffset: 1; }
.ho-motion [data-reveal].is-visible .ho-chart__linie {
  stroke-dashoffset: 0; transition: stroke-dashoffset 1s var(--ho-ease);
}
.ho-motion [data-reveal] .ho-chart__fuellung,
.ho-motion [data-reveal] .ho-chart__punkt { opacity: 0; }
.ho-motion [data-reveal].is-visible .ho-chart__fuellung { opacity: .16; transition: opacity .6s .3s var(--ho-ease); }
.ho-motion [data-reveal].is-visible .ho-chart__punkt { opacity: 1; transition: opacity .4s .6s var(--ho-ease); }

/* Fadenkreuz und Kurzinfo */
.ho-chart__wrap { position: relative; }
.ho-chart__kreuz { stroke: var(--ho-text-faint); stroke-width: 1; stroke-dasharray: 3 3; }
.ho-tooltip {
  position: absolute; z-index: var(--ho-z-overlay);
  padding: var(--ho-space-2) var(--ho-space-3);
  background: var(--ho-surface);
  border: 1px solid var(--ho-border-strong);
  border-radius: var(--ho-radius-md);
  box-shadow: var(--ho-shadow-md);
  font-size: var(--ho-text-xs);
  pointer-events: none; white-space: nowrap;
  transform: translate(-50%, -120%);
}
.ho-tooltip__zeile { display: flex; align-items: center; gap: var(--ho-space-2); }
.ho-tooltip__wert { font-variant-numeric: tabular-nums; font-weight: var(--ho-weight-semibold); }

/* --- Ring ------------------------------------------------------------------
   Ein Anteil, keine Torte mit acht Stücken: ab drei Werten ist ein Balken
   besser lesbar. */
.ho-donut { display: inline-grid; place-items: center; }
.ho-donut > * { grid-area: 1 / 1; }
.ho-donut__svg { transform: rotate(-90deg); }
.ho-donut__bahn { fill: none; stroke: color-mix(in srgb, var(--ho-text) 9%, transparent); }
.ho-donut__wert {
  fill: none; stroke: var(--farbe, var(--ho-serie-1)); stroke-linecap: round;
}
.ho-donut__zahl {
  font-size: var(--ho-text-xl); font-weight: var(--ho-weight-display);
  font-variant-numeric: tabular-nums; letter-spacing: var(--ho-tracking-tight);
}
.ho-motion [data-reveal] .ho-donut__wert { stroke-dashoffset: var(--umfang, 100); }
.ho-motion [data-reveal].is-visible .ho-donut__wert {
  transition: stroke-dashoffset 1s var(--ho-ease);
}

/* --- Sparkline ------------------------------------------------------------ */
.ho-sparkline { width: 100%; height: 34px; display: block; overflow: visible; }
.ho-sparkline path { fill: none; stroke: var(--farbe, var(--ho-serie-1)); stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round; }

@media (prefers-reduced-motion: reduce) {
  .ho-motion [data-reveal] .ho-bars__wert-balken,
  .ho-motion [data-reveal] .ho-bar-stack__teil { width: var(--wert, 0%); }
  .ho-motion [data-reveal] .ho-chart__linie { stroke-dashoffset: 0; }
  .ho-motion [data-reveal] .ho-chart__fuellung { opacity: .16; }
  .ho-motion [data-reveal] .ho-chart__punkt { opacity: 1; }
}


/* == 16  Hilfsklassen ========================================================
   Absichtlich knapp gehalten – kein Utility-Framework. Reicht das nicht,
   gehört die Regel als benannte Komponente hierher, nicht ins Projekt. */
.ho-hidden      { display: none !important; }
.ho-text-center { text-align: center; }
.ho-flex-1      { flex: 1; }
.ho-mt-0 { margin-top: 0 !important; }
.ho-gap-2 { gap: var(--ho-space-2); }
.ho-gap-4 { gap: var(--ho-space-4); }
.ho-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ho-no-scrollbar { scrollbar-width: none; }
.ho-no-scrollbar::-webkit-scrollbar { display: none; }

@media print {
  body::before { display: none; }
  .ho-btn, .btn, .ho-header__actions { display: none !important; }
}
