:root {
  --ink: #1f2933;
  --muted: #5b6773;
  --bg: #f3f5f8;
  --card: #ffffff;
  --line: #d5dbe1;
  --accent: #1d4f8c;
  --accent-ink: #ffffff;
  --accent-soft: #e8f0fa;
  --ok: #1d6b3a;
  --ok-bg: #e6f4ea;
  --err: #a32121;
  --err-bg: #fdecec;
  --radius: 10px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e6eaee; --muted: #a2adb8; --bg: #14181c; --card: #1c2228; --line: #323b44;
    --accent: #6aa5ea; --accent-ink: #0e1a2a; --accent-soft: #1d2b3c;
    --ok: #7fd49a; --ok-bg: #17301f; --err: #ff9a9a; --err-bg: #3a1c1c;
  }
}
* { box-sizing: border-box; }
html { font-size: 16px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5; min-height: 100vh; display: flex; flex-direction: column;
}
.wrap { width: 100%; max-width: 820px; margin: 0 auto; padding: 0 16px; }
.wrap.schmal { max-width: 560px; }
main { flex: 1; padding-top: 20px; padding-bottom: 96px; }
.kopf { background: var(--card); border-bottom: 1px solid var(--line); }
.kopf-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; padding-bottom: 12px; }
.marke { display: flex; flex-direction: column; line-height: 1.25; }
.marke-name { font-weight: 700; font-size: 1.05rem; }
.marke-sub { color: var(--muted); font-size: .85rem; }
.abmelden { margin: 0; }
button.link { background: none; border: 0; color: var(--accent); font: inherit; cursor: pointer; text-decoration: underline; padding: 4px; }
.fuss { color: var(--muted); font-size: .85rem; padding: 16px 0 24px; }
.fuss a { color: var(--muted); }

h1 { font-size: 1.45rem; line-height: 1.25; margin: 0 0 .5em; }
h2 { font-size: 1.1rem; margin: 0 0 .7em; color: var(--accent); }
p { margin: 0 0 .8em; }
.karte { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; }
.kopfkarte { border-left: 4px solid var(--accent); }
.info { background: var(--accent-soft); border-radius: 8px; padding: 10px 12px; }
.hinweis, .hilfe { color: var(--muted); font-size: .9rem; margin-bottom: .6em; }

.raster { display: flex; flex-wrap: wrap; gap: 14px 16px; }
.feld { flex: 1 1 100%; min-width: 0; }
.feld.half { flex: 1 1 calc(50% - 8px); }
@media (max-width: 560px) { .feld.half { flex: 1 1 100%; } }
.feld[hidden] { display: none; }
label, .label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 4px; }
abbr { text-decoration: none; color: var(--err); }
input[type=text], input[type=email], input[type=tel], input[type=password], select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--card);
  border: 1px solid #8a96a3; border-radius: 8px; padding: 10px 12px; min-height: 44px;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible {
  outline: 3px solid var(--accent); outline-offset: 1px;
}
.hat-fehler input[type=text], .hat-fehler input[type=email], .hat-fehler input[type=tel], .hat-fehler select, .hat-fehler textarea {
  border-color: var(--err); background: var(--err-bg);
}
.fehler { color: var(--err); font-size: .9rem; margin: 4px 0 0; }
.radios { display: flex; flex-wrap: wrap; gap: 8px; }
.radio, .check {
  display: inline-flex; align-items: center; gap: 8px; font-weight: 400; margin: 0;
  border: 1px solid var(--line); border-radius: 8px; padding: 9px 14px; min-height: 44px; cursor: pointer; background: var(--card);
}
.check { display: flex; width: 100%; align-items: flex-start; }
.radio:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.radio input, .check input { width: 20px; height: 20px; margin: 0; flex: none; accent-color: var(--accent); }
.hat-fehler .radio, .hat-fehler .check { border-color: var(--err); }

.knopf {
  display: inline-block; font: inherit; font-weight: 600; text-decoration: none; text-align: center;
  background: var(--accent); color: var(--accent-ink); border: 2px solid var(--accent); border-radius: 8px;
  padding: 11px 22px; min-height: 46px; cursor: pointer;
}
.knopf.zweit { background: var(--card); color: var(--accent); }
.knopf:hover { filter: brightness(1.06); }
.aktionen {
  position: sticky; bottom: 0; display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap;
  padding: 12px 0; background: linear-gradient(to top, var(--bg) 70%, transparent);
}
.meldung { border-radius: 8px; padding: 12px 14px; margin-bottom: 16px; }
.meldung ul { margin: .4em 0 0; padding-left: 1.2em; }
.ok-box { background: var(--ok-bg); color: var(--ok); }
.fehler-box { background: var(--err-bg); color: var(--err); }
.fehler-box a { color: inherit; }
.text h2 { margin-top: 1.2em; }
code { background: var(--accent-soft); padding: 1px 5px; border-radius: 4px; }
