/* Docs-specific styles */

.docs-main {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 4rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 8rem 3rem 4rem;
    min-height: 100vh;
}

/* Sidebar */
.docs-sidebar {
    position: sticky;
    top: 8rem;
    height: fit-content;
    padding-right: 2rem;
    border-right: 1px solid var(--border);
}

.sidebar-section {
    margin-bottom: 2rem;
}

.sidebar-section h4 {
    font-family: 'Geist', -apple-system, sans-serif;
    font-size: 0.6875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--muted);
    margin-bottom: 0.75rem;
}

.sidebar-link {
    display: block;
    font-size: 0.875rem;
    color: var(--muted);
    text-decoration: none;
    padding: 0.375rem 0;
    transition: color 0.2s ease;
}

.sidebar-link:hover,
.sidebar-link.active {
    color: var(--fg);
}

.sidebar-link.active {
    color: var(--gold);
}

/* Content */
.docs-content {
    max-width: 800px;
}

.docs-section {
    margin-bottom: 5rem;
    scroll-margin-top: 6rem;
}

.docs-section h1 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 3rem;
    font-weight: 300;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.docs-section h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2rem;
    font-weight: 400;
    margin-bottom: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.docs-section h3 {
    font-family: 'Geist', -apple-system, sans-serif;
    font-size: 1.125rem;
    font-weight: 500;
    margin-top: 2.5rem;
    margin-bottom: 0.75rem;
    color: var(--fg);
}

.docs-section h4 {
    font-family: 'Geist', -apple-system, sans-serif;
    font-size: 1rem;
    font-weight: 500;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--fg);
}

.docs-section p {
    font-size: 1rem;
    color: var(--muted);
    line-height: 1.75;
    margin-bottom: 1rem;
}

.docs-section .lead {
    font-size: 1.25rem;
    color: var(--fg);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.docs-section ul,
.docs-section ol {
    margin-bottom: 1.5rem;
    padding-left: 1.25rem;
}

.docs-section li {
    font-size: 1rem;
    color: var(--muted);
    line-height: 1.75;
    margin-bottom: 0.5rem;
}

.docs-section li strong {
    color: var(--fg);
}

/* Code */
.docs-section code {
    font-family: 'Geist Mono', monospace;
    font-size: 0.875em;
    background: var(--accent-subtle);
    padding: 0.15em 0.4em;
    border-radius: 4px;
    color: var(--gold);
}

.code-block {
    background: var(--accent-subtle);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin: 1rem 0 1.5rem;
    overflow-x: auto;
}

.code-block code {
    background: none;
    padding: 0;
    font-size: 0.9rem;
    color: var(--fg);
}

/* Callout */
.callout {
    display: flex;
    gap: 1rem;
    background: var(--accent-subtle);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    margin: 2rem 0;
}

.callout-icon {
    color: var(--gold);
    font-size: 0.875rem;
    flex-shrink: 0;
    margin-top: 0.25rem;
}

.callout strong {
    color: var(--fg);
    display: block;
    margin-bottom: 0.5rem;
}

.callout p {
    margin: 0;
    font-size: 0.9375rem;
}

/* Steps */
.steps {
    margin: 2rem 0;
}

.step {
    display: flex;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.step-num {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-subtle);
    border: 1px solid var(--border);
    border-radius: 50%;
    font-size: 0.875rem;
    color: var(--gold);
    font-weight: 500;
}

.step-content h4 {
    margin: 0 0 0.375rem;
    font-size: 1rem;
}

.step-content p {
    margin: 0;
    font-size: 0.9375rem;
}

/* Tables */
.table-wrapper {
    overflow-x: auto;
    margin: 1.5rem 0;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    text-align: left;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.9375rem;
}

th {
    font-weight: 500;
    color: var(--fg);
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

td {
    color: var(--muted);
}

td code {
    font-size: 0.8125rem;
}

/* Two column layout */
.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 1.5rem 0;
}

.two-col h4 {
    margin-top: 0;
}

.two-col ul {
    margin-bottom: 0;
}

/* Architecture diagram */
.architecture-diagram {
    background: var(--accent-subtle);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
    overflow-x: auto;
}

.architecture-diagram pre {
    font-family: 'Geist Mono', monospace;
    font-size: 0.75rem;
    color: var(--muted);
    line-height: 1.5;
    margin: 0;
    white-space: pre;
}

/* Docs footer */
.docs-footer {
    text-align: center;
    padding: 4rem 0 2rem;
    border-top: 1px solid var(--border);
    margin-top: 4rem;
}

.docs-footer p {
    color: var(--muted);
    margin-bottom: 1.5rem;
}

.docs-footer a {
    color: var(--gold);
    text-decoration: none;
}

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

.docs-footer .footer-star {
    color: var(--gold);
    font-size: 0.625rem;
}

/* Nav active state for docs */
.nav-link.active {
    color: var(--fg);
}

/* Responsive */
@media (max-width: 1024px) {
    .docs-main {
        grid-template-columns: 200px 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .docs-main {
        grid-template-columns: 1fr;
        padding: 6rem 1.5rem 3rem;
    }

    .docs-sidebar {
        position: static;
        border-right: none;
        border-bottom: 1px solid var(--border);
        padding-right: 0;
        padding-bottom: 2rem;
        margin-bottom: 2rem;
        display: flex;
        flex-wrap: wrap;
        gap: 1.5rem;
    }

    .sidebar-section {
        margin-bottom: 0;
    }

    .docs-section h1 {
        font-size: 2.25rem;
    }

    .docs-section h2 {
        font-size: 1.5rem;
    }

    .two-col {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .architecture-diagram pre {
        font-size: 0.625rem;
    }
}
