/* =========================================================
   Help / documentation hub — bento library
   ========================================================= */

.help-hero {
    padding: 34px 0 54px;
}

.help-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: 20px;
    align-items: stretch;
}

.help-hero-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 42px;
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background:
        radial-gradient(circle at 92% 6%, rgba(37, 99, 235, 0.08), transparent 35%),
        var(--surface);
    box-shadow: var(--shadow-sm);
}

.help-hero-copy .hero-title {
    max-width: 13ch;
    font-size: clamp(2.1rem, 4.1vw, 3.5rem);
    line-height: 1.07;
}

.help-hero-copy .hero-lead {
    max-width: 54ch;
    margin-top: 16px;
    color: var(--body);
    font-size: 15px;
    line-height: 1.76;
}

.search-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 30px;
    border-radius: var(--radius-xl);
    background:
        radial-gradient(circle at 88% 10%, rgba(124, 58, 237, 0.18), transparent 38%),
        radial-gradient(circle at 10% 92%, rgba(37, 99, 235, 0.3), transparent 42%),
        #0f172a;
    box-shadow: var(--shadow-md);
}

.search-card-label {
    margin-bottom: 14px;
    color: rgba(226, 232, 240, 0.72);
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 8px 8px 16px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.08);
}

.search-box i {
    color: rgba(226, 232, 240, 0.6);
    font-size: 14px;
}

.search-box input {
    flex: 1;
    min-width: 0;
    padding: 8px 0;
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 14px;
}

.search-box input::placeholder {
    color: rgba(226, 232, 240, 0.48);
}

.search-box input:focus {
    box-shadow: none;
}

.search-box button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--gradient);
    color: #fff;
    font-size: 12px;
    box-shadow: var(--shadow-blue);
}

.hot-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 16px;
}

.hot-label {
    color: rgba(226, 232, 240, 0.5);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.hot-tag {
    padding: 5px 9px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.06);
    color: rgba(226, 232, 240, 0.8);
    font-size: 10.5px;
    font-weight: 650;
    transition: background var(--fast), color var(--fast);
}

.hot-tag:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
}

/* Topic bento */
.topic-section {
    padding: 0 0 60px;
}

.topic-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
}

.topic-card {
    grid-column: span 2;
    display: flex;
    flex-direction: column;
    min-height: 190px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-xs);
    transition: transform var(--normal), box-shadow var(--normal), border-color var(--normal);
}

.topic-card:hover {
    transform: translateY(-3px);
    border-color: rgba(37, 99, 235, 0.22);
    box-shadow: var(--shadow-sm);
}

.topic-card:nth-child(4),
.topic-card:nth-child(5) {
    grid-column: span 3;
}

.topic-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 20px;
}

.topic-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 13px;
    background: var(--gradient-soft);
    color: var(--blue);
    font-size: 15px;
}

.topic-count {
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 10px;
}

.topic-card h2 {
    margin-bottom: 6px;
    font-size: 16px;
}

.topic-card p {
    color: var(--body);
    font-size: 12px;
    line-height: 1.65;
}

.topic-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
    padding-top: 16px;
    color: var(--blue);
    font-size: 11px;
    font-weight: 700;
}

.topic-link i {
    font-size: 9px;
    transition: transform var(--fast);
}

.topic-card:hover .topic-link i {
    transform: translateX(3px);
}

/* Guides layout */
.help-content-section {
    padding: 0 0 84px;
}

.help-layout {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

.help-sidebar {
    position: sticky;
    top: 108px;
}

.help-toc {
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-xs);
}

.help-toc-label {
    margin-bottom: 16px;
    color: var(--ink);
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 600;
}

.toc-group {
    margin-bottom: 17px;
}

.toc-group:last-child {
    margin-bottom: 0;
}

.toc-group-label {
    margin-bottom: 7px;
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 9.5px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.toc-link {
    display: block;
    padding: 5px 0 5px 9px;
    border-left: 2px solid var(--line);
    color: var(--body);
    font-size: 12px;
    line-height: 1.45;
    transition: color var(--fast), border-color var(--fast);
}

.toc-link:hover,
.toc-link.active {
    border-left-color: var(--blue);
    color: var(--blue);
}

.help-main {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.help-group {
    scroll-margin-top: 110px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-xs);
}

.help-group-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 16px;
    margin-bottom: 4px;
    border-bottom: 1px solid var(--line-soft);
}

.help-group-num {
    color: var(--blue);
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 600;
}

.help-group-title {
    font-family: var(--font-display);
    color: var(--ink);
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.help-group-count {
    margin-left: auto;
    padding: 3px 8px;
    border-radius: var(--radius-pill);
    background: var(--surface-soft);
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 9.5px;
}

.help-row {
    scroll-margin-top: 110px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 16px;
    align-items: start;
    padding: 19px 0;
    border-bottom: 1px solid var(--line-soft);
}

.help-row:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.help-row-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: var(--canvas);
    color: var(--blue);
    font-size: 14px;
    transition: background var(--fast), color var(--fast);
}

.help-row:hover .help-row-icon {
    background: var(--gradient);
    color: #fff;
}

.help-row h3 {
    margin-bottom: 3px;
    font-size: 14.5px;
}

.help-row p {
    color: var(--body);
    font-size: 12.5px;
    line-height: 1.65;
}

.help-row-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    margin-top: 4px;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--muted);
    font-size: 9px;
    transition: background var(--fast), color var(--fast), border-color var(--fast);
}

.help-row:hover .help-row-link {
    border-color: var(--blue);
    background: var(--blue);
    color: #fff;
}

/* CTA */
.help-cta-banner {
    padding: 0 0 90px;
}

.help-cta-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    padding: 34px 40px;
    border-radius: var(--radius-xl);
    background:
        radial-gradient(circle at 84% 20%, rgba(124, 58, 237, 0.3), transparent 42%),
        radial-gradient(circle at 12% 90%, rgba(37, 99, 235, 0.3), transparent 40%),
        #0f172a;
    color: #fff;
    box-shadow: var(--shadow-md);
}

.help-cta-copy h3 {
    margin-bottom: 6px;
    color: #fff;
    font-size: 20px;
}

.help-cta-copy p {
    color: rgba(226, 232, 240, 0.72);
    font-size: 13px;
}

/* Responsive */
@media (max-width: 1000px) {
    .help-hero-grid {
        grid-template-columns: 1fr;
    }

    .help-hero-copy {
        padding: 34px;
    }

    .topic-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .topic-card,
    .topic-card:nth-child(4),
    .topic-card:nth-child(5) {
        grid-column: span 1;
    }

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

    .help-sidebar {
        position: static;
    }

    .help-toc {
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 12px;
        padding: 18px;
    }

    .help-toc-label {
        grid-column: 1 / -1;
        margin-bottom: 0;
    }

    .toc-group {
        margin-bottom: 0;
    }
}

@media (max-width: 760px) {
    .help-toc {
        display: none;
    }

    .help-cta-inner {
        flex-direction: column;
        align-items: flex-start;
        padding: 28px;
    }
}

@media (max-width: 640px) {
    .help-hero {
        padding-top: 10px;
    }

    .help-hero-copy {
        padding: 26px 20px;
        border-radius: 24px;
    }

    .help-hero-copy .hero-title {
        font-size: clamp(1.95rem, 9vw, 2.6rem);
    }

    .search-card {
        padding: 24px 18px;
        border-radius: 24px;
    }

    .topic-grid {
        grid-template-columns: 1fr;
    }

    .topic-card {
        min-height: 0;
    }

    .help-group {
        padding: 18px;
    }

    .help-row {
        grid-template-columns: auto minmax(0, 1fr);
        gap: 12px;
    }

    .help-row-link {
        display: none;
    }
}
