/* Help page layout and UX */

.skip-link {
    position: absolute;
    top: -100px;
    left: 24px;
    padding: 12px 20px;
    background: var(--text-primary);
    color: white;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    border-radius: 8px;
    z-index: 1000;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 24px;
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.help-page {
    padding: 100px 0 80px;
    min-height: 60vh;
}

.help-container {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header and quick actions */

.help-header {
    text-align: center;
    margin-bottom: 48px;
}

.help-title {
    font-size: 36px;
    font-weight: 600;
    letter-spacing: -0.5px;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.help-lead {
    font-size: 18px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 28px;
}

.help-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.help-quick-btn {
    display: inline-flex;
    align-items: center;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.help-quick-btn--primary {
    background: var(--text-primary);
    color: white;
}

.help-quick-btn--primary:hover {
    background: #000;
    transform: translateY(-1px);
}

.help-quick-btn:not(.help-quick-btn--primary) {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.help-quick-btn:not(.help-quick-btn--primary):hover {
    border-color: var(--text-primary);
    background: var(--bg-primary);
}

/* Table of contents */

.help-toc {
    margin-bottom: 48px;
    padding: 24px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.help-toc-title {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.help-toc-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 8px 24px;
}

.help-toc-list a {
    font-size: 14px;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 4px 0;
    display: block;
    border-radius: 4px;
    transition: color 0.2s ease;
}

.help-toc-list a:hover {
    color: var(--text-primary);
}

/* Sections */

.help-section {
    margin-bottom: 48px;
}

.help-section-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--border);
}

/* Accordion (details/summary) */

.help-accordion {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.help-details {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.help-details:hover {
    border-color: var(--text-tertiary);
}

.help-details[open] {
    border-color: var(--text-primary);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.help-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    list-style: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

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

.help-summary::after {
    content: '+';
    font-size: 20px;
    font-weight: 400;
    color: var(--text-tertiary);
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.help-details[open] .help-summary::after {
    transform: rotate(45deg);
}

.help-summary:hover {
    background: var(--bg-secondary);
}

.help-details-content {
    padding: 0 20px 20px;
}

.help-details-content p,
.help-details-content ul,
.help-details-content ol {
    margin: 0 0 12px;
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.7;
}

.help-details-content p:first-child,
.help-details-content ul:first-child,
.help-details-content ol:first-child {
    margin-top: 0;
}

.help-details-content ul,
.help-details-content ol {
    padding-left: 24px;
}

.help-details-content li {
    margin-bottom: 6px;
}

.help-details-content a {
    color: var(--text-primary);
    text-decoration: underline;
}

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

.help-note {
    font-size: 14px !important;
    color: var(--text-tertiary) !important;
    margin-top: 12px !important;
}

/* CTA block */

.help-cta {
    text-align: center;
    padding: 40px 32px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 16px;
    margin-top: 48px;
}

.help-cta-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.help-cta-text {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.5;
}

.help-cta-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

/* Responsive */

@media (max-width: 768px) {
    .help-page {
        padding: 80px 0 60px;
    }

    .help-container {
        padding: 0 16px;
    }

    .help-title {
        font-size: 28px;
    }

    .help-lead {
        font-size: 16px;
    }

    .help-toc-list {
        grid-template-columns: 1fr;
    }

    .help-summary {
        padding: 16px 18px;
        font-size: 15px;
    }

    .help-details-content {
        padding: 0 18px 18px;
    }

    .help-cta {
        padding: 32px 24px;
    }
}

@media (max-width: 480px) {
    .help-quick-actions {
        flex-direction: column;
    }

    .help-quick-btn {
        justify-content: center;
    }

    .help-cta-actions {
        flex-direction: column;
    }

    .help-cta-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Print: help page */
@media print {
    .navbar,
    .footer,
    .back-to-top,
    .skip-link,
    .help-quick-actions,
    .help-cta-actions {
        display: none !important;
    }

    .help-page {
        padding: 0;
    }

    .help-container {
        max-width: 100%;
    }

    .help-details {
        border: 1px solid #ccc;
    }

    .help-details[open],
    .help-details {
        display: block;
    }

    .help-details[open] .help-details-content,
    .help-details .help-details-content {
        display: block !important;
    }

    .help-summary {
        cursor: default;
    }

    .help-summary::after {
        content: none;
    }

    body {
        background: #fff;
        color: #000;
    }

    .help-title,
    .help-section-title {
        color: #000;
    }

    .help-lead,
    .help-details-content,
    .help-details-content p,
    .help-details-content li {
        color: #333;
    }

    .help-toc {
        break-inside: avoid;
    }

    .help-section {
        break-inside: avoid;
    }

    .help-details {
        break-inside: avoid;
    }
}
