:root {
    color-scheme: light;
    --font-sans: "Geist", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", Arial, sans-serif;
    --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
    --primary: #1f1f1f;
    --secondary: #74777c;
    --tertiary: #8d9196;
    --background: #ffffff;
    --surface: #f2f2f2;
    --accent: #5856d6;
    --stroke: rgba(0, 0, 0, 0.08);
    --bg-tint-brand: rgba(88, 86, 214, 0.12);
    --container-max: 1200px;
}

@media (prefers-color-scheme: dark) {
    :root {
        color-scheme: dark;
        --primary: #eeeeee;
        --secondary: #c7c7c7;
        --tertiary: #969ca2;
        --background: #131313;
        --surface: #1c1c1c;
        --accent: #b9a8ff;
        --stroke: rgba(255, 255, 255, 0.08);
        --bg-tint-brand: rgba(185, 168, 255, 0.22);
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    line-height: 1.6;
    background: var(--background);
    color: var(--primary);
    -webkit-font-smoothing: antialiased;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 999;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    background: var(--background);
    box-shadow: 0 1px 0 var(--stroke);
}

.site-header-left {
    display: flex;
    align-items: center;
    gap: 24px;
}

.site-header-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    font-size: 18px;
    color: var(--primary);
    text-decoration: none;
}

.site-header-brand img {
    width: 28px;
    height: 28px;
}

.site-header-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.site-header-nav-link {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--secondary);
    text-decoration: none;
    transition:
        background 0.15s ease,
        color 0.15s ease;
}

.site-header-nav-link:hover {
    color: var(--primary);
    background: var(--surface);
}

.site-header-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 40px;
    padding: 0 18px;
    background: var(--background);
    box-shadow: inset 0 0 0 1px var(--stroke);
    color: var(--primary);
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 500;
    border-radius: 100px;
    text-decoration: none;
    transition: background 0.15s ease;
}

.site-header-cta:hover {
    background: var(--surface);
}

main {
    max-width: 720px;
    margin: 0 auto;
    padding: 48px 24px;
}

h1 {
    font-size: 32px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

h2 {
    margin-top: 32px;
    margin-bottom: 8px;
    font-size: 20px;
    font-weight: 600;
}

h3 {
    margin-top: 20px;
    margin-bottom: 4px;
    font-size: 16px;
    font-weight: 600;
}

p,
ul {
    margin-top: 8px;
    font-size: 15px;
}

ul {
    padding-left: 24px;
}

li {
    margin-bottom: 6px;
}

a {
    color: var(--accent);
}

.caption-sm {
    font-size: 13px;
    color: var(--tertiary);
}

.footer {
    border-top: 1px solid var(--stroke);
}

.footer-inner {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 48px;
    max-width: 1140px;
    margin: 0 auto;
    padding: 80px 40px 64px;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-brand-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 18px;
    color: var(--primary);
}

.footer-brand-logo img {
    width: 28px;
    height: 28px;
}

.footer-copy {
    font-size: 12px;
    color: var(--secondary);
}

.footer-column {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.footer-heading {
    margin: 0 0 4px;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
}

.footer-column a {
    font-size: 14px;
    color: var(--secondary);
    text-decoration: none;
    transition: color 0.15s ease;
}

.footer-column a:hover {
    color: var(--primary);
}

.docs-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
}

.docs-sidebar {
    position: sticky;
    top: 64px;
    align-self: start;
    max-height: calc(100vh - 64px);
    overflow-y: auto;
    padding: 32px 20px;
    scrollbar-width: none;
}

.docs-sidebar::-webkit-scrollbar {
    display: none;
}

.docs-content {
    min-width: 0;
}

.docs-layout .docs-content {
    position: relative;
    max-width: none;
    margin: 0;
    padding: 48px 48px 64px 64px;
}

.docs-content-inner {
    max-width: 760px;
    margin: 0 auto;
}

.docs-layout .docs-content::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 1px;
    background: var(--stroke);
    pointer-events: none;
}

.docs-nav-list,
.docs-nav-sublist {
    list-style: none;
    padding: 0;
    margin: 0;
}

.docs-nav-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.docs-nav-item,
.docs-nav-sublist li {
    margin: 0;
}

.docs-nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 32px;
    padding: 0 10px;
    border-radius: 8px;
    font-size: 14px;
    color: var(--secondary);
    text-decoration: none;
    transition:
        background 0.15s ease,
        color 0.15s ease;
}

.docs-nav-link:hover {
    color: var(--primary);
    background: var(--surface);
}

.docs-nav-link.active {
    color: var(--primary);
    background: var(--surface);
    font-weight: 500;
}

.docs-nav-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary);
}

.docs-nav-link.active .docs-nav-icon {
    color: var(--primary);
}

.docs-nav-icon svg {
    width: 20px;
    height: 20px;
}

.docs-nav-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.docs-nav-sublist {
    position: relative;
    margin: 2px 0 6px;
}

.docs-nav-sublist::before {
    content: "";
    position: absolute;
    left: 19px;
    top: 2px;
    bottom: 2px;
    width: 1px;
    background: var(--stroke);
}

.docs-nav-sublink {
    display: block;
    height: 32px;
    line-height: 32px;
    padding: 0 10px 0 40px;
    border-radius: 8px;
    font-size: 14px;
    color: var(--tertiary);
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.15s ease;
}

.docs-nav-sublink:hover {
    color: var(--secondary);
}

.docs-nav-sublink.active {
    color: var(--secondary);
    font-weight: 500;
}

:where(.docs-content) h1 {
    font-size: 36px;
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}

:where(.docs-content) .docs-lede {
    font-size: 18px;
    color: var(--secondary);
    line-height: 1.5;
    margin-bottom: 40px;
}

:where(.docs-content) h2 {
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin-top: 48px;
    margin-bottom: 12px;
    line-height: 1.3;
    scroll-margin-top: 80px;
}

:where(.docs-content) h3 {
    font-size: 20px;
    font-weight: 600;
    margin-top: 32px;
    margin-bottom: 8px;
    line-height: 1.3;
    scroll-margin-top: 80px;
}

:where(.docs-content) p {
    font-size: 16px;
    line-height: 1.65;
    color: var(--primary);
    margin-bottom: 16px;
}

:where(.docs-content) ul,
:where(.docs-content) ol {
    padding-left: 24px;
    margin-bottom: 16px;
}

:where(.docs-content) li > ul,
:where(.docs-content) li > ol {
    margin-top: 8px;
    margin-bottom: 0;
}

:where(.docs-content) li {
    font-size: 16px;
    line-height: 1.65;
    color: var(--primary);
    margin-bottom: 8px;
}

:where(.docs-content) strong {
    font-weight: 600;
}

.docs-content a,
.docs-content a:visited,
.docs-content a:hover,
.docs-content a:focus,
.docs-content a:active {
    color: var(--accent);
}

:where(.docs-content) code,
:where(.docs-content) kbd {
    font-family: var(--font-mono);
    font-size: 0.9em;
    background: var(--surface);
    padding: 2px 6px;
    border-radius: 4px;
}

:where(.docs-content) pre {
    background: var(--surface);
    padding: 16px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 0;
    line-height: 1.5;
}

:where(.docs-content) pre code {
    background: transparent;
    padding: 0;
    border-radius: 0;
    font-size: 0.85em;
}

.tool-table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    table-layout: fixed;
}

.tool-table th,
.tool-table td {
    padding: 10px 16px 10px 0;
    border-top: 1px solid var(--stroke);
    vertical-align: top;
    line-height: 1.5;
    text-align: left;
}

.tool-table th {
    font-weight: 600;
    color: var(--primary);
    border-top: 0;
    border-bottom: 1px solid var(--stroke);
    padding-bottom: 12px;
}

.tool-table tr:last-child td {
    border-bottom: 1px solid var(--stroke);
}

.tool-table th:first-child,
.tool-table td:first-child {
    width: 30%;
}

.tool-table td:first-child code {
    font-weight: 400;
    overflow-wrap: anywhere;
}

:where(.docs-content) blockquote {
    background: var(--surface);
    border-left: 3px solid var(--accent);
    padding: 16px 20px;
    border-radius: 0 8px 8px 0;
    margin: 16px 0;
    color: var(--primary);
    font-family: var(--font-sans);
    font-style: normal;
}

:where(.docs-content) blockquote p:last-child {
    margin-bottom: 0;
}

.docs-code-wrap {
    position: relative;
    margin: 16px 0;
    padding-right: 44px;
    background: var(--surface);
    border-radius: 8px;
}

.copy-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--secondary);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.copy-btn svg {
    width: 20px;
    height: 20px;
    display: block;
}

.copy-btn .copy-btn-check {
    display: none;
}

.copy-btn.is-copied .copy-btn-copy {
    display: none;
}

.copy-btn.is-copied .copy-btn-check {
    display: block;
}

.docs-content h1.is-pro::after,
.docs-content h2.is-pro::after {
    content: "Pro";
    display: inline-block;
    margin-left: 12px;
    padding: 2px 8px;
    background: var(--bg-tint-brand);
    color: var(--accent);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: normal;
    border-radius: 999px;
    vertical-align: middle;
}

@media (max-width: 768px) {
    .docs-layout {
        grid-template-columns: 1fr;
        padding: 32px 24px 56px;
    }

    .docs-sidebar {
        position: static;
        max-height: none;
        overflow-y: visible;
        padding: 0 0 24px;
        border-bottom: 1px solid var(--stroke);
    }

    .docs-layout .docs-content {
        padding: 32px 0 0;
    }

    .docs-layout .docs-content::before {
        display: none;
    }

    :where(.docs-content) h1 {
        font-size: 28px;
    }

    :where(.docs-content) h2 {
        font-size: 22px;
        margin-top: 40px;
    }

    .footer-inner {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
        padding: 56px 24px 48px;
    }

    .footer-brand {
        grid-column: 1 / -1;
    }
}

@media (max-width: 480px) {
    .docs-layout {
        padding: 24px 20px 40px;
    }

    :where(.docs-content) h1 {
        font-size: 24px;
    }

    :where(.docs-content) h2 {
        font-size: 20px;
        margin-top: 32px;
    }

    .footer-inner {
        grid-template-columns: 1fr;
        gap: 32px;
        padding: 40px 20px;
    }

    .footer-brand {
        grid-column: auto;
    }
}
