/* ==========================================
   HELP CENTER — light doc-style layout
   Sits between the site's dark nav/hero and dark footer.
   Scoped under .help-page to avoid touching global styles.
   ========================================== */

.help-page {
    --help-bg: #ffffff;
    --help-bg-alt: #f8fafc;
    --help-text: #1e293b;
    --help-text-muted: #64748b;
    --help-border: #e2e8f0;
    --help-accent: var(--primary-blue);
    --help-code-bg: #eef2f7;
}

/* Shorter hero than other pages — this is a reference page, not a pitch */
.help-hero {
    padding: 174px 20px 50px;
}

.help-hero p {
    max-width: 620px;
}

/* ---------- Layout shell ---------- */

.help-shell {
    background: var(--help-bg);
}

.help-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 48px 24px 96px;
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 56px;
    align-items: start;
}

/* ---------- Sidebar ---------- */

.help-sidebar {
    position: sticky;
    top: 164px;
    max-height: calc(100vh - 184px);
    overflow-y: auto;
    padding-right: 8px;
}

.help-sidebar-group {
    margin-bottom: 28px;
}

.help-sidebar-group h4 {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--help-text-muted);
    margin-bottom: 10px;
}

.help-sidebar-group ul {
    list-style: none;
    padding: 0;
    margin: 0;
    border-left: 2px solid var(--help-border);
}

.help-sidebar-group li a {
    display: block;
    padding: 6px 0 6px 14px;
    margin-left: -2px;
    border-left: 2px solid transparent;
    color: var(--help-text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    line-height: 1.4;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.help-sidebar-group li a:hover {
    color: var(--help-accent);
    border-left-color: var(--help-accent);
}

.help-sidebar-group li a.active {
    color: var(--help-accent);
    border-left-color: var(--help-accent);
    font-weight: 600;
}

/* ---------- Content ---------- */

.help-content {
    min-width: 0;
    color: var(--help-text);
}

.help-topic {
    margin-bottom: 64px;
    padding-top: 8px;
    scroll-margin-top: 164px;
}

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

.help-topic-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--help-accent);
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.2);
    padding: 3px 10px;
    border-radius: 999px;
    margin-bottom: 14px;
}

.help-topic h2 {
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--help-text);
    margin-bottom: 12px;
    scroll-margin-top: 164px;
}

.help-topic h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--help-text);
    margin: 28px 0 10px;
    scroll-margin-top: 164px;
}

.help-topic > p {
    color: var(--help-text-muted);
    line-height: 1.7;
    margin-bottom: 14px;
    max-width: 700px;
}

.help-topic ul,
.help-topic ol {
    color: var(--help-text-muted);
    line-height: 1.75;
    margin: 0 0 16px;
    padding-left: 22px;
    max-width: 700px;
}

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

.help-topic strong {
    color: var(--help-text);
}

.help-topic a {
    color: var(--help-accent);
    text-decoration: none;
    border-bottom: 1px solid rgba(59, 130, 246, 0.35);
}

.help-topic a:hover {
    border-bottom-color: var(--help-accent);
}

.help-divider {
    border: none;
    border-top: 1px solid var(--help-border);
    margin: 56px 0 0;
}

/* ---------- Callouts ---------- */

.help-callout {
    border: 1px solid var(--help-border);
    border-left: 3px solid var(--help-accent);
    background: var(--help-bg-alt);
    border-radius: 6px;
    padding: 14px 18px;
    margin: 18px 0;
    max-width: 700px;
    font-size: 0.92rem;
    color: var(--help-text);
    line-height: 1.6;
}

.help-callout strong {
    color: var(--help-text);
}

.help-callout.help-callout-role {
    border-left-color: #f59e0b;
}

/* ---------- Screenshot placeholder ---------- */

.help-screenshot {
    max-width: 700px;
    border: 1px dashed #94a3b8;
    border-radius: 8px;
    background: var(--help-bg-alt);
    color: var(--help-text-muted);
    padding: 40px 20px;
    text-align: center;
    font-size: 0.85rem;
    margin: 18px 0 24px;
}

.help-screenshot span {
    display: block;
}

.help-screenshot .help-screenshot-label {
    font-weight: 600;
    color: var(--help-text);
    margin-bottom: 4px;
}

.help-screenshot-img {
    display: block;
    max-width: 700px;
    width: 100%;
    height: auto;
    border: 1px solid var(--help-border);
    border-radius: 8px;
    margin: 18px 0 24px;
}

/* ---------- Role permission table ---------- */

.help-table-wrap {
    max-width: 700px;
    overflow-x: auto;
    margin: 18px 0 24px;
}

.help-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.help-table th,
.help-table td {
    text-align: left;
    padding: 10px 14px;
    border-bottom: 1px solid var(--help-border);
}

.help-table th {
    color: var(--help-text-muted);
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.help-table td {
    color: var(--help-text);
}

.help-check {
    color: #16a34a;
    font-weight: 700;
}

.help-cross {
    color: #cbd5e1;
    font-weight: 700;
}

/* ---------- Inline UI label chip ---------- */

.help-ui {
    display: inline-block;
    background: var(--help-code-bg);
    border: 1px solid var(--help-border);
    border-radius: 4px;
    padding: 1px 7px;
    font-size: 0.86em;
    color: var(--help-text);
    font-family: 'SF Mono', Menlo, Consolas, monospace;
}

/* ---------- Responsive ---------- */

@media (max-width: 1024px) {
    .help-container {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .help-sidebar {
        position: static;
        max-height: none;
        overflow-y: visible;
        border-bottom: 1px solid var(--help-border);
        padding-bottom: 24px;
    }

    .help-sidebar-group {
        display: inline-block;
        vertical-align: top;
        width: 47%;
        margin-right: 2%;
    }
}

@media (max-width: 640px) {
    .help-sidebar-group {
        width: 100%;
        margin-right: 0;
    }

    .help-container {
        padding: 32px 18px 64px;
    }

    .help-topic h2 {
        font-size: 1.4rem;
    }
}
