/* AI-assisted: Claude, human-reviewed 2026-08-09
   Designrichtung "Registratur" — Linien statt Schatten, eine linke Satzachse,
   ein Radius, kein Verlauf. Schriften lokal noch Systemschrift; die echten
   (Atkinson Hyperlegible Next, Source Serif 4) kommen beim Serverumzug. */

:root {
  --paper:       #F4F2ED;
  --surface:     #FBFAF7;
  --ink:         #1C1B18;
  --ink-muted:   #56534B;
  --ink-faint:   #6B685F;
  --accent:      #0E5C55;
  --accent-hover:#0A4A44;
  --line:        #D9D5CB;
  --line-strong: #7C786B;
  --warn-ink:    #7A5200;
  --warn-bg:     #FBF0D9;
  --danger:      #A32B1F;
  --ok:          #2C6636;

  --s4: 4px; --s8: 8px; --s12: 12px; --s16: 16px;
  --s24: 24px; --s40: 40px; --s64: 64px;
  --radius: 3px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #131412; --surface: #1C1D1A; --ink: #EDEBE4;
    --ink-muted: #A8A69C; --ink-faint: #8E8C83;
    --accent: #5FBFB1; --accent-hover: #7FD0C3;
    --line: #34362F; --line-strong: #787B70;
    --warn-ink: #E8B45A; --warn-bg: #2A2417;
    --danger: #F08D80; --ok: #7FC98A;
  }
}

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

html { -webkit-text-size-adjust: 100%; }
html[lang="de"] { hyphens: auto; hyphenate-limit-chars: 8 4 4; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-variant-numeric: tabular-nums;
}

.wrap { max-width: 720px; margin: 0 auto; padding: 0 var(--s24); }

/* ---------------------------------------------------------------- Kopfzeile */
header { border-bottom: 1px solid var(--line); background: var(--surface); }
.bar {
  height: 48px; display: flex; align-items: center;
  justify-content: space-between; gap: var(--s16);
}
.wortmarke {
  font-weight: 600; font-size: 17px; color: var(--ink);
  text-decoration: none; letter-spacing: -0.01em;
}
nav a { font-size: 13.5px; margin-left: var(--s16); }

/* ------------------------------------------------------------------- Inhalt */
main { padding: var(--s40) 0 var(--s64); }

h1 {
  font-size: 27px; line-height: 1.2; font-weight: 600;
  margin: 0 0 var(--s16); text-wrap: balance; letter-spacing: -0.015em;
}
h2 {
  font-size: 21px; line-height: 1.25; font-weight: 600;
  margin: var(--s64) 0 var(--s16); padding-bottom: var(--s8);
  border-bottom: 1px solid var(--line);
}
p { margin: 0 0 var(--s16); max-width: 62ch; text-wrap: pretty; }
.lead { font-size: 17px; color: var(--ink-muted); }

a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--accent-hover); }

/* Zahlenreihe — Definitionsliste, keine animierten Zaehler */
.zahlen {
  display: flex; flex-wrap: wrap; gap: var(--s40);
  margin: var(--s24) 0; padding: var(--s16) 0;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.zahlen div { margin: 0; }
.zahlen dt {
  font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--ink-faint); margin-bottom: var(--s4);
}
.zahlen dd { margin: 0; font-size: 21px; font-weight: 600; }

.ablauf { margin: 0; padding-left: 1.4em; }
.ablauf li { margin-bottom: var(--s12); max-width: 62ch; }

.nicht { margin: 0; padding-left: 1.4em; }
.nicht li { margin-bottom: var(--s8); max-width: 62ch; }

/* ----------------------------------------------------------------- Formular */
form { margin-top: var(--s24); }
.feld { margin-bottom: var(--s24); }

label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: var(--s8); }

input[type=text], input[type=email], select, textarea {
  width: 100%; height: 40px; padding: 0 var(--s12);
  font: inherit; font-size: 16px;         /* 16px verhindert Zoom auf iOS */
  color: var(--ink); background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: var(--radius);
}
textarea { height: auto; padding: var(--s8) var(--s12); min-height: 80px; }
input[type=file] {
  width: 100%; padding: var(--s8); font-size: 14px;
  background: var(--surface);
  border: 1px dashed var(--line-strong); border-radius: var(--radius);
}
input:focus-visible, select:focus-visible, button:focus-visible,
a:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}

.hinweis { font-size: 13.5px; color: var(--ink-muted); margin: var(--s8) 0 0; }

.einwilligungen {
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  padding: var(--s16); margin: var(--s24) 0;
}
.einwilligungen legend {
  font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--ink-faint); padding: 0 var(--s8);
}
.check {
  display: flex; gap: var(--s12); align-items: flex-start;
  font-weight: 400; font-size: 14px; line-height: 1.45;
  margin-bottom: var(--s16); cursor: pointer;
}
.check:last-child { margin-bottom: 0; }
.check input { margin-top: 3px; width: 18px; height: 18px; flex: none; accent-color: var(--accent); }
.check em { display: block; font-style: normal; font-size: 11.5px; color: var(--ink-faint); margin-top: var(--s4); }

button {
  height: 40px; padding: 0 var(--s24);
  font: inherit; font-size: 14px; font-weight: 600;
  color: #fff; background: var(--accent);
  border: 1px solid var(--accent); border-radius: var(--radius); cursor: pointer;
}
button:hover:not(:disabled) { background: var(--accent-hover); border-color: var(--accent-hover); }
button:disabled { opacity: .5; cursor: not-allowed; }
@media (prefers-color-scheme: dark) { button { color: #131412; } }

.status { margin-top: var(--s16); font-size: 14px; }
.status.ok     { color: var(--ok); }
.status.fehler { color: var(--danger); }

/* ------------------------------------------------- Bestaetigungsschirm */
.fortschritt {
  position: sticky; top: 0; z-index: 5;
  background: var(--surface); border-bottom: 1px solid var(--line);
  padding: var(--s12) 0; font-size: 13.5px; color: var(--ink-muted);
}
.gruppe { border-top: 1px solid var(--line); padding: var(--s24) 0; }
.gruppe h3 {
  font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--ink-faint); margin: 0 0 var(--s16); font-weight: 600;
}
.zeile {
  display: grid; grid-template-columns: 1fr auto;
  gap: var(--s12); align-items: center;
  padding: var(--s12) 0; border-bottom: 1px solid var(--line);
}
.zeile:last-child { border-bottom: 0; }
.zeile .wert { min-width: 0; }
.zeile label { margin-bottom: var(--s4); }
.marke {
  font-size: 11.5px; padding: 2px var(--s8); border-radius: var(--radius);
  white-space: nowrap; border: 1px solid;
}
.marke.sicher   { color: var(--ok);       border-color: var(--ok);       background: transparent; }
.marke.pruefen  { color: var(--warn-ink); border-color: var(--warn-ink); background: var(--warn-bg); }
.marke.pflicht  { color: var(--danger);   border-color: var(--danger);   background: transparent; }

.quelle {
  font-size: 12px; color: var(--ink-faint);
  border-left: 2px solid var(--line-strong); padding-left: var(--s8);
  margin-top: var(--s8);
}

@media (max-width: 640px) {
  .wrap { padding: 0 var(--s16); }
  h1 { font-size: 23px; }
  .zeile { grid-template-columns: 1fr; }
  .zahlen { gap: var(--s24); }
}

/* ---------------------------------------------------------------- Fusszeile */
footer {
  border-top: 1px solid var(--line); background: var(--surface);
  padding: var(--s24) 0; font-size: 13.5px; color: var(--ink-muted);
}
footer p { margin: 0; }
