:root {
    --ink: #17212b;
    --muted: #637083;
    --line: #dfe4ea;
    --paper: #ffffff;
    --canvas: #f4f6f8;
    --teal: #0f766e;
    --teal-soft: #e7f5f2;
    --amber: #d97706;
    --amber-soft: #fff7e8;
    --blue: #2563eb;
    --danger: #b42318;
    --shadow: 0 12px 32px rgba(23, 33, 43, 0.08);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-width: 320px;
    color: var(--ink);
    background: var(--canvas);
    font-family: Inter, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.7;
}

a {
    color: inherit;
}

button {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    height: 66px;
    color: #1d2129;
    background: #ffffff;
    border-bottom: 1px solid #eef0f3;
    box-shadow: 0 2px 10px rgba(29, 33, 41, 0.06);
}

.site-header__inner {
    display: flex;
    align-items: center;
    width: min(1280px, calc(100% - 32px));
    height: 100%;
    margin: 0 auto;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
    color: #1d2129;
    font-size: 17px;
    font-weight: 700;
    text-decoration: none;
}

.brand__mark {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    color: #ffffff;
    background: #165dff;
    border-radius: 50%;
    font-size: 14px;
}

.site-nav {
    display: flex;
    align-items: stretch;
    align-self: stretch;
    gap: 4px;
    margin-left: auto;
    overflow-x: auto;
    scrollbar-width: none;
}

.site-nav::-webkit-scrollbar {
    display: none;
}

.site-nav a {
    position: relative;
    display: flex;
    align-items: center;
    padding: 0 13px;
    color: #4e5969;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.site-nav a::after {
    content: "";
    position: absolute;
    right: 13px;
    bottom: 0;
    left: 13px;
    height: 3px;
    background: #165dff;
    transform: scaleX(0);
    transition: transform 0.2s ease;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
    color: #165dff;
}

.site-nav a:hover::after,
.site-nav a[aria-current="page"]::after {
    transform: scaleX(1);
}

.page-intro {
    padding: 46px 24px 38px;
    color: #fff;
    background: #243647;
}

.page-intro__inner {
    width: min(1180px, 100%);
    margin: 0 auto;
}

.page-intro__eyebrow {
    margin: 0 0 8px;
    color: #5eead4;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0;
}

.page-intro h1 {
    margin: 0;
    font-size: 34px;
    line-height: 1.25;
    letter-spacing: 0;
}

.page-intro p {
    max-width: 720px;
    margin: 12px 0 0;
    color: #d8e0e7;
}

.docs-layout {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 28px;
    width: min(1180px, calc(100% - 32px));
    margin: 28px auto 64px;
    align-items: start;
}

.toc {
    position: sticky;
    top: 94px;
    padding: 18px 16px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(23, 33, 43, 0.05);
}

.toc__title {
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.toc a {
    display: block;
    padding: 8px 10px;
    color: #526173;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    border-left: 2px solid transparent;
}

.toc a:hover,
.toc a.is-active {
    color: var(--teal);
    background: var(--teal-soft);
    border-left-color: var(--teal);
}

.docs-main {
    min-width: 0;
    padding: 8px 38px 42px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.doc-section {
    padding: 36px 0;
    border-bottom: 1px solid var(--line);
    scroll-margin-top: 86px;
}

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

.section-kicker {
    margin: 0 0 5px;
    color: var(--teal);
    font-size: 12px;
    font-weight: 800;
}

.doc-section h2 {
    margin: 0 0 12px;
    font-size: 25px;
    line-height: 1.3;
    letter-spacing: 0;
}

.doc-section h3 {
    margin: 26px 0 9px;
    font-size: 18px;
    line-height: 1.4;
}

.doc-section p {
    margin: 8px 0;
    color: #465466;
}

.lead {
    font-size: 17px;
}

.note,
.warning {
    margin: 18px 0;
    padding: 13px 15px;
    border-left: 4px solid var(--teal);
    background: var(--teal-soft);
    color: #315c58;
}

.warning {
    border-left-color: var(--amber);
    background: var(--amber-soft);
    color: #714b13;
}

.check-list {
    display: grid;
    gap: 8px;
    margin: 16px 0;
    padding: 0;
    list-style: none;
}

.check-list li {
    position: relative;
    padding-left: 25px;
    color: #465466;
}

.check-list li::before {
    content: "✓";
    position: absolute;
    top: 0;
    left: 0;
    color: var(--teal);
    font-weight: 900;
}

.code-card {
    margin: 16px 0 22px;
    overflow: hidden;
    background: #101820;
    border: 1px solid #293746;
    border-radius: 8px;
}

.code-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 42px;
    padding: 0 12px 0 16px;
    color: #b8c5d1;
    background: #1b2835;
    border-bottom: 1px solid #293746;
    font-size: 12px;
    font-weight: 700;
}

.copy-button {
    min-width: 52px;
    height: 28px;
    padding: 0 10px;
    color: #dffbf5;
    background: transparent;
    border: 1px solid #477269;
    border-radius: 5px;
    cursor: pointer;
}

.copy-button:hover,
.copy-button.copied {
    color: #10221f;
    background: #5eead4;
    border-color: #5eead4;
}

pre {
    margin: 0;
    padding: 17px;
    overflow-x: auto;
    color: #d8e3eb;
    font: 13px/1.65 Consolas, "Courier New", monospace;
    white-space: pre;
}

.steps {
    counter-reset: steps;
}

.step {
    display: grid;
    grid-template-columns: minmax(220px, 0.8fr) minmax(320px, 1.2fr);
    gap: 24px;
    align-items: start;
    padding: 26px 0;
    border-top: 1px solid var(--line);
    counter-increment: steps;
}

.step:first-child {
    border-top: 0;
}

.step__copy h3 {
    margin-top: 0;
}

.step__copy h3::before {
    content: counter(steps, decimal-leading-zero) " ";
    color: var(--amber);
    font-size: 13px;
}

.tutorial-image,
.gallery-image {
    display: block;
    width: 100%;
    height: auto;
    background: #eef1f4;
    border: 1px solid var(--line);
    border-radius: 6px;
}

[data-lightbox] {
    cursor: zoom-in;
}

.feature-grid,
.plan-grid,
.stat-grid,
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 18px;
}

.feature-card,
.plan-card,
.stat-card {
    padding: 18px;
    background: #f8fafb;
    border: 1px solid var(--line);
    border-radius: 7px;
}

.feature-card h3,
.plan-card h3 {
    margin: 0 0 7px;
    font-size: 16px;
}

.feature-card p,
.plan-card p {
    margin: 0;
    font-size: 14px;
}

.feature-card--accent,
.plan-card--accent {
    background: var(--teal-soft);
    border-color: #a8d8d1;
}

.feature-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    margin-bottom: 12px;
    color: #fff;
    background: var(--teal);
    border-radius: 5px;
    font-size: 12px;
    font-weight: 800;
}

.stat-card strong {
    display: block;
    color: var(--teal);
    font-size: 25px;
}

.stat-card span {
    color: var(--muted);
    font-size: 13px;
}

.plan-card__spec {
    display: flex;
    gap: 8px;
    margin: 12px 0;
    flex-wrap: wrap;
}

.tag {
    display: inline-flex;
    align-items: center;
    min-height: 27px;
    padding: 2px 8px;
    color: #465466;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
}

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

.gallery-item {
    margin: 0;
}

.gallery-item figcaption {
    padding: 8px 2px 0;
    color: var(--muted);
    font-size: 13px;
}

.site-footer {
    padding: 24px;
    color: #8ea0af;
    background: #17212b;
    text-align: center;
    font-size: 12px;
}

.lightbox {
    width: min(1100px, calc(100% - 32px));
    max-height: calc(100vh - 32px);
    padding: 38px 16px 16px;
    background: #111923;
    border: 0;
    border-radius: 8px;
}

.lightbox::backdrop {
    background: rgba(5, 10, 15, 0.78);
}

.lightbox img {
    display: block;
    max-width: 100%;
    max-height: calc(100vh - 100px);
    margin: 0 auto;
}

.lightbox__close {
    position: absolute;
    top: 7px;
    right: 9px;
    width: 30px;
    height: 30px;
    color: #fff;
    background: transparent;
    border: 0;
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
}

@media (max-width: 900px) {
    .site-header {
        height: auto;
    }

    .site-header__inner {
        display: block;
        width: 100%;
    }

    .brand {
        height: 58px;
        padding: 0 16px;
    }

    .site-nav {
        height: 44px;
        padding: 0 8px;
        border-top: 1px solid #eef0f3;
    }

    .site-nav a {
        padding: 0 10px;
    }

    .docs-layout {
        grid-template-columns: 1fr;
        margin-top: 16px;
    }

    .toc {
        position: static;
        display: flex;
        gap: 4px;
        padding: 7px;
        overflow-x: auto;
    }

    .toc__title {
        display: none;
    }

    .toc a {
        flex: 0 0 auto;
        border-left: 0;
        border-bottom: 2px solid transparent;
    }

    .toc a:hover,
    .toc a.is-active {
        border-bottom-color: var(--teal);
    }
}

@media (max-width: 680px) {
    .page-intro {
        padding: 30px 18px;
    }

    .page-intro h1 {
        font-size: 27px;
    }

    .docs-layout {
        width: min(100% - 20px, 1180px);
        gap: 12px;
    }

    .docs-main {
        padding: 0 18px 26px;
    }

    .doc-section {
        padding: 28px 0;
    }

    .doc-section h2 {
        font-size: 22px;
    }

    .step {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .feature-grid,
    .plan-grid,
    .stat-grid,
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}
