/* ==========================================================================
   LIFE — Warteliste / Produktseite
   Das Designsystem ist NICHT nachempfunden, sondern aus der App uebernommen:
   alle Tokens unten stehen so in frontend/src/index.css der LIFE-App.
   Kein Webfont, kein Framework, keine externe Anfrage (siehe public/_headers).
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens — hell ist die Basis, dunkel ueber data-theme="dark".
   Der Dunkel-Block steht bewusst zweimal da: einmal fuer die ausdrueckliche
   Wahl (data-theme) und einmal fuer die Systemeinstellung. light-dark() waere
   kuerzer, faellt aber auf aelteren Safari-Versionen komplett aus — und ein
   Token-Ausfall waere hier eine weisse Seite, kein Schoenheitsfehler.
   -------------------------------------------------------------------------- */
:root {
  /* Flaechen */
  --bg: #f2f2f7;
  --card: #ffffff;
  --card-2: #ffffff;
  --fill: #ededf2;
  --fill-2: #e2e2e9;

  /* Glas-Kachel: gemalt statt gefiltert (kein backdrop-filter, wie in der App) */
  --glass-sheen: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.8) 0%,
    rgba(255, 255, 255, 0.38) 48%,
    rgba(255, 255, 255, 0.08) 100%
  );
  --glass-tint: 12%;
  --glass-base: var(--card);

  /* Text */
  --label: #1c1c1e;
  --label-2: #8a8a8e;
  --label-3: #b4b4ba;
  /* Fliesstext der WEBSITE — dunkler als --label-2, damit Absaetze 4.5:1
     schaffen. --label-2 bleibt den App-Nachbauten vorbehalten. */
  --prose: #48484c;

  /* Linien & Tracks */
  --hairline: rgba(60, 60, 67, 0.13);
  --track: #e8e8ee;

  /* App-Akzent (iOS-Systemblau) */
  --accent: #007aff;
  --accent-2: #e8f1ff;
  --on-accent: #ffffff;

  /* Marken-Akzent der WEBSITE (Favicon-Tuerkis) — Links, Wartelisten-Knoepfe.
     Dunkler als das Favicon-Tuerkis #00b3a0: erst ab hier traegt weisse
     Schrift auf der Flaeche die geforderten 4,5:1 (gemessen 5,3:1). */
  --brand: #00796b;
  --brand-strong: #00b3a0;
  --brand-tint: #e6f7f4;
  --on-brand: #ffffff;

  /* Status */
  --good: #34c759;
  --good-soft: #69d383;
  --good-deep: #1f9440;
  --warn: #ff9500;
  --bad: #ff3b30;

  /* Apple-Health-Kategorien */
  --ah-activity: #ff9500;
  --ah-heart: #ff2d55;
  --ah-nutrition: #34c759;
  --ah-sleep: #5856d6;
  --ah-body: #af52de;
  --ah-primary: #007aff;

  /* Lesbare Varianten derselben Kategorien fuer TEXT der Website (Kicker).
     Die Original-Toene sind auf hellem Grund als Schrift nicht lesbar
     (Orange auf #f2f2f7 = 1,97:1). In den App-Nachbauten bleiben sie
     unveraendert — dort sind sie Flaeche, Symbol und Zitat, nicht Fliesstext.
     Im Dunkelmodus sind die Originaltoene selbst hell genug (siehe unten). */
  --ah-activity-ink: #9a5a00;
  --ah-heart-ink: #c2113a;
  --ah-nutrition-ink: #1f7a37;
  --ah-sleep-ink: #5856d6;
  --ah-primary-ink: #0063d1;
  /* Blaue Kleinst-Labels auf blauer Flaeche (Pille, Werkzeug-Tag) */
  --accent-ink: #0062cc;

  /* Whoop-Composite-Scores */
  --score-recovery: #4cd964;
  --score-strain: #007aff;

  /* Naehrwert-Datenfarben */
  --cal: #34c759;
  --carb: #8bc34a;
  --prot: #00a88e;
  --fat: #2e7d32;

  /* Elevation */
  --elevation-card: 0 1px 2px rgba(0, 0, 0, 0.04), 0 6px 20px rgba(0, 0, 0, 0.05);
  --elevation-pop: 0 8px 30px rgba(0, 0, 0, 0.12);
  --elevation-thumb: 0 1px 3px rgba(0, 0, 0, 0.1);

  /* Radien */
  --r-card: 1.25rem;
  --r-tile: 1rem;
  --r-control: 0.75rem;
  --r-pill: 999px;

  /* Motion — ein Haus-Easing, drei Dauern (identisch zur App) */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-fast: 0.22s;
  --dur-med: 0.32s;
  --dur-slow: 0.55s;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "Helvetica Neue", system-ui, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;

  --maxw: 1080px;
  --gutter: clamp(1.15rem, 4vw, 2.5rem);

  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #000000;
  --card: #1c1c1e;
  --card-2: #2c2c2e;
  --fill: #1c1c1e;
  --fill-2: #2c2c2e;
  --glass-sheen: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.14) 0%,
    rgba(255, 255, 255, 0.05) 48%,
    rgba(255, 255, 255, 0) 100%
  );
  --glass-tint: 8%;
  --glass-base: var(--card-2);
  --label: #ffffff;
  --label-2: rgba(235, 235, 245, 0.6);
  --label-3: rgba(235, 235, 245, 0.3);
  --prose: rgba(235, 235, 245, 0.78);
  --hairline: rgba(84, 84, 88, 0.55);
  --track: rgba(120, 120, 128, 0.32);
  --accent: #0a84ff;
  --accent-2: rgba(10, 132, 255, 0.18);
  --brand: #2fd8c4;
  --brand-strong: #2fd8c4;
  --brand-tint: rgba(47, 216, 196, 0.16);
  --on-brand: #00201c;
  --good: #30d158;
  --good-soft: #74dd8e;
  --good-deep: #23a44b;
  --warn: #ff9f0a;
  --bad: #ff453a;
  --ah-activity: #ff9f0a;
  --ah-heart: #ff375f;
  --ah-nutrition: #30d158;
  --ah-sleep: #5e5ce6;
  --ah-body: #bf5af2;
  --ah-primary: #0a84ff;
  --ah-activity-ink: var(--ah-activity);
  --ah-heart-ink: var(--ah-heart);
  --ah-nutrition-ink: var(--ah-nutrition);
  --ah-sleep-ink: var(--ah-sleep);
  --ah-primary-ink: var(--ah-primary);
  --accent-ink: var(--accent);
  --score-strain: #0a84ff;
  --cal: #30d158;
  --carb: #a3e635;
  --prot: #2dd4bf;
  --fat: #66bb6a;
  --elevation-card: 0 0 0 0.5px rgba(255, 255, 255, 0.04);
  --elevation-pop: 0 8px 30px rgba(0, 0, 0, 0.55);
  --elevation-thumb: 0 1px 3px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="dark"]) {
    --bg: #000000;
    --card: #1c1c1e;
    --card-2: #2c2c2e;
    --fill: #1c1c1e;
    --fill-2: #2c2c2e;
    --glass-sheen: linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.14) 0%,
      rgba(255, 255, 255, 0.05) 48%,
      rgba(255, 255, 255, 0) 100%
    );
    --glass-tint: 8%;
    --glass-base: var(--card-2);
    --label: #ffffff;
    --label-2: rgba(235, 235, 245, 0.6);
    --label-3: rgba(235, 235, 245, 0.3);
    --prose: rgba(235, 235, 245, 0.78);
    --hairline: rgba(84, 84, 88, 0.55);
    --track: rgba(120, 120, 128, 0.32);
    --accent: #0a84ff;
    --accent-2: rgba(10, 132, 255, 0.18);
    --brand: #2fd8c4;
    --brand-strong: #2fd8c4;
    --brand-tint: rgba(47, 216, 196, 0.16);
    --on-brand: #00201c;
    --good: #30d158;
    --good-soft: #74dd8e;
    --good-deep: #23a44b;
    --warn: #ff9f0a;
    --bad: #ff453a;
    --ah-activity: #ff9f0a;
    --ah-heart: #ff375f;
    --ah-nutrition: #30d158;
    --ah-sleep: #5e5ce6;
    --ah-body: #bf5af2;
    --ah-primary: #0a84ff;
    --ah-activity-ink: var(--ah-activity);
    --ah-heart-ink: var(--ah-heart);
    --ah-nutrition-ink: var(--ah-nutrition);
    --ah-sleep-ink: var(--ah-sleep);
    --ah-primary-ink: var(--ah-primary);
    --accent-ink: var(--accent);
    --score-strain: #0a84ff;
    --cal: #30d158;
    --carb: #a3e635;
    --prot: #2dd4bf;
    --fat: #66bb6a;
    --elevation-card: 0 0 0 0.5px rgba(255, 255, 255, 0.04);
    --elevation-pop: 0 8px 30px rgba(0, 0, 0, 0.55);
    --elevation-thumb: 0 1px 3px rgba(0, 0, 0, 0.35);
    color-scheme: dark;
  }
}

/* --------------------------------------------------------------------------
   2. Reset & Basis
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
* {
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  background: var(--bg);
  color: var(--label);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  touch-action: manipulation;
}
img,
svg {
  display: block;
  max-width: 100%;
}
a {
  color: var(--brand);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}
input {
  font: inherit;
  font-size: max(16px, 1em); /* iOS-Auto-Zoom-Schutz, wie in der App */
}
:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 4px;
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.skip {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translate(-50%, calc(-100% - 12px));
  z-index: 60;
  background: var(--card);
  color: var(--label);
  padding: 0.6rem 1rem;
  border-radius: 0 0 var(--r-control) var(--r-control);
  box-shadow: var(--elevation-pop);
  font-size: 0.9375rem;
  font-weight: 600;
}
.skip:focus {
  transform: translate(-50%, 0);
}

/* --------------------------------------------------------------------------
   3. Layout
   -------------------------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.band {
  padding-block: clamp(3.5rem, 9vw, 7rem);
  position: relative;
}
.band--tint::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 340px;
  background: linear-gradient(
    to bottom,
    color-mix(in srgb, var(--tint, var(--ah-primary)) 12%, transparent),
    transparent
  );
  pointer-events: none;
  z-index: 0;
}
.band > .wrap {
  position: relative;
  z-index: 1;
}

/* --------------------------------------------------------------------------
   4. Typografie
   -------------------------------------------------------------------------- */
h1,
h2,
h3 {
  letter-spacing: -0.03em;
  text-wrap: balance;
  font-weight: 700;
}
h1 {
  font-size: clamp(2.35rem, 6.2vw, 3.9rem);
  line-height: 1.03;
}
h2 {
  font-size: clamp(1.75rem, 3.6vw, 2.6rem);
  line-height: 1.08;
}
h3 {
  font-size: 1.25rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
  font-weight: 600;
}
.lead {
  font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
  line-height: 1.5;
  color: var(--prose);
  max-width: 34ch;
  text-wrap: pretty;
}
.prose {
  color: var(--prose);
  max-width: 62ch;
  text-wrap: pretty;
}
/* Der Punkt traegt die Kategoriefarbe (Flaeche, keine Schrift), die Schrift
   die lesbare Variante. So bleibt die Farbcodierung erhalten, ohne dass ein
   Absatz-Label in Orange auf Hellgrau steht. */
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--tint-ink, var(--brand));
  margin-bottom: 0.9rem;
}
.kicker i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--tint, currentColor);
  flex: none;
}
.tnum {
  font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------------------------
   5. Kopfzeile
   -------------------------------------------------------------------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-fast) var(--ease);
}
.topbar[data-scrolled="1"] {
  border-bottom-color: var(--hairline);
}
.topbar .wrap {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  height: 58px;
}
.brand {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-decoration: none;
  color: var(--label);
}
.topbar .spacer {
  flex: 1;
}
.seg {
  display: inline-flex;
  background: var(--fill);
  border-radius: var(--r-pill);
  padding: 2px;
}
.seg button {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--label-2);
  padding: 5px 10px;
  border-radius: var(--r-pill);
  min-height: 30px;
  transition: color var(--dur-fast) var(--ease),
    background var(--dur-fast) var(--ease);
}
.seg button[aria-pressed="true"] {
  background: var(--card);
  color: var(--label);
  box-shadow: var(--elevation-thumb);
}
:root[data-theme="dark"] .seg button[aria-pressed="true"] {
  background: var(--card-2);
}
.topcta {
  display: none;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  background: var(--brand);
  color: var(--on-brand);
  padding: 9px 15px;
  border-radius: var(--r-control);
  white-space: nowrap;
}
@media (min-width: 720px) {
  .topcta {
    display: inline-block;
  }
}

/* --------------------------------------------------------------------------
   6. Knoepfe & Wartelisten-Formular
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  font-size: 1rem;
  font-weight: 600;
  background: var(--brand);
  color: var(--on-brand);
  border-radius: var(--r-control);
  padding: 0 1.25rem;
  white-space: nowrap;
  transition: transform var(--dur-fast) var(--ease),
    filter var(--dur-fast) var(--ease);
}
.btn:hover {
  filter: brightness(1.06);
}
.btn:active {
  transform: scale(0.98);
}
.btn[disabled] {
  opacity: 0.55;
  cursor: default;
  transform: none;
}
/* Reihenfolge im Formular = Reihenfolge im Kopf: Adresse, Begruendung, Knopf.
   Der Absende-Knopf steht bewusst UNTER dem Textfeld — neben dem E-Mail-Feld
   haette er dazu eingeladen, abzuschicken, bevor man die Frage gelesen hat. */
.signup {
  max-width: 30rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.signup input[type="email"],
.signup textarea {
  width: 100%;
  min-width: 0;
  color: var(--label);
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--r-control);
  padding: 0.75rem 0.9rem;
  font: inherit;
  font-size: max(16px, 1em);
}
.signup input[type="email"] {
  min-height: 48px;
  padding-block: 0;
}
.signup textarea {
  resize: vertical;
  min-height: 4.5rem;
  line-height: 1.45;
}
.signup ::placeholder {
  color: var(--label-3);
}
.signup input[type="email"]:focus,
.signup textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent);
}
.asklabel {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.9375rem;
  font-weight: 600;
}
.askfoot {
  display: flex;
  gap: 1rem;
  align-items: baseline;
  justify-content: space-between;
  margin-top: -0.15rem;
}
.askfoot .hint {
  font-size: 0.8125rem;
  color: var(--prose);
  max-width: 40ch;
}
.askfoot .count {
  font-size: 0.75rem;
  color: var(--label-3);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  opacity: 0;
  transition: opacity var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
/* Der Zaehler erscheint erst, wenn wirklich getippt wird — sonst zaehlt er
   von Anfang an eine Grenze mit, die fast niemand erreicht. */
.askfoot .count[data-on="1"] {
  opacity: 1;
}
.askfoot .count[data-near="1"] {
  color: var(--warn);
}
.signup .btn {
  align-self: flex-start;
  margin-top: 0.35rem;
}
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.formnote {
  font-size: 0.8125rem;
  color: var(--prose);
  margin-top: 0.7rem;
  max-width: 44ch;
}
.formmsg {
  font-size: 0.9375rem;
  margin-top: 0.75rem;
  padding: 0.7rem 0.85rem;
  border-radius: var(--r-control);
  display: none;
}
.formmsg.ok {
  display: block;
  background: var(--brand-tint);
  color: var(--brand);
}
.formmsg.err {
  display: block;
  background: color-mix(in srgb, var(--bad) 12%, transparent);
  color: var(--bad);
}
:root[data-theme="dark"] .formmsg.ok {
  color: var(--brand-strong);
}

/* --------------------------------------------------------------------------
   7. App-Bauteile — 1:1 aus der LIFE-App nachgebaut
   -------------------------------------------------------------------------- */
.card {
  background: var(--card);
  border-radius: var(--r-card);
  box-shadow: var(--elevation-card);
  padding: 1.05rem;
}
.card + .card {
  margin-top: 0.75rem;
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
}
.card-head .lhs {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--cat, var(--accent));
}
.card-head .meta {
  font-size: 0.8125rem;
  color: var(--label-2);
}
.ico {
  width: 17px;
  height: 17px;
  stroke: currentColor;
  stroke-width: 2.2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

/* --- Ringe (StatRing) --------------------------------------------------- */
.rings {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  padding-block: 0.35rem;
}
.ring {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.ring .dial {
  position: relative;
  width: var(--size, 88px);
  height: var(--size, 88px);
}
.ring svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}
.ring .trk {
  fill: none;
  stroke: var(--track);
  stroke-width: 8;
}
.ring .val {
  fill: none;
  stroke: var(--c, var(--accent));
  stroke-width: 8;
  stroke-linecap: round;
  transform: rotate(-90deg);
  transform-origin: 50px 50px;
  stroke-dasharray: 282.7;
  /* --v = Zielfuellgrad 0..1, --k = Fortschritt der Choreografie 0..1 */
  stroke-dashoffset: calc(282.7 * (1 - var(--v, 0) * var(--k, 1)));
}
.ring .mark {
  stroke: var(--label);
  stroke-width: 2.4;
  opacity: var(--k, 1);
}
.ring .num {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  font-size: calc(var(--size, 88px) * 0.245);
}
.ring .num u {
  font-size: calc(var(--size, 88px) * 0.127);
  font-weight: 600;
  color: var(--label-2);
  text-decoration: none;
}
.ring .cap {
  margin-top: 0.625rem;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--label-2);
  text-align: center;
}

/* --- Stufenanzeige der Schlafleistung (TierBar) -------------------------- */
.tiers {
  margin-top: 0.25rem;
}
.tier-row {
  display: flex;
  align-items: center;
  padding-block: 0.7rem;
  border-bottom: 1px solid var(--hairline);
}
.tier-row:last-child {
  border-bottom: 0;
}
.tier-row .ico {
  width: 19px;
  height: 19px;
  stroke-width: 2.1;
  color: var(--label-2);
  margin-right: 0.75rem;
}
.tier-row .name {
  flex: 1;
  min-width: 0;
  font-size: 0.9375rem;
  font-weight: 500;
  padding-right: 0.5rem;
}
.tierbar {
  display: flex;
  align-items: center;
  gap: 3px;
  flex: none;
}
.tierbar span {
  width: 16px;
  height: 5px;
  border-radius: var(--r-pill);
  background: var(--track);
}
.tier-row[data-tier="1"] .tierbar span:nth-child(1),
.tier-row[data-tier="2"] .tierbar span:nth-child(2),
.tier-row[data-tier="3"] .tierbar span:nth-child(3) {
  background: var(--tone);
  opacity: var(--k, 1);
}
.tier-row[data-tier="1"] {
  --tone: var(--bad);
}
.tier-row[data-tier="2"] {
  --tone: var(--warn);
}
.tier-row[data-tier="3"] {
  --tone: var(--good);
}
.tier-row .pct {
  margin-left: 0.625rem;
  width: 2.9rem;
  text-align: right;
  font-size: 0.9375rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* --- Aktivitaeten-Zeilen mit Glas-Kachel -------------------------------- */
.act-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0;
  border-bottom: 1px solid var(--hairline);
}
.act-row:last-of-type {
  border-bottom: 0;
}
.glass {
  height: 46px;
  width: 92px;
  flex: none;
  border-radius: var(--r-tile);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding-inline: 8px;
  background: var(--glass-sheen),
    color-mix(in srgb, var(--cat) var(--glass-tint), var(--glass-base));
  box-shadow: inset 0 0 0 0.5px color-mix(in srgb, var(--cat) 30%, transparent),
    var(--elevation-thumb);
}
.glass .ico {
  width: 16px;
  height: 16px;
  color: var(--cat);
}
.glass b {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--label);
}
.act-row .title {
  flex: 1;
  min-width: 0;
}
.act-row .title b {
  display: block;
  font-size: 0.9375rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.act-row .title span {
  font-size: 0.7rem;
  color: var(--label-3);
}
.act-row .times {
  font-size: 0.72rem;
  line-height: 1.35;
  color: var(--label-2);
  font-variant-numeric: tabular-nums;
  text-align: right;
  flex: none;
}
.act-row .whenbar {
  width: 3px;
  height: 34px;
  flex: none;
  border-radius: var(--r-pill);
  background: var(--track);
  position: relative;
  overflow: hidden;
}
.act-row .whenbar i {
  position: absolute;
  inset-inline: 0;
  border-radius: var(--r-pill);
  background: var(--cat);
  top: var(--from);
  height: var(--len);
}

/* --- Balken (NutritionBars / ProgressBar) ------------------------------- */
.bar-row + .bar-row {
  margin-top: 0.9rem;
}
.bar-row .cap {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.8125rem;
  color: var(--label-2);
  margin-bottom: 0.35rem;
}
.bar-row .cap b {
  font-weight: 500;
  letter-spacing: -0.01em;
}
.bar-row .cap span {
  font-variant-numeric: tabular-nums;
}
.bar {
  height: 10px;
  border-radius: var(--r-pill);
  background: var(--track);
  overflow: hidden;
}
.bar i {
  display: block;
  height: 100%;
  border-radius: var(--r-pill);
  background: var(--c);
  width: calc(var(--w) * var(--k, 1));
}

/* --- Zonenbalken (HF-Zonen) --------------------------------------------- */
.zonebar {
  height: 7px;
  border-radius: var(--r-pill);
  background: var(--track);
  overflow: hidden;
  display: flex;
}
.zonebar i {
  display: block;
  height: 100%;
  width: calc(var(--w) * var(--k, 1));
}
.zonelegend {
  margin-top: 0.35rem;
  font-size: 0.75rem;
  color: var(--label-2);
  font-variant-numeric: tabular-nums;
}

/* --- Wochenleiste (Training) -------------------------------------------- */
.weekstrip {
  display: flex;
  gap: 6px;
}
.weekstrip div {
  flex: 1;
  border-radius: var(--r-tile);
  background: var(--fill);
  padding: 8px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 0;
}
.weekstrip div[data-today="1"] {
  background: var(--accent-2);
  color: var(--accent);
}
.weekstrip .wd {
  font-size: 0.6875rem;
  font-weight: 600;
}
.weekstrip .dd {
  font-size: 0.9375rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.weekstrip .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: transparent;
  opacity: var(--k, 1);
}
.weekstrip [data-dot="done"] .dot {
  background: var(--good);
}
.weekstrip [data-dot="missed"] .dot {
  background: var(--warn);
}
.weekstrip [data-dot="planned"] .dot {
  background: var(--label-3);
}

/* --- Satz-Tabelle (laufendes Training) ---------------------------------- */
.sets {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}
.sets th {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--label-2);
  text-align: center;
  padding-bottom: 0.4rem;
}
.sets th:first-child {
  width: 28px;
  text-align: left;
}
.sets th:last-child {
  width: 40px;
}
.sets td {
  font-size: 1.0625rem;
  padding-block: 0.4rem;
  text-align: center;
  color: var(--label-3);
}
.sets td:first-child {
  text-align: left;
  font-weight: 500;
}
.sets tr[data-state="done"] td:last-child {
  color: var(--good);
}
.sets tr[data-state="active"] td {
  color: var(--label);
  font-weight: 700;
}
.sets tr[data-state="active"] .cell {
  display: block;
  background: var(--fill);
  border-radius: var(--r-control);
  padding-block: 0.3rem;
}
.sets tr[data-state="active"] .go {
  display: block;
  background: var(--good);
  color: #fff;
  border-radius: var(--r-control);
  padding-block: 0.35rem;
  font-size: 0.9rem;
}
.sets tbody tr {
  opacity: var(--k, 1);
}

/* --- Stundenraster (Kalender) ------------------------------------------- */
.grid-cal {
  --hour: 19px;
  --gutter-w: 42px;
  position: relative;
  height: calc(24 * var(--hour));
  /* 24 Stundenlinien ohne ein einziges Element: eine Wiederholung reicht. */
  background-image: repeating-linear-gradient(
    to bottom,
    var(--hairline) 0 1px,
    transparent 1px var(--hour)
  );
}
.grid-cal .hours span {
  position: absolute;
  left: 0;
  top: calc(var(--min) * var(--hour) / 60 - 7px);
  font-size: 0.6rem;
  color: var(--label-2);
  font-variant-numeric: tabular-nums;
  background: var(--card);
  padding-right: 4px;
  z-index: 2;
}
.grid-cal .cols {
  position: absolute;
  inset: 0;
  left: var(--gutter-w);
  border-left: 1px solid var(--hairline);
}
.grid-cal .plan {
  position: absolute;
  inset: 0 38% 0 0;
}
.grid-cal .lane {
  position: absolute;
  inset-block: 0;
  right: 0;
  width: 38%;
  border-left: 1px dashed var(--hairline);
}
.ev {
  position: absolute;
  left: 2px;
  right: 3px;
  border-radius: 6px;
  padding: 1px 5px;
  font-size: 0.65rem;
  font-weight: 600;
  line-height: 1.25;
  overflow: hidden;
  color: var(--c);
  background: color-mix(in srgb, var(--c) 15%, transparent);
  border-left: 3px solid var(--c);
  top: calc(var(--min) * var(--hour) / 60);
  height: max(14px, calc(var(--dur) * var(--hour) / 60 - 2px));
  opacity: var(--k, 1);
  transform: translateY(calc((1 - var(--k, 1)) * 6px));
}
.ev[data-derived="1"] {
  border-left: 0;
  border: 1px dashed var(--c);
}
.ev small {
  display: block;
  font-weight: 500;
  opacity: 0.8;
  font-variant-numeric: tabular-nums;
}
/* Auf dem Handy ist eine Stunde nur 15 px hoch — die zweite Zeile passt in
   kurze Bloecke nicht mehr hinein und wuerde angeschnitten. Wie in der App
   zeigt ein Block seine Zeitspanne erst ab genug Hoehe. */
@media (max-width: 899px) {
  .ev small {
    display: none;
  }
}
.nowline {
  position: absolute;
  left: var(--gutter-w);
  right: 0;
  height: 1px;
  background: var(--bad);
  z-index: 3;
  top: calc(var(--min) * var(--hour) / 60);
  opacity: var(--k, 1);
}
.nowline b {
  position: absolute;
  left: 2px;
  top: -8px;
  background: var(--bad);
  color: #fff;
  border-radius: var(--r-pill);
  padding: 1px 5px;
  font-size: 0.6rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* --- MCP / Claude -------------------------------------------------------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: var(--r-pill);
  background: var(--accent-2);
  color: var(--accent-ink);
  padding: 3px 9px;
  font-size: 0.6875rem;
  font-weight: 600;
}
.pill i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--good);
  flex: none;
}
.tool {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-block: 0.5rem;
  border-bottom: 1px solid var(--hairline);
  opacity: var(--k, 1);
  transform: translateY(calc((1 - var(--k, 1)) * 5px));
}
.tool:last-child {
  border-bottom: 0;
}
.tool code {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--label);
}
.tag {
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  border-radius: 6px;
  padding: 2px 6px;
  flex: none;
}
.tag[data-kind="read"] {
  background: var(--fill);
  color: var(--label-2);
}
.tag[data-kind="write"] {
  background: var(--accent-2);
  color: var(--accent-ink);
}
.md {
  font-family: var(--mono);
  font-size: 0.75rem;
  line-height: 1.65;
  white-space: pre;
  overflow-x: auto;
  color: var(--label);
}
.md .dim {
  color: var(--label-3);
}
.md .key {
  color: var(--label-2);
}
.md .h {
  color: var(--accent);
  font-weight: 700;
}

/* --- Notizkasten (Schnelleintrag) --------------------------------------- */
.notebox {
  background: var(--fill);
  border-radius: var(--r-control);
  padding: 0.7rem 0.75rem;
  min-height: 4.4rem;
  font-size: 0.9375rem;
  color: var(--label);
}
.notebox .ph {
  color: var(--label-3);
}
.caret {
  display: inline-block;
  width: 2px;
  height: 1.05em;
  background: var(--accent);
  vertical-align: -0.18em;
  margin-left: 1px;
  opacity: var(--k, 1);
  animation: blink 1.1s steps(1, end) infinite;
}
@keyframes blink {
  50% {
    background: transparent;
  }
}
.parsed {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding-block: 0.5rem;
  border-bottom: 1px solid var(--hairline);
  font-size: 0.9375rem;
  opacity: var(--k, 1);
  transform: translateY(calc((1 - var(--k, 1)) * 6px));
}
.parsed:last-child {
  border-bottom: 0;
}
.parsed span {
  color: var(--label-2);
  font-variant-numeric: tabular-nums;
  flex: none;
}
.srctag {
  font-size: 0.6rem;
  font-weight: 700;
  border-radius: var(--r-pill);
  background: var(--fill);
  color: var(--label-3);
  padding: 2px 6px;
  margin-left: 0.4rem;
  white-space: nowrap;
}

/* --- Rechen-Liste (Kalorienrechner) ------------------------------------- */
.calc-row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding-block: 0.7rem;
  border-bottom: 1px solid var(--hairline);
  opacity: var(--k, 1);
}
.calc-row:last-child {
  border-bottom: 0;
}
.calc-row b {
  font-size: 0.9375rem;
  font-weight: 500;
  display: block;
}
.calc-row small {
  font-size: 0.75rem;
  color: var(--label-2);
  line-height: 1.5;
}
.calc-row .v {
  font-size: 0.9375rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  flex: none;
}
.bigval {
  font-size: 2.125rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.bigval u {
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--label-2);
  text-decoration: none;
  margin-left: 0.25rem;
}
.macro3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 0.85rem;
}
.macro3 div {
  background: var(--fill);
  border-radius: var(--r-control);
  padding: 8px;
  text-align: center;
}
.macro3 b {
  font-size: 1.25rem;
  font-weight: 700;
  display: block;
  font-variant-numeric: tabular-nums;
}
.macro3 small {
  font-size: 0.75rem;
  color: var(--label-2);
}

/* --------------------------------------------------------------------------
   8. Buehnen — scroll-getriebene Choreografie
   --p (0..1) setzt das Skript pro Bild; ohne Skript bleibt es 1 und alles
   steht im Endzustand. --k leitet daraus den Anteil EINES Schritts ab.
   -------------------------------------------------------------------------- */
.stage {
  --p: 1;
  position: relative;
}
/* Ueberlaenge der Spur = Scrollweg der Choreografie. 175vh ergibt bei einem
   ueblichen Fenster gut zwei Radumdrehungen je Akt: lang genug, dass die
   Stufen einzeln lesbar sind, kurz genug, dass niemand festhaengt. */
.stage__track {
  height: 175vh;
}
.stage__pin {
  position: sticky;
  top: 58px;
  min-height: calc(100svh - 58px);
  display: flex;
  align-items: center;
  padding-block: 1.5rem;
}
.step {
  --in: 0;
  --span: 0.2;
  --k: clamp(0, calc((var(--p) - var(--in)) / var(--span)), 1);
}
.fade {
  opacity: var(--k);
  transform: translateY(calc((1 - var(--k)) * 12px));
}
.stage-grid {
  display: grid;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
  width: 100%;
}
@media (min-width: 900px) {
  .stage-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  }
  .stage-grid--flip > .figure {
    order: 2;
  }
}
.figure {
  min-width: 0;
}
.phone {
  max-width: 26rem;
  margin-inline: auto;
  width: 100%;
}
.notes h2 {
  margin-bottom: 0.9rem;
}
.notes p + p {
  margin-top: 0.85rem;
}
.notes .prose {
  font-size: 1.0625rem;
}

/* Kurze Fenster (Laptop, Querformat): die ganze Buehne wird kleiner statt
   unten abgeschnitten — ein klebendes Panel, das hoeher als das Fenster ist,
   waere unten schlicht nicht lesbar. `zoom` aendert im Gegensatz zu
   `transform` auch die Layout-Hoehe, genau das ist hier noetig. */
@media (min-width: 900px) and (max-height: 900px) {
  .stage .stage-grid {
    zoom: 0.92;
  }
}
@media (min-width: 900px) and (max-height: 820px) {
  .stage .stage-grid {
    zoom: 0.84;
  }
}
@media (min-width: 900px) and (max-height: 720px) {
  .stage .stage-grid {
    zoom: 0.72;
  }
}

/* --------------------------------------------------------------------------
   9. Restliche Bloecke
   -------------------------------------------------------------------------- */
.hero {
  padding-top: clamp(2.5rem, 6vw, 4.5rem);
  padding-bottom: clamp(3rem, 7vw, 5rem);
}
.hero-grid {
  display: grid;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: center;
}
@media (min-width: 900px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  }
}
.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.4rem;
  margin-top: 2rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--hairline);
  font-size: 0.875rem;
  color: var(--prose);
}
.facts span {
  white-space: nowrap;
}

.rows {
  border-top: 1px solid var(--hairline);
}
.rows > div {
  display: flex;
  gap: 1.5rem;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.95rem 0.1rem;
  border-bottom: 1px solid var(--hairline);
}
.rows .k {
  font-size: 0.9375rem;
  font-weight: 600;
  flex: none;
}
.rows .v {
  font-size: 0.9375rem;
  color: var(--prose);
  text-align: right;
  max-width: 46ch;
}

.stances {
  display: grid;
  gap: 1.5rem;
  margin-top: 2rem;
}
@media (min-width: 760px) {
  .stances {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
}
.stance h3 {
  margin-bottom: 0.5rem;
}
.stance p {
  color: var(--prose);
  font-size: 0.9375rem;
}
.stance::before {
  content: "";
  display: block;
  width: 34px;
  height: 2px;
  border-radius: var(--r-pill);
  background: var(--brand);
  margin-bottom: 0.9rem;
}

details {
  border-bottom: 1px solid var(--hairline);
  padding: 0.95rem 0.1rem;
}
details summary {
  cursor: pointer;
  list-style: none;
  font-size: 1rem;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  min-height: 32px;
}
details summary::-webkit-details-marker {
  display: none;
}
details summary::after {
  content: "+";
  color: var(--label-3);
  font-weight: 400;
  font-size: 1.3rem;
  line-height: 1;
}
details[open] summary::after {
  content: "\2013";
}
details p {
  margin-top: 0.6rem;
  color: var(--prose);
  font-size: 0.9375rem;
  max-width: 62ch;
}
.faq {
  border-top: 1px solid var(--hairline);
  margin-top: 1.75rem;
}

.closing {
  background: var(--card);
  border-radius: var(--r-card);
  box-shadow: var(--elevation-card);
  padding: clamp(1.75rem, 4vw, 3rem);
}
.notice {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin-top: 1.75rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--hairline);
  font-size: 0.9375rem;
  color: var(--prose);
  max-width: 56ch;
}
.notice .ico {
  color: var(--warn);
  margin-top: 2px;
}

footer {
  border-top: 1px solid var(--hairline);
  padding-block: 1.75rem 3rem;
  margin-top: clamp(3rem, 7vw, 5rem);
}
footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.4rem;
  align-items: center;
  font-size: 0.8125rem;
  color: var(--label-2);
}
footer a {
  text-decoration: none;
  color: var(--label-2);
}
footer a:hover {
  color: var(--label);
}
footer .spacer {
  flex: 1;
}

/* --------------------------------------------------------------------------
   10. Auftakt-Choreografie (einmalig beim Laden, ohne Skript)
   -------------------------------------------------------------------------- */
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}
@keyframes ring-in {
  from {
    stroke-dashoffset: 282.7;
  }
}
@keyframes mark-in {
  from {
    opacity: 0;
  }
}
.hero .enter {
  animation: rise var(--dur-slow) var(--ease) both;
  animation-delay: calc(var(--i, 0) * 70ms);
}
.hero .ring .val {
  animation: ring-in 1.1s var(--ease) 0.25s both;
}
.hero .ring .mark {
  animation: mark-in var(--dur-med) var(--ease) 1s both;
}
.hero .act-row {
  animation: rise var(--dur-slow) var(--ease) both;
  animation-delay: calc(0.55s + var(--i, 0) * 90ms);
}

/* --------------------------------------------------------------------------
   11. Reduzierte Bewegung — Choreografie aus, Inhalte bleiben vollstaendig
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .stage__track {
    height: auto;
  }
  .stage__pin {
    position: static;
    min-height: 0;
    padding-block: clamp(2.5rem, 7vw, 4rem);
  }
}

/* --------------------------------------------------------------------------
   12. Kleine Schirme
   -------------------------------------------------------------------------- */
/* Auf dem Handy wird NICHT gepinnt: Instrument und Erklaerung stehen dort
   untereinander und waeren zusammen hoeher als das Fenster — der untere Teil
   eines klebenden Panels waere schlicht nicht erreichbar. Die Choreografie
   laeuft stattdessen mit der Sektion durchs Bild (siehe stageProgress). */
@media (max-width: 899px) {
  .stage__track {
    height: auto;
  }
  .stage__pin {
    position: static;
    min-height: 0;
    align-items: flex-start;
    padding-block: 1rem;
  }
  .notes h2 {
    font-size: 1.55rem;
  }
  .notes .prose {
    font-size: 0.9875rem;
  }
  .grid-cal {
    --hour: 15px;
  }
}
@media (max-width: 640px) {
  /* Auf halber Breite sieht der Knopf aus wie ein Nebenweg, und der Daumen
     trifft ihn schlechter. */
  .signup .btn {
    width: 100%;
    align-self: stretch;
  }
  .askfoot {
    flex-direction: column;
    gap: 0.2rem;
  }
  .seg button {
    padding: 5px 8px;
    font-size: 0.72rem;
  }
  .topbar .wrap {
    gap: 0.4rem;
  }
}
@media (max-width: 420px) {
  .rings {
    gap: 0.15rem;
  }
  .ring {
    --size: 74px;
  }
  .glass {
    width: 74px;
  }
  .rows > div {
    flex-direction: column;
    gap: 0.25rem;
  }
  .rows .v {
    text-align: left;
  }
}
