:root {
    color-scheme: dark;
    --page: #101217;
    --surface: #171a20;
    --surface-soft: #13161b;
    --border: #2b3039;
    --border-strong: #414854;
    --text: #f4f5f7;
    --muted: #a3a9b3;
    --accent: #82d49a;
    --accent-ink: #102016;
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    background: var(--page);
}

body {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    color: var(--text);
    background: var(--page);
    font-size: 16px;
    line-height: 1.65;
}

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

.site {
    width: min(100% - 2rem, 1000px);
    margin: 0 auto;
    padding: 1.5rem 0 4rem;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    color: var(--text);
    font-size: 0.95rem;
    font-weight: 760;
    text-decoration: none;
    white-space: nowrap;
}

.brand-logo {
    width: 54px;
    height: 38px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    object-fit: cover;
    object-position: center;
}

.nav {
    display: flex;
    align-items: center;
    gap: clamp(0.9rem, 3vw, 1.6rem);
}

.nav a {
    position: relative;
    padding: 0.35rem 0;
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 660;
    text-decoration: none;
    white-space: nowrap;
}

.nav a::after {
    position: absolute;
    right: 0;
    bottom: -1.1rem;
    left: 0;
    height: 2px;
    background: transparent;
    content: "";
}

.nav a:hover,
.nav a.active {
    color: var(--text);
}

.nav a.active::after {
    background: var(--accent);
}

.language-switch {
    display: inline-flex;
    flex: 0 0 auto;
    gap: 0.2rem;
    padding: 0.2rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-soft);
}

.language-switch a {
    display: inline-flex;
    min-width: 44px;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 760;
    text-decoration: none;
}

.language-switch a:hover,
.language-switch a[aria-current="true"] {
    color: var(--text);
    background: var(--surface);
}

.hero {
    max-width: 780px;
    margin: clamp(4.5rem, 10vw, 7rem) 0 clamp(4.5rem, 9vw, 6.5rem);
}

.eyebrow {
    margin: 0 0 0.65rem;
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 760;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

h1,
h2,
h3 {
    line-height: 1.2;
    letter-spacing: -0.025em;
}

h1 {
    max-width: 760px;
    margin: 0 0 1rem;
    font-size: clamp(2.35rem, 7vw, 3.9rem);
    font-weight: 760;
}

h2 {
    margin: 0 0 0.9rem;
    font-size: clamp(1.6rem, 4vw, 2.15rem);
    font-weight: 740;
}

h3 {
    margin: 0 0 0.45rem;
    font-size: 1.05rem;
}

.lead {
    max-width: 720px;
    margin: 0;
    color: var(--muted);
    font-size: clamp(1.05rem, 2.4vw, 1.2rem);
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    margin-top: 1.75rem;
}

.button {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 1rem;
    border: 1px solid var(--accent);
    border-radius: 8px;
    color: var(--accent-ink);
    background: var(--accent);
    font-size: 0.92rem;
    font-weight: 740;
    text-decoration: none;
}

.button.secondary {
    border-color: var(--border-strong);
    color: var(--text);
    background: transparent;
}

.section {
    margin-top: 4rem;
    padding-top: 2.5rem;
    border-top: 1px solid var(--border);
    scroll-margin-top: 2rem;
}

.section > p:not(.eyebrow):not(.note) {
    max-width: 780px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
    margin-top: 1.4rem;
}

.card {
    padding: 1.25rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
}

.card p:last-child {
    margin-bottom: 0;
}

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

.steps {
    display: grid;
    max-width: 820px;
    gap: 0;
    margin-top: 1.5rem;
    padding: 0;
    border-bottom: 1px solid var(--border);
    counter-reset: steps;
    list-style: none;
}

.steps li {
    position: relative;
    min-height: 54px;
    padding: 0.85rem 0 0.85rem 3.25rem;
    border-top: 1px solid var(--border);
}

.steps li::before {
    position: absolute;
    top: 0.85rem;
    left: 0;
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border: 1px solid var(--border-strong);
    border-radius: 50%;
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 800;
    counter-increment: steps;
    content: counter(steps);
}

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

code {
    padding: 0.12em 0.32em;
    border-radius: 4px;
    color: var(--text);
    background: var(--surface);
}

pre {
    overflow-x: auto;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: #d9e8dd;
    background: #0b0d10;
    font-size: 0.85rem;
    line-height: 1.55;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 0.8rem;
    border-bottom: 1px solid var(--border);
    text-align: left;
}

th {
    color: var(--muted);
    font-size: 0.76rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.note {
    max-width: 820px;
    padding: 0.9rem 1rem;
    border-left: 2px solid var(--accent);
    color: var(--muted);
    background: var(--surface-soft);
}

.footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.84rem;
}

.footer a {
    color: var(--muted);
    text-decoration: none;
}

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

.footer-links {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
}

.legal-hero {
    margin-bottom: 3.5rem;
}

.legal-content {
    max-width: 820px;
}

.legal-content section {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.legal-content h2 {
    font-size: clamp(1.35rem, 3vw, 1.75rem);
}

.legal-content h3 {
    margin-top: 1.5rem;
}

.legal-content address {
    font-style: normal;
}

.legal-content ul {
    padding-left: 1.25rem;
}

.legal-content li + li {
    margin-top: 0.35rem;
}

.docs-page .site {
    width: min(100% - 2rem, 1240px);
}

.docs-layout {
    display: grid;
    grid-template-columns: 224px minmax(0, 860px);
    gap: clamp(2rem, 5vw, 4.5rem);
    align-items: start;
    justify-content: center;
    margin-top: 2rem;
}

.docs-sidebar {
    position: sticky;
    top: 1.25rem;
    max-height: calc(100vh - 2.5rem);
    overflow-y: auto;
    padding: 0 1.15rem 1.5rem 0;
    border-right: 1px solid var(--border);
    scrollbar-width: thin;
}

.docs-sidebar nav {
    display: grid;
    gap: 0.15rem;
}

.docs-sidebar-title {
    margin: 1.35rem 0 0.35rem;
    color: var(--text);
    font-size: 0.73rem;
    font-weight: 780;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.docs-sidebar-title:first-child {
    margin-top: 0;
}

.docs-sidebar a,
.docs-mobile-toc a {
    min-height: 38px;
    padding: 0.45rem 0.65rem;
    border-radius: 6px;
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 620;
    line-height: 1.35;
    text-decoration: none;
}

.docs-sidebar a:hover,
.docs-sidebar a.active,
.docs-sidebar a[aria-current="page"],
.docs-mobile-toc a:hover,
.docs-mobile-toc a.active {
    color: var(--text);
    background: var(--surface);
}

.docs-sidebar a.active,
.docs-sidebar a[aria-current="page"] {
    box-shadow: inset 2px 0 var(--accent);
}

.docs-content {
    min-width: 0;
    min-height: 68vh;
}

.docs-content .hero {
    max-width: 820px;
    margin: clamp(2.5rem, 7vw, 5rem) 0;
}

.docs-content .section {
    margin: 0;
    padding: clamp(2.5rem, 6vw, 4.5rem) 0;
    border-top: 0;
}

.docs-content .section > h2 {
    max-width: 760px;
}

.docs-content .docs-article[hidden] {
    display: none;
}

.docs-mobile-toc {
    display: none;
}

.docs-pagination {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.docs-pagination a {
    min-width: 0;
    min-height: 74px;
    padding: 0.8rem 0.9rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    text-decoration: none;
}

.docs-pagination a:last-child {
    text-align: right;
}

.docs-pagination a:hover {
    border-color: var(--accent);
    background: var(--surface);
}

.docs-pagination span,
.docs-pagination strong {
    display: block;
}

.docs-pagination span {
    margin-bottom: 0.25rem;
    color: var(--muted);
    font-size: 0.78rem;
}

.docs-pagination strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.docs-pagination a[hidden] {
    display: block;
    visibility: hidden;
}

.docs-content :focus-visible,
.docs-sidebar a:focus-visible,
.docs-mobile-toc :focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

@media (max-width: 680px) {
    .site {
        width: min(100% - 1.25rem, 1000px);
        padding-top: 1rem;
    }

    .topbar {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.8rem;
    }

    .nav {
        width: 100%;
        justify-content: space-between;
        gap: 0.75rem;
    }

    .language-switch {
        align-self: flex-end;
    }

    .nav a {
        font-size: 0.82rem;
    }

    .nav a::after {
        bottom: -0.9rem;
    }

    .hero {
        margin-top: 3.75rem;
    }

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

@media (max-width: 900px) {
    .docs-page .site {
        width: min(100% - 1.25rem, 860px);
    }

    .docs-layout {
        display: block;
        margin-top: 0;
    }

    .docs-sidebar {
        display: none;
    }

    .docs-mobile-toc {
        position: sticky;
        z-index: 10;
        top: 0;
        display: block;
        margin: 1rem 0 0;
        border: 1px solid var(--border);
        border-radius: 8px;
        background: var(--surface);
        background: color-mix(in srgb, var(--surface) 94%, transparent);
        backdrop-filter: blur(14px);
    }

    .docs-mobile-toc summary {
        min-height: 48px;
        padding: 0.7rem 2.5rem 0.7rem 0.9rem;
        cursor: pointer;
        color: var(--text);
        font-weight: 720;
    }

    .docs-mobile-toc nav {
        display: grid;
        max-height: min(60vh, 420px);
        overflow-y: auto;
        gap: 0.15rem;
        padding: 0.35rem 0.45rem 0.55rem;
        border-top: 1px solid var(--border);
    }

    .docs-mobile-toc .docs-sidebar-title {
        margin: 0.9rem 0.65rem 0.25rem;
    }

    .docs-mobile-toc .docs-sidebar-title:first-child {
        margin-top: 0.35rem;
    }

    .docs-mobile-toc a {
        display: flex;
        min-height: 44px;
        align-items: center;
    }

    .docs-content .hero,
    .docs-content .section {
        margin-top: 0;
        padding-top: 2.5rem;
    }

    .docs-pagination {
        margin-top: 0.5rem;
        padding-bottom: 1rem;
    }
}

@media (max-width: 480px) {
    .docs-pagination {
        grid-template-columns: 1fr;
    }

    .docs-pagination a:last-child {
        text-align: left;
    }
}
