:root {
    color-scheme: light;
    --bg: #f6f7fb;
    --bg-soft: #eef1f8;
    --surface: #ffffff;
    --surface-2: #f3f5fa;
    --surface-3: #e9edf5;
    --text: #18202c;
    --muted: #5d697c;
    --faint: #8792a4;
    --border: #dce2ec;
    --border-strong: #c4cddd;
    --accent: #5957d9;
    --accent-2: #0891b2;
    --accent-soft: #ecebff;
    --green: #087f5b;
    --green-soft: #e4f7ef;
    --amber: #a16207;
    --amber-soft: #fff6df;
    --red: #c92a2a;
    --red-soft: #ffe9e9;
    --code-bg: #111827;
    --code-bg-soft: #182134;
    --code-text: #e6edf7;
    --code-muted: #93a4bd;
    --code-keyword: #c4b5fd;
    --code-string: #86efac;
    --code-comment: #8092ad;
    --code-number: #fca5a5;
    --code-tag: #7dd3fc;
    --code-type: #fde68a;
    --code-property: #93c5fd;
    --code-preproc: #f0abfc;
    --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .08);
    --shadow: 0 14px 40px rgba(16, 24, 40, .10);
    --shadow-lg: 0 28px 70px rgba(16, 24, 40, .16);
    --radius-sm: 8px;
    --radius: 14px;
    --radius-lg: 22px;
    --topbar-height: 64px;
    --sidebar-width: 274px;
    --content-width: 850px;
    --font-sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

[data-theme="dark"] {
    color-scheme: dark;
    --bg: #0b1018;
    --bg-soft: #101827;
    --surface: #121a28;
    --surface-2: #172233;
    --surface-3: #1d2a3e;
    --text: #e7edf6;
    --muted: #a5b2c5;
    --faint: #7d8ba1;
    --border: #243248;
    --border-strong: #334461;
    --accent: #9a97ff;
    --accent-2: #43d3e8;
    --accent-soft: #1f2148;
    --green: #4ade80;
    --green-soft: #123326;
    --amber: #fbbf24;
    --amber-soft: #36280d;
    --red: #ff8a8a;
    --red-soft: #3a1719;
    --code-bg: #0a0f18;
    --code-bg-soft: #101927;
    --code-text: #e7edf6;
    --code-muted: #8294ad;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .2);
    --shadow: 0 14px 40px rgba(0, 0, 0, .32);
    --shadow-lg: 0 28px 70px rgba(0, 0, 0, .45);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--topbar-height) + 24px);
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.65;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

img,
svg {
    max-width: 100%;
}

code,
kbd,
pre,
samp {
    font-family: var(--font-mono);
}

:focus-visible {
    outline: 2px solid var(--accent-2);
    outline-offset: 3px;
    border-radius: 4px;
}

.skip-link {
    position: fixed;
    top: -100px;
    left: 16px;
    z-index: 1000;
    padding: 10px 14px;
    border-radius: 8px;
    background: var(--surface);
    color: var(--text);
    box-shadow: var(--shadow);
}

.skip-link:focus {
    top: 12px;
}

/* ---------------------------------------------------------------- top bar */

.topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 14px;
    height: var(--topbar-height);
    padding: 0 22px;
    border-bottom: 1px solid color-mix(in srgb, var(--border) 76%, transparent);
    background: color-mix(in srgb, var(--bg) 84%, transparent);
    backdrop-filter: blur(18px) saturate(150%);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-weight: 750;
    letter-spacing: -.02em;
    white-space: nowrap;
}

.brand:hover {
    text-decoration: none;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #fff;
    font-size: 19px;
    font-weight: 850;
    box-shadow: 0 7px 18px color-mix(in srgb, var(--accent) 35%, transparent);
}

.brand-name {
    font-size: 17px;
}

.brand-tag {
    padding: 2px 7px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 750;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.topbar-spacer {
    flex: 1;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.topbar-link,
.theme-toggle,
.menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--surface);
    color: var(--muted);
    font: inherit;
    font-size: 13px;
    font-weight: 650;
    cursor: pointer;
}

.topbar-link:hover,
.theme-toggle:hover,
.menu-toggle:hover {
    border-color: var(--border-strong);
    background: var(--surface-2);
    color: var(--text);
    text-decoration: none;
}

.theme-toggle {
    width: 38px;
    padding: 0;
    font-size: 16px;
}

.menu-toggle {
    display: none;
    width: 38px;
    padding: 0;
    font-size: 18px;
}

/* ---------------------------------------------------------------- layout */

.layout {
    display: grid;
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
    gap: 0;
    max-width: 1440px;
    margin: 0 auto;
}

.sidebar {
    position: sticky;
    top: var(--topbar-height);
    display: flex;
    flex-direction: column;
    gap: 26px;
    height: calc(100vh - var(--topbar-height));
    padding: 28px 20px 32px 24px;
    overflow-y: auto;
    border-right: 1px solid var(--border);
    scrollbar-width: thin;
}

.nav {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.nav-group {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.nav-label {
    margin-bottom: 6px;
    padding-left: 11px;
    color: var(--faint);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.nav a {
    position: relative;
    padding: 7px 11px;
    border-radius: 8px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 550;
    line-height: 1.35;
}

.nav a.nav-sub {
    padding-left: 24px;
    color: var(--faint);
    font-size: 13px;
    font-weight: 500;
}

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

.nav a.nav-sub.is-active {
    color: var(--accent);
    font-weight: 700;
}

.nav a:hover {
    background: var(--surface-2);
    color: var(--text);
    text-decoration: none;
}

.nav a.is-active {
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 700;
}

.nav a.is-active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 3px;
    border-radius: 4px;
    background: linear-gradient(var(--accent), var(--accent-2));
}

.sidebar-footer {
    margin-top: auto;
    padding: 16px 11px 0;
    border-top: 1px solid var(--border);
    color: var(--faint);
    font-size: 12px;
    line-height: 1.7;
}

.sidebar-footer a {
    display: block;
    color: var(--muted);
    font-weight: 600;
}

/* ---------------------------------------------------------------- content */

.content {
    width: 100%;
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 42px 40px 80px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: var(--faint);
    font-size: 12px;
    font-weight: 650;
    letter-spacing: .02em;
}

.breadcrumb span {
    opacity: .55;
}

h1,
h2,
h3,
h4 {
    color: var(--text);
    line-height: 1.22;
    letter-spacing: -.025em;
}

h1 {
    margin: 0 0 18px;
    font-size: clamp(34px, 5vw, 46px);
    font-weight: 820;
}

h2 {
    margin: 48px 0 14px;
    padding-top: 8px;
    font-size: 27px;
    font-weight: 780;
}

h3 {
    margin: 32px 0 10px;
    font-size: 19px;
    font-weight: 730;
}

h4 {
    margin: 24px 0 8px;
    font-size: 16px;
    font-weight: 700;
}

h2:target,
h3:target {
    scroll-margin-top: calc(var(--topbar-height) + 20px);
}

p {
    margin: 0 0 16px;
}

.lead {
    margin: 0 0 28px;
    color: var(--muted);
    font-size: 19px;
    line-height: 1.6;
}

ul,
ol {
    margin: 0 0 18px;
    padding-left: 24px;
}

li {
    margin: 6px 0;
}

li > ul,
li > ol {
    margin-top: 6px;
}

strong {
    color: var(--text);
    font-weight: 700;
}

hr {
    height: 1px;
    margin: 40px 0;
    border: 0;
    background: var(--border);
}

blockquote {
    margin: 22px 0;
    padding: 2px 0 2px 18px;
    border-left: 3px solid var(--border-strong);
    color: var(--muted);
}

/* ---------------------------------------------------------------- links / tags */

.doc-link-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 22px 0 8px;
}

.doc-link {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text);
    box-shadow: var(--shadow-sm);
    transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.doc-link:hover {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
    box-shadow: var(--shadow);
    text-decoration: none;
}

.doc-link strong {
    font-size: 15px;
}

.doc-link span {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
}

.pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin: 18px 0 24px;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 9px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    color: var(--muted);
    font-size: 12px;
    font-weight: 650;
}

.pill.accent {
    border-color: color-mix(in srgb, var(--accent) 30%, var(--border));
    background: var(--accent-soft);
    color: var(--accent);
}

/* ---------------------------------------------------------------- code */

.code {
    position: relative;
    margin: 18px 0 24px;
    border: 1px solid color-mix(in srgb, var(--border) 55%, transparent);
    border-radius: var(--radius);
    background: var(--code-bg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.code::before {
    content: attr(data-label);
    display: block;
    padding: 9px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, .07);
    background: rgba(255, 255, 255, .025);
    color: var(--code-muted);
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.code pre {
    margin: 0;
    padding: 17px 18px;
    overflow-x: auto;
    color: var(--code-text);
    font-size: 13.5px;
    line-height: 1.68;
    tab-size: 4;
    scrollbar-width: thin;
}

.code code {
    font: inherit;
}

.tok-keyword {
    color: var(--code-keyword);
}

.tok-string {
    color: var(--code-string);
}

.tok-comment {
    color: var(--code-comment);
    font-style: italic;
}

.tok-number {
    color: var(--code-number);
}

.tok-tag {
    color: var(--code-tag);
}

.tok-type {
    color: var(--code-type);
}

.tok-property {
    color: var(--code-property);
}

.tok-preproc {
    color: var(--code-preproc);
}

.code .copy-code {
    position: absolute;
    top: 7px;
    right: 9px;
    z-index: 2;
    padding: 4px 8px;
    border: 1px solid rgba(255, 255, 255, .13);
    border-radius: 6px;
    background: rgba(255, 255, 255, .05);
    color: var(--code-muted);
    font: inherit;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    cursor: pointer;
    opacity: .55;
    transition: opacity .15s ease, color .15s ease, background .15s ease;
}

.code:hover .copy-code,
.copy-code:focus-visible {
    opacity: 1;
}

.copy-code:hover {
    background: rgba(255, 255, 255, .1);
    color: var(--code-text);
}

code {
    padding: 2px 5px;
    border: 1px solid var(--border);
    border-radius: 5px;
    background: var(--surface-2);
    color: var(--text);
    font-size: .88em;
}

.code code {
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font-size: inherit;
}

kbd {
    display: inline-block;
    min-width: 22px;
    padding: 1px 6px;
    border: 1px solid var(--border-strong);
    border-bottom-width: 2px;
    border-radius: 5px;
    background: var(--surface-2);
    color: var(--text);
    font-size: 12px;
    font-weight: 650;
    text-align: center;
}

/* ---------------------------------------------------------------- callouts */

.callout {
    position: relative;
    margin: 22px 0;
    padding: 15px 18px 15px 46px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--muted);
    font-size: 14.5px;
    line-height: 1.6;
}

.callout::before {
    position: absolute;
    left: 17px;
    top: 15px;
    font-size: 17px;
    line-height: 1.4;
}

.callout strong {
    display: block;
    margin-bottom: 3px;
    color: var(--text);
    font-size: 13px;
    letter-spacing: .01em;
}

.callout.note {
    border-color: color-mix(in srgb, var(--accent) 26%, var(--border));
    background: color-mix(in srgb, var(--accent-soft) 45%, var(--surface));
}

.callout.note::before {
    content: "◆";
    color: var(--accent);
}

.callout.tip {
    border-color: color-mix(in srgb, var(--green) 26%, var(--border));
    background: color-mix(in srgb, var(--green-soft) 45%, var(--surface));
}

.callout.tip::before {
    content: "✦";
    color: var(--green);
}

.callout.warning {
    border-color: color-mix(in srgb, var(--amber) 28%, var(--border));
    background: color-mix(in srgb, var(--amber-soft) 50%, var(--surface));
}

.callout.warning::before {
    content: "!";
    color: var(--amber);
    font-weight: 850;
}

/* ---------------------------------------------------------------- tables */

.table-filter {
    width: 100%;
    max-width: 440px;
    margin: 0 0 14px;
    padding: 10px 13px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-size: 14px;
}

.table-filter:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.table-wrap {
    margin: 20px 0 26px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    line-height: 1.55;
}

th,
td {
    padding: 11px 14px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}

th {
    background: var(--surface-2);
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    white-space: nowrap;
}

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

td code {
    white-space: nowrap;
}

.table-note {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}

/* ---------------------------------------------------------------- trees / steps */

.tree {
    margin: 18px 0 24px;
    padding: 18px 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-2);
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.75;
    overflow-x: auto;
    white-space: pre;
}

.steps {
    counter-reset: step;
    list-style: none;
    padding-left: 0;
}

.steps > li {
    position: relative;
    margin: 0 0 18px;
    padding-left: 46px;
}

.steps > li::before {
    counter-increment: step;
    content: counter(step);
    position: absolute;
    left: 0;
    top: -1px;
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border: 1px solid color-mix(in srgb, var(--accent) 25%, var(--border));
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 12px;
    font-weight: 800;
}

/* ---------------------------------------------------------------- landing */

.landing {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 28px 80px;
}

.hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(360px, .9fr);
    gap: 42px;
    align-items: center;
    padding: 74px 0 64px;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 8% -8% 14% 45%;
    z-index: -1;
    border-radius: 50%;
    background:
        radial-gradient(circle at 40% 35%, color-mix(in srgb, var(--accent) 26%, transparent), transparent 58%),
        radial-gradient(circle at 70% 70%, color-mix(in srgb, var(--accent-2) 22%, transparent), transparent 55%);
    filter: blur(38px);
    opacity: .85;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 5px 11px;
    border: 1px solid color-mix(in srgb, var(--accent) 25%, var(--border));
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 12px;
    font-weight: 750;
    letter-spacing: .02em;
}

.hero h1 {
    margin: 0 0 20px;
    font-size: clamp(44px, 7vw, 74px);
    font-weight: 860;
    letter-spacing: -.045em;
    line-height: .98;
}

.hero h1 .gradient {
    background: linear-gradient(92deg, var(--accent) 5%, var(--accent-2) 78%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero .lead {
    max-width: 620px;
    font-size: 20px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 28px 0 0;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text);
    font-size: 14px;
    font-weight: 700;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.button:hover {
    transform: translateY(-1px);
    border-color: var(--border-strong);
    box-shadow: var(--shadow);
    text-decoration: none;
}

.button.primary {
    border-color: transparent;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #fff;
    box-shadow: 0 12px 26px color-mix(in srgb, var(--accent) 32%, transparent);
}

.hero-code {
    position: relative;
    transform: rotate(1.2deg);
    box-shadow: var(--shadow-lg);
}

.hero-code .code {
    margin: 0;
}

.hero-code.tilt-left {
    transform: rotate(-1.4deg);
}

.section-head {
    margin: 54px 0 22px;
}

.section-head p {
    margin: 6px 0 0;
    color: var(--muted);
}

.eyebrow {
    margin-bottom: 8px;
    color: var(--accent);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
}

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

.feature {
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.feature-icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    margin-bottom: 14px;
    border-radius: 10px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 18px;
}

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

.feature p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
}

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

.start-card {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text);
    box-shadow: var(--shadow-sm);
    transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.start-card:hover {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
    box-shadow: var(--shadow);
    text-decoration: none;
}

.start-number {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #fff;
    font-size: 13px;
    font-weight: 850;
}

.start-card h3 {
    margin: 1px 0 4px;
    font-size: 16px;
}

.start-card p {
    margin: 0;
    color: var(--muted);
    font-size: 13.5px;
    line-height: 1.55;
}

.host-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.host-strip span {
    padding: 6px 11px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    color: var(--muted);
    font-size: 12px;
    font-weight: 650;
}

/* ---------------------------------------------------------------- footer */

.page-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
    justify-content: space-between;
    margin-top: 54px;
    padding-top: 22px;
    border-top: 1px solid var(--border);
    color: var(--faint);
    font-size: 12.5px;
}

.page-footer p {
    margin: 0;
}

.page-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: space-between;
    margin-top: 48px;
    padding-top: 22px;
    border-top: 1px solid var(--border);
}

.page-nav a {
    display: inline-flex;
    flex-direction: column;
    gap: 2px;
    min-width: 180px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text);
    font-weight: 650;
    box-shadow: var(--shadow-sm);
}

.page-nav a:hover {
    border-color: var(--border-strong);
    text-decoration: none;
}

.page-nav a span {
    color: var(--faint);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.page-nav a.next {
    text-align: right;
}

/* ---------------------------------------------------------------- responsive */

@media (max-width: 980px) {
    .hero {
        grid-template-columns: 1fr;
        gap: 28px;
        padding: 46px 0 40px;
    }

    .hero-code {
        transform: none;
    }

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

@media (max-width: 820px) {
    .menu-toggle {
        display: inline-flex;
    }

    .layout {
        display: block;
    }

    .sidebar {
        position: fixed;
        top: var(--topbar-height);
        left: 0;
        z-index: 90;
        width: min(86vw, 320px);
        height: calc(100vh - var(--topbar-height));
        border-right: 1px solid var(--border);
        background: var(--bg);
        box-shadow: var(--shadow-lg);
        transform: translateX(-105%);
        transition: transform .2s ease;
    }

    body.sidebar-open .sidebar {
        transform: translateX(0);
    }

    body.sidebar-open::after {
        content: "";
        position: fixed;
        inset: var(--topbar-height) 0 0;
        z-index: 80;
        background: rgba(8, 12, 20, .45);
        backdrop-filter: blur(2px);
    }

    .content {
        padding: 30px 22px 60px;
    }

    .landing {
        padding: 0 20px 60px;
    }

    .doc-link-grid,
    .start-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .topbar {
        padding: 0 14px;
    }

    .brand-tag {
        display: none;
    }

    .topbar-link {
        display: none;
    }

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

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

    .content {
        padding: 26px 16px 54px;
    }

    h1 {
        font-size: 33px;
    }

    h2 {
        font-size: 23px;
    }

    .page-nav a {
        min-width: 0;
        flex: 1;
    }
}

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

@media print {
    .topbar,
    .sidebar,
    .page-nav,
    .copy-code {
        display: none !important;
    }

    .layout {
        display: block;
    }

    .content {
        max-width: none;
        padding: 0;
    }

    .code {
        break-inside: avoid;
    }
}
