/* InvoiceWerk — Komponenten (Kopf, Buttons, Bühne, Telefon, Karten, Sektionen, Recht) */

/* ============ Fortschrittsschiene ============ */
.progress-rail {
  position: fixed; top: 0; left: 0; z-index: 80;
  width: 100%; height: 2px;
  background: var(--primary);
  transform: scaleX(var(--progress, 0));
  transform-origin: left center;
  pointer-events: none;
}

/* ============ Kopfbereich (klebend) ============ */
.site-header {
  position: sticky; top: 0; z-index: 70;
  padding-block: var(--sp-16);
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: padding var(--dur-fast) var(--ease), background-color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.site-header.is-condensed {
  padding-block: var(--sp-12); /* −8 px Gesamthöhe */
  background: var(--surface-veil);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom-color: var(--border);
}
.header-inner { display: flex; align-items: center; gap: var(--sp-16); }
.brand { display: inline-flex; align-items: center; gap: var(--sp-12); text-decoration: none; }
.brand .mark { width: 32px; height: 32px; }
.brand-name {
  font-weight: 700; letter-spacing: var(--track);
  font-size: 1.125rem; color: var(--text-primary);
}
.brand-name .werk { color: var(--primary-on-surface); }

.site-nav { margin-inline: auto; }
.site-nav ul { display: flex; gap: var(--sp-4); list-style: none; margin: 0; padding: 0; position: relative; }
.nav-indicator {
  position: absolute; top: 0; left: 0; height: 100%;
  width: 0; border-radius: var(--r-full);
  background: var(--surface-alt);
  opacity: 0;
  transition: transform var(--dur) var(--ease), width var(--dur) var(--ease), opacity var(--dur-fast) var(--ease);
  pointer-events: none;
}
.site-nav a {
  position: relative; display: inline-block;
  padding: var(--sp-8) var(--sp-12); border-radius: var(--r-full);
  color: var(--text-secondary); text-decoration: none;
  font-weight: 500; font-size: .9375rem;
  transition: color var(--dur-fast) var(--ease);
}
.site-nav a:hover, .site-nav a[aria-current="true"] { color: var(--text-primary); }

.header-actions { display: flex; align-items: center; gap: var(--sp-12); margin-left: auto; }

/* Segmentpaar DE·EN (AppSegmentedControl) */
.seg {
  position: relative; display: inline-flex; padding: var(--sp-2);
  background: var(--surface-alt); border-radius: var(--r-full);
}
.seg-marker {
  position: absolute; top: var(--sp-2); left: var(--sp-2); height: calc(100% - 4px);
  background: var(--surface); border-radius: var(--r-full);
  box-shadow: var(--shadow-card);
  transition: transform var(--dur) var(--ease), width var(--dur) var(--ease);
}
.seg button {
  position: relative; padding: var(--sp-4) var(--sp-12);
  border-radius: var(--r-full);
  font-family: var(--font-mono); font-size: .75rem; font-weight: 600;
  color: var(--text-tertiary); letter-spacing: .04em;
  transition: color var(--dur-fast) var(--ease);
}
.seg button[aria-pressed="true"] { color: var(--text-primary); }

/* Themenumschalter (Hell · Dunkel · System) */
.theme-btn {
  display: grid; place-items: center;
  width: 36px; height: 36px; border-radius: var(--r-full);
  color: var(--text-label);
  border: 1px solid var(--border);
  transition: color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), background-color var(--dur-fast) var(--ease);
}
.theme-btn:hover { color: var(--text-primary); background: var(--surface-alt); }
.theme-btn .ic { grid-area: 1 / 1; transition: opacity var(--dur) var(--ease), rotate var(--dur) var(--ease), scale var(--dur) var(--ease); }
.theme-btn .ic[data-off] { opacity: 0; rotate: -90deg; scale: .6; }

/* ============ Buttons ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-8);
  padding: var(--sp-12) var(--sp-20);
  border-radius: var(--r-btn);
  font-weight: 600; font-size: 1rem; line-height: 1.2;
  text-decoration: none; white-space: nowrap;
  transition: background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease),
              scale 300ms var(--ease-spring), translate var(--dur-fast) var(--ease);
}
.btn:active { scale: .98; transition-duration: var(--dur-fast), var(--dur-fast), var(--dur-fast), var(--dur-fast), var(--dur-press), var(--dur-fast); }
.btn-primary { background: var(--primary); color: var(--on-primary); box-shadow: var(--glow-primary); }
.btn-primary:hover { background: var(--primary-pressed); color: var(--on-primary); }
.btn-ghost { background: var(--surface); color: var(--text-primary); border: 1px solid var(--border-card); }
.btn-ghost:hover { border-color: var(--primary-outline); color: var(--text-primary); }
.btn-sm { padding: var(--sp-8) var(--sp-16); font-size: .9375rem; }
.arrow-link { display: inline-flex; align-items: center; gap: var(--sp-8); font-weight: 600; text-decoration: none; }
.arrow-link .ic { transition: translate var(--dur-fast) var(--ease); }
.arrow-link:hover .ic { translate: 0 2px; }

/* Store-Pillen (§7.4) — eigenständig gezeichnet, kein offizielles Badge */
.store-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-12); }
.store-btn {
  display: inline-flex; align-items: center; gap: var(--sp-12);
  padding: var(--sp-8) var(--sp-20) var(--sp-8) var(--sp-16);
  border-radius: var(--r-btn);
  background: var(--text-primary); color: var(--background);
  text-decoration: none; text-align: left;
  border: 1px solid var(--text-primary);
  transition: opacity var(--dur-fast) var(--ease), translate var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.store-btn .ic { width: 24px; height: 24px; flex: none; }
.store-btn .lines { display: grid; line-height: 1.25; }
.store-btn .over { font-family: var(--font-mono); font-size: .625rem; font-weight: 600; letter-spacing: var(--track-kicker); text-transform: uppercase; opacity: .72; }
.store-btn .name { font-weight: 700; font-size: 1rem; letter-spacing: var(--track); }
.store-btn[aria-disabled="true"] { cursor: default; opacity: .85; }
/* Aktiver Zustand (zweite Variante, später nur Link einsetzen): */
.store-btn.is-live { opacity: 1; }
.store-btn.is-live:hover { translate: 0 -2px; box-shadow: var(--shadow-float); }

/* ============ Bühne (§4.5) ============ */
.stage { position: relative; overflow: hidden; background: linear-gradient(180deg, var(--stage-top), var(--stage-bottom)); }
.stage--bleed { border-radius: 0 0 40px 40px; }
.stage--card { border-radius: var(--r-xl); }
.stage > .container { position: relative; z-index: 2; }
.stage-dots {
  position: absolute; inset: -8px;
  background-image: radial-gradient(circle at 2px 2px, var(--dot-pattern) 1.7px, transparent 1.75px);
  background-size: 19px 19px;
  opacity: .6;
  translate: var(--dots-x, 0) var(--dots-y, 0);
  pointer-events: none;
}
.stage-ring {
  position: absolute; width: 170px; height: 170px;
  border: 2px solid var(--decor-outline); border-radius: var(--r-full);
  rotate: var(--ring-rot, 0deg);
  pointer-events: none;
}
.stage-ring::after { /* Funke auf dem Ring, damit die Drehung lesbar ist */
  content: ""; position: absolute; top: -5px; left: 50%;
  width: 8px; height: 8px; border-radius: var(--r-full);
  background: var(--decor-accent);
}
.stage-watermark {
  position: absolute; color: var(--text-primary); opacity: .05;
  rotate: -12deg; pointer-events: none;
}
.stage-watermark .ic { width: 100%; height: 100%; }

/* Schwebende Chips */
.chip {
  position: absolute; z-index: 3;
  display: grid; place-items: center;
  width: 48px; height: 48px;
  background: var(--chip-surface); border-radius: var(--r-md);
  box-shadow: var(--shadow-chip);
  rotate: var(--tilt, 8deg);
  color: var(--primary);
}
.chip .ic { width: 21px; height: 21px; }
.decor-plus { position: absolute; width: 18px; height: 18px; color: var(--decor-accent); z-index: 1; pointer-events: none; }
@media (max-width: 759px) {
  .chip--aux, .decor-plus { display: none; }
}

/* ============ Telefonrahmen (reines CSS, §7.3) ============ */
.phone {
  width: min(380px, 100%);
  margin-inline: auto;
  padding: var(--sp-8);
  border-radius: 44px;
  background: var(--surface);
  border: 1.5px solid color-mix(in srgb, var(--text-primary) 14%, transparent);
  box-shadow: var(--shadow-float);
}
.phone-screen {
  position: relative;
  border-radius: 36px; overflow: hidden;
  background: var(--background);
}
.phone-cam {
  position: absolute; top: var(--sp-12); left: 50%; translate: -50% 0;
  width: 8px; height: 8px; border-radius: var(--r-full);
  background: color-mix(in srgb, var(--text-primary) 22%, transparent);
  z-index: 5;
}

/* ============ App-Nachbau: Dashboard (tokentreu) ============ */
.app-bar { display: flex; align-items: center; gap: var(--sp-12); padding: var(--sp-28) var(--sp-16) var(--sp-12); }
.logo-tile {
  display: grid; place-items: center; flex: none;
  width: 32px; height: 32px; border-radius: var(--r-sm);
  background: var(--primary); color: var(--on-primary);
}
.logo-tile svg { width: 20px; height: 20px; }
.app-bar-title { font-size: .9375rem; font-weight: 700; color: var(--text-primary); letter-spacing: var(--track); }
.app-bar-sub { font-size: .6875rem; color: var(--text-tertiary); }
.dash { display: grid; gap: var(--sp-12); padding: var(--sp-4) var(--sp-16) var(--sp-16); }
.app-card {
  background: var(--surface); border: 1px solid var(--border-card);
  border-radius: var(--r-lg); box-shadow: var(--shadow-card);
  padding: var(--sp-16);
}
.app-card .label { font-size: .6875rem; font-weight: 600; color: var(--text-label); letter-spacing: .02em; }
.kpi-value {
  font-family: var(--font-mono); font-variant-numeric: tabular-nums;
  font-weight: 600; font-size: 1.375rem; letter-spacing: var(--track-money);
  color: var(--text-primary); margin-top: var(--sp-4);
}
.kpi-sub { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: .625rem; color: var(--text-tertiary); margin-top: var(--sp-2); }
.kpi-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-12); }
.kpi-row .kpi-value { font-size: 1rem; }

.pill {
  display: inline-flex; align-items: center; gap: var(--sp-4);
  padding: var(--sp-2) var(--sp-8);
  border-radius: var(--r-full);
  font-size: .6875rem; font-weight: 600; line-height: 1.5;
}
.pill--open { background: var(--primary-tint); color: var(--primary-on-surface); }
.pill--paid { background: var(--success-tint); color: var(--success); }
.pill--overdue { background: var(--overdue-tint); color: var(--overdue); }

.due-row {
  display: flex; align-items: center; gap: var(--sp-12);
  background: var(--overdue-tint); border-radius: var(--r-md);
  padding: var(--sp-12); margin-top: var(--sp-12);
}
.due-row .ic { width: 20px; height: 20px; color: var(--overdue); flex: none; }
.due-name { font-size: .75rem; font-weight: 600; color: var(--text-primary); }
.due-meta { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: .625rem; color: var(--overdue); }
.due-amount { margin-left: auto; font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: .8125rem; font-weight: 600; color: var(--overdue); }

/* Diagramm (WerkRevenueChart, §5) */
.chart { margin-top: var(--sp-12); width: 100%; height: auto; }
.chart .grid-line { stroke: var(--border); stroke-width: 1; }
.chart .axis-label { font-family: var(--font-mono); font-size: 7.5px; fill: var(--text-tertiary); }
.chart .bar { fill: var(--primary); transform-origin: center bottom; transform-box: fill-box; }
html.js .chart .bar { transform: scaleY(0); }
html.js .chart.is-on .bar { transform: scaleY(1); transition: transform 600ms var(--ease-spring); }
.chart .line-path { stroke: var(--primary); stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.chart .line-area { fill: var(--primary-a10); }
.chart .line-reveal { clip-path: inset(0 100% 0 0); }
.chart.is-on .line-reveal { clip-path: inset(0 -2% 0 0); transition: clip-path var(--dur-line) var(--ease) 200ms; }
html:not(.js) .chart .line-reveal { clip-path: none; }
.chart .endpoint { opacity: 0; }
.chart.is-on .endpoint { opacity: 1; transition: opacity var(--dur-hint) var(--ease) calc(200ms + var(--dur-line)); }
html:not(.js) .chart .endpoint { opacity: 1; }
.chart .endpoint circle { fill: var(--primary); }
.chart .endpoint text { font-family: var(--font-mono); font-size: 8px; font-weight: 600; fill: var(--text-primary); }

/* Untere Tab-Leiste des Nachbaus */
.tabbar {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--divider);
  background: var(--surface);
  padding: var(--sp-8) var(--sp-8) var(--sp-12);
}
.tabbar span { display: grid; justify-items: center; gap: var(--sp-2); color: var(--text-tertiary); font-size: .5625rem; font-weight: 600; }
.tabbar .ic { width: 20px; height: 20px; }
.tabbar .is-active { color: var(--primary-on-surface); }

/* ============ Papier: Rechnungs-Nachbau (Papier-Regel §4.2) ============ */
.paper-wrap { position: relative; margin: var(--sp-4) var(--sp-16) var(--sp-16); }
.paper-offset {
  position: absolute; inset: 0; translate: var(--sp-8) var(--sp-8);
  border-radius: var(--r-lg); background: var(--paper-shadow);
}
.paper {
  position: relative;
  background: var(--paper); color: var(--paper-text-2);
  border: 1px solid var(--paper-border); border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  padding: var(--sp-20);
  font-size: .75rem; line-height: 1.5;
}
.paper-head { display: flex; align-items: start; justify-content: space-between; gap: var(--sp-12); }
.paper-kicker { font-family: var(--font-mono); font-size: .5625rem; font-weight: 600; letter-spacing: var(--track-kicker); text-transform: uppercase; color: var(--paper-text-3); }
.paper-num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-weight: 600; font-size: 1rem; color: var(--paper-text); letter-spacing: var(--track-money); }
.paper-num .placeholder-dash { color: var(--paper-text-3); }
.paper-sender { font-size: .625rem; color: var(--paper-text-3); }
.paper .block-label { font-family: var(--font-mono); font-size: .5625rem; font-weight: 600; letter-spacing: var(--track-kicker); text-transform: uppercase; color: var(--paper-text-3); margin-bottom: var(--sp-4); }
.paper-recipient strong { display: block; color: var(--paper-text); font-weight: 700; }
.paper-meta { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-8) var(--sp-16); }
.paper-meta div span { display: block; font-size: .5625rem; color: var(--paper-text-3); }
.paper-meta div b { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-weight: 600; font-size: .6875rem; color: var(--paper-text); }
.paper hr { border: 0; border-top: 1px solid var(--paper-divider); margin: var(--sp-12) 0; }
.paper-pos { display: flex; justify-content: space-between; gap: var(--sp-12); padding-block: var(--sp-8); }
.paper-pos + .paper-pos { border-top: 1px solid var(--paper-divider); }
.paper-pos .t { font-weight: 700; color: var(--paper-text); font-size: .75rem; }
.paper-pos .d { font-size: .625rem; color: var(--paper-text-3); }
.paper-pos .q { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: .625rem; color: var(--paper-text-2); margin-top: var(--sp-2); }
.paper-pos .amount { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-weight: 600; color: var(--paper-text); white-space: nowrap; }
.paper-sums { display: grid; gap: var(--sp-4); }
.paper-sums .row { display: flex; justify-content: space-between; gap: var(--sp-12); }
.paper-sums .row span { font-size: .6875rem; }
.paper-sums .row b { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-weight: 400; color: var(--paper-text); }
.paper-sums .total { border-top: 1px solid var(--paper-divider); padding-top: var(--sp-8); margin-top: var(--sp-4); }
.paper-sums .total span { font-weight: 700; color: var(--paper-text); }
.paper-sums .total b { font-weight: 600; font-size: 1rem; letter-spacing: var(--track-money); }
.paper-hint { font-size: .5625rem; color: var(--paper-text-3); margin-top: var(--sp-12); }
.paper-pill {
  display: inline-flex; padding: var(--sp-2) var(--sp-8); border-radius: var(--r-full);
  font-size: .625rem; font-weight: 600;
  background: var(--paper-tint); color: var(--paper-primary);
}
.paper-check { color: var(--paper-success); }
.paper-check .trim { stroke-dasharray: 24; stroke-dashoffset: 24; }
.inv.f5 .paper-check .trim { stroke-dashoffset: 0; transition: stroke-dashoffset var(--dur-check) var(--ease) 120ms; }
html:not(.js) .paper-check .trim { stroke-dashoffset: 0; }

/* Stufenlogik der Sequenz: ohne JS ist alles sichtbar (Endzustand) */
html.js .inv .st { opacity: 0; translate: 0 10px; transition: opacity var(--dur-hint) var(--ease), translate var(--dur-hint) var(--ease); }
html.js .inv.f1 .st-1, html.js .inv.f2 .st-2, html.js .inv.f3 .st-3,
html.js .inv.f4 .st-4, html.js .inv.f5 .st-5 { opacity: 1; translate: 0 0; }
html.js .inv .paper-num .real { opacity: 0; scale: 1.4; display: inline-block; }
html.js .inv.f5 .paper-num .real { opacity: 1; scale: 1; transition: opacity var(--dur-hint) var(--ease), scale 300ms var(--ease-spring); }
.paper-num .placeholder-dash { display: none; }
html.js .inv .paper-num .placeholder-dash { display: inline; transition: opacity var(--dur-fast) var(--ease); }
html.js .inv.f5 .paper-num .placeholder-dash { display: none; }

/* ============ Sequenz-Sektion (Rechnung baut sich) ============ */
.seq { position: relative; }
.seq-grid { display: grid; gap: var(--sp-48); }
/* Anheften nur im Zweispalter: einspaltig liefe die Rechnung sonst unter den
   Schrittbeschreibungen weiter und beide lägen übereinander. */
.seq-sticky { align-self: start; }
.seq-caps { display: grid; gap: clamp(24px, 5vh, 48px); align-content: center; counter-reset: cap; }
.seq-cap { display: flex; gap: var(--sp-16); opacity: .45; transition: opacity var(--dur) var(--ease); }
.seq-cap.is-active { opacity: 1; }
.seq-cap .n {
  counter-increment: cap; flex: none;
  display: grid; place-items: center;
  width: 32px; height: 32px; border-radius: var(--r-full);
  border: 1.5px solid var(--primary-outline);
  font-family: var(--font-mono); font-size: .75rem; font-weight: 600;
  color: var(--text-label);
  transition: background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.seq-cap.is-active .n { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.seq-cap h3 { font-size: 1.0625rem; }
.seq-cap p { font-size: .9375rem; margin-top: var(--sp-4); }
@media (min-width: 900px) {
  .seq-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
  .seq-caps { min-height: 70vh; }
  .seq-sticky { position: sticky; top: 96px; }
}

/* Schmale Ansichten: Die Rechnung ist 713 px hoch — nebeneinander passen Bild und
   Text nicht, untereinander liefe der Text der Rechnung davon. Deshalb wandert der
   Schritttext als angeheftetes Band über die Rechnung und zeigt immer genau den
   Schritt, dessen Teil gerade auf Lesehöhe steht. Ohne JS und unter Reduce Motion
   bleibt die vollständige Liste stehen. */
@media (max-width: 899px) and (prefers-reduced-motion: no-preference) {
  html.js .seq-grid { gap: var(--sp-16); }
  html.js .seq-caps {
    order: -1;
    position: sticky; top: 60px; z-index: 3;
    align-content: start;
    padding-block: var(--sp-12);
    background: var(--background);
    border-bottom: 1px solid var(--divider);
  }
  /* Alle Schritte in derselben Rasterzelle: die Bandhöhe richtet sich nach dem
     längsten Text und springt beim Wechsel nicht. */
  html.js .seq-cap { grid-area: 1 / 1; opacity: 0; }
  html.js .seq-cap.is-active { opacity: 1; }
}

/* ============ Drei Spalten: Was die App löst ============ */
.solve-grid { display: grid; gap: var(--sp-20); }
@media (min-width: 760px) { .solve-grid { grid-template-columns: repeat(3, 1fr); gap: var(--sp-24); } }
.icon-tile {
  display: grid; place-items: center; flex: none;
  width: 44px; height: 44px;
  border-radius: var(--r-md); background: var(--blob-fill);
  color: var(--primary);
}
.icon-tile .ic { width: 22px; height: 22px; }
.solve-card {
  display: grid; gap: var(--sp-12); align-content: start;
  background: var(--surface); border: 1px solid var(--border-card);
  border-radius: var(--r-lg); box-shadow: var(--shadow-card);
  padding: var(--sp-24);
  transition: translate var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
@media (hover: hover) and (pointer: fine) {
  .solve-card:hover { translate: 0 -2px; box-shadow: var(--shadow-float); }
}
.solve-card p { font-size: .9375rem; }

/* ============ Zeitleiste: So geht's ============ */
.steps { position: relative; display: grid; gap: var(--sp-32); }
.steps-line { position: absolute; background: var(--border); }
.steps-line i { position: absolute; inset: 0; background: var(--primary); transform-origin: left top; display: block; }
.step { position: relative; display: grid; gap: var(--sp-12); align-content: start; }
.step .step-no { font-family: var(--font-mono); font-size: .6875rem; font-weight: 600; color: var(--text-tertiary); letter-spacing: var(--track-kicker); }
.step p { font-size: .9375rem; }
@media (min-width: 900px) {
  .steps { grid-template-columns: repeat(4, 1fr); gap: var(--sp-24); }
  .steps-line { top: 21px; left: 0; right: 0; height: 1.5px; }
  .steps-line i { transform: scaleX(var(--line-p, 0)); }
  .step { padding-top: var(--sp-16); }
  /* Die Telefone auf eine gemeinsame Grundlinie stellen: der Fließtext (Zeile 4)
     nimmt die Resthöhe auf, damit unterschiedlich lange Texte die Bilder nicht versetzen. */
  .step:has(.phone--step) { align-content: stretch; grid-template-rows: auto auto auto 1fr auto; }
  .step .icon-tile { position: relative; z-index: 1; box-shadow: 0 0 0 6px var(--band-bg, var(--background)); margin-top: calc(-1 * var(--sp-16) - 6px); }
}
@media (max-width: 899px) {
  /* Die Zeitleiste läuft bei 21 px; der Text braucht Abstand dazu, sonst klebt er an der Linie. */
  .steps { padding-left: var(--sp-48); }
  .steps-line { top: 0; bottom: 0; left: 21px; width: 1.5px; }
  .steps-line i { transform: scaleY(var(--line-p, 0)); }
  /* Die 44-px-Kachel mittig auf die Linie: halbe Kachel links von 21 px,
     abzüglich des Innenabstands, den .steps dem Schritt vorgibt. */
  .step .icon-tile { margin-left: calc(21px - 22px - var(--sp-48)); box-shadow: 0 0 0 6px var(--band-bg, var(--background)); }
}
html:not(.js) .steps-line i { transform: none; }

/* Bild-Platzhalter: gestaltete App-Vignette, bis die echten Screenshots vorliegen */
.shot {
  position: relative; display: block; overflow: hidden;
  border: 1px solid var(--border-card); border-radius: var(--r-cell);
  background: var(--background);
  box-shadow: var(--shadow-card);
  min-height: 96px;
}
.shot > span {
  position: absolute; bottom: var(--sp-8); left: 50%; translate: -50% 0; z-index: 2;
  font-family: var(--font-mono); font-size: .5625rem; font-weight: 600;
  letter-spacing: .04em; text-transform: uppercase;
  color: var(--text-tertiary);
  background: var(--surface); border: 1px dashed var(--border);
  border-radius: var(--r-sm); padding: var(--sp-2) var(--sp-8);
  text-align: center; max-width: 92%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sk { position: absolute; inset: 0; padding: var(--sp-16); padding-bottom: 40px; display: grid; gap: var(--sp-8); align-content: start; }
.sk-card { background: var(--surface); border: 1px solid var(--border-card); border-radius: var(--r-sm); padding: var(--sp-8) var(--sp-12); display: grid; gap: var(--sp-4); }
.sk-row { display: flex; align-items: center; gap: var(--sp-8); }
.sk-bar { height: 8px; border-radius: var(--r-full); background: var(--surface-alt); }
.sk-label { font-family: var(--font-mono); font-size: .5rem; font-weight: 600; letter-spacing: var(--track-kicker); text-transform: uppercase; color: var(--text-tertiary); }
.sk-text { font-size: .6875rem; color: var(--text-secondary); }
.sk-strong { font-size: .6875rem; font-weight: 700; color: var(--text-primary); }
.sk-amount { margin-left: auto; font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: .625rem; font-weight: 600; color: var(--text-primary); white-space: nowrap; }
.sk-dot { width: 22px; height: 22px; border-radius: var(--r-full); background: var(--blob-fill); color: var(--primary-on-surface); flex: none; display: grid; place-items: center; font-family: var(--font-mono); font-size: .5625rem; font-weight: 600; }
.sk-pill { display: inline-flex; align-items: center; gap: var(--sp-4); height: 22px; padding-inline: var(--sp-8); border-radius: var(--r-full); background: var(--primary-tint); color: var(--primary-on-surface); font-size: .625rem; font-weight: 600; justify-self: start; }
.sk-pill .ic, .sk-row .ic { width: 12px; height: 12px; flex: none; }
.sk hr { border: 0; border-top: 1px solid var(--divider); margin: 0; width: 100%; }
.step .shot { aspect-ratio: 4 / 3; }

/* Echte App-Screenshots. Sie sitzen im Telefonrahmen aus §7.3 — dieselbe Komponente
   wie Held und Gerätesektion, nur kleiner. --shot-y wählt den gezeigten Ausschnitt
   (0% = Kopf des Bildschirms, 100% = Fuß). */
.phone--step { width: min(232px, 100%); margin-inline: 0; padding: 5px; border-radius: 30px; }
.phone--step .phone-screen { aspect-ratio: 9 / 16; border-radius: 26px; }
.phone--step img { width: 100%; height: 100%; object-fit: cover; object-position: 50% var(--shot-y, 0%); }

/* Screenshot statt Vignette: der Rahmen kommt hier vom umgebenden Telefon. */
.shot--img { border: 0; background: var(--background); box-shadow: none; }
.shot--img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% var(--shot-y, 0%); }

/* ============ Bento-Raster ============ */
.bento { display: grid; gap: var(--sp-20); grid-template-columns: repeat(6, 1fr); }
.tile {
  position: relative; overflow: hidden;
  grid-column: span 2;
  background: var(--surface);
  border: 1px solid var(--border-card); border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  padding: var(--sp-24);
  display: grid; gap: var(--sp-12); align-content: start;
  transition: translate var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
@media (hover: hover) and (pointer: fine) {
  .tile:hover { translate: 0 -2px; box-shadow: var(--shadow-float); }
}
.tile::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 0%), var(--primary-a06), transparent 70%);
  opacity: 0; transition: opacity var(--dur-fast) var(--ease);
}
@media (hover: hover) and (pointer: fine) { .tile:hover::after { opacity: 1; } }
.tile p { font-size: .9375rem; }
.tile--lg { grid-column: span 4; grid-row: span 2; }
.tile--lg .tile-art { display: grid; place-items: center; padding-block: var(--sp-16); }
.tile--lg .tile-art svg { width: min(200px, 60%); height: auto; }
@media (max-width: 899px) {
  .bento { grid-template-columns: 1fr 1fr; }
  .tile--lg { grid-column: span 2; grid-row: auto; }
}
@media (max-width: 559px) {
  .bento { grid-template-columns: 1fr; }
  .tile, .tile--lg { grid-column: span 1; }
}

/* Mini-Papier in der großen Bento-Kachel (Papier-Regel gilt auch hier) */
.mini-paper {
  position: relative; z-index: 1;
  width: min(240px, 86%); margin: -44px auto 0;
  background: var(--paper); border: 1px solid var(--paper-border);
  border-radius: var(--r-md); box-shadow: var(--shadow-float);
  padding: var(--sp-12) var(--sp-16);
  display: grid; gap: var(--sp-8);
  rotate: -2deg;
}
.mini-paper .row { display: flex; align-items: center; gap: var(--sp-8); }
.mini-paper .num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: .75rem; font-weight: 600; color: var(--paper-text); }
.mini-paper .bar { height: 6px; border-radius: var(--r-full); background: var(--paper-divider); }
.mini-paper .frozen { margin-left: auto; display: inline-flex; align-items: center; gap: var(--sp-4); font-size: .625rem; font-weight: 600; color: var(--paper-primary); background: var(--paper-tint); border-radius: var(--r-full); padding: var(--sp-2) var(--sp-8); }
.mini-paper .frozen .ic { width: 11px; height: 11px; }

/* ============ Rechtssicherheit (Bühne) ============ */
.law-rows { display: grid; gap: var(--sp-16); }
.law-row {
  display: flex; gap: var(--sp-16); align-items: flex-start;
  background: var(--surface); border: 1px solid var(--border-card);
  border-radius: var(--r-lg); box-shadow: var(--shadow-card);
  padding: var(--sp-20);
}
.law-row h3 { font-size: 1.0625rem; }
.law-row p { font-size: .9375rem; margin-top: var(--sp-4); }
.note-box {
  display: flex; gap: var(--sp-12); align-items: flex-start;
  background: var(--blob-fill); border-radius: var(--r-md);
  padding: var(--sp-16) var(--sp-20);
  font-size: .9375rem; color: var(--text-label);
}
.note-box .ic { width: 20px; height: 20px; flex: none; color: var(--primary-on-surface); margin-top: var(--sp-2); }

/* ============ Geräte & Sprachen ============ */
.device-phone { max-width: 320px; margin-inline: 0; }
.device-card { display: grid; gap: var(--sp-12); justify-items: start; }
.device-card figcaption { font-size: .875rem; color: var(--text-tertiary); display: flex; justify-content: space-between; gap: var(--sp-8); }
.device-card figcaption b { color: var(--text-label); font-weight: 600; }
.xfade { position: relative; aspect-ratio: 9 / 14; }
.xfade .shot { position: absolute; inset: 0; }
.xfade .shot + .shot { opacity: 0; transition: opacity var(--dur) var(--ease); }
/* Zeigen nur auf Geräten, die es wirklich können. Auf Touch bleibt :hover nach dem
   Tippen kleben und würde das Zurückschalten blockieren — dort zählt allein .is-flipped. */
@media (hover: hover) and (pointer: fine) {
  .xfade:hover .shot + .shot { opacity: 1; }
}
.xfade.is-flipped .shot + .shot { opacity: 1; }

.lang-samples {
  display: grid; max-width: 560px; padding: 0; list-style: none;
  background: var(--surface); border: 1px solid var(--border-card);
  border-radius: var(--r-lg); box-shadow: var(--shadow-card);
  overflow: hidden;
}
.lang-samples li {
  display: flex; align-items: baseline; gap: var(--sp-16);
  padding: var(--sp-16) var(--sp-20);
}
.lang-samples li + li { border-top: 1px solid var(--divider); }
.lang-samples .tag {
  align-self: center; flex: none;
  font-family: var(--font-mono); font-size: .625rem; font-weight: 600; letter-spacing: .04em;
  color: var(--primary-on-surface); background: var(--blob-fill);
  border-radius: var(--r-full); padding: var(--sp-2) var(--sp-8);
}
.lang-samples .val { font-family: var(--font-mono); font-variant-numeric: tabular-nums; color: var(--text-primary); margin-left: auto; }
.lang-samples .lbl { font-size: .9375rem; color: var(--text-secondary); }

/* ============ FAQ ============ */
.faq { max-width: 760px; }
.faq details { border-bottom: 1px solid var(--divider); }
.faq summary {
  display: flex; align-items: center; gap: var(--sp-16);
  padding: var(--sp-20) var(--sp-12);
  border-radius: var(--r-cell);
  cursor: pointer; list-style: none;
  font-weight: 700; color: var(--text-primary); font-size: 1.0625rem;
  letter-spacing: var(--track);
  transition: background-color var(--dur-fast) var(--ease);
}
.faq summary:hover { background: var(--surface); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .ic { margin-left: auto; flex: none; width: 20px; height: 20px; color: var(--text-tertiary); transition: rotate var(--dur) var(--ease); }
.faq details[open] summary .ic { rotate: 180deg; }
.faq .faq-body { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows var(--dur) var(--ease), opacity var(--dur) var(--ease); }
.faq details[open] .faq-body.is-open, html:not(.js) .faq details[open] .faq-body { grid-template-rows: 1fr; opacity: 1; }
.faq .faq-body > div { overflow: hidden; }
.faq .faq-body p { padding: 0 var(--sp-12) var(--sp-20); max-width: 68ch; }

/* ============ Abschluss-CTA ============ */
.cta-inner { display: grid; justify-items: center; text-align: center; gap: var(--sp-24); padding-block: clamp(64px, 8vw, 96px); }
.cta-mark { width: 96px; height: 96px; }
html.js .cta-mark .draw { stroke-dasharray: var(--len, 200); stroke-dashoffset: var(--len, 200); }
html.js .cta-mark.is-on .draw { stroke-dashoffset: 0; transition: stroke-dashoffset var(--seg-dur, 300ms) var(--ease) var(--seg-delay, 0ms); }
html.js .cta-mark .pop { opacity: 0; scale: .5; transform-origin: 36px 37px; }
html.js .cta-mark.is-on .pop { opacity: 1; scale: 1; transition: opacity var(--dur-hint) var(--ease) 600ms, scale 300ms var(--ease-spring) 600ms; }

/* ============ Rechtsteil ============ */
.stand { font-family: var(--font-mono); font-size: .75rem; color: var(--text-tertiary); }
/* Zurück zur Startseite, im Kopf der Rechtsseiten */
.legal-back {
  display: inline-flex; align-items: center; gap: var(--sp-4);
  color: var(--text-secondary); text-decoration: none;
  font-weight: 500; font-size: .9375rem;
  transition: color var(--dur-fast) var(--ease);
}
.legal-back:hover { color: var(--text-primary); }
.legal-back .ic { color: var(--text-tertiary); }
@media (max-width: 519px) { .legal-back span { display: none; } }
.legal-grid { display: grid; gap: var(--sp-32); }
@media (min-width: 1024px) {
  .legal-grid { grid-template-columns: 260px minmax(0, 1fr); gap: var(--sp-64); }
  .legal-toc { position: sticky; top: 96px; align-self: start; }
}
.legal-toc nav { display: grid; gap: var(--sp-2); }
.legal-toc a {
  display: block; padding: var(--sp-4) var(--sp-12);
  border-left: 1.5px solid var(--divider);
  color: var(--text-tertiary); text-decoration: none; font-size: .875rem;
  transition: color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.legal-toc a:hover { color: var(--text-primary); border-color: var(--primary-outline); }
.legal-toc-m { border: 1px solid var(--border-card); border-radius: var(--r-md); padding: var(--sp-8) var(--sp-16); }
.legal-toc-m summary { cursor: pointer; font-weight: 600; color: var(--text-label); padding-block: var(--sp-8); }
.legal-toc-m nav { display: grid; gap: var(--sp-4); padding: var(--sp-8) 0 var(--sp-12); }
@media (min-width: 1024px) { .legal-toc-m { display: none; } }
@media (max-width: 1023px) { .legal-toc { display: none; } }
.legal-body { max-width: 68ch; display: grid; gap: var(--sp-16); }
.legal-body h3 { font-size: 1.125rem; padding-top: var(--sp-16); }
.legal-body h4 { font-size: 1rem; font-weight: 700; }
.legal-body p, .legal-body li { font-size: .9375rem; }
.legal-body ul { padding-left: 20px; display: grid; gap: var(--sp-8); }
.ph {
  font-family: var(--font-mono); font-size: .8125em;
  background: var(--warning-tint); color: var(--text-primary);
  border: 1px solid var(--warning); border-radius: var(--sp-4);
  padding: 0 var(--sp-4); white-space: nowrap;
}
.draft-note {
  display: flex; gap: var(--sp-12); align-items: flex-start;
  background: var(--warning-tint); border: 1px solid var(--warning);
  border-radius: var(--r-md); padding: var(--sp-16) var(--sp-20);
  color: var(--text-primary); font-size: .9375rem;
}
.draft-note .ic { width: 20px; height: 20px; flex: none; color: var(--warning); margin-top: var(--sp-2); }

/* ============ Fußbereich ============ */
.site-footer { border-top: 1px solid var(--border); background: var(--surface); padding-block: var(--sp-48) var(--sp-32); }
.footer-grid { display: grid; gap: var(--sp-32); }
@media (min-width: 760px) { .footer-grid { grid-template-columns: minmax(0, 1.4fr) auto auto; gap: var(--sp-64); } }
.footer-brand { display: grid; gap: var(--sp-12); align-content: start; max-width: 40ch; font-size: .9375rem; }
.site-footer nav { display: grid; gap: var(--sp-8); align-content: start; }
.site-footer nav a { color: var(--text-secondary); text-decoration: none; font-size: .9375rem; }
.site-footer nav a:hover { color: var(--text-primary); }
.footer-meta {
  display: flex; flex-wrap: wrap; gap: var(--sp-8) var(--sp-24);
  border-top: 1px solid var(--divider);
  margin-top: var(--sp-32); padding-top: var(--sp-20);
  font-size: .8125rem; color: var(--text-tertiary);
}
.footer-head { font-family: var(--font-mono); font-size: .6875rem; font-weight: 600; letter-spacing: var(--track-kicker); text-transform: uppercase; color: var(--text-tertiary); margin-bottom: var(--sp-8); }

/* ============ Held ============ */
.hero { padding-top: clamp(48px, 6vw, 96px); padding-bottom: clamp(64px, 7vw, 128px); }
.hero-grid { display: grid; gap: var(--sp-48); align-items: center; }
@media (min-width: 980px) { .hero-grid { grid-template-columns: 1.05fr .95fr; gap: var(--sp-64); } }
.hero-copy { display: grid; gap: var(--sp-24); justify-items: start; }
.hero-copy h1 .hl { color: var(--primary-on-surface); }
.hero-copy .lead { font-size: clamp(1.0625rem, 1rem + .35vw, 1.25rem); max-width: 54ch; letter-spacing: var(--track-flow); }
.trust { display: grid; gap: var(--sp-8); list-style: none; padding: 0; }
.trust li { display: flex; align-items: center; gap: var(--sp-8); font-size: .9375rem; font-weight: 500; color: var(--text-label); }
.trust .ic { width: 20px; height: 20px; color: var(--primary-on-surface); flex: none; }
.hero-visual { position: relative; }
.hero-visual .phone { position: relative; z-index: 2; }

/* ============ Mobil-Menü & Kopf-Responsive ============ */
.menu-btn { display: none; width: 40px; height: 40px; border-radius: var(--r-sm); color: var(--text-primary); place-items: center; }
.mobile-menu {
  position: fixed; inset: 0; z-index: 90;
  background: var(--background);
  padding: var(--sp-24);
  display: grid; grid-template-rows: auto 1fr auto; gap: var(--sp-32);
  opacity: 0; pointer-events: none;
  transition: opacity var(--dur) var(--ease);
}
.mobile-menu.is-open { opacity: 1; pointer-events: auto; }
.mobile-menu .mm-head { display: flex; align-items: center; justify-content: space-between; }
.mobile-menu nav { display: grid; gap: var(--sp-8); align-content: center; }
.mobile-menu nav a {
  font-size: 1.75rem; font-weight: 800; letter-spacing: var(--track);
  color: var(--text-primary); text-decoration: none;
  padding: var(--sp-8) 0;
}
.mobile-menu .mm-foot { display: grid; gap: var(--sp-16); justify-items: start; }
body.menu-open { overflow: hidden; }
@media (max-width: 899px) {
  .site-nav, .site-header .header-cta, .site-header .seg { display: none; }
  .menu-btn { display: grid; }
}
/* Zwischenbreiten: Kopf nicht überfüllen — der CTA lebt hier in Held, Abschluss und Menü */
@media (min-width: 900px) and (max-width: 1099px) {
  .site-header .header-cta { display: none; }
  .site-nav a { padding-inline: var(--sp-8); }
}
@media (min-width: 900px) { .mobile-menu { display: none; } }

/* Sehr schmale Ansichten */
@media (max-width: 359px) {
  .store-btn { padding-inline: var(--sp-12); }
  .brand-name { font-size: 1rem; }
}

/* Ankersprünge landen unter dem klebenden Kopf */
[id] { scroll-margin-top: 88px; }

/* Reduce Motion: scroll-gebundene und gezeichnete Sequenzen springen in den Endzustand (§6.4) */
@media (prefers-reduced-motion: reduce) {
  html.js .chart .bar { transform: none; transition: none; }
  .chart .line-reveal { clip-path: none; transition: none; }
  .chart .endpoint { opacity: 1; transition: none; }
  html.js .cta-mark .draw { stroke-dasharray: none; stroke-dashoffset: 0; transition: none; }
  html.js .cta-mark .pop { opacity: 1; scale: 1; transition: none; }
  html.js .inv.f5 .paper-check .trim { transition: none; }
  .stage-dots { translate: 0 0; }
}
