:root {
    --bg: #0b1426;
    --panel: #111d32;
    --panel-2: #16243c;
    --line: rgba(152, 180, 220, 0.18);
    --text: #edf5ff;
    --muted: #9fb2cc;
    --soft: #c9d8ee;
    --blue: #168cff;
    --cyan: #33d6ff;
    --green: #28d17c;
    --amber: #f4a62a;
    --sidebar: #060d1d;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    background: radial-gradient(circle at top left, rgba(22, 140, 255, 0.22), transparent 34%), var(--bg);
    color: var(--text);
    line-height: 1.72;
}

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

.docs-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
}

.docs-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    background: linear-gradient(180deg, #050b19 0%, #091226 100%);
    border-right: 1px solid var(--line);
    padding: 22px 18px;
    overflow-y: auto;
    z-index: 20;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--line);
}

.brand img {
    width: 150px;
    height: auto;
}

.brand span {
    padding: 3px 7px;
    border-radius: 6px;
    background: var(--blue);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
}

.search-box {
    display: block;
    margin: 18px 0 22px;
}

.search-box span {
    display: block;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.search-box input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    padding: 11px 12px;
    outline: none;
}

.search-box input:focus {
    border-color: rgba(51, 214, 255, 0.7);
    box-shadow: 0 0 0 4px rgba(51, 214, 255, 0.09);
}

.nav-group {
    margin-bottom: 22px;
}

.nav-group p {
    margin: 0 0 8px;
    color: #6f829f;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .12em;
}

.nav-group a {
    display: block;
    padding: 8px 10px;
    border-radius: 8px;
    color: #bcd0ea;
    font-size: 14px;
    transition: background .18s ease, color .18s ease, transform .18s ease;
}

.nav-group a:hover,
.nav-group a.active {
    background: rgba(22, 140, 255, 0.14);
    color: #fff;
}

.nav-group.is-hidden,
.nav-group a.is-hidden {
    display: none;
}

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

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 0 42px;
    background: rgba(14, 25, 44, 0.88);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line);
}

.topbar span {
    display: block;
    color: var(--soft);
    font-size: 14px;
    font-weight: 700;
}

.topbar small {
    color: var(--muted);
    font-size: 12px;
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.top-actions a,
.lang {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 11px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--soft);
    font-size: 13px;
}

.top-actions .active {
    border-color: var(--blue);
    background: var(--blue);
    color: #fff;
}

.menu-toggle {
    display: none;
    width: 38px;
    height: 38px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 28px;
    padding: 64px 42px 28px;
}

.hero-copy {
    max-width: 880px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 7px 12px;
    border: 1px solid rgba(51, 214, 255, 0.34);
    border-radius: 999px;
    background: rgba(51, 214, 255, 0.08);
    color: #8beaff;
    font-size: 13px;
    font-weight: 800;
}

h1 {
    margin: 0;
    max-width: 840px;
    color: #fff;
    font-size: clamp(36px, 5vw, 62px);
    line-height: 1.05;
    letter-spacing: -0.03em;
}

.hero p {
    max-width: 780px;
    margin: 20px 0 0;
    color: var(--soft);
    font-size: 18px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.hero-actions a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 18px;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--soft);
    font-weight: 800;
}

.hero-actions .primary {
    background: linear-gradient(135deg, var(--blue), #075cb8);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 16px 34px rgba(22, 140, 255, 0.24);
}

.hero-panel {
    align-self: end;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.035));
    box-shadow: var(--shadow);
    overflow: hidden;
}

.hero-panel div {
    padding: 18px;
}

.hero-panel div + div {
    border-top: 1px solid var(--line);
}

.hero-panel strong,
.hero-panel span {
    display: block;
}

.hero-panel strong {
    color: #fff;
    margin-bottom: 5px;
}

.hero-panel span {
    color: var(--muted);
    font-size: 14px;
}

.doc-grid {
    padding: 14px 42px 42px;
    display: grid;
    gap: 18px;
    max-width: 1120px;
}

.module-map {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    padding: 4px 42px 18px;
    max-width: 1120px;
}

.module-map div {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(14, 25, 44, 0.62);
    padding: 16px;
}

.module-map span,
.module-map strong {
    display: block;
}

.module-map span {
    color: #84dcff;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: 6px;
}

.module-map strong {
    color: #fff;
    font-size: 14px;
    line-height: 1.45;
}

.doc-card {
    scroll-margin-top: 88px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(14, 25, 44, 0.72);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.16);
    padding: 28px;
}

.doc-card.is-hidden {
    display: none;
}

.search-empty {
    max-width: 1120px;
    margin: -6px 42px 42px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(14, 25, 44, 0.62);
    color: var(--muted);
    padding: 22px 24px;
    font-weight: 700;
}

.search-empty[hidden] {
    display: none;
}

.doc-card h2 {
    margin: 0 0 12px;
    color: #fff;
    font-size: 26px;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.doc-card h3 {
    margin: 24px 0 8px;
    color: #dceaff;
    font-size: 17px;
}

.doc-card p {
    margin: 0 0 14px;
    color: var(--soft);
}

.doc-card ul,
.doc-card ol {
    margin: 12px 0 0;
    padding-left: 22px;
    color: var(--soft);
}

.doc-card li + li {
    margin-top: 7px;
}

.callout {
    margin-top: 18px;
    padding: 15px 16px;
    border-left: 4px solid var(--blue);
    border-radius: 12px;
    background: rgba(22, 140, 255, 0.09);
    color: var(--soft);
}

.callout.good {
    border-left-color: var(--green);
    background: rgba(40, 209, 124, 0.08);
}

.callout.warn {
    border-left-color: var(--amber);
    background: rgba(244, 166, 42, 0.09);
}

.workflow {
    margin: 18px 0;
    padding: 18px;
    border: 1px solid rgba(51, 214, 255, 0.2);
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(22, 140, 255, 0.08), rgba(51, 214, 255, 0.035));
}

.workflow h3 {
    margin-top: 0;
}

.screenshot-note {
    display: grid;
    gap: 4px;
    margin-top: 18px;
    padding: 14px 16px;
    border: 1px dashed rgba(159, 178, 204, 0.38);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.035);
}

.screenshot-note strong {
    color: #fff;
}

.screenshot-note span {
    color: var(--muted);
    font-size: 14px;
}

.checklist {
    display: grid;
    gap: 10px;
    margin-top: 16px;
}

.checklist label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 13px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--soft);
}

.checklist input {
    margin-top: 5px;
    accent-color: var(--blue);
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 14px 0;
}

.tag-list span {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    color: #dceaff;
    font-size: 13px;
    font-weight: 700;
}

.faq h3 {
    margin-top: 18px;
}

.docs-footer {
    max-width: 1120px;
    margin: 0 42px 44px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    gap: 16px;
    color: var(--muted);
    font-size: 14px;
}

.docs-footer a {
    color: #8ccfff;
}

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

    .docs-sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        width: min(320px, 88vw);
        transform: translateX(-105%);
        transition: transform .25s ease;
    }

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

    .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .topbar {
        padding: 0 18px;
    }

    .hero {
        grid-template-columns: 1fr;
        padding: 40px 18px 20px;
    }

    .doc-grid {
        padding: 12px 18px 32px;
    }

    .module-map {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        padding: 0 18px 18px;
    }

    .docs-footer {
        margin: 0 18px 34px;
    }
}

@media (max-width: 680px) {
    .top-actions a:not(.lang) {
        display: none;
    }

    .topbar {
        min-height: 58px;
    }

    h1 {
        font-size: 36px;
    }

    .hero p {
        font-size: 16px;
    }

    .doc-card {
        padding: 22px;
    }

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