/* Personalfragebogen, Gestaltung nach delegiert.com v5 (Tokens kopiert, nicht eingebunden) */
@font-face {
  font-family: "Forum Serif";
  src: url("assets/ForumSerif-Regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
:root {
  --bg: #FFFFFF;
  --bg-subtle: #F6F6F5;
  --line: #E6E6E4;
  --line-strong: #D6D6D3;
  --ink: #1D1D1F;
  --ink-2: #5F5F5F;
  --ink-3: #737373;
  --brand: #FF3B30;
  --brand-ink: #D70015;
  --cta: #1D1D1F;
  --ok: #248A3D;
  --font-display: "Forum Serif", Georgia, "Times New Roman", serif;
  --font-text: "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  --radius-card: 28px;
  --r-in: 12px;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font-text); font-size: 16px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; min-height: 100vh; display: flex; flex-direction: column;
}
.spalte { width: 100%; max-width: 600px; margin: 0 auto; padding: 0 16px; }

.kopf { padding: 20px 16px; max-width: 1104px; width: 100%; margin: 0 auto; }
.marke { display: inline-flex; align-items: center; gap: 8px; }
.marke img { display: block; }
.wordmark { font-weight: 400; font-size: 22px; line-height: 1; letter-spacing: -.045em; }
.wordmark i { font-style: normal; color: var(--brand); }

main { flex: 1; padding-top: clamp(24px, 8vh, 72px); padding-bottom: 48px; }
.eyebrow { margin: 0; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
h1 {
  margin: 12px 0 0; font-family: var(--font-display); font-weight: 400;
  font-size: clamp(38px, 7vw, 52px); line-height: 1.04; letter-spacing: -.03em; text-wrap: balance;
}
.lead { margin: 14px 0 0; font-size: 17px; color: var(--ink-2); text-wrap: pretty; }
.notiz { margin: 20px 0 0; padding: 14px 16px; border-radius: 16px; background: var(--bg-subtle); font-size: 14px; color: var(--ink-2); }

.karte { margin-top: 24px; padding: 24px; border-radius: var(--radius-card); background: var(--bg-subtle); }
.karte h2 { margin: 0 0 4px; font-family: var(--font-display); font-weight: 400; font-size: 26px; line-height: 1.15; letter-spacing: -.02em; }

.feld { margin-top: 20px; border: 0; padding: 0; min-width: 0; }
.feld[hidden] { display: none; }
.feld > label, .feld > legend { display: block; padding: 0; font-size: 15px; font-weight: 500; color: var(--ink); }
.opt { font-weight: 400; color: var(--ink-3); }
.hinweis { margin: 3px 0 0; font-size: 13px; line-height: 1.45; color: var(--ink-3); }
.fehler { margin: 6px 0 0; font-size: 13px; color: var(--brand-ink); }
.fehler:empty { display: none; }

input[type="text"], input[type="password"], input[type="date"], select, textarea {
  display: block; width: 100%; margin-top: 8px; padding: 12px 14px; min-height: 48px;
  font: inherit; font-size: 16px; color: var(--ink); background: #fff;
  border: 1px solid var(--line-strong); border-radius: var(--r-in);
  transition: border-color .15s var(--ease-out), box-shadow .15s var(--ease-out);
  -webkit-appearance: none; appearance: none;
}
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(29, 29, 31, .12); }
.ungueltig input, .ungueltig select, .ungueltig textarea { border-color: var(--brand-ink); }
input.passwort { font-size: 20px; letter-spacing: .12em; text-transform: uppercase; font-variant-numeric: tabular-nums; }
input.passwort::placeholder { letter-spacing: .12em; color: #B8B8B5; }

.auswahl { position: relative; }
.auswahl::after {
  content: ""; position: absolute; right: 18px; top: calc(50% + 4px); width: 8px; height: 8px;
  border-right: 1.5px solid var(--ink-2); border-bottom: 1.5px solid var(--ink-2);
  transform: translateY(-75%) rotate(45deg); pointer-events: none;
}
.auswahl select { padding-right: 44px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip span {
  display: inline-flex; align-items: center; min-height: 44px; padding: 10px 16px;
  background: #fff; border: 1px solid var(--line-strong); border-radius: 999px;
  font-size: 15px; line-height: 1.2; color: var(--ink); cursor: pointer;
  transition: background .15s var(--ease-out), color .15s var(--ease-out), border-color .15s var(--ease-out);
}
.chip input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip input:focus-visible + span { box-shadow: 0 0 0 3px rgba(29, 29, 31, .2); }
.ungueltig .chip span { border-color: var(--brand-ink); }

.bestaetigen { display: flex; gap: 12px; align-items: flex-start; margin-top: 24px; font-size: 15px; color: var(--ink); cursor: pointer; }
.bestaetigen input { flex: none; width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--ink); cursor: pointer; }

.knopf {
  display: inline-flex; justify-content: center; align-items: center; gap: 8px;
  min-height: 52px; padding: 14px 28px; margin-top: 20px;
  font: inherit; font-size: 16px; font-weight: 500; color: #fff; background: var(--cta);
  border: 0; border-radius: 999px; cursor: pointer;
  transition: transform .12s var(--ease-out), opacity .15s var(--ease-out);
}
.knopf:active { transform: scale(.98); }
.knopf:disabled { opacity: .5; cursor: progress; }
.knopf--breit { width: 100%; }
.knopf--leise { color: var(--ink); background: transparent; border: 1px solid var(--line-strong); }
.klein { margin: 14px 0 0; font-size: 13px; line-height: 1.5; color: var(--ink-3); }

.fertig-haken { width: 56px; height: 56px; border-radius: 50%; background: var(--ok); display: grid; place-items: center; }
.fertig-haken svg { width: 28px; height: 28px; }

.fuss { padding-top: 24px; padding-bottom: 32px; font-size: 12px; color: var(--ink-3); text-align: center; }

section.karte[hidden] { display: none; }
.knopf--klein { min-height: 40px; padding: 8px 18px; margin-top: 0; font-size: 14px; }

/* Unterschrift */
.unterschrift { margin-top: 24px; }
.unterschrift-titel { margin: 0; font-size: 15px; font-weight: 500; }
.unterschrift-rahmen {
  position: relative; margin-top: 10px; height: 180px; border-radius: 16px; background: #fff;
  border: 1px solid var(--line-strong); overflow: hidden; touch-action: none;
}
.ungueltig .unterschrift-rahmen, .unterschrift.ungueltig .unterschrift-rahmen { border-color: var(--brand-ink); }
.unterschrift-flaeche { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: crosshair; touch-action: none; }
.unterschrift-flaeche:focus-visible { outline: none; box-shadow: inset 0 0 0 3px rgba(29, 29, 31, .15); }
.unterschrift-linie { position: absolute; left: 20px; right: 20px; bottom: 44px; border-bottom: 1px solid var(--line-strong); pointer-events: none; }
.unterschrift-leer { position: absolute; left: 20px; bottom: 50px; margin: 0; font-size: 14px; color: #B8B8B5; pointer-events: none; }
.unterschrift-aktionen { display: flex; justify-content: flex-end; margin-top: 10px; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
