/* ── Layout ─────────────────────────────────────────────────────────────── */

.docs-page {
    display: block;
    background: var(--bg-dark);
    color: var(--text);
    min-height: 100vh;
    font-family: 'DM Sans', sans-serif;
}

.docs-header {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    height: 60px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
}

.docs-header-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text);
    font-weight: 600;
    font-size: 1rem;
}

.docs-header-logo {
    height: 28px;
    width: auto;
}

.docs-header-title {
    font-size: 1rem;
    font-weight: 600;
}

.docs-page .brand-accent {
    color: var(--accent);
}

.docs-header-nav {
    display: flex;
    gap: 24px;
}

.docs-header-link {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.15s;
}

.docs-header-link:hover {
    color: var(--text);
}

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

/* ── Sidebar ─────────────────────────────────────────────────────────────── */

.docs-sidebar {
    width: 240px;
    flex-shrink: 0;
    padding: 32px 0;
    border-right: 1px solid var(--border);
    position: sticky;
    top: 60px;
    height: calc(100vh - 60px);
    overflow-y: auto;
}

.docs-nav {
    padding: 0 16px;
}

.docs-nav-section {
    margin-bottom: 28px;
}

.docs-nav-section-title {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-dim);
    padding: 0 8px;
    margin-bottom: 6px;
}

.docs-nav-link {
    display: block;
    padding: 6px 8px;
    border-radius: 6px;
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.15s, background 0.15s;
    margin-bottom: 2px;
}

.docs-nav-link:hover {
    color: var(--text);
    background: var(--bg-hover);
}

.docs-nav-link--active {
    color: var(--accent);
    background: rgba(0, 212, 170, 0.08);
    font-weight: 500;
}

.docs-nav-link--active:hover {
    color: var(--accent);
    background: rgba(0, 212, 170, 0.12);
}

/* ── Content ─────────────────────────────────────────────────────────────── */

.docs-content {
    flex: 1;
    min-width: 0;
    padding: 40px 48px;
}

.docs-article {
    max-width: 720px;
}

.docs-article h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 12px;
    line-height: 1.2;
}

.docs-article h2 {
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 40px 0 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.docs-article h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 28px 0 8px;
}

.docs-article p {
    color: var(--text-dim);
    line-height: 1.75;
    margin: 0 0 16px;
}

.docs-article ul,
.docs-article ol {
    color: var(--text-dim);
    line-height: 1.75;
    margin: 0 0 16px;
    padding-left: 24px;
}

.docs-article li {
    margin-bottom: 6px;
}

.docs-article strong {
    color: var(--text-primary);
    font-weight: 600;
}

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

.docs-article a:hover {
    text-decoration: underline;
}

.docs-article code {
    font-family: var(--font-mono);
    font-size: 0.85em;
    background: var(--bg-input);
    color: var(--accent);
    padding: 2px 6px;
    border-radius: 4px;
}

.docs-article pre {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
    overflow-x: auto;
    margin: 0 0 20px;
}

.docs-article pre code {
    background: none;
    padding: 0;
    color: var(--text);
    font-size: 0.875rem;
    line-height: 1.6;
}

.docs-article blockquote {
    border-left: 3px solid var(--accent);
    margin: 0 0 16px;
    padding: 12px 16px;
    background: rgba(0, 212, 170, 0.05);
    border-radius: 0 6px 6px 0;
}

.docs-article blockquote p {
    margin: 0;
}

.docs-article hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 32px 0;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
    .docs-layout {
        flex-direction: column;
    }

    .docs-sidebar {
        width: 100%;
        height: auto;
        position: static;
        border-right: none;
        border-bottom: 1px solid var(--border);
        padding: 16px;
    }

    .docs-nav {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    .docs-nav-section-title {
        display: none;
    }

    .docs-nav-section {
        margin-bottom: 0;
    }

    .docs-content {
        padding: 24px 20px;
    }
}
