body {
    background-color: var(--bg-body);
}

.help-page {
    min-height: 100vh;
    padding-top: var(--header-height);
}

.page-header {
    background: var(--color-primary);
    padding: clamp(3rem, 9vh, 4.5rem) 0;
    text-align: center;
}

.page-header__content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 clamp(1rem, 4vw, 2rem);
}

.page-header__eyebrow {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-accent);
    margin-bottom: 1.5rem;
}

.page-header__title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 400;
    color: var(--text-inverse);
    margin: 0 0 1rem;
}

.page-header__description {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.75);
    margin: 0;
    line-height: 1.7;
}

.help-content-section {
    padding: 3rem clamp(1rem, 4vw, 2rem) 4rem;
}

.help-layout {
    display: flex;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    align-items: flex-start;
}

.help-sidebar {
    width: clamp(14rem, 22vw, 16.25rem);
    flex: 0 0 clamp(14rem, 22vw, 16.25rem);
    background: var(--bg-surface);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    padding: 1.5rem;
    position: sticky;
    top: calc(var(--header-height) + 1.5rem);
    max-height: calc(100dvh - var(--header-height) - 3rem);
    overflow-y: auto;
}

.help-sidebar__heading {
    font-family: var(--font-display);
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.help-sidebar__topics {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.help-sidebar__topic-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.help-sidebar__topic {
    display: block;
    padding: 0.6rem 0.85rem;
    border-radius: 10px;
    font-weight: 400;
    color: var(--text-primary);
    transition: background 0.2s ease, color 0.2s ease;
}

.help-sidebar__topic:hover {
    background: rgba(0, 0, 0, 0.06);
}

.help-sidebar__topic--active {
    background: rgba(51, 122, 183, 0.15);
    color: var(--color-secondary);
}

.help-sidebar__subheadings {
    padding-left: 0.75rem;
    margin-left: 0.4rem;
    border-left: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.help-sidebar__sublink {
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

.help-sidebar__sublink:hover {
    color: var(--text-primary);
}

.help-sidebar__sublink--active {
    color: var(--color-secondary);
    font-weight: 400;
}

.help-sidebar__empty {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.help-content {
    flex: 1;
    min-width: 0;
    background: var(--bg-surface);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    padding: 2.5rem;
    color: var(--text-primary);
    overflow-wrap: anywhere;
}

.help-content__error {
    font-size: 1rem;
    color: var(--text-secondary);
}

.help-content h2 {
    font-family: var(--font-display);
    font-size: 1.6rem;
    margin: 2rem 0 0.75rem;
    color: var(--text-primary);
    scroll-margin-top: calc(var(--header-height) + 1.5rem);
}

.help-content h3 {
    font-size: 1.1rem;
    margin: 1.5rem 0 0.5rem;
    color: var(--text-primary);
}

.help-content p {
    margin: 0 0 1.25rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

.help-content ul,
.help-content ol {
    margin: 0 0 1.5rem 1.5rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.help-content a {
    color: var(--color-secondary);
    text-decoration: none;
    font-weight: 400;
}

.help-content a:hover {
    text-decoration: underline;
}

.help-content code {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    background: var(--bg-muted);
    padding: 0.15rem 0.35rem;
    border-radius: 4px;
}

.help-content pre {
    background: var(--color-primary);
    color: var(--text-inverse);
    padding: 1rem 1.25rem;
    border-radius: 10px;
    overflow-x: auto;
    margin-bottom: 1.5rem;
}

.help-content pre code {
    background: transparent;
    padding: 0;
    color: inherit;
}

@media (max-width: 900px) {
    .page-header {
        padding: 3.5rem 0;
    }

    .help-content-section {
        padding: 2.5rem 1.25rem 3rem;
    }

    .help-layout {
        flex-direction: column;
    }

    .help-sidebar {
        width: 100%;
        position: static;
        max-height: none;
    }

    .help-content {
        padding: 2rem 1.5rem;
    }
}

@media (max-width: 520px) {
    .page-header { padding-block: 2.5rem; }
    .page-header__title { font-size: clamp(2.1rem, 12vw, 2.75rem); }
    .page-header__description { font-size: 1rem; }
    .help-content-section { padding: 1.25rem 0.75rem 2.5rem; }
    .help-layout { gap: 1rem; }
    .help-sidebar,
    .help-content { padding: 1.25rem; border-radius: 12px; }
    .help-sidebar__topics { gap: 0.4rem; }
    .help-content ul,
    .help-content ol { margin-left: 1.1rem; }
}

@media (max-height: 560px) and (min-width: 901px) {
    .help-sidebar { position: static; max-height: none; }
}
