:root {
    --help-blue: #3498db;
    --help-blue-dark: #2980b9;
    --help-blue-soft: #eaf5fc;
    --help-ink: #26384c;
    --help-body: #52677a;
    --help-muted: #71849a;
    --help-border: #e1e9f0;
    --help-bg: #f5f7fa;
    --help-card: #ffffff;
    --help-shadow: 0 8px 24px rgba(39, 75, 105, .08);
    --help-radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body.help-center-page {
    margin: 0;
    color: var(--help-ink);
    background:
        radial-gradient(circle at 8% 12%, rgba(52, 152, 219, .08), transparent 24rem),
        var(--help-bg);
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.72;
    -webkit-font-smoothing: antialiased;
}

body.help-dialog-open {
    overflow: hidden;
}

.help-center-page a {
    color: var(--help-blue-dark);
}

.help-center-page button,
.help-center-page input {
    font: inherit;
}

.help-center-page :focus-visible {
    outline: 3px solid rgba(52, 152, 219, .3);
    outline-offset: 3px;
}

.help-skip-link {
    position: fixed;
    top: 8px;
    left: 10px;
    z-index: 10001;
    padding: 9px 14px;
    color: #fff !important;
    background: var(--help-blue-dark);
    border-radius: 10px;
    transform: translateY(-150%);
}

.help-skip-link:focus {
    transform: translateY(0);
}

.help-main {
    width: min(1120px, calc(100% - 40px));
    margin: 107px auto 56px;
    scroll-margin-top: 90px;
}

.help-hero {
    min-height: 168px;
    padding: 34px 40px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 28px;
    overflow: hidden;
    position: relative;
    background:
        radial-gradient(circle at 90% 16%, rgba(255, 255, 255, .94), transparent 25%),
        linear-gradient(135deg, #eff9ff 0%, #e6f3fc 57%, #edf1ff 100%);
    border: 1px solid rgba(52, 152, 219, .18);
    border-radius: 22px;
    box-shadow: var(--help-shadow);
}

.help-hero::after {
    content: "";
    position: absolute;
    right: 46px;
    top: 28px;
    width: 120px;
    height: 74px;
    opacity: .42;
    background:
        linear-gradient(90deg, transparent 47%, rgba(52, 152, 219, .16) 48% 52%, transparent 53%),
        radial-gradient(circle at 16% 78%, #3498db 0 5px, transparent 6px),
        radial-gradient(circle at 50% 42%, #7fbbe4 0 5px, transparent 6px),
        radial-gradient(circle at 84% 16%, #8f9dea 0 5px, transparent 6px);
    transform: rotate(-7deg);
}

.help-eyebrow {
    display: block;
    margin-bottom: 6px;
    color: var(--help-blue-dark);
    font-size: 14px;
    font-weight: 720;
    letter-spacing: .08em;
}

.help-hero h1 {
    margin: 0;
    color: var(--help-ink);
    font-size: clamp(30px, 4vw, 44px);
    line-height: 1.2;
    letter-spacing: -.02em;
}

.help-hero p {
    max-width: 680px;
    margin: 12px 0 0;
    color: var(--help-body);
    font-size: 17px;
}

.help-updated {
    position: relative;
    z-index: 1;
    flex: 0 0 auto;
    padding: 8px 12px;
    color: var(--help-body);
    background: rgba(255, 255, 255, .72);
    border: 1px solid rgba(52, 152, 219, .14);
    border-radius: 999px;
    font-size: 13px;
}

.help-section-nav {
    margin: 18px 0 28px;
    padding: 7px;
    background: rgba(255, 255, 255, .78);
    border: 1px solid var(--help-border);
    border-radius: 15px;
    box-shadow: 0 6px 18px rgba(39, 75, 105, .055);
}

.help-section-nav__track {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
}

.help-section-nav a {
    min-height: 44px;
    padding: 9px 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--help-body);
    text-decoration: none;
    font-weight: 650;
    border-radius: 10px;
}

.help-section-nav a:hover {
    color: var(--help-blue-dark);
    background: var(--help-blue-soft);
}

.help-section-nav a.active {
    color: #fff;
    background: linear-gradient(135deg, #4ca9dc, #3498db 58%, #4f82d2);
    box-shadow: 0 8px 18px rgba(52, 152, 219, .18);
}

.help-card {
    margin-bottom: 22px;
    overflow: hidden;
    background: var(--help-card);
    border: 1px solid var(--help-border);
    border-radius: var(--help-radius);
    box-shadow: var(--help-shadow);
}

.help-card__heading {
    padding: 24px 28px 17px;
    border-bottom: 1px solid #edf2f6;
}

.help-card__heading h2,
.help-card__heading h3 {
    margin: 0;
    color: var(--help-ink);
    line-height: 1.3;
}

.help-card__heading h2 {
    font-size: 23px;
}

.help-card__heading p {
    margin: 7px 0 0;
    color: var(--help-muted);
}

.help-card__body {
    padding: 26px 28px 30px;
    color: var(--help-body);
}

.help-card__body > :first-child,
.legal-section > :first-child {
    margin-top: 0;
}

.help-card__body > :last-child,
.legal-section > :last-child {
    margin-bottom: 0;
}

.help-card h3,
.help-card h4,
.legal-section h2,
.legal-section h3 {
    color: var(--help-ink);
}

.help-card ul,
.help-card ol,
.legal-section ul,
.legal-section ol {
    padding-left: 1.35em;
}

.help-callout {
    margin: 18px 0;
    padding: 16px 18px;
    color: var(--help-body);
    background: #f3f9fd;
    border: 1px solid #cfe6f5;
    border-left: 4px solid var(--help-blue);
    border-radius: 12px;
}

.help-callout--warm {
    background: #fff9eb;
    border-color: #f2dfae;
    border-left-color: #d7a23e;
}

.help-callout--success {
    background: #effaf6;
    border-color: #cdeade;
    border-left-color: #20a579;
}

.help-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.help-button {
    min-height: 44px;
    padding: 10px 17px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #fff !important;
    background: linear-gradient(135deg, #4ca9dc, #3498db 58%, #4f82d2);
    border: 0;
    border-radius: 11px;
    box-shadow: 0 8px 18px rgba(52, 152, 219, .18);
    cursor: pointer;
    text-decoration: none;
    font-weight: 680;
}

.help-button:hover {
    filter: brightness(.97);
}

.help-button--secondary {
    color: var(--help-blue-dark) !important;
    background: #f2f8fc;
    border: 1px solid #cfe4f3;
    box-shadow: none;
}

.help-grid,
.help-module-grid,
.contact-grid,
.feedback-grid {
    display: grid;
    gap: 16px;
}

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

.help-module,
.help-step,
.feedback-card {
    padding: 20px;
    background: #f8fafc;
    border: 1px solid var(--help-border);
    border-radius: 14px;
}

.help-module h3,
.help-step h3,
.feedback-card h3 {
    margin: 0 0 7px;
    font-size: 17px;
}

.help-module p,
.help-step p,
.feedback-card p {
    margin: 0;
    color: var(--help-body);
}

.help-flow {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.help-step__number {
    width: 34px;
    height: 34px;
    margin-bottom: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: var(--help-blue);
    border-radius: 10px;
    font-weight: 760;
}

.help-checklist {
    display: grid;
    gap: 10px;
    padding: 0 !important;
    list-style: none;
}

.help-checklist li {
    position: relative;
    padding-left: 27px;
}

.help-checklist li::before {
    content: "";
    position: absolute;
    left: 2px;
    top: .55em;
    width: 9px;
    height: 5px;
    border-left: 2px solid var(--help-blue);
    border-bottom: 2px solid var(--help-blue);
    transform: rotate(-45deg);
}

.help-data-note {
    margin-top: 24px;
}

/* FAQ */
.faq-tools {
    margin-bottom: 20px;
    padding: 22px;
    background: #fff;
    border: 1px solid var(--help-border);
    border-radius: var(--help-radius);
    box-shadow: var(--help-shadow);
}

.faq-intro h2 {
    margin: 0;
    color: var(--help-ink);
    font-size: 24px;
}

.faq-intro > div > p,
.field-hint,
.faq-result-status {
    color: var(--help-muted);
}

.field-hint {
    margin: 7px 2px 0;
    font-size: 13px;
}

.faq-search-label {
    display: block;
    margin-bottom: 8px;
    color: var(--help-ink);
    font-weight: 680;
}

.faq-search-wrap {
    position: relative;
}

.faq-search-wrap::before {
    content: "";
    position: absolute;
    left: 17px;
    top: 50%;
    width: 13px;
    height: 13px;
    border: 2px solid var(--help-blue);
    border-radius: 50%;
    transform: translateY(-58%);
}

.faq-search-wrap::after {
    content: "";
    position: absolute;
    left: 29px;
    top: 55%;
    width: 7px;
    height: 2px;
    background: var(--help-blue);
    transform: rotate(45deg);
}

#faq-search {
    width: 100%;
    min-height: 50px;
    padding: 12px 16px 12px 48px;
    color: var(--help-ink);
    background: #f9fbfd;
    border: 1px solid #dbe6ee;
    border-radius: 12px;
}

.faq-categories {
    margin-top: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.category-btn {
    min-height: 40px;
    padding: 8px 14px;
    color: var(--help-body);
    background: #f5f8fa;
    border: 1px solid var(--help-border);
    border-radius: 999px;
    cursor: pointer;
}

.category-btn.active {
    color: var(--help-blue-dark);
    background: var(--help-blue-soft);
    border-color: #badbf1;
    font-weight: 680;
}

#faq-result-status {
    min-height: 24px;
    margin: 12px 2px 0;
    color: var(--help-muted);
    font-size: 14px;
}

.faq-list {
    display: grid;
    gap: 12px;
}

.faq-item {
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--help-border);
    border-radius: 14px;
    box-shadow: 0 5px 16px rgba(39, 75, 105, .05);
}

.faq-item > h3 {
    margin: 0;
    font-size: inherit;
}

.faq-question {
    width: 100%;
    min-height: 62px;
    padding: 17px 52px 17px 20px;
    position: relative;
    color: var(--help-ink);
    background: #fff;
    border: 0;
    text-align: left;
    cursor: pointer;
    font-weight: 680;
}

.faq-question::after {
    content: "+";
    position: absolute;
    right: 20px;
    top: 50%;
    color: var(--help-blue);
    font-size: 24px;
    font-weight: 400;
    transform: translateY(-50%);
}

.faq-question[aria-expanded="true"]::after {
    content: "−";
}

.faq-question:hover {
    background: #f8fbfd;
}

.faq-label {
    margin-right: 9px;
    padding: 3px 8px;
    color: var(--help-blue-dark);
    background: var(--help-blue-soft);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 650;
    white-space: nowrap;
}

.faq-answer {
    padding: 0 20px 20px;
    color: var(--help-body);
    border-top: 1px solid #edf2f6;
}

.faq-answer[hidden],
.faq-item[hidden],
#faq-empty[hidden] {
    display: none;
}

.faq-answer p:first-child {
    margin-top: 17px;
}

.faq-empty {
    padding: 34px 20px;
    color: var(--help-muted);
    text-align: center;
    background: #fff;
    border: 1px dashed #cfdce6;
    border-radius: 14px;
}

/* Legal pages */
.legal-layout {
    display: grid;
    grid-template-columns: 235px minmax(0, 1fr);
    align-items: start;
    gap: 22px;
    min-width: 0;
}

.legal-toc {
    position: sticky;
    top: 90px;
    background: #fff;
    border: 1px solid var(--help-border);
    border-radius: 15px;
    box-shadow: var(--help-shadow);
}

.legal-toc summary {
    padding: 17px 18px;
    color: var(--help-ink);
    cursor: pointer;
    font-weight: 720;
}

.legal-toc nav {
    padding: 0 12px 14px;
    display: grid;
    gap: 2px;
}

.legal-toc a {
    padding: 7px 9px;
    color: var(--help-body);
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
}

.legal-toc a:hover {
    color: var(--help-blue-dark);
    background: var(--help-blue-soft);
}

.legal-document {
    width: 100%;
    min-width: 0;
    padding: 10px 32px;
    background: #fff;
    border: 1px solid var(--help-border);
    border-radius: var(--help-radius);
    box-shadow: var(--help-shadow);
}

.legal-section {
    padding: 26px 0;
    scroll-margin-top: 90px;
    color: var(--help-body);
    border-bottom: 1px solid #edf2f6;
}

.legal-section:last-child {
    border-bottom: 0;
}

.legal-section h2 {
    margin: 0 0 14px;
    font-size: 22px;
}

.legal-section h3 {
    margin: 20px 0 8px;
    font-size: 17px;
}

.legal-section li + li {
    margin-top: 6px;
}

.legal-table-wrap {
    width: 100%;
    max-width: 100%;
    margin: 16px 0;
    overflow-x: auto;
    border: 1px solid var(--help-border);
    border-radius: 12px;
    -webkit-overflow-scrolling: touch;
}

.legal-table {
    width: 100%;
    min-width: 680px;
    border-collapse: collapse;
    font-size: 14px;
}

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

.legal-table th {
    color: var(--help-ink);
    background: #f5f9fc;
}

.legal-table tr:last-child td {
    border-bottom: 0;
}

/* Contact */
.contact-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 22px;
}

.contact-card {
    min-height: 270px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--help-border);
    border-radius: var(--help-radius);
    box-shadow: var(--help-shadow);
}

.contact-icon {
    width: 42px;
    height: 42px;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--help-blue-dark);
    background: var(--help-blue-soft);
    border-radius: 12px;
    font-weight: 780;
}

.contact-card h2 {
    margin: 0 0 7px;
    font-size: 20px;
}

.contact-info {
    margin-bottom: 9px;
    color: var(--help-ink);
    font-weight: 680;
    word-break: break-word;
}

.contact-description {
    margin: 0 0 22px;
    color: var(--help-muted);
    font-size: 14px;
}

.contact-card .help-button {
    width: 100%;
    margin-top: auto;
}

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

.qrcode-section[hidden] {
    display: none;
}

.qrcode-section {
    position: fixed;
    inset: 0;
    z-index: 12000;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(20, 35, 51, .48);
    backdrop-filter: blur(5px);
}

.qrcode-modal {
    width: min(380px, 100%);
    padding: 22px;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(22, 42, 62, .25);
}

.qrcode-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.qrcode-header h2 {
    margin: 0;
    font-size: 20px;
}

.qrcode-close {
    width: 44px;
    height: 44px;
    color: var(--help-body);
    background: #f3f6f8;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
}

.qrcode-container {
    margin-top: 16px;
    text-align: center;
}

.qrcode-image {
    width: min(260px, 100%);
    height: auto;
    border-radius: 12px;
}

.qrcode-text {
    margin: 12px 0 0;
    color: var(--help-muted);
}

/* Footer */
.help-footer {
    color: #5b6d7e;
    background: #f0f3f6;
    border-top: 1px solid #e1e7ec;
}

.help-footer__inner {
    width: min(1120px, calc(100% - 40px));
    margin: 0 auto;
    padding: 40px 0 22px;
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(150px, .65fr) minmax(150px, .65fr);
    gap: 38px;
}

.help-footer h2 {
    margin: 0 0 12px;
    color: var(--help-ink);
    font-size: 16px;
}

.help-footer p {
    max-width: 520px;
    margin: 0 0 13px;
}

.help-footer a {
    color: #647789;
    text-decoration: none;
}

.help-footer a:hover {
    color: var(--help-blue-dark);
}

.help-footer__intro > a {
    display: block;
    width: fit-content;
}

.help-footer__column {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.help-footer__copyright {
    grid-column: 1 / -1;
    padding-top: 22px;
    text-align: center;
    border-top: 1px solid #dfe5ea;
    font-size: 14px;
}

@media (max-width: 900px) {
    .help-main {
        width: min(100% - 28px, 760px);
        margin-top: 107px;
    }

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

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

    .legal-toc {
        position: static;
    }

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

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

@media (max-width: 768px) {
    .help-main {
        margin-top: 22px;
        scroll-margin-top: 18px;
    }

    .legal-section {
        scroll-margin-top: 18px;
    }
}

@media (max-width: 620px) {
    body.help-center-page {
        background: #f4f7fa;
    }

    .help-main {
        width: calc(100% - 28px);
        margin: 14px auto 38px;
    }

    .help-hero {
        min-height: 0;
        padding: 24px 22px;
        align-items: flex-start;
        flex-direction: column;
        gap: 15px;
        border-radius: 18px;
    }

    .help-hero::after {
        right: 12px;
        top: 14px;
        transform: scale(.7) rotate(-7deg);
        transform-origin: top right;
    }

    .help-hero h1 {
        font-size: 29px;
    }

    .help-hero p {
        margin-top: 8px;
        font-size: 15px;
    }

    .help-updated {
        padding: 6px 10px;
        font-size: 12px;
    }

    .help-section-nav {
        margin: 12px 0 18px;
        padding: 5px;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .help-section-nav::-webkit-scrollbar {
        display: none;
    }

    .help-section-nav__track {
        width: max-content;
        display: flex;
    }

    .help-section-nav a {
        min-width: 92px;
        padding-inline: 13px;
        font-size: 14px;
    }

    .help-card {
        margin-bottom: 14px;
        border-radius: 16px;
    }

    .help-card__heading {
        padding: 20px 20px 14px;
    }

    .help-card__heading h2 {
        font-size: 20px;
    }

    .help-card__body {
        padding: 20px;
    }

    .help-grid,
    .help-module-grid,
    .help-flow,
    .feedback-grid {
        grid-template-columns: 1fr;
    }

    .help-module,
    .help-step,
    .feedback-card {
        padding: 17px;
    }

    .faq-tools {
        padding: 17px;
        border-radius: 16px;
    }

    .faq-categories {
        margin-right: -17px;
        padding-right: 17px;
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .faq-categories::-webkit-scrollbar {
        display: none;
    }

    .category-btn {
        flex: 0 0 auto;
    }

    .faq-question {
        padding: 16px 46px 16px 17px;
        line-height: 1.55;
    }

    .faq-label {
        display: block;
        width: fit-content;
        margin: 0 0 6px;
    }

    .faq-answer {
        padding: 0 17px 18px;
    }

    .legal-document {
        padding: 4px 20px;
        border-radius: 16px;
    }

    .legal-section {
        padding: 22px 0;
    }

    .legal-section h2 {
        font-size: 20px;
    }

    .contact-card {
        padding: 20px;
        border-radius: 16px;
    }

    .help-footer__inner {
        width: calc(100% - 36px);
        padding: 30px 0 18px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 28px 18px;
    }

    .help-footer__intro,
    .help-footer__copyright {
        grid-column: 1 / -1;
    }

    .help-footer__copyright {
        padding-top: 18px;
        line-height: 1.7;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}
