:root {
    color-scheme: dark;
    --bg: #171918;
    --surface: #1d201f;
    --surface-raised: #242725;
    --text: #f4f6f4;
    --muted: #a9b0aa;
    --faint: #747c75;
    --border: #303632;
    --border-strong: #414942;
    --accent: #45c57a;
    --accent-soft: rgba(69, 197, 122, 0.14);
    --blue: #76a7ff;
    --violet: #bc9bff;
    --header-height: 65px;
    --sidebar-width: 277px;
    --article-width: 760px;
}

html[data-theme="light"] {
    color-scheme: light;
    --bg: #ffffff;
    --surface: #fbfcfb;
    --surface-raised: #f4f7f4;
    --text: #172019;
    --muted: #5f6b61;
    --faint: #7c877e;
    --border: #e0e6e1;
    --border-strong: #cbd5cd;
    --accent: #15803d;
    --accent-soft: rgba(21, 128, 61, 0.1);
    --blue: #376ecb;
    --violet: #744bc6;
}

* { box-sizing: border-box; }

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

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 15px;
    line-height: 1.7;
    text-rendering: optimizeLegibility;
}

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

.skip-link {
    position: fixed;
    z-index: 100;
    left: 18px;
    top: -80px;
    padding: 8px 14px;
    background: var(--accent);
    border-radius: 8px;
    color: #092111;
    font-weight: 700;
    transition: top .15s ease;
}
.skip-link:focus { top: 16px; }

.docs-header {
    position: sticky;
    top: 0;
    z-index: 30;
    height: var(--header-height);
    border-bottom: 1px solid var(--border);
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: blur(16px);
}
.docs-header__inner { height: 100%; display: flex; align-items: center; gap: 18px; padding: 0 24px; }
.brand { display: flex; align-items: center; flex: 0 0 auto; gap: 10px; font-size: 15px; font-weight: 600; letter-spacing: -.02em; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.brand b { font-weight: 800; }

.icon-button {
    display: inline-grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    transition: background .16s ease, border-color .16s ease, color .16s ease;
}
.icon-button:hover { background: var(--surface-raised); border-color: var(--border); color: var(--text); }
.icon-button:focus-visible, a:focus-visible, input:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.icon-button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.docs-menu-button { display: none; position: relative; padding: 9px; }
.docs-menu-button span { display: block; width: 16px; height: 1.5px; margin: 3px 0; background: currentColor; border-radius: 2px; }

.docs-search { position: relative; display: flex; align-items: center; max-width: 380px; flex: 1; margin-left: 4px; }
.docs-search svg { position: absolute; left: 12px; width: 16px; height: 16px; fill: none; stroke: var(--faint); stroke-linecap: round; stroke-width: 1.8; }
.docs-search input { width: 100%; height: 36px; padding: 0 54px 0 36px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; font-size: 13px; outline: none; transition: border-color .16s ease, box-shadow .16s ease; }
.docs-search input::placeholder { color: var(--faint); }
.docs-search input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.docs-search kbd { position: absolute; right: 8px; border: 1px solid var(--border); border-radius: 4px; padding: 0 5px; color: var(--faint); font-size: 10px; line-height: 19px; }
.header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.language-switcher { position: relative; }
.language-switcher summary { display: flex; align-items: center; gap: 5px; min-width: 38px; height: 34px; padding: 0 8px; border: 1px solid transparent; border-radius: 8px; color: var(--muted); cursor: pointer; font-size: 11px; font-weight: 750; list-style: none; }
.language-switcher summary::-webkit-details-marker { display: none; }
.language-switcher summary::after { content: "⌄"; font-size: 12px; line-height: 1; }
.language-switcher[open] summary, .language-switcher summary:hover { border-color: var(--border); background: var(--surface-raised); color: var(--text); }
.language-switcher nav { position: absolute; z-index: 70; top: calc(100% + 7px); right: 0; display: grid; width: 142px; padding: 6px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); box-shadow: 0 15px 34px rgba(0,0,0,.2); }
.language-switcher nav a { padding: 6px 8px; border-radius: 5px; color: var(--muted); font-size: 12px; line-height: 1.35; }
.language-switcher nav a:hover { background: var(--surface-raised); color: var(--text); }
.language-switcher nav a.is-current { color: var(--accent); font-weight: 700; }
.back-link { color: var(--muted); font-size: 13px; font-weight: 500; transition: color .16s ease; }
.back-link:hover { color: var(--text); }
.back-link span { color: var(--accent); }

.docs-layout { display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); min-height: calc(100vh - var(--header-height)); }
.docs-sidebar { position: sticky; top: var(--header-height); height: calc(100vh - var(--header-height)); overflow-y: auto; padding: 27px 16px 40px 24px; border-right: 1px solid var(--border); background: var(--surface); scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
.sidebar-mobile-heading { display: none; }
.docs-sidebar nav { display: grid; gap: 2px; }
.nav-group { margin: 23px 10px 7px; color: var(--faint); font-size: 10px; font-weight: 700; letter-spacing: .09em; line-height: 1.3; }
.nav-group:first-of-type { margin-top: 25px; }
.nav-link { display: block; padding: 6px 10px; border-radius: 6px; color: var(--muted); font-size: 13px; font-weight: 500; line-height: 1.35; transition: background .15s ease, color .15s ease; }
.nav-link:hover { background: var(--surface-raised); color: var(--text); }
.nav-link.is-active { background: var(--accent-soft); color: var(--accent); }
.nav-link--child { padding-left: 21px; font-size: 12.5px; }

.docs-main { display: grid; grid-template-columns: minmax(0, var(--article-width)) minmax(150px, 210px); gap: clamp(38px, 6vw, 92px); justify-content: center; padding: 67px clamp(28px, 5.2vw, 86px) 85px; }
.docs-article { min-width: 0; }
.breadcrumbs { display: flex; gap: 8px; margin: 0 0 19px; color: var(--faint); font-size: 11px; font-weight: 600; }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--text); }
.docs-article section { padding-bottom: 62px; border-bottom: 1px solid var(--border); margin-bottom: 57px; }
.docs-article section:last-child { padding-bottom: 0; border-bottom: 0; margin-bottom: 0; }
.docs-article section.is-search-hidden { display: none; }

.eyebrow { margin: 0 0 10px; color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .11em; line-height: 1.4; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { color: var(--text); letter-spacing: -.035em; line-height: 1.16; }
h1 { max-width: 720px; margin-bottom: 20px; font-size: clamp(34px, 4.3vw, 51px); font-weight: 800; }
h2 { margin-bottom: 16px; font-size: clamp(26px, 2.7vw, 32px); font-weight: 750; }
h3 { margin-bottom: 8px; font-size: 16px; font-weight: 700; }
p { margin-bottom: 18px; color: var(--muted); }
p:last-child { margin-bottom: 0; }
.lead { max-width: 690px; margin-bottom: 31px; color: var(--muted); font-size: 17px; line-height: 1.65; }
.documentation-note { margin: 21px 0 0; color: var(--faint); font-size: 12px; line-height: 1.55; }
.docs-article a:not(.quick-start-card):not(.platform-card a):not(.store-links a):not(.support-button) { color: var(--accent); font-weight: 600; text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent); text-underline-offset: 3px; }
.docs-article a:not(.quick-start-card):not(.platform-card a):not(.store-links a):not(.support-button):hover { text-decoration-color: var(--accent); }

.quick-start-grid { display: grid; gap: 10px; margin: 0 0 29px; }
.quick-start-card { display: flex; align-items: center; gap: 14px; min-height: 74px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); transition: border-color .16s ease, background .16s ease, transform .16s ease; }
.quick-start-card:hover { border-color: var(--border-strong); background: var(--surface-raised); transform: translateY(-1px); }
.quick-start-card > span:nth-child(2) { display: grid; gap: 2px; }
.quick-start-card b { color: var(--text); font-size: 14px; }
.quick-start-card small { color: var(--muted); font-size: 12px; line-height: 1.35; }
.quick-start-card i { margin-left: auto; color: var(--faint); font-size: 19px; font-style: normal; }
.card-icon { display: grid; width: 38px; height: 38px; flex: 0 0 auto; place-items: center; border-radius: 9px; color: #fff; font-size: 11px; font-weight: 800; }
.card-icon--green { background: linear-gradient(135deg, #18a950, #62d88b); }
.card-icon--blue { background: linear-gradient(135deg, #3977dd, #8bc3ff); }
.card-icon--violet { background: linear-gradient(135deg, #7153d4, #c29fff); }

.callout { display: flex; gap: 12px; margin: 25px 0 0; padding: 15px 17px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); }
.callout svg { width: 18px; height: 18px; flex: 0 0 auto; margin-top: 3px; fill: none; stroke: var(--blue); stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.callout p { margin: 0; font-size: 13px; line-height: 1.6; }
.callout--tip { border-color: color-mix(in srgb, var(--accent) 33%, var(--border)); background: var(--accent-soft); }
.callout--tip svg { stroke: var(--accent); }
.callout b { color: var(--text); }

.steps { display: grid; gap: 19px; padding: 0; margin: 29px 0 0; list-style: none; }
.steps li { display: grid; grid-template-columns: 29px 1fr; gap: 13px; }
.steps li > span { display: grid; width: 28px; height: 28px; place-items: center; border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--border)); border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 800; line-height: 1; }
.steps b { color: var(--text); font-size: 14px; }
.steps p { margin: 2px 0 0; font-size: 13px; line-height: 1.6; }

.platform-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 27px; }
.platform-card { padding: 19px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.platform-icon { display: grid; width: 34px; height: 34px; place-items: center; margin-bottom: 16px; border-radius: 8px; background: var(--surface-raised); color: var(--accent); font-weight: 800; }
.platform-card h3 { font-size: 15px; }
.platform-card p { min-height: 66px; margin-bottom: 15px; font-size: 12.5px; line-height: 1.6; }
.platform-card a { color: var(--accent); font-size: 12.5px; font-weight: 700; }
.platform-card a span { margin-left: 3px; }

.docs-article ul { display: grid; gap: 7px; margin: 18px 0; padding-left: 21px; color: var(--muted); }
.docs-article li::marker { color: var(--accent); }
.docs-article li b { color: var(--text); }
.feature-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 29px; }
.feature-strip > div { min-height: 145px; padding: 16px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); }
.feature-strip span { display: block; margin-bottom: 12px; color: var(--accent); font-size: 20px; line-height: 1; }
.feature-strip b { display: block; margin-bottom: 5px; color: var(--text); font-size: 13px; line-height: 1.3; }
.feature-strip p { font-size: 12px; line-height: 1.55; }
.compact-steps { display: grid; gap: 9px; margin: 22px 0; padding-left: 20px; color: var(--muted); }
.compact-steps li { padding-left: 3px; }
.instruction-card { display: grid; grid-template-columns: 27px 1fr; gap: 6px 13px; margin: 24px 0 0; padding: 16px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); }
.instruction-card__number { display: grid; width: 25px; height: 25px; place-items: center; border-radius: 6px; background: var(--surface-raised); color: var(--accent); font-size: 12px; font-weight: 800; }
.instruction-card b { align-self: center; color: var(--text); font-size: 13px; }
.instruction-card p { grid-column: 2; margin: -4px 0 4px; font-size: 12px; line-height: 1.55; }
.review-flow { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 26px; padding: 17px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); color: var(--text); font-size: 11px; font-weight: 700; text-align: center; }
.review-flow span { flex: 1; }
.review-flow i { color: var(--accent); font-size: 17px; font-style: normal; }

.store-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.store-links a { display: flex; align-items: center; gap: 9px; min-width: 142px; padding: 8px 13px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--text); color: var(--bg); transition: transform .16s ease, opacity .16s ease; }
.store-links a:hover { transform: translateY(-1px); opacity: .9; }
.store-links span { font-size: 21px; line-height: 1; }
.store-links small { font-size: 9px; line-height: 1.2; }
.store-links b { font-size: 14px; }

.docs-article details { border-top: 1px solid var(--border); }
.docs-article details:last-of-type { border-bottom: 1px solid var(--border); }
.docs-article details > summary { position: relative; padding: 15px 32px 15px 0; color: var(--text); cursor: pointer; font-size: 13px; font-weight: 650; line-height: 1.45; list-style: none; }
.docs-article details > summary::-webkit-details-marker { display: none; }
.docs-article details > summary::after { position: absolute; top: 15px; right: 5px; color: var(--accent); content: "+"; font-size: 19px; font-weight: 400; line-height: 1; }
.docs-article details[open] > summary::after { content: "−"; }
.docs-article details p { padding: 0 26px 16px 0; margin: 0; font-size: 13px; line-height: 1.6; }
.support-button { display: inline-flex; align-items: center; gap: 9px; margin-top: 6px; padding: 10px 14px; border-radius: 7px; background: var(--accent); color: #06200e; font-size: 13px; font-weight: 800; transition: transform .16s ease, filter .16s ease; }
.support-button:hover { filter: brightness(1.05); transform: translateY(-1px); }
.support-button span { font-size: 18px; line-height: 1; }
.updated { margin-top: 31px; color: var(--faint); font-size: 11px; }

.page-outline { position: sticky; top: 98px; align-self: start; display: grid; gap: 7px; border-left: 1px solid var(--border); padding-left: 16px; }
.page-outline p { margin: 0 0 3px; color: var(--faint); font-size: 10px; font-weight: 800; letter-spacing: .08em; }
.page-outline a { color: var(--faint); font-size: 11px; line-height: 1.4; transition: color .15s ease; }
.page-outline a:hover { color: var(--text); }

.docs-footer { display: flex; justify-content: space-between; gap: 16px; margin-left: var(--sidebar-width); padding: 23px clamp(28px, 5.2vw, 86px); border-top: 1px solid var(--border); color: var(--faint); font-size: 11px; }
.docs-footer span:last-child { display: flex; flex-wrap: wrap; gap: 15px; }
.docs-footer a:hover { color: var(--text); }

@media (max-width: 1120px) {
    .docs-main { grid-template-columns: minmax(0, var(--article-width)); padding-right: clamp(28px, 7vw, 68px); padding-left: clamp(28px, 7vw, 68px); }
    .page-outline { display: none; }
}

@media (max-width: 800px) {
    :root { --header-height: 59px; --sidebar-width: 0px; }
    .docs-header__inner { gap: 10px; padding: 0 13px; }
    .docs-menu-button { display: inline-grid; }
    .brand { gap: 8px; font-size: 14px; }
    .brand img { width: 27px; height: 27px; }
    .docs-search { max-width: none; margin-left: auto; }
    .docs-search kbd { display: none; }
    .docs-search input { height: 34px; padding-right: 12px; }
    .back-link { display: none; }
    .header-actions { margin-left: 0; }
    .theme-button { width: 32px; height: 32px; }
    .docs-layout { display: block; }
    .docs-sidebar { position: fixed; z-index: 60; top: 0; bottom: 0; left: 0; width: min(310px, calc(100vw - 45px)); height: 100vh; padding: 0 16px 35px; border-right: 1px solid var(--border); transform: translateX(-104%); transition: transform .22s ease; box-shadow: 18px 0 35px rgba(0,0,0,.16); }
    body.nav-open .docs-sidebar { transform: translateX(0); }
    .sidebar-mobile-heading { display: flex; align-items: center; justify-content: space-between; height: var(--header-height); margin: 0 -16px 18px; padding: 0 16px; border-bottom: 1px solid var(--border); color: var(--text); font-size: 13px; font-weight: 700; }
    .sidebar-mobile-heading .icon-button { font-size: 23px; }
    .docs-backdrop { position: fixed; z-index: 50; inset: 0; visibility: hidden; background: rgba(0,0,0,.45); opacity: 0; transition: visibility .22s, opacity .22s; }
    body.nav-open .docs-backdrop { visibility: visible; opacity: 1; }
    .docs-main { display: block; padding: 42px 21px 60px; }
    .docs-article section { padding-bottom: 46px; margin-bottom: 43px; }
    .docs-footer { margin-left: 0; padding: 20px 21px; }
}

@media (max-width: 540px) {
    .brand span { display: none; }
    .docs-search { max-width: 145px; }
    .docs-search input { padding-left: 32px; font-size: 12px; }
    .docs-search svg { left: 10px; width: 14px; height: 14px; }
    .docs-main { padding-top: 37px; }
    h1 { font-size: 34px; }
    h2 { font-size: 27px; }
    .lead { font-size: 15px; }
    .quick-start-card { gap: 10px; padding: 10px; }
    .quick-start-card small { font-size: 11px; }
    .platform-grid, .feature-strip { grid-template-columns: 1fr; }
    .platform-card p { min-height: 0; }
    .feature-strip > div { min-height: 0; }
    .review-flow { flex-wrap: wrap; justify-content: center; padding: 14px 9px; }
    .review-flow span { flex: 1 1 34%; }
    .review-flow i { display: none; }
    .docs-footer { flex-direction: column; font-size: 10px; }
}

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