:root {
  --text: #1d2125;
  --leise: #5b6570;
  --linie: #d7dce1;
  --flaeche: #f5f7f9;
  --akzent: #0b6e8a;
  --fehler: #b42318;
  --frage: #eef5f8;
  --hover: #dceaf0;
  --gruppenlinie: #b9d3dd;
}
* { box-sizing: border-box; }
body { margin: 0; font: 16px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--text); background: #fff; }
main { max-width: 760px; margin: 0 auto; padding: 32px 20px 48px; }
footer { max-width: 760px; margin: 0 auto; padding: 0 20px 32px; font-size: 13px; }
footer a { color: var(--leise); }
h1 { font-size: 1.6rem; line-height: 1.25; margin: 0 0 1.2rem; }
h1 small { display: block; font-size: .85rem; font-weight: 500; color: var(--leise); margin-bottom: .2rem; }
h2 { font-size: 1.2rem; margin: 0 0 1rem; padding-bottom: .4rem; border-bottom: 2px solid var(--akzent); }

.fortschritt { height: 6px; background: var(--linie); border-radius: 3px; overflow: hidden; margin-bottom: 1.5rem; }
.fortschritt span { display: block; height: 100%; background: var(--akzent); }

/* Abschnitt je Verfahren (Seite 2): weiße Fläche mit farbiger Kopfzeile */
.abschnitt { margin: 2rem 0; padding: 0 1rem .2rem; background: #fff; border: 1px solid var(--linie); border-radius: 10px; overflow: hidden; }
.abschnitt h2 { margin: 0 -1rem 1rem; padding: .7rem 1rem; background: var(--akzent); color: #fff; border: 0; font-size: 1.1rem; }

/* Jede Frage als farbig hinterlegte Karte mit Akzentleiste */
.frage { border: 0; border-left: 4px solid var(--akzent); border-radius: 8px; background: var(--frage); padding: 1rem 1.2rem; margin: 0 0 1.2rem; min-width: 0; }
.frage > legend { float: left; width: 100%; font-weight: 600; font-size: 1.05rem; padding: 0; margin-bottom: .2rem; }
.frage > legend ~ * { clear: both; }

/* Folgefragen (z. B. Name oder Code nach „Wie möchten Sie teilnehmen?“) eingerückt in derselben Karte */
.frage.unterfrage { background: transparent; border-left: 2px solid var(--gruppenlinie); border-radius: 0;
                    padding: .3rem 0 .3rem 1rem; margin: .9rem 0 0 1.6rem; }
.frage.unterfrage > legend { font-size: 1rem; }
.frage.unterfrage .feld { background: #fff; }
.hint { color: var(--leise); font-size: .9rem; font-style: italic; }
.pflicht { color: var(--fehler); }
.info { margin: 0 0 1.5rem; }
.kursiv { font-style: italic; }
.platzhalter { color: var(--leise); }

.optionen { margin-top: .5rem; display: flex; flex-direction: column; gap: .15rem; }
/* Skalen eng beieinander, damit sie möglichst in eine Zeile passen */
.optionen.inline { flex-direction: row; flex-wrap: wrap; gap: .2rem .3rem; }
/* Auswahlfeld und Text bleiben in einer Zeile; nur Optionen mit Freitextfeld dürfen umbrechen */
.option { display: flex; align-items: baseline; gap: .5rem; padding: .3rem .5rem; margin: 0 -.5rem; border-radius: 6px; cursor: pointer; }
.option > span { flex: 0 1 auto; min-width: 0; }
.option.mit-text { flex-wrap: wrap; }
.option:hover { background: var(--hover); }
.option:has(input:checked) { background: #fff; box-shadow: inset 0 0 0 1px var(--akzent); }
.optionen.inline .option { margin: 0; }
/* Einheitlich eckige Auswahlfelder für Einfach- und Mehrfachauswahl */
.option input[type=radio], .option input[type=checkbox] {
  appearance: none; -webkit-appearance: none; flex: none; margin: 0; cursor: pointer;
  width: 1.1em; height: 1.1em; border: 2px solid var(--leise); border-radius: 3px; background: #fff;
  display: inline-grid; place-content: center; transform: translateY(.18em);
}
.option input:checked { background: var(--akzent); border-color: var(--akzent); }
.option input:checked::before {
  content: ""; width: .3em; height: .58em; border: solid #fff; border-width: 0 .14em .14em 0;
  transform: translateY(-.06em) rotate(45deg);
}
.option input:focus-visible { outline: 2px solid var(--akzent); outline-offset: 2px; }

/* Unterbereiche innerhalb einer Auswahl (z. B. Materialextrusion, Metalle) */
.gruppe { font-size: .8rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--akzent);
          border-bottom: 1px solid var(--gruppenlinie); padding-bottom: .15rem; margin: .9rem 0 .3rem; }
.gruppe:first-child { margin-top: .2rem; }
.gruppe:empty { border-bottom-style: dashed; margin-bottom: .4rem; }

input.sonst, .feld { font: inherit; padding: .35rem .5rem; border: 1px solid var(--linie); border-radius: 4px; }
input.sonst { flex: 1 1 12rem; max-width: 22rem; }
.feld { width: 100%; max-width: 32rem; margin-top: .4rem; display: block; }
.zahl { display: inline-flex; align-items: center; gap: .4rem; }
.zahl .feld { width: 9rem; display: inline-block; }
input:focus, textarea:focus { outline: 2px solid var(--akzent); outline-offset: 1px; }

table.code { border-collapse: collapse; margin-top: .5rem; }
table.code td { padding: .25rem .8rem .25rem 0; }
table.code input { font: inherit; text-align: center; text-transform: uppercase; padding: .3rem; border: 1px solid var(--linie); border-radius: 4px; }
.code-vorschau { margin: .6rem 0 0; }

.frage.hat-fehler { border-left-color: var(--fehler); background: #fdf1f0; }
.hat-fehler legend, .hat-fehler .fehlertext { color: var(--fehler); }
.fehlertext { font-size: .9rem; margin: .2rem 0; }
.meldung { background: #fdecea; color: var(--fehler); padding: .6rem .9rem; border-radius: 6px; margin-bottom: 1.5rem; }

details { margin: 1rem 0; }
summary { cursor: pointer; color: var(--akzent); }
/* Datenschutzhinweise aufgeklappt: abgesetzte Fläche, etwas kleinere Schrift */
.datenschutz { margin-top: .6rem; padding: .4rem 1.2rem .8rem; background: var(--flaeche); border-radius: 8px; font-size: .92rem; }
.datenschutz h3 { font-size: 1rem; margin: 1rem 0 .3rem; }
.datenschutz p, .datenschutz ul { margin: 0 0 .5rem; }
.datenschutz ul { padding-left: 1.2rem; }

.nav { display: flex; gap: .8rem; margin-top: 2rem; }
.nav .zurueck { order: -1; background: #fff; color: var(--akzent); }
button { font: inherit; font-weight: 600; padding: .6rem 1.4rem; border-radius: 6px; border: 2px solid var(--akzent); background: var(--akzent); color: #fff; cursor: pointer; }
code { background: var(--flaeche); padding: .1rem .3rem; border-radius: 3px; }
