:root {
  --bg: #f4f1ed;
  --card: #ffffff;
  --text: #222222;
  --muted: #6a625c;
  --accent: #b85d2d;
  --accent-dark: #8f421e;
  --border: #ded7d0;
  --soft: #f8f5f2;
  --danger: #a22424;
  --shadow: 0 18px 45px rgba(60, 42, 29, 0.10);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(184, 93, 45, 0.10), transparent 36rem),
    var(--bg);
  line-height: 1.55;
}

button, input, textarea { font: inherit; }

.page-shell {
  width: min(920px, calc(100% - 32px));
  margin: 48px auto;
}

.card {
  background: var(--card);
  border: 1px solid rgba(222, 215, 208, 0.9);
  border-radius: 24px;
  padding: clamp(24px, 5vw, 52px);
  box-shadow: var(--shadow);
}

.result-card { margin-top: 28px; }

.eyebrow {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: .09em;
  font-size: .78rem;
  font-weight: 800;
}

h1, h2, h3 { line-height: 1.18; }
h1 { font-size: clamp(2rem, 5vw, 3.6rem); margin: 10px 0 18px; }
h2 { font-size: clamp(1.7rem, 4vw, 2.5rem); margin: 8px 0 0; }
h3 { margin: 30px 0 12px; }
.intro { font-size: 1.08rem; color: var(--muted); max-width: 720px; margin-bottom: 34px; }

fieldset { border: 0; padding: 0; margin: 0 0 28px; }
legend, .field-group > label { display: block; font-weight: 750; margin-bottom: 10px; }
.optional { font-weight: 500; color: var(--muted); font-size: .9rem; }

.choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.choice-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 18px 18px 48px;
  border: 1.5px solid var(--border);
  border-radius: 16px;
  cursor: pointer;
  transition: .18s ease;
  background: #fff;
}

.choice-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.choice-card input { position: absolute; left: 18px; top: 22px; accent-color: var(--accent); }
.choice-card:has(input:checked) { border-color: var(--accent); background: #fff8f3; box-shadow: 0 0 0 3px rgba(184, 93, 45, .10); }
.choice-title { font-weight: 800; }
.choice-subtitle { color: var(--muted); font-size: .92rem; }

.field-group { margin-bottom: 24px; }
input[type="text"], textarea {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  color: var(--text);
  background: #fff;
  outline: none;
  transition: .18s ease;
}
textarea { resize: vertical; min-height: 150px; }
input[type="text"]:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(184, 93, 45, .10); }
.field-hint { margin-top: 8px; color: var(--muted); font-size: .9rem; }

.consent-row { display: flex; gap: 10px; align-items: flex-start; color: var(--muted); font-size: .94rem; margin: 4px 0 22px; }
.consent-row input { margin-top: 4px; accent-color: var(--accent); }

.primary-button, .secondary-button {
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 800;
  transition: .18s ease;
}
.primary-button { width: 100%; padding: 15px 20px; color: #fff; background: var(--accent); }
.primary-button:hover { background: var(--accent-dark); transform: translateY(-1px); }
.secondary-button { padding: 10px 14px; background: var(--soft); color: var(--text); border: 1px solid var(--border); }
.secondary-button:hover { border-color: var(--accent); }
.form-error { color: var(--danger); margin: 14px 0 0; font-weight: 650; }

.result-heading-row { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; }
.price-box {
  margin: 28px 0;
  padding: 22px;
  border-radius: 18px;
  background: linear-gradient(135deg, #fff5ef, #f7ede6);
  border: 1px solid #ecd0be;
}
.price-label { display: block; color: var(--muted); margin-bottom: 3px; }
.price-box strong { font-size: clamp(2rem, 5vw, 3.2rem); color: var(--accent-dark); }
.summary-box, .notice { padding: 20px; background: var(--soft); border-radius: 16px; border: 1px solid var(--border); }
.summary-box h3 { margin-top: 0; }
.summary-box p, .notice p { margin-bottom: 0; }
.notice { margin-top: 26px; }
.notice p + p { margin-top: 10px; }

.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 16px; }
table { width: 100%; border-collapse: collapse; min-width: 520px; }
th, td { padding: 15px 16px; text-align: left; border-bottom: 1px solid var(--border); }
th:last-child, td:last-child { text-align: right; white-space: nowrap; }
th { background: var(--soft); font-size: .92rem; }
tbody tr:last-child td { border-bottom: 0; }

@media (max-width: 650px) {
  .page-shell { width: min(100% - 20px, 920px); margin: 18px auto; }
  .card { border-radius: 18px; padding: 22px; }
  .choice-grid { grid-template-columns: 1fr; }
  .result-heading-row { flex-direction: column; }
  .secondary-button { width: 100%; }
}


.request-box {
  margin-top: 28px;
  padding: 22px;
  border-radius: 16px;
  background: #fff8f3;
  border: 1px solid #ecd0be;
}

.request-box h3 {
  margin-top: 0;
}

.request-box p {
  color: var(--muted);
}

.email-button {
  display: block;
  text-align: center;
  text-decoration: none;
  margin-top: 18px;
}

.request-hint {
  font-size: .9rem;
  margin: 12px 0 0;
}


.mail-confirmation {
  margin: 0 0 22px;
  padding: 16px 18px;
  border: 1px solid #b9d9c0;
  border-radius: 14px;
  background: #f2fbf4;
  line-height: 1.5;
}

.mail-confirmation strong {
  display: block;
  margin-bottom: 4px;
}

.mail-confirmation[hidden] {
  display: none;
}


.connector-options {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.connector-choice {
  cursor: pointer;
}

.connector-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.connector-choice span {
  display: inline-block;
  min-width: 92px;
  padding: 11px 18px;
  text-align: center;
  border: 1px solid #d8d8d8;
  border-radius: 12px;
  background: #fff;
  font-weight: 700;
}

.connector-choice input:checked + span {
  border-color: #9d4c25;
  box-shadow: 0 0 0 2px rgba(157, 76, 37, .12);
  background: #fff8f3;
}

.diagnosis-box {
  margin-top: 22px;
  padding: 20px;
  border: 1px solid #e1e1e1;
  border-radius: 16px;
  background: #fff;
}

.result-kicker {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  font-weight: 700;
}

.result-price,
.route-price {
  margin: 5px 0 8px;
  font-size: 1.55rem;
  font-weight: 800;
}

.small-note,
.route-note {
  color: var(--muted);
  font-size: .93rem;
}

.routes-heading {
  margin-top: 28px;
}

.routes-heading h3 {
  margin-bottom: 6px;
}

.routes-heading p {
  margin-top: 0;
  color: var(--muted);
}

.route-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 14px;
  align-items: stretch;
  margin-top: 16px;
}

.route-card {
  padding: 20px;
  border: 1px solid #e1e1e1;
  border-radius: 16px;
  background: #fff;
}

.route-card h4 {
  margin: 6px 0 0;
  font-size: 1.08rem;
}

.route-card p {
  margin-bottom: 0;
  color: var(--muted);
}

.or-divider {
  align-self: center;
  font-size: .8rem;
  font-weight: 800;
  color: var(--muted);
}

.route-note {
  text-align: center;
  margin-top: 12px;
}

@media (max-width: 650px) {
  .route-grid {
    grid-template-columns: 1fr;
  }

  .or-divider {
    text-align: center;
    padding: 0;
  }
}


/* Version 1.8: übersichtliche, vertikale Ergebnisdarstellung */
.result-stack {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 18px;
}

.result-option {
  padding: 20px 22px;
  border: 1px solid #e1e1e1;
  border-radius: 16px;
  background: #fff;
}

.result-option h3 {
  margin: 6px 0 8px;
  font-size: 1.08rem;
}

.result-option p {
  margin-bottom: 0;
}

.result-option .result-price {
  margin: 6px 0 8px;
  font-size: 1.55rem;
  font-weight: 800;
}

.result-stack + .route-note {
  margin: 14px 4px 22px;
  text-align: left;
}

.shipping-inline {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
}

.success-message {
  margin: 0 0 24px;
  padding: 20px 22px;
  border: 2px solid #2f7d4a;
  border-radius: 16px;
  background: #eef9f1;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .08);
}

.success-message strong {
  display: block;
  margin-bottom: 5px;
  font-size: 1.15rem;
  color: #245f39;
}

.success-message span {
  display: block;
  line-height: 1.5;
}

/* v2 – mehrere Reparaturbereiche */
.category-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.conditional[hidden] { display: none; }
.result-stack { display: grid; gap: 14px; margin-top: 26px; }
.result-option, .individual-box { padding: 22px; border: 1px solid var(--border); border-radius: 16px; background: #fff; }
.result-option h3, .individual-box h3 { margin: 6px 0 10px; }
.individual-box { margin-top: 26px; background: var(--soft); }
.shipping-inline { font-size: .82rem; font-weight: 600; color: var(--muted); white-space: nowrap; }
@media (max-width: 800px) { .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 650px) { .category-grid { grid-template-columns: 1fr; } }


/* Autoschlüssel – Version 2.1 */
.key-error-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.key-error-choice {
  cursor: pointer;
}

.key-error-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.key-error-choice span {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  text-align: center;
  border: 1px solid #d8d8d8;
  border-radius: 12px;
  background: #fff;
  font-weight: 700;
}

.key-error-choice input:checked + span {
  border-color: #9d4c25;
  box-shadow: 0 0 0 2px rgba(157, 76, 37, .12);
  background: #fff8f3;
}

.kv-note {
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: 14px;
  background: #f6f6f6;
  border: 1px solid #dddddd;
  line-height: 1.5;
}

.kv-note strong {
  display: block;
  margin-bottom: 4px;
}

.key-main-estimate {
  border-width: 2px;
}

@media (max-width: 650px) {
  .key-error-grid {
    grid-template-columns: 1fr;
  }
}


.back-to-site {
  display: inline-block;
  margin: 0 0 18px;
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}
.back-to-site:hover { text-decoration: underline; }
.confirmation-actions { margin-top: 14px; }
.confirmation-site-button {
  display: inline-block;
  width: auto;
  margin-top: 0;
  padding: 11px 16px;
  text-decoration: none;
}
