/* ==========================================================================
   SpeakLord – Website
   Farben 1:1 aus der App: Themes/Dark.xaml („Studio Nacht“) und – über prefers-color-scheme –
   Themes/Light.xaml („Atelier Hell“). Schriften wie in der App, alle selbst gehostet.

   Gestaltungsregeln (bitte beibehalten):
   1. Gesprochenes steht in Serif kursiv (.said, .speech, .strike). Geschriebenes steht in Plus Jakarta Sans,
      Überschriften und Logo in Bricolage Grotesque, Zahlen und Tasten in JetBrains Mono.
      Die Serif-Schrift gibt es nur auf der Website (nicht in der App) und sonst nirgends – auch nicht in Überschriften.
   2. Korall (--rec) ist die Markenfarbe und das Aufnahme-Licht: der Punkt im Logo, der rechte Balken im Zeichen,
      das durchgestrichene „ähm“, die Aufnahme. Sonst nirgends.
      Indigo (--ai) nur für „KI arbeitet“. Hauptknöpfe und gewählte Chips in Tinte bzw. Elfenbein (--primary).
      Löschen und Fehler haben ein eigenes Rot (--danger) – nicht das Korall der Marke.
   3. Flache Flächen: eine Ebene Karten mit 1 px Linie, keine Körnung, keine Farbflecken, kein Verlaufstext.
   4. Kleinste Schrift (--faint) erreicht auf --bg, --card und --surface mindestens 4,5:1 – nicht auf --surface-3 setzen.
   ========================================================================== */

@font-face { font-family: "Bricolage"; src: url(fonts/bricolage-grotesque-var.woff2) format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Jakarta"; src: url(fonts/plus-jakarta-sans-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Jakarta"; src: url(fonts/plus-jakarta-sans-500.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Jakarta"; src: url(fonts/plus-jakarta-sans-600.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Jakarta"; src: url(fonts/plus-jakarta-sans-700.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Instrument"; src: url(fonts/instrument-serif-400.woff2) format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument"; src: url(fonts/instrument-serif-400-italic.woff2) format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "JBMono"; src: url(fonts/jetbrains-mono-var.woff2) format("woff2"); font-weight: 100 800; font-display: swap; }

/* ---------- Studio Nacht (Dark.xaml) */
:root {
  color-scheme: dark;
  --bg: #121210;            /* BgBrush */
  --sidebar: #171714;       /* SidebarBrush */
  --card: #1E1E1B;          /* SurfaceBrush – Karten */
  --surface: #252420;       /* Surface2Brush – Felder, Chips, Tasten */
  --surface-3: #2D2C27;     /* Surface3Brush / SurfaceHoverBrush */
  --pressed: #34332D;       /* SurfacePressedBrush */
  --line: #2C2B26;          /* LineBrush */
  --line-2: #3D3B34;        /* LineStrongBrush */
  --field: #7C786E;         /* Rand von Eingabefeldern, mind. 3:1 (ScrollThumbHoverBrush) */
  --text: #F4F2EC;          /* TextBrush */
  --text-2: #D8D4CB;        /* Fließtext auf Karten (ToggleKnobOffBrush) */
  --dim: #A7A399;           /* TextDimBrush */
  --faint: #928E84;         /* TextFaintBrush: kleinste Schrift, mind. 4,5:1 */
  --selection: rgba(129, 140, 248, .5);   /* TextSelectionBrush */

  --rec: #FF5B3E;           /* BrandRecBrush – Marke & Aufnahme */
  --rec-hover: #FF7359;     /* BrandRecHoverBrush */
  --rec-soft: rgba(255, 91, 62, .16);     /* BrandRecSoftBrush */
  --rec-text: #FF7359;      /* BrandRecTextBrush */

  --primary: #F4F2EC;       /* PrimaryActionBrush – Elfenbein */
  --primary-hover: #FFFFFF;
  --on-primary: #141412;    /* PrimaryActionTextBrush */

  --ai: #818CF8;            /* AiWorkingBrush – KI arbeitet */
  --ai-soft: rgba(129, 140, 248, .16);
  --ai-text: #9AA3FA;

  --ok: #34D399;            /* SuccessBrush */
  --ok-soft: rgba(52, 211, 153, .15);
  --ok-line: rgba(52, 211, 153, .42);
  --ok-text: #34D399;
  --warn: #FBBF24;          /* WarningBrush */
  --warn-soft: rgba(251, 191, 36, .15);
  --warn-line: rgba(251, 191, 36, .5);    /* WarningLineBrush */
  --warn-text: #FBBF24;
  --danger: #F87171;        /* DangerBrush – Löschen, Fehler */
  --danger-soft: rgba(248, 113, 113, .15);

  --hud: rgba(30, 30, 27, .95);           /* HudSurfaceBrush */
  --keycap: #252420;        /* KeycapBrush */
  --keycap-ledge: #090908;  /* KeycapLedgeBrush */
  --nav-bg: rgba(18, 18, 16, .88);
  --rim: rgba(255, 255, 255, .16);
  --shadow-md: 0 10px 36px rgba(0, 0, 0, .6);
  --shadow-hud: 0 14px 48px rgba(0, 0, 0, .7);

  --f-display: "Bricolage", "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
  --f-sans: "Jakarta", "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  --f-serif: "Instrument", "Iowan Old Style", Georgia, serif;
  --f-mono: "JBMono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 16px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

/* ---------- Atelier Hell (Light.xaml) – folgt der Einstellung des Systems */
@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --bg: #F5F3EE;
    --sidebar: #ECE9E1;
    --card: #FFFFFF;
    --surface: #F8F7F3;
    --surface-3: #E7E4DC;
    --pressed: #E2DED5;
    --line: #E2DFD6;
    --line-2: #D0CCC0;
    --field: #847F75;
    --text: #191815;
    --text-2: #2E2C27;
    --dim: #5D5950;
    --faint: #6B665C;
    --selection: rgba(88, 86, 214, .4);

    --rec: #E5482E;
    --rec-hover: #CF3B22;
    --rec-soft: rgba(229, 72, 46, .11);
    --rec-text: #BB351D;

    --primary: #1C1B18;     /* Tinte */
    --primary-hover: #2E2C27;
    --on-primary: #FAF9F6;

    --ai: #5856D6;
    --ai-soft: rgba(88, 86, 214, .12);
    --ai-text: #4F4DC4;

    --ok: #169362;
    --ok-soft: rgba(22, 147, 98, .12);
    --ok-line: rgba(22, 147, 98, .4);
    --ok-text: #0E744C;
    --warn: #C97308;
    --warn-soft: rgba(201, 115, 8, .12);
    --warn-line: rgba(201, 115, 8, .4);
    --warn-text: #9A5A00;
    --danger: #B42318;
    --danger-soft: rgba(180, 35, 24, .08);

    --hud: rgba(255, 255, 255, .95);
    --keycap: #FFFFFF;
    --keycap-ledge: #D0CCC0;
    --nav-bg: rgba(245, 243, 238, .88);
    --rim: rgba(255, 255, 255, .16);
    --shadow-md: 0 8px 28px rgba(25, 24, 21, .12);
    --shadow-hud: 0 12px 40px rgba(25, 24, 21, .22);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--f-sans); font-size: 17px; line-height: 1.6;
  overflow-x: hidden; -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--f-display); font-optical-sizing: auto; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
::selection { background: var(--selection); }
code, kbd, pre { font-family: var(--f-mono); }
code { font-size: .86em; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: .08em .4em; }
/* Tastenkappe wie in der App (KeycapBrush mit Kante) */
kbd {
  display: inline-block; font-size: .78em; font-weight: 600; line-height: 1;
  padding: .38em .55em .32em; margin: 0 .08em; border-radius: 7px;
  background: var(--keycap); border: 1px solid var(--line-2); border-bottom: 3px solid var(--keycap-ledge);
  color: var(--text); vertical-align: .1em;
}
/* Betonung im Fließtext: fett statt kursiv – Serif kursiv ist für Gesprochenes reserviert. */
em { font-style: normal; font-weight: 700; color: var(--text); }
/* Fokusring in Korall wie in der App (FocusRingBrush) */
:focus-visible { outline: 2px solid var(--rec); outline-offset: 3px; border-radius: 6px; }
.mute { color: var(--dim); }

/* ============================================================ Logo: Zeichen + Schriftzug „speaklord.“ */
/* Wie oben in der Seitenleiste der Einstellungen (Views/Controls/BrandGlyph.cs). Der Punkt ist das Aufnahme-Licht:
   Auf der Startseite zeigt er den Zustand der Demo (data-state) – Korall blinkend = Aufnahme, Indigo = KI. */
.glyph { flex: none; width: 1.17em; height: 1.17em; }
.glyph .g-sq { fill: var(--primary); }
.glyph .g-rim { fill: none; stroke: var(--rim); stroke-width: 1; }
.glyph .g-bar { fill: var(--on-primary); }
.glyph .g-acc { fill: var(--rec); }
.wordmark { font-family: var(--f-display); font-weight: 600; letter-spacing: -.03em; white-space: nowrap; }
.wordmark i { font-style: normal; color: var(--rec); transition: color .3s; }
.wordmark i[data-state="rec"] { animation: blink 1s steps(2) infinite; }
.wordmark i[data-state="ai"] { color: var(--ai); }
@keyframes blink { 50% { opacity: .35; } }

/* ============================================================ NAV */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 28px;
  padding: 14px var(--gutter);
  background: var(--nav-bg);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: .42em; text-decoration: none; font-size: 24px; line-height: 1; user-select: none; }
.brand .wordmark { margin-bottom: .08em; }
.nav-links { display: flex; gap: 24px; margin-left: auto; }
.nav-links a { text-decoration: none; color: var(--dim); font-size: 15px; font-weight: 500; white-space: nowrap; transition: color .2s; }
.nav-links a:hover, .nav-links a[aria-current] { color: var(--text); }
.nav-cta {
  flex: none; display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 700; font-size: 15px;
  padding: 9px 10px 9px 16px; border-radius: 12px; background: var(--primary); color: var(--on-primary);
  transition: background .2s;
}
/* Ohne Links (oder wenn sie auf schmalen Bildschirmen weg sind) rückt der Knopf nach rechts. */
.nav-cta { margin-left: auto; }
.nav-links ~ .nav-cta { margin-left: 0; }
.nav-cta:hover { background: var(--primary-hover); }
.nav-cta:has(.pill[hidden]) { padding-right: 16px; }   /* Versionsnummer noch nicht geladen */
.pill { font-family: var(--f-mono); font-size: 11.5px; font-weight: 600; padding: 3px 8px; border-radius: 8px; background: var(--on-primary); color: var(--primary); }
.nav-back { margin-left: auto; color: var(--dim); text-decoration: none; font-size: 15px; }
.nav-back:hover { color: var(--text); }

/* ============================================================ HERO */
.hero {
  position: relative; max-width: var(--wrap); margin: 0 auto;
  padding: clamp(48px, 8vh, 96px) var(--gutter) 110px;
  display: grid; grid-template-columns: 1fr 1.05fr; grid-template-rows: repeat(7, auto) 1fr;
  column-gap: clamp(32px, 5vw, 72px); align-items: start;
}
.hero-copy { display: contents; }
.hero .eyebrow, .hero h1 { grid-column: 1 / -1; }
.hero .lead, .hero .hero-cta, .hero .promises, .hero .keys, .hero .keys-hint { grid-column: 1; }
.hero .stage { grid-column: 2; grid-row: 3 / 9; margin-top: 34px; }

.eyebrow { margin: 0 0 24px; font-size: 15px; font-weight: 600; color: var(--dim); }
.eyebrow b { color: var(--text); font-weight: 600; }

h1 { margin: 0; font-weight: 700; letter-spacing: -.045em; line-height: .95; font-size: clamp(2.7rem, 7vw, 6.6rem); }
.h-line { display: block; white-space: nowrap; }

/* Das Markenzeichen: ein gesprochenes Füllwort, das beim Laden durchgestrichen wird. */
.strike {
  position: relative; display: inline-block;
  font-family: var(--f-serif); font-style: italic; font-weight: 400; letter-spacing: -.01em;
  font-size: 1.08em; line-height: .8; padding: 0 .06em; color: var(--rec);
  animation: strikeFade .5s 1.25s var(--ease) forwards;
}
.strike::after {
  content: ""; position: absolute; left: -.04em; right: -.04em; top: 56%; height: .075em;
  border-radius: 99px; background: var(--rec);
  transform: scaleX(0); transform-origin: 0 50%;
  animation: strikeLine .55s .75s var(--ease) forwards;
}
@keyframes strikeLine { to { transform: scaleX(1); } }
@keyframes strikeFade { to { color: color-mix(in srgb, var(--rec) 62%, transparent); } }

.lead { max-width: 31em; margin: 30px 0 0; font-size: clamp(17px, 1.35vw, 19.5px); color: var(--text-2); }

.hero-cta { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 18px; margin-top: 32px; }
.btn-dl {
  display: inline-flex; align-items: center; gap: 14px; text-decoration: none;
  font-family: var(--f-display); font-weight: 700; font-size: 19px; letter-spacing: -.02em;
  padding: 16px 26px 16px 22px; border-radius: 14px; background: var(--primary); color: var(--on-primary);
  transition: transform .2s var(--ease), background .2s;
}
.btn-dl:hover { transform: translateY(-2px); background: var(--primary-hover); }
.btn-dot { flex: none; width: 12px; height: 12px; border-radius: 50%; background: var(--rec); box-shadow: 0 0 0 4px var(--rec-soft); }
.btn-dl:hover .btn-dot { animation: blink 1s steps(2) infinite; }
.hero-cta-meta { font-family: var(--f-mono); font-size: 12.5px; color: var(--faint); }

.promises { display: flex; flex-wrap: wrap; gap: 6px 22px; list-style: none; margin: 18px 0 0; padding: 0; font-size: 15px; font-weight: 600; color: var(--text-2); }
.promises li::before { content: "✓"; margin-right: 7px; color: var(--ok-text); }

/* Reicht über den Inhalt hinaus, aber höchstens bis zum Bildschirmrand: Was darüber hinausragt, lässt Chrome auf
   Android trotz overflow-x am body seitlich verschieben. */
.hero-wave { position: absolute; left: max(-10vw, calc(50% - 50vw)); right: max(-10vw, calc(50% - 50vw)); top: 60%; height: 200px; z-index: -1; opacity: .45; pointer-events: none; }
.hero-wave svg { width: 100%; height: 100%; }
.hero-wave path { fill: none; stroke: var(--rec); stroke-opacity: .35; stroke-width: 1.3; }

/* kleine Zeile mit Aufnahme-Punkt – auch auf den Unterseiten */
.kicker { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 22px; font-size: 15px; font-weight: 600; color: var(--dim); }
.rec-dot { position: relative; width: 9px; height: 9px; border-radius: 50%; background: var(--rec); }
.rec-dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--rec); animation: ping 2s infinite; }
@keyframes ping { 0% { transform: scale(1); opacity: .55; } 80%, 100% { transform: scale(3.6); opacity: 0; } }

/* Tastenkappen wie unter „Allgemein & Hotkey“ */
.keys { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 40px; }
.plus { color: var(--faint); font-family: var(--f-mono); }
.key {
  font-family: var(--f-mono); font-weight: 600; font-size: 16px; color: var(--text); cursor: pointer;
  min-width: 74px; height: 62px; padding: 0 18px; border-radius: 12px;
  background: var(--keycap); border: 1px solid var(--line-2); border-bottom: 6px solid var(--keycap-ledge);
  transition: transform .08s, border-bottom-width .08s, background .2s, color .2s, border-color .2s;
}
.key-space { min-width: 180px; }
.key:hover { background: var(--surface-3); }
.key.is-down { transform: translateY(4px); border-bottom-width: 2px; background: var(--rec-soft); border-color: var(--rec); }
.keys-hint { margin: 16px 0 0; font-size: 14px; color: var(--faint); min-height: 1.6em; }
.keys-hint b { color: var(--text); font-weight: 600; }

/* Bühne */
.stage { position: relative; padding-bottom: 170px; }
.window {
  position: relative; border-radius: 12px; overflow: hidden;
  background: var(--card); border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
}
.window-bar { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; background: var(--surface); border-bottom: 1px solid var(--line); }
.wb-title { font-size: 13px; color: var(--dim); }
.wb-ctrl { display: flex; gap: 14px; }
.wb-ctrl i { width: 10px; height: 10px; border: 1.5px solid var(--field); border-radius: 2px; }
.wb-ctrl i:first-child { border-width: 0 0 1.5px; border-radius: 0; height: 6px; }
.window-body { min-height: 250px; padding: 22px 22px 28px; font-size: 16px; line-height: 1.65; white-space: pre-wrap; word-wrap: break-word; color: var(--text-2); }
.ed-pre { color: var(--faint); }
.ed-out .fresh { background: var(--ok-soft); border-radius: 3px; transition: background 1.6s; }
.ed-out .fresh.settled { background: transparent; }
.ed-out .md-h, .mo-text .md-h { color: var(--text); font-weight: 700; }
.ed-out .md-sub, .mo-text .md-sub { color: var(--dim); font-weight: 600; }
.caret { display: inline-block; width: 2px; height: 1.15em; margin-left: 1px; vertical-align: -0.18em; background: var(--text); animation: caret 1.05s steps(2) infinite; }
@keyframes caret { 50% { opacity: 0; } }

.speech {
  position: absolute; left: 6%; right: 10%; bottom: 150px;
  font-family: var(--f-serif); font-style: italic; font-size: 22px; line-height: 1.35; color: var(--text);
  padding: 14px 18px; border-radius: 16px 16px 16px 4px;
  background: linear-gradient(var(--rec-soft), var(--rec-soft)), var(--card); border: 1px dashed var(--rec);
  box-shadow: var(--shadow-md);
  opacity: 0; transform: translateY(8px); transition: opacity .3s, transform .3s var(--ease); pointer-events: none;
}
.speech.show { opacity: 1; transform: none; }
.speech .filler { color: var(--rec-text); text-decoration: line-through; text-decoration-color: var(--rec); text-decoration-thickness: 2px; }

/* Aufnahme-Popup – Nachbau von RecordingHudWindow.xaml */
.hud {
  position: absolute; left: 50%; bottom: 0; width: min(510px, 100%);
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  /* Im Ruhezustand auch für Tastatur und Vorleseprogramme weg – nicht nur durchsichtig. */
  visibility: hidden;
  padding: 14px; border-radius: 22px;
  background: var(--hud); border: 1px solid var(--line-2);
  box-shadow: var(--shadow-hud);
  transition: opacity .25s, transform .35s var(--ease), visibility 0s .35s;
}
.hud[data-state="rec"], .hud[data-state="proc"], .hud[data-state="done"] {
  opacity: 1; transform: translate(-50%, 0); pointer-events: auto; visibility: visible;
  transition: opacity .25s, transform .35s var(--ease), visibility 0s 0s;
}
.hud-rec { display: flex; align-items: center; }
/* Stopp in Korall, mit sanft pulsierendem Hof (das Aufnahme-Licht) */
.hud-stopwrap { position: relative; flex: none; width: 44px; height: 44px; }
.hud-halo { position: absolute; inset: 0; border-radius: 16px; background: var(--rec-soft); animation: halo 1.1s ease-in-out infinite alternate; }
@keyframes halo { from { transform: scale(1); } to { transform: scale(1.22); } }
.hud-stop {
  position: relative; width: 44px; height: 44px; border-radius: 16px; border: 0; padding: 0; cursor: pointer;
  background: var(--rec); display: grid; place-items: center; transition: background .15s;
}
.hud-stop:hover { background: var(--rec-hover); }
.hud-stop i { width: 14px; height: 14px; border-radius: 3px; background: #FFFFFF; }
.hud-mid { flex: 1; min-width: 0; margin: 0 12px 0 14px; }
.bars { height: 28px; display: flex; align-items: center; gap: 4px; }
.bars span { flex: 1; min-width: 2px; height: 18%; border-radius: 99px; background: var(--rec); transition: height .15s ease-out; }
.bars span:nth-child(odd) { opacity: .95; }
.bars span:nth-child(even) { opacity: .65; }
.hud-meta { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 5px; }
.hud-src { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--dim); white-space: nowrap; }
.hud-src svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hud-timer { font-family: var(--f-mono); font-weight: 600; font-size: 13px; font-variant-numeric: tabular-nums; }
.hud-x {
  flex: none; width: 36px; height: 36px; border-radius: 12px; border: 0; padding: 0; cursor: pointer;
  background: var(--surface); color: var(--dim); display: grid; place-items: center; transition: background .15s, color .15s;
}
.hud-x:hover { background: var(--surface-3); color: var(--text); }
.hud-x svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.hud-foot { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.hud-chips { flex: 1; min-width: 0; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.hud-chips::-webkit-scrollbar { display: none; }
.hud-esc { flex: none; display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--faint); }
.hud-esc kbd { font-size: 10px; padding: .3em .45em .25em; border-bottom-width: 2px; }
.hud-proc { display: none; align-items: center; gap: 14px; min-height: 40px; font-size: 14px; font-weight: 500; }
.hud-tile { flex: none; width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; background: var(--ai-soft); transition: background .3s; }
.hud-check { display: none; color: var(--ok-text); font-weight: 700; font-size: 18px; line-height: 1; }
.hud[data-state="proc"] .hud-rec, .hud[data-state="proc"] .hud-foot,
.hud[data-state="done"] .hud-rec, .hud[data-state="done"] .hud-foot { display: none; }
.hud[data-state="proc"] .hud-proc, .hud[data-state="done"] .hud-proc { display: flex; }
.hud[data-state="done"] .hud-tile { background: var(--ok-soft); }
.hud[data-state="done"] .spinner { display: none; }
.hud[data-state="done"] .hud-check { display: block; }
.spinner { width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid var(--ai-soft); border-top-color: var(--ai); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
/* Von oben verankert: Bricht der Hinweis auf schmalen Bildschirmen um, wächst er nach unten statt ins Popup. */
.stage-note { position: absolute; left: 0; right: 0; top: calc(100% + 22px); margin: 0; text-align: center; font-size: 13px; color: var(--faint); }

/* Modus-Chips wie im Popup: ruhig, der gewählte in Tinte bzw. Elfenbein (Chip / ChipActive) */
.chip {
  font-family: var(--f-sans); font-size: 12.5px; font-weight: 500; white-space: nowrap; cursor: pointer;
  padding: 4px 11px; border-radius: 8px; color: var(--dim);
  background: transparent; border: 1px solid transparent;
  transition: background .2s, color .2s, border-color .2s, transform .15s;
}
.chip:hover { color: var(--text); background: var(--surface-3); }
.chip:active { transform: scale(.96); }
.chip.is-on { background: var(--primary); color: var(--on-primary); font-weight: 600; }

/* ============================================================ SECTIONS */
.section { max-width: var(--wrap); margin: 0 auto; padding: clamp(96px, 14vh, 160px) var(--gutter) 0; }
.sec-head { max-width: 860px; margin-bottom: 48px; }
.sec-head h2, .page-head h1 {
  margin: 0; font-size: clamp(2.1rem, 4.4vw, 3.8rem); line-height: 1.02; letter-spacing: -.04em; font-weight: 700;
}
.sec-head p { margin: 20px 0 0; max-width: 40em; color: var(--text-2); font-size: 18px; }
.sec-head p a, .more a { color: var(--text); text-underline-offset: 3px; text-decoration-color: var(--field); }
.sec-head p a:hover, .more a:hover { text-decoration-color: currentColor; }
.more { margin: 22px 0 0; font-weight: 600; }

.card { padding: clamp(20px, 2.6vw, 30px); border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); }

.said { font-family: var(--f-serif); font-style: italic; font-size: 22px; line-height: 1.38; color: var(--text); margin: 6px 0 0; }
.said-sm { font-size: 20px; }
.said-lg { font-size: clamp(23px, 2.3vw, 29px); }
.said .filler { color: var(--rec-text); text-decoration: line-through; text-decoration-thickness: 2px; text-decoration-color: var(--rec); }
.label { display: block; font-size: 13px; font-weight: 600; color: var(--faint); }

/* ---------- Ergebnisse (Modi) */
.modes { display: grid; grid-template-columns: 1fr 1.25fr; grid-template-rows: auto 1fr; gap: 22px 40px; }
.modes-source { grid-row: span 2; align-self: start; }
.modes-switch { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-lg { font-size: 14.5px; padding: 8px 15px; border-radius: 10px; border-color: var(--line-2); }
.chip-lg.is-on { border-color: var(--primary); }
.chip-custom { border-style: dashed; }
.modes-out { border-radius: 14px; background: var(--bg); border: 1px solid var(--line); padding: 20px 22px; min-height: 270px; display: flex; flex-direction: column; }
.mo-hint { margin: 0 0 14px; font-size: 15px; font-weight: 600; color: var(--dim); }
.mo-text { flex: 1; margin: 0; font-family: var(--f-sans); font-size: 16.5px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word; color: var(--text-2); }

/* ---------- Umschreiben */
.feature { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(24px, 4vw, 56px); align-items: center; margin-top: 18px; }
.feature h3 { margin: 0 0 12px; font-size: clamp(24px, 2.6vw, 32px); line-height: 1.1; letter-spacing: -.03em; font-weight: 700; }
.feature p { margin: 0; color: var(--text-2); }
.edit-demo { padding: 18px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line); }
/* Edit-Modus: warmer Streifen wie im Popup */
.edit-badge { display: inline-block; font-size: 12.5px; font-weight: 600; color: var(--warn-text); padding: 4px 10px; border-radius: 10px; background: var(--warn-soft); border: 1px solid var(--warn-line); }
.edit-text { margin: 14px 0 8px; font-size: 16px; }
.edit-text mark { background: var(--selection); color: var(--text); padding: 1px 0; transition: background .5s; }
.edit-text mark.done { background: var(--ok-soft); }
.btn-ghost {
  margin-top: 14px; font: 600 14px var(--f-sans); color: var(--text); cursor: pointer;
  padding: 8px 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line-2);
}
.btn-ghost:hover { background: var(--surface-3); }
.btn-ghost:disabled { opacity: .5; cursor: default; }

/* ---------- Meetings */
.meet { display: grid; grid-template-columns: 1.1fr 1fr; gap: 18px; }
.lanes, .transcript, .rename { border-radius: var(--radius); border: 1px solid var(--line); background: var(--card); }
.lanes { position: relative; padding: 22px 22px 26px; overflow: hidden; }
.lanes-head { display: flex; justify-content: space-between; gap: 10px; font-family: var(--f-mono); font-size: 12px; color: var(--faint); margin-bottom: 20px; }
.lane { display: grid; grid-template-columns: 110px 1fr; align-items: center; gap: 14px; margin-top: 14px; }
.lane-name { font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lane-rename { color: var(--warn-text); }
.lane-track { position: relative; height: 34px; border-radius: 8px; background: repeating-linear-gradient(90deg, var(--line) 0 2px, transparent 2px 8px); }
.lane-track i { position: absolute; top: 4px; bottom: 4px; border-radius: 6px; opacity: .85; }
/* Sprecherfarben: neutral, Erfolg, Warnung – Korall und Indigo bleiben Aufnahme und KI vorbehalten */
.lane[data-sp="a"] i { background: var(--dim); }
.lane[data-sp="b"] i { background: var(--ok); }
.lane[data-sp="c"] i { background: var(--warn); }
.lane-track i::after { content: ""; position: absolute; inset: 6px 8px; background: repeating-linear-gradient(90deg, rgba(0,0,0,.28) 0 2px, transparent 2px 5px); mask: linear-gradient(0deg, transparent, #000 30%, #000 70%, transparent); }
.playhead { position: absolute; top: 56px; bottom: 18px; left: calc(22px + 110px + 14px); width: 2px; background: var(--rec); border-radius: 2px; }
.transcript { grid-row: span 2; padding: 24px; display: flex; flex-direction: column; gap: 4px; }
.transcript > p { margin: 0; padding: 10px 12px; border-radius: 10px; font-size: 16px; color: var(--dim); transition: background .3s, color .3s; border-left: 3px solid transparent; }
.transcript > p.active { background: var(--surface); color: var(--text); }
.transcript > p[data-sp="a"] { border-left-color: var(--dim); }
.transcript > p[data-sp="b"] { border-left-color: var(--ok); }
.transcript > p[data-sp="c"] { border-left-color: var(--warn); }
.transcript b { color: var(--text); }
.proto { margin-top: auto; font-family: var(--f-mono); font-size: 13px; line-height: 1.75; padding: 16px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); color: var(--text-2); }
.proto p { margin: 0; }
.mp-h { color: var(--text); font-weight: 700; }
[data-speaker-name].flash { animation: flash 1.2s var(--ease); }
@keyframes flash { 0% { background: var(--warn-line); } 100% { background: transparent; } }
.rename { padding: 22px; }
.rename label { display: block; font-weight: 700; margin-bottom: 12px; }
.rename-row { display: flex; gap: 8px; }
.rename input {
  flex: 1; min-width: 0; font: 500 16px var(--f-sans); color: var(--text);
  padding: 11px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--field);
}
.rename input::placeholder, .form input::placeholder, .form textarea::placeholder { color: var(--faint); opacity: 1; }
.rename input:focus { outline: none; border-color: var(--rec); box-shadow: 0 0 0 3px var(--rec-soft); }
.rename button { font: 700 15px var(--f-sans); cursor: pointer; padding: 0 16px; border-radius: 12px; border: 0; background: var(--primary); color: var(--on-primary); }
.rename button:hover { background: var(--primary-hover); }
.rename-note { margin: 12px 0 0; font-size: 14px; color: var(--faint); }

.meet-facts { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 48px; border-top: 1px solid var(--line); }
.fact { padding: 26px 24px 0 0; }
.fact + .fact { padding-left: 24px; border-left: 1px solid var(--line); }
.fact-big { display: block; font-family: var(--f-display); font-size: clamp(44px, 5vw, 68px); font-weight: 700; line-height: 1; letter-spacing: -.045em; }
.fact p { margin: 10px 0 0; font-size: 15px; color: var(--dim); }
.consent { margin: 34px 0 0; max-width: 46em; font-size: 14.5px; color: var(--dim); }
.consent b { color: var(--text); }

/* ---------- Deine Daten */
.flow-switch { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-bottom: 22px; font-weight: 600; }
.flowmap { display: grid; grid-template-columns: 1.1fr .9fr 1fr; align-items: center; margin-bottom: 18px; }
.fm-node { position: relative; z-index: 1; padding: 22px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--card); }
.fm-k { display: block; font-size: 13px; font-weight: 700; margin-bottom: 8px; }
.fm-you { border-color: var(--ok-line); }
.fm-you .fm-k { color: var(--ok-text); }
.fm-you ul { margin: 0; padding: 0; list-style: none; }
.fm-you li { padding: 7px 0 7px 22px; position: relative; font-size: 15.5px; border-top: 1px dashed var(--line); }
.fm-you li:first-child { border-top: 0; }
.fm-you li::before { content: "✓"; position: absolute; left: 0; color: var(--ok-text); }
.fm-api .fm-k { color: var(--dim); }
.fm-node p { margin: 0; font-size: 15px; color: var(--dim); }
.fm-wire { position: relative; height: 2px; margin: 0 -1px; }
.fm-wire span { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); white-space: nowrap; font-family: var(--f-mono); font-size: 11.5px; color: var(--dim); background: var(--bg); padding: 2px 8px; border-radius: 6px; }
.fm-wire-main { grid-column: 2; grid-row: 1; background: var(--line-2); }
/* Der wandernde Punkt ist deine Aufnahme – deshalb Korall. */
.fm-wire-main::after { content: ""; position: absolute; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--rec); animation: travel 2.4s linear infinite; }
@keyframes travel { from { left: 0; } to { left: calc(100% - 8px); } }
.fm-api { grid-column: 3; grid-row: 1; }
.flowmap .fm-node, .flowmap .fm-wire { transition: opacity .4s, box-shadow .5s, border-color .4s; }
.flowmap[data-where="offline"] .fm-wire-main { height: 0; background: none; border-top: 2px dashed var(--line-2); }
.flowmap[data-where="offline"] .fm-wire-main::after { display: none; }
.flowmap[data-where="offline"] .fm-api { opacity: .55; border-style: dashed; }
.flowmap[data-where="offline"] .fm-you { box-shadow: 0 0 0 4px var(--ok-soft); }
.fm-you li[data-when="offline"] { color: var(--ok-text); font-weight: 600; }

.where-sum { margin: 0 0 40px; padding: 18px 22px; border-radius: 14px; border: 1px dashed var(--line-2); color: var(--text-2); font-size: 16px; }
.where-sum p { margin: 0; }
.where-sum b { color: var(--text); }
.where-sum a { color: var(--text); text-underline-offset: 3px; text-decoration-color: var(--field); }

.priv-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.priv { padding: 22px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); }
.priv h3 { margin: 0 0 8px; font-size: 18px; letter-spacing: -.01em; font-weight: 600; }
.priv p { margin: 0; font-size: 15px; color: var(--dim); }
.priv-off { border-color: var(--ok-line); }

/* Ein Schalter, zwei Zustände: Elemente mit data-when zeigen sich nur im passenden Zustand ihres data-where-Elternteils. */
[data-where="online"] [data-when="offline"], [data-where="offline"] [data-when="online"] { display: none; }

/* Vereinfachter Schalter auf der Startseite: Segmente, das gewählte in Tinte bzw. Elfenbein */
.where-switch { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line-2); }
.where-btn {
  font: 600 14.5px var(--f-sans); color: var(--dim); cursor: pointer;
  padding: 10px 16px; border: 0; border-radius: 10px; background: transparent;
  transition: background .25s, color .25s, transform .15s;
}
.where-btn:hover { color: var(--text); }
.where-btn:active { transform: scale(.97); }
.where-btn.is-on { background: var(--primary); color: var(--on-primary); }

/* ---------- Für wen */
.fit { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.fit h3 { margin: 0 0 12px; font-size: 20px; letter-spacing: -.02em; font-weight: 600; }
.fit ul { list-style: none; margin: 0; padding: 0; }
.fit li { position: relative; padding: 11px 0 11px 30px; border-top: 1px dashed var(--line); color: var(--text-2); font-size: 16px; }
.fit li:first-child { border-top: 0; }
.fit li::before { position: absolute; left: 2px; font-weight: 700; }
.fit-yes { border-color: var(--ok-line); }
.fit-yes li::before { content: "✓"; color: var(--ok-text); }
.fit-no li::before { content: "✕"; color: var(--faint); }
.maker { display: flex; gap: 18px; align-items: flex-start; margin-top: 14px; }
.maker .glyph { width: 46px; height: 46px; }
.maker p { margin: 0; color: var(--text-2); max-width: 52em; }
.maker b { color: var(--text); }
.maker a { color: var(--text); text-underline-offset: 3px; text-decoration-color: var(--field); }

/* ---------- FAQ */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; position: relative;
  padding: 22px 56px 22px 0; font-family: var(--f-display); font-size: clamp(18px, 1.8vw, 22px); font-weight: 600; letter-spacing: -.02em;
  transition: color .2s;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 20px; height: 20px; margin-top: -10px;
  background:
    linear-gradient(var(--text), var(--text)) center / 100% 2px no-repeat,
    linear-gradient(var(--text), var(--text)) center / 2px 100% no-repeat;
  transition: transform .35s var(--ease);
}
.faq details[open] summary::after { transform: rotate(135deg); }
.faq summary:hover { color: var(--dim); }
.faq details p { margin: -6px 0 24px; max-width: 46em; color: var(--text-2); }
.faq details p + p, .faq details ul + p { margin-top: -10px; }
.faq details ul { margin: -12px 0 24px; padding-left: 1.25em; max-width: 46em; color: var(--text-2); }
.faq details li { margin-bottom: .4em; }
.faq details li::marker { color: var(--faint); }
.faq details b { color: var(--text); }
.faq details a { color: var(--text); text-underline-offset: 3px; text-decoration-color: var(--field); }

/* ---------- Download */
.download { padding: clamp(110px, 16vh, 170px) var(--gutter) 110px; }
.dl-inner {
  max-width: var(--wrap); margin: 0 auto; text-align: center;
  padding: clamp(40px, 6vw, 80px) clamp(20px, 4vw, 60px); border-radius: 24px;
  background: var(--card); border: 1px solid var(--line);
}
.dl-inner .kicker { margin-bottom: 18px; }
.dl-inner h2 { margin: 0 auto; font-size: clamp(2.5rem, 6vw, 5.2rem); line-height: .98; letter-spacing: -.045em; font-weight: 700; max-width: 12em; }
.dl-actions { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-top: 40px; }
.btn-big {
  display: inline-flex; align-items: center; gap: 16px; text-decoration: none; text-align: left;
  padding: 18px 34px 18px 26px; border-radius: 16px; background: var(--primary); color: var(--on-primary);
  transition: transform .2s var(--ease), background .2s;
}
.btn-big:hover { transform: translateY(-2px); background: var(--primary-hover); }
.btn-big:hover .btn-dot { animation: blink 1s steps(2) infinite; }
.btn-big-t { display: flex; flex-direction: column; gap: 2px; }
.btn-big-k { font-family: var(--f-display); font-size: 23px; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; }
.btn-big-s { font-family: var(--f-mono); font-size: 12.5px; opacity: .75; }
.btn-alt { font-size: 15px; color: var(--dim); text-decoration: none; border-bottom: 1px dashed var(--line-2); }
.btn-alt:hover { color: var(--text); }
.dl-note { margin: 0; max-width: 34em; font-size: 14px; color: var(--dim); }
.js .dl-note { display: none; }          /* mit JavaScript erst zeigen, wenn latest.json fehlt */
.js .dl-note.show { display: block; }
.dl-promises { justify-content: center; margin-top: 4px; }
/* Eine Spalte, solange „Neu in dieser Version“ noch nicht aus latest.json gefüllt ist; danach zwei. */
.dl-meta { display: grid; grid-template-columns: 1fr; max-width: 420px; margin: 48px auto 0; gap: 1px; text-align: left; background: var(--line); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.dl-meta:where(.two) { grid-template-columns: 1fr 1fr; max-width: 820px; }
.dl-meta > div { background: var(--bg); padding: 20px; }
.dl-meta span { font-size: 13px; font-weight: 700; color: var(--faint); }
.dl-meta p { margin: 6px 0 0; font-size: 14.5px; color: var(--text-2); }

/* ---------- Footer */
.foot { max-width: var(--wrap); margin: 0 auto; padding: 30px var(--gutter) 50px; border-top: 1px solid var(--line); color: var(--faint); font-size: 14px; }
.foot-gap { margin-top: 110px; }
.foot-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 26px; }
.foot-brand { display: inline-flex; align-items: center; gap: .42em; font-size: 22px; line-height: 1; color: var(--text); }
.foot-links { margin-left: auto; display: flex; flex-wrap: wrap; gap: 6px 22px; }
.foot-links a { color: var(--text); text-decoration: none; font-weight: 600; border-bottom: 1px solid var(--line-2); padding-bottom: 1px; }
.foot-links a:hover, .foot-links a[aria-current] { border-color: var(--text); }
.foot-egg { margin-left: auto; font-family: var(--f-mono); font-size: 12px; opacity: .55; letter-spacing: .1em; }
.foot-small { display: flex; flex-wrap: wrap; gap: 8px 26px; margin: 14px 0 0; font-size: 13px; }

/* ============================================================ HILFE-SEITE */
.page-head { max-width: var(--wrap); margin: 0 auto; padding: clamp(48px, 8vh, 90px) var(--gutter) 0; }
.page-head p { margin: 20px 0 0; max-width: 40em; color: var(--text-2); font-size: 18px; }
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.toc a { text-decoration: none; font-weight: 600; font-size: 15px; padding: 8px 14px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--card); color: var(--text); }
.toc a:hover { background: var(--surface-3); }
.help-section { padding-top: clamp(72px, 10vh, 110px); }

.steps { list-style: none; margin: 0; padding: 0; display: grid; }
.step { display: grid; grid-template-columns: clamp(64px, 9vw, 120px) 1fr; gap: 24px; padding: 34px 0; border-top: 1px solid var(--line); }
.step:last-child { border-bottom: 1px solid var(--line); }
.step-no { font-family: var(--f-display); font-size: clamp(56px, 7vw, 96px); font-weight: 700; line-height: .85; letter-spacing: -.05em; color: var(--line-2); transition: color .5s; }
.step.in .step-no { color: var(--text); }
.step h3 { margin: 0 0 10px; font-size: clamp(24px, 2.6vw, 32px); letter-spacing: -.03em; line-height: 1.1; font-weight: 700; }
.step p { margin: 0 0 10px; max-width: 42em; color: var(--text-2); }
.step p a { color: var(--text); text-underline-offset: 3px; text-decoration-color: var(--field); }
.step-aside { font-size: 15px; color: var(--faint) !important; }
/* Das Tray-Symbol im Fließtext */
.tray-hint { display: flex; align-items: center; gap: 12px; }
.tray-hint .glyph { width: 28px; height: 28px; }
.recipe { margin-top: 16px; max-width: 40em; padding: 16px 18px; border-radius: 12px; background: var(--ok-soft); border: 1px solid var(--ok-line); }
.recipe-tag { font-size: 13px; font-weight: 700; color: var(--ok-text); }
.recipe p { margin: 8px 0 0; font-size: 15.5px; color: var(--text); }

.ways { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 20px; max-width: 920px; align-items: start; }
.way { padding: 22px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line-2); }
.way-offline { border-color: var(--ok-line); }
.way-tag { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--dim); }
.dot { width: 9px; height: 9px; border-radius: 50%; }
.dot-on { background: var(--dim); } .dot-ok { background: var(--ok); } .dot-rec { background: var(--rec); }
.way h4 { margin: 10px 0 8px; font-size: 21px; letter-spacing: -.02em; line-height: 1.15; font-weight: 600; }
.way p { font-size: 15.5px; }
.way-steps { margin: 0 0 12px; padding-left: 1.3em; color: var(--text-2); font-size: 15.5px; }
.way-steps li { margin-bottom: .5em; padding-left: .2em; }
.way-steps li::marker { color: var(--ok-text); font-weight: 700; }
.way-steps b { color: var(--text); }

.cheats { margin-top: 48px; }
.cheats-title { margin: 0 0 14px; font-size: 22px; letter-spacing: -.02em; font-weight: 600; }
.cheats dl { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 40px; }
.cheats dl > div { display: grid; grid-template-columns: minmax(150px, 1fr) 1.3fr; gap: 16px; padding: 13px 0; border-bottom: 1px dashed var(--line); align-items: baseline; }
.cheats dt { font-weight: 700; font-size: 15px; }
.cheats dd { margin: 0; color: var(--dim); font-size: 15px; }

/* Nachbau der Karte „Wo arbeitet die KI?“ unter KI / API: zwei Auswahlkarten (ChoiceCard) */
.where { padding: clamp(20px, 3vw, 32px); border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); }
.where-title { display: block; margin-bottom: 16px; font-family: var(--f-display); font-weight: 600; font-size: clamp(20px, 2.2vw, 24px); letter-spacing: -.02em; }
.where-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice {
  display: grid; grid-template-columns: auto 1fr; gap: 0 12px; text-align: left; cursor: pointer;
  font: inherit; color: var(--text); padding: 12px 14px; border-radius: 14px;
  background: var(--surface); border: 1.5px solid var(--line);
  transition: border-color .2s, background .2s;
}
.choice:hover { border-color: var(--line-2); }
.choice::before {
  content: ""; grid-row: 1 / 3; width: 18px; height: 18px; margin-top: 2px; border-radius: 50%;
  border: 1.5px solid var(--line-2); box-sizing: border-box;
}
.choice.is-on { background: var(--card); border-color: var(--primary); }
.choice.is-on::before { border-color: var(--primary); background: radial-gradient(circle, var(--primary) 0 4px, transparent 4.5px); }
.choice-k { display: inline-flex; align-items: center; gap: 9px; font-weight: 600; font-size: 15px; }
.choice-k svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.choice-s { grid-column: 2; margin-top: 6px; font-size: 13.5px; line-height: 1.45; color: var(--dim); }
.where-panels { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 22px; }
.js .where-panels { grid-template-columns: 1fr; }
.js .where-panel { animation: whereIn .4s var(--ease); }
@keyframes whereIn { from { opacity: 0; transform: translateY(10px); } }
.where-panel h3 { margin: 0 0 10px; font-size: clamp(21px, 2.4vw, 28px); line-height: 1.15; letter-spacing: -.025em; font-weight: 600; }
.where-panel ul { list-style: none; margin: 0; padding: 0; }
.where-panel li { position: relative; padding: 11px 0 11px 28px; border-top: 1px dashed var(--line); font-size: 16.5px; color: var(--text-2); }
.where-panel li::before { content: "✓"; position: absolute; left: 2px; color: var(--dim); font-weight: 700; }
.where-panel[data-when="offline"] li::before { color: var(--ok-text); }
.where-note { margin: 18px 0 0; max-width: 60em; font-size: 14px; color: var(--faint); }

.sub-title { margin: 64px 0 22px; font-size: clamp(24px, 2.8vw, 34px); font-weight: 700; letter-spacing: -.03em; line-height: 1.1; }
.tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.tier { display: flex; flex-direction: column; padding: 24px 22px 18px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--card); }
.tier-best { border-color: var(--ok-line); }
.tier-low { border-style: dashed; border-color: var(--line-2); }
.tier-badge { align-self: flex-start; font-size: 12.5px; font-weight: 700; padding: 4px 9px; border-radius: 8px; border: 1px solid var(--line-2); color: var(--dim); }
.tier-best .tier-badge { color: var(--ok-text); border-color: var(--ok-line); background: var(--ok-soft); }
.tier-low .tier-badge { color: var(--warn-text); border-color: var(--warn-line); background: var(--warn-soft); }
.tier h4 { margin: 16px 0 8px; font-size: 22px; line-height: 1.12; letter-spacing: -.025em; font-weight: 600; }
.tier p { margin: 0 0 18px; font-size: 15.5px; color: var(--dim); }
.tier dl { margin: auto 0 0; }
.tier dl div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px dashed var(--line); font-size: 14.5px; }
.tier dt { color: var(--dim); }
.tier dd { margin: 0; font-family: var(--f-mono); font-size: 13px; color: var(--text); text-align: right; }
.tiers-note { margin: 16px 0 0; font-size: 14.5px; color: var(--dim); }

.speed { margin-top: 48px; }
.speed-title { margin: 0 0 14px; font-size: 22px; letter-spacing: -.02em; font-weight: 600; }
.speed table { width: 100%; border-collapse: collapse; }
.speed th, .speed td { text-align: left; padding: 14px 18px 14px 0; border-bottom: 1px dashed var(--line); font-size: 15.5px; vertical-align: top; }
.speed thead th { font-size: 13px; font-weight: 700; color: var(--dim); border-bottom: 1px solid var(--line-2); }
.speed tbody th { width: 46%; font-weight: 600; color: var(--text); }
.speed td { color: var(--dim); }
.speed td b { color: var(--ok-text); font-weight: 700; }
.speed-note { margin: 16px 0 0; max-width: 70em; font-size: 13.5px; color: var(--dim); }

.needs { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.need h3 { margin: 0 0 12px; font-size: 19px; letter-spacing: -.02em; font-weight: 600; }
.need ul { margin: 0; padding-left: 1.2em; color: var(--dim); font-size: 15.5px; }
.need li { margin-bottom: .55em; }
.need li:last-child { margin-bottom: 0; }
.need li::marker { color: var(--faint); }

/* ============================================================ Rechtliches & Kontakt */
.legal { max-width: 800px; margin: 0 auto; padding: clamp(48px, 8vh, 90px) var(--gutter) 110px; }
.legal h1 { font-size: clamp(2.6rem, 6.4vw, 4.6rem); letter-spacing: -.04em; line-height: 1.12; }
.legal h1 em { color: var(--dim); font-weight: 700; }
.legal .intro { margin: 22px 0 0; font-size: 19px; color: var(--text-2); }
.legal h2 { margin: 2.4em 0 .5em; padding-top: 1.1em; border-top: 1px solid var(--line); font-size: clamp(22px, 2.4vw, 28px); letter-spacing: -.025em; line-height: 1.2; font-weight: 600; }
.legal h3 { margin: 1.7em 0 .4em; font-size: 18.5px; letter-spacing: -.01em; font-weight: 600; }
.legal p, .legal li { color: var(--text-2); }
.legal p { margin: 0 0 1em; }
.legal ul { margin: 0 0 1em; padding-left: 1.25em; }
.legal li { margin-bottom: .4em; }
.legal li::marker { color: var(--faint); }
.legal strong { color: var(--text); }
.legal a { color: var(--text); text-underline-offset: 3px; text-decoration-color: var(--field); }
.legal address { font-style: normal; margin: 0 0 1em; padding: 18px 20px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); color: var(--text); line-height: 1.7; }
.legal .summary { margin: 30px 0 0; padding: 20px 22px; border-radius: 14px; background: var(--ok-soft); border: 1px solid var(--ok-line); }
.legal .summary h2 { margin: 0 0 .5em; padding: 0; border: 0; font-size: 20px; color: var(--ok-text); }
.legal .summary li { color: var(--text); }
.legal .summary ul { margin-bottom: 0; }
.legal .stand { margin-top: 3em; font-family: var(--f-mono); font-size: 12.5px; color: var(--faint); }

.form { display: grid; gap: 18px; margin-top: 34px; }
.form label { display: grid; gap: 7px; font-weight: 600; font-size: 15.5px; color: var(--text); }
.form label small { font-weight: 400; color: var(--faint); font-size: 13.5px; }
.form input, .form textarea {
  width: 100%; font: 400 16.5px/1.5 var(--f-sans); color: var(--text);
  padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--field);
}
.form textarea { min-height: 190px; resize: vertical; }
.form input:focus, .form textarea:focus { outline: none; border-color: var(--rec); box-shadow: 0 0 0 3px var(--rec-soft); }
.form [aria-invalid="true"] { border-color: var(--danger); }
.form .field-err { font-weight: 600; font-size: 14px; color: var(--danger); }
.form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-note { margin: 0; font-size: 14px; color: var(--faint) !important; }
.btn-send {
  justify-self: start; font: 700 17px var(--f-sans); cursor: pointer; letter-spacing: -.01em;
  padding: 14px 30px; border: 0; border-radius: 14px; background: var(--primary); color: var(--on-primary);
  transition: transform .2s var(--ease), background .2s;
}
.btn-send:hover { background: var(--primary-hover); transform: translateY(-2px); }
.btn-send:disabled { opacity: .6; cursor: default; background: var(--primary); transform: none; }
.notice { margin: 28px 0 0; padding: 16px 18px; border-radius: 14px; font-weight: 600; }
.notice-ok { background: var(--ok-soft); border: 1px solid var(--ok-line); color: var(--text) !important; }
.notice-err { background: var(--danger-soft); border: 1px solid var(--danger); color: var(--text) !important; }
.notice ul { margin: 8px 0 0; font-weight: 400; }
.notice li { color: inherit; }

/* ---------- Easter Egg */
#confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 200; }
.micdrop { position: fixed; left: 50%; top: 0; z-index: 201; pointer-events: none; transform: translate(-50%, -160%); text-align: center; }
.micdrop svg { width: 64px; height: 120px; margin: 0 auto; transform-origin: 50% 90%; }
.micdrop p { margin: 18px 0 0; font-family: var(--f-serif); font-style: italic; font-size: 54px; opacity: 0; white-space: nowrap; text-shadow: 0 6px 30px var(--bg); }
.micdrop.go { animation: drop 1.05s cubic-bezier(.5, 0, .75, 0) forwards; }
.micdrop.go svg { animation: tilt 2.2s .95s var(--ease) forwards; }
.micdrop.go p { animation: appear .5s 1.1s forwards; }
.micdrop.out { transition: opacity .6s; opacity: 0; }
@keyframes drop { to { transform: translate(-50%, calc(50vh - 50%)); } }
@keyframes tilt { 0% { transform: rotate(0); } 25% { transform: translateY(-14px) rotate(-14deg); } 55% { transform: rotate(8deg); } 100% { transform: rotate(78deg) translate(12px, 10px); } }
@keyframes appear { to { opacity: 1; } }

/* ---------- Reveal */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
.meet-facts .reveal:nth-child(2), .priv-grid .reveal:nth-child(2), .tiers .reveal:nth-child(2), .fit .reveal:nth-child(2), .needs .reveal:nth-child(2) { transition-delay: .08s; }
.meet-facts .reveal:nth-child(3), .priv-grid .reveal:nth-child(3), .tiers .reveal:nth-child(3) { transition-delay: .16s; }
.priv-grid .reveal:nth-child(4) { transition-delay: .24s; }

/* ---------- Ohne JavaScript: Bedienelemente der Demos ausblenden, die dann nichts tun */
html:not(.js) .keys-hint, html:not(.js) .stage-note, html:not(.js) .modes-switch,
html:not(.js) .rename, html:not(.js) #editRun,
html:not(.js) .where-choices, html:not(.js) .flow-switch, html:not(.js) .where-note { display: none; }
/* Ohne Schalter stehen „online“ und „offline“ nebeneinander; das Flussbild zeigt den Online-Weg. */
html:not(.js) .where [data-when], html:not(.js) .where-sum [data-when] { display: block; }
html:not(.js) .where-sum p + p { margin-top: 10px; }

/* ============================================================ RESPONSIVE */
@media (max-width: 1100px) {
  .priv-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; padding-top: 48px; }
  .hero .stage { grid-column: 1; grid-row: auto; max-width: 600px; width: 100%; margin: 56px auto 40px; }
  .modes, .feature, .meet { grid-template-columns: 1fr; }
  .modes-source, .transcript { grid-row: auto; }
  .fact { padding-bottom: 26px; }
  .cheats dl { grid-template-columns: 1fr; }
  .flowmap { grid-template-columns: 1fr; }
  .fm-you, .fm-api, .fm-wire-main { grid-column: 1; grid-row: auto; }
  .fm-wire { width: 2px; height: 60px; margin: 0 auto; }
  .fm-wire span { left: 14px; bottom: auto; top: 50%; transform: translateY(-50%); }
  .fm-wire-main::after { left: -3px; animation-name: travelY; }
  @keyframes travelY { from { top: 0; } to { top: calc(100% - 8px); } }
  .flowmap[data-where="offline"] .fm-wire-main { width: 0; height: 60px; border-top: 0; border-left: 2px dashed var(--line-2); }
  .dl-meta:where(.two) { grid-template-columns: 1fr; }
  .ways, .tiers, .needs, .where-panels, .fit { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .nav-links { display: none; }
  .nav-cta { margin-left: auto !important; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .h-line { white-space: normal; }
  .nav { gap: 10px; padding-block: 11px; }
  .brand { font-size: 21px; }
  .nav-cta { font-size: 14px; padding-left: 12px; }
  .btn-dl { font-size: 17px; padding: 15px 20px 15px 18px; }
  .key { height: 54px; min-width: 60px; padding: 0 12px; font-size: 14px; }
  .key-space { min-width: 120px; }
  .keys { gap: 6px; }
  .window-body { min-height: 200px; font-size: 15px; padding: 18px; }
  .speech { font-size: 18px; left: 0; right: 0; bottom: 165px; }
  .hud { padding: 12px; }
  .hud-esc { display: none; }
  .hud-chips { flex-wrap: wrap; }   /* sonst ist „Meeting“ unter 390 px abgeschnitten */
  .stage { padding-bottom: 185px; }
  .stage-note { top: calc(100% + 14px); }
  .lane { grid-template-columns: 82px 1fr; }
  .playhead { left: calc(22px + 82px + 14px); }
  .lanes-legend { display: none; }
  .meet-facts { grid-template-columns: 1fr; }
  .fact + .fact { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .step { grid-template-columns: 1fr; gap: 4px; }
  .cheats dl > div { grid-template-columns: 1fr; gap: 4px; }
  .rename-row { flex-direction: column; }
  .rename button { padding: 12px; }
  .btn-big { padding: 16px 22px; }
  .btn-big-k { font-size: 20px; }
  .foot-egg { margin-left: 0; }
  .micdrop p { font-size: 40px; }
  .priv-grid { grid-template-columns: 1fr; }
  .where-choices { grid-template-columns: 1fr; }
  .where-switch { display: grid; width: 100%; }
  .where-btn { text-align: center; }
  .maker { flex-direction: column; }
  /* Tempo-Tabelle: auf dem Telefon jede Zeile als eigener Block, die Spaltenköpfe stehen vor dem Wert. */
  .speed thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .speed table, .speed tbody, .speed tr, .speed th, .speed td { display: block; }
  .speed tr { padding: 14px 0; border-bottom: 1px dashed var(--line); }
  .speed tbody th { width: auto; padding: 0 0 8px; border: 0; }
  .speed td { padding: 3px 0; border: 0; }
  .speed td::before { content: attr(data-label) ": "; color: var(--dim); }
}
/* Sehr schmale Telefone: Die Versionsnummer im Knopf würde sonst am Rand anstoßen. */
@media (max-width: 350px) {
  .nav-cta .pill { display: none; }
  .nav-cta { padding-right: 12px; }
  .brand .glyph { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
}
