/* ═══════════════════════════════════════════════════════════════════
   HILFE
   Eine Seite mit Ankern. Gleiche Bauart wie Neuigkeiten: deckende
   Flächen, Haarlinien, keine Unschärfe. Alle Klassen tragen das Präfix hp-.
═══════════════════════════════════════════════════════════════════ */
:root {
    --hp-line: #dfe4e7;
    --hp-card: var(--surface-container-lowest, #fff);
    --hp-radius: 12px;
    --hp-radius-sm: 8px;
    --hp-danger: #b3261e;
    --hp-danger-hover: #8c1d18;
    --hp-ok: #586400;
    --hp-ok-bg: #f1f6cf;
    --hp-err-bg: #fdecea;
}

/* navigation-citizen.css setzt overflow-x: hidden auf html und body. Damit
   wird body zum Scroll-Container und das sticky Inhaltsverzeichnis scrollt
   weg. clip schneidet genauso ab, ohne Scroll-Container (hidden bleibt als
   Rückfall für alte Browser). */
html, body { overflow-x: hidden; overflow-x: clip; }

body {
    background: var(--surface, #fbf9f8);
    color: var(--on-surface, #1b1c1c);
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

.hp, .hp * { box-sizing: border-box; }

.material-symbols-outlined {
    font-family: 'Material Symbols Outlined';
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    line-height: 1;
}

.hp {
    flex: 1;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 48px 24px 80px;
}

.hp a { color: var(--primary, #006684); text-underline-offset: 2px; }
.hp a:hover { color: var(--on-primary-container, #00475d); }

/* ── Seitenkopf ─────────────────────────────────────────────── */
.hp-head {
    padding-bottom: 28px;
    margin-bottom: 32px;
    border-bottom: 1px solid var(--hp-line);
}

.hp-head h1 {
    font-size: clamp(2rem, 4.4vw, 3rem);
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -0.02em;
    text-wrap: balance;
}

.hp-head p {
    margin-top: 14px;
    max-width: 62ch;
    font-size: 1.0625rem;
    line-height: 1.6;
    color: var(--on-surface-variant, #3e484e);
}

/* ── Zweispaltig: Inhaltsverzeichnis links, Text rechts ─────── */
.hp-layout {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 48px;
    align-items: start;
}

.hp-toc {
    position: sticky;
    top: 96px;
}

.hp-toc-title {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--on-surface-variant, #3e484e);
    margin-bottom: 10px;
}

.hp-toc ol { list-style: none; border-left: 1px solid var(--hp-line); }

.hp-toc a {
    display: block;
    padding: 6px 0 6px 14px;
    margin-left: -1px;
    border-left: 2px solid transparent;
    font-size: 0.9375rem;
    color: var(--on-surface-variant, #3e484e);
    text-decoration: none;
}

.hp-toc a:hover,
.hp-toc a:focus-visible {
    color: var(--primary, #006684);
    border-left-color: var(--primary, #006684);
}

/* ── Abschnitte ─────────────────────────────────────────────── */
.hp-content { min-width: 0; max-width: 72ch; }

.hp-section {
    scroll-margin-top: 96px;
    padding-bottom: 40px;
    margin-bottom: 40px;
    border-bottom: 1px solid var(--hp-line);
}

.hp-section:last-child { border-bottom: 0; margin-bottom: 0; }

.hp-section h2 {
    font-size: clamp(1.375rem, 2.4vw, 1.75rem);
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-bottom: 16px;
}

.hp-section p,
.hp-section li,
.hp-section dd {
    font-size: 1rem;
    line-height: 1.65;
    overflow-wrap: anywhere;
}

.hp-section p + p,
.hp-section ul + p,
.hp-section p + ul { margin-top: 12px; }

.hp-section ul { padding-left: 1.25rem; }
.hp-section ul li + li { margin-top: 6px; }

.hp-steps { padding-left: 1.5rem; }
.hp-steps li + li { margin-top: 12px; }
.hp-steps li::marker { font-weight: 700; color: var(--primary, #006684); }

.hp-note {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-top: 20px;
    padding: 14px 16px;
    border-radius: var(--hp-radius-sm);
    background: var(--surface-container-low, #f5f3f3);
    color: var(--on-surface-variant, #3e484e);
}

.hp-note .material-symbols-outlined { color: var(--hp-danger); flex-shrink: 0; }

/* Status als Liste aus Begriff + Erklärung */
.hp-status { display: grid; gap: 0; }

.hp-status > div {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 16px;
    padding: 12px 0;
    border-top: 1px solid var(--hp-line);
}

.hp-status > div:first-child { border-top: 0; padding-top: 0; }
.hp-status dt { font-weight: 600; }

/* FAQ */
.hp-faq { border-top: 1px solid var(--hp-line); }

.hp-faq details { border-bottom: 1px solid var(--hp-line); }

.hp-faq summary {
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 0;
    font-weight: 600;
    line-height: 1.4;
}

.hp-faq summary::-webkit-details-marker { display: none; }

.hp-faq summary::after {
    content: '+';
    flex-shrink: 0;
    font-size: 1.25rem;
    line-height: 1;
    color: var(--primary, #006684);
}

.hp-faq details[open] summary::after { content: '−'; }
.hp-faq details p { padding: 0 0 16px; color: var(--on-surface-variant, #3e484e); }

/* ── Kontokarte ─────────────────────────────────────────────── */
.hp-card {
    background: var(--hp-card);
    border: 1px solid var(--hp-line);
    border-radius: var(--hp-radius);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Versteckte Teile (und <noscript> bei aktivem JS) erzeugen so keinen Abstand. */
.hp-card [hidden] { display: none !important; }

.hp-muted { color: var(--on-surface-variant, #3e484e); }

.hp-account {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow-wrap: anywhere;
}

.hp-account .material-symbols-outlined { font-size: 28px; color: var(--primary, #006684); }

.hp-form { display: grid; gap: 8px; }
.hp-form label { font-size: 0.875rem; font-weight: 600; }
.hp-form p { margin-bottom: 4px; }

.hp-form input {
    width: 100%;
    font-size: 1rem;
    padding: 12px 14px;
    border: 1px solid var(--outline-variant, #bec8ce);
    border-radius: var(--hp-radius-sm);
    background: var(--surface-container-lowest, #fff);
    color: inherit;
}

.hp-form input:focus-visible {
    outline: 2px solid var(--primary, #006684);
    outline-offset: 1px;
    border-color: transparent;
}

#konto-code-input { letter-spacing: 0.3em; font-variant-numeric: tabular-nums; max-width: 14rem; }

.hp-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 8px;
}

.hp-btn {
    appearance: none;
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 10px 20px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.hp-btn:focus-visible { outline: 2px solid var(--primary, #006684); outline-offset: 2px; }
.hp-btn:disabled { opacity: 0.6; cursor: progress; }

.hp-btn--ghost {
    background: transparent;
    border-color: var(--outline-variant, #bec8ce);
    color: var(--on-surface, #1b1c1c);
}

.hp-btn--ghost:hover:not(:disabled) { background: var(--surface-container-low, #f5f3f3); }

.hp-btn--danger { background: var(--hp-danger); color: #fff; }
.hp-btn--danger:hover:not(:disabled) { background: var(--hp-danger-hover); }

.hp-msg {
    padding: 12px 14px;
    border-radius: var(--hp-radius-sm);
    font-weight: 500;
}

.hp-msg--ok { background: var(--hp-ok-bg); color: var(--hp-ok); }
.hp-msg--err { background: var(--hp-err-bg); color: var(--hp-danger); }

/* ── Bestätigungsdialog ─────────────────────────────────────── */
.hp-dialog {
    max-width: min(480px, calc(100vw - 32px));
    margin: auto;
    border: 0;
    border-radius: var(--hp-radius);
    padding: 24px;
    background: var(--surface-container-lowest, #fff);
    color: var(--on-surface, #1b1c1c);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}

.hp-dialog::backdrop { background: rgba(0, 0, 0, 0.45); }
.hp-dialog h3 { font-size: 1.25rem; margin-bottom: 12px; }
.hp-dialog p { line-height: 1.6; color: var(--on-surface-variant, #3e484e); }
.hp-dialog p + p { margin-top: 10px; }
.hp-dialog .hp-actions { justify-content: flex-end; margin-top: 20px; }

/* ── Schmale Bildschirme ────────────────────────────────────── */
@media (max-width: 860px) {
    .hp-layout { grid-template-columns: minmax(0, 1fr); gap: 32px; }

    .hp-toc {
        position: static;
        background: var(--hp-card);
        border: 1px solid var(--hp-line);
        border-radius: var(--hp-radius);
        padding: 16px;
    }

    .hp-toc ol {
        border-left: 0;
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    .hp-toc a {
        padding: 6px 12px;
        margin: 0;
        border: 1px solid var(--hp-line);
        border-radius: 999px;
        font-size: 0.875rem;
    }
}

@media (max-width: 600px) {
    .hp { padding: 32px 16px 80px; }
    .hp-status > div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
    .hp-card { padding: 18px; }
    .hp-actions .hp-btn { flex: 1 1 100%; }
}
