/* AJAX kaufen /ajax-kaufen (tools/ajax_bauen.py, docs/AJAX-KAUFEN.md).
   Grundlage ist style.css: Kacheln (.tile), Optionen (.opt), Felder (.field),
   Karten (.feature), FAQ (.faq). Hier steht nur, was die Seite zusätzlich
   braucht. Klassen mit Präfix „a“, damit nichts mit style.css kollidiert. */

/* ------------------------------------------------------------------ Kopf */
.akopf .sec-head { max-width: 760px; margin-bottom: clamp(24px, 3vw, 36px); }
.akopf h1 { font-size: clamp(2.2rem, 4.6vw, 3.4rem); }

/* AJAX-Logo mit „Offizieller Wiederverkäufer“ – an der Stelle der
   handschriftlichen Zeile. Die Besucher kommen von ajax.systems und sollen
   die Marke als Erstes wiedererkennen. */
.akopf__marke {
  display: inline-flex; align-items: center; gap: 12px;
  margin: 0 0 18px;
  padding: 8px 16px 8px 14px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  box-shadow: var(--shadow-sm);
}
.akopf__marke img { width: auto; height: 17px; display: block; }
.akopf__marke span {
  padding-left: 12px;
  border-left: 1px solid var(--line-strong);
  font-family: var(--font-display);
  font-size: calc(14.5rem / 16); font-weight: 600;
  color: var(--text);
  line-height: 1.2;
}

.akopf__punkte {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 10px 22px;
  margin-top: 20px;
}
.akopf__punkte li {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: calc(15rem / 16); font-weight: 500;
  color: var(--text);
}
.akopf__punkte li > svg { width: 17px; height: 17px; flex: none; color: var(--blue); }
.akopf__sterne .stars svg { width: 15px; height: 15px; }

/* ------------------------------------------------- Fragebogen: Reiter-Karte
   Jeder Schritt (.ap) ist ein Reiter (.ap__tab) mit Inhalt (.ap__body)
   daneben. Zu sehen ist nur der Inhalt des offenen Schritts; die anderen
   sind auf Reiterbreite zusammengeschoben – erledigte links, kommende rechts
   in Blau wie ein Kartenstapel. Der Wechsel gleitet über flex-grow, die
   Inhaltsbreite steht fest (--a-body aus ajax.js), damit beim Gleiten nichts
   neu umbricht. Am Handy (≤ 760 px) stehen die Reiter als Balken
   übereinander. */
.abox {
  --tab: 76px;
  position: relative;
  display: flex;
  align-items: stretch;
  min-height: 540px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-2xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  text-align: left;
  transition: height .6s var(--ease);
}
.ap {
  position: relative;
  display: flex;
  flex: 0 0 var(--tab);
  min-width: 0;
  overflow: hidden;
  background: var(--white);
  transition: flex-grow .75s var(--ease-curve), background-color .5s var(--ease), box-shadow .5s var(--ease);
}
.ap[hidden] { display: none; }
.ap.is-active { flex-grow: 1; }

.ap__tab {
  position: relative; z-index: 1;
  flex: 0 0 var(--tab);
  display: flex; flex-direction: column; align-items: center;
  gap: 14px;
  margin: 0;
  padding: 28px 0 24px;
  background: transparent;
  border: 0;
  color: inherit;
  font: inherit;
  text-align: center;
  cursor: default;
}
.ap__nr {
  font-family: var(--font-display);
  font-size: calc(38rem / 16); font-weight: 800;
  line-height: 1;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.ap__name {
  margin-top: auto;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-family: var(--font-display);
  font-size: calc(15rem / 16); font-weight: 600;
  letter-spacing: .02em;
  white-space: nowrap;
}
.ap__wahl { display: none; }
.ap__icon {
  position: relative;
  display: grid; place-items: center;
  flex: none;
  width: 34px; height: 34px;
  border-radius: 50%;
  transition: background-color .4s var(--ease), color .4s var(--ease);
}
.ap__icon > svg { width: 18px; height: 18px; }
.ap__haken {
  position: absolute; inset: 0;
  display: none; place-items: center;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
}
.ap__haken svg { width: 16px; height: 16px; }

/* offen */
.ap.is-active .ap__nr, .ap.is-active .ap__name { color: var(--blue); }
.ap.is-active .ap__icon { background: var(--blue-soft); color: var(--blue); }

/* kommend: blaue Reiter, jeder wirft einen Schatten auf den davor */
.ap.is-next {
  background: var(--blue);
  color: #fff;
  box-shadow: inset 1px 0 0 rgba(255, 255, 255, .14), -16px 0 30px -16px rgba(8, 23, 41, .6);
}
.ap.is-next .ap__icon { background: rgba(255, 255, 255, .16); color: #fff; }

/* erledigt: hell, mit Haken, antippen führt zurück */
.ap.is-done { background: var(--gray-50); box-shadow: inset -1px 0 0 var(--line); }
.ap.is-done .ap__tab { cursor: pointer; }
.ap.is-done .ap__nr { color: var(--navy-500); }
.ap.is-done .ap__name { color: var(--text-dim); }
.ap.is-done .ap__haken { display: grid; }
.ap.is-done:hover { background: var(--blue-soft); }
.ap__tab:focus-visible { outline: 2px solid var(--blue); outline-offset: -5px; border-radius: var(--r-lg); }

/* Inhalt */
.ap__body {
  flex: 0 0 var(--a-body, 640px);
  width: var(--a-body, 640px);
  min-width: 0;
  padding: clamp(28px, 3.2vw, 42px) clamp(28px, 4vw, 56px) clamp(28px, 3.2vw, 40px) 10px;
}
.ap:not(.is-active) .ap__body {
  position: absolute; top: 0; left: var(--tab);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .3s var(--ease), transform .6s var(--ease), visibility 0s .6s;
}
/* Gleitrichtung: Erledigtes schiebt sich nach links weg, Kommendes von rechts herein. */
.ap.is-next .ap__body { transform: translateX(64px); }
.ap.is-done .ap__body { transform: translateX(-64px); }
.ap.is-active .ap__body {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity .5s .2s var(--ease), transform .8s var(--ease);
}
.ap__inhalt { max-width: 780px; container-type: inline-size; }

.ap__zurueck {
  display: inline-flex; align-items: center; gap: 4px;
  margin: -6px 0 14px -4px;
  padding: 4px 6px;
  background: none;
  border: 0;
  border-radius: var(--r-sm);
  font-family: var(--font-display);
  font-size: calc(14rem / 16); font-weight: 600;
  color: var(--text-mute);
  cursor: pointer;
}
.ap__zurueck svg { width: 16px; height: 16px; }
.ap__zurueck:hover { color: var(--blue); }

/* Schritt 1 · Für wen – zwei große Kacheln */
.atiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; max-width: 620px; }
.atiles .tile { padding: 30px 20px 26px; }
.atiles .tile img { width: 96px; height: 96px; margin-bottom: 10px; }
.atiles .tile__label { font-size: calc(19rem / 16); }
.atiles .tile__hint { font-size: calc(14.5rem / 16); }
.ap__fuss .btn svg { width: 18px; height: 18px; }

/* Schritt 2 · Ihr Weg – Optionen mit Icon */
.opt__text { display: grid; gap: 2px; min-width: 0; }
.awege .opt { justify-content: flex-start; gap: 16px; padding: 14px 18px 14px 14px; text-decoration: none; }
.awege .opt__text { flex: 1; }
.awege__icon {
  display: grid; place-items: center;
  flex: none;
  width: 46px; height: 46px;
  background: var(--blue-soft);
  border-radius: var(--r);
  color: var(--blue);
}
.awege .awege__icon svg,
.awege .opt:hover .awege__icon svg { width: 22px; height: 22px; color: var(--blue); transform: none; }

.ahinweis {
  margin: 0 0 14px;
  padding: 12px 16px;
  background: var(--blue-soft);
  border-radius: var(--r);
  font-size: calc(15rem / 16);
  color: var(--navy-600);
  line-height: 1.45;
}
.ahinweis--gebiet { margin: -4px 0 0; }

/* Schritt 2 · Auswahl: drei Bereiche, Mehrfachauswahl (kein Katalog).
   Der Kreis oben rechts zeigt, dass mehrere gehen; gewählt = blauer Haken. */
.abereiche { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.abereiche .tile { position: relative; padding: 26px 14px 20px; }
.abereiche .tile img { width: 84px; height: 84px; }
.abereiche .tile__label { font-size: calc(17rem / 16); hyphens: manual; overflow-wrap: normal; }
.abereiche .tile__hint { hyphens: manual; }
.abereiche .tile::after {
  content: "";
  position: absolute; top: 12px; right: 12px;
  width: 24px; height: 24px;
  border: 2px solid var(--line-strong);
  border-radius: 50%;
  background: var(--white) center / 14px no-repeat;
  transition: background-color .2s var(--ease), border-color .2s var(--ease);
}
.abereiche .tile[aria-pressed="true"]::after {
  border-color: var(--blue);
  background-color: var(--blue);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
}

/* Kontakt: Beratung per, Wunschzeit (Chips) */
.azusatz__reihe { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 14px; }
.azusatz__titel {
  font-family: var(--font-display);
  font-size: calc(14.5rem / 16); font-weight: 600;
  color: var(--text);
}
.achips { display: inline-flex; flex-wrap: wrap; gap: 8px; }
.achip {
  padding: 8px 16px;
  background: var(--white);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--r-pill);
  font-family: var(--font-display);
  font-size: calc(14.5rem / 16); font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: border-color .2s var(--ease), background-color .2s var(--ease), color .2s var(--ease);
}
.achip:hover { border-color: var(--blue); }
.achip[aria-pressed="true"] { border-color: var(--blue); background: var(--blue-soft); color: var(--blue); }

/* Schritt 4 · Kontakt: Name breit, PLZ schmal daneben – wie im Kostenrechner. */
.aform .aform__reihe { grid-template-columns: minmax(0, 1fr) calc(140rem / 16); }
.aform textarea { min-height: 76px; }
.aform input[aria-invalid="true"] { border-color: #C0392B; box-shadow: 0 0 0 3px rgba(192, 57, 43, .12); }
.aform .form__fehler { margin: 0; }
/* Hinweis unter dem Absenden: zwei zentrierte Zeilen, Datenschutz verlinkt. */
.aform__note {
  display: grid; justify-items: center; gap: 2px;
  max-width: 560px; margin-inline: auto;
  line-height: 1.5;
  text-wrap: balance;
}
.aform__note span:first-child { font-weight: 600; color: var(--text); }
.aform__note a { color: var(--blue); text-decoration: underline; text-underline-offset: 2px; }
.aform__note a:hover { text-decoration-thickness: 2px; }
.aform__wahl {
  display: grid; gap: 10px;
  padding: 14px 16px;
  background: var(--gray-50);
  border: 1px solid var(--line);
  border-radius: var(--r);
}
.aform__wahl .azusatz__reihe { margin: 0; }
.aform__wahl .azusatz__titel { min-width: calc(104rem / 16); }
.aform__falle { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* Telefon unter dem Fragebogen */
.atelefon {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: 6px 10px;
  margin: 24px auto 0;
  font-size: calc(15.5rem / 16);
  color: var(--text-dim);
  text-align: center;
}
.atelefon a {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-display); font-weight: 700;
  color: var(--blue);
  white-space: nowrap;
}
.atelefon a svg { width: 17px; height: 17px; }
.atelefon span { color: var(--text-mute); font-size: calc(14rem / 16); }

/* ------------------------------------------------------------ Drei Schritte
   Drei Stationen auf einer Linie: Icon im Kreis mit Nummer, darunter Titel
   und Text. Am Handy senkrecht als Zeitleiste. */
.aablauf {
  --g: clamp(24px, 4vw, 56px);
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--g);
  max-width: 1060px;
  margin: 0 auto;
}
.aablauf::before {
  content: '';
  position: absolute;
  top: 45px;
  left: calc((100% - 2 * var(--g)) / 6);
  right: calc((100% - 2 * var(--g)) / 6);
  height: 2px;
  background: linear-gradient(90deg, rgba(11, 99, 214, .12), rgba(11, 99, 214, .45) 50%, rgba(11, 99, 214, .12));
}
.aablauf__schritt { position: relative; text-align: center; }
.aablauf__icon {
  position: relative; z-index: 1;
  display: grid; place-items: center;
  width: 92px; height: 92px;
  margin: 0 auto 24px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 50%;
  box-shadow: var(--shadow);
  color: var(--blue);
}
.aablauf__icon > svg { width: 34px; height: 34px; }
.aablauf__nr {
  position: absolute; top: -4px; right: -4px;
  display: grid; place-items: center;
  width: 32px; height: 32px;
  background: var(--blue);
  border: 3px solid var(--white);
  border-radius: 50%;
  font-family: var(--font-display);
  font-size: calc(14rem / 16); font-weight: 700;
  color: #fff;
}
.aablauf h3 { font-size: calc(20rem / 16); margin-bottom: 8px; }
.aablauf p {
  max-width: 310px;
  margin: 0 auto;
  font-size: calc(15.5rem / 16);
  color: var(--text-dim);
  line-height: 1.55;
}

/* Links in Karten */
.aextern {
  display: inline-flex; align-items: center; gap: 4px;
  font-weight: 600;
  color: var(--blue);
  white-space: nowrap;
}
.aextern svg { width: 14px; height: 14px; }
.aextern:hover { text-decoration: underline; }

/* ------------------------------------------- Beliebte Geräte (Selbsteinbau)
   Links der Vorteil der Bestellung hier (Beratung vorab), rechts kompakt die
   meistbestellten Geräte – ohne Bestellknöpfe. */
.aselbst {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.aselbst__text h2 { margin-bottom: 14px; }
.aselbst__punkte { display: grid; gap: 12px; margin: 22px 0 28px; }
.aselbst__punkte li {
  display: flex; align-items: flex-start; gap: 12px;
  font-size: calc(16rem / 16);
  color: var(--text-body);
  line-height: 1.5;
}
.aselbst__punkte li > svg {
  flex: none;
  width: 24px; height: 24px;
  margin-top: 1px;
  padding: 5px;
  background: var(--blue-soft);
  border-radius: 50%;
  color: var(--blue);
}
.aselbst__punkte strong { color: var(--text); font-weight: 600; }
.aselbst__knoepfe { display: flex; flex-wrap: wrap; gap: 12px; }

.aselbst__geraete {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.aselbst__geraet {
  display: flex; flex-direction: column; align-items: center;
  padding: 16px 10px 14px;
  background: var(--gray-50);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  text-align: center;
}
.aselbst__bild { display: grid; place-items: center; height: 84px; margin-bottom: 10px; }
.aselbst__bild img { width: auto; max-width: 72%; max-height: 78px; object-fit: contain; mix-blend-mode: multiply; }
.aselbst__name {
  font-family: var(--font-display);
  font-size: calc(14.5rem / 16); font-weight: 600;
  color: var(--text);
  line-height: 1.25;
}
.aselbst__modell { font-size: calc(13rem / 16); color: var(--text-mute); }
.aselbst__name { hyphens: manual; }
.aselbst__katalog a { color: var(--blue); font-weight: 600; }
.aselbst__katalog a:hover { text-decoration: underline; }
.aselbst__katalog { margin: 16px 0 0; font-size: calc(14.5rem / 16); color: var(--text-mute); text-align: center; }

/* Abschluss: zwei Knöpfe nebeneinander */
.aschluss { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 16px; margin-top: 8px; }
.aschluss .btn svg { width: 18px; height: 18px; }

@keyframes aRein {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: none; }
}
@keyframes aZurueck {
  from { opacity: 0; transform: translateX(-40px); }
  to { opacity: 1; transform: none; }
}

/* ------------------------------------------------------------------ Handy */
@media (max-width: 980px) {
  .aselbst { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  /* Reiter als Balken: erledigte oben (mit Antwort), der offene Schritt, die
     kommenden blau darunter. */
  .abox { flex-direction: column; min-height: 0; border-radius: var(--r-xl); }
  .ap { flex: none; flex-direction: column; transition: background-color .4s var(--ease); }
  .ap__tab {
    flex: none;
    flex-direction: row; align-items: center;
    gap: 12px;
    min-height: 54px;
    padding: 0 16px;
    text-align: left;
  }
  .ap__nr { min-width: 20px; font-size: calc(24rem / 16); }
  .ap__name {
    display: flex; align-items: baseline; gap: 6px;
    min-width: 0;
    overflow: hidden;
    margin: 0;
    writing-mode: horizontal-tb;
    transform: none;
    font-size: calc(16rem / 16);
    white-space: nowrap;
  }
  .ap.is-done .ap__wahl { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 400; color: var(--text-mute); }
  .ap.is-done .ap__wahl:not(:empty)::before { content: '\00b7'; margin-right: 6px; }
  .ap__icon { margin-left: auto; width: 30px; height: 30px; }
  .ap.is-active .ap__tab { min-height: 62px; padding-top: 6px; }
  .ap.is-next { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16); }
  .ap.is-done { box-shadow: inset 0 -1px 0 var(--line); }

  .ap__body { flex: none; width: auto; padding: 0 16px 22px; }
  .ap:not(.is-active) .ap__body { display: none; }
  .ap.is-active .ap__body { transition: none; }
  .abox.is-bewegt .ap.is-active .ap__body { animation: aRein .5s var(--ease); }
  .abox.is-bewegt.is-zurueck .ap.is-active .ap__body { animation-name: aZurueck; }

  .azg__weiter { display: none; }   /* am Handy reicht Antippen */
  .atiles { grid-template-columns: 1fr; gap: 10px; }
  .atiles .tile { padding: 13px 16px; }
  .atiles .tile img { width: 56px; height: 56px; margin: 0; }
  .atiles .tile__label { font-size: calc(17rem / 16); }

  .aablauf { grid-template-columns: 1fr; gap: 28px; max-width: 520px; }
  .aablauf::before {
    top: 36px; bottom: 36px; left: 35px; right: auto;
    width: 2px; height: auto;
    background: linear-gradient(180deg, rgba(11, 99, 214, .45), rgba(11, 99, 214, .12));
  }
  .aablauf__schritt {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    column-gap: 18px;
    text-align: left;
  }
  .aablauf__icon { grid-row: span 2; width: 72px; height: 72px; margin: 0; }
  .aablauf__icon > svg { width: 28px; height: 28px; }
  .aablauf__nr { width: 28px; height: 28px; font-size: calc(13rem / 16); }
  .aablauf h3 { margin: 8px 0 4px; font-size: calc(18rem / 16); }
  .aablauf p { max-width: none; margin: 0; }
}
/* Ab hier stehen Kacheln als Zeilen (style.css): Bild links, Kreis rechts. */
@media (max-width: 620px) {
  .abereiche { grid-template-columns: 1fr; gap: 10px; }
  .abereiche .tile { padding: 12px 54px 12px 14px; }
  .abereiche .tile img { width: 52px; height: 52px; }
  .abereiche .tile__label { font-size: calc(16.5rem / 16); }
  .abereiche .tile::after { top: 50%; right: 16px; margin-top: -12px; }
}
@media (max-width: 560px) {
  /* Am Handy soll die erste Frage ohne Scrollen zu sehen sein: zweiter Satz
     und die drei Haken-Punkte entfallen, die Sterne bleiben. Oben bleibt Luft
     zur Kopfleiste – die graue Sektion zieht sich um ihre Welle (--wave)
     unter die Leiste, deshalb steckt die Welle im Abstand mit drin. */
  .akopf.section--tight { padding-top: calc(36px + var(--wave)); }
  .akopf__mehr { display: none; }
  .akopf__punkte { margin-top: 12px; }
  .akopf__punkte li:not(.akopf__sterne) { display: none; }
  .akopf .sec-head { margin-bottom: 20px; }
  .akopf .lede { font-size: calc(16.5rem / 16); }
  .akopf h1 { font-size: calc(34rem / 16); }
  .akopf__marke { gap: 10px; padding: 7px 14px 7px 12px; }
  .akopf__marke img { height: 15px; }
  .akopf__marke span { padding-left: 10px; font-size: calc(13.5rem / 16); }
  .akopf__punkte { gap: 8px 16px; }
  .akopf__punkte li { font-size: calc(14rem / 16); }

  .awege .opt { gap: 12px; padding: 12px 14px 12px 12px; }
  .awege__icon { width: 40px; height: 40px; }
  .aform__wahl { padding: 12px 14px; }
  .aform__wahl .azusatz__titel { min-width: 0; width: 100%; }
  .aform .aform__reihe { grid-template-columns: minmax(0, 1fr) calc(104rem / 16); gap: 12px; }

  .azusatz__reihe { gap: 8px 12px; }
  .achip { padding: 7px 14px; }

  .aselbst__geraete { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .aselbst__geraet {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    grid-template-areas: "bild name" "bild modell";
    align-items: center;
    column-gap: 10px;
    padding: 10px;
    text-align: left;
  }
  .aselbst__bild { grid-area: bild; height: 44px; margin: 0; }
  .aselbst__bild img { max-width: 100%; max-height: 42px; }
  .aselbst__name { grid-area: name; align-self: end; font-size: calc(14rem / 16); }
  .aselbst__modell { grid-area: modell; align-self: start; font-size: calc(12rem / 16); }
  .aselbst__knoepfe .btn { flex: 1 1 auto; }
}
@media (prefers-reduced-motion: reduce) {
  .abox, .ap, .ap__body, .ap.is-active .ap__body { transition: none !important; animation: none !important; }
}
