/* 帮助中心：搜索入口 + 分类卡片，文章页为左侧目录 */

html:has(.hc),
body.page-helpcenter {
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden;
    background: #F4F7FD !important;
}

body.page-helpcenter,
body.page-helpcenter .site-main {
    background: #F4F7FD !important;
    text-align: left;
}

body.page-helpcenter .header,
body.page-helpcenter .container {
    min-width: 0 !important;
    max-width: 100% !important;
}

body.page-helpcenter .header-spacer {
    height: 72px;
    margin: 0 !important;
    background: transparent;
}

.hc {
    --blue: #2f7bff;
    --ink: #333;
    --text: #4e5969;
    --muted: #999;
    --line: #e6eeff;
    --card: #fff;
    position: relative;
    color: var(--ink);
    font-size: 14px;
    line-height: 1.7;
}

.hc-scene { display: none; }

.hc *,
.hc *::before,
.hc *::after { box-sizing: border-box; }

.hc a { color: inherit; text-decoration: none; }
.hc button, .hc input { font: inherit; }

.hc-wrap {
    width: min(1240px, calc(100% - 48px));
    margin: 0 auto;
}

.hc-hub {
    position: relative;
    z-index: 1;
    margin-top: -72px;
    background: transparent;
}

.hc-hero {
    background: transparent;
    padding: 128px 0 28px;
    text-align: center;
}

.hc-hero h1 {
    margin: 0;
    font-size: 30px;
    font-weight: 700;
    letter-spacing: 0;
    color: #333;
}

.hc-hero p {
    margin: 14px 0 0;
    color: #999;
    font-size: 15px;
}

.hc-search {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    width: min(700px, 100%);
    height: 58px;
    margin: 28px auto 0;
    padding: 0 8px 0 18px;
    background: #fff;
    border: 1px solid #d5deea;
    border-radius: 10px;
    box-shadow: none;
}

.hc-search__ico {
    flex: 0 0 auto;
    color: #b0b8c6;
    display: grid;
    place-items: center;
}

.hc-search input {
    flex: 1 1 auto;
    min-width: 0;
    height: 44px;
    border: 0;
    outline: none;
    background: transparent;
    color: #111;
    font-size: 16px;
}

.hc-search input::placeholder { color: #c0c6d0; }

.hc-search button {
    flex: 0 0 auto;
    width: 96px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: #2f7bff;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.hc-search button:hover { background: #1d6cf0; }

.hc-hot {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0 0;
    padding: 0;
    list-style: none;
}

.hc-hot a {
    display: inline-flex;
    align-items: center;
    height: 30px;
    padding: 0 12px;
    border-radius: 6px;
    background: #fff;
    color: #999;
    font-size: 14px;
}

.hc-hot a:hover { color: var(--blue); }

.hc-board {
    background: transparent;
    padding: 8px 0 20px;
}

.hc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    padding: 18px 0 8px;
}

.hc-card {
    --ico: #2f7bff;
    position: relative;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    padding: 26px 32px 28px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .06);
    transition: transform .25s, box-shadow .25s, border-color .25s;
}

.hc-card:hover {
    z-index: 1;
    transform: translateY(-5px);
    border-color: #c5dcff;
    box-shadow: 0 16px 36px rgba(47, 123, 255, .14);
}

.hc-card--start { --ico: #f0a020; }
.hc-card--product { --ico: #2f7bff; }
.hc-card--faq { --ico: #7b6cf0; }
.hc-card--dev { --ico: #e15b9c; }
.hc-card--api { --ico: #2eae7a; }
.hc-card--sdk { --ico: #f06a45; }

.hc-card__head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.hc-card__head h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: #333;
}

.hc-ico {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    color: var(--ico);
}

.hc-ico svg { width: 24px; height: 24px; }

.hc-more {
    margin-left: auto;
    height: 26px;
    padding: 0 12px;
    border-radius: 12px;
    background: #e8efff;
    color: #2f7bff;
    font-size: 13px;
    line-height: 26px;
    white-space: nowrap;
}

.hc-more:hover { background: #dce7ff; }

.hc-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px 16px;
}

.hc-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 8px 16px;
    border: 1px solid #e3ebff;
    border-radius: 10px;
    color: #999;
    text-align: center;
    background: #fff;
    font-size: 15px;
    transition: border-color .15s, color .15s, background .15s;
}

.hc-links a:hover {
    border-color: #c5d4ff;
    color: #2f7bff;
    background: #f8faff;
}

.hc-results {
    display: none;
    padding: 8px 0 36px;
}

.hc.is-search .hc-grid { display: none; }
.hc.is-search .hc-results { display: block; }

.hc-results__meta {
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 13px;
}

.hc-results a {
    display: block;
    margin-bottom: 10px;
    padding: 16px 18px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
}

.hc-results a:hover { border-color: #c5d8ff; }
.hc-results strong { display: block; font-size: 15px; color: var(--ink); }
.hc-results span { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.hc-results em { font-style: normal; color: var(--blue); }

.hc-empty {
    padding: 36px 16px;
    text-align: center;
    color: var(--muted);
    background: #fff;
    border-radius: 12px;
}

.hc-cta {
    text-align: center;
    padding: 48px 0 72px;
}

.hc-cta h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
}

.hc-cta p {
    margin: 10px auto 0;
    max-width: 520px;
    color: var(--muted);
}

.hc-cta__actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 18px;
}

.hc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    padding: 0 22px;
    border: 0;
    border-radius: 8px;
    background: #2f7bff;
    color: #fff !important;
    font-weight: 600;
    cursor: pointer;
}

.hc-btn:hover { background: #1d6cf0; }

.hc-btn--ghost {
    background: #fff;
    color: var(--ink) !important;
    border: 1px solid #d7e2f0;
}

.hc-btn--ghost:hover,
.hc-btn--ghost:focus,
.hc-btn--ghost:active {
    background: #f4f8ff;
    border-color: #b9cdf0;
    color: var(--blue) !important;
}

.hc.is-doc .hc-hub { display: none; }

/* article */
.hc-doc { display: none; position: relative; z-index: 1; padding: 28px 0 64px; }
.hc.is-doc .hc-doc { display: block; }

.hc-doc__grid {
    display: grid;
    grid-template-columns: 248px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}

.hc-side {
    position: sticky;
    top: 88px;
    max-height: calc(100vh - 104px);
    overflow: auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 28px rgba(36, 70, 130, .08);
}

.hc-group + .hc-group { border-top: 1px solid #eef2f8; }

.hc-group__btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 14px 16px;
    border: 0;
    background: transparent;
    color: var(--ink);
    font-size: 14px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
}

.hc-group__btn::after {
    content: "";
    width: 7px;
    height: 7px;
    border-right: 1.5px solid #86909c;
    border-bottom: 1.5px solid #86909c;
    transform: rotate(-45deg);
    margin-top: 3px;
}

.hc-group.is-open .hc-group__btn::after {
    transform: rotate(45deg);
    margin-top: -3px;
}

.hc-group.is-current .hc-group__btn { color: var(--blue); }

.hc-group__list {
    display: none;
    margin: 0;
    padding: 0 8px 10px;
    list-style: none;
}

.hc-group.is-open .hc-group__list { display: block; }

.hc-group__list a {
    display: block;
    padding: 8px 12px;
    border-radius: 8px;
    color: var(--text);
    font-size: 13px;
}

.hc-group__list a:hover { background: #f4f8ff; color: var(--blue); }
.hc-group__list a.is-on { background: #eef4ff; color: var(--blue); font-weight: 600; }

.hc-crumb {
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 13px;
}

.hc-crumb a:hover { color: var(--blue); }
.hc-crumb span { margin: 0 6px; color: #c5ceda; }

.hc-main {
    background: #fff;
    border-radius: 12px;
    padding: 28px 36px 32px;
    box-shadow: 0 10px 28px rgba(36, 70, 130, .08);
}

.hc-doc h1 {
    margin: 0 0 18px;
    font-size: 26px;
    font-weight: 700;
    line-height: 1.35;
}

.hc-article { display: none; }
.hc-article.is-on { display: block; }

.hc-article h2 {
    margin: 22px 0 8px;
    font-size: 16px;
    font-weight: 700;
}

.hc-article p { margin: 0 0 10px; color: #3c4656; }
.hc-article ul, .hc-article ol { margin: 0 0 12px; padding-left: 1.3em; color: #3c4656; }
.hc-article ul { list-style: disc; }
.hc-article ol { list-style: decimal; }
.hc-article li { display: list-item; }
.hc-article li + li { margin-top: 4px; }
.hc-article a { color: var(--blue); }
.hc-article a:hover { text-decoration: underline; }
.hc-article code {
    padding: 0 4px;
    border-radius: 4px;
    background: #F4F7FD;
    color: #2468F2;
    font-family: Consolas, "Courier New", monospace;
    font-size: 12px;
}

.hc-qa {
    padding: 14px 0;
    border-bottom: 1px solid #eef2f7;
}

.hc-qa h3 {
    margin: 0 0 8px;
    font-size: 15px;
    font-weight: 700;
}

.hc-pre {
    margin: 0 0 12px;
    padding: 14px 16px;
    overflow: auto;
    border-radius: 10px;
    background: #1d2433;
    color: #e8eef8;
    font-size: 12.5px;
    line-height: 1.65;
}

.hc-note {
    margin: 12px 0;
    padding: 10px 12px;
    border-radius: 8px;
    background: #f4f8ff;
    color: #3d5270;
    font-size: 13px;
}

.hc-index {
    display: grid;
    gap: 10px;
}

.hc-index a {
    display: block;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    color: var(--ink) !important;
    text-decoration: none !important;
}

.hc-index a:hover { border-color: #c5d8ff; color: var(--blue) !important; }
.hc-index small { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; }

.hc-pager {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 28px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.hc-pager a {
    max-width: 46%;
    color: var(--text);
    font-size: 13px;
}

.hc-pager a:hover { color: var(--blue); }
.hc-pager .is-next { margin-left: auto; text-align: right; }
.hc-pager small { display: block; color: var(--muted); }

.hc-copy:not(.hc-btn) {
    margin-left: 6px;
    padding: 0 8px;
    height: 22px;
    border: 1px solid #d5e0ef;
    border-radius: 6px;
    background: #fff;
    color: var(--blue);
    font-size: 12px;
    cursor: pointer;
}

@media (max-width: 900px) {
    .hc-hero { padding-top: 108px; }
    .hc-hero h1 { font-size: 26px; }
    .hc-card { padding: 22px 18px 20px; }
    .hc-card__head h2 { font-size: 18px; }
    .hc-main { padding: 22px 18px; }
    .hc-grid, .hc-links, .hc-doc__grid { grid-template-columns: 1fr; }
    .hc-side { position: static; max-height: none; }
    .hc-search button { width: 72px; }
    .hc-wrap {
        width: auto;
        margin-left: 16px;
        margin-right: 76px;
    }
}
