/* ============================================================================
   Help center -- Helpjuice-style layout.
   Scoped via .rj-help-* classes; loaded only on /help and /help/{slug}.
   ============================================================================ */

/* -- Hero with search ---------------------------------------------------- */
.rj-help-hero {
    position: relative;
    background:
        radial-gradient(ellipse 70% 60% at 50% 0%, rgba(8, 145, 178, .15), transparent 70%),
        linear-gradient(180deg, #F8FAFC 0%, #ffffff 100%);
    padding: 5rem 0 4rem;
    text-align: center;
    border-bottom: 1px solid var(--rj-border);
}
.rj-help-hero-inner { max-width: 720px; margin: 0 auto; }
.rj-help-eyebrow {
    display: inline-block;
    text-transform: uppercase; letter-spacing: .14em;
    font-size: .8rem; font-weight: 700;
    color: var(--rj-primary);
    margin-bottom: .65rem;
}
.rj-help-h1 {
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    font-weight: 800;
    font-size: clamp(2rem, 4vw, 3rem);
    letter-spacing: -0.025em;
    color: var(--rj-ink);
    margin: 0 0 .75rem;
}
.rj-help-sub {
    color: var(--rj-muted);
    font-size: 1.05rem;
    margin-bottom: 1.75rem;
}

.rj-help-search {
    position: relative;
    max-width: 580px;
    margin: 0 auto;
}
.rj-help-search input {
    width: 100%;
    height: 56px;
    padding: 0 56px 0 52px;
    border-radius: 14px;
    border: 1px solid var(--rj-border);
    background: #fff;
    font-size: 1rem;
    color: var(--rj-ink);
    box-shadow: 0 12px 28px -12px rgba(15, 23, 42, .15);
    transition: border-color .15s ease, box-shadow .15s ease;
}
.rj-help-search input:focus {
    outline: none;
    border-color: var(--rj-primary);
    box-shadow: 0 0 0 4px rgba(8, 145, 178, .12), 0 12px 28px -12px rgba(15, 23, 42, .15);
}
.rj-help-search-icon {
    position: absolute;
    top: 50%; left: 18px; transform: translateY(-50%);
    width: 20px; height: 20px;
    color: var(--rj-muted);
    pointer-events: none;
}
.rj-help-kbd {
    position: absolute;
    top: 50%; right: 16px; transform: translateY(-50%);
    background: #F1F5F9;
    color: var(--rj-muted);
    border: 1px solid var(--rj-border);
    border-radius: 6px;
    padding: 2px 7px;
    font-family: ui-monospace, 'JetBrains Mono', monospace;
    font-size: .78rem;
    pointer-events: none;
}

/* -- Live results dropdown ----------------------------------------------- */
.rj-help-results {
    position: relative;
    max-width: 580px;
    margin: .5rem auto 0;
    background: #fff;
    border: 1px solid var(--rj-border);
    border-radius: 14px;
    box-shadow: 0 18px 40px -15px rgba(15, 23, 42, .25);
    max-height: 360px;
    overflow-y: auto;
    text-align: left;
    z-index: 5;
}
.rj-help-results[hidden] { display: none; }
.rj-help-results a {
    display: block;
    padding: .75rem 1rem;
    text-decoration: none;
    color: var(--rj-ink);
    border-bottom: 1px solid #F1F5F9;
    transition: background .12s ease;
}
.rj-help-results a:last-child { border-bottom: none; }
.rj-help-results a:hover,
.rj-help-results a.is-active {
    background: var(--rj-primary-50, #F0F9FF);
    color: var(--rj-primary);
}
.rj-help-results .t { font-weight: 600; font-size: .92rem; display: block; }
.rj-help-results .c {
    font-size: .75rem;
    color: var(--rj-muted);
    margin-top: 2px;
    text-transform: uppercase;
    letter-spacing: .08em;
}
.rj-help-results .empty {
    padding: 1.25rem 1rem;
    color: var(--rj-muted);
    font-size: .9rem;
    text-align: center;
}

/* -- Section spacing ----------------------------------------------------- */
.rj-help-section { padding: 4rem 0; }
.rj-help-section.alt { background: #F8FAFC; border-top: 1px solid var(--rj-border); border-bottom: 1px solid var(--rj-border); }
.rj-help-h2 {
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    font-weight: 800;
    font-size: clamp(1.4rem, 2.2vw, 1.75rem);
    letter-spacing: -0.02em;
    color: var(--rj-ink);
    margin: 0 0 1.5rem;
}

/* -- Category grid (top-of-page) ----------------------------------------- */
.rj-help-cat-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}
@media (min-width: 640px) { .rj-help-cat-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 992px) { .rj-help-cat-grid { grid-template-columns: repeat(4, 1fr); } }

.rj-help-cat {
    display: flex; gap: 1rem;
    background: #fff;
    border: 1px solid var(--rj-border);
    border-radius: 14px;
    padding: 1.25rem;
    text-decoration: none;
    color: var(--rj-ink);
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.rj-help-cat:hover {
    border-color: rgba(8, 145, 178, .35);
    box-shadow: 0 14px 28px -14px rgba(8, 145, 178, .25);
    transform: translateY(-2px);
}
.rj-help-cat .ic {
    width: 40px; height: 40px;
    border-radius: 10px;
    background: rgba(8, 145, 178, .10);
    color: var(--rj-primary);
    display: grid; place-items: center;
    flex-shrink: 0;
    box-shadow: inset 0 0 0 1px rgba(8, 145, 178, .2);
}
.rj-help-cat .ic svg { width: 20px; height: 20px; }
.rj-help-cat h3 { font-size: 1rem; font-weight: 700; margin: 0 0 .25rem; color: var(--rj-ink); }
.rj-help-cat .meta p { font-size: .82rem; color: var(--rj-muted); margin: 0 0 .5rem; line-height: 1.4; }
.rj-help-cat .count {
    font-size: .72rem; font-weight: 700;
    color: var(--rj-primary);
    text-transform: uppercase; letter-spacing: .08em;
}

/* "no match" state for category cards during search */
.rj-help-cat.is-dim { opacity: .35; }

/* -- Category groups + article list -------------------------------------- */
.rj-help-groups {
    display: grid; gap: 2rem;
}
.rj-help-group { scroll-margin-top: 88px; }
.rj-help-group .hd {
    display: flex; align-items: center; gap: .85rem;
    margin-bottom: 1rem;
    padding-bottom: .85rem;
    border-bottom: 1px solid var(--rj-border);
}
.rj-help-group .hd .ic {
    width: 36px; height: 36px;
    border-radius: 9px;
    background: rgba(8, 145, 178, .10);
    color: var(--rj-primary);
    display: grid; place-items: center;
    flex-shrink: 0;
    box-shadow: inset 0 0 0 1px rgba(8, 145, 178, .2);
}
.rj-help-group .hd .ic svg { width: 18px; height: 18px; }
.rj-help-group .hd h3 { font-size: 1.1rem; font-weight: 700; margin: 0; color: var(--rj-ink); }
.rj-help-group .hd p  { font-size: .82rem; color: var(--rj-muted); margin: 2px 0 0; }
.rj-help-group ul {
    list-style: none; padding: 0; margin: 0;
    display: grid; gap: .5rem;
}
@media (min-width: 768px) { .rj-help-group ul { grid-template-columns: 1fr 1fr; } }
.rj-help-group li a {
    display: flex; align-items: center; justify-content: space-between; gap: .5rem;
    padding: .75rem 1rem;
    background: #fff;
    border: 1px solid var(--rj-border);
    border-radius: 10px;
    text-decoration: none;
    color: var(--rj-ink);
    font-size: .92rem;
    transition: border-color .15s ease, transform .15s ease, background .15s ease;
}
.rj-help-group li a:hover {
    border-color: rgba(8, 145, 178, .4);
    background: rgba(8, 145, 178, .04);
}
.rj-help-group li a:hover .arr { transform: translateX(2px); color: var(--rj-primary); }
.rj-help-group li a .arr {
    width: 16px; height: 16px;
    color: var(--rj-muted);
    flex-shrink: 0;
    transition: transform .15s ease, color .15s ease;
}
.rj-help-group.is-dim { opacity: .35; }
.rj-help-group li.is-hide { display: none; }

/* "Still stuck?" band at the bottom of /help */
.rj-help-stuck {
    background: linear-gradient(135deg, #0891B2 0%, #0E7490 100%);
    color: #fff;
    padding: 2rem 2.25rem;
    border-radius: 18px;
    display: flex; flex-wrap: wrap; gap: 1.25rem;
    align-items: center; justify-content: space-between;
    box-shadow: 0 24px 50px -20px rgba(8, 145, 178, .35);
}
.rj-help-stuck h3 { font-size: 1.3rem; font-weight: 700; margin: 0 0 .35rem; }
.rj-help-stuck p  { margin: 0; color: rgba(255, 255, 255, .85); max-width: 50ch; }
.rj-help-stuck .btn {
    background: #FBBF24; color: #0F172A; border: none;
    font-weight: 700;
}
.rj-help-stuck .btn:hover { background: #F59E0B; color: #0F172A; }

/* ============================================================================
   Article page
   ============================================================================ */
.rj-help-article-wrap { padding: 2.5rem 0 4rem; }

.rj-help-crumbs {
    font-size: .85rem;
    color: var(--rj-muted);
    margin-bottom: 1.5rem;
}
.rj-help-crumbs a { color: var(--rj-muted); text-decoration: none; }
.rj-help-crumbs a:hover { color: var(--rj-primary); }
.rj-help-crumbs span { margin: 0 .5rem; }
.rj-help-crumbs [aria-current="page"] { color: var(--rj-ink); font-weight: 600; margin: 0; }

.rj-help-article-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}
@media (min-width: 992px) {
    .rj-help-article-grid { grid-template-columns: minmax(0, 1fr) 280px; gap: 3rem; }
}

.rj-help-article header { margin-bottom: 2rem; }
.rj-help-article-cat {
    display: inline-flex; align-items: center; gap: .5rem;
    font-size: .78rem; font-weight: 700;
    color: var(--rj-primary);
    text-transform: uppercase; letter-spacing: .12em;
    margin-bottom: .85rem;
}
.rj-help-article-cat .ic { width: 16px; height: 16px; display: inline-grid; place-items: center; }
.rj-help-article-cat .ic svg { width: 16px; height: 16px; }
.rj-help-article header h1 {
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    font-weight: 800;
    font-size: clamp(1.75rem, 3.2vw, 2.5rem);
    line-height: 1.15;
    letter-spacing: -0.025em;
    color: var(--rj-ink);
    margin: 0 0 .85rem;
}
.rj-help-article-meta {
    display: flex; gap: .65rem;
    font-size: .85rem;
    color: var(--rj-muted);
}

/* Rendered markdown body */
.rj-help-body { font-size: 1rem; line-height: 1.7; color: var(--rj-ink); }
.rj-help-body h2 {
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    font-size: 1.35rem; font-weight: 700;
    margin: 2rem 0 .75rem;
    color: var(--rj-ink);
}
.rj-help-body h3 { font-size: 1.1rem; font-weight: 700; margin: 1.5rem 0 .5rem; }
.rj-help-body p, .rj-help-body li { color: #1F2937; }
.rj-help-body a { color: var(--rj-primary); }
.rj-help-body code {
    background: #F1F5F9;
    padding: 2px 6px; border-radius: 5px;
    font-size: .88em;
    font-family: ui-monospace, 'JetBrains Mono', monospace;
}
.rj-help-body pre {
    background: #0F172A;
    color: #E2E8F0;
    padding: 1rem 1.25rem;
    border-radius: 10px;
    overflow-x: auto;
    margin: 1rem 0;
}
.rj-help-body pre code { background: transparent; color: inherit; padding: 0; font-size: .85em; }
.rj-help-body blockquote {
    border-left: 3px solid var(--rj-primary);
    background: rgba(8, 145, 178, .06);
    padding: .75rem 1rem;
    margin: 1rem 0;
    border-radius: 0 10px 10px 0;
    color: #1F2937;
}
.rj-help-body table {
    width: 100%; border-collapse: collapse; margin: 1rem 0;
    font-size: .92rem;
}
.rj-help-body th, .rj-help-body td {
    border: 1px solid var(--rj-border);
    padding: 8px 12px; text-align: left;
}
.rj-help-body th { background: #F8FAFC; font-weight: 700; }

/* Was this article helpful */
.rj-help-feedback {
    margin-top: 3rem;
    padding: 1.5rem 1.75rem;
    background: #F8FAFC;
    border: 1px solid var(--rj-border);
    border-radius: 14px;
    text-align: center;
}
.rj-help-feedback .q { font-weight: 700; color: var(--rj-ink); margin-bottom: .85rem; }
.rj-help-feedback .actions { display: flex; gap: .65rem; justify-content: center; }
.rj-help-vote {
    display: inline-flex; align-items: center; gap: .5rem;
    padding: .55rem 1.15rem;
    background: #fff;
    border: 1px solid var(--rj-border);
    border-radius: 10px;
    color: var(--rj-ink);
    font-weight: 600;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.rj-help-vote svg { width: 18px; height: 18px; }
.rj-help-vote:hover {
    border-color: var(--rj-primary);
    color: var(--rj-primary);
    background: rgba(8, 145, 178, .04);
}
.rj-help-vote.is-picked {
    border-color: var(--rj-primary);
    background: var(--rj-primary);
    color: #fff;
}
.rj-help-feedback.is-done .actions { display: none; }
.rj-help-feedback.is-done .q { display: none; }
.rj-help-feedback.is-done .thanks { display: block !important; color: var(--rj-primary); font-weight: 600; }

/* Related strip */
.rj-help-related { margin-top: 3rem; }
.rj-help-related h2 {
    font-size: 1.2rem; font-weight: 700;
    margin: 0 0 1rem;
    color: var(--rj-ink);
}
.rj-help-related .grid {
    display: grid; gap: .85rem;
    grid-template-columns: 1fr;
}
@media (min-width: 768px) { .rj-help-related .grid { grid-template-columns: repeat(3, 1fr); } }
.rj-help-related a {
    display: block;
    background: #fff;
    border: 1px solid var(--rj-border);
    border-radius: 10px;
    padding: 1rem 1.15rem;
    text-decoration: none;
    color: var(--rj-ink);
    transition: border-color .15s ease, transform .15s ease;
}
.rj-help-related a:hover {
    border-color: rgba(8, 145, 178, .4);
    transform: translateY(-2px);
}
.rj-help-related .cat {
    font-size: .7rem; font-weight: 700;
    color: var(--rj-primary);
    text-transform: uppercase; letter-spacing: .08em;
    margin-bottom: .35rem;
}
.rj-help-related .t { font-weight: 600; font-size: .95rem; line-height: 1.35; }

/* Sidebar */
.rj-help-sidebar { display: flex; flex-direction: column; gap: 1.25rem; }
@media (min-width: 992px) {
    .rj-help-sidebar { position: sticky; top: 96px; align-self: start; max-height: calc(100vh - 120px); overflow-y: auto; }
}
.rj-help-sidebar-card {
    background: #fff;
    border: 1px solid var(--rj-border);
    border-radius: 12px;
    padding: 1.15rem 1.25rem;
}
.rj-help-sidebar-card .hd {
    display: flex; align-items: center; gap: .55rem;
    font-size: .78rem; font-weight: 700;
    color: var(--rj-primary);
    text-transform: uppercase; letter-spacing: .12em;
    padding-bottom: .85rem;
    border-bottom: 1px solid var(--rj-border);
    margin-bottom: .85rem;
}
.rj-help-sidebar-card .hd .ic svg { width: 16px; height: 16px; }
.rj-help-sidebar-card ul { list-style: none; padding: 0; margin: 0; }
.rj-help-sidebar-card li {
    padding: .45rem 0;
    border-bottom: 1px solid #F1F5F9;
}
.rj-help-sidebar-card li:last-child { border-bottom: none; }
.rj-help-sidebar-card li a {
    color: #374151; font-size: .9rem; text-decoration: none;
    display: block;
    transition: color .12s ease, padding-left .12s ease;
}
.rj-help-sidebar-card li a:hover { color: var(--rj-primary); padding-left: 4px; }
.rj-help-sidebar-card li.is-current span {
    color: var(--rj-primary); font-weight: 700; font-size: .9rem;
    display: block;
    border-left: 3px solid var(--rj-primary);
    padding-left: .65rem; margin-left: -.65rem;
}
.rj-help-sidebar-cta { background: linear-gradient(135deg, #0F172A, #1E293B); color: #fff; border: none; }
.rj-help-sidebar-cta h4 { font-size: 1rem; font-weight: 700; margin: 0 0 .35rem; }
.rj-help-sidebar-cta p  { font-size: .85rem; color: rgba(255, 255, 255, .75); margin: 0 0 .85rem; }
.rj-help-sidebar-cta .btn { background: #FBBF24; color: #0F172A; border: none; font-weight: 700; }
.rj-help-sidebar-cta .btn:hover { background: #F59E0B; color: #0F172A; }
