/* AAbfall Upgrade-Ebene
   Laedt als letztes Stylesheet, nach style.css, refinement.css und polish.css.

   Inhalt in Reihenfolge:
   1. Icon-System statt Unicode-Pfeilen (kein Emoji-Fallback auf iOS/Android)
   2. Kontrast- und Tap-Ziel-Korrekturen
   3. Datumsauswahl im iOS-Stil
   4. Rueckmeldung im Anfrageformular
   5. Dekoratives Sternchen
   6. Bewegungsschalter auf schmalen Schirmen
   7. Hero auf mobil, in vier Durchgaengen: Grundaufbau, Korrekturen gegen
      refinement.css, Schnitt und Ruhe, Passung ueber der Kontaktleiste
   8. Anfrage per E-Mail

   Die Bloecke ab 7 bauen bewusst aufeinander auf: spaetere Regeln korrigieren
   frueheren Vorgaben aus refinement.css und polish.css. Die Reihenfolge ist
   daher bedeutungstragend und darf nicht umsortiert werden.

   Alle Farbwerte sind gemessen, nicht geschaetzt. Die Werte stehen jeweils
   im Kommentar an der Regel.
*/

:root {
  /* Dunkleres Orange fuer Text auf hellem Grund. #ff632b traegt nur 2,76:1. */
  --orange-ink: #c8410f;
  --ios-radius: 18px;
  --ios-shadow: 0 12px 40px rgba(24, 43, 53, .18), 0 2px 8px rgba(24, 43, 53, .08);
}

/* ---------------------------------------------------------------- 1. Icons */

.ic {
  display: inline-block;
  width: .82em;
  height: .82em;
  vertical-align: -.02em;
  background-color: currentColor;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
  flex: none;
}

/* Pfeil schraeg nach oben rechts */
.ic-ar {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17 17 7'/%3E%3Cpath d='M8.5 7H17v8.5'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17 17 7'/%3E%3Cpath d='M8.5 7H17v8.5'/%3E%3C/svg%3E");
}

/* Pfeil nach unten */
.ic-down {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 5v14'/%3E%3Cpath d='m6 13 6 6 6-6'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 5v14'/%3E%3Cpath d='m6 13 6 6 6-6'/%3E%3C/svg%3E");
}

/* Menuebalken */
.ic-menu {
  width: 1.05em;
  height: 1.05em;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M4 7h16M4 12h16M4 17h16'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M4 7h16M4 12h16M4 17h16'/%3E%3C/svg%3E");
}

.ic-close {
  width: 1.05em;
  height: 1.05em;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6 6 18'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6 6 18'/%3E%3C/svg%3E");
}

.ic-pause {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='6' y='5' width='4' height='14' rx='1.4' fill='%23000'/%3E%3Crect x='14' y='5' width='4' height='14' rx='1.4' fill='%23000'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='6' y='5' width='4' height='14' rx='1.4' fill='%23000'/%3E%3Crect x='14' y='5' width='4' height='14' rx='1.4' fill='%23000'/%3E%3C/svg%3E");
}

.ic-play {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 5.5v13l11-6.5z' fill='%23000'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 5.5v13l11-6.5z' fill='%23000'/%3E%3C/svg%3E");
}

/* Der grosse dekorative Pfeil in den Leistungskarten behaelt seine Groesse. */
.world-arrow .ic-ar { width: 1em; height: 1em; }

/* --------------------------------------------- 2. Kontrast und Tap-Ziele */

/* Orange auf hellem Grund traegt nur 2,76:1. Betroffen sind die Schritt-
   nummern auf "Ablauf & Kosten" und die Zaehler der Startseite. */
.steps article > span,
.step-number,
.card-number,
.world-arrow { color: var(--orange-ink); }

/* Der Punkt im Schlusssatz steht hell auf Orange, ebenfalls 2,76:1.
   Dunkel auf Orange traegt 4,2:1 und haelt die Marke. */
.closing h2 > span { color: var(--ink); }

/* Trefferflaechen auf mindestens 24px bringen, ohne die Schriftgroesse
   zu aendern: Fusszeile, Kopfzeilen-Telefon, Links im Fliesstext. */
.foot-bottom a,
.top-phone,
.prose p > a,
footer nav a {
  position: relative;
  display: inline-block;
  padding-block: 7px;
}

.text-link { position: relative; }

.foot-bottom a::after,
.top-phone::after,
.prose p > a::after,
.text-link::after {
  content: "";
  position: absolute;
  inset: 50% 0 auto 0;
  height: 26px;
  transform: translateY(-50%);
}

/* -------------------------------------------- 3. Datumsauswahl im iOS-Stil */

.date-field { position: relative; }

.date-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  font: inherit;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.date-trigger[data-empty="true"] { color: var(--muted); }
.date-trigger:focus-visible { outline: 3px solid #176a84; outline-offset: 3px; }

.date-trigger .ic {
  width: 1.1em;
  height: 1.1em;
  color: var(--muted);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='3'/%3E%3Cpath d='M3 10h18M8 3v4M16 3v4'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='3'/%3E%3Cpath d='M3 10h18M8 3v4M16 3v4'/%3E%3C/svg%3E");
}

.date-scrim {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(24, 43, 53, .32);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  display: grid;
  place-items: center;
  padding: 20px;
}

.date-sheet {
  width: min(360px, 100%);
  border-radius: var(--ios-radius);
  background: #fff;
  box-shadow: var(--ios-shadow);
  padding: 16px 14px 12px;
  animation: date-in .26s cubic-bezier(.32, .72, 0, 1);
}

@keyframes date-in {
  from { opacity: 0; transform: translateY(12px) scale(.97); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .date-sheet { animation: none; }
}

/* Auf dem Telefon faehrt das Blatt von unten ein, wie ein iOS-Sheet. */
@media (max-width: 760px) {
  .date-scrim { place-items: end center; padding: 0; }
  .date-sheet {
    width: 100%;
    border-radius: var(--ios-radius) var(--ios-radius) 0 0;
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
    animation: sheet-up .32s cubic-bezier(.32, .72, 0, 1);
  }
  @keyframes sheet-up { from { transform: translateY(100%); } to { transform: none; } }
}

.date-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 2px 4px 10px;
}

.date-month {
  font-weight: 800;
  font-size: 1.06rem;
  letter-spacing: -.01em;
}

.date-nav { display: flex; gap: 4px; }

.date-nav button {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #176a84;
  cursor: pointer;
}

.date-nav button:hover { background: rgba(23, 106, 132, .1); }
.date-nav button:disabled { color: var(--line); cursor: default; background: none; }
.date-nav button:focus-visible { outline: 3px solid #176a84; outline-offset: 2px; }

.date-nav .ic { width: 18px; height: 18px; }

.ic-prev {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m15 5-7 7 7 7'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m15 5-7 7 7 7'/%3E%3C/svg%3E");
}

.ic-next {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 5 7 7-7 7'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 5 7 7-7 7'/%3E%3C/svg%3E");
}

.date-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.date-dow {
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
  padding-bottom: 6px;
}

.date-cell {
  aspect-ratio: 1;
  min-height: 40px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font: inherit;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  cursor: pointer;
}

.date-cell:hover:not(:disabled) { background: rgba(23, 106, 132, .1); }
.date-cell:focus-visible { outline: 3px solid #176a84; outline-offset: -3px; }
.date-cell:disabled { color: #b9c2c4; cursor: default; }
.date-cell[data-outside="true"] { visibility: hidden; }

.date-cell[data-today="true"] { font-weight: 800; color: #176a84; }

.date-cell[aria-pressed="true"] {
  background: var(--ink);
  color: #fff;
  font-weight: 800;
}

.date-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 10px;
  margin-top: 8px;
  border-top: 1px solid var(--line);
}

.date-foot button {
  min-height: 40px;
  padding: 8px 14px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  font: inherit;
  font-weight: 700;
  color: #176a84;
  cursor: pointer;
}

.date-foot button:hover { background: rgba(23, 106, 132, .1); }
.date-foot button:focus-visible { outline: 3px solid #176a84; outline-offset: 2px; }
.date-foot .date-clear { color: var(--muted); }

/* ------------------------------------------------- 4. Formular-Rueckmeldung */

/* Ersetzt das harte Ausblenden des Ergebnisses: der vorbereitete Text bleibt
   stehen und wird als veraltet gekennzeichnet. */
.request-result.is-stale { opacity: .55; }

.result-stale-note {
  display: none;
  gap: 8px;
  align-items: center;
  margin: 10px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff6ed;
  border: 1px solid #f0c8a8;
  color: #7a3d16;
  font-size: .9rem;
}

.request-result.is-stale .result-stale-note { display: flex; }

/* --------------------------------------------------- 5. Dekoratives Sternchen */

.ic-star {
  width: .7em;
  height: .7em;
  vertical-align: .02em;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M12 3v18M4.2 7.5l15.6 9M19.8 7.5l-15.6 9'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M12 3v18M4.2 7.5l15.6 9M19.8 7.5l-15.6 9'/%3E%3C/svg%3E");
  color: var(--orange-ink);
}

/* ------------------------------------------------ 6. Bewegungsknopf, mobil */

/* Auf dem Telefon nahm der Knopf als breite Pille zu viel Raum und lag ueber
   dem Bild. Er wird zu einem kleinen runden Schalter. */
@media (max-width: 760px) {
  .motion-global {
    width: 44px;
    height: 44px;
    padding: 0;
    display: grid;
    place-items: center;
    border-radius: 999px;
    bottom: calc(96px + env(safe-area-inset-bottom));
    left: 12px;
    background: rgba(255, 255, 255, .92);
    -webkit-backdrop-filter: saturate(1.4) blur(8px);
    backdrop-filter: saturate(1.4) blur(8px);
    box-shadow: 0 4px 16px rgba(24, 43, 53, .14);
  }

  /* Die Beschriftung bleibt fuer Screenreader erhalten, verlaesst aber das Bild. */
  .motion-global > span:last-child {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .motion-global .ic { width: 16px; height: 16px; }
}

/* ------------------------------------------------------ 7. Hero auf mobil */

@media (max-width: 760px) {
  /* Das Markenbild kommt nach oben und traegt die Schlagzeile. Vorher stand
     es rund 1400px weiter unten und die erste Ansicht war reiner Text. */
  .hero {
    position: relative;
    display: block;
    min-height: 100svh;
    margin: 0;
    padding: 0;
    overflow: clip;
    isolation: isolate;
    background: var(--ink);
  }

  .hero .hero-visual {
    position: absolute;
    inset: 0;
    z-index: 0;
    margin: 0;
    border-radius: 0;
  }

  .hero .hero-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 62% 42%;
    border-radius: 0;
    animation: hero-drift 24s ease-in-out infinite alternate;
  }

  @keyframes hero-drift {
    from { transform: scale(1.06) translate3d(0, 0, 0); }
    to { transform: scale(1.14) translate3d(-2%, -1.5%, 0); }
  }

  @media (prefers-reduced-motion: reduce) {
    .hero .hero-visual img { animation: none; transform: scale(1.04); }
  }

  .motion-paused .hero .hero-visual img { animation: none; transform: scale(1.04); }

  /* Der Verlauf traegt den Text. Unten dunkel genug fuer Weiss auf Bild. */
  .hero .hero-visual::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
      linear-gradient(180deg,
        rgba(16, 30, 38, .58) 0%,
        rgba(16, 30, 38, .40) 26%,
        rgba(16, 30, 38, .78) 62%,
        rgba(16, 30, 38, .95) 100%);
  }

  /* Die Bildmarke aus der Grossansicht stoert in der Ueberlagerung. */
  .hero .visual-tag { display: none; }

  .hero .hero-copy {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 100svh;
    padding: 128px 22px calc(150px + env(safe-area-inset-bottom));
    color: #fff;
  }

  .hero .eyebrow {
    color: #fff;
    opacity: .92;
    letter-spacing: .1em;
  }

  .hero .eyebrow .ic-star { color: var(--orange); }

  .hero h1 {
    margin: 10px 0 14px;
    font-size: clamp(3.1rem, 16.5vw, 4.6rem);
    line-height: .92;
    letter-spacing: -.035em;
    color: #fff;
    text-wrap: balance;
  }

  /* Orange auf dem abgedunkelten Bild traegt genug Kontrast fuer die
     Grossschrift und haelt die Marke im Bild. */
  .hero h1 .accent { color: var(--orange); }

  .hero .hero-description {
    margin: 0 0 26px;
    font-size: 1.02rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, .93);
    max-width: 34ch;
  }

  /* Die drei Zeilenumbrueche der Grossansicht ergeben mobil Stufen. */
  .hero .hero-description br { display: none; }

  .hero .hero-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    margin: 0;
  }

  .hero .hero-actions .button {
    justify-content: center;
    min-height: 56px;
    font-size: 1.02rem;
    background: var(--orange);
    /* Weiss auf diesem Orange traegt nur 2,97:1, dunkel dagegen 4,2:1. */
    color: var(--ink);
    border: 0;
    box-shadow: 0 10px 30px rgba(255, 99, 43, .3);
  }

  .hero .hero-actions .text-link {
    align-self: center;
    color: #fff;
    border-bottom-color: rgba(255, 255, 255, .5);
  }

  .hero .hero-assurance {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    margin-top: 22px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, .22);
    font-size: .84rem;
    color: rgba(255, 255, 255, .82);
  }

  .hero .hero-assurance a { color: #fff; }

  /* Scroll-Hinweis: liegt unter dem Text und zeigt, dass es weitergeht. */
  .hero::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: calc(96px + env(safe-area-inset-bottom));
    z-index: 3;
    width: 22px;
    height: 34px;
    margin-left: -11px;
    border: 2px solid rgba(255, 255, 255, .5);
    border-radius: 999px;
    background: radial-gradient(circle at 50% 26%, #fff 0 2.5px, transparent 2.6px);
    animation: hero-cue 2.4s ease-in-out infinite;
  }

  @keyframes hero-cue {
    0%, 100% { opacity: .35; background-position: 0 0; }
    50% { opacity: .9; background-position: 0 7px; }
  }

  @media (prefers-reduced-motion: reduce) {
    .hero::after { animation: none; opacity: .6; }
  }

  .motion-paused .hero::after { animation: none; opacity: .6; }

  /* Der Kopfbereich schwebt jetzt ueber dem Bild. */
  header { background: transparent; }
}

/* Korrekturen gegen die Vorgaben aus refinement.css/polish.css */
@media (max-width: 760px) {
  /* min-height/height aus der Grossansicht hielten das Bild auf 300px. */
  .hero .hero-visual {
    height: 100%;
    min-height: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: var(--ink);
  }

  /* Die Bildunterschrift liegt in der Ueberlagerung hinter der Schlagzeile. */
  .hero .visual-caption { display: none; }

  /* .headline-line setzt die Textfarbe hart auf --ink. */
  .hero h1 .headline-line { color: #fff; }
  .hero h1 .headline-line.accent { color: var(--orange); }

  /* Die Umbrueche trennen drei eigenstaendige Saetze und muessen bleiben. */
  .hero .hero-description br { display: inline; }
}

/* Zweiter Durchgang am mobilen Hero: Schnitt, Ruhe, Kontrast */
@media (max-width: 760px) {
  /* refinement.css kappt die Zeilen mit overflow:hidden. Bei der engeren
     Zeilenhoehe schnitt das die Unterlaengen von "Neues." ab. */
  .hero h1 .headline-line {
    overflow: visible;
    padding-bottom: 0;
    margin-bottom: 0;
  }

  .hero h1 {
    font-size: clamp(2.9rem, 15vw, 4.2rem);
    line-height: .98;
    margin: 12px 0 16px;
  }

  /* Ruhigerer Ausschnitt: das ganze Motiv bleibt lesbar. */
  .hero .hero-visual img { object-position: 56% 48%; }

  @keyframes hero-drift {
    from { transform: scale(1.02); }
    to { transform: scale(1.08) translate3d(-1.5%, -1%, 0); }
  }

  /* Kraeftigerer Verlauf: die Schlagzeile liegt sonst teils auf hellem Bild. */
  .hero .hero-visual::after {
    background:
      linear-gradient(180deg,
        rgba(14, 27, 34, .62) 0%,
        rgba(14, 27, 34, .50) 30%,
        rgba(14, 27, 34, .86) 66%,
        rgba(14, 27, 34, .97) 100%);
  }

  /* Weniger im Bild: ein Hauptweg, ein Nebenweg. Die Merkmalszeile steht
     im Abschnitt darunter ohnehin ausfuehrlicher. */
  .hero .hero-assurance { display: none; }

  /* Die Kontaktleiste am Fuss ist der Scroll-Hinweis. Ein zweiter Reiz
     daneben war Unruhe. */
  .hero::after { content: none; }

  .hero .hero-copy {
    padding: 116px 22px calc(128px + env(safe-area-inset-bottom));
  }

  .hero .hero-description {
    font-size: 1.04rem;
    line-height: 1.55;
    margin-bottom: 30px;
  }
}

/* Dritter Durchgang: Hero endet buendig ueber der Kontaktleiste */
@media (max-width: 760px) {
  /* Topbar und Kopfzeile stehen im Fluss ueber dem Hero. Ohne Abzug ragte
     er um deren Hoehe unter den Bildschirmrand. --top-h setzt upgrade.js. */
  .hero,
  .hero .hero-copy { min-height: calc(100svh - var(--top-h, 112px)); }

  /* refinement.css setzt hier margin-bottom:0 mit hoeherer Spezifitaet. */
  .hero .hero-copy > p.hero-description { margin-bottom: 28px; }

  .hero .hero-copy { padding-bottom: calc(120px + env(safe-area-inset-bottom)); }

  /* Der Bewegungsschalter lag auf dem Hauptknopf. */
  .motion-global { bottom: calc(104px + env(safe-area-inset-bottom)); width: 40px; height: 40px; }
}

@media (max-width: 760px) {
  /* Etwas Luft zwischen Schlagzeile und Beschreibung. */
  .hero .hero-copy > p.hero-description { margin-top: 6px; }
  .hero h1 { margin-bottom: 20px; }
}

@media (max-width: 760px) {
  /* Gemessen: die orangefarbene Zeile "Neues." erreichte auf dem Bild nur
     1,89:1. Der Verlauf wird ab Bildmitte deutlich dichter, damit die
     Markenfarbe bleiben kann und trotzdem lesbar ist. */
  .hero .hero-visual::after {
    background:
      linear-gradient(180deg,
        rgba(14, 27, 34, .55) 0%,
        rgba(14, 27, 34, .42) 26%,
        rgba(14, 27, 34, .74) 48%,
        rgba(14, 27, 34, .92) 66%,
        rgba(14, 27, 34, .98) 100%);
  }
}

@media (max-width: 760px) {
  /* Die Markenfarbe soll im Hero bleiben. Orange und mittleres Grau liegen
     in der Helligkeit dicht beieinander, deshalb bekommt der Textblock eine
     eigene, kraeftigere Unterlage. Der obere Bildteil bleibt frei davon. */
  .hero .hero-copy::before {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 80%;
    z-index: -1;
    background: linear-gradient(180deg,
      rgba(10, 20, 26, 0) 0%,
      rgba(10, 20, 26, .55) 14%,
      rgba(10, 20, 26, .80) 30%,
      rgba(10, 20, 26, .93) 50%,
      rgba(10, 20, 26, .98) 100%);
    pointer-events: none;
  }
}

/* ------------------------------------------- 8. Anfrage per E-Mail */

.consent-row { margin: 22px 0 18px; }

.consent {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: .92rem;
  line-height: 1.5;
  color: var(--muted);
  cursor: pointer;
}

.consent input {
  flex: none;
  width: 24px;
  height: 24px;
  margin: 0;
  accent-color: var(--ink);
  cursor: pointer;
}

.consent a { color: var(--ink); }

/* Die Falle fuer automatisierte Eintraege bleibt fuer Menschen unsichtbar,
   ohne display:none, damit Ausfuellhilfen sie nicht ueberspringen. */
.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.submit-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.button-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: none;
}

.button-ghost:hover { border-color: var(--ink); background: transparent; }

.send-status {
  margin: 14px 0 0;
  padding: 0;
  font-size: .94rem;
  line-height: 1.5;
}

.send-status[data-art="fehler"] {
  padding: 12px 14px;
  border-radius: 10px;
  background: #fff1ec;
  border: 1px solid #f0b8a4;
  color: #8a2f10;
}

.send-status[data-art="ok"] {
  padding: 12px 14px;
  border-radius: 10px;
  background: #eef7ee;
  border: 1px solid #b9d9bb;
  color: #1e5a26;
}

.send-status[data-art="laeuft"] { color: var(--muted); }

@media (max-width: 560px) {
  .submit-row { flex-direction: column; align-items: stretch; }
  .submit-row .button { justify-content: center; }
}

/* ------------------------------------------------------- 9. Preisseite */

/* --- Paketkarten: gleiche Sprache wie die Leistungskarten --- */

.paket-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(258px, 1fr));
  gap: 16px;
}

.paket {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 30px 26px 26px;
  border-radius: 22px;
  background: #fff;
  border: 1px solid var(--line);
  overflow: hidden;
  transition: transform .4s cubic-bezier(.22, .61, .36, 1), box-shadow .4s ease;
}

/* Der orangefarbene Streifen faehrt beim Einblenden auf. */
.paket::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .5s cubic-bezier(.22, .61, .36, 1);
}

.paket.is-visible::before { transform: scaleX(1); }

@media (hover: hover) {
  .paket:hover { transform: translateY(-4px); box-shadow: 0 26px 50px -30px rgba(24, 43, 53, .45); }
}

.motion-paused .paket { transition: none; }
.motion-paused .paket::before { transform: scaleX(1); transition: none; }

.paket-hervor { background: var(--ink); color: #fff; border-color: var(--ink); }
.paket-hervor .paket-text, .paket-hervor .paket-ab { color: rgba(255, 255, 255, .72); }
.paket-hervor ul { border-top-color: rgba(255, 255, 255, .2); }
.paket-hervor li::before { border-color: var(--orange); }

.paket-marke {
  align-self: flex-start;
  margin-bottom: 12px;
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--orange);
  color: var(--ink);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.paket h3 { margin: 0 0 10px; font-size: 1.02rem; letter-spacing: -.01em; }

.paket-preis {
  margin: 0 0 12px;
  font-size: clamp(2rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.paket-ab {
  display: block;
  margin-bottom: 2px;
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}

.paket-text { margin: 0 0 16px; color: var(--muted); font-size: .92rem; line-height: 1.6; }
.paket ul { margin: auto 0 0; padding: 16px 0 0; border-top: 1px solid var(--line); list-style: none; }
.paket li { position: relative; padding: 5px 0 5px 24px; font-size: .89rem; }

.paket li::before {
  content: "";
  position: absolute;
  left: 1px;
  top: 11px;
  width: 11px;
  height: 7px;
  border-left: 2px solid var(--orange-ink);
  border-bottom: 2px solid var(--orange-ink);
  transform: rotate(-45deg);
}

/* --- Rechner --- */

.rechner-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(290px, .85fr);
  gap: 30px;
  align-items: start;
}

.rechner fieldset {
  border: 1px solid var(--line);
  margin: 0 0 12px;
  padding: 26px 26px 22px;
  border-radius: 20px;
  background: #fff;
}

.rechner legend {
  display: flex;
  align-items: center;
  gap: 12px;
  float: left;
  width: 100%;
  padding: 0;
  margin-bottom: 18px;
  font-weight: 800;
  font-size: 1.02rem;
  letter-spacing: -.015em;
}

.rechner-nr {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: .78rem;
  font-variant-numeric: tabular-nums;
}

.rechner fieldset > *:not(legend) { clear: both; }

.regler { display: block; }

.regler-kopf {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
  font-size: .88rem;
  color: var(--muted);
}

.regler-kopf output {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -.03em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.regler-skala { display: flex; justify-content: space-between; font-size: .74rem; color: var(--muted); }

.rechner input[type="range"] {
  width: 100%;
  height: 32px;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

.rechner input[type="range"]::-webkit-slider-runnable-track { height: 6px; border-radius: 999px; background: var(--line); }
.rechner input[type="range"]::-moz-range-track { height: 6px; border-radius: 999px; background: var(--line); }

.rechner input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 30px;
  height: 30px;
  margin-top: -12px;
  border: 3px solid #fff;
  border-radius: 999px;
  background: var(--ink);
  box-shadow: 0 3px 10px rgba(24, 43, 53, .35);
  transition: transform .2s ease;
}

.rechner input[type="range"]::-moz-range-thumb {
  width: 30px;
  height: 30px;
  border: 3px solid #fff;
  border-radius: 999px;
  background: var(--ink);
  box-shadow: 0 3px 10px rgba(24, 43, 53, .35);
}

.rechner input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.12); }
.rechner input[type="range"]:focus-visible { outline: 3px solid #176a84; outline-offset: 4px; }

.stufen { display: grid; grid-template-columns: repeat(auto-fit, minmax(146px, 1fr)); gap: 10px; }

.stufe, .haken {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  cursor: pointer;
  transition: border-color .2s ease, background-color .2s ease;
}

.haken { margin-bottom: 8px; }

@media (hover: hover) {
  .stufe:hover, .haken:hover { border-color: var(--muted); }
}

.stufe input, .haken input {
  flex: none;
  width: 24px;
  height: 24px;
  margin: 0;
  accent-color: var(--ink);
  cursor: pointer;
}

.stufe span, .haken span { display: block; line-height: 1.35; }
.stufe strong, .haken strong { display: block; font-size: .93rem; }
.stufe small, .haken small { display: block; margin-top: 3px; font-size: .8rem; color: var(--muted); }

.stufe:has(input:checked), .haken:has(input:checked) {
  border-color: var(--ink);
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--ink);
}

.stufe:has(input:focus-visible), .haken:has(input:focus-visible) { outline: 3px solid #176a84; outline-offset: 2px; }

.plz-feld { display: block; font-size: .9rem; font-weight: 700; }

.rechner input[name="plz"] {
  display: block;
  width: 100%;
  max-width: 190px;
  min-height: 52px;
  margin-top: 10px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  font: inherit;
  font-size: 1.1rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: .06em;
}

.rechner input[name="plz"]:focus-visible { outline: 3px solid #176a84; outline-offset: 2px; }

/* Der Kopfbereich bleibt beim Scrollen stehen und ist rund 90px hoch. Ohne
   diesen Abstand rutscht die Summe darunter. --header-h setzt upgrade.js. */
.rechner-panel {
  position: sticky;
  top: calc(var(--header-h, 90px) + 16px);
  max-height: calc(100vh - var(--header-h, 90px) - 40px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.rechner-panel-innen {
  padding: 30px 28px 26px;
  border-radius: 22px;
  background: var(--ink);
  color: #fff;
  box-shadow: 0 28px 60px -34px rgba(24, 43, 53, .85);
}

.rechner-label {
  margin: 0;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .6);
}

.rechner-summe {
  margin: 10px 0 18px;
  font-size: clamp(1.6rem, 3.4vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -.035em;
  line-height: 1.05;
  color: var(--orange);
  font-variant-numeric: tabular-nums;
}

.rechner-summe-text { font-size: clamp(1.4rem, 3vw, 1.7rem); }

.rechner-zeile {
  margin: 0 0 8px;
  padding-left: 15px;
  position: relative;
  font-size: .86rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, .8);
}

.rechner-zeile::before {
  content: "";
  position: absolute;
  left: 0;
  top: .62em;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--orange);
}

.rechner-zeile strong { color: #fff; font-weight: 700; }

.rechner-panel .button {
  width: 100%;
  justify-content: center;
  margin: 20px 0 0;
  background: var(--orange);
  color: var(--ink);
  border: 0;
}

.rechner-hinweis {
  margin: 18px 0 0;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, .18);
  font-size: .8rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, .7);
}

.rechner-hinweis strong { color: #fff; }

/* --- Besichtigung und Wertanrechnung --- */

.preis-doppel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 20px;
  align-items: stretch;
}

.preis-doppel > article { margin: 0; }
.preis-doppel h2 { margin: 6px 0 14px; }

.wert-karte {
  padding: 34px 30px;
  border-radius: 22px;
  background: #fff;
  border: 1px solid var(--line);
}

.preis-fussnote { margin: 16px 0 0; font-size: .84rem; color: var(--muted); }

@media (max-width: 900px) {
  .rechner-layout { grid-template-columns: 1fr; }
  .rechner-panel { position: static; }
  .rechner fieldset { padding: 22px 20px 18px; }
  .wert-karte { padding: 26px 22px; }
}

.paket-zahl { display: block; }

/* Die Karten blenden gestaffelt ein, die Zahl zaehlt dabei hoch. */
.paket[data-reveal] { opacity: 0; transform: translate3d(0, 22px, 0); }
.paket[data-reveal].is-visible { opacity: 1; transform: none; }

/* --- Versprechen unter der Schlagzeile der Preisseite --- */

.preis-versprechen {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.preis-versprechen li {
  position: relative;
  padding-left: 26px;
  font-size: .92rem;
  font-weight: 700;
  color: var(--ink);
}

.preis-versprechen li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  width: 17px;
  height: 17px;
  border-radius: 999px;
  background: var(--orange);
}

.preis-versprechen li::after {
  content: "";
  position: absolute;
  left: 4.5px;
  top: 7px;
  width: 8px;
  height: 5px;
  border-left: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  transform: rotate(-45deg);
}

/* --- Wertanrechnung --- */

.wert-karte { display: flex; flex-direction: column; }

.wert-lead { font-size: 1.02rem; line-height: 1.65; }
.wert-lead strong { color: var(--orange-ink); }

.wert-liste {
  margin: 20px 0 0;
  padding: 20px 0 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.wert-liste li {
  position: relative;
  padding: 0 0 14px 30px;
  font-size: .9rem;
  line-height: 1.5;
  color: var(--muted);
}

.wert-liste li:last-child { padding-bottom: 0; }

.wert-liste strong {
  display: block;
  margin-bottom: 2px;
  font-size: .95rem;
  color: var(--ink);
}

/* Der Pfeil nach unten steht fuer den sinkenden Preis. */
.wert-liste li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 4px;
  width: 15px;
  height: 15px;
  background-color: var(--orange-ink);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 5v14'/%3E%3Cpath d='m6 13 6 6 6-6'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 5v14'/%3E%3Cpath d='m6 13 6 6 6-6'/%3E%3C/svg%3E");
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.wert-karte .preis-fussnote { margin-top: auto; padding-top: 18px; }

/* ------------------------------------------- 10. Rechner im Apple-Stil */

/* Eine gemeinsame Kurve fuer alles: die Beschleunigung, die iOS verwendet. */
:root {
  --ease-apple: cubic-bezier(.16, 1, .3, 1);
  --ease-apple-in: cubic-bezier(.7, 0, .84, 0);
}

/* --- Segmentierte Auswahl statt Kacheln (iOS Segmented Control) --- */

.stufen {
  display: flex;
  gap: 0;
  padding: 4px;
  border-radius: 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  position: relative;
  isolation: isolate;
}

/* Der laufende Hintergrund gleitet unter die gewaehlte Stufe. */
.stufen::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc((100% - 8px) / var(--stufen-anzahl, 4));
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(24, 43, 53, .16), 0 0 0 .5px rgba(24, 43, 53, .06);
  transform: translateX(calc(var(--stufe-aktiv, 0) * 100%));
  transition: transform .42s var(--ease-apple);
}

.motion-paused .stufen::before { transition: none; }

@media (prefers-reduced-motion: reduce) {
  .stufen::before { transition: none; }
}

.stufe {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 6px;
  border: 0;
  border-radius: 11px;
  background: none;
  box-shadow: none;
  text-align: center;
  cursor: pointer;
  transition: transform .2s var(--ease-apple);
}

.stufe input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.stufe span { display: block; }

.stufe strong {
  display: block;
  font-size: .88rem;
  font-weight: 700;
  color: var(--muted);
  transition: color .3s var(--ease-apple);
  white-space: nowrap;
}

.stufe small { display: none; }

.stufe:has(input:checked) {
  background: none;
  border: 0;
  box-shadow: none;
}

.stufe:has(input:checked) strong { color: var(--ink); font-weight: 800; }

.stufe:active { transform: scale(.96); }

.stufe:has(input:focus-visible) { outline: 3px solid #176a84; outline-offset: 2px; }

/* Die Erklaerung wandert unter die Leiste und wechselt mit der Auswahl. */
.stufen-hinweis {
  margin: 12px 0 0;
  min-height: 1.4em;
  font-size: .84rem;
  color: var(--muted);
  text-align: center;
}

.stufen-hinweis span {
  display: inline-block;
  animation: hinweis-ein .4s var(--ease-apple);
}

@keyframes hinweis-ein {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: none; }
}

.motion-paused .stufen-hinweis span { animation: none; }

@media (prefers-reduced-motion: reduce) {
  .stufen-hinweis span { animation: none; }
}

/* --- Regler mit gefuellter Spur --- */

.regler-kopf output {
  font-size: 2.4rem;
  letter-spacing: -.045em;
  transition: transform .18s var(--ease-apple);
}

.regler.zieht output { transform: scale(1.08); }

.rechner input[type="range"] {
  /* Der gefuellte Teil links vom Griff wird ueber einen Verlauf gezeichnet. */
  --fuellung: 20%;
  /* Volle Trefferhoehe, damit der Regler ohne Zielen bedienbar ist. */
  height: 44px;
}

.rechner input[type="range"]::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(to right,
    var(--ink) 0 var(--fuellung),
    var(--line) var(--fuellung) 100%);
}

.rechner input[type="range"]::-moz-range-track {
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(to right,
    var(--ink) 0 var(--fuellung),
    var(--line) var(--fuellung) 100%);
}

.rechner input[type="range"]::-webkit-slider-thumb {
  width: 30px;
  height: 30px;
  margin-top: -11px;
  border: .5px solid rgba(24, 43, 53, .12);
  background: #fff;
  box-shadow: 0 3px 8px rgba(24, 43, 53, .18), 0 1px 2px rgba(24, 43, 53, .12);
  transition: transform .18s var(--ease-apple);
}

.rechner input[type="range"]::-moz-range-thumb {
  width: 30px;
  height: 30px;
  border: .5px solid rgba(24, 43, 53, .12);
  background: #fff;
  box-shadow: 0 3px 8px rgba(24, 43, 53, .18), 0 1px 2px rgba(24, 43, 53, .12);
}

.rechner input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.15); }

/* --- Auswahlzeilen antippbar wie in den iOS-Einstellungen --- */

.haken {
  transition: transform .2s var(--ease-apple), border-color .25s ease, background-color .25s ease;
}

.haken:active { transform: scale(.985); }

.haken input {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  width: 26px;
  height: 26px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: #fff;
  transition: background-color .28s var(--ease-apple), border-color .28s var(--ease-apple);
}

.haken input::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 6px;
  width: 8px;
  height: 4px;
  border-left: 2.5px solid #fff;
  border-bottom: 2.5px solid #fff;
  transform: rotate(-45deg) scale(0);
  transition: transform .3s var(--ease-apple);
}

.haken input:checked {
  background: var(--ink);
  border-color: var(--ink);
}

.haken input:checked::after { transform: rotate(-45deg) scale(1); }

/* --- Ergebnis: mobil ein mitlaufendes Blatt am unteren Rand --- */

@media (max-width: 900px) {
  .rechner-panel {
    position: fixed;
    /* top aus der Desktop-Regel zuruecknehmen, sonst streckt sich das Blatt
       ueber die volle Hoehe statt sich an den unteren Rand zu legen. */
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 55;
    padding: 0;
    transform: translateY(102%);
    transition: transform .5s var(--ease-apple);
    pointer-events: none;
  }

  .rechner-panel.ist-da {
    transform: none;
    pointer-events: auto;
  }

  .rechner-panel-innen {
    border-radius: 22px 22px 0 0;
    padding: 10px 22px calc(20px + env(safe-area-inset-bottom));
    box-shadow: 0 -14px 40px -18px rgba(24, 43, 53, .55);
  }

  /* Der Griff signalisiert, dass sich das Blatt aufziehen laesst. */
  .rechner-griff {
    display: block;
    width: 38px;
    height: 5px;
    margin: 0 auto 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .32);
  }

  /* Zugeklappt: nur Summe und Knopf. Aufgeklappt: alles. */
  .rechner-panel:not(.offen) #rechner-detail,
  .rechner-panel:not(.offen) .rechner-hinweis {
    display: none;
  }

  .rechner-panel:not(.offen) .rechner-kopfzeile {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
  }

  .rechner-panel:not(.offen) .rechner-label { font-size: .68rem; }
  .rechner-panel:not(.offen) .rechner-summe { margin: 0; font-size: 1.5rem; }
  .rechner-panel:not(.offen) .button { margin-top: 14px; }

  .rechner-mehr {
    position: absolute;
    top: 9px;
    right: 12px;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    cursor: pointer;
    transition: transform .3s var(--ease-apple), background-color .2s ease;
  }

  .rechner-mehr .ic { width: 16px; height: 16px; }
  .rechner-panel.offen .rechner-mehr { transform: rotate(180deg); }
  .rechner-mehr:active { transform: scale(.9); }
  .rechner-panel.offen .rechner-mehr:active { transform: rotate(180deg) scale(.9); }

  /* Solange das Blatt zu sehen ist, tritt die Kontaktleiste zurueck. */
  .rechner-sichtbar .contact-dock {
    transform: translateY(130%);
    transition: transform .45s var(--ease-apple);
    pointer-events: none;
  }

  .rechner-sichtbar .motion-global { bottom: calc(170px + env(safe-area-inset-bottom)); }
}

@media (min-width: 901px) {
  .rechner-griff, .rechner-mehr { display: none; }
}

.motion-paused .rechner-panel,
.motion-paused .rechner-sichtbar .contact-dock { transition: none; }

@media (prefers-reduced-motion: reduce) {
  .rechner-panel,
  .rechner-sichtbar .contact-dock,
  .haken input,
  .haken input::after,
  .regler-kopf output { transition: none; }
}

/* --- Die Summe pulst kurz, wenn sie sich aendert --- */

.rechner-summe.frisch { animation: summe-puls .45s var(--ease-apple); }

@keyframes summe-puls {
  0% { transform: scale(1); }
  38% { transform: scale(1.045); }
  100% { transform: scale(1); }
}

.motion-paused .rechner-summe.frisch { animation: none; }

@media (prefers-reduced-motion: reduce) {
  .rechner-summe.frisch { animation: none; }
}

/* --- Paketkarten reagieren auf Tippen --- */

.paket { transition: transform .35s var(--ease-apple), box-shadow .35s ease; }
.paket:active { transform: scale(.985); }

/* ------------------------------------------------- 11. Rollende Ziffern */

/* Der Betrag steht in Spalten. Jede Spalte zeigt genau eine Ziffer und
   rollt beim Wechsel auf die neue — wie die Zahlenanzeige in iOS. */

.zf {
  display: inline-flex;
  align-items: baseline;
  font-variant-numeric: tabular-nums;
}

.zf-stelle {
  display: inline-block;
  overflow: hidden;
  height: 1em;
  line-height: 1;
  vertical-align: baseline;
}

.zf-rolle {
  display: block;
  transition: transform .55s cubic-bezier(.16, 1, .3, 1);
  will-change: transform;
}

.zf-z {
  display: block;
  height: 1em;
  line-height: 1;
  text-align: center;
}

.zf-fest { display: inline-block; }

/* Die Spalten starten leicht versetzt, damit die Zahl lebendig wirkt. */
.zf-stelle:nth-child(2) .zf-rolle { transition-delay: 20ms; }
.zf-stelle:nth-child(3) .zf-rolle { transition-delay: 40ms; }
.zf-stelle:nth-child(4) .zf-rolle { transition-delay: 60ms; }

.motion-paused .zf-rolle { transition: none; }

@media (prefers-reduced-motion: reduce) {
  .zf-rolle { transition: none; }
}

/* --- Der Reglergriff staucht beim Ziehen, wie in iOS --- */

.regler.zieht input[type="range"]::-webkit-slider-thumb {
  transform: scale(1.18);
}

.regler.zieht .regler-kopf output {
  transform: scale(1.06);
}

/* Die Spur wird beim Ziehen etwas kräftiger. */
.regler.zieht input[type="range"]::-webkit-slider-runnable-track {
  height: 10px;
}

.rechner input[type="range"]::-webkit-slider-runnable-track {
  transition: height .2s cubic-bezier(.16, 1, .3, 1);
}

/* --- Druckgefühl auf allen antippbaren Flächen --- */

.paket,
.stufe,
.haken,
.rechner-mehr,
.date-cell,
.rechner-panel .button {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* Der Klartext liegt fuer Vorlesegeraete bereit, ist aber nicht zu sehen. */
.zf-klartext {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.zf-optik { display: inline-flex; align-items: baseline; }
