:root {
    --bg-base:      #050907;
    --bg-surface:   #0b1210;
    --bg-raised:    #101a16;
    --bg-border:    #1d3329;
    --text-primary: #e8ede9;
    --text-muted:   #82958b;
    --green-vivid:  #4ade80;
    --green-muted:  #102818;
    --radius-sm:    6px;
    --radius-md:    10px;
    --font-sans:    'Inter', system-ui, -apple-system, sans-serif;
    --font-mono:    'JetBrains Mono', 'Fira Code', monospace;
}

* , *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

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

a { color: var(--green-vivid); text-decoration: none; }
a:hover { text-decoration: underline; }

.docs-layout {
    display: flex;
    min-height: 100vh;
    max-width: 1200px;
    margin: 0 auto;
}

.docs-sidebar {
    width: 240px;
    flex-shrink: 0;
    padding: 2rem 1.25rem;
    border-right: 1px solid var(--bg-border);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: sticky;
    top: 0;
    align-self: flex-start;
    height: 100vh;
}

.docs-logo {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-primary);
}
.docs-logo span { color: var(--green-vivid); }
.docs-logo:hover { text-decoration: none; }

.docs-sidebar nav ul { list-style: none; display: flex; flex-direction: column; gap: 0.15rem; }

.docs-sidebar nav a {
    display: block;
    padding: 0.4rem 0.6rem;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 0.9rem;
}
.docs-sidebar nav a:hover { color: var(--text-primary); text-decoration: none; background: var(--bg-raised); }
.docs-sidebar nav a.active {
    color: var(--green-vivid);
    background: var(--green-muted);
    font-weight: 600;
}

.docs-back { margin-top: auto; font-size: 0.8rem; color: var(--text-muted); }

.docs-content {
    flex: 1;
    padding: 3rem 3rem 6rem;
    max-width: 760px;
}

.docs-content h1 { font-size: 2rem; margin-bottom: 1.25rem; }
.docs-content h2 { font-size: 1.35rem; margin: 2rem 0 0.75rem; }
.docs-content h3 { font-size: 1.1rem; margin: 1.5rem 0 0.5rem; }
.docs-content p  { margin-bottom: 1rem; color: var(--text-primary); }
.docs-content ul, .docs-content ol { margin: 0 0 1rem 1.25rem; }
.docs-content li { margin-bottom: 0.35rem; }

.docs-content code {
    font-family: var(--font-mono);
    background: var(--bg-raised);
    border: 1px solid var(--bg-border);
    border-radius: 4px;
    padding: 0.1rem 0.35rem;
    font-size: 0.85em;
}

.docs-content pre {
    background: var(--bg-surface);
    border: 1px solid var(--bg-border);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    overflow-x: auto;
    margin-bottom: 1.25rem;
}
.docs-content pre code { background: none; border: none; padding: 0; }

.docs-content blockquote {
    border-left: 3px solid var(--green-vivid);
    padding: 0.5rem 1rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
}

.docs-content hr { border: none; border-top: 1px solid var(--bg-border); margin: 2rem 0; }

.docs-nav-toggle {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 20;
    background: var(--bg-raised);
    color: var(--text-primary);
    border: 1px solid var(--bg-border);
    border-radius: var(--radius-sm);
    font-size: 1.1rem;
    padding: 0.35rem 0.6rem;
    cursor: pointer;
}

@media (max-width: 860px) {
    .docs-nav-toggle { display: block; }
    .docs-layout { flex-direction: column; }
    .docs-sidebar {
        position: fixed;
        inset: 0 30% 0 0;
        height: 100vh;
        background: var(--bg-base);
        z-index: 10;
        transform: translateX(-100%);
        transition: transform 0.2s ease;
    }
    .docs-sidebar.open { transform: translateX(0); }
    .docs-content { padding: 4.5rem 1.5rem 4rem; }
}
