/* ============================================================
   Ablauf-Seite (nur ablauf.html, nach style.css geladen).
   Präfix ab- , damit nichts mit den alten .da-/.flow-Regeln kollidiert.
   ============================================================ */

/* ---------- Kopf ---------- */
.ab-kopf .hero-inner {
  grid-template-columns: minmax(0, 0.96fr) minmax(0, 1.04fr);
  align-items: center;
  gap: clamp(28px, 3.4vw, 48px);
  padding-top: calc(var(--nav-h) + clamp(20px, 2.4vw, 32px));
  padding-bottom: clamp(20px, 2.4vw, 28px);
}
.ab-kopf h1 { font-size: clamp(36px, 3.7vw, 52px); max-width: none; line-height: 1.02; letter-spacing: -0.03em; }
.ab-kopf .hero-sub { margin-top: 20px; font-size: clamp(16px, 1.35vw, 19px); color: var(--dark-text); opacity: 0.86; }
.ab-kopf .hero-ctas { align-items: center; gap: 22px 36px; margin-top: 36px; }
.ab-kopf-bild {
  overflow: hidden;
  aspect-ratio: 16 / 9;
} /* kein Rahmen/Grund: das Foto läuft per gemeinsamer Maske (style.css) in den Kopf aus */
.ab-kopf-bild img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Abschnittsköpfe: Eyebrow neutral wie im Entwurf ---------- */
.ab-ueberblick .eyebrow, .ab-detail > .wrap > .eyebrow { color: var(--ink-2); }
.ab-ueberblick h2, .ab-detail h2 { max-width: none; letter-spacing: -0.03em; }

/* ---------- Überblick: sechs Punkte auf einer Linie ---------- */
.ab-ueberblick { padding-block: clamp(36px, 3.4vw, 48px) clamp(24px, 2.4vw, 32px); border-bottom: 1px solid var(--line); }
.ab-zeitleiste {
  list-style: none;
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-top: clamp(12px, 1.4vw, 20px);
  position: relative;
}
/* Linie läuft von Punkt 1 bis Punkt 6 (Mitte der ersten bis Mitte der letzten Spalte) */
.ab-zeitleiste::before {
  content: ""; position: absolute; top: 22px; left: calc(100% / 12); right: calc(100% / 12);
  height: 1px; background: var(--line);
}
.ab-zeitleiste a {
  position: relative;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 0 8px 4px;
  border-radius: 12px;
}
.ab-punkt {
  display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--accent); color: #fff;
  font-weight: 600; font-size: 16px;
  box-shadow: 0 0 0 6px var(--paper);
  transition: transform 0.35s var(--ease);
}
.ab-zeitleiste b { margin-top: 18px; font-size: clamp(17px, 1.35vw, 20px); font-weight: 600; letter-spacing: -0.01em; }
.ab-zl-text { margin-top: 4px; font-size: 15.5px; line-height: 1.4; color: var(--ink-3); max-width: 17ch; }
/* Titel sind unterschiedlich lang: Pfeile unten ausrichten, damit die Reihe ruhig bleibt */
.ab-zeitleiste a { height: 100%; }
.ab-zeitleiste .ph { margin-top: auto; padding-top: 14px; font-size: 20px; color: var(--ink); transition: transform 0.3s var(--ease), color 0.3s; }
.ab-zeitleiste a:hover .ab-punkt { transform: scale(1.08); }
.ab-zeitleiste a:hover .ph { color: var(--accent); transform: translateX(4px); }
.ab-zeitleiste a:focus-visible { outline: 2px solid var(--accent-deep); outline-offset: 4px; }

/* ---------- Detail: Bildergeschichte ---------- */
.ab-detail { padding-top: clamp(32px, 3vw, 40px); }
/* Rand, um den Streifen und Kapitelreihe bis an den Bildschirm laufen dürfen */
.ab-detail { --rand: clamp(20px, 4vw, 48px); }

/* Kapitel: orangener Kreis, Name, auslaufende Linie */
.ab-kap {
  display: flex; gap: 6px;
  margin-top: clamp(20px, 2vw, 28px); margin-bottom: 14px;
}
.ab-kap button {
  flex: 1; min-width: 0; min-height: 44px;
  display: flex; align-items: center; gap: 10px;
  padding: 0 4px; border-radius: 999px;
  font-weight: 600; font-size: 15px; color: var(--ink-3); text-align: left;
  scroll-margin-top: calc(var(--nav-h) + 24px);
  transition: color 0.3s;
}
.ab-kap b {
  flex: none; display: grid; place-items: center;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--paper-2); color: var(--ink-3); font-size: 13px;
  transition: background 0.3s, color 0.3s, transform 0.35s var(--ease);
}
.ab-kap span { white-space: nowrap; }
.ab-kap i { flex: 1; height: 2px; min-width: 12px; background: linear-gradient(90deg, var(--line), transparent); transition: background 0.3s; }
.ab-kap button:hover, .ab-kap [aria-current] { color: var(--ink); }
.ab-kap button:hover b { transform: scale(1.08); }
.ab-kap [aria-current] b { background: var(--accent); color: #fff; }
.ab-kap [aria-current] i { background: linear-gradient(90deg, var(--accent), rgba(224, 89, 16, 0.15)); }
.ab-kap button:focus-visible, .ab-streifen:focus-visible { outline: 2px solid var(--accent-deep); outline-offset: 3px; }

/* Streifen: alle Arbeitsschritte, waagerecht wischbar, rastet je Karte ein.
   Karten bleiben gleich hoch: Text auf 4 Zeilen begrenzt, „Mehr“ legt den vollen Text über die Karte. */
.ab-buehne { position: relative; --kw: 264px; }
.ab-streifen {
  list-style: none;
  display: flex; gap: 14px;
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scroll-behavior: smooth;
  padding: 4px 0 16px; border-radius: 18px;
}
.ab-karte, .ab-ende {
  flex: none; width: var(--kw);
  scroll-snap-align: start;
  position: relative; display: flex; flex-direction: column;
  background: #fff; border-radius: 18px; overflow: hidden;
  box-shadow: 0 1px 0 rgba(22, 24, 27, 0.05), 0 18px 40px -30px rgba(22, 24, 27, 0.4);
}
/* Neue Gruppe: etwas mehr Luft davor */
.ab-gruppenstart:not(:first-child) { margin-left: 14px; }
.ab-karte-bild { position: relative; flex: none; aspect-ratio: 4 / 5; background: var(--paper-2); overflow: hidden; }
.ab-karte-bild img, .ab-karte-bild video, .ab-karte-bild > svg { display: block; width: 100%; height: 100%; object-fit: cover; }
.ab-karte-bild > svg { background: #17181a; }
.ab-logo-kachel { display: grid; place-items: center; width: 100%; height: 100%; background: #17181a; }
.ab-logo-kachel img { width: 34%; height: auto; opacity: 0.9; }
.ab-diagramm { position: absolute; inset: 0; }
.ab-diagramm svg { display: block; width: 100%; height: 100%; }
.ab-diagramm-knopf {
  position: absolute; right: 12px; bottom: 12px; z-index: 2;
  min-height: 34px; padding: 0 14px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.94); color: var(--ink); font-size: 13px; font-weight: 600;
  box-shadow: 0 2px 8px rgba(22, 24, 27, 0.18);
}
.ab-diagramm-knopf[aria-pressed="true"] { background: var(--accent); color: #fff; }
.ab-karte-num {
  position: absolute; left: 12px; top: 12px; z-index: 2;
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: #fff; color: var(--ink); font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums;
  box-shadow: 0 2px 8px rgba(22, 24, 27, 0.18); /* hebt den Kreis auch von hellen Fotos ab */
}
.ab-karte-text { flex: 1; display: flex; flex-direction: column; padding: 14px 16px 16px; background: #fff; }
.ab-karte-gruppe {
  font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent-deep); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ab-karte h3 { margin-top: 8px; font-size: 17px; line-height: 1.2; letter-spacing: -0.01em; }
.ab-karte-text > p {
  margin-top: 6px; font-size: 14px; line-height: 1.45; color: var(--ink-3);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; line-clamp: 4; overflow: hidden;
}
.ab-karte-text.ist-lang > p { -webkit-mask-image: linear-gradient(#000 60%, transparent); mask-image: linear-gradient(#000 60%, transparent); }
.ab-karte-mehr { display: none; }
.ab-mehr {
  align-self: flex-start; margin-top: auto; padding-top: 6px; min-height: 40px;
  font-size: 14px; font-weight: 600; color: var(--accent-deep);
}
.ab-mehr:hover { color: var(--ink); }
/* Aufgeklappt: Text liegt über der ganzen Karte und scrollt in sich */
.ab-karte.ist-offen .ab-karte-text { position: absolute; inset: 0; z-index: 3; overflow-y: auto; overscroll-behavior: contain; }
.ab-karte.ist-offen .ab-karte-text > p { display: block; -webkit-mask-image: none; mask-image: none; }
.ab-karte.ist-offen .ab-karte-mehr { display: block; }
.ab-karte-mehr ul { list-style: none; display: grid; gap: 6px; margin-top: 10px; }
.ab-karte-mehr li { position: relative; padding-left: 16px; font-size: 13.5px; line-height: 1.45; color: var(--ink-2); }
.ab-karte-mehr li::before { content: ""; position: absolute; left: 0; top: 0.7em; width: 8px; height: 2px; background: var(--accent); }
.ab-karte-mehr li b, .ab-karte-mehr li strong { color: var(--ink); font-weight: 600; }
.ab-hinweis {
  display: flex; gap: 8px; align-items: flex-start; margin-top: 12px; padding: 10px 12px;
  border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: var(--radius-input);
  font-size: 13.5px; line-height: 1.45; color: var(--ink);
}
.ab-hinweis .ph { color: var(--accent-deep); font-size: 16px; flex: none; margin-top: 1px; }

/* Abschluss: gibt am Ende Auslauf, damit auch hintere Schritte nach vorn rücken können */
.ab-ende { justify-content: flex-end; padding: 24px 22px 26px; background: var(--paper-2); box-shadow: none; }
.ab-ende-haken { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 22px; }
.ab-ende h3 { margin-top: 18px; font-size: 22px; line-height: 1.15; letter-spacing: -0.02em; }
.ab-ende p { margin-top: 8px; font-size: 14.5px; line-height: 1.45; color: var(--ink-3); }
.ab-ende-link { display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; min-height: 44px; font-weight: 600; color: var(--ink); }
.ab-ende-link .ph { transition: transform 0.3s var(--ease); }
.ab-ende-link:hover { color: var(--accent-deep); }
.ab-ende-link:hover .ph { transform: translateX(4px); }

/* Pfeile (Desktop): mittig auf Bildhöhe, je eine Karte weiter */
.ab-pfeil {
  position: absolute; z-index: 4; top: calc(4px + var(--kw) * 0.625 - 24px);
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
  background: #fff; color: var(--ink); font-size: 20px;
  box-shadow: 0 2px 4px rgba(22, 24, 27, 0.08), 0 12px 28px -12px rgba(22, 24, 27, 0.45);
  transition: opacity 0.3s, transform 0.3s var(--ease);
}
.ab-pfeil-zurueck { left: -20px; }
.ab-pfeil-vor { right: -20px; }
.ab-pfeil:hover { transform: scale(1.06); }
.ab-pfeil:disabled { opacity: 0; pointer-events: none; }
.ab-pfeil:focus-visible, .ab-mehr:focus-visible, .ab-diagramm-knopf:focus-visible { outline: 2px solid var(--accent-deep); outline-offset: 3px; }
.ab-wischen { margin-top: 6px; text-align: center; font-size: 14px; color: var(--ink-3); }

/* Dacharten bleiben als eigene Sektion darunter */

/* ---------- Tablet / Mobil ---------- */
@media (max-width: 900px) {
  .ab-kopf .hero-inner { grid-template-columns: 1fr; padding-bottom: 32px; }
  .ab-kopf { --fade-x: var(--fade-voll); } /* Bild unter dem Text: nur nach unten ausblenden */
  .ab-kopf-bild { aspect-ratio: 16 / 10; }

  /* Zeitleiste senkrecht: Punkt links, Text rechts */
  .ab-zeitleiste { grid-template-columns: 1fr; gap: 0; }
  .ab-zeitleiste::before { top: 22px; bottom: 22px; left: 22px; right: auto; width: 1px; height: auto; }
  .ab-zeitleiste a {
    display: grid; grid-template-columns: 44px 1fr auto; column-gap: 16px;
    align-items: center; text-align: left; padding: 8px 0;
  }
  .ab-punkt { grid-row: 1 / 3; }
  .ab-zeitleiste b { margin-top: 0; }
  .ab-zl-text { grid-column: 2; margin-top: 0; max-width: none; }
  .ab-zeitleiste .ph { grid-column: 3; grid-row: 1 / 3; margin-top: 0; }

  /* Kapitelreihe und Streifen laufen bis an den Bildschirmrand */
  .ab-kap, .ab-streifen { margin-inline: calc(-1 * var(--rand)); padding-inline: var(--rand); scroll-padding-inline: var(--rand); }
  .ab-kap { overflow-x: auto; scrollbar-width: none; gap: 4px; }
  .ab-kap::-webkit-scrollbar { display: none; }
  .ab-kap button { flex: none; gap: 8px; padding-right: 10px; font-size: 14.5px; }
  .ab-kap i { display: none; }
  .ab-streifen { border-radius: 0; }
  .ab-buehne { --kw: 82%; }
  .ab-karte, .ab-ende { max-width: 340px; }
  .ab-pfeil { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .ab-streifen { scroll-behavior: auto; }
}

/* ---------- Kopf: nur diese Seite ----------
   Die Überschrift ist zweizeilig umgebrochen; "Überraschungen." ist länger als
   auf den Schwesterseiten und würde mobil über den Rand laufen. */
@media (max-width: 1080px) {
  .pr-kopf .pr-titel { font-size: clamp(34px, 9vw, 112px); }
}

/* „Keine Überraschungen.“: bei Zeilenhöhe 0.86 ragen die Ü-Punkte der zweiten
   Zeile in die erste und sehen zwischen „Sechs“ und „Schritte“ wie ein Komma aus. */
.pr-kopf .pr-titel { line-height: 0.96; }
