:root {
  --magenta: #cc0066;
  --magenta-dark: #99004d;
  --magenta-soft: #f5d6e5;
  --ink: #26231f;
  --heading: #302d29;
  --muted: #706b64;
  --paper: #f5f3ee;
  --paper-deep: #ece6dc;
  --line: #d8d1c7;
  --white: #ffffff;
  --danger: #c73535;
}

* {
  box-sizing: border-box;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
}

.order-body {
  min-height: 100vh;
  background: var(--paper);
}

.order-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: calc(var(--header-height, 94px) + 34px) 0 86px;
}

.form-back-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-bottom: 18px;
  color: var(--muted);
  font-weight: 800;
}

.form-back-link::before {
  content: "←";
  margin-right: 10px;
  color: var(--magenta);
}

.form-back-link:hover,
.form-back-link:focus-visible {
  color: var(--ink);
}

.order-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(46px, 7vw, 78px) clamp(24px, 5vw, 66px);
  background:
    linear-gradient(90deg, rgba(18, 15, 12, 0.96) 0%, rgba(18, 15, 12, 0.88) 52%, rgba(18, 15, 12, 0.58) 100%),
    url("../images/hero-einstieg.webp") center / cover;
  color: var(--white);
  border-bottom: 8px solid var(--magenta);
}

.order-body-switcher .order-hero {
  background:
    linear-gradient(90deg, rgba(18, 15, 12, 0.96) 0%, rgba(18, 15, 12, 0.88) 52%, rgba(18, 15, 12, 0.58) 100%),
    url("../images/post-fristen.webp") center / cover;
}

.order-hero h1 {
  max-width: 900px;
  margin: 0 0 18px;
  color: var(--white);
  font-size: clamp(44px, 6vw, 72px);
  line-height: 1.02;
  font-weight: 850;
}

.order-hero p:not(.section-kicker) {
  max-width: 720px;
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 19px;
  line-height: 1.55;
}

.order-form {
  position: relative;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 0;
  box-shadow: 0 18px 54px rgba(38, 35, 31, 0.08);
  padding: clamp(34px, 5vw, 70px);
}

.order-form::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 2px;
  background: rgba(204, 0, 102, 0.36);
}

.stepper {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.stepper button {
  width: auto;
  min-width: 0;
  min-height: 0;
  padding: 0 2px 0 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 850;
  cursor: pointer;
}

.stepper button span {
  font-size: 12px;
  color: inherit;
}

.stepper button.is-active {
  color: var(--magenta);
}

.stepper button.is-complete {
  color: var(--ink);
}

.stepper i {
  flex: 1;
  min-width: 18px;
  height: 1px;
  background: var(--line);
}

.step-label {
  position: relative;
  margin: 0 0 44px;
  padding-bottom: 14px;
  color: var(--magenta);
  font-weight: 850;
  text-align: center;
}

.step-label::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: min(340px, 100%);
  height: 4px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, var(--magenta) 0 var(--step-progress, 20%), var(--line) var(--step-progress, 20%) 100%);
}

.form-page {
  display: none;
}

.form-page.is-active {
  display: block;
}

.form-page-head {
  max-width: 980px;
  margin-bottom: 36px;
}

.form-page h2,
.done-page h2 {
  margin: 0 0 14px;
  max-width: 960px;
  color: var(--heading);
  font-size: clamp(38px, 4vw, 54px);
  line-height: 1.06;
  font-weight: 850;
  text-wrap: balance;
}

.lead {
  max-width: 860px;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
}

label,
fieldset {
  display: block;
  margin: 0 0 16px;
}

label {
  color: var(--ink);
  font-weight: 800;
}

legend {
  margin-bottom: 12px;
  color: var(--ink);
  font-weight: 850;
}

input,
select,
textarea {
  width: 100%;
  margin-top: 8px;
  min-height: 56px;
  padding: 15px 16px;
  border: 1.5px solid #cbc3b8;
  border-radius: 0;
  font: inherit;
  color: var(--ink);
  background: #fffdf9;
}

.optional-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input:focus,
select:focus,
textarea:focus {
  outline: 3px solid rgba(204, 0, 102, 0.18);
  border-color: var(--magenta);
}

input[type="checkbox"],
input[type="radio"] {
  width: auto;
  margin: 0 9px 0 0;
}

.field-grid,
.role-counter-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 22px;
}

.field-grid.thirds,
.role-counter-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.price-focus {
  margin: 0;
  background: var(--dark, #171717);
  color: rgba(255, 255, 255, 0.78);
  border-left: 0;
  border-bottom: 6px solid var(--magenta);
}

.order-offer-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  margin: 28px 0 30px;
}

.price-focus-head {
  padding: clamp(30px, 4vw, 44px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px 30px;
  align-items: end;
}

.price-focus-head span {
  color: var(--magenta-soft);
  font-size: 13px;
  font-weight: 850;
  text-transform: uppercase;
}

.price-focus-head strong {
  grid-column: 2;
  grid-row: 1 / span 2;
  color: var(--white);
  font-size: clamp(38px, 5vw, 62px);
  line-height: 0.95;
  white-space: nowrap;
}

.price-focus-head em {
  color: rgba(255, 255, 255, 0.68);
  font-style: normal;
  font-weight: 800;
}

.price-lines {
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.contract-map {
  background: var(--paper);
  border: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.contract-map-head {
  padding: 20px 0;
  background: transparent;
  border-bottom: 1px solid var(--line);
}

.contract-map-head span {
  display: block;
  margin-bottom: 8px;
  color: var(--magenta);
  font-size: 13px;
  font-weight: 850;
  text-transform: uppercase;
}

.contract-map-head strong {
  display: block;
  color: var(--heading);
  font-size: 24px;
  line-height: 1.1;
}

.contract-map details {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.contract-map details:last-child {
  border-bottom: 0;
}

.contract-map summary {
  cursor: pointer;
  color: var(--ink);
  font-weight: 850;
}

.contract-map p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.price-focus .price-line {
  border-color: rgba(255, 255, 255, 0.16);
}

.price-focus .price-line strong {
  color: var(--white);
}

.check-group,
.radio-group {
  padding: clamp(18px, 3vw, 26px) 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: transparent;
}

.check-group label,
.radio-group label {
  color: var(--muted);
  font-weight: 700;
  line-height: 1.5;
}

.compact-checks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 18px;
}

.compact-checks legend {
  grid-column: 1 / -1;
}

.condition-note {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding: clamp(18px, 3vw, 24px);
  background: #fffdf9;
  border: 0;
}

.condition-note strong {
  color: var(--ink);
  font-size: 18px;
}

.condition-note span {
  display: block;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.condition-route {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  padding: clamp(18px, 3vw, 24px);
  background: #24211d;
  color: var(--white);
}

.condition-route strong {
  color: var(--white);
  font-size: 20px;
}

.condition-route p {
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
}

.condition-route .button {
  justify-self: start;
  margin-top: 4px;
}

.condition-checks .condition-note label {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
  margin: 0;
  min-height: 56px;
  padding: 14px 0 0;
  border-top: 1px solid rgba(216, 209, 199, 0.78);
  color: var(--muted);
}

.radio-group label,
.compact-checks label {
  min-height: 56px;
  margin: 0 0 10px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fffdf9;
  border: 1px solid rgba(216, 209, 199, 0.88);
}

.radio-group label:has(input:checked),
.compact-checks label:has(input:checked),
.condition-checks .condition-note label:has(input:checked) {
  border-color: rgba(204, 0, 102, 0.52);
  background: rgba(245, 214, 229, 0.28);
  color: var(--ink);
}

.clarity-panel,
.after-submit-panel,
.payment-trust {
  margin-top: 22px;
  padding: 18px 20px;
  background: rgba(245, 214, 229, 0.34);
  border-left: 4px solid var(--magenta);
}

.clarity-panel strong,
.after-submit-panel strong {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 18px;
}

.clarity-panel p,
.after-submit-panel span,
.payment-trust {
  color: var(--muted);
  font-weight: 700;
  line-height: 1.55;
}

.after-submit-panel {
  display: grid;
  gap: 8px;
}

.users-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.users-head h3 {
  margin: 0 0 8px;
  color: var(--heading);
  font-size: 24px;
}

.users-head p {
  margin: 0;
  color: var(--muted);
}

.user-card {
  margin: 18px 0;
  padding: clamp(20px, 3vw, 28px);
  border: 1px solid var(--line);
  background: var(--paper);
}

.user-card-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.payment-panel {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1.28fr);
  gap: clamp(24px, 4vw, 44px);
  align-items: start;
  margin-top: 26px;
  padding: clamp(18px, 3vw, 30px) 0;
  background: transparent;
  border: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.payment-panel h3 {
  margin: 0 0 14px;
  color: var(--heading);
  font-size: clamp(24px, 2.4vw, 34px);
  line-height: 1.06;
  text-wrap: balance;
}

.payment-panel p {
  margin: 0;
  color: var(--muted);
}

.payment-fields {
  display: grid;
  gap: 4px;
}

.iban-hint {
  margin: -6px 0 14px;
  padding: 12px 14px;
  border-left: 3px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.iban-hint.is-valid {
  border-left-color: var(--magenta);
  color: var(--ink);
}

.iban-hint.is-invalid {
  border-left-color: var(--danger);
  color: var(--danger);
}

input.is-invalid,
select.is-invalid,
textarea.is-invalid {
  border-color: var(--danger);
  outline: 3px solid rgba(199, 53, 53, 0.14);
}

.field-error {
  margin: 8px 0 0;
  color: var(--danger);
  font-size: 14px;
  font-weight: 800;
}

.mandate-box {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 13px;
  padding: 20px;
  border: 1px solid rgba(204, 0, 102, 0.24);
  background: rgba(245, 214, 229, 0.28);
  color: var(--ink);
}

.mandate-box input {
  margin-top: 4px;
}

.mandate-box span {
  color: var(--muted);
  font-weight: 700;
  line-height: 1.55;
}

.mandate-box a {
  color: var(--magenta);
  font-weight: 850;
}

.final-confirmation {
  margin-top: 26px;
}

.small-button,
.secondary-button,
.primary-button {
  position: relative;
  overflow: hidden;
  min-height: 48px;
  padding: 13px 22px;
  border: 1px solid transparent;
  border-radius: 0;
  font: inherit;
  font-weight: 850;
  cursor: pointer;
  text-align: center;
  transition: border-color 180ms ease, color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.small-button,
.secondary-button {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}

.primary-button {
  background: var(--magenta);
  color: var(--white);
  box-shadow: 0 18px 42px rgba(204, 0, 102, 0.2);
}

.primary-button:hover,
.primary-button:focus-visible,
.small-button:hover,
.small-button:focus-visible,
.secondary-button:hover,
.secondary-button:focus-visible {
  transform: none;
}

.small-button:hover,
.small-button:focus-visible,
.secondary-button:hover,
.secondary-button:focus-visible {
  border-color: var(--magenta);
  color: var(--white);
  background: var(--magenta);
  box-shadow: 0 18px 42px rgba(204, 0, 102, 0.2);
}

.primary-button:hover,
.primary-button:focus-visible {
  box-shadow: 0 22px 52px rgba(204, 0, 102, 0.34);
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.error-box {
  margin-bottom: 22px;
  padding: 16px 18px;
  border: 1.5px solid var(--danger);
  background: #fff3f3;
  color: var(--danger);
  font-weight: 800;
}

.error-box strong {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
}

.summary {
  margin: 22px 0;
  padding: clamp(20px, 3vw, 28px);
  background: #fffdf9;
  border: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.summary-group {
  padding: 0;
  border-bottom: 1px solid var(--line);
}

.summary-group:last-child {
  border-bottom: 0;
}

.summary-group h3 {
  margin: 0;
  padding: 18px clamp(18px, 3vw, 26px) 8px;
  color: var(--heading);
  font-size: 20px;
}

.price-line,
.summary-line {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 10px clamp(18px, 3vw, 26px);
  border-bottom: 1px solid rgba(216, 209, 199, 0.7);
}

.price-line:last-child,
.summary-line:last-child {
  border-bottom: 0;
}

.summary-line span {
  text-align: right;
}

.done-page .lead {
  margin-bottom: 24px;
  font-size: 18px;
}

.done-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.done-actions .primary-button,
.done-actions .secondary-button {
  text-decoration: none;
}

.form-footer {
  padding: 28px 20px;
  background: var(--ink);
  color: rgba(255, 255, 255, 0.78);
}

.form-footer-inner {
  max-width: 1170px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.form-footer p {
  margin: 0;
}

.form-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 18px;
}

.form-footer a {
  color: inherit;
  text-decoration: none;
  font-weight: 700;
}

.form-footer a:hover,
.form-footer a:focus-visible {
  color: var(--white);
}

@media (max-width: 900px) {
  .stepper {
    grid-template-columns: repeat(5, minmax(80px, 1fr));
    overflow-x: auto;
    padding-bottom: 8px;
  }

  .stepper i {
    display: none;
  }

  .stepper button {
    min-width: 86px;
    flex-direction: column;
    gap: 2px;
  }

  .field-grid,
  .field-grid.thirds,
  .role-counter-grid,
  .order-offer-layout,
  .payment-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .order-shell {
    width: min(100% - 24px, 1280px);
    padding: calc(var(--header-height, 132px) + 24px) 0 48px;
  }

  .order-hero {
    padding: 34px 20px;
  }

  .order-hero h1,
  .form-page h2,
  .done-page h2 {
    font-size: 34px;
  }

  .order-form {
    padding: 26px 18px;
  }

  .stepper {
    display: none;
  }

  .price-focus-head {
    grid-template-columns: 1fr;
  }

  .price-focus-head strong {
    grid-column: 1;
    grid-row: auto;
    font-size: 46px;
  }

  .compact-checks {
    grid-template-columns: 1fr;
  }

  .contract-map-head,
  .contract-map details {
    padding-left: 18px;
    padding-right: 18px;
  }

  .users-head,
  .form-actions,
  .form-footer-inner {
    align-items: stretch;
    flex-direction: column;
  }

  .form-footer nav {
    justify-content: flex-start;
  }

  .primary-button,
  .secondary-button,
  .small-button {
    width: 100%;
  }

  .form-actions {
    position: sticky;
    bottom: 0;
    z-index: 10;
    margin-left: -18px;
    margin-right: -18px;
    margin-bottom: -26px;
    padding: 14px 18px;
    background: rgba(245, 243, 238, 0.96);
    box-shadow: 0 -18px 42px rgba(38, 35, 31, 0.12);
    backdrop-filter: blur(12px);
  }

  .price-line,
  .summary-line {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .summary-line span {
    text-align: left;
  }
}
