:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --tint: #e8f0f9;
  --ink: #0f172a;
  --muted: #475569;
  --subtle: #94a3b8;
  --line: #e2e8f0;
  --primary: #13315c;
  --primary-deep: #0b2545;
  --secondary: #1b4b8f;
  --accent: #3b82c4;
  --accent-on-dark: #8fb8dc;
  --positive: #10b981;
  --danger: #b85042;
  --radius-s: 8px;
  --radius-m: 12px;
  --radius-l: 20px;
  --shadow: 0 1px 2px rgb(15 23 42 / .04), 0 12px 32px -12px rgb(19 49 92 / .18);
  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: light;
  box-sizing: border-box;
}
*, *::before, *::after { box-sizing: inherit; }
[hidden] { display: none !important; }
html, body { margin: 0; }
html { scroll-padding-top: env(safe-area-inset-top, 0px); }
body {
  background: var(--bg);
  color: var(--ink);
  font: 400 1rem/1.6 var(--font);
  font-feature-settings: 'cv11', 'ss01';
  -webkit-font-smoothing: antialiased;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* ---------- Hero */
.hero {
  background:
    radial-gradient(120% 90% at 100% 0%, rgb(59 130 196 / .28), transparent 60%),
    linear-gradient(160deg, var(--primary) 0%, var(--primary-deep) 70%);
  color: #fff;
  padding: calc(env(safe-area-inset-top, 0px) + clamp(2.5rem, 8vw, 4rem)) 1.5rem 6rem;
}
.hero-inner { max-width: 36rem; margin: 0 auto; text-align: center; }
.kicker { margin: 0 0 .35rem; color: var(--accent-on-dark); font-size: .875rem; font-weight: 600; }

.hero h1 {
  margin: 0 0 .6rem;
  font-size: clamp(1.75rem, 6vw, 2.25rem);
  font-weight: 700;
  text-wrap: balance;
  line-height: 1.2;
  letter-spacing: -.02em;
}
.hero-details { margin: 0 auto; color: var(--tint); opacity: .85; max-width: 32rem; white-space: pre-line; text-wrap: pretty; }
body.ready .hero-inner { animation: rise .6s cubic-bezier(.2,.7,.2,1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { body.ready .hero-inner { animation: none; } }

/* ---------- Karte */
.page { max-width: 36rem; margin: 0 auto; padding: 0 1rem 4rem; }
.card {
  position: relative;
  margin-top: -4rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow);
  padding: clamp(1.25rem, 5vw, 2rem);
}

.facts { display: grid; gap: .5rem; margin: 0 0 2rem; }
.facts > div {
  background: var(--tint); border-radius: var(--radius-m); padding: .8rem 1rem;
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
}
.facts dt { color: var(--secondary); font-size: .8125rem; font-weight: 600; }
.facts dd { margin: 0; font-weight: 600; color: var(--primary); text-align: right; }

h2 { margin: 0 0 1.25rem; font-size: 1.375rem; font-weight: 700; letter-spacing: -.015em; color: var(--primary); }

/* ---------- Formular */
.field { margin-bottom: 1.1rem; }
label { display: block; font-weight: 600; font-size: .9375rem; margin-bottom: .4rem; color: var(--ink); }
.opt { color: var(--subtle); font-weight: 500; }
input:not([type=radio]):not([type=checkbox]), textarea, select {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-s);
  padding: .7rem .85rem;
  transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; min-height: 5.5rem; }
input::placeholder, textarea::placeholder { color: var(--subtle); }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgb(59 130 196 / .2); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.choice { border: 0; padding: 0; margin: 0 0 1.5rem; display: grid; grid-template-columns: 1fr; gap: .5rem; }
@media (min-width: 34rem) {
  .choice { display: flex; }
  .choice label { flex: 1 1 auto; }
  .choice span { white-space: nowrap; }
}
.choice label { margin: 0; cursor: pointer; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span {
  display: flex; align-items: center; justify-content: center; text-align: center;
  min-height: 3.25rem; padding: .6rem .8rem;
  border: 1.5px solid #cbd5e1;
  border-radius: var(--radius-m);
  background: var(--surface);
  font-weight: 600;
  color: var(--primary);
  transition: background-color .15s, border-color .15s, color .15s;
}
.choice label:hover span { border-color: var(--accent); }
.choice input:checked + span { background: var(--primary); border-color: var(--primary); color: #fff; }
.choice input[value=no]:checked + span { background: var(--tint); border-color: var(--secondary); color: var(--primary); }
.choice input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.plusone { border: 0; padding: 0; margin: 0 0 1.1rem; min-width: 0; }
.plusone legend { font-weight: 600; font-size: .9375rem; margin-bottom: .4rem; padding: 0; }
.choice-sm { margin: 0; }
.choice-sm span { min-height: 2.9rem; font-weight: 500; }
.choice-sm input:checked + span,
.choice-sm input[value=no]:checked + span { background: var(--tint); border-color: var(--primary); color: var(--primary); font-weight: 600; }

.check { display: flex; align-items: center; gap: .6rem; margin-bottom: 1.1rem; cursor: pointer; font-weight: 500; }
.check input { width: 1.15rem; height: 1.15rem; accent-color: var(--primary); margin: 0; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 100%;
  font: 600 1rem/1 var(--font);
  color: #fff;
  background: var(--primary);
  border: 0;
  border-radius: var(--radius-m);
  padding: 1rem 1.4rem;
  cursor: pointer;
  transition: background-color .15s;
}
.btn:hover { background: var(--secondary); }
.btn:disabled { opacity: .55; cursor: progress; }
.btn-quiet {
  width: auto; background: var(--surface); color: var(--primary);
  border: 1px solid #cbd5e1; border-radius: var(--radius-s); padding: .65rem 1rem; font-size: .9375rem;
}
.btn-quiet:hover { background: var(--tint); }
.link { background: none; border: 0; padding: 0; font: inherit; font-weight: 500; color: var(--secondary); text-decoration: underline; text-underline-offset: .2em; cursor: pointer; }
.link:hover { color: var(--accent); }

.error { color: var(--danger); font-weight: 500; margin: 0 0 1rem; }
.note { color: var(--muted); margin: -.5rem 0 1.25rem; }

/* ---------- Bestätigung */
#done { outline: none; }
.done-mark {
  width: 3rem; height: 3rem; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--tint); color: var(--primary);
  margin-bottom: 1rem;
}
.done-mark svg { width: 1.4rem; height: 1.4rem; }
#done h2 { font-size: 1.5rem; line-height: 1.25; }
#done > p { color: var(--muted); margin: -.5rem 0 0; }
.editlink { margin: 1.5rem 0; padding: 1rem; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-m); }
.editlink p { margin: 0 0 .6rem; color: var(--muted); font-size: .9rem; }
.copyrow { display: flex; gap: .5rem; }
.copyrow input { font-size: .875rem !important; min-width: 0; color: var(--muted) !important; }

.footer { text-align: center; color: var(--subtle); font-size: .8125rem; margin-top: 2rem; }
