*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(135deg, #f0f7ff 0%, #ffffff 100%);
  min-height: 100vh;
  color: #4c4c4c;
}

/* ── Layout ─────────────────────────────────────────────────── */
.page { padding: 2.5rem 1rem; }
.container { max-width: 680px; margin: 0 auto; }
.page-center { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 1rem; }

/* ── Back link ──────────────────────────────────────────────── */
.back-link { margin-bottom: 1.25rem; }
.back-link a {
  color: #76b9f0; font-weight: 600; font-size: .875rem;
  text-decoration: none; transition: color .2s;
}
.back-link a:hover { color: #5aa8e8; }

/* ── Hero ───────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, #76b9f0, #5aa8e8);
  border-radius: 1.25rem; padding: 2rem 2rem 1.75rem;
  margin-bottom: 1.5rem; box-shadow: 0 4px 20px rgba(118,185,240,.3);
}
.hero h1 { color: #fff; font-size: 1.5rem; font-weight: 700; line-height: 1.3; }
.hero p  { color: rgba(255,255,255,.8); font-size: .875rem; margin-top: .5rem; }

/* ── Sections ───────────────────────────────────────────────── */
.section {
  background: #fff; border-radius: 1.25rem;
  border: 1px solid #e8f1fb; box-shadow: 0 2px 8px rgba(118,185,240,.08);
  overflow: hidden; margin-bottom: 1.25rem;
}
.section-head {
  background:linear-gradient(94deg, #76b9f0, #f7838d);
  padding: .9rem 1.5rem; border-bottom: 1px solid #e0edf8;
}
.section-head h2 {
  font-size: .75rem; font-weight: 700; color: white;
  text-transform: uppercase; letter-spacing: .08em;
}
.section-hint { font-size: .75rem; color: white; margin-top: .2rem; }
.section-body { padding: 1.25rem 1.5rem; display: flex; flex-direction: column; gap: 1rem; }

/* ── Fields ─────────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: .4rem; }
.field label {
  font-size: .875rem; font-weight: 700; color: #4c4c4c;
}
.field input, .field textarea, .field select {
  width: 100%; padding: .75rem 1rem; border-radius: .75rem;
  border: 1px solid #d4e6f8; background: #fff;
  color: #4c4c4c; font-size: .875rem; font-family: inherit;
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
  transition: border-color .2s, box-shadow .2s; outline: none;
}
.field input:focus, .field textarea:focus {
  border-color: #76b9f0; box-shadow: 0 0 0 3px rgba(118,185,240,.18);
}
.field input::placeholder, .field textarea::placeholder { color: #bbb; }
.field textarea { resize: vertical; }

.has-error input, .has-error textarea { border-color: #f7838d; }
.has-error input:focus { box-shadow: 0 0 0 3px rgba(247,131,141,.18); }

/* ── Grids ──────────────────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; }
.grid-2-always { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 520px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

/* ── Radio / Checkbox ───────────────────────────────────────── */

/* Checkbox-Gruppen: immer 2-spaltig, auf kleinen Handys 1-spaltig */
.checkbox-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .6rem .75rem;
}
@media (max-width: 480px) {
  .checkbox-group { grid-template-columns: 1fr; }
}

/* Radio-Gruppen: inline auf Desktop, Spalte auf Handy */
.radio-group { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; }
.radio-group.col { flex-direction: column; gap: .5rem; }
@media (max-width: 520px) {
  .radio-group { flex-direction: column; gap: .5rem; }
  .radio-group.inline { flex-direction: row; flex-wrap: wrap; }
}

.radio-label, .checkbox-label {
  display: flex; align-items: flex-start; gap: .5rem;
  cursor: pointer; font-size: .875rem; color: #4c4c4c;
}
.field .radio-label,
.field .checkbox-label { font-weight: 400; }
.radio-label input[type=radio],
.checkbox-label input[type=checkbox] {
  width: 1rem; height: 1rem; margin-top: .15rem;
  accent-color: #76b9f0; flex-shrink: 0; cursor: pointer;
}

/* ── Hints ──────────────────────────────────────────────────── */
.hint { font-size: .7rem; color: #4c4c4c; opacity: .55; font-weight: 400; }
.req  { color: #f7838d; font-weight: 700; }
.err  { color: #f7838d; font-size: .75rem; margin-top: .15rem; }
.field-note { font-size: .75rem; color: #4c4c4c; opacity: .5; font-weight: 600; margin-top: .2rem; }

/* ── Conditional / Inline ───────────────────────────────────── */
.conditional-block {
  border-left: 2px solid rgba(118,185,240,.3);
  padding-left: 1rem; display: flex; flex-direction: column; gap: .75rem;
}
.inline-conditional { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: end; }
@media (max-width: 520px) { .inline-conditional { grid-template-columns: 1fr; } }

.inline-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .5rem; }
.inline-row .flex-grow { flex: 1; min-width: 8rem; }
.inline-sep { font-size: .875rem; font-weight: 600; color: #4c4c4c; padding-bottom: .85rem; white-space: nowrap; }

/* ── Warnings ───────────────────────────────────────────────── */
.warning-box {
  background: #fffbeb; border: 1px solid #fcd34d;
  border-radius: .75rem; padding: .75rem 1rem;
  font-size: .8rem; color: #92400e;
}

/* ── Options (Leistung) ─────────────────────────────────────── */
.intro-text { font-size: .875rem; color: #4c4c4c; opacity: .7; line-height: 1.6; }
.option-card {
  display: flex; align-items: flex-start; gap: .75rem;
  padding: 1rem; border-radius: .75rem;
  border: 1px solid #d4e6f8; cursor: pointer;
  transition: border-color .2s, background .2s;
}
.option-card:hover { border-color: #76b9f0; background: #f5faff; }
.option-card.selected { border-color: #76b9f0; background: #f5faff; }
.option-card input[type=radio] { margin-top: .2rem; flex-shrink: 0; accent-color: #76b9f0; width:1rem; height:1rem; }
.option-card strong { color: #76b9f0; display: block; margin-bottom: .3rem; font-size: .875rem; }
.option-card p { font-size: .8rem; color: #4c4c4c; line-height: 1.6; margin: 0; }

/* ── Datenschutz ────────────────────────────────────────────── */
.datenschutz-box {
  background: #f8fbff; border: 1px solid #dceefa;
  border-radius: 1.25rem; padding: 1.5rem; margin-bottom: 1.25rem;
}
.datenschutz-box h2 { font-size: .9rem; font-weight: 700; color: #4c4c4c; margin-bottom: .75rem; }
.datenschutz-box p { font-size: .8rem; color: #4c4c4c; opacity: .75; line-height: 1.7; margin-bottom: .6rem; }
.datenschutz-box a { color: #76b9f0; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.consent { margin-top: .75rem; font-size: .875rem; line-height: 1.5; }
.consent.has-error span { color: #f7838d; }

/* ── Buttons ────────────────────────────────────────────────── */
.btn-submit {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: .6rem;
  background: #76b9f0; color: #fff; font-size: 1rem; font-weight: 700;
  border: none; border-radius: .875rem; padding: 1rem 2rem;
  cursor: pointer; box-shadow: 0 4px 14px rgba(118,185,240,.35);
  transition: background .2s, box-shadow .2s; letter-spacing: .02em;
}
.btn-submit:hover { background: #5aa8e8; box-shadow: 0 6px 18px rgba(118,185,240,.45); }
.btn-submit:active { background: #4a9cd8; }

.btn-primary {
  display: inline-block; background: #76b9f0; color: #fff;
  font-size: .9rem; font-weight: 600; border-radius: .875rem;
  padding: .85rem 2rem; text-decoration: none;
  box-shadow: 0 4px 14px rgba(118,185,240,.3);
  transition: background .2s;
}
.btn-primary:hover { background: #5aa8e8; }

/* ── Alerts ─────────────────────────────────────────────────── */
.alert-error {
  background: #fff0f0; border: 1px solid #fca5a5;
  color: #b91c1c; border-radius: .75rem; padding: .9rem 1.25rem;
  font-size: .875rem; margin-bottom: 1.25rem;
}

/* ── Success ────────────────────────────────────────────────── */
.success-card {
  background: #fff; border-radius: 1.5rem; padding: 2.5rem 2rem;
  max-width: 420px; width: 100%; text-align: center;
  box-shadow: 0 8px 30px rgba(118,185,240,.15);
}
.success-icon {
  width: 4rem; height: 4rem; background: #e8f4ff; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.75rem; color: #76b9f0; margin: 0 auto 1.25rem;
}
.success-card h2 { font-size: 1.5rem; color: #4c4c4c; margin-bottom: .6rem; }
.success-card p  { font-size: .9rem; color: #4c4c4c; opacity: .7; line-height: 1.7; margin-bottom: 1.5rem; }

/* ── Footer ─────────────────────────────────────────────────── */
.pflicht-note { font-size: .75rem; color: #4c4c4c; opacity: .45; margin: .5rem 0 1rem; }
.footer-note  { text-align: center; font-size: .75rem; color: #4c4c4c; opacity: .35; margin-top: 2rem; }
