:root {
  --bg: #f7f5f1;
  --flaeche: #ffffff;
  --text: #1e1d1b;
  --text-2: #6b665e;
  --linie: #e4dfd6;
  --akzent: #9a7a3f;
  --akzent-hell: #f3ecdf;
  --akzent-text: #ffffff;
  --fehler: #b3261e;
  --fehler-hell: #fbeceb;
  --ok: #2e6b3f;
  --ok-hell: #e8f3eb;
  --radius: 10px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161514;
    --flaeche: #211f1d;
    --text: #efebe4;
    --text-2: #a59f95;
    --linie: #3a3632;
    --akzent: #c9a865;
    --akzent-hell: #2e281e;
    --akzent-text: #161514;
    --fehler: #f2b8b5;
    --fehler-hell: #3a1f1d;
    --ok: #9fd3ab;
    --ok-hell: #1c2e21;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.kopf { position: sticky; top: 0; z-index: 10; background: var(--flaeche); border-bottom: 1px solid var(--linie); }
.kopf-innen { max-width: 760px; margin: 0 auto; padding: 14px 16px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.marke { font-weight: 600; letter-spacing: .18em; font-size: 13px; }
.kopf-info { font-size: 13px; color: var(--text-2); }
.fortschritt { height: 3px; background: var(--linie); }
.fortschritt-balken { height: 100%; width: 0; background: var(--akzent); transition: width .25s ease; }

.inhalt { max-width: 760px; margin: 0 auto; padding: 24px 16px 80px; }
.laden { color: var(--text-2); }

h1 { font-size: 28px; line-height: 1.2; margin: 8px 0 4px; font-weight: 600; }
.untertitel { color: var(--text-2); margin: 0 0 16px; }
.einleitung { background: var(--akzent-hell); border-radius: var(--radius); padding: 14px 16px; margin: 0 0 28px; font-size: 15px; }

.block { margin: 36px 0 0; }
.block-kopf { display: flex; align-items: baseline; gap: 10px; margin: 0 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--linie); }
.block-kopf .kennung { color: var(--akzent); font-weight: 700; font-size: 18px; }
.block-kopf h2 { margin: 0; font-size: 20px; font-weight: 600; }

.frage { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); padding: 18px 18px 16px; margin: 0 0 12px; }
.frage.unterfrage { margin-top: -8px; border-top-left-radius: 0; border-top-right-radius: 0; border-top: 0; padding-top: 4px; }
.frage.hat-fehler { border-color: var(--fehler); box-shadow: 0 0 0 1px var(--fehler) inset; }
.frage[hidden] { display: none; }
.frage-titel { display: flex; gap: 10px; margin: 0 0 4px; font-weight: 600; }
.frage-nr { color: var(--akzent); min-width: 2.2em; flex: none; }
.frage-hinweis { color: var(--text-2); font-size: 14px; margin: 0 0 10px; }
.frage-koerper { margin-top: 10px; }
.optional { color: var(--text-2); font-weight: 400; font-size: 14px; }
.fehlertext { color: var(--fehler); font-size: 14px; margin: 8px 0 0; }
.fehlertext:empty { display: none; }

/* Auswahl-Chips (Radio und Checkbox) */
.optionen { display: flex; flex-wrap: wrap; gap: 8px; }
.optionen.untereinander { flex-direction: column; }
.option { position: relative; }
.option input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.option span {
  display: flex; align-items: center; gap: 10px;
  min-height: 44px; padding: 10px 14px;
  border: 1px solid var(--linie); border-radius: 8px; background: var(--flaeche);
  cursor: pointer; user-select: none; transition: border-color .15s, background .15s;
}
.option span::before {
  content: ""; flex: none; width: 18px; height: 18px; border: 1.5px solid var(--text-2); background: var(--flaeche);
}
.option input[type=radio] + span::before { border-radius: 50%; }
.option input[type=checkbox] + span::before { border-radius: 4px; }
.option input:checked + span { border-color: var(--akzent); background: var(--akzent-hell); }
.option input:checked + span::before { border-color: var(--akzent); background: var(--akzent); box-shadow: inset 0 0 0 3px var(--flaeche); }
.option input:focus-visible + span { outline: 2px solid var(--akzent); outline-offset: 2px; }
.option:hover span { border-color: var(--akzent); }
.leer-hinweis { color: var(--text-2); font-style: italic; font-size: 14px; }

/* Skala 1–5 */
.skala { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.skala .option span { justify-content: center; font-weight: 600; padding: 10px 0; }
.skala .option span::before { display: none; }
.skala-legende { display: flex; justify-content: space-between; color: var(--text-2); font-size: 13px; margin-top: 6px; gap: 12px; }
.skala-legende span:last-child { text-align: right; }

/* Eingabefelder */
input[type=text], input[type=search], textarea, select {
  width: 100%; font: inherit; color: var(--text); background: var(--flaeche);
  border: 1px solid var(--linie); border-radius: 8px; padding: 10px 12px; min-height: 44px;
}
textarea { resize: vertical; min-height: 80px; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--akzent); outline-offset: 1px; border-color: var(--akzent); }
.zahl { max-width: 160px; }
.feldgruppe { display: grid; gap: 8px; }
.feld { position: relative; }
.feld-label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 2px; }
.zaehler { font-size: 12px; color: var(--text-2); text-align: right; margin-top: 2px; }
.zaehler.voll { color: var(--fehler); }

/* Meldungen */
.meldung { border-radius: var(--radius); padding: 14px 16px; margin: 12px 0; font-size: 15px; }
.meldung.fehler { background: var(--fehler-hell); color: var(--fehler); }
.meldung.ok { background: var(--ok-hell); color: var(--ok); }
.meldung.info { background: var(--akzent-hell); }

.absenden { margin-top: 28px; display: flex; flex-direction: column; gap: 10px; }
button {
  font: inherit; font-weight: 600; cursor: pointer; border-radius: 8px; min-height: 48px; padding: 12px 22px;
  border: 1px solid var(--akzent); background: var(--akzent); color: var(--akzent-text);
}
button:disabled { opacity: .5; cursor: not-allowed; }
button.zweitrangig { background: transparent; color: var(--text); border-color: var(--linie); }
.klein { font-size: 13px; color: var(--text-2); }

.danke { text-align: center; padding: 48px 8px; }
.danke .haken { font-size: 44px; color: var(--ok); }
.danke h1 { margin-top: 8px; }

@media (min-width: 640px) {
  .absenden { flex-direction: row; align-items: center; justify-content: space-between; }
}
