/* ============================================================
   Der Klickweg der Bestellstrecke (26.09.2026, Nachtrag 9n, G3, D7).

   Gestaltung nach der Designfläche Version 6 (`produkte/firmenwebsite/
   entwuerfe/kundenstrecke/klickstrecke/designflaeche/erzeuge.py`), mit den
   Farben des Hauses (`kp.css`, dieselben Werte wie auf der Fläche). Die
   Schrift der Fläche („Public Sans“) kommt unter der CSP nur selbst
   gehostet in Frage; bis dahin trägt die hauseigene „Switzer“ (Offen im
   Bericht).

   DIESELBEN DREI REGELN WIE `kp.css`: jede Klasse mit `kp-kw-`, kein
   Inline-Stil, nichts von fremden Hosts. Dazu eine vierte: KEIN SKRIPT. Jede
   Karte ist ein Absendeknopf, jeder Aufklapper ein `details`.

   Mobil zuerst; bei 390 px Breite läuft nichts über (Z9).
   ============================================================ */

.kp-main.kp-kw-schmal { width: min(640px, calc(100% - 32px)); }
.kp-main.kp-kw-breit { width: min(760px, calc(100% - 32px)); }
.kp-main.kp-kw-weit { width: min(1040px, calc(100% - 32px)); }

.kp-kw-stapel { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.kp-kw-stapel > * { min-width: 0; }
.kp-kw-eng { display: flex; flex-direction: column; gap: 10px; }

.kp-kw-h1 {
  font-size: 25px; line-height: 1.2; font-weight: 600; margin: 0;
  letter-spacing: -0.01em;
}
.kp-kw-h2 { font-size: 18px; line-height: 1.3; font-weight: 700; margin: 0; }
.kp-kw-unter { font-size: 17px; line-height: 1.4; color: var(--kp-ink-70); margin: 0; }
.kp-kw-klein { font-size: 13px; line-height: 1.5; }
.kp-kw-text { font-size: 15px; line-height: 1.55; }
.kp-kw-gross { font-size: 17px; line-height: 1.4; }
.kp-kw-grau { color: var(--kp-ink-70); }
.kp-kw-gruen { color: #1e7b3a; }
.kp-kw-fett { font-weight: 600; }
.kp-kw-p { margin: 0; overflow-wrap: anywhere; }
.kp-kw-tnum { font-variant-numeric: tabular-nums; }

/* ---------- Schritte und Stufenzeile ---------- */

/* Die Schrittleiste (28.09.2026): vier gleich breite Spalten, in jeder ein
   Kreis und darunter der Name. Die Linie zwischen zwei Kreisen zeichnet der
   jeweils rechte Schritt mit `::before`, von der Mitte des linken Kreises
   bis zu seinem eigenen Kreis; blau, sobald der Schritt erreicht ist. */
.kp-kw-schritte { margin: 0 0 4px 0; }
.kp-kw-schrittliste {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
}
.kp-kw-schritt {
  position: relative; display: flex; flex-direction: column;
  align-items: center; gap: 8px; text-align: center; min-width: 0;
}
.kp-kw-schritt::before {
  content: ""; position: absolute; top: 15px; height: 2px;
  left: calc(-50% + 22px); right: calc(50% + 22px);
  background: #d6d5cf; border-radius: 1px;
}
.kp-kw-schritt:first-child::before { display: none; }
.kp-kw-schritt-aktiv::before, .kp-kw-schritt-erledigt::before { background: var(--kp-blue); }
.kp-kw-schritt-kreis {
  width: 32px; height: 32px; border-radius: 16px; flex-shrink: 0;
  display: flex !important; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums;
  border: 2px solid #c9c8c2; background: #ffffff; color: var(--kp-ink-70);
}
.kp-kw-schritt-aktiv .kp-kw-schritt-kreis {
  background: var(--kp-blue); border-color: var(--kp-blue); color: #ffffff;
  box-shadow: 0 0 0 5px var(--kp-blue-soft);
}
.kp-kw-schritt-erledigt .kp-kw-schritt-kreis { border-color: var(--kp-blue); color: var(--kp-blue); }
.kp-kw-schritt-name {
  font-size: 13px; line-height: 1.3; color: var(--kp-ink-70);
  overflow-wrap: anywhere;
}
.kp-kw-schritt-aktiv .kp-kw-schritt-name { color: var(--kp-ink); font-weight: 700; }
.kp-kw-schritt-erledigt .kp-kw-schritt-name { color: var(--kp-blue); font-weight: 600; }
.kp-kw-schritt-knopf {
  background: none; border: none; padding: 0; margin: 0; font: inherit;
  color: inherit; cursor: pointer; display: flex; flex-direction: column;
  align-items: center; gap: 8px; min-width: 0; max-width: 100%;
}
.kp-kw-schritt-knopf:hover .kp-kw-schritt-kreis { background: var(--kp-blue-soft); }
.kp-kw-schritt-knopf:hover .kp-kw-schritt-name { text-decoration: underline; text-underline-offset: 3px; }
.kp-kw-schritt-knopf:focus-visible { outline: 2px solid var(--kp-blue); outline-offset: 4px; border-radius: 8px; }
/* Nur für Vorlesewerkzeuge: Nummer und Stand des Schritts. */
.kp-kw-sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
@media (min-width: 768px) {
  .kp-kw-schritt-name { font-size: 14px; }
}

/* Ein Absendeknopf, der aussieht wie ein Verweis: für „Zurück“, „ändern“ und
   erledigte Schritte. Er trägt die Wahl im Rumpf des POST mit. */
.kp-kw-link {
  background: none; border: none; padding: 0; margin: 0;
  font: inherit; color: var(--kp-blue); text-decoration: underline;
  text-underline-offset: 3px; cursor: pointer; text-align: left;
}
.kp-kw-link:hover { color: #1a2a96; }
.kp-kw-link:focus-visible { outline: 2px solid var(--kp-blue); outline-offset: 2px; }

/* ---------- Karten (ein Klick wählt und geht weiter) ---------- */

.kp-kw-legende { font-size: 13px; color: var(--kp-ink-70); padding: 0; margin: 0 0 4px 0; }
.kp-kw-feldsatz { border: none; margin: 0; padding: 0; min-width: 0; }
.kp-kw-karten { display: flex; flex-direction: column; gap: 14px; }

.kp-kw-karte {
  display: flex; flex-direction: column; gap: 12px; width: 100%;
  padding: 20px; background: #ffffff; color: var(--kp-ink);
  border: 1px solid #e3e2dd; border-radius: 8px; cursor: pointer;
  font: inherit; text-align: left; min-width: 0;
}
.kp-kw-karte:hover { border-color: var(--kp-blue); }
.kp-kw-karte:focus-visible { outline: 3px solid var(--kp-blue); outline-offset: 2px; }
.kp-kw-karte-gewaehlt { border: 2px solid var(--kp-blue); padding: 19px; }
.kp-kw-karte span { display: block; }
.kp-kw-karte-kopf { font-size: 17px; font-weight: 600; }
.kp-kw-karte-betrag { display: flex; flex-direction: column; gap: 2px; }
.kp-kw-betrag { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.kp-kw-betrag-gross { font-size: 20px; }
.kp-kw-gewaehlt-marke { font-size: 13px; font-weight: 600; color: var(--kp-blue); }

.kp-kw-person { display: flex !important; gap: 10px; align-items: center; }
.kp-kw-foto {
  width: 44px; height: 44px; border-radius: 22px; object-fit: cover;
  flex-shrink: 0;
}

/* Zeilen in Karten und Blättern */
.kp-kw-zeile {
  display: flex !important; gap: 16px; align-items: baseline;
  justify-content: space-between; padding: 12px 0;
  border-top: 1px solid #e3e2dd; min-width: 0;
}
.kp-kw-zeile:first-child { border-top: none; }
.kp-kw-zeile > :first-child { min-width: 0; overflow-wrap: anywhere; }

/* ---------- Tarifkarten (Stufenwahl) ---------- */

.kp-kw-tarife { display: flex; flex-direction: column; gap: 16px; }
.kp-kw-tarif {
  display: flex; flex-direction: column; gap: 14px; padding: 24px;
  background: #ffffff; border: 1px solid #e3e2dd; border-radius: 8px;
  min-width: 0;
}
.kp-kw-tarif-empfohlen { border: 2px solid var(--kp-blue); padding: 23px; }
.kp-kw-empfohlen { color: var(--kp-blue); font-weight: 600; font-size: 13px; margin: 0; }
.kp-kw-unsichtbar { visibility: hidden; }
.kp-kw-preis { font-size: 34px; font-weight: 700; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }

/* ---------- Knöpfe ---------- */

.kp-kw-knopf {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 8px 24px; border-radius: 8px;
  border: 2px solid var(--kp-blue); background: var(--kp-blue);
  color: #ffffff; font: inherit; font-weight: 600; text-decoration: none;
  cursor: pointer; text-align: center; white-space: normal;
}
.kp-kw-knopf:hover { background: #1a2a96; border-color: #1a2a96; color: #ffffff; }
.kp-kw-knopf:focus-visible { outline: 3px solid var(--kp-ink); outline-offset: 2px; }
.kp-kw-knopf-hell { background: #ffffff; color: var(--kp-blue); }
.kp-kw-knopf-hell:hover { background: var(--kp-blue-soft); color: var(--kp-blue); }
.kp-kw-knopf-voll { width: 100%; }

/* ---------- Aufklapper (ohne Skript) ---------- */

.kp-kw-mehr summary {
  cursor: pointer; color: var(--kp-blue); font-size: 13px; font-weight: 500;
  padding: 12px 0; list-style-position: inside;
}
.kp-kw-mehr[open] summary { margin-bottom: 8px; }
.kp-kw-mehr ul { margin: 0 0 12px 0; padding-left: 20px; }
.kp-kw-mehr li { margin: 0 0 8px 0; }

/* ---------- Blätter der Prüfseite und der Kasten ---------- */

.kp-kw-blatt {
  background: #ffffff; border: 1px solid #e3e2dd; border-radius: 8px;
  padding: 8px 20px 12px 20px; min-width: 0;
}
.kp-kw-blatt-kopf { font-size: 17px; font-weight: 700; margin: 16px 0 4px 0; }
.kp-kw-kasten {
  background: #ffffff; border: 2px solid var(--kp-ink); border-radius: 8px;
  padding: 8px 20px 20px 20px; min-width: 0;
}
.kp-kw-kzeile {
  display: flex; flex-direction: column; gap: 4px; padding: 12px 0;
  border-top: 1px solid #e3e2dd; min-width: 0;
}
.kp-kw-kzeile-rumpf { display: flex; justify-content: space-between; gap: 12px; min-width: 0; }
.kp-kw-kzeile-rumpf > :first-child { min-width: 0; overflow-wrap: anywhere; }

.kp-kw-azeile { display: flex; flex-direction: column; gap: 4px; padding: 12px 0; border-top: 1px solid #e3e2dd; }
.kp-kw-azeile:first-of-type { border-top: none; }
.kp-kw-azeile-kopf, .kp-kw-azeile-rumpf { display: flex; justify-content: space-between; gap: 12px; min-width: 0; }
.kp-kw-azeile-rumpf > :first-child { min-width: 0; overflow-wrap: anywhere; }

.kp-kw-erklaerung { display: flex; gap: 14px; align-items: flex-start; padding: 12px 0; }
.kp-kw-erklaerung input { width: 20px; height: 20px; margin: 3px 0 0 0; flex-shrink: 0; accent-color: var(--kp-blue); }
.kp-kw-links { display: flex; flex-direction: column; gap: 8px; padding: 0 0 8px 34px; }

.kp-kw-verweise { display: flex; flex-direction: column; gap: 8px; }

/* ---------- Formular der Angaben ---------- */

.kp-kw-formular { display: flex; flex-direction: column; gap: 18px; }
.kp-kw-feld { display: flex; flex-direction: column; gap: 6px; min-width: 0; flex: 1 1 0; }
.kp-kw-feld label, .kp-kw-feld .kp-kw-feldname { font-size: 13px; font-weight: 600; }
.kp-kw-feld input, .kp-kw-feld select {
  height: 48px; padding: 0 14px; border: 1px solid #c9c8c2; border-radius: 8px;
  background: #ffffff; font: inherit; color: var(--kp-ink); width: 100%;
  min-width: 0;
}
.kp-kw-feld input:focus, .kp-kw-feld select:focus { outline: 2px solid var(--kp-blue); outline-offset: 1px; }
.kp-kw-paar { display: flex; flex-direction: column; gap: 18px; }
.kp-kw-plz { flex: 0 0 auto; }
.kp-kw-fehler { color: var(--kp-err); font-size: 13px; margin: 0; }
.kp-kw-feld.kp-invalid input, .kp-kw-feld.kp-invalid select { border-color: var(--kp-err); }
.kp-kw-honig { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Preisleiste ---------- */

.kp-kw-preisleiste {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; padding: 14px 0; border-top: 1px solid #e3e2dd; min-width: 0;
}
.kp-kw-preisleiste > :first-child { min-width: 0; overflow-wrap: anywhere; }
.kp-kw-preisleiste > :last-child { font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ---------- Danke und Stand ---------- */

.kp-kw-person-kasten { display: flex; gap: 16px; align-items: flex-start; padding: 20px; }
.kp-kw-liste { list-style: none; margin: 0; padding: 0; }
.kp-kw-liste li { display: flex; gap: 14px; align-items: flex-start; padding: 14px 0; border-top: 1px solid #e3e2dd; }
.kp-kw-liste li:first-child { border-top: none; }
.kp-kw-nr { font-weight: 700; width: 20px; flex-shrink: 0; font-variant-numeric: tabular-nums; }

/* ---------- Ab 768 px: Karten nebeneinander wie auf der Fläche ---------- */

@media (min-width: 768px) {
  .kp-kw-h1 { font-size: 30px; }
  .kp-kw-h2 { font-size: 22px; }
  .kp-kw-unter, .kp-kw-gross { font-size: 18px; }
  .kp-kw-klein { font-size: 14px; }
  .kp-kw-text { font-size: 16px; }
  .kp-kw-tarife { flex-direction: row; align-items: stretch; gap: 24px; }
  .kp-kw-tarif { flex: 1 1 0; }
  .kp-kw-karten-reihe { flex-direction: row; align-items: stretch; gap: 20px; }
  .kp-kw-karten-reihe > .kp-kw-karte { flex: 1 1 0; }
  .kp-kw-karte-quer { flex-direction: row; justify-content: space-between; gap: 20px; }
  .kp-kw-karte-quer .kp-kw-karte-betrag { align-items: flex-end; flex-shrink: 0; }
  .kp-kw-paar { flex-direction: row; gap: 16px; }
  .kp-kw-plz { flex: 0 0 160px; }
  .kp-kw-azeile { flex-direction: row; align-items: baseline; gap: 16px; }
  .kp-kw-azeile-kopf { width: 120px; flex-shrink: 0; }
  .kp-kw-kzeile { flex-direction: row; gap: 16px; align-items: baseline; }
  .kp-kw-kzeile > :first-child { width: 150px; flex-shrink: 0; }
  .kp-kw-kzeile-rumpf { flex: 1; }
  .kp-kw-verweise-reihe { flex-direction: row; flex-wrap: wrap; gap: 20px; }
  .kp-kw-blatt, .kp-kw-kasten { padding-left: 24px; padding-right: 24px; }
}

/* Die Markierung der bisherigen Wahl, wie der Auswahlknopf der Fläche. Sie
   trägt keinen Text: „Zurück“ und „ändern“ behalten die Wahl (D7), und der
   Knopf meldet sie Vorlesewerkzeugen über `aria-pressed`. */
.kp-kw-radio {
  display: inline-block !important; width: 22px; height: 22px; flex-shrink: 0;
  border: 2px solid #8f8e88; border-radius: 11px; background: #ffffff;
  margin-top: 2px;
}
.kp-kw-radio-an { border: 7px solid var(--kp-blue); }
.kp-kw-kartenkopf { display: flex !important; gap: 14px; align-items: flex-start; }

.kp-kw-knopf-bestellen { width: 100%; }
@media (min-width: 768px) {
  .kp-kw-knopf-bestellen { width: auto; min-width: 320px; align-self: flex-start; }
}

.kp-kw-karte .kp-kw-betrag > span { display: inline; }
.kp-kw-nur-breit { display: none; }
@media (min-width: 768px) {
  .kp-kw-nur-breit { display: inline; }
}

.kp-kw-azeile > .kp-kw-eng { flex: 1 1 auto; min-width: 0; }
@media (min-width: 768px) {
  .kp-kw-azeile > .kp-kw-link { flex-shrink: 0; width: 56px; text-align: right; }
}

@media (min-width: 768px) {
  .kp-kw-eng > .kp-kw-knopf { align-self: flex-start; }
}
