/* ==========================================================================
   Hilfeseite
   Baut auf den Tokens und Bausteinen aus styles.css auf.
   Aufbau: Kopf, links ein mitlaufendes Inhaltsverzeichnis, rechts die Artikel.
   ========================================================================== */

.help-page {
    padding: clamp(var(--space-10), 6vw, var(--space-16)) 0 var(--section-space);
}

/* Kopfbereich */

.help-hero {
    max-width: 46rem;
    margin-bottom: clamp(var(--space-10), 6vw, var(--space-16));
}

.help-hero__title {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(var(--text-4xl), 6vw, var(--text-6xl));
    line-height: 1;
    letter-spacing: -0.015em;
    color: var(--ink);
    margin-bottom: var(--space-5);
}

.help-hero__lead {
    font-size: var(--text-lg);
    line-height: 1.65;
    color: var(--ink-soft);
    max-width: 38rem;
}

/* Zweispaltiges Raster */

.help-layout {
    display: grid;
    grid-template-columns: 17rem minmax(0, 1fr);
    gap: clamp(var(--space-10), 6vw, var(--space-20));
    align-items: start;
}

/* Inhaltsverzeichnis */

.help-toc {
    position: sticky;
    top: calc(var(--header-height) + var(--space-6));
    max-height: calc(100vh - var(--header-height) - var(--space-12));
    overflow-y: auto;
    padding-right: var(--space-2);
    border-top: 1px solid var(--rule-strong);
    padding-top: var(--space-4);
}

.help-toc__heading {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-muted);
    margin-bottom: var(--space-5);
}

.help-toc__groups {
    display: grid;
    gap: var(--space-6);
}

.help-toc__title {
    display: flex;
    align-items: baseline;
    gap: var(--space-2);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--ink);
    margin-bottom: var(--space-2);
}

.help-toc__number {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    font-weight: 500;
    color: var(--accent);
}

.help-toc__list {
    display: flex;
    flex-direction: column;
}

.help-toc__list a {
    display: block;
    padding: 5px 0 5px var(--space-3);
    border-left: 1px solid var(--rule);
    color: var(--ink-soft);
    text-decoration: none;
    font-size: var(--text-sm);
    line-height: 1.45;
    transition: color var(--duration) var(--ease), border-color var(--duration) var(--ease);
}

.help-toc__list a:hover {
    color: var(--ink);
    border-left-color: var(--ink);
}

.help-toc__list a[aria-current="true"] {
    color: var(--accent);
    border-left-color: var(--accent);
    font-weight: 600;
}

/* Artikel */

.help-main,
.help-content {
    max-width: 46rem;
}

.help-section__title {
    display: flex;
    align-items: baseline;
    gap: var(--space-4);
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(var(--text-2xl), 3vw, var(--text-3xl));
    line-height: 1.1;
    color: var(--ink);
    margin: var(--space-20) 0 0;
    padding-bottom: var(--space-4);
    border-bottom: 1px solid var(--rule-strong);
    scroll-margin-top: calc(var(--header-height) + var(--space-6));
}

.help-section__title:first-child { margin-top: 0; }

.help-section__number {
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--accent);
}

.help-article {
    padding: var(--space-10) 0;
    border-bottom: 1px solid var(--rule);
    scroll-margin-top: calc(var(--header-height) + var(--space-4));
}

.help-article__title {
    font-size: var(--text-xl);
    font-weight: 600;
    line-height: 1.3;
    color: var(--ink);
    margin-bottom: var(--space-2);
}

.help-article__summary {
    color: var(--ink-muted);
    font-size: var(--text-base);
    line-height: 1.6;
    margin-bottom: var(--space-6);
}

.help-article__body > * + * { margin-top: var(--space-4); }

.help-article__body p {
    color: var(--ink-soft);
    line-height: 1.7;
}

.help-article__subtitle {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-muted);
    padding-top: var(--space-4);
}

.help-article__body > .help-article__subtitle { margin-top: var(--space-8); }

.help-article__link {
    color: var(--accent);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
}

.help-article__link:hover { color: var(--accent-hover); }

.help-article__link-mark { color: var(--accent); }

/* Schritte: nummeriert wie Zeilen eines Protokolls */

.help-steps {
    counter-reset: help-step;
    border-top: 1px solid var(--rule);
}

.help-steps li {
    counter-increment: help-step;
    display: grid;
    grid-template-columns: 2.25rem 1fr;
    padding: var(--space-3) 0;
    border-bottom: 1px solid var(--rule);
    color: var(--ink);
    line-height: 1.65;
}

.help-steps li::before {
    content: counter(help-step, decimal-leading-zero);
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    color: var(--accent);
    padding-top: 1px;
}

.help-bullets li {
    position: relative;
    padding-left: var(--space-6);
    margin-bottom: var(--space-2);
    color: var(--ink-soft);
    line-height: 1.7;
}

.help-bullets li::before {
    content: '';
    position: absolute;
    left: 2px;
    top: 0.8em;
    width: 10px;
    height: 1px;
    background: var(--ink-muted);
}

/* Plattformvarianten: dieselbe Stelle für iPhone/Mac und Android, jeweils mit Label */

.help-article__platform {
    display: inline-block;
    margin-bottom: var(--space-6);
    padding: 2px var(--space-2);
    border: 1px dashed var(--rule-strong);
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink);
}

.help-variants {
    display: grid;
    gap: var(--space-2);
}

.help-variant {
    display: block;
    padding-left: var(--space-3);
    border-left: 2px solid var(--rule);
}

.help-variant + .help-variant { border-left-color: var(--accent); }

.help-variant > p { margin: 0; }

li.help-variants .help-variant + .help-variant { margin-top: var(--space-1); }

.help-steps li.help-variants .help-variant { grid-column: 2; }

.help-platform {
    display: block;
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-muted);
}

/* Hinweiskästen: Textlabel statt Symbol, Farbe nur als Randmarke */

.help-callout {
    display: grid;
    gap: var(--space-1);
    padding: var(--space-4) var(--space-5);
    background: var(--sheet);
    border: 1px solid var(--rule);
    border-radius: var(--radius-md);
}

.help-callout__label {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.help-callout p {
    margin: 0;
    font-size: var(--text-sm);
    line-height: 1.6;
    color: var(--ink);
}

.help-callout--note .help-callout__label { color: var(--accent); }

.help-callout--warning {
    border-color: var(--warning-rule);
    background: var(--warning-surface);
}

.help-callout--warning .help-callout__label { color: var(--warning-ink); }

:root {
    --warning-surface: #fff6d6;
    --warning-rule: #e8c75a;
    --warning-ink: #7a5300;
}

@media (prefers-color-scheme: dark) {
    :root {
        --warning-surface: #2a2314;
        --warning-rule: #5e4a17;
        --warning-ink: #f0c65a;
    }
}

/* Abschluss */

.help-support {
    margin-top: var(--space-16);
    padding: var(--space-8);
    background: var(--sheet);
    box-shadow: var(--shadow-sheet);
    border-top: 3px solid var(--ink);
}

.help-support__title {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: var(--text-3xl);
    line-height: 1.1;
    margin-bottom: var(--space-3);
}

.help-support__text {
    color: var(--ink-soft);
    line-height: 1.7;
    margin-bottom: var(--space-6);
    max-width: 34rem;
}

.help-back { margin-top: var(--space-10); }

/* Responsiv */

@media (max-width: 1040px) {
    .help-layout { grid-template-columns: 1fr; }

    .help-toc {
        position: static;
        max-height: none;
        overflow: visible;
        padding-right: 0;
        padding-bottom: var(--space-8);
        border-bottom: 1px solid var(--rule);
    }

    .help-toc__groups {
        grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
        gap: var(--space-6) var(--space-8);
    }
}

@media (max-width: 640px) {
    .help-article { padding: var(--space-8) 0; }
    .help-support { padding: var(--space-6) var(--space-5); }
}
