/*
 * Seiten für Kundinnen. Farben kommen aus den Einstellungen (--primaer, --akzent, --grund, im Layout gesetzt).
 * Nur Systemschriften: nichts wird von fremden Servern geladen.
 */
:root {
    --primaer: #4F5D4A;
    --akzent: #B08D57;
    --grund: #F7F4EF;
    --text: #2B2A28;
    --text-leise: #6B6760;
    --linie: color-mix(in srgb, var(--text) 14%, transparent);
    --flaeche: #FFFFFF;
    --fehler: #A33A2B;
    --schrift: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --schrift-titel: "Cormorant Garamond", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
    --rund: 14px;
    color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--grund);
    color: var(--text);
    font-family: var(--schrift);
    font-size: 17px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--primaer); }
p { margin: 0 0 .9em; }
h1, h2 { font-family: var(--schrift-titel); font-weight: 500; line-height: 1.2; color: var(--text); text-wrap: balance; margin: 0 0 .6em; }
h1 { font-size: clamp(1.8rem, 1.4rem + 1.8vw, 2.5rem); }
h2 { font-size: clamp(1.45rem, 1.2rem + 1.1vw, 1.9rem); }
h1:focus, h2:focus { outline: none; }

.rahmen {
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    padding-left: max(16px, env(safe-area-inset-left, 0px));
    padding-right: max(16px, env(safe-area-inset-right, 0px));
}

/* Kopf und Fuß */
.kopf { padding-block: 22px 8px; }
.marke { display: inline-flex; align-items: center; text-decoration: none; color: var(--text); }
.marke-text { font-family: var(--schrift-titel); font-size: 1.45rem; letter-spacing: .14em; text-transform: uppercase; }
.logo { max-height: 64px; max-width: 220px; width: auto; height: auto; display: block; }
.inhalt { padding-block: 12px 48px; }
.fuss { border-top: 1px solid var(--linie); padding-block: 22px calc(28px + env(safe-area-inset-bottom, 0px)); font-size: .88rem; color: var(--text-leise); }
.fuss nav { display: flex; gap: 18px; margin-bottom: 6px; }
.fuss a { color: var(--text-leise); }
.mail { user-select: all; }

/* Flächen */
.karte {
    background: var(--flaeche);
    border-radius: var(--rund);
    padding: clamp(20px, 4vw, 34px);
    box-shadow: 0 1px 2px rgb(0 0 0 / .04), 0 8px 30px rgb(0 0 0 / .04);
    margin-bottom: 18px;
}
.leise { color: var(--text-leise); }
.klein { font-size: .88rem; }
.gruss { font-weight: 500; }
.einleitung { margin-bottom: 8px; }
.klein-titel { font-family: var(--schrift); font-size: 1rem; font-weight: 600; letter-spacing: .02em; margin: 22px 0 10px; }
.recht h2 { font-size: 1.3rem; margin-top: 1.4em; }
.recht ul { padding-left: 1.2em; }

.vorschau-hinweis {
    background: color-mix(in srgb, var(--akzent) 22%, var(--flaeche));
    border-radius: 10px;
    padding: 10px 14px;
    font-size: .92rem;
}

/* Fortschritt */
.fortschritt { margin-bottom: 14px; }
.balken { height: 6px; border-radius: 999px; background: color-mix(in srgb, var(--primaer) 14%, transparent); overflow: hidden; }
.balken span { display: block; height: 100%; width: 0; background: var(--primaer); border-radius: 999px; transition: width .3s ease; }
.schritt-info { margin: 8px 0 0; font-size: .88rem; color: var(--text-leise); }

/* Einwilligung */
.einwilligungen { border-top: 1px solid var(--linie); margin-top: 18px; padding-top: 4px; }
.haken {
    display: grid;
    grid-template-columns: 26px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    padding: 14px;
    border: 1px solid var(--linie);
    border-radius: 12px;
    margin-bottom: 10px;
    cursor: pointer;
    font-size: .95rem;
}
.haken input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--primaer); }
.pflicht { font-style: normal; font-size: .75rem; color: var(--text-leise); margin-left: 4px; white-space: nowrap; }

/* Fragen */
.frage { border: 0; margin: 0 0 26px; padding: 0; min-width: 0; }
.frage legend { font-weight: 600; font-size: 1.02rem; margin-bottom: 8px; padding: 0; }
.optionen { display: flex; flex-wrap: wrap; gap: 8px; }
.option { position: relative; display: inline-flex; }
.option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.option span {
    display: inline-block;
    padding: 9px 14px;
    border: 1px solid var(--linie);
    border-radius: 999px;
    background: var(--flaeche);
    cursor: pointer;
    font-size: .95rem;
    line-height: 1.3;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.option input:checked + span { background: var(--primaer); border-color: var(--primaer); color: #fff; }
.option input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--akzent) 70%, transparent); outline-offset: 2px; }
.option.keine span { border-style: dashed; }
/* Kreis = eine Antwort, Kästchen = mehrere Antworten */
.option input[type="radio"] + span::before, .option input[type="checkbox"] + span::before {
    content: "";
    display: inline-block;
    width: .8em;
    height: .8em;
    margin-right: .5em;
    vertical-align: -.06em;
    border: 1.5px solid currentColor;
    border-radius: 50%;
    opacity: .55;
}
.option input[type="checkbox"] + span::before { border-radius: 3px; }
.option input:checked + span::before { opacity: 1; background: currentColor; box-shadow: inset 0 0 0 2px var(--primaer); }
.skala .option span::before { display: none; }
.option.keine input:checked + span { background: var(--text-leise); border-color: var(--text-leise); border-style: solid; }
input.kurz, select { max-width: 22rem; }
.haken.einzeln { display: inline-flex; }
.skala { gap: 6px; }
.skala .option span { min-width: 2.75rem; text-align: center; padding-inline: 10px; }
.skala-enden { display: flex; justify-content: space-between; gap: 12px; margin: 6px 0 0; }

/* Ergebnis nach dem Absenden (Auswertung mit Punkten) */
.ergebnis { margin-top: 1.4em; padding-top: 1.2em; border-top: 1px solid var(--linie); }
.ergebnis .stufe { font-family: var(--schrift-titel); font-size: 1.35rem; margin: 0 0 .4em; color: var(--text); }
.ergebnis .summe { font-size: .95rem; color: var(--text-leise); margin: 0 0 1em; }
.bereich { margin: 0 0 12px; }
.bereich-kopf { display: flex; justify-content: space-between; gap: 12px; font-size: .95rem; margin-bottom: 5px; }
.bereich .balken span { transition: none; }

input[type="text"], input[type="tel"], input[type="date"], select, textarea {
    width: 100%;
    font: inherit;
    font-size: 1rem;
    color: var(--text);
    background: var(--flaeche);
    border: 1px solid var(--linie);
    border-radius: 10px;
    padding: 11px 13px;
}
textarea { resize: vertical; min-height: 110px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid color-mix(in srgb, var(--akzent) 60%, transparent); outline-offset: 1px; border-color: var(--primaer); }

.feld { margin-bottom: 22px; }
.feld label { display: block; font-weight: 600; margin-bottom: 6px; }
.kontakt { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 16px; margin: 0 0 20px; }
.kontakt dt { color: var(--text-leise); }
.kontakt dd { margin: 0; overflow-wrap: anywhere; }

/* Fehler */
.fehler { color: var(--fehler); font-size: .9rem; margin: 8px 0 0; }
.fehler-box { background: color-mix(in srgb, var(--fehler) 10%, var(--flaeche)); color: var(--fehler); border-radius: 10px; padding: 10px 14px; margin-bottom: 14px; }
.hat-fehler.haken, .hat-fehler .option span, .feld.hat-fehler input { border-color: var(--fehler); }
.frage.hat-fehler legend { color: var(--fehler); }
.frage.hat-fehler select, .frage.hat-fehler textarea, .frage.hat-fehler input.kurz, .frage.hat-fehler input[type="text"] { border-color: var(--fehler); }

/* Knöpfe */
.knopf {
    font: inherit;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 999px;
    padding: 12px 24px;
    border: 1px solid var(--primaer);
    background: transparent;
    color: var(--primaer);
    cursor: pointer;
}
.knopf.haupt { background: var(--primaer); color: #fff; }
.knopf:disabled { opacity: .55; cursor: not-allowed; }
.knopf:focus-visible { outline: 3px solid color-mix(in srgb, var(--akzent) 70%, transparent); outline-offset: 2px; }
.absenden { width: 100%; margin: 6px 0 12px; padding-block: 14px; }

.schritt-nav {
    position: sticky;
    bottom: 0;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0 calc(12px + env(safe-area-inset-bottom, 0px));
    background: linear-gradient(to top, var(--grund) 70%, transparent);
}
.schritt-nav .weiter { margin-left: auto; min-width: 140px; }

/* Ohne JavaScript: alle Schritte untereinander, ohne Navigation */
form:not(.mit-schritten) .schritt-nav { display: none; }

@media (prefers-reduced-motion: reduce) {
    .balken span, .option span { transition: none; }
}

/* Einrichtungs-Assistent */
.pruefung { width: 100%; border-collapse: collapse; font-size: .92rem; }
.pruefung td { padding: 7px 8px 7px 0; border-top: 1px solid var(--linie); vertical-align: top; overflow-wrap: anywhere; }
.pruefung .zeichen { width: 1.6em; font-weight: 700; }
.pruefung .gut { color: var(--primaer); }
.pruefung .schlecht { color: var(--fehler); }
.pruefung .hinweis { color: var(--akzent); }
code.cron { display: block; padding: 10px 12px; border-radius: 8px; background: var(--grund); overflow-wrap: anywhere; font-size: .85rem; }
input[type="password"] {
    width: 100%;
    font: inherit;
    font-size: 1rem;
    color: var(--text);
    background: var(--flaeche);
    border: 1px solid var(--linie);
    border-radius: 10px;
    padding: 11px 13px;
}
.einrichtung-form .knopf { margin-top: 4px; }
