/* Kuble — Marken-Tokens für das Präsentationssystem.
   Zwei Ebenen, eine Variablenliste. Werte aus dem GTS-Brain
   kuble.knowledge.design-system-kuble (Stand CI/CD Manual Juli 2026) und aus
   der v3-Referenz (v3.kuble.com). Variablennamen sind vom Core vorgegeben
   und dürfen nicht umbenannt werden.

   DUNKEL ist die Basisschicht (:root) — Night Ink, wie bisher.
   HELL («Crystal») liegt als Override darüber und ist der Standard:

     html[data-kbl-theme="light"], html:not([data-kbl-theme="dark"])

   Der zweite Selektor ist bewusst so gewählt und nicht bloss
   [data-kbl-theme="light"]: damit ist Hell auch dann der Zustand, wenn kein
   Skript läuft — beim ersten Paint vor theme.js, im Code-Gate, im
   PDF-Renderer und bei abgeschaltetem JavaScript. Es gibt darum kein
   Aufblitzen von Dunkel und keinen Pfad, auf dem die Voreinstellung kippt.
   Dunkel greift nur, wenn theme.js data-kbl-theme="dark" gesetzt hat. */

@font-face {
  font-family: "Montserrat";
  src: url("/brand-assets/fonts/montserrat-var.woff2") format("woff2-variations");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "Montserrat";
  src: url("/brand-assets/fonts/montserrat-italic-var.ttf") format("truetype-variations");
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("/brand-assets/fonts/jetbrains-mono-var.woff2") format("woff2-variations");
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
}

/* Nur für die alternative Betonungsvariante, siehe --font-emphasis weiter unten.
   Der Browser lädt die Datei erst, wenn eine Regel die Familie tatsächlich verwendet. */
@font-face {
  font-family: "Instrument Serif";
  src: url("/brand-assets/fonts/instrument-serif-italic.ttf") format("truetype");
  font-style: italic;
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: dark;

  /* Marker für markenneutrale Shell-Skripte: nur Marken mit Themenschalter
     setzen ihn. Wer ihn liest, weiss, dass data-kbl-theme etwas bewirkt. */
  --kbl-themes: 1;

  /* Akzente. Blue, Gold und Grün sind Markenfarben; Violett und Koralle
     ergänzen sie, damit der Core seine fünf data-accent-Slots füllen kann. */
  --blue: #2e5cff;
  --yellow: #edaa3c;
  --green: #3dd68c;
  --violet: #8b6bff;
  --orange: #f2545b;

  /* Getönte Nachtflächen für data-tone="soft" — dark-first heisst: der Akzent
     färbt das Ink ein, er hellt es nicht auf. Gemischt wird gegen das tiefste
     Ink, damit der Anteil Farbe trägt statt nur aufzuhellen. */
  --blue-soft: color-mix(in oklab, var(--blue) 18%, #05070c);
  --yellow-soft: color-mix(in oklab, var(--yellow) 18%, #05070c);
  --green-soft: color-mix(in oklab, var(--green) 18%, #05070c);
  --violet-soft: color-mix(in oklab, var(--violet) 18%, #05070c);
  --orange-soft: color-mix(in oklab, var(--orange) 18%, #05070c);

  /* Zweite Stufe von Kuble Blue: die Rolle «Blau, das als Text und als
     Hoverfläche trägt». Im Dunkeln heller als die Grundfarbe (blue-400), im
     Hellen dunkler (blue-600) — dieselbe Rolle, gespiegelte Richtung. */
  --blue-bright: #4e7bff;

  /* Akzent als Text. Auf Night Ink tragen Gold, Grün, Violett und Koralle
     unverändert; im Hellen braucht jede Farbe eine eigene dunkle Stufe,
     sonst fällt sie unter 4.5:1. Der Core kennt diese Tokens nicht — sie
     werden in overrides.css auf --accent-text abgebildet. */
  --blue-text: var(--blue-bright);
  --yellow-text: var(--yellow);
  --green-text: var(--green);
  --violet-text: var(--violet);
  --orange-text: var(--orange);

  /* Night Ink. --paper ist die Bühne, --ink der Text: im Dark Mode gedreht. */
  --paper: #05070c;
  --paper-2: #0a0e17;
  --paper-3: #10141f;
  --ink: #f2f4f8;
  --ink-2: #b4bccc;
  --ink-3: #8892a6;
  --rule: #1e2535;
  --rule-strong: #2a3246;

  /* Titel. Im Dunkeln dieselbe Stufe wie der Fliesstext, im Hellen eine
     Stufe tiefer als er — Ink-1000 gegen Ink-700. */
  --ink-heading: var(--ink);

  /* Flächen heben sich im Dark Mode mit Licht, nicht mit Weiss. Halbtransparent,
     damit derselbe Betrag über jedem Folienton gleich stark hebt. */
  --elevate: color-mix(in oklab, var(--ink) 6%, transparent);
  --elevate-strong: color-mix(in oklab, var(--ink) 12%, transparent);

  /* Auf gesättigten Folien liegt bei Kuble Ink, nicht der Akzent — die
     Sekundärtöne sind darum hell und gedämpft statt weiss-transparent. */
  --on-accent-muted: #8892a6;
  --on-accent-subtle: #8892a6;
  --overlay-scrim: rgba(5, 7, 12, 0.84);

  /* Brand-Hero (vollflächiges Bild hinter dem Folientext, siehe core.css).
     Werte unverändert aus dem bisherigen Editor-Stylesheet übernommen, damit
     bestehende Hero-Folien pixelgleich bleiben. Der Verlauf ist absichtlich
     seitlich und nicht mittig: er hält die linke Textspalte lesbar und lässt
     das Motiv rechts frei. */
  --hero-backdrop: #05070c;
  --hero-scrim: linear-gradient(90deg, rgba(5, 7, 12, 0.62), rgba(5, 7, 12, 0.08) 70%, rgba(5, 7, 12, 0.2));
  --on-hero: #ffffff;
  --hero-text-shadow: 0 2px 18px rgba(0, 0, 0, 0.82);

  /* Schatten. Im Dunkeln tief und weich, im Hellen weit und negativ
     gespreizt — v3 setzt nirgends einen Glow. */
  --shadow-card: 0 18px 44px rgba(0, 0, 0, 0.45);
  --shadow-pop: 0 26px 64px rgba(0, 0, 0, 0.55);

  --font-display: "Montserrat", ui-sans-serif, -apple-system, "Segoe UI", system-ui, sans-serif;
  --font-body: "Montserrat", ui-sans-serif, -apple-system, "Segoe UI", system-ui, sans-serif;
  --font-ui: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Betonung im Fliesstext. Default folgt dem Brain: Akzentwort in Montserrat
     Light, in der Akzentfarbe. Für die Serif-Kursiv-Variante des älteren
     Editorial-Looks stattdessen setzen:
       --font-emphasis: "Instrument Serif", Georgia, serif;
       --emphasis-style: italic;
       --emphasis-weight: 400; */
  --font-emphasis: var(--font-display);
  --emphasis-style: normal;
  --emphasis-weight: 300;

  /* Kuble-Radien nach v3: Pills 999, Karten 14, Menüs 12, Formularfelder 7. */
  --radius-card: 14px;
  --radius-menu: 12px;
  --radius-input: 7px;
  --radius-pill: 999px;

  /* Bewegung nach v3: eine Kurve, zwei Dauern, keine Bounces. */
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --dur-fast: 140ms;
  --dur-base: 240ms;

  --container: 1240px;
  --gutter: clamp(28px, 5cqw, 72px);
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;

  /* Fokus liegt in beiden Ebenen auf blue-400: im Dunkeln 5.4:1 gegen Night
     Ink, im Hellen 3.4:1 gegen Crystal — über der 3:1-Schwelle für
     nicht-textliche Indikatoren, und in beiden Ebenen dieselbe Farbe. */
  --focus-ring: #4e7bff;
  --focus: 2px solid var(--focus-ring);
}

/* --- HELL («Crystal») -----------------------------------------------------
   Standardebene. Siehe Kopfkommentar zur Selektorwahl. */

html[data-kbl-theme="light"],
html:not([data-kbl-theme="dark"]) {
  color-scheme: light;

  /* Die Akzente sind im Hellen tiefer. Das ist keine Kosmetik: deckeigenes
     CSS setzt var(--accent) auch als Textfarbe (grosse Kennzahlen,
     Uppercase-Labels), und die Nachtstufen fallen auf Crystal unter 3:1.
     Grün, Violett und Koralle liegen hier bei ≥ 5.3:1 gegen #f3f4f8.
     Blau bleibt #2e5cff: es trägt als Fläche und ist die CTA-Farbe; für
     die Textrolle steht --blue-bright bereit (6.2:1). */
  --green: #0f7343;
  --violet: #5b3bd6;
  --orange: #be2530;

  /* Gold ist der Sonderfall: als Fläche braucht es die helle Stufe aus v3
     (gold-600, dunkle Schrift darauf 5.1:1), als Text eine tiefere. Die
     Folien nehmen in overrides.css die Textstufe auch als Fläche — auf
     Crystal trägt Bronze dort besser als blasses Gold. */
  --yellow: #c98812;
  --yellow-text: #8f5e06;

  /* Der Akzent hellt die Fläche auf, statt das Ink einzufärben — dieselbe
     Mechanik wie oben, gespiegelt. 12 % statt 18 %, weil eine helle Fläche
     denselben Farbeindruck schon bei geringerem Anteil trägt. */
  --blue-soft: color-mix(in oklab, var(--blue) 12%, #ffffff);
  --yellow-soft: color-mix(in oklab, var(--yellow) 14%, #ffffff);
  --green-soft: color-mix(in oklab, var(--green) 14%, #ffffff);
  --violet-soft: color-mix(in oklab, var(--violet) 12%, #ffffff);
  --orange-soft: color-mix(in oklab, var(--orange) 12%, #ffffff);

  --blue-bright: #1e46e6;

  /* Crystal. --paper ist die Folienbühne und zugleich die Grundfläche;
     die Shell dreht paper/paper-2 in shell.css, weil dort --paper die
     Kartenfläche ist und --paper-2 der Seitengrund. */
  --paper: #f3f4f8;
  --paper-2: #ffffff;
  --paper-3: #ffffff;
  --ink: #1e2535;
  --ink-2: #5a6479;
  --ink-3: #8892a6;
  --ink-heading: #0a0e17;
  --rule: #e2e6ee;
  --rule-strong: #ced4e0;

  /* Im Hellen heben Flächen mit Weiss, nicht mit Licht: die Karte ist
     deckend weiss und trägt darum über Crystal, über getönten und über
     gesättigten Folien gleich zuverlässig. Halbtransparentes Ink täte hier
     das Gegenteil — es würde die Karte in die Fläche drücken. */
  --elevate: #ffffff;
  --elevate-strong: #eceff5;

  --on-accent-muted: #5a6479;
  --on-accent-subtle: #5a6479;
  --overlay-scrim: rgba(10, 14, 23, 0.45);

  --shadow-card: 0 12px 32px -12px rgba(10, 14, 23, 0.18);
  --shadow-pop: 0 24px 56px -16px rgba(10, 14, 23, 0.24);

  /* Die --hero-*-Werte bleiben bewusst die der dunklen Ebene und werden hier
     nicht überschrieben. Eine Hero-Folie ist eine Bildfolie: die Kuble-
     Guardians sind dunkle Motive, auf denen nur Weiss mit Scrim trägt.
     Dunkler Text auf dunklem Bild ginge nicht, und ein aufgehellter Scrim
     würde das Motiv ausbleichen. Der Hero ist darum in beiden Ebenen
     dieselbe Welt — der einzige Ort im System, an dem das gilt. */
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--paper);
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font-body);
  font-size: clamp(17px, 1.25cqw, 21px);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }
button { color: inherit; }
img { display: block; max-width: 100%; }

h1, h2, h3, p { margin-top: 0; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.04;
}

h1 {
  max-width: 1080px;
  margin-bottom: var(--space-5);
  font-size: clamp(56px, 6.5cqw, 104px);
}

h2 {
  max-width: 1050px;
  margin-bottom: var(--space-5);
  font-size: clamp(40px, 4.3cqw, 68px);
}

h3 {
  margin-bottom: var(--space-3);
  font-size: clamp(24px, 2.1cqw, 34px);
}

p { margin-bottom: var(--space-4); }

.deck { width: 100%; }

.slide {
  --accent: var(--blue);
  --accent-soft: var(--blue-soft);
  position: relative;
  min-height: 100cqh;
  overflow: hidden;
  background: var(--paper);
  scroll-snap-align: start;
  isolation: isolate;
}

.slide[data-accent="green"] { --accent: var(--green); --accent-soft: var(--green-soft); }
.slide[data-accent="yellow"] { --accent: var(--yellow); --accent-soft: var(--yellow-soft); }
.slide[data-accent="orange"] { --accent: var(--orange); --accent-soft: var(--orange-soft); }
.slide[data-accent="violet"] { --accent: var(--violet); --accent-soft: var(--violet-soft); }
.slide[data-tone="soft"] { background: var(--accent-soft); }
.slide[data-tone="saturated"] { background: var(--accent); color: var(--paper); }

.slide::before {
  position: absolute;
  inset: 0 auto 0 0;
  z-index: -1;
  width: 10px;
  background: var(--accent);
  content: "";
}

.slide[data-tone="saturated"]::before { display: none; }

.slide__content {
  display: flex;
  width: min(var(--container), calc(100% - (2 * var(--gutter))));
  min-height: 100cqh;
  margin: 0 auto;
  padding: clamp(72px, 8cqh, 108px) 0 clamp(68px, 7cqh, 96px);
  flex-direction: column;
  justify-content: center;
}

/* --- Brand-Hero -----------------------------------------------------------
   Vollflächiges Marken-Bild oder -Video hinter dem Folientext. Der Look
   gehört in den Kern und nicht ins Editor-Stylesheet: eine Präsentation
   sieht sonst nur richtig aus, solange editor.css mitgeladen wird.

   Die Farben liefert die Marke über --hero-backdrop (Fläche hinter dem
   Medium und hinter contain-Rändern), --hero-scrim (Verlauf, der den Text
   vom Bild abhebt), --on-hero und --hero-text-shadow.

   Die Bühne selbst trägt den Backdrop mit: .slide__content ist nur die
   Inhaltsspalte. Ohne diese Zeile stünde die Bildfläche als dunkle Säule in
   einer hellen Folie — sichtbar bei jeder Marke, deren --paper nicht dem
   Backdrop entspricht. */

.slide.slide--brand-hero { background: var(--hero-backdrop); }

/* Vollflächig-Heros (slide--brand-hero-full, siehe weiter unten) sind hier explizit
   ausgenommen: ihre .slide__content-Geometrie ist eine andere (kein eigener Backdrop,
   kein Abschneiden) und soll die Spalten-Regel eindeutig über die Selektor-Grenze
   schlagen, nicht nur zufällig über gleiche Spezifität plus Quellreihenfolge. */
.slide.slide--brand-hero:not(.slide--brand-hero-full) .slide__content {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--hero-backdrop);
}

/* Frei positionierte Medien (.editor-media-free) bleiben ausgenommen: sie
   tragen ihre eigene Geometrie und dürfen nicht auf die Fläche gespannt
   werden. Der Vollflächig-Hero (data-hero-layout="full", siehe weiter unten)
   ist ebenfalls ausgenommen: er ist kein Kind von .slide__content mehr,
   bekommt seine Geometrie im eigenen Block und würde sonst nur zufällig
   über die CSS-Spezifität statt eindeutig über die Selektor-Grenze
   gewinnen — genau das soll diese Ausnahme verhindern. */
.slide.slide--brand-hero .brand-hero-media:not(.editor-media-free):not([data-hero-layout="full"]) {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--hero-backdrop);
  border: 0;
}

.slide.slide--brand-hero .brand-hero-media:not(.editor-media-free):not([data-hero-layout="full"])::after {
  position: absolute;
  inset: 0;
  background: var(--hero-scrim);
  content: "";
  pointer-events: none;
}

/* Contain ist die Doktrin: Guardians und Menschen dürfen nicht angeschnitten
   werden. Nur Kategorien, die die Marke als Hintergrund führt, liefern
   data-hero-fit="cover" — dort ist der Anschnitt gewollt und die Balken
   oben und unten verschwinden. Auch hier bleibt der Vollflächig-Hero aussen
   vor: dessen Anschnitt-Default ist umgekehrt (cover statt contain, siehe
   unten) und darf nicht mit der Spalten-Doktrin um dieselbe Spezifität
   konkurrieren. */
.slide.slide--brand-hero .brand-hero-media:not([data-hero-layout="full"]) img,
.slide.slide--brand-hero .brand-hero-media:not([data-hero-layout="full"]) video {
  display: block;
  width: 100%;
  height: 100%;
  background: transparent;
  border: 0;
  object-fit: contain;
}

.slide.slide--brand-hero .brand-hero-media:not([data-hero-layout="full"])[data-hero-fit="cover"] img,
.slide.slide--brand-hero .brand-hero-media:not([data-hero-layout="full"])[data-hero-fit="cover"] video { object-fit: cover; }

.slide.slide--brand-hero .slide__content > :not(.brand-hero-media) {
  position: relative;
  z-index: 2;
  color: var(--on-hero);
  text-shadow: var(--hero-text-shadow);
}

/* Vererbung allein reicht nicht: Titel und gedämpfte Rollen tragen in den
   Markenschichten eigene Farben, die auf einem Foto nichts zu suchen haben
   (ein Ink-Titel auf hellem Motiv ist unlesbar). Auf der Hero-Folie gilt
   darum ausnahmslos die Schrift der Bildwelt. Der Eyebrow bleibt bewusst
   aussen vor — der Akzentstrich ist die Markensignatur und sitzt über dem
   Scrim. */
.slide.slide--brand-hero .slide__content h1,
.slide.slide--brand-hero .slide__content h2,
.slide.slide--brand-hero .slide__content h3,
.slide.slide--brand-hero .slide__content .quote-block { color: var(--on-hero); }

.slide.slide--brand-hero .slide__content .title-meta,
.slide.slide--brand-hero .slide__content .quote-source,
.slide.slide--brand-hero .slide__content .slide-footnote { color: color-mix(in oklab, var(--on-hero) 78%, transparent); }

/* --- Brand-Hero: Vollflächig (Hintergrund) --------------------------------
   Zweiter Hero-Modus, zusätzlich zum Spalten-Hero oben. Statt in
   .slide__content zu hängen, ist die Figure hier ein direktes Kind von
   .slide (data-hero-layout="full") und spannt sich randlos über die GANZE
   Bühne. Die Folie trägt slide--brand-hero UND slide--brand-hero-full
   (nicht ersatzweise): so bleiben alle Text-/Farbregeln oben (Schrift auf
   Bildwelt, Scrim, Titelfarben) unverändert gültig, ohne sie zu
   duplizieren — nur die Geometrie der Figure und von .slide__content
   unterscheidet sich, und genau die wird hier überschrieben.

   Anschnitt: anders als der Spalten-Hero (Doktrin: contain, cover nur mit
   data-hero-fit="cover") ist beim Vollflächig-Hero cover der Normalfall —
   ein Hintergrund mit Balken sieht kaputt aus. data-hero-fit="contain"
   schaltet auf Wunsch zurück.

   Ebenen: .slide trägt bereits isolation: isolate (siehe oben) und bildet
   damit den gemeinsamen Stapelkontext für seine direkten Kinder. Darin
   liegt die Hero-Figur auf 0. Frei "nach hinten" gelegte Elemente bleiben
   im Vollflächig-Modus direkte .slide-Kinder (siehe heroContentFor in
   editor.js — dort nur für den Spalten-Fall aktiv) und bekommen denselben
   LAYER_BACK_HERO_Z wie im Spalten-Modus (1) — hier reicht das, weil sie
   nicht erst aus einem isolierten .slide__content-Kontext befreit werden
   müssen. Damit .slide__content zuverlässig darüber bleibt, statt sich
   ohne eigenen z-index nur auf die DOM-Reihenfolge zu verlassen, bekommt es
   hier explizit 2 — dieselbe Zahl, die die Textkinder im Spalten-Modus
   bereits einzeln tragen (Regel oben). */
.slide.slide--brand-hero-full > .brand-hero-media[data-hero-layout="full"] {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--hero-backdrop);
  border: 0;
}

.slide.slide--brand-hero-full > .brand-hero-media[data-hero-layout="full"]::after {
  position: absolute;
  inset: 0;
  background: var(--hero-scrim);
  content: "";
  pointer-events: none;
}

.slide.slide--brand-hero-full > .brand-hero-media[data-hero-layout="full"] img,
.slide.slide--brand-hero-full > .brand-hero-media[data-hero-layout="full"] video {
  display: block;
  width: 100%;
  height: 100%;
  background: transparent;
  border: 0;
  object-fit: cover;
}

.slide.slide--brand-hero-full > .brand-hero-media[data-hero-layout="full"][data-hero-fit="contain"] img,
.slide.slide--brand-hero-full > .brand-hero-media[data-hero-layout="full"][data-hero-fit="contain"] video { object-fit: contain; }

/* .slide__content trägt im Vollflächig-Modus keinen eigenen Backdrop mehr (der
   Hero füllt schon die ganze Bühne dahinter) und darf nicht mehr wie im
   Spalten-Modus überlaufend abschneiden — sonst verschwinden frei
   transformierte Elemente, sobald sie über den Rand der Textspalte hinausragen. */
.slide.slide--brand-hero-full > .slide__content {
  position: relative;
  z-index: 2;
  isolation: auto;
  overflow: visible;
  background: transparent;
}

.slide-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-7);
  margin-bottom: clamp(40px, 6cqh, 72px);
}

.slide-header h2 { margin-bottom: 0; }

.eyebrow,
.section-number,
.col-label,
.card-index,
.title-meta,
.slide-footnote,
.quote-source,
.notes-kicker {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1.2;
  text-transform: uppercase;
}

.eyebrow {
  margin-bottom: var(--space-4);
  color: var(--accent);
}

[data-tone="saturated"] .eyebrow { color: var(--paper); }

.section-number {
  flex: 0 0 auto;
  padding-top: 8px;
  color: var(--accent);
}

.slide-header--inverse .section-number { color: var(--paper); }

.lead {
  max-width: 850px;
  font-size: clamp(23px, 2cqw, 32px);
  line-height: 1.38;
}

.slide--title .slide__content {
  justify-content: space-between;
  padding-top: clamp(44px, 6cqh, 72px);
  padding-bottom: clamp(44px, 6cqh, 72px);
}

.title-mark img,
.closing-mark img { width: clamp(180px, 17cqw, 260px); }

.title-copy { margin: auto 0; }
.title-copy .lead { margin-bottom: 0; }
.title-meta { margin-bottom: 0; color: var(--on-accent-muted); }

.statement-wrap {
  display: grid;
  max-width: 1120px;
  gap: var(--space-5);
}

.statement-wrap h2 {
  margin-bottom: 0;
  font-size: clamp(50px, 5.5cqw, 86px);
}

.statement-wrap .lead {
  max-width: 820px;
  margin: 0;
  padding-left: var(--space-5);
  border-left: 5px solid var(--accent);
}

.metric-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid color-mix(in srgb, var(--ink) 28%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 28%, transparent);
}

.metric {
  display: flex;
  min-height: 250px;
  padding: var(--space-6);
  flex-direction: column;
  justify-content: center;
  border-right: 1px solid color-mix(in srgb, var(--ink) 28%, transparent);
}

.metric:last-child { border-right: 0; }

.metric strong {
  color: var(--accent);
  font-family: var(--font-display);
  font-size: clamp(76px, 8cqw, 128px);
  letter-spacing: -0.05em;
  line-height: 0.9;
}

.metric span { margin-top: var(--space-5); font-size: clamp(20px, 1.5cqw, 26px); }
.slide-footnote { margin-top: var(--space-5); margin-bottom: 0; color: var(--ink-2); }

.steps {
  display: grid;
  margin: 0;
  padding: 0;
  grid-template-columns: repeat(3, 1fr);
  list-style: none;
  counter-reset: steps;
}

.steps li {
  display: flex;
  min-height: 270px;
  padding: var(--space-6);
  flex-direction: column;
  justify-content: space-between;
  border-top: 6px solid var(--accent);
  border-right: 1px solid var(--rule-strong);
  border-bottom: 1px solid var(--rule-strong);
}

.steps li:first-child { border-left: 1px solid var(--rule-strong); }
.step-num { color: var(--accent); font-family: var(--font-ui); font-weight: 700; }
.steps p { margin-bottom: 0; color: var(--ink-2); }

.two-col {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-6);
}

.two-col article {
  min-height: 320px;
  padding: var(--space-7);
  background: var(--paper);
  border: 1px solid color-mix(in srgb, var(--accent) 55%, var(--rule));
}

.col-label, .card-index { color: var(--accent); }

.clean-list {
  display: grid;
  margin: var(--space-5) 0 0;
  padding: 0;
  gap: var(--space-3);
  list-style: none;
}

.clean-list li {
  position: relative;
  padding-left: var(--space-5);
}

.clean-list li::before {
  position: absolute;
  top: 0.7em;
  left: 0;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  content: "";
}

.ai-disclaimer {
  margin: var(--space-5) 0 0;
  padding-top: var(--space-4);
  color: var(--ink-2);
  font-family: var(--font-ui);
  font-size: 14px;
  border-top: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
}

.split-visual {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  align-items: center;
  gap: clamp(48px, 7cqw, 110px);
}

.brand-visual { margin: 0; }
.brand-visual img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; object-position: center; border: 1px solid var(--rule); }
.brand-visual figcaption { margin-top: var(--space-3); color: var(--ink-2); font-family: var(--font-ui); font-size: 14px; }

/* Medien-Platzhalter: eine Struktur-Stelle fuer ein Bild oder Video, das erst spaeter im Editor
   eingesetzt wird — bevorzugter Weg fuer Agenten (z.B. via MCP), die keine Bilddaten haben. Bleibt
   die Klasse "media-placeholder" erhalten, auch wenn danach ein echtes Medium eingesetzt wird: das
   Seitenverhaeltnis aus data-ratio gilt dann weiter als Rahmen fuer den Bildausschnitt. Gueltige
   Medien sind img, video und iframe (YouTube/Vimeo/Drive/X-Embed aus dem Video-Dialog). */
.media-placeholder {
  position: relative;
  margin: 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}
.media-placeholder[data-ratio="4:3"] { aspect-ratio: 4 / 3; }
.media-placeholder[data-ratio="1:1"] { aspect-ratio: 1 / 1; }
.media-placeholder[data-ratio="9:16"] { aspect-ratio: 9 / 16; }
.media-placeholder[data-ratio="frei"] { aspect-ratio: auto; }
.media-placeholder:not(:has(> img, > video, > iframe)) {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  padding: var(--space-4);
  border: 1px dashed var(--rule);
  background: transparent;
  text-align: center;
}
.media-placeholder:not(:has(> img, > video, > iframe))::before {
  content: "Bild oder Video einfügen";
  color: var(--ink-2);
  font-family: var(--font-ui);
  font-size: 14px;
}
.media-placeholder > img,
.media-placeholder > video,
.media-placeholder > iframe {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border: 0;
}
.media-placeholder figcaption { margin-top: var(--space-3); color: var(--ink-2); font-family: var(--font-ui); font-size: 14px; }
.ai-uploaded-media { width: min(100%, 760px); max-height: 460px; }
.ai-uploaded-media img { max-height: 440px; aspect-ratio: auto; object-fit: contain; }

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
}

.card {
  min-height: 290px;
  padding: var(--space-6);
  background: var(--paper);
  border: 1px solid var(--rule-strong);
}

.card h3 { margin-top: var(--space-7); }
.card p { margin-bottom: 0; color: var(--ink-2); }

/* Medien-Karten: Kacheln mit Bild/Video/Platzhalter oben und Text darunter — mix & match
   pro Karte (Karten ohne Medien bleiben reine Textkarten). Die Medien-Stelle ist ein
   figure.media-placeholder (leer = Platzhalter-UI, sonst img/video/iframe, data-ratio
   steuert den Zuschnitt). Spaltenvarianten cards--2 und cards--4; Standard bleibt 3.
   Videos in Karten erhalten zur Laufzeit automatisch einen Gross-anschauen-Knopf
   (Lightbox mit Ton) aus dem gemeinsamen Editor. */
.cards--2 { grid-template-columns: repeat(2, 1fr); }
.cards--4 { grid-template-columns: repeat(4, 1fr); }
.card > .media-placeholder { margin: 0 0 var(--space-4); }
.card > .media-placeholder ~ h3 { margin-top: var(--space-4); }
.cards--media .card { min-height: 0; }

.quote-block {
  max-width: 1120px;
  margin: auto 0 var(--space-6);
  font-family: var(--font-display);
  font-size: clamp(50px, 5.5cqw, 88px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.06;
}

.quote-source { margin-bottom: 0; color: var(--on-accent-subtle); }

.prompt-card {
  background: var(--paper);
  border: 1px solid color-mix(in srgb, var(--accent) 70%, var(--rule));
}

.prompt-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  padding: var(--space-4) var(--space-5);
  color: var(--paper);
  background: var(--accent);
  font-family: var(--font-ui);
}

.copy-btn {
  padding: 8px 14px;
  color: var(--accent);
  background: var(--paper);
  border: 0;
  border-radius: 0;
  cursor: pointer;
}

.prompt-card pre {
  overflow: auto;
  margin: 0;
  padding: var(--space-6);
  color: var(--ink);
  white-space: pre-wrap;
  font: 500 clamp(17px, 1.35cqw, 22px)/1.55 ui-monospace, "SFMono-Regular", Consolas, monospace;
}

.slide--closing .slide__content {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: var(--space-8);
}

.closing-copy h2 { max-width: 1000px; }
.closing-copy .lead { margin-bottom: 0; }

.progress {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 60;
  height: 5px;
  background: transparent;
}

.progress span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--blue);
  transition: width 150ms ease-out;
}

.deck-chrome {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 1px;
  padding: 1px;
  background: color-mix(in srgb, var(--rule-strong) 72%, transparent);
  border: 1px solid color-mix(in srgb, var(--rule-strong) 72%, transparent);
  opacity: 1;
  transition: opacity 160ms ease-out, transform 160ms ease-out, background 160ms ease-out, border-color 160ms ease-out;
}

.deck-chrome button,
.deck-counter {
  min-height: 34px;
  padding: 7px 10px;
  background: color-mix(in srgb, var(--paper) 96%, transparent);
  border: 0;
  border-radius: 0;
  font-family: var(--font-ui);
  font-size: 11px;
}

.deck-chrome button {
  max-width: 92px;
  overflow: hidden;
  cursor: pointer;
  transition: max-width 160ms ease-out, padding 160ms ease-out, opacity 120ms ease-out, color 120ms ease-out, background 120ms ease-out;
  white-space: nowrap;
}
.deck-chrome button:hover { color: var(--paper); background: var(--blue); }
.deck-counter { display: grid; place-items: center; color: var(--ink-2); }

.deck-chrome:not(:hover):not(:focus-within) {
  gap: 0;
  padding: 0;
  background: transparent;
  border-color: transparent;
  opacity: 0.34;
  transform: translateY(5px);
}

.deck-chrome:not(:hover):not(:focus-within) button {
  max-width: 0;
  min-width: 0;
  padding-right: 0;
  padding-left: 0;
  opacity: 0;
  pointer-events: none;
}

.deck-chrome:not(:hover):not(:focus-within) .deck-counter {
  min-height: 28px;
  padding: 5px 8px;
  color: var(--ink-2);
  background: color-mix(in srgb, var(--paper) 80%, transparent);
  border: 1px solid color-mix(in srgb, var(--rule-strong) 42%, transparent);
}

@media (hover: none) {
  .deck-chrome:not(:hover):not(:focus-within) {
    gap: 1px;
    padding: 1px;
    background: color-mix(in srgb, var(--rule-strong) 72%, transparent);
    border-color: color-mix(in srgb, var(--rule-strong) 72%, transparent);
    opacity: 0.82;
    transform: none;
  }

  .deck-chrome:not(:hover):not(:focus-within) button {
    max-width: 76px;
    padding-right: 9px;
    padding-left: 9px;
    opacity: 1;
    pointer-events: auto;
  }
}

button:focus-visible,
input:focus-visible { outline: var(--focus); outline-offset: 2px; }

.deck[data-animation-mode="auto"] .slide:not([data-animation-mode="off"]):not([data-animation-mode="build"]) [data-frag]:not(.is-visible),
.slide[data-animation-mode="auto"] [data-frag]:not(.is-visible),
.keyboard-mode .slide.active [data-frag]:not(.is-visible),
.keyboard-mode .slide.is-preparing-animation [data-frag]:not(.is-visible) {
  opacity: 0;
  transform: var(--fragment-enter-transform, translateY(14px));
}

[data-frag] { transition: opacity var(--fragment-duration, 320ms) ease-out, transform var(--fragment-duration, 320ms) ease-out; }
[data-frag-effect="fade"] { --fragment-enter-transform: none; }
[data-frag-effect="slide-up"] { --fragment-enter-transform: translateY(28px); }
[data-frag-effect="slide-left"] { --fragment-enter-transform: translateX(-38px); }
[data-frag-effect="slide-right"] { --fragment-enter-transform: translateX(38px); }
[data-frag-effect="zoom"] { --fragment-enter-transform: scale(0.93); }
[data-frag-speed="fast"] { --fragment-duration: 180ms; }
[data-frag-speed="normal"] { --fragment-duration: 320ms; }
[data-frag-speed="slow"] { --fragment-duration: 520ms; }

.keyboard-mode .slide.is-preparing-animation [data-frag] {
  transition: none !important;
}

.keyboard-mode .slide.active[data-active-animation-mode="off"] [data-frag] {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}

.speaker-notes { display: none; }

/* Presenter-Frames zeigen genau eine Folie. Navigation, Medienstart und Overlays
   bleiben im steuernden Presenter-Fenster, damit Vorschau und Publikum weder
   doppelte Wiedergabe noch konkurrierende Klickflaechen erhalten. */
html.presenter-frame {
  overflow: hidden;
  scroll-behavior: auto;
}

html.presenter-frame body {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

html.presenter-frame .deck {
  height: 100vh;
  justify-content: center;
  pointer-events: none;
}

html.presenter-frame .deck > section.slide {
  display: none;
  margin: 0 !important;
}

html.presenter-frame .deck > section.slide.active {
  display: block;
}

html.presenter-frame .progress,
html.presenter-frame .deck-chrome,
html.presenter-frame .overlay,
html.presenter-frame .presentation-editor-ui,
html.presenter-frame .deck-viewport-accent-edge {
  display: none !important;
}

.overlay[hidden] { display: none; }

.overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  padding: var(--space-5);
  place-items: center;
  background: var(--overlay-scrim);
}

.overlay-panel {
  width: min(760px, 100%);
  max-height: min(720px, calc(100cqh - 48px));
  overflow: auto;
  padding: var(--space-6);
  background: var(--paper);
  border: 1px solid var(--rule-strong);
}

.overlay-panel header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-5);
  margin-bottom: var(--space-5);
}

.overlay-panel h2 { margin: 0; font-size: clamp(30px, 3cqw, 42px); }
.overlay-panel header button { padding: 10px 14px; background: var(--paper); border: 1px solid var(--blue); cursor: pointer; }

.overlay-panel input {
  width: 100%;
  padding: 14px 16px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--rule-strong);
  border-radius: 0;
}

.search-results { display: grid; margin-top: var(--space-4); gap: 1px; background: var(--rule); }
.search-result { display: grid; padding: var(--space-4); text-align: left; background: var(--paper); border: 0; cursor: pointer; }
.search-result:hover { background: var(--blue-soft); }
.search-result small { color: var(--ink-2); }
.search-result .search-result-note { color: var(--yellow-text, var(--yellow)); font-family: var(--font-ui); font-weight: 400; }
.search-result mark { color: inherit; background: color-mix(in oklab, var(--yellow) 55%, transparent); }
.search-empty { padding: var(--space-4); background: var(--paper); }

/* Suchtreffer auf der Folie. Gesetzt wird die Hervorhebung in app.js über die
   CSS Custom Highlight API und NICHT über eingefügte <mark>-Knoten: der Editor
   serialisiert beim Speichern das Live-DOM, eingefügte Knoten landen sonst
   dauerhaft in der Deck-Datei.

   Eingefärbt wird nur die Fläche, die Schriftfarbe bleibt die der Folie. Damit
   trägt derselbe Gelbton auf Papier, auf Nachtflächen und auf data-tone=
   "saturated" gleichermassen – dort schreibt der Core die Textfarbe auf
   var(--paper), und die halbdurchlässige Fläche lässt sie unangetastet. Der
   Textschatten der Hero-Folien fällt weg, sonst verwischt er die Markierung. */
::highlight(kbl-search) {
  background-color: color-mix(in oklab, var(--yellow) 55%, transparent);
  text-shadow: none;
}
.notes-panel { border-top: 8px solid var(--violet); }
.notes-kicker { color: var(--violet); }
.notes-panel #notesContent { white-space: pre-line; }
.help-panel dl { display: grid; gap: 1px; background: var(--rule); }
.help-panel dl div { display: grid; grid-template-columns: 190px 1fr; gap: var(--space-5); padding: var(--space-4); background: var(--paper); }
.help-panel dt { font-family: var(--font-ui); font-weight: 700; }
.help-panel dd { margin: 0; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
/* Mitnehm-Bausteine: funktionieren als persistiertes HTML ohne Laufzeit-JavaScript. */
.deck-qr {
  display: grid;
  width: clamp(168px, 17cqw, 240px);
  margin: var(--space-5) 0 0;
  padding: clamp(12px, 1.4cqw, 20px);
  gap: var(--space-3);
  color: var(--hero-backdrop);
  background: var(--on-hero);
  border: 1px solid color-mix(in srgb, var(--rule-strong) 72%, transparent);
  border-radius: var(--radius-card, 18px);
  box-shadow: 0 14px 38px color-mix(in srgb, var(--ink) 14%, transparent);
}

.deck-qr img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  background: var(--on-hero);
}

.deck-qr figcaption {
  margin: 0;
  color: color-mix(in srgb, var(--hero-backdrop) 72%, var(--on-hero));
  font-family: var(--font-ui);
  font-size: clamp(12px, 1cqw, 15px);
  line-height: 1.35;
  text-align: center;
}

.slide a.deck-pdf-download,
.slide a.deck-pdf-download:visited {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  min-height: 48px;
  margin-top: var(--space-5);
  padding: 12px 22px;
  align-items: center;
  justify-content: center;
  color: var(--paper);
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: var(--radius-pill, 999px);
  font-family: var(--font-ui);
  font-size: clamp(14px, 1.15cqw, 18px);
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none !important;
  cursor: pointer;
}

.slide a.deck-pdf-download:hover,
.slide a.deck-pdf-download:focus-visible {
  color: var(--paper);
  background: color-mix(in srgb, var(--accent) 86%, var(--ink));
  text-decoration: none !important;
}

.slide[data-tone="saturated"] a.deck-pdf-download,
.slide[data-tone="saturated"] a.deck-pdf-download:visited {
  color: var(--accent);
  background: var(--paper);
  border-color: var(--paper);
}

@media (max-width: 900px) {
  .slide__content { padding-top: 70px; padding-bottom: 90px; }
  .metric-row, .steps, .cards { grid-template-columns: 1fr; }
  .metric, .steps li, .card { min-height: auto; }
  .metric { border-right: 0; border-bottom: 1px solid color-mix(in srgb, var(--ink) 28%, transparent); }
  .metric:last-child { border-bottom: 0; }
  .two-col, .split-visual, .slide--closing .slide__content { grid-template-columns: 1fr; }
  .slide { overflow: auto; }
  .deck-chrome button:nth-of-type(n + 3) { display: none; }
}

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

/* Druck und PDF-Export stehen in runtime/print.css. Die Datei wird beim
   Ausliefern als letztes Stylesheet mit media="print" eingehängt, damit ihre
   Seitengeometrie auch gegenüber deckspezifischem CSS greift. */

/* Reusable contact slide: supplied details remain readable in all brands. */
.slide--contact .slide__content { display: flex; flex-direction: column; justify-content: center; gap: var(--space-6); }
.slide--contact h2 { max-width: 22ch; }
.slide--contact .lead { margin: 0; }
.slide--contact .cards { width: 100%; }
.slide--contact .cards article { min-width: 0; overflow-wrap: anywhere; }

/* --- Medien-Patterns (MCP get_media_patterns) ----------------------------
   Geprüfte Bausteine für Agenten, die Folien direkt als HTML schreiben.
   Präfix mp-, damit kein bestehendes Deck betroffen ist. Farben nur über
   Tokens, damit Hell und Dunkel und alle Marken funktionieren. Die Masse
   rechnen mit der logischen Bühne von 1440 × 810 (cq-Einheiten), wie der
   Rest des Kerns. Geprüft mit scripts/media-patterns-check.mjs.

   Bilder in Folien stehen global auf object-fit: contain (editor.css); die
   Rahmen hier geben darum eine feste Höhe vor, statt das Bild zu beschneiden.
   Für beschnittene Galerien gibt es mp-gallery--cover. */

.mp-hero-copy { max-width: min(780px, 62%); }
.mp-hero-copy .lead { margin-bottom: 0; }

.mp-figure {
  display: flex;
  min-height: 0;
  margin: var(--space-5) 0 0;
  flex-direction: column;
  gap: var(--space-3);
}

.mp-figure > img,
.mp-figure > video {
  display: block;
  width: 100%;
  height: clamp(200px, 50cqh, 600px);
  object-fit: contain;
  object-position: center;
}

.mp-figure > figcaption,
.mp-gallery figcaption,
.mp-device > figcaption {
  position: static;
  margin: 0;
  color: var(--ink-2);
  font-family: var(--font-ui);
  font-size: clamp(13px, 1.05cqw, 16px);
  line-height: 1.4;
}

.mp-gallery {
  --mp-columns: 3;
  --mp-media-height: clamp(150px, 38cqh, 460px);
  display: grid;
  grid-template-columns: repeat(var(--mp-columns), minmax(0, 1fr));
  margin-top: var(--space-5);
  gap: var(--space-5);
}

.mp-gallery--2 { --mp-columns: 2; --mp-media-height: clamp(160px, 42cqh, 500px); }
.mp-gallery--4 { --mp-columns: 4; --mp-media-height: clamp(130px, 30cqh, 360px); gap: var(--space-4); }
.mp-gallery--2x2 { --mp-columns: 2; --mp-media-height: clamp(90px, 18cqh, 220px); row-gap: var(--space-4); }

.mp-gallery > figure {
  display: flex;
  min-width: 0;
  margin: 0;
  flex-direction: column;
  gap: var(--space-2);
}

.mp-gallery > figure > img,
.mp-gallery > figure > video {
  display: block;
  width: 100%;
  height: var(--mp-media-height);
  object-fit: contain;
}

#deck .slide .mp-gallery--cover > figure > img,
#deck .slide .mp-gallery--cover > figure > video { object-fit: cover !important; }

.mp-device {
  display: flex;
  min-height: 0;
  margin: var(--space-5) auto 0;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
}

.mp-device__screen {
  position: relative;
  overflow: hidden;
  background: var(--paper-2);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-card, 0px);
  box-shadow: var(--shadow-card, none);
}

.mp-device--browser .mp-device__screen { width: min(100%, 1040px); padding-top: 30px; }

.mp-device--browser .mp-device__screen::before {
  position: absolute;
  inset: 0 0 auto;
  height: 30px;
  background: var(--paper-3);
  border-bottom: 1px solid var(--rule);
  content: "";
}

.mp-device--browser .mp-device__screen::after {
  position: absolute;
  top: 11px;
  left: 14px;
  width: 8px;
  height: 8px;
  background: var(--rule-strong);
  border-radius: 50%;
  box-shadow: 14px 0 0 var(--rule-strong), 28px 0 0 var(--rule-strong);
  content: "";
}

.mp-device--browser .mp-device__screen > img,
.mp-device--browser .mp-device__screen > video {
  display: block;
  width: 100%;
  height: clamp(200px, 48cqh, 580px);
  object-fit: contain;
}

.mp-device--phone { margin-top: 0; }

.mp-device--phone .mp-device__screen {
  padding: 12px;
  background: var(--hero-backdrop);
  border-color: color-mix(in srgb, var(--on-hero) 18%, transparent);
  border-radius: 40px;
}

.mp-device--phone .mp-device__screen > img,
.mp-device--phone .mp-device__screen > video {
  display: block;
  width: auto;
  height: clamp(260px, 60cqh, 720px);
  aspect-ratio: 9 / 19.5;
  object-fit: contain;
  border-radius: 28px;
}

.mp-logos {
  --mp-columns: 4;
  display: grid;
  grid-template-columns: repeat(var(--mp-columns), minmax(0, 1fr));
  margin: var(--space-6) 0 0;
  padding: 0;
  gap: var(--space-4);
  list-style: none;
}

.mp-logos--3 { --mp-columns: 3; }
.mp-logos--5 { --mp-columns: 5; }
.mp-logos--6 { --mp-columns: 6; }

.mp-logos > li {
  display: flex;
  min-width: 0;
  min-height: clamp(84px, 13cqh, 150px);
  padding: var(--space-4) var(--space-5);
  align-items: center;
  justify-content: center;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--radius-card, 0px);
}

.mp-logos--light > li { background: var(--on-hero); border-color: transparent; }

.mp-logos > li > img {
  display: block;
  width: auto;
  max-width: 100%;
  height: clamp(28px, 5.4cqh, 64px);
  object-fit: contain;
}

.mp-logos--mono > li > img { filter: grayscale(1); opacity: 0.86; }

.slide figure.mp-embed-portrait {
  display: flex;
  width: min(100%, 560px);
  height: min(66cqh, 640px);
  margin: var(--space-5) auto 0;
  justify-content: center;
}

.slide figure.mp-embed-portrait > iframe {
  display: block;
  width: 100%;
  height: 100%;
  background: transparent;
  border: 0;
  border-radius: var(--radius-card, 0px);
}

.split-visual > figure.mp-embed-portrait { margin-top: 0; }

.slide a.mp-download,
.slide a.mp-download:visited,
.slide a.mp-download.slide-text-link {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  min-height: 48px;
  margin-top: var(--space-5);
  padding: 12px 22px;
  align-items: center;
  gap: var(--space-3);
  color: var(--paper);
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: var(--radius-pill, 0px);
  font-family: var(--font-ui);
  font-size: clamp(14px, 1.15cqw, 18px);
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none !important;
  cursor: pointer;
}

.slide a.mp-download:hover,
.slide a.mp-download:focus-visible,
.slide a.mp-download.slide-text-link:hover,
.slide a.mp-download.slide-text-link:focus-visible {
  color: var(--paper);
  background: color-mix(in srgb, var(--accent) 86%, var(--ink));
  text-decoration: none !important;
}

.slide a.mp-download small { font-size: 0.82em; font-weight: 400; opacity: 0.82; }

.mp-stat-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  align-items: center;
  gap: clamp(40px, 6cqw, 96px);
}

.mp-stat__value {
  display: block;
  margin: 0;
  color: var(--accent-text, var(--accent));
  font-family: var(--font-display);
  font-size: clamp(88px, 12cqw, 200px);
  font-weight: 700;
  line-height: 0.92;
  letter-spacing: -0.04em;
}

.mp-stat__label {
  margin: var(--space-5) 0 0;
  font-size: clamp(28px, 2.6cqw, 42px);
  line-height: 1.12;
}

.mp-stat .lead { margin: var(--space-4) 0 0; }

.mp-stat-hero > figure.brand-visual > img { aspect-ratio: auto; height: clamp(240px, 54cqh, 640px); }

/* --- AR-Folie (slide--ar): statische Ansicht -------------------------------
   Eine AR-Folie (section.slide.slide--ar[data-ar-stage], siehe README «AR-Folien») wird mit Kamera zur Bühne (runtime/ar/ar-stage.*, im Overlay,
   mit Klonen). Hier steht, was jede Ansicht ohne Bühne sieht: AR aus, Linkansicht ohne Kamera, Presenter-Rahmen, Editor, PDF und Druck, auch ganz ohne
   JavaScript. Zu sehen sind der Titel, die Objekte mit data-ar-start="stage" an ihrer Startposition (Grösse und Drehung) und alle übrigen Medien als
   Bildreihe unten mit Beschriftung.

   Startaufstellung als Custom Properties an der Figur (nur diese im style, keine Farben): --ar-x und --ar-y = Mittelpunkt in Prozent der Folie,
   --ar-w = Breite in Prozent der Folienbreite, --ar-r = Drehung. Fehlen sie, gilt 50 % / 42 % / 28 % (Videos 36 %) / 0deg.
   Masse in cq-Einheiten der Bühne von 1440 × 810, Farben nur über Tokens. Geprüft mit scripts/ar-stage-browser-check.mjs (kein Überlauf bei 1440 × 810). */
.slide--ar .slide__content {
  position: static;
  justify-content: flex-start;
}

.slide--ar .ar-stage__title {
  position: relative;
  z-index: 2;
  max-width: 62%;
  margin: 0;
}

.slide--ar .ar-stage__items {
  position: absolute;
  inset: 0;
  display: flex;
  padding: 0 var(--space-7) 4.5cqh;
  align-items: flex-end;
  justify-content: center;
  gap: var(--space-4);
}

.slide--ar [data-ar-item] {
  position: relative;
  display: flex;
  min-width: 0;
  margin: 0;
  flex: 1 1 0;
  flex-direction: column;
  gap: var(--space-2);
  max-width: 17cqw;
}

.slide--ar [data-ar-item] > img,
.slide--ar [data-ar-item] > video {
  display: block;
  width: 100%;
  height: 15cqh;
  object-fit: contain;
  object-position: center bottom;
}

.slide--ar [data-ar-item] > figcaption {
  position: static;
  margin: 0;
  font-family: var(--font-ui);
  font-size: clamp(11px, 0.95cqw, 14px);
  line-height: 1.3;
  text-align: center;
  opacity: 0.82;
}

.slide--ar [data-ar-item][data-ar-start="stage"] {
  position: absolute;
  top: var(--ar-y, 42%);
  left: var(--ar-x, 50%);
  width: var(--ar-w, 28%);
  max-width: none;
  flex: none;
  transform: translate(-50%, -50%) rotate(var(--ar-r, 0deg));
}

.slide--ar [data-ar-item][data-ar-start="stage"][data-ar-kind="video"] { width: var(--ar-w, 36%); }

.slide--ar [data-ar-item][data-ar-start="stage"] > img,
.slide--ar [data-ar-item][data-ar-start="stage"] > video {
  height: auto;
  max-height: 60cqh;
  object-position: center;
}

.slide--ar [data-ar-item][data-ar-kind="video"]::after,
.slide--ar [data-ar-item][data-ar-kind="model"]::after {
  position: absolute;
  top: var(--space-1);
  left: var(--space-1);
  padding: 2px var(--space-2);
  color: var(--paper);
  background: var(--ink);
  border-radius: var(--radius-pill, 0px);
  font-family: var(--font-ui);
  font-size: clamp(10px, 0.8cqw, 12px);
  line-height: 1.4;
}

/* Quelle und Lizenz eines Modells (data-ar-credit, z. B. CC-BY): klein unter dem Modell, auch in der statischen Ansicht, im Druck und im PDF */
.slide--ar [data-ar-item][data-ar-kind="model"][data-ar-credit]::before {
  content: attr(data-ar-credit);
  position: absolute;
  top: 100%;
  right: 0;
  left: 0;
  margin-top: var(--space-1);
  font-family: var(--font-ui);
  font-size: clamp(10px, 0.8cqw, 12px);
  line-height: 1.3;
  text-align: center;
  opacity: 0.8;
}

.slide--ar [data-ar-item][data-ar-kind="video"]::after { content: "Video"; }
.slide--ar [data-ar-item][data-ar-kind="model"]::after { content: "3D"; }

/* Pfeile (span[data-ar-link]): der Knoten selbst bleibt leer. Das Modul runtime/ar/ar-static-links.js zeichnet in jeder Ansicht ohne Bühne (Presenter, Link ohne Kamera, Editor, Druck, PDF)
   ein SVG (aria-hidden) und die Beschriftung hinein, mit der Geometrie der Bühne; der Knoten deckt dafür die ganze Folie ab, rührt aber nichts an. Hängt ein Pfeil an einem Schritt
   (data-frag am Pfeil oder an einer Hülle), blendet er mit diesem ein und aus. Ohne das Modul (ohne JavaScript) bleibt er unsichtbar wie bisher. Masse folgen der Höhe der Folie über --k
   (1 bei 1080 px): Kern 5 px, Kontur 11 px, Beschriftung 24 px, nie unter 14 px; Farben nur über Tokens. */
.slide--ar [data-ar-link] {
  position: absolute;
  inset: 0;
  display: block;
  pointer-events: none;
}

.slide--ar [data-ar-link] .ar-link {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.slide--ar [data-ar-link] .ar-link path { fill: none; stroke: none; stroke-linecap: round; stroke-linejoin: round; }
.slide--ar [data-ar-link] .ar-link { --link: var(--paper); }
.slide--ar [data-ar-link] .ar-link[data-color="gold"] { --link: var(--yellow); }
.slide--ar [data-ar-link] .ar-link[data-color="blue"] { --link: var(--blue); }
.slide--ar [data-ar-link] .ar-link .outline { stroke: var(--ink); stroke-width: calc(11px * var(--k, 1)); }
.slide--ar [data-ar-link] .ar-link .head-outline { fill: var(--ink); stroke: var(--ink); stroke-width: calc(6px * var(--k, 1)); }
.slide--ar [data-ar-link] .ar-link .core { stroke: var(--link); stroke-width: calc(5px * var(--k, 1)); }
.slide--ar [data-ar-link] .ar-link .head { fill: var(--link); }

.slide--ar [data-ar-link] .ar-link-label {
  position: absolute;
  max-width: 28cqw;
  padding: 0.28em 0.7em;
  color: var(--paper);
  background: var(--ink);
  border: 2px solid var(--paper);
  border-radius: var(--radius-pill, 999px);
  font-family: var(--font-ui);
  line-height: 1.2;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transform: translate(-50%, -50%);
}

.slide--ar [data-ar-link] .ar-link-label[data-color="gold"] { border-color: var(--yellow); }
.slide--ar [data-ar-link] .ar-link-label[data-color="blue"] { border-color: var(--blue); }

/* Schritte (data-frag) auf der AR-Folie: eine Hülle <div class="ar-stage__step" data-frag> um Objekte und Pfeile. Die Hülle deckt die Folie ab und trägt nie eine Transformation (sonst wäre sie
   der Bezugspunkt der absolut gesetzten Objekte und verschöbe deren Startlage); die Einblendung ist reines Einblenden. Klicks gehen durch sie hindurch zu dem, was darunter liegt. */
.slide--ar .ar-stage__step {
  position: absolute;
  inset: 0;
  transform: none;
  --fragment-enter-transform: none;
  pointer-events: none;
}

.slide--ar .ar-stage__step > * { pointer-events: auto; }

@media (max-width: 900px) {
  .mp-gallery,
  .mp-logos,
  .mp-stat-hero { grid-template-columns: 1fr; }
  .mp-hero-copy { max-width: none; }
}

/* Kuble — Komponentenabweichungen, die Tokens nicht ausdrücken können.
   Der Core ist hell gedacht; diese Datei dreht die Stellen um, an denen ein
   Thema mehr ist als vertauschte Farbwerte, und trägt die v3-Signaturen ins
   Deck. Alles andere gehört in tokens.css. Wird nach runtime/core.css
   komponiert und gewinnt darum.

   Regeln ohne Themenpräfix gelten in beiden Ebenen. Für die helle Ebene gilt
   derselbe Selektor wie in tokens.css:
   html[data-kbl-theme="light"], html:not([data-kbl-theme="dark"]). */

/* --- Akzent als Text -----------------------------------------------------
   Kuble Blue trägt als Fläche, aber nicht als Text auf Night Ink (3.9:1);
   im Hellen gilt dasselbe für Gold, Grün, Violett und Koralle. Statt der
   Farbe direkt steht darum überall die Textstufe des Akzents, die tokens.css
   pro Ebene setzt. Im Dunkeln sind die vier Stufen mit der Grundfarbe
   identisch — die Auslieferung ändert sich dort also nicht. */

.slide { --accent-text: var(--blue-text); }
.slide[data-accent="yellow"] { --accent-text: var(--yellow-text); }
.slide[data-accent="green"] { --accent-text: var(--green-text); }
.slide[data-accent="violet"] { --accent-text: var(--violet-text); }
.slide[data-accent="orange"] { --accent-text: var(--orange-text); }

.eyebrow,
.section-number,
.col-label,
.card-index,
.step-num,
.metric strong { color: var(--accent-text); }

/* --- Titel ---------------------------------------------------------------
   Im Hellen sitzen Titel eine Ink-Stufe tiefer als der Fliesstext; im
   Dunkeln ist --ink-heading gleich --ink, die Regel ist dort ein No-op. */

h1, h2, h3 { color: var(--ink-heading); }

/* --- Eyebrow-Signatur ----------------------------------------------------
   Die v3-Eyebrow ist ein 16 × 2 px-Strich vor dem Label, nicht bloss
   farbiger Text. Der Strich erbt die Textstufe des Akzents.

   Bewusst über position/padding statt über Flexbox: die Eyebrow ist im
   Editor ein contenteditable-Absatz, und ein Flex-Container würde den
   Textknoten zu einem anonymen Flex-Item machen. */

.eyebrow {
  position: relative;
  padding-left: 26px;
}

.eyebrow::before {
  position: absolute;
  top: 0.52em;
  left: 0;
  width: 16px;
  height: 2px;
  background: currentcolor;
  content: "";
}

/* --- Elevation -----------------------------------------------------------
   Der Core stellt Karten auf --paper. Auf dunklem Grund verschwänden sie.
   Im Dark Mode heben Flächen mit Licht: derselbe halbtransparente Betrag
   hebt über jedem Folienton gleich stark, auch über soft und saturated.
   Im Hellen ist --elevate deckendes Weiss — siehe tokens.css. */

.card,
.two-col article,
.prompt-card {
  background: var(--elevate);
  border-radius: var(--radius-card);
}

/* Der Kopf der Promptkarte sitzt bündig in der Ecke und muss mitgerundet werden. */
.prompt-card { overflow: hidden; }

.overlay-panel,
.search-result,
.search-empty { background: var(--paper-3); }

.brand-visual img { border-radius: var(--radius-card); }

/* --- Gesättigte Folien ---------------------------------------------------
   Kuble ist zu 80 % Ink. Statt der Akzent-Vollfläche des Core trägt der
   Akzent hier als Lichtstimmung über Night Ink — das hält den Markenanteil
   und löst zugleich das Kontrastproblem dunkler Schrift auf Kuble Blue.

   Hero-Folien sind ausgenommen: dort ist das Bild die Fläche, und der
   Backdrop aus dem Kern muss die Lichtstimmung schlagen — sonst stünde die
   Bildspalte in einem getönten Rahmen. */

.slide[data-tone="saturated"]:not(.slide--brand-hero) {
  color: var(--ink);
  background:
    radial-gradient(115% 85% at 8% -5%, color-mix(in oklab, var(--accent) 42%, transparent), transparent 62%),
    radial-gradient(95% 75% at 105% 108%, color-mix(in oklab, var(--accent) 22%, transparent), transparent 58%),
    var(--paper-2);
}

[data-tone="saturated"] .eyebrow,
.slide-header--inverse .section-number { color: var(--accent-text); }

/* --- Betonung ------------------------------------------------------------
   Das Akzentwort ist die Kuble-Signatur. Gesteuert über die --emphasis-*-
   Tokens, damit sich die Variante in tokens.css umstellen lässt. */

.slide em,
.slide .em {
  color: var(--accent-text);
  font-family: var(--font-emphasis);
  font-style: var(--emphasis-style);
  font-weight: var(--emphasis-weight);
}

/* --- Typografie ----------------------------------------------------------
   Montserrat trägt in Grossgraden enger als die Schrift, für die der Core
   kalibriert ist. */

h1, h2 { letter-spacing: -0.03em; }
h3 { letter-spacing: -0.015em; }
.quote-block { letter-spacing: -0.035em; }
.prompt-card pre { font-family: var(--font-ui); }

/* --- Form ----------------------------------------------------------------
   Angestellte ist scharfkantig, Kuble ruhig gerundet; Aktionen sind Pills. */

.copy-btn,
.deck-chrome button,
.deck-counter,
.overlay-panel header button { border-radius: var(--radius-pill); }

.overlay-panel { border-radius: var(--radius-card); box-shadow: var(--shadow-pop); }
.overlay-panel input { border-radius: var(--radius-input); }

.prompt-card__header {
  color: var(--accent-text);
  background: color-mix(in oklab, var(--accent) 16%, var(--paper-2));
  border-bottom: 1px solid color-mix(in oklab, var(--accent) 45%, transparent);
}

.copy-btn {
  color: var(--ink);
  background: var(--elevate-strong);
  transition: color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}

.deck-chrome button:hover {
  color: var(--paper);
  background: var(--blue-bright);
}

/* --- Auswahl -------------------------------------------------------------
   v3 markiert Auswahl in Kuble Blue mit Night Ink darauf — in beiden Ebenen
   dieselbe Kombination. */

::selection {
  color: #05070c;
  background: var(--blue);
}

/* --- HELL («Crystal») ----------------------------------------------------
   Vier Stellen, an denen die Tokenwerte allein nicht reichen. */

html[data-kbl-theme="light"] .card,
html[data-kbl-theme="light"] .two-col article,
html[data-kbl-theme="light"] .prompt-card,
html:not([data-kbl-theme="dark"]) .card,
html:not([data-kbl-theme="dark"]) .two-col article,
html:not([data-kbl-theme="dark"]) .prompt-card {
  /* Weisse Karte auf Crystal braucht Tiefe statt Licht: weiter, negativ
     gespreizter Schatten, kein Glow. */
  box-shadow: var(--shadow-card);
}

html[data-kbl-theme="light"] .slide__content,
html:not([data-kbl-theme="dark"]) .slide__content {
  /* Dark-first heisst: eine Karte ist --paper und hebt sich, weil die Bühne
     darunter heller ist. Im Hellen dreht sich das um — die Bühne ist Crystal,
     die Karte Weiss. Statt jede deckeigene Regel anzufassen, gilt --paper
     innerhalb der Folienfläche als Kartenweiss; die Bühne selbst (.slide)
     liegt ausserhalb von .slide__content und behält Crystal. */
  --paper: #ffffff;
}

html[data-kbl-theme="light"] .slide[data-accent="yellow"],
html:not([data-kbl-theme="dark"]) .slide[data-accent="yellow"] {
  /* Auf der Folie ist Gold auch Text — deckeigenes CSS greift auf --accent
     zu. Die helle Fläche aus v3 käme dort auf 2.7:1, darum trägt in der
     Folie die tiefere Stufe. Ausserhalb der Folien (Editor, Shell) bleibt
     --yellow unverändert. */
  --accent: var(--yellow-text);
}

html[data-kbl-theme="light"] .slide[data-tone="saturated"]:not(.slide--brand-hero),
html:not([data-kbl-theme="dark"]) .slide[data-tone="saturated"]:not(.slide--brand-hero) {
  /* Dieselbe Lichtstimmung, halber Betrag: über Weiss trägt der Akzent
     doppelt so stark wie über Night Ink. */
  background:
    radial-gradient(115% 85% at 8% -5%, color-mix(in oklab, var(--accent) 24%, transparent), transparent 62%),
    radial-gradient(95% 75% at 105% 108%, color-mix(in oklab, var(--accent) 12%, transparent), transparent 58%),
    var(--paper-2);
}

html[data-kbl-theme="light"] .slide:not(.slide--brand-hero) .title-mark img:is([src*="white"], [data-brand-logo="inverse"]),
html[data-kbl-theme="light"] .slide:not(.slide--brand-hero) .closing-mark img:is([src*="white"], [data-brand-logo="inverse"]),
html:not([data-kbl-theme="dark"]) .slide:not(.slide--brand-hero) .title-mark img:is([src*="white"], [data-brand-logo="inverse"]),
html:not([data-kbl-theme="dark"]) .slide:not(.slide--brand-hero) .closing-mark img:is([src*="white"], [data-brand-logo="inverse"]) {
  /* Die Logomarken sind einfarbig reinweisse Masken mit Alphakanal;
     invert(1) dreht sie exakt auf Schwarz. Bewusst als Filter und nicht als
     src-Tausch: der Editor serialisiert das DOM, ein getauschtes src würde
     sich beim Speichern in das Deck einbrennen.

     Hero-Folien sind ausgenommen: dort liegt die Marke auf einem Foto und
     bleibt weiss — der Hero ist in beiden Ebenen dieselbe dunkle Welt. */
  filter: invert(1);
}

html[data-kbl-theme="light"] .deck-chrome:not(:hover):not(:focus-within) .deck-counter,
html:not([data-kbl-theme="dark"]) .deck-chrome:not(:hover):not(:focus-within) .deck-counter {
  /* Der Core blendet die eingeklappte Leiste über --paper mit 80 % ab. Auf
     Crystal ist das zu wenig Halt — hier trägt sie deckend. */
  background: var(--paper);
}
