/*
 * Die Seite: sieben Screens, ein Fahrer. Beschrieben in DESIGN.md im Projektordner.
 *
 * Drei Ebenen, von hinten nach vorn:
 * 1. der Grund jedes Screens (.hinten), er scrollt mit seinem Screen
 * 2. die Bühne mit dem Fahrer (.buehne), sie steht fest im Fenster. Wo der Fahrer steht und wie groß er ist,
 *    legt assets/js/fahrt.js beim Scrollen fest.
 * 3. der Inhalt der Screens: Überschriften direkt auf dem Grund, alles andere auf weißen Karten
 *
 * Regeln:
 * - Dunkel sind nur der Fahrer, die Leiste oben, der Fuß unten, die Knöpfe und der Block am Ende.
 * - Karten sind deckend weiß und kantig, ohne Schatten. Alles zum Antippen ist rund wie eine Pille.
 * - Schrift steht nie auf dem Fahrer. Ein Test prüft das Bildpunkt für Bildpunkt.
 * - Farben nur über tokens.css.
 */

.seite { background: var(--grund); color: var(--tinte); }

/* ---------- Screen ---------- */
/* Die Screens bilden keine eigene Stapelebene: nur so kann der Fahrer zwischen ihrem Grund und ihrem Inhalt liegen. */
.schirm { position: relative; display: grid; min-height: 100svh; overflow-x: clip; pointer-events: none; }
.schirm > :not(.hinten) { z-index: 1; pointer-events: auto; }
.hinten { position: absolute; inset: 0; z-index: -1; overflow: hidden; container-type: size; background: var(--grund); pointer-events: none; }
.schirm--celeste .hinten { background: var(--celeste); }

/* ---------- Bühne: der Fahrer steht fest im Fenster ---------- */
.buehne { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
/* Der Fahrer liegt in der Größe seiner Zeichenfläche oben links. fahrt.js verschiebt und vergrößert ihn als Ganzes, mit Netz und Punkten. */
.fahrer { position: absolute; left: 0; top: 0; width: 1536px; height: 1024px; transform-origin: 0 0; will-change: transform, opacity; }
/* Der Fahrer ist eine Zeichenfläche: fahrt.js malt darauf die Phase der Tretbewegung. Darunter liegt ein Standbild, es steht ohne Skript und solange die Phasen laden. */
.fahrer__bild, .fahrer__standbild { position: absolute; inset: 0; display: block; width: 100%; height: 100%; max-width: none; }
.fahrer__bild { visibility: hidden; }
.buehne[data-tritt] .fahrer__bild { visibility: visible; }
.buehne[data-tritt] .fahrer__standbild { visibility: hidden; }
.fahrer__punkte { position: absolute; inset: 0; }
/*
 * Netz und Gelenkpunkte gehören zum Mess-Screen. Solange er nicht in der Nähe ist, liegen sie gar nicht im Bild:
 * sonst müsste der Browser sie bei jeder Vergrößerung des Fahrers neu zeichnen, und das ließ die Seite am Handy ruckeln.
 * fahrt.js setzt data-netz, sobald die Kamera auf den Mess-Screen zufährt, und blendet das Netz dann als Ganzes ein.
 */
.fahrer .netz, .fahrer__punkte { display: none; }
.buehne[data-netz] .netz, .buehne[data-netz] .fahrer__punkte { display: block; }
.fahrer .netz { opacity: 0; will-change: opacity; }
.fahrer .gelenk { scale: calc(1 / var(--massstab, 1)); visibility: hidden; opacity: 0; transition: opacity .3s ease, visibility 0s linear .3s; }
.buehne[data-messen] .gelenk { visibility: visible; opacity: 1; pointer-events: auto; transition: opacity .3s ease; }
/* ohne Skript steht der Fahrer still und ganz im Bild. Netz und Punkte gibt es dann nicht, die Winkel stehen in der Liste. */
html:not(.js) .fahrer { left: auto; right: -3vw; top: 50%; width: min(92vw, 136vh); height: auto; aspect-ratio: 3 / 2; translate: 0 -50%; }
html:not(.js) .fahrer .netz, html:not(.js) .fahrer__punkte, html:not(.js) .fahrer__bild { display: none; }

/* ---------- Schrift auf dem Grund ---------- */
.titel { font-family: var(--titelschrift); font-size: var(--gr, var(--fs-titel)); font-weight: 600; letter-spacing: -.01em; line-height: 1; text-wrap: balance; }
/*
 * Wortmarke: das Wort „Bikefitting" steht im ersten und im letzten Screen fett, in Großbuchstaben und nach vorn geneigt,
 * wie der Schriftzug auf einem Rahmen. Es ist das einzige Geneigte der Seite.
 */
.wortmarke { font-family: var(--schrift); font-style: italic; font-weight: 800; letter-spacing: .01em; text-transform: uppercase; }
.satz { max-width: 25em; font-size: var(--fs-satz); line-height: 1.45; }
/* gemessene Zahlen stehen im Punktraster */
.ziffer { font-family: var(--ziffern); font-weight: 900; letter-spacing: .02em; line-height: 1; font-variant-numeric: tabular-nums; }
/* ein Wert außerhalb seines Ziels: davor steht ein Punkt in sattem Celeste */
.ziffer--akzent::before { content: ""; display: inline-block; width: 9px; height: 9px; margin-right: 9px; border-radius: 50%; background: var(--celeste-satt); vertical-align: .2em; }

/* ---------- Knöpfe ---------- */
.knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: 14px; min-height: 58px; padding: 0 9px 0 28px;
  border-radius: var(--r-voll); background: var(--schwarz); color: var(--weiss);
  font-size: 17px; font-weight: 500; text-decoration: none; white-space: nowrap;
  transition: transform .16s var(--ease);
}
.knopf b { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--weiss); color: var(--schwarz); font-size: 18px; transition: transform .3s var(--ease); }
/*
 * Hover nur mit Maus: Am Handy bliebe der Knopf nach dem Antippen angehoben stehen, bis man woanders hintippt.
 * Jede :hover-Regel steht in so einer Abfrage, am Handy antwortet stattdessen :active.
 */
@media (hover: hover) and (pointer: fine) {
  .knopf:hover { transform: translateY(-2px); }
  .knopf:hover b { transform: translateX(3px); }
}
.knopf:active { transform: scale(.97); }
.knopf--hell { background: var(--weiss); color: var(--schwarz); }
.knopf--klein { min-height: 44px; padding: 0 20px; font-size: 15px; }
.knopf .wenn-normal, .knopf .wenn-kopiert { display: inline-flex; align-items: center; gap: 14px; }
.knopf .wenn-kopiert, .knopf[data-zustand="kopiert"] .wenn-normal { display: none; }
.knopf[data-zustand="kopiert"] .wenn-kopiert { display: inline-flex; }

.seite a:focus-visible, .seite button:focus-visible, .seite summary:focus-visible { outline: 2px solid var(--tinte); outline-offset: 3px; }
.seite .nav a:focus-visible { outline-color: var(--weiss); }

/* ---------- Karte: die eine Fläche für Inhalt ---------- */
.karte { position: relative; background: var(--karte); color: var(--tinte); box-shadow: var(--kante-karte); }
.chip { display: inline-flex; align-items: center; gap: 6px; flex: none; height: 38px; padding: 0 16px; border-radius: var(--r-voll); box-shadow: inset 0 0 0 1px currentColor; font-size: 15.5px; white-space: nowrap; }

/* ---------- Leiste oben: dunkel, kantig, von Rand zu Rand, bleibt beim Scrollen stehen ---------- */
.nav {
  position: fixed; z-index: var(--z-leiste); top: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  height: 60px; padding: 0 var(--rand) 0 calc(var(--rand) + var(--einzug));
  background: var(--leiste); color: var(--weiss);
}
.nav__marke { display: inline-flex; align-items: center; min-height: 44px; font-family: var(--titelschrift); font-size: 23px; font-weight: 600; text-decoration: none; }
.nav__links { display: flex; gap: 2px; }
.nav__links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: var(--r-voll); font-size: 15px; text-decoration: none; transition: background-color .2s; }
@media (hover: hover) and (pointer: fine) { .nav__links a:hover { background: color-mix(in srgb, var(--weiss) 16%, transparent); } }
.nav__links a:active { background: color-mix(in srgb, var(--weiss) 16%, transparent); }
@media (max-width: 760px) { .nav__links { display: none; } }

/* ---------- Liste: Name links, Punktraster-Zahl rechts ---------- */
.liste { width: 304px; max-width: 100%; padding: 22px 12px 12px; }
.liste__name { display: block; padding: 0 14px 8px; font-size: 16px; }
.liste__zeile { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: baseline; gap: 6px; width: 100%; min-height: 46px; padding: 9px 14px 5px; border-radius: var(--r-voll); color: inherit; text-align: left; }
.liste__zeile span { font-size: 15px; }
.liste__zeile .ziffer { font-size: 28px; }
.liste__zeile small { min-width: 2.2em; font-size: 12.5px; }
li.liste__zeile + li.liste__zeile { box-shadow: inset 0 1px 0 var(--karte-linie); border-radius: 0; }
button.liste__zeile { cursor: pointer; transition: background-color .25s, box-shadow .25s; }
@media (hover: hover) and (pointer: fine) { button.liste__zeile:hover { background: var(--karte-wahl); } }
button.liste__zeile:active { background: var(--karte-wahl); }
button.liste__zeile[aria-pressed="true"] { background: var(--karte-wahl); box-shadow: inset 0 0 0 1.5px var(--tinte); }
.liste__text { padding: 10px 14px 8px; font-size: 14.5px; line-height: 1.4; }
html.js .liste__text { min-height: 4.4em; }
.liste__text p + p { margin-top: 8px; }

/* ---------- Tafel: große Karte für Text ---------- */
.tafel { padding: clamp(20px, 2.3vw, 36px); }
.tafel__kopf { display: flex; justify-content: space-between; gap: 16px; font-size: 14.5px; }
.tafel__fuss { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 24px; }
.tafel__fuss small { font-size: 14px; }

/* ---------- Beleg: eine große Zahl mit ihrem Namen ---------- */
.beleg { display: block; width: min(440px, 100%); height: 184px; padding: 28px 42px 0; }
.beleg__name { display: block; text-align: center; font-size: 18px; white-space: nowrap; }
.beleg__zeile { display: flex; align-items: baseline; gap: 10px; margin-top: 12px; }
.beleg__zeile .ziffer { font-size: 82px; }
.beleg__zeile small { font-size: 19px; }
.beleg__zeile .chip { margin-left: auto; align-self: center; }

/* ---------- Gelenkpunkt am Fahrer ---------- */
.gelenk { position: absolute; display: grid; place-items: center; width: 48px; height: 48px; margin: -24px 0 0 -24px; border-radius: 50%; }
.gelenk::before {
  /*
   * Nichts leuchtet. Ein nicht gewählter Punkt ist nur ein Umriss: ein leerer Kreis mit weißer Linie, außen eine
   * hauchdünne dunkle Linie, damit er auch auf hellem Grund zu sehen ist. Der gewählte Punkt ist weiß gefüllt mit dunklem
   * Rand, und um ihn liegt ein zweiter, äußerer Kreis. Die Tippfläche bleibt bei allen 48 px.
   */
  content: ""; box-sizing: border-box; width: 14px; height: 14px; border-radius: 50%;
  background: transparent; border: 1.6px solid var(--weiss); box-shadow: 0 0 0 1px rgba(7, 8, 10, .45);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), background-color .3s ease;
}
@media (hover: hover) and (pointer: fine) { .gelenk:hover::before { transform: scale(1.15); } }
.gelenk:active::before { transform: scale(.85); }
.gelenk[aria-pressed="true"]::before { width: 16px; height: 16px; background: var(--weiss); border-color: var(--tinte); box-shadow: 0 0 0 11px rgba(255, 255, 255, .8); }
/* Fokus: heller Ring mit dunklem Rand, sichtbar auf Schwarz und auf hellem Grund */
.seite .gelenk:focus-visible { outline: 3px solid var(--weiss); outline-offset: 2px; box-shadow: 0 0 0 7px var(--schwarz); }
/* mit Skript trägt nur der gewählte Punkt sein Schild */
.gelenk__name {
  position: absolute; left: 46px; top: 50%; translate: 0 -50%; display: flex; align-items: baseline; gap: 8px; padding: 6px 13px 4px;
  border-radius: var(--r-voll); background: var(--weiss); color: var(--tinte); box-shadow: 0 10px 24px -10px rgba(7, 8, 10, .5);
  font-size: 14px; font-weight: 500; white-space: nowrap;
}
.gelenk__name .ziffer { font-size: 21px; }
/* der Kniewinkel läuft beim Treten mit: feste Breite für drei Stellen und das Gradzeichen, damit das Schild nicht springt */
.gelenk[data-gelenk="knie"] .gelenk__name .ziffer { min-width: 2.5em; text-align: right; }
.gelenk__name[hidden] { display: none; }
.gelenk--links .gelenk__name { left: auto; right: 46px; }
.gelenk--oben .gelenk__name { left: 50%; top: auto; bottom: 46px; translate: -50% 0; }

/* ---------- Knotennetz am Fahrer: Gelenke als Knoten, Körpergerüst als Linien ---------- */
/*
 * Alles ist weiß und durchscheinend. Auf dem Fahrer leuchtet es, auf dem hellen Grund hält es ein feiner Schatten.
 * Freie Knoten und ihre Linien liegen hinter dem Fahrer, das Gerüst davor. Es zieht links einen Saum in sattem Celeste
 * nach wie der Fahrer selbst, und die zwei Glieder des gewählten Winkels treten hervor.
 */
.netz { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; fill: none; stroke: var(--weiss); stroke-linecap: round; }
.netz line { vector-effect: non-scaling-stroke; }
.netz__schatten line { stroke: var(--netz-linienschatten); stroke-width: 1.2; }
.netz__kanten line { stroke-width: 1.5; stroke-opacity: .7; transition: stroke-opacity .35s ease, stroke-width .35s ease; }
.netz__kanten line.ist-aktiv { stroke-width: 3; stroke-opacity: 1; }
.netz__saum { stroke: var(--celeste-satt); opacity: .62; }
.netz__saum--weit { opacity: .26; }
/* Linien zu den freien Knoten laufen transparent aus, ihr Verlauf steht je Linie im Bild */
.netz__lauf line, .netz__frei line { stroke-width: 1; }
.netz__lauf-an { stop-color: var(--weiss); stop-opacity: .85; }
.netz__lauf-aus { stop-color: var(--weiss); stop-opacity: 0; }
.netz__laufschatten-an { stop-color: var(--netz-linienschatten); }
.netz__laufschatten-aus { stop-color: var(--netz-linienschatten); stop-opacity: 0; }
.netz__hoefe circle, .netz__frei circle { stroke: none; }
/* die leuchtenden Höfe an den Gelenken gibt es nicht mehr: am Fahrer stehen nur Linien, kleine Kerne und die Punkte zum Antippen */
.netz__hoefe { display: none; }
.netz__kerne circle, .netz__kern { fill: var(--weiss); }
/* freie Knoten neben dem Fahrer: nur ein Hauch */
.netz__frei { opacity: .2; }
/* der große Hof am Knie: weiß wie alle anderen */
.netz__glut-innen { stop-color: var(--weiss); stop-opacity: .9; }
.netz__glut-mitte { stop-color: var(--weiss); stop-opacity: .42; }
.netz__glut-aussen { stop-color: var(--weiss); stop-opacity: 0; }
.netz__hof-innen { stop-color: var(--weiss); stop-opacity: .92; }
.netz__hof-mitte { stop-color: var(--weiss); stop-opacity: .5; }
.netz__hof-aussen { stop-color: var(--weiss); stop-opacity: 0; }
.netz__dunst-innen { stop-color: var(--netz-dunst); }
.netz__dunst-aussen { stop-color: var(--netz-dunst); stop-opacity: 0; }

/* ---------- Knotenfigur: der Fahrer nur aus Knoten. knotenfigur.js lässt ihn treten. ---------- */
/* --kb ist die Breite der Figur, --kx und --ky (0 bis 1) sagen, wo sie im Screen liegt */
.knotenfeld {
  --kh: calc(var(--kb) * .66667);
  position: absolute; width: var(--kb); height: var(--kh);
  left: calc((100cqw - var(--kb)) * var(--kx, .5)); top: calc((100cqh - var(--kh)) * var(--ky, .5));
}
.figur { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; fill: none; stroke: var(--schwarz); stroke-linecap: round; }
/* Die Linien sind leicht verwischt (Filter figur-wisch im Bild selbst) und verschieden stark: manche kräftig, manche fast durchsichtig. */
.figur line { stroke-width: 2; stroke-opacity: .96; vector-effect: non-scaling-stroke; }
.figur line.figur__duenn { stroke-width: 1.2; }
.figur line.figur__mittel { stroke-opacity: .5; }
.figur line.figur__zart { stroke-opacity: .17; }
.figur__reifen { stroke-width: 1.5; stroke-opacity: .5; vector-effect: non-scaling-stroke; }
.figur__hof { stroke: none; }
.figur__kern { fill: var(--schwarz); stroke: none; }
.figur__hof-innen { stop-color: var(--schwarz); stop-opacity: .5; }
.figur__hof-mitte { stop-color: var(--schwarz); stop-opacity: .2; }
.figur__hof-aussen { stop-color: var(--schwarz); stop-opacity: 0; }

/* Sockel: der untere Rand des Screens ist über die ganze Breite schwarz und läuft nach oben weich aus */
.sockel {
  --maske: linear-gradient(to top, black 34%, transparent 100%);
  position: absolute; inset: auto 0 0 0; height: var(--sockel, 46cqh); background: var(--schwarz); pointer-events: none;
  -webkit-mask-image: var(--maske); mask-image: var(--maske);
}
/* Wurf: ein Rad mit Ritzel, nah herangezoomt, steigt aus dem Sockel und läuft nach oben aus. --wb ist die Breite des Bildes, --wx und --wy sagen, wo die Nabe sitzt. */
.wurf {
  --maske: linear-gradient(to right, transparent 0, black 24%), linear-gradient(to bottom, transparent 6%, black 52%);
  --wb: max(120cqw, 130cqh);
  position: absolute; left: calc(var(--wx, 78cqw) - var(--wb) * .3); top: calc(var(--wy, 68cqh) - var(--wb) * .3667); width: var(--wb); height: auto; max-width: none; pointer-events: none;
  -webkit-mask-image: var(--maske); mask-image: var(--maske); -webkit-mask-composite: source-in; mask-composite: intersect;
}

/* ---------- Hinweis nach dem Kopieren ---------- */
.hinweis {
  position: fixed; z-index: var(--z-hinweis); left: 16px; right: 16px; bottom: 96px; width: fit-content; max-width: calc(100% - 32px); margin-inline: auto;
  padding: 14px 22px; border-radius: var(--r-voll); background: var(--schwarz); color: var(--weiss);
  font-size: 15.5px; font-weight: 500; text-align: center;
  opacity: 0; translate: 0 12px; pointer-events: none; transition: opacity .3s, translate .45s var(--ease);
}
.hinweis.ist-da { opacity: 1; translate: 0 0; }

/* ---------- Bewegung: kurz und ruhig, und nur ohne reduzierte Bewegung ---------- */
@media (prefers-reduced-motion: no-preference) {
  /* was erscheint, blendet kurz von unten ein */
  html.js [data-einblenden] { opacity: 0; translate: 0 14px; transition: opacity .35s ease, translate .5s var(--ease); }
  html.js [data-einblenden].ist-da { opacity: 1; translate: 0 0; }
  html.js .stufe:nth-child(2)[data-einblenden] { transition-delay: .08s; }
  html.js .stufe:nth-child(3)[data-einblenden] { transition-delay: .16s; }

  .hero__titel > span, .hero__satz, .hero__knopf { animation: rein .5s var(--ease) both; }
  .hero__titel > span:nth-child(2) { animation-delay: .05s; }
  .hero__satz, .hero__knopf { animation-delay: .1s; }

  /* der Sockel steigt auf, das Rad kommt von rechts ins Bild */
  html.js .sockel[data-einblenden] { opacity: 0; translate: 0 30%; transition: opacity .4s ease, translate 1s var(--ease); }
  html.js .wurf[data-einblenden] { opacity: 0; translate: 22% 0; transition: opacity .35s ease .1s, translate 1.2s var(--ease) .1s; }
  html.js .sockel[data-einblenden].ist-da, html.js .wurf[data-einblenden].ist-da { opacity: 1; translate: 0 0; }

  /* die Höfe der Knotenfigur atmen leicht, jeder in seinem Takt */
  .figur__hof { animation: atmen 5.5s ease-in-out infinite; }
  .figur g:nth-child(3n) .figur__hof { animation-duration: 7s; animation-delay: -2s; }
  .figur g:nth-child(3n + 1) .figur__hof { animation-duration: 6.2s; animation-delay: -4s; }
  /* außerhalb des Bildes ruht das Atmen (knotenfigur.js setzt die Klasse) */
  .figur.ruht .figur__hof { animation-play-state: paused; }
}
@keyframes atmen { 50% { opacity: .5; } }
@keyframes rein { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* ==========================================================
   1 Start: der Fahrer ganz nah am Kopf (Szene „start" in fahrt.js). Nur Titel, ein Satz, der Knopf.
   Die Schrift steht im freien Raum vor dem Gesicht. Querformat: Kopf links, Schrift rechts.
   Hochformat: Schrift oben, Kopf darunter, der Körper läuft unten aus dem Bild.
   ========================================================== */
.hero { align-content: center; justify-items: end; padding: 96px var(--rand) clamp(32px, 7vh, 88px); }
.hero__text { width: min(680px, 47vw); margin-right: clamp(0px, 4vw, 76px); }
.hero__titel > span { display: block; }
.hero__titel .wortmarke { font-size: var(--fs-hero); line-height: .95; }
.hero__zeile { margin-top: .35em; font-family: var(--titelschrift); font-size: clamp(24px, 2.7vw, 46px); font-weight: 600; letter-spacing: -.01em; line-height: 1.05; color: var(--celeste-dunkel); }
.hero__satz { max-width: 29em; margin-top: 22px; font-size: clamp(16px, 1.25vw, 18px); }
.hero__knopf { margin-top: 26px; }
@media (orientation: portrait) {
  .hero { align-content: start; justify-items: start; padding-top: 86px; }
  .hero__text { width: auto; margin-right: 0; }
  .hero__titel .wortmarke { font-size: clamp(40px, 12vw, 92px); }
  .hero__zeile { font-size: clamp(24px, 6.4vw, 46px); }
}

/* ==========================================================
   2 Ablauf: Celeste, drei Karten auf dem Fahrer
   ========================================================== */
.ablauf { align-content: space-between; gap: 28px; padding: 124px var(--rand) clamp(40px, 9vh, 96px); }
.ablauf > .titel { margin-left: var(--einzug); }
.stufen { display: grid; gap: 12px; width: min(780px, 100%); justify-self: center; }
.stufe { display: grid; grid-template-columns: 150px auto minmax(0, 1fr); align-items: center; gap: 6px 22px; min-height: 108px; padding: 12px 40px 12px 34px; }
.stufe .ziffer { font-size: 40px; }
.stufe h3 { font-family: var(--titelschrift); font-size: clamp(26px, 2.7vw, 40px); font-weight: 600; line-height: 1.05; }
.stufe p { justify-self: end; max-width: 15em; text-align: right; font-size: 15.5px; line-height: 1.35; }

/* ==========================================================
   3 Messwerte: der ganze Fahrer steht mittig, die beiden Karten liegen halb auf den Laufrädern
   ========================================================== */
/*
 * Die Lage der Karten rechnet sich aus der Lage des Fahrers (Szene „messwerte" in fahrt.js, --fahrer ist seine Breite):
 * die Hinterradnabe liegt bei 32 % seiner Breite, die Vorderradnabe bei 67,3 %, beide also 17,65 % von der Mitte.
 * Jede Karte reicht 30 px über ihre Nabe zur Mitte hin. Weil der Fahrer mittig steht, haben beide Karten denselben
 * Abstand zum Rand (--karte-rand). Kein Gelenkpunkt wird verdeckt.
 */
.messen {
  --fahrer: min(104vw, 140vh); --karte-rand: max(0px, calc(50vw - .1765 * var(--fahrer) - 274px - var(--rand)));
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto 1fr; align-items: end; gap: 24px; padding: 116px var(--rand) clamp(26px, 6vh, 56px);
}
.messen__kopf { grid-column: 1 / -1; align-self: start; justify-self: start; display: grid; gap: 14px; margin-left: var(--einzug); }
.messen__winkel { justify-self: start; margin-left: var(--karte-rand); }
.messen__masse { justify-self: end; margin-right: var(--karte-rand); margin-bottom: clamp(0px, 12vh, 124px); }

/* ==========================================================
   4 KI-Export: der Prompt in einer Karte, als eigenes Feld
   ========================================================== */
.ki { align-content: center; justify-items: end; padding: 104px clamp(14px, 5vw, 96px) clamp(30px, 6vh, 64px); }
.ki__tafel { width: min(600px, 100%); }
.ki__tafel .titel { --gr: var(--fs-titel-karte); margin-top: 16px; }
.prompt__text { margin: 20px 0 0; padding: 16px 18px; background: var(--grund); font-family: var(--schrift); font-size: 14.5px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }

/* ==========================================================
   5 Dein Video bleibt bei dir: Celeste ohne Fahrer. Von ihm bleiben nur die Knoten, stark herangezoomt.
   ========================================================== */
.privat { --kb: max(200cqw, 160cqh); --kx: .434; --ky: .594; align-content: space-between; justify-items: start; gap: 32px; padding: 132px var(--rand) clamp(40px, 9vh, 96px); }
.privat .titel { --gr: clamp(38px, 5.4vw, 88px); max-width: 8.4em; margin-left: var(--einzug); }
.privat__karte { margin-left: clamp(0px, 17vw, 270px); margin-bottom: clamp(0px, 5vh, 56px); }

/* ==========================================================
   6 Fragen: die Karte trägt auch die Überschrift
   ========================================================== */
.fragen { align-content: center; justify-items: start; padding: 104px clamp(14px, 6vw, 110px) clamp(30px, 6vh, 64px); }
.fragen__tafel { width: min(540px, 100%); padding: clamp(20px, 2.3vw, 36px) 12px 10px; }
.fragen__tafel .titel { --gr: var(--fs-titel-karte); padding: 0 18px 14px; }
.frage + .frage, .titel + .frage { box-shadow: inset 0 1px 0 var(--karte-linie); }
.frage summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 66px; padding: 8px 8px 8px 18px; font-size: clamp(18px, 1.5vw, 21px); letter-spacing: -.01em; cursor: pointer; list-style: none; border-radius: 30px; }
.frage summary::-webkit-details-marker { display: none; }
.frage summary i { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--karte-ring); font-size: 16px; transition: transform .35s var(--ease), scale .16s var(--ease); }
.frage summary:active i { scale: .9; }
.frage[open] summary i { transform: rotate(45deg); }
.frage p { max-width: 30em; padding: 0 18px 20px; font-size: 16px; line-height: 1.45; }

/* ==========================================================
   7 Abschluss: der schwarze Block ist der Knopf. Es gibt ihn nur hier.
   ========================================================== */
.los { grid-template-rows: auto 1fr auto; gap: 24px; padding: 124px 0 0; }
.los__satz { --gr: clamp(32px, 4vw, 64px); max-width: 11em;margin-left: calc(var(--rand) + var(--einzug)); }
.los__knopf { display: block; width: fit-content; margin: 0 var(--rand) 0 calc(var(--rand) + var(--einzug)); text-decoration: none; transition: translate .3s var(--ease), scale .16s var(--ease); }
@media (hover: hover) and (pointer: fine) { .los__knopf:hover { translate: 0 -4px; } }
.los__knopf:active { scale: .98; }
.los > .los__knopf { align-self: end; }
/* jede Zeile ist ein eigener schwarzer Balken, so breit wie ihr Text */
.block { display: block; font-family: var(--titelschrift); font-size: var(--fs-block); font-weight: 600; letter-spacing: -.01em; line-height: 1; color: var(--weiss); }
.block > span { display: flex; align-items: center; gap: .18em; width: fit-content; padding: .05em .2em .13em .22em; margin-top: -.03em; background: var(--schwarz); white-space: nowrap; }
.los__pfeil { display: grid; place-items: center; flex: none; width: .66em; height: .66em; margin-top: .06em; border-radius: 50%; background: var(--weiss); color: var(--schwarz); }
.los__pfeil i { font-size: .36em; }
.seite .los__knopf:focus-visible { outline: 3px solid var(--tinte); outline-offset: 8px; }
/* Fuß: schwarz, kantig, von Rand zu Rand, wie die Leiste oben */
.fuss { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 28px; min-height: 76px; padding: 12px var(--rand) 12px calc(var(--rand) + var(--einzug)); background: var(--schwarz); color: var(--weiss); font-size: 14.5px; }
.seite .fuss a:focus-visible { outline-color: var(--weiss); }
.fuss nav { display: flex; gap: 6px; }
.fuss a { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; padding: 0 8px; }

/* ==========================================================
   Hochformat (Handy und Tablet hochkant): oben die Überschrift, darunter der Fahrer, darauf oder darunter die Karten
   ========================================================== */
@media (max-width: 760px), (max-width: 1100px) and (orientation: portrait) {
  .ablauf { padding-top: 104px; }

  /* erst der Fahrer mit allen Punkten, darunter die beiden Karten: so verdeckt nichts einen Punkt */
  .messen { grid-template-rows: auto 92vw auto; align-items: start; gap: 14px; padding-top: 100px; }
  .messen__kopf { gap: 8px; }
  .messen__winkel, .messen__masse { grid-row: 3; margin: 0; }

  .ki { align-content: end; }
  .privat { --wx: 68cqw; --sockel: 44cqh; padding-top: 108px; }
  .fragen { align-content: end; padding-inline: var(--rand); }

  .los { padding-top: 104px; }
  /* schmal genug, dass der Satz auch am kleinen Handy in zwei Zeilen links vom Rad bleibt */
  .los__satz { --gr: clamp(24px, 7.2vw, 58px); }
  .block { font-size: clamp(56px, 18.4vw, 150px); }

  html:not(.js) .fahrer { right: auto; left: 50%; top: 31%; width: min(162vw, 78vh); translate: -50% -50%; }
}

/* ==========================================================
   Handy: kompaktere Bauteile, die Karten stehen untereinander
   ========================================================== */
@media (max-width: 760px) {
  .hero .knopf { min-height: 54px; }
  .hero .knopf b { width: 38px; height: 38px; }
  .hero__satz { margin-top: 16px; }
  .hero__knopf { margin-top: 20px; }

  .stufe { grid-template-columns: auto minmax(0, 1fr); gap: 4px 14px; min-height: 0; padding: 18px 26px 18px; }
  .stufe .ziffer { font-size: 30px; }
  .stufe h3 { justify-self: end; font-size: 26px; }
  .stufe p { grid-column: 1 / -1; justify-self: start; max-width: none; text-align: left; font-size: 15px; }

  .messen { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 92vw auto auto; }
  .messen__winkel { width: 100%; }
  .messen__masse { grid-row: 4; width: 100%; }

  .ki { padding-inline: var(--rand); }
  .beleg { width: min(350px, 100%); height: 156px; padding: 22px 30px 0; }
  .beleg__name { font-size: 16.5px; }
  .beleg__zeile { gap: 8px; margin-top: 10px; }
  .beleg__zeile .ziffer { font-size: 64px; }
  .beleg__zeile small { font-size: 16px; }
  .beleg__zeile .chip { height: 34px; padding: 0 13px; font-size: 14.5px; }
  .privat__karte { justify-self: center; margin-left: 0; margin-bottom: 4vh; }

  .fuss { padding-top: 10px; }
  .fuss span { order: 3; flex-basis: 100%; padding: 0 8px 6px; }
}
