/* ==========================================================================
   Ausfüllhilfe Domizilannahmeerklärung (28.09.2026). Lädt nur auf
   /ratgeber/domizilannahmeerklaerung-muster/ausfuellen. Farben und Abstände
   aus theme.css; Handy zuerst (iPhone 13 Pro, 390 px), Drucken zuletzt.
   ========================================================================== */

.erkl-kopf { max-width: 780px; margin: 0; } /* im hellgrauen Kopfband (seitenkopf), Prüfung 13.10.2026 */
.erkl-kopf h1 { margin: 0 0 14px; hyphens: manual; -webkit-hyphens: manual; } /* nur am weichen Trennstrich: Domizilannahme-erklärung */

.erkl-privat {
    display: flex; gap: .75rem; align-items: flex-start; margin: 0 0 var(--space-3);
    padding: .9rem 1rem; border-radius: var(--radius-sm);
    background: var(--color-success-bg); color: #184d33; border: 1px solid #cfe8d8;
}
.erkl-privat p { margin: 0; max-width: 38em; font-size: .95rem; line-height: 1.55; } /* höchstens rund 85 Zeichen je Zeile */
.erkl-privat__icon { width: 22px; height: 22px; flex: none; margin-top: 2px; color: var(--color-success); }
/* Wer füllt aus? Zwei grosse Knöpfe, danach die passende Werbung (Handy untereinander, ab 640 px nebeneinander) */
.erkl-wer { margin: 0 0 var(--space-4); max-width: 780px; }
.erkl-wer[hidden] { display: none; }
.erkl-wer__frage { margin: 0 0 .6rem; font-size: 1.15rem; font-weight: var(--fw-bold); }
.erkl-wer__wahl { display: grid; grid-template-columns: minmax(0, 1fr); gap: .6rem; }
@media (min-width: 640px) { .erkl-wer__wahl { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.erkl-wer__knopf {
    display: flex; flex-direction: column; align-items: flex-start; gap: .2rem; width: 100%; min-height: 72px;
    padding: .9rem 1rem; text-align: left; font: inherit; cursor: pointer; color: var(--color-text);
    background: var(--color-bg); border: 2px solid var(--color-border); border-radius: var(--radius);
    box-shadow: var(--shadow-sm); transition: border-color .15s, background .15s;
}
.erkl-wer__knopf:hover { border-color: var(--color-primary-light); }
.erkl-wer__knopf:focus-visible { outline: 3px solid var(--color-primary-light); outline-offset: 2px; }
.erkl-wer__knopf.is-gewaehlt { border-color: var(--color-primary); background: #eef3f5; }
.erkl-wer__titel { font-weight: var(--fw-bold); font-size: 1.02rem; }
.erkl-wer__text { font-size: .9rem; color: var(--color-text-muted); line-height: 1.45; }
.erkl-wer__satz { margin: .6rem 0 0; font-size: .88rem; color: var(--color-text-muted); }
.erkl-werbung {
    display: flex; align-items: flex-start; gap: .55rem; margin: .8rem 0 0; padding: .75rem .9rem;
    border-radius: var(--radius-sm); background: #fff; border: 1px solid var(--color-border); box-shadow: var(--shadow-sm); font-size: .92rem; line-height: 1.5;
} /* weisser Block, kein Beige (13.10.2026) */
.erkl-werbung[hidden] { display: none; }
.erkl-werbung .icon { width: 18px; height: 18px; flex: none; margin-top: 2px; color: var(--color-primary); }
.erkl-werbung a { font-weight: var(--fw-semibold); }
.erkl-danach[hidden], .erkl-cta[hidden] { display: none; }
.erkl-vorab { max-width: 780px; margin: 0 0 var(--space-4); }
.erkl-leer { margin: 0; font-size: .95rem; }
.erkl-leer a { display: inline-flex; align-items: center; gap: .35rem; min-height: 44px; font-weight: var(--fw-semibold); } /* Tippfläche 44 px */
.erkl-leer .icon { width: 18px; height: 18px; }

/* ---- Raster: Formular und Vorschau ---- */
.erkl-raster {
    display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-4); align-items: start;
    grid-template-areas: "form" "vorschau" "abschluss";
}
.erkl-raster[hidden] { display: none; }
.erkl-form { grid-area: form; }
.erkl-vorschau { grid-area: vorschau; min-width: 0; }
.erkl-abschluss { grid-area: abschluss; display: flex; flex-direction: column; gap: .8rem; min-width: 0; }
@media (min-width: 1000px) {
    .erkl-raster {
        grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); column-gap: var(--space-5); row-gap: var(--space-3);
        grid-template-areas: "form vorschau" "abschluss vorschau";
    }
    .erkl-vorschau { position: sticky; top: 96px; }
}

/* ---- Formular ---- */
.erkl-form { display: flex; flex-direction: column; gap: var(--space-3); min-width: 0; }
.erkl-teil {
    margin: 0; padding: 1.1rem 1.1rem 1.2rem; min-width: 0;
    border: 1px solid var(--sx-rand); border-radius: var(--radius); background: var(--sx-block); /* warm auf Weiss wie die übrigen Blöcke */
    box-shadow: none; display: flex; flex-direction: column; gap: .8rem;
}
.erkl-teil legend {
    float: left; width: 100%; padding: 0; margin: 0 0 .1rem;
    display: flex; align-items: center; gap: .6rem; font-weight: var(--fw-bold); font-size: 1.1rem;
}
.erkl-teil legend + * { clear: both; }
.erkl-nr {
    display: inline-flex; align-items: center; justify-content: center; width: 1.7rem; height: 1.7rem; flex: none;
    border-radius: 50%; background: var(--color-primary); color: #fff; font-size: .85rem; font-weight: var(--fw-bold);
}
.erkl-tipp { margin: 0; font-size: .9rem; color: var(--color-text-muted); line-height: 1.5; }
.erkl-untertitel { margin: .3rem 0 0; font-size: .85rem; font-weight: var(--fw-semibold); color: var(--color-text-muted); }

.erkl-feld { display: flex; flex-direction: column; gap: .3rem; font-size: .88rem; font-weight: var(--fw-semibold); color: var(--color-text); min-width: 0; }
.erkl-feld input, .erkl-feld select {
    width: 100%; min-height: 46px; padding: .55rem .75rem; font: inherit; font-size: 16px; font-weight: var(--fw-normal);
    border: 1px solid var(--color-border-cool); border-radius: var(--radius-sm); background: #fff; color: var(--color-text);
}
.erkl-feld input:focus, .erkl-feld select:focus { outline: 2px solid var(--color-primary-light); outline-offset: 1px; border-color: var(--color-primary-light); }
.erkl-feld input::placeholder { color: #93a1a8; }

.erkl-check { display: flex; align-items: center; gap: .55rem; min-height: 44px; font-size: .92rem; cursor: pointer; }
.erkl-check input { width: 20px; height: 20px; flex: none; accent-color: var(--color-primary); }

.erkl-wahl { display: flex; flex-wrap: wrap; gap: .4rem; }
.erkl-wahl label {
    position: relative; display: inline-flex; align-items: center; gap: .45rem; min-height: 44px; padding: 0 .9rem;
    border: 1px solid var(--color-border-cool); border-radius: var(--radius-sm); font-size: .92rem; cursor: pointer; background: #fff; /* keine Pillen */
}
.erkl-wahl input { width: 18px; height: 18px; accent-color: var(--color-primary); margin: 0; }
.erkl-wahl label:has(input:checked) { border-color: var(--color-primary); background: #eef3f5; font-weight: var(--fw-semibold); }
.erkl-wahl--klein label { min-height: 44px; font-size: .86rem; } /* Tippfläche 44 px */

.erkl-zwei, .erkl-drei, .erkl-plz { display: grid; gap: .8rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 560px) {
    .erkl-zwei { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* Vorname und Name nebeneinander, Funktion darunter in voller Breite: in drei Spalten war das Feld bei 1440 px zu schmal
   für «z. B. Geschäftsführerin» und «z. B. Mitglied des Verwaltungsrates» (Prüfung 13.10.2026) */
@media (min-width: 560px) {
    .erkl-drei { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .erkl-drei > :nth-child(3) { grid-column: 1 / -1; }
}
.erkl-plz { grid-template-columns: 6.5rem minmax(0, 1fr); }
/* Die Blöcke je Art des Domizilhalters haben denselben Abstand wie der Abschnitt selbst (Wunsch Lars 28.09.2026). */
[data-nur] { display: flex; flex-direction: column; gap: .8rem; }
[data-nur][hidden], #erkl-zweite[hidden] { display: none !important; }

.erkl-hinweise { display: flex; flex-direction: column; gap: .5rem; }
.erkl-hinweise[hidden] { display: none; }
.erkl-hinweis {
    margin: 0; padding: .7rem .9rem; border-radius: var(--radius-sm); font-size: .9rem; line-height: 1.5;
    background: #edf3f6; border: 1px solid #d2dfe5; color: var(--color-text);
} /* Hinweis hellblau wie «Preis auf Anfrage» in der Anfrage; vorher cremegelb (kein Beige, 13.10.2026) */
.erkl-offen { margin: 0; font-size: .88rem; color: var(--color-text-muted); }
.erkl-offen--ok { color: var(--color-success); font-weight: var(--fw-semibold); }

.erkl-knoepfe { display: flex; flex-wrap: wrap; gap: .6rem; }
.erkl-knoepfe .btn { min-height: 48px; justify-content: center; }
.erkl-knoepfe .icon { width: 18px; height: 18px; }
@media (max-width: 559px) {
    .erkl-knoepfe .btn { flex: 1 1 100%; }
}

/* ---- Vorschau: ein Blatt wie das Word-Dokument ---- */
.erkl-vorschau__titel { margin: 0 0 .5rem; font-size: .95rem; font-weight: 600; color: var(--color-text-muted); } /* ohne Grossbuchstaben und Sperrung */
.erkl-blatt {
    background: #fff; border: 1px solid var(--color-border); border-radius: 6px; box-shadow: var(--shadow);
    padding: 2.2rem 2rem 2rem; font-family: Arial, Helvetica, sans-serif; font-size: .92rem; line-height: 1.5; color: #111;
    min-width: 0; overflow-wrap: anywhere;
}
.erkl-blatt p { margin: 0; }
.erkl-blatt__titel { font-size: 1.35rem !important; font-weight: 700; }
.erkl-blatt__untertitel { color: #555; margin-bottom: 1.6rem !important; }
.erkl-blatt__adressat { margin-bottom: 1.2rem !important; }
.erkl-blatt__liste { display: grid; grid-template-columns: minmax(0, 11rem) minmax(0, 1fr); gap: .55rem 1rem; margin: 0 0 1.3rem; }
.erkl-blatt__liste dt { font-weight: 700; }
.erkl-blatt__liste dd { margin: 0; }
.erkl-blatt__erklaerung { margin-bottom: 1.5rem !important; }
.erkl-blatt__unterschrift { margin-top: 3rem; max-width: 18rem; border-top: 1px solid #111; padding-top: .3rem; }
.erkl-blatt__funktion { color: #555; }
.erkl-blatt__hinweis { margin-top: 1.2rem !important; font-size: .75rem; color: #666; }
.erkl-ph { background: #fff3c4; border-radius: 3px; color: #6b4d00; box-shadow: 0 0 0 .12em #fff3c4; }
@media (max-width: 559px) {
    .erkl-blatt { padding: 1.4rem 1.1rem 1.3rem; font-size: .86rem; }
    .erkl-blatt__liste { grid-template-columns: minmax(0, 1fr); gap: .1rem; }
    .erkl-blatt__liste dd { margin-bottom: .6rem; }
}

/* ---- Danach ---- */
.erkl-danach { max-width: 820px; margin-top: var(--space-5); }
.erkl-danach h2 { font-size: 1.5rem; margin: 0 0 var(--space-3); }
.erkl-schritte { margin: 0 0 var(--space-4); padding-left: 1.3rem; display: flex; flex-direction: column; gap: .6rem; line-height: 1.55; }
.erkl-cta {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3);
    padding: 1.2rem 1.3rem; border-radius: var(--radius); background: #fff; border: 1px solid var(--color-border); box-shadow: var(--shadow-sm);
}
.erkl-cta p { margin: 0; }
.erkl-cta__titel { font-weight: var(--fw-bold); font-size: 1.1rem; margin-bottom: .25rem !important; }
.erkl-cta > div { flex: 1 1 18rem; }
.erkl-gewaehr { margin-top: var(--space-3); }
/* Zeilenlänge höchstens 88 Zeichen, auch wenn das Formular offen ist (Gegenprüfung 13.10.2026: Tipps bis 101, Haftungshinweis
   bis 122 Zeichen bei 768 bis 1920 px). 60ch ergibt gemessen rund 80 bis 85 Zeichen. Das Blatt der Vorschau bleibt breit. */
.erkl-tipp, .erkl-offen, .erkl-gewaehr, .erkl-schritte li, .erkl-werbung > span { max-width: 60ch; } /* Werbung: Domizilgeber 96 bei 1440 */

/* ---- Drucken: nur das Blatt ---- */
@media print {
    @page { size: A4; margin: 22mm 20mm; }
    body.erkl-body .site-header, body.erkl-body .site-footer, body.erkl-body .mobile-bar, body.erkl-body .breadcrumb,
    body.erkl-body .seitenkopf-pfad, body.erkl-body .seitenkopf,
    body.erkl-body .erkl-kopf, body.erkl-body .erkl-form, body.erkl-body .erkl-abschluss, body.erkl-body .erkl-danach, body.erkl-body .erkl-vorschau__titel,
    body.erkl-body .erkl-wer, body.erkl-body .erkl-vorab, body.erkl-body .erkl-werbung, /* Wahl, Datenschutzkasten, Word-Vorlage, Werbung (Gegenprüfung 13.10.2026) */
    body.erkl-body .skip-link, body.erkl-body .cookie-consent, body.erkl-body noscript { display: none !important; }
    body.erkl-body, body.erkl-body .main, body.erkl-body .section { background: #fff !important; padding: 0 !important; margin: 0 !important; }
    body.erkl-body .container { max-width: none; padding: 0; }
    .erkl-raster { display: block !important; }
    .erkl-blatt { border: 0; box-shadow: none; padding: 0; font-size: 11pt; border-radius: 0; }
    .erkl-blatt__liste { grid-template-columns: 5.2cm minmax(0, 1fr); }
    .erkl-ph { background: none; padding: 0; color: inherit; box-shadow: none; } /* sonst gelber Rahmen um leere Platzhalter */
}
