/* Uebersicht und Kapitel (einstellungen-kapitel.js, seit 04.10.2026). Am Handy entweder die
   Uebersicht oder ein Kapitel; ab 769 px die Uebersicht links, das Kapitel rechts. */
.einstellungen-raster {
    display: flex;
    flex-direction: column;
    gap: var(--space-16);
}

.einstellungen-kapitel {
    display: flex;
    flex-direction: column;
    gap: var(--space-16);
    min-width: 0;
}

.kapitel-liste {
    display: flex;
    flex-direction: column;
    gap: var(--space-8);
    margin: 0;
    padding: 0;
    list-style: none;
}

.kapitel-link {
    display: flex;
    align-items: center;
    gap: var(--space-12);
    min-height: 56px;
    padding: var(--space-12) var(--space-16);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    background: var(--card);
    color: var(--text);
    text-decoration: none;
}

.kapitel-link:focus-visible {
    outline: 2px solid var(--accent-text);
    outline-offset: 2px;
}

.kapitel-link[aria-current="page"] {
    border-color: var(--accent-text);
    box-shadow: inset 3px 0 0 var(--accent-text);
}

.kapitel-link-text {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: var(--space-2);
    min-width: 0;
}

.kapitel-link-titel {
    font-weight: 600;
}

.kapitel-link-stand {
    color: var(--text-muted);
    font-size: var(--text-13);
    overflow-wrap: anywhere;
}

.kapitel-link-stand:empty {
    display: none;
}

.kapitel-link-pfeil {
    color: var(--text-muted);
    font-size: var(--text-16);
}

.kapitel-kopf {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.kapitel-zurueck {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    min-height: 44px;
    color: var(--accent-text);
    font-weight: 600;
}

.kapitel-titel {
    margin: 0;
}

.kapitel-titel:focus {
    outline: none;
}

@media (max-width: 768px) {
    .einstellungen-im-kapitel .einstellungen-uebersicht {
        display: none;
    }
}

@media (min-width: 769px) {
    .einstellungen-raster {
        display: grid;
        grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
        align-items: start;
        gap: var(--space-24);
    }

    .kapitel-zurueck {
        display: none;
    }
}

.kapitel-satz {
    margin: 0;
    color: var(--text);
    font-size: var(--text-16);
}

.kapitel-satz:empty {
    display: none;
}

.kapitel-hilfe-link {
    margin: 0;
    font-size: var(--text-14);
}

/* Freistehende Links (keine im Fliesstext): eigenes Tippziel, 44 px am Handy, 32 px am
   Desktop - der Visual-Audit fand sie mit 16 px, sobald jedes Kapitel einzeln geprueft wurde
   (Deploy 39, 04.10.2026). */
.kapitel-hilfe-link a,
.konto-daten-links a {
    display: inline-flex;
    align-items: center;
    gap: var(--space-6);
    min-height: 44px;
}

@media (min-width: 769px) {
    .kapitel-hilfe-link a,
    .konto-daten-links a {
        min-height: 32px;
    }
}

/* Suchfeld ueber der Uebersicht (einstellungen-suche.js, seit 04.10.2026). */
.einstellungen-suche {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
    margin-bottom: var(--space-12);
}

.einstellungen-suche-feld {
    min-height: 44px;
    padding: var(--space-8) var(--space-12);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    background: var(--input-bg);
    color: var(--text);
    font: inherit;
    font-size: var(--text-16);
}

.einstellungen-suche-status {
    margin: 0;
    color: var(--text-muted);
    font-size: var(--text-13);
}

.einstellungen-suche-status:empty {
    display: none;
}

.einstellungen-suche-treffer {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
    margin: 0;
    padding: 0;
    list-style: none;
}

.einstellungen-suche-link {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    min-height: 44px;
    padding: var(--space-8) var(--space-12);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    background: var(--card);
    color: var(--text);
    text-decoration: none;
}

.einstellungen-suche-link:focus-visible {
    outline: 2px solid var(--accent-text);
    outline-offset: 2px;
}

.einstellungen-suche-name {
    font-weight: 600;
}

.einstellungen-suche-wo {
    color: var(--text-muted);
    font-size: var(--text-13);
}

/* Was gilt wo (Konto oder Geraet) */
.einstellungen-geltung {
    margin: var(--space-12) 0 0;
    color: var(--text-muted);
    font-size: var(--text-13);
}

.einstellungen-geraet-marke {
    display: inline-block;
    margin-left: var(--space-6);
    padding: var(--space-2) var(--space-8);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    color: var(--text-muted);
    font-size: var(--text-13);
    font-weight: 400;
    vertical-align: middle;
}

/* Gefahrenzone: Konto loeschen, abgesetzt ganz unten im Kapitel "Konto & Daten" */
.einstellungen-gefahr {
    border-color: var(--danger-text);
}

.einstellungen-gefahr-titel {
    margin: 0 0 var(--space-8);
    font-size: var(--text-16);
}
