:root {
    color-scheme: light;
    --brand: #6366f1;
    --brand-strong: #4f46e5;
    --brand-soft: #eef2ff;
    --ink: #111827;
    --muted: #6b7280;
    --subtle: #f8fafc;
    --panel: #ffffff;
    --line: #eef0f5;
    --shadow: 0 18px 50px rgba(99, 102, 241, 0.16);
    font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background:
        radial-gradient(circle at 50% 16%, rgba(99, 102, 241, 0.12), transparent 26rem),
        linear-gradient(180deg, #ffffff 0%, #fbfcff 44%, #ffffff 100%);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(90deg, rgba(99, 102, 241, 0.035) 1px, transparent 1px),
        linear-gradient(180deg, rgba(99, 102, 241, 0.03) 1px, transparent 1px);
    background-size: 72px 72px;
    mask-image: radial-gradient(circle at 50% 12%, black, transparent 58%);
    pointer-events: none;
}

a {
    color: inherit;
    text-decoration: none;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 20;
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    padding: 18px clamp(20px, 7vw, 96px);
    border-bottom: 1px solid rgba(238, 240, 245, 0.82);
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(18px);
}

.brand,
.site-nav,
.button {
    display: inline-flex;
    align-items: center;
}

.brand {
    gap: 10px;
    font-size: 17px;
    font-weight: 800;
}

.brand-mark {
    display: inline-grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 10px;
    color: #ffffff;
    background: var(--brand);
    font-size: 14px;
    font-weight: 900;
    box-shadow: 0 12px 30px rgba(99, 102, 241, 0.25);
}

.site-nav {
    gap: 30px;
    color: #4b5563;
    font-size: 14px;
    font-weight: 700;
}

.site-nav a:hover {
    color: var(--brand);
}

.site-nav .active {
    color: var(--ink);
}

.github-link svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

.section-block {
    width: min(1120px, calc(100% - 40px));
    margin: 0 auto;
    scroll-margin-top: 96px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

.hero {
    position: relative;
    display: flex;
    min-height: 760px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-top: 94px;
    text-align: center;
}

.hero-glow {
    position: absolute;
    top: 112px;
    left: 50%;
    width: min(760px, 88vw);
    height: 410px;
    transform: translateX(-50%);
    border-radius: 999px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.16), rgba(99, 102, 241, 0.05) 42%, transparent 72%);
    filter: blur(6px);
    pointer-events: none;
    animation: glowDrift 7s ease-in-out infinite;
}

.badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 28px;
    padding: 9px 16px;
    border-radius: 999px;
    color: #6366f1;
    background: rgba(99, 102, 241, 0.08);
    font-size: 14px;
    font-weight: 700;
    animation: fadeLift 700ms ease both;
}

.badge span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--brand);
}

.hero h1 {
    position: relative;
    margin: 0;
    font-size: clamp(52px, 8vw, 86px);
    line-height: 1;
    letter-spacing: 0;
    animation: fadeLift 760ms ease 80ms both;
}

.hero-copy {
    position: relative;
    margin: 26px 0 0;
    color: var(--muted);
    font-size: clamp(20px, 3vw, 28px);
    font-weight: 500;
    line-height: 1.6;
    animation: fadeLift 760ms ease 160ms both;
}

.hero-actions {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 18px;
    margin-top: 42px;
    animation: fadeLift 760ms ease 240ms both;
}

.button {
    min-height: 56px;
    justify-content: center;
    gap: 8px;
    padding: 0 28px;
    border: 0;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 800;
    transition: transform 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.button svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.button.primary {
    color: #ffffff;
    background: var(--brand);
    box-shadow: var(--shadow);
}

.button.primary:hover {
    background: var(--brand-strong);
    transform: translateY(-2px);
}

.button.secondary {
    color: #111827;
    background: #f5f6fa;
}

.button.secondary:hover {
    background: #eceef6;
    transform: translateY(-2px);
}

.narrow {
    max-width: 1030px;
}

.text-nowrap {
    white-space: nowrap;
}

.section-heading {
    max-width: 620px;
    margin-bottom: 46px;
}

.section-heading.centered {
    margin-right: auto;
    margin-left: auto;
    text-align: center;
}

.section-heading h2,
.cta-section h2 {
    margin: 0;
    font-size: clamp(34px, 5vw, 50px);
    line-height: 1.12;
}

.section-heading p,
.cta-section p,
.site-footer p {
    margin: 14px 0 0;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.7;
}

.section-label {
    display: inline-flex;
    margin-bottom: 14px;
    color: var(--brand);
    font-size: 14px;
    font-weight: 900;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    column-gap: 140px;
    row-gap: 58px;
    padding-bottom: 120px;
}

.step-card,
.timeline article {
    border-radius: 24px;
    background: rgba(248, 250, 252, 0.86);
}

.feature-card {
    min-height: 188px;
    padding: 34px 0;
    text-align: left;
    animation: fadeLift 680ms ease both;
    animation-timeline: view();
    animation-range: entry 0% cover 34%;
}

.feature-card h3,
.trust-grid h3,
.step-card h3,
.timeline h3 {
    margin: 30px 0 0;
    font-size: 22px;
}

.feature-card p,
.trust-grid p,
.step-card p,
.timeline p {
    margin: 12px 0 0;
    color: var(--muted);
    line-height: 1.72;
}

.icon {
    display: inline-grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border-radius: 14px;
    color: var(--brand);
    background: var(--brand-soft);
    transition: transform 220ms ease, background-color 220ms ease, color 220ms ease;
}

.icon svg {
    width: 27px;
    height: 27px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.1;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.feature-card:hover .feature-icon,
.trust-grid article:hover .trust-icon {
    transform: translateY(-4px);
}

.trust-section {
    width: 100%;
    max-width: none;
    padding: 110px clamp(20px, 7vw, 96px);
    background:
        radial-gradient(circle at 50% 10%, rgba(99, 102, 241, 0.09), transparent 34rem),
        linear-gradient(180deg, transparent, rgba(248, 250, 252, 0.68) 16%, rgba(248, 250, 252, 0.72) 84%, transparent);
}

.trust-section .section-heading {
    max-width: 860px;
}

.trust-section .section-heading h2 {
    font-size: clamp(36px, 4.4vw, 50px);
}

.trust-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 96px;
    width: min(1030px, 100%);
    margin: 0 auto;
}

.trust-grid article {
    padding: 34px 0;
    text-align: center;
    background: transparent;
    animation: fadeLift 680ms ease both;
    animation-timeline: view();
    animation-range: entry 0% cover 34%;
}

.trust-grid .icon {
    width: 72px;
    height: 72px;
    margin-bottom: 12px;
    color: #ffffff;
    background: var(--brand);
    border-radius: 18px;
    box-shadow: none;
}

.trust-grid .icon svg {
    width: 34px;
    height: 34px;
    stroke-width: 2;
}

.guide-section,
.changelog-section {
    padding: 110px 0 0;
}

.page-hero {
    padding: 190px 0 82px;
    text-align: center;
}

.page-hero h1 {
    max-width: 760px;
    margin: 0 auto;
    font-size: clamp(44px, 7vw, 70px);
    line-height: 1.08;
}

.page-hero p:not(.badge) {
    max-width: 680px;
    margin: 24px auto 0;
    color: var(--muted);
    font-size: 20px;
    line-height: 1.7;
}

.doc-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    padding-bottom: 120px;
}

.doc-grid article {
    min-height: 220px;
    padding: 32px;
    border-radius: 24px;
    background: rgba(248, 250, 252, 0.86);
}

.doc-grid h2 {
    margin: 0;
    font-size: 24px;
}

.doc-grid p {
    margin: 14px 0 0;
    color: var(--muted);
    line-height: 1.72;
}

.docs-shell {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 34px;
    padding-top: 132px;
    padding-bottom: 120px;
}

.docs-shell.with-toc {
    width: min(1360px, calc(100% - 40px));
    grid-template-columns: 230px minmax(0, 1fr) 220px;
}

.docs-sidebar {
    position: sticky;
    top: 104px;
    align-self: start;
    padding: 18px;
    border-radius: 24px;
    background: rgba(248, 250, 252, 0.86);
}

.docs-sidebar p {
    margin: 18px 12px 8px;
    color: #9ca3af;
    font-size: 13px;
    font-weight: 900;
}

.docs-sidebar p:first-child {
    margin-top: 4px;
}

.doc-search {
    display: block;
    margin-bottom: 18px;
}

.doc-search span {
    display: block;
    margin: 0 12px 8px;
    color: #9ca3af;
    font-size: 13px;
    font-weight: 900;
}

.doc-search input {
    width: 100%;
    height: 42px;
    padding: 0 14px;
    border: 1px solid transparent;
    border-radius: 14px;
    outline: none;
    color: var(--ink);
    background: #ffffff;
    font: inherit;
    font-size: 14px;
    transition: border-color 180ms ease, box-shadow 180ms ease;
}

.doc-search input:focus {
    border-color: rgba(99, 102, 241, 0.32);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.09);
}

.doc-link {
    display: block;
    width: 100%;
    padding: 12px 14px;
    border: 0;
    border-radius: 14px;
    color: #4b5563;
    background: transparent;
    font: inherit;
    font-weight: 800;
    text-align: left;
    cursor: pointer;
    transition: color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

.doc-link:hover,
.doc-link.active {
    color: var(--brand);
    background: #ffffff;
}

.doc-link:hover {
    transform: translateX(3px);
}

.doc-link.sub-link {
    margin-left: 12px;
    width: calc(100% - 12px);
    padding-left: 18px;
    font-size: 14px;
}

.doc-link.sub-link::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    margin-right: 8px;
    border-radius: 50%;
    background: currentColor;
    vertical-align: 2px;
    opacity: 0.6;
}

.docs-toc {
    position: sticky;
    top: 104px;
    align-self: start;
    max-height: calc(100vh - 128px);
    overflow: auto;
    padding: 18px 0 18px 18px;
    border-left: 1px solid var(--line);
}

.docs-toc p {
    margin: 0 0 12px;
    color: #9ca3af;
    font-size: 13px;
    font-weight: 900;
}

.toc-link {
    display: block;
    margin: 9px 0;
    color: #64748b;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.45;
}

.toc-link:hover {
    color: var(--brand);
}

.toc-link.level-3 {
    padding-left: 12px;
    font-weight: 700;
}

.docs-reader {
    min-height: 560px;
    padding: clamp(28px, 5vw, 58px);
    border-radius: 28px;
    background: #ffffff;
    box-shadow: 0 24px 70px rgba(17, 24, 39, 0.06);
}

.docs-reader h1 {
    margin: 0 0 22px;
    font-size: clamp(34px, 5vw, 52px);
    line-height: 1.12;
}

.docs-reader h2 {
    margin: 38px 0 14px;
    font-size: 28px;
}

.docs-reader h3 {
    margin: 28px 0 10px;
    font-size: 22px;
}

.docs-reader p,
.docs-reader li {
    color: var(--muted);
    font-size: 17px;
    line-height: 1.86;
}

.docs-reader ul,
.docs-reader ol {
    padding-left: 22px;
}

.docs-reader a {
    color: var(--brand);
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.doc-image {
    margin: 22px 0 30px;
}

.doc-image img {
    display: block;
    width: 100%;
    max-height: 620px;
    object-fit: contain;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #f8fafc;
    box-shadow: 0 18px 46px rgba(17, 24, 39, 0.08);
}

.loading {
    color: var(--muted);
}

.changelog-page {
    padding-top: 132px;
    padding-bottom: 120px;
}

.changelog-reader {
    max-width: 820px;
    margin: 0 auto;
}

.guide-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.step-card {
    min-height: 250px;
    padding: 30px;
}

.step-card span {
    color: var(--brand);
    font-size: 14px;
    font-weight: 900;
}

.code-block {
    overflow: hidden;
    margin: 20px 0 0;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    background: #f8fafc;
}

.code-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 12px 10px 16px;
    border-bottom: 1px solid #e5e7eb;
    color: #64748b;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.copy-code {
    height: 30px;
    padding: 0 12px;
    border: 0;
    border-radius: 9px;
    color: var(--brand);
    background: rgba(99, 102, 241, 0.1);
    font: inherit;
    font-size: 12px;
    font-weight: 900;
    cursor: pointer;
    transition: background-color 180ms ease, transform 180ms ease;
}

.copy-code:hover {
    background: rgba(99, 102, 241, 0.17);
    transform: translateY(-1px);
}

pre {
    overflow-x: auto;
    margin: 0;
    padding: 20px;
    color: #334155;
    background: transparent;
    font-size: 14px;
    line-height: 1.7;
}

code {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.token-keyword {
    color: #4f46e5;
    font-weight: 800;
}

.token-string {
    color: #0f766e;
}

.token-comment {
    color: #94a3b8;
}

.timeline {
    display: grid;
    gap: 18px;
    max-width: 820px;
    margin: 0 auto;
}

.timeline article {
    position: relative;
    padding: 30px 34px;
    background: #ffffff;
    border: 1px solid var(--line);
}

.timeline time {
    color: var(--brand);
    font-size: 14px;
    font-weight: 900;
}

.timeline a {
    display: inline-block;
    margin: 4px 2px;
    padding: 2px 8px;
    border-radius: 8px;
    color: var(--brand);
    background: rgba(99, 102, 241, 0.09);
    font-weight: 900;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.timeline a:hover {
    background: rgba(99, 102, 241, 0.16);
}

.text-link {
    display: table;
    margin: 28px auto 0;
    color: var(--brand);
    font-weight: 900;
}

.text-link:hover {
    text-decoration: underline;
}

.cta-section {
    margin-top: 112px;
    margin-bottom: 88px;
    width: min(1040px, calc(100% - 40px));
    padding: 34px 36px;
    border-radius: 28px;
    text-align: center;
    background: rgba(99, 102, 241, 0.08);
}

.cta-section h2 {
    font-size: clamp(30px, 4vw, 48px);
}

.cta-section .button {
    min-height: 48px;
    margin-top: 18px;
    padding: 0 24px;
}

.site-footer {
    padding: 68px clamp(20px, 7vw, 96px) 36px;
    border-top: 1px solid var(--line);
    background: #ffffff;
}

.footer-main {
    display: grid;
    grid-template-columns: 1.5fr 0.8fr 1fr;
    gap: 64px;
}

.site-footer h4 {
    margin: 0 0 16px;
    font-size: 16px;
}

.site-footer a {
    display: block;
    margin-top: 11px;
    color: #4b5563;
    font-weight: 700;
}

.site-footer a:hover {
    color: var(--brand);
}

.footer-brand {
    margin-bottom: 6px;
}

.disclaimer {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 32px;
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
}

.disclaimer p {
    margin: 0;
    font-size: 14px;
    line-height: 1.7;
}

.disclaimer div {
    text-align: right;
}

@keyframes fadeLift {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes glowDrift {
    0%,
    100% {
        transform: translateX(-50%) scale(1);
        opacity: 0.9;
    }

    50% {
        transform: translateX(-50%) scale(1.08);
        opacity: 1;
    }
}

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

@media (max-width: 900px) {
    .site-header {
        position: absolute;
        gap: 16px;
    }

    .site-nav {
        gap: 16px;
    }

    .docs-shell,
    .guide-grid,
    .footer-main {
        grid-template-columns: 1fr;
    }

    .docs-shell.with-toc {
        grid-template-columns: 1fr;
    }

    .feature-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 28px;
        row-gap: 30px;
    }

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

    .docs-sidebar {
        position: static;
    }

    .docs-toc {
        display: none;
    }

    .disclaimer {
        flex-direction: column;
        text-align: left;
    }

    .disclaimer div {
        text-align: left;
    }

    .hero {
        min-height: 680px;
    }
}

@media (max-width: 640px) {
    .site-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .site-nav {
        flex-wrap: wrap;
    }

    .hero {
        min-height: 720px;
        padding-top: 146px;
    }

    .hero h1 {
        font-size: 52px;
    }

    .hero-actions,
    .button {
        width: 100%;
    }

    .step-card,
    .timeline article {
        padding: 26px;
    }

    .feature-grid {
        column-gap: 18px;
        row-gap: 26px;
        padding-bottom: 76px;
    }

    .feature-card {
        min-height: auto;
        padding: 16px 0;
    }

    .feature-card h3 {
        margin-top: 16px;
        font-size: 18px;
    }

    .feature-card p {
        margin-top: 8px;
        font-size: 14px;
        line-height: 1.6;
    }

    .feature-card .icon {
        width: 42px;
        height: 42px;
        border-radius: 12px;
    }

    .feature-card .icon svg {
        width: 23px;
        height: 23px;
    }

    .trust-section {
        padding-right: 20px;
        padding-left: 20px;
    }

    .trust-grid {
        gap: 12px;
    }

    .trust-grid article {
        padding: 16px 0;
    }

    .trust-grid .icon {
        width: 46px;
        height: 46px;
        margin-bottom: 8px;
        border-radius: 14px;
    }

    .trust-grid .icon svg {
        width: 24px;
        height: 24px;
    }

    .trust-grid h3 {
        margin-top: 12px;
        font-size: 16px;
    }

    .trust-grid p {
        margin-top: 7px;
        font-size: 12px;
        line-height: 1.5;
    }

    .trust-section,
    .guide-section,
    .changelog-section {
        padding-top: 76px;
    }

    .trust-section .text-nowrap {
        white-space: normal;
    }
}
