/* Shared styles for tutorial home pages and documentation article pages. */
:root {
    --help-ink: #172033;
    --help-muted: #667085;
    --help-blue: #1f6feb;
    --help-green: #17865f;
    --help-orange: #f28c28;
    --help-red: #d9544f;
    --help-line: rgba(23, 32, 51, 0.12);
    --help-soft: #f6f8fc;
    --help-panel: #ffffff;
    --docs-ink: var(--help-ink);
    --docs-muted: var(--help-muted);
    --docs-blue: var(--help-blue);
    --docs-green: var(--help-green);
    --docs-orange: var(--help-orange);
    --docs-red: var(--help-red);
    --docs-line: var(--help-line);
    --docs-soft: var(--help-soft);
    --docs-panel: var(--help-panel);
}

html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

body {
    color: var(--help-ink);
    background: var(--help-soft);
    font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

a {
    text-decoration: none;
}

.help-home-topbar,
.docs-topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    border-bottom: 1px solid var(--help-line);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(14px);
}

.help-home-topbar-inner,
.docs-topbar-inner {
    display: grid;
    grid-template-columns: auto minmax(180px, 1fr) auto;
    gap: 22px;
    align-items: center;
    width: 100%;
    min-height: 76px;
}

.docs-topbar-inner {
    min-height: 72px;
}

.help-home-brand,
.docs-brand {
    display: inline-flex;
    min-width: 0;
    align-items: center;
    gap: 12px;
    color: var(--help-ink);
    font-weight: 800;
    white-space: nowrap;
}

.help-home-brand img,
.docs-brand img {
    height: 34px;
    width: auto;
}

.docs-brand img {
    height: 32px;
}

.help-home-brand span,
.docs-brand span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.help-home-actions,
.docs-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
    min-width: 0;
}

.help-home-actions a,
.docs-actions a {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    border-radius: 6px;
    color: var(--help-ink);
    font-weight: 700;
    white-space: nowrap;
}

.help-home-actions .primary,
.docs-actions .primary {
    color: #fff;
    background: var(--help-blue);
}

.help-home-hero {
    padding: 76px 0 70px;
    text-align: center;
    background:
        radial-gradient(circle at 18% 8%, rgba(31, 111, 235, 0.14), transparent 30%),
        radial-gradient(circle at 82% 18%, rgba(23, 134, 95, 0.12), transparent 28%),
        #ffffff;
    border-bottom: 1px solid var(--help-line);
}

.help-home-hero h1 {
    margin: 0;
    color: var(--help-ink);
    font-size: clamp(38px, 6vw, 64px);
    line-height: 1.08;
    font-weight: 800;
    letter-spacing: 0;
}

.help-home-hero p {
    max-width: 720px;
    margin: 18px auto 0;
    color: var(--help-muted);
    font-size: 18px;
    line-height: 1.8;
}

.help-search-wrap,
.docs-search {
    position: relative;
    min-width: 0;
}

.help-search-wrap {
    display: block;
    max-width: 760px;
    margin: 34px auto 0;
}

.help-search-wrap i,
.docs-search i {
    position: absolute;
    left: 22px;
    top: 50%;
    z-index: 1;
    color: var(--help-muted);
    transform: translateY(-50%);
}

.docs-search i {
    left: 18px;
}

.help-search-wrap input,
.docs-search input {
    width: 100%;
    min-width: 0;
    border: 1px solid var(--help-line);
    border-radius: 8px;
    color: var(--help-ink);
    background: #fff;
    outline: none;
    text-overflow: ellipsis;
}

.help-search-wrap input {
    height: 58px;
    padding: 0 24px 0 56px;
    box-shadow: 0 18px 46px rgba(23, 32, 51, 0.08);
}

.docs-search input {
    height: 46px;
    padding: 0 18px 0 46px;
}

.help-keywords {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 18px;
}

.help-keywords a {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    padding: 0 14px;
    border: 1px solid var(--help-line);
    border-radius: 999px;
    color: var(--help-muted);
    background: #fff;
    font-size: 14px;
}

.help-keywords a:hover {
    color: var(--help-blue);
    background: rgba(31, 111, 235, 0.06);
}

.help-home-section {
    padding: 58px 0;
}

.help-section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}

.help-section-head h2 {
    margin: 0;
    color: var(--help-ink);
    font-size: clamp(26px, 4vw, 36px);
    font-weight: 800;
}

.help-section-head p {
    max-width: 560px;
    margin: 8px 0 0;
    color: var(--help-muted);
    line-height: 1.75;
}

.recommend-grid,
.category-grid {
    display: grid;
    gap: 20px;
}

.recommend-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

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

.recommend-card,
.category-card,
.docs-nav,
.docs-toc-card,
.docs-card,
.docs-category,
.docs-article,
.article-nav {
    border: 1px solid var(--help-line);
    border-radius: 8px;
    background: var(--help-panel);
    box-shadow: 0 14px 34px rgba(23, 32, 51, 0.06);
}

.recommend-card {
    display: grid;
    min-height: 168px;
    padding: 24px;
    color: var(--help-ink);
}

.recommend-card i,
.category-icon,
.docs-category i {
    display: inline-flex;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    border-radius: 50%;
    color: #fff;
    background: var(--help-blue);
}

.category-icon {
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
    margin-bottom: 0;
}

.recommend-card:nth-child(2) i,
.category-card:nth-child(2) .category-icon,
.docs-category:nth-child(2) i {
    background: var(--help-green);
}

.recommend-card:nth-child(3) i,
.category-card:nth-child(3) .category-icon,
.docs-category:nth-child(3) i {
    background: var(--help-orange);
}

.category-card:nth-child(4) .category-icon,
.docs-category:nth-child(4) i {
    background: var(--help-red);
}

.recommend-card h3,
.category-card h3,
.docs-category h3 {
    margin: 0 0 8px;
    color: var(--help-ink);
    font-size: 20px;
    font-weight: 800;
    line-height: 1.35;
}

.recommend-card p,
.category-card p,
.docs-category p {
    margin: 0;
    color: var(--help-muted);
    font-size: 14px;
    line-height: 1.7;
}

.category-card {
    padding: 26px;
}

.category-card-head {
    display: flex;
    gap: 14px;
    align-items: center;
    margin-bottom: 18px;
}

.article-list {
    display: grid;
    gap: 0;
}

.article-list a {
    display: flex;
    min-height: 42px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-radius: 6px;
    color: var(--help-muted);
    line-height: 1.45;
}

.article-list a:hover {
    color: var(--help-blue);
    background: rgba(31, 111, 235, 0.08);
}

.article-list i {
    flex: 0 0 auto;
    font-size: 13px;
}

.docs-hero {
    padding: 58px 0 36px;
    background:
        linear-gradient(135deg, rgba(31, 111, 235, 0.1), rgba(23, 134, 95, 0.08)),
        #fff;
    border-bottom: 1px solid var(--help-line);
}

.docs-hero h1 {
    margin: 0;
    color: var(--help-ink);
    font-size: clamp(34px, 5vw, 56px);
    line-height: 1.12;
    font-weight: 800;
    letter-spacing: 0;
}

.docs-hero p {
    max-width: 760px;
    margin: 18px 0 0;
    color: var(--help-muted);
    font-size: 18px;
    line-height: 1.8;
}

.docs-layout {
    display: grid;
    grid-template-columns: minmax(220px, 260px) minmax(0, 1fr) minmax(180px, 220px);
    gap: 28px;
    min-width: 0;
    padding: 36px 0 72px;
}

.docs-sidebar,
.docs-toc {
    position: sticky;
    top: 92px;
    align-self: start;
}

.docs-nav,
.docs-toc-card {
    padding: 16px;
}

.docs-nav strong,
.docs-toc-card strong {
    display: block;
    margin-bottom: 10px;
    color: var(--help-ink);
    font-size: 14px;
}

.docs-nav a,
.docs-toc-card a {
    display: block;
    padding: 9px 10px;
    border-radius: 6px;
    color: var(--help-muted);
    font-size: 14px;
    line-height: 1.45;
}

.docs-nav a.active,
.docs-nav a:hover,
.docs-toc-card a:hover {
    color: var(--help-blue);
    background: rgba(31, 111, 235, 0.08);
}

.docs-nav-group {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--help-line);
}

.docs-content,
.docs-card,
.docs-article {
    min-width: 0;
}

.docs-card,
.docs-article {
    padding: 38px;
}

.docs-card {
    padding: 28px;
}

.docs-card h2,
.docs-article h2 {
    margin: 42px 0 14px;
    color: var(--help-ink);
    font-size: 26px;
    font-weight: 800;
}

.docs-card h2 {
    margin-top: 0;
    font-size: 28px;
}

.docs-article h1 {
    margin: 0;
    color: var(--help-ink);
    font-size: clamp(32px, 5vw, 48px);
    line-height: 1.15;
    font-weight: 800;
    letter-spacing: 0;
}

.docs-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 18px;
    color: var(--help-muted);
    font-size: 14px;
    line-height: 1.5;
}

.docs-breadcrumb a {
    color: var(--help-muted);
}

.docs-breadcrumb a:hover {
    color: var(--help-blue);
}

.docs-breadcrumb span:last-child {
    color: var(--help-ink);
    font-weight: 700;
}

.docs-card p,
.docs-article p,
.docs-article li {
    color: var(--help-muted);
    line-height: 1.85;
}

.article-meta {
    margin: 14px 0 0;
    color: var(--help-muted);
    font-size: 14px;
}

.article-callout {
    margin: 28px 0;
    padding: 18px 20px;
    border-left: 4px solid var(--help-blue);
    border-radius: 8px;
    background: rgba(31, 111, 235, 0.08);
}

.article-steps {
    margin: 18px 0 0;
    padding-left: 20px;
}

.docs-category-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 22px;
}

.docs-category {
    display: block;
    min-height: 172px;
    padding: 24px;
    color: var(--help-ink);
}

.article-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 20px;
    padding: 20px;
}

.article-nav a {
    display: flex;
    min-height: 54px;
    align-items: center;
    padding: 12px 14px;
    border-radius: 6px;
    color: var(--help-blue);
    background: rgba(31, 111, 235, 0.06);
    font-weight: 800;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.article-nav a:hover {
    background: rgba(31, 111, 235, 0.12);
}

.docs-topbar *,
.docs-layout *,
.article-nav * {
    min-width: 0;
}

.docs-article,
.docs-article h1,
.docs-article h2,
.docs-article p,
.docs-article li {
    overflow-wrap: anywhere;
}

.docs-menu-toggle {
    display: none;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 14px;
    border: 1px solid var(--help-line);
    border-radius: 8px;
    background: #fff;
    color: var(--help-ink);
    font-weight: 800;
}

.docs-menu-icon,
.docs-menu-icon::before,
.docs-menu-icon::after {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
}

.docs-menu-icon {
    position: relative;
    flex: 0 0 auto;
}

.docs-menu-icon::before,
.docs-menu-icon::after {
    content: "";
    position: absolute;
    left: 0;
}

.docs-menu-icon::before {
    top: -6px;
}

.docs-menu-icon::after {
    top: 6px;
}

.docs-menu-label {
    font-size: 14px;
}

.docs-mobile-menu-bar {
    display: none;
    border-bottom: 1px solid var(--help-line);
    background: #fff;
}

.docs-mobile-menu-bar .container {
    display: flex;
    align-items: center;
    min-height: 58px;
}

.docs-mobile-overlay {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: none;
    background: rgba(15, 23, 42, 0.42);
}

.docs-mobile-overlay.is-open {
    display: block;
}

.docs-mobile-drawer {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 90;
    width: min(86vw, 340px);
    height: 100vh;
    padding: 22px 18px;
    overflow-y: auto;
    background: #fff;
    box-shadow: 28px 0 70px rgba(15, 23, 42, 0.24);
    transform: translateX(-104%);
    transition: transform 0.22s ease;
}

.docs-mobile-drawer.is-open {
    transform: translateX(0);
}

.docs-drawer-open {
    overflow: hidden;
}

.docs-mobile-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.docs-mobile-drawer-head strong {
    color: var(--help-ink);
    font-size: 18px;
}

.docs-mobile-close {
    width: 38px;
    height: 38px;
    border: 1px solid var(--help-line);
    border-radius: 8px;
    background: #fff;
    color: var(--help-ink);
    font-size: 24px;
    line-height: 1;
}

.docs-mobile-drawer .docs-nav {
    border: 0;
    box-shadow: none;
    padding: 0;
}

@media (max-width: 1199px) {
    .docs-layout {
        grid-template-columns: minmax(220px, 240px) minmax(0, 1fr);
    }

    .docs-toc {
        display: none;
    }

    .docs-topbar-inner {
        gap: 14px;
    }
}

@media (max-width: 991px) {
    .help-home-topbar-inner,
    .recommend-grid,
    .category-grid,
    .docs-category-grid,
    .article-nav {
        grid-template-columns: 1fr;
    }

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

    .docs-menu-toggle {
        display: inline-flex;
    }

    .docs-mobile-menu-bar {
        display: block;
    }

    .docs-topbar .docs-search,
    .docs-topbar .docs-actions,
    .docs-layout > .docs-sidebar {
        display: none;
    }

    .docs-layout {
        grid-template-columns: minmax(0, 1fr);
        padding-left: 0;
        padding-right: 0;
    }

    .docs-sidebar {
        position: static;
    }

    .help-home-actions,
    .docs-actions {
        justify-content: flex-start;
    }

    .help-section-head {
        display: block;
    }
}

@media (max-width: 575px) {
    .help-home-hero {
        padding: 52px 0 46px;
    }

    .help-search-wrap input {
        height: 52px;
    }

    .category-card,
    .recommend-card,
    .docs-article,
    .docs-card {
        padding: 22px;
    }

    .docs-hero {
        padding: 42px 0 28px;
    }

    .docs-hero h1,
    .docs-article h1 {
        font-size: 32px;
    }
}
