/* ---- DOCS LAYOUT ---- */
.docs-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 5rem;
    min-height: 100vh;
}

/* ---- SIDEBAR ---- */
.sidebar {
    position: sticky;
    top: 5rem;
    height: calc(100vh - 5rem);
    overflow-y: auto;
    padding: 2rem 1.5rem 2rem 0;
    border-right: 1px solid var(--border-color);
}

.sidebar::-webkit-scrollbar       { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 4px; }

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

.sidebar-section h4 {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    padding-left: 0.75rem;
}

.sidebar-section a {
    display: block;
    padding: 0.4rem 0.75rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    border-radius: 6px;
    transition: all 0.15s;
    border-left: 2px solid transparent;
}

.sidebar-section a:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.03);
}

.sidebar-section a.active {
    color: var(--blue-bright);
    border-left-color: var(--blue);
    background: rgba(59, 130, 246, 0.05);
}

/* ---- DOCS CONTENT ---- */
.docs-content {
    padding: 2rem 0 4rem 3rem;
    max-width: 800px;
}

.docs-content h1 {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.docs-content .page-desc {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.docs-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-top: 3rem;
    margin-bottom: 1rem;
    padding-top: 1rem;
}

.docs-content h2:first-of-type { margin-top: 0; padding-top: 0; }

.docs-content h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.docs-content p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 0.95rem;
    line-height: 1.7;
}

.docs-content ul,
.docs-content ol {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    padding-left: 1.5rem;
    font-size: 0.95rem;
}

.docs-content li { margin-bottom: 0.4rem; line-height: 1.6; }

.docs-content code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.82rem;
    background: rgba(59, 130, 246, 0.08);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    color: var(--blue-bright);
}

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

/* ---- TERMINAL OVERRIDES (docs-specific sizing) ---- */
.docs-content .terminal {
    font-size: 0.82rem;
    margin-bottom: 1.5rem;
}

.docs-content .terminal-header { padding: 0.7rem 1rem; }
.docs-content .terminal-title  { font-size: 0.72rem; }
.docs-content .terminal-body   { padding: 1rem 1.5rem; }

/* ---- MESSAGE TYPE TABLE ---- */
.msg-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}

.msg-table th {
    background: rgba(255, 255, 255, 0.03);
    text-align: left;
    padding: 0.8rem 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
}

.msg-table td {
    padding: 0.7rem 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.msg-table tr:last-child td { border-bottom: none; }

/* ---- CALLOUTS ---- */
.callout {
    padding: 1rem 1.25rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    line-height: 1.6;
}

.callout-warn {
    background: rgba(251, 146, 60, 0.06);
    border: 1px solid rgba(251, 146, 60, 0.15);
    color: var(--orange);
}

.callout-info {
    background: rgba(59, 130, 246, 0.06);
    border: 1px solid rgba(59, 130, 246, 0.15);
    color: var(--blue-bright);
}

.callout-tip {
    background: rgba(34, 197, 94, 0.06);
    border: 1px solid rgba(34, 197, 94, 0.15);
    color: var(--green);
}

.callout strong { color: inherit; }

/* ---- ACK BLOCK ---- */
.ack-block {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    line-height: 1.9;
    white-space: pre;
    padding: 1.2rem 1.5rem;
    background: var(--bg-terminal);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 1.5rem;
    overflow-x: auto;
}

/* ---- SECTION DIVIDER ---- */
.section-divider {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 3rem 0;
}

/* ---- COMPONENT GRID ---- */
.comp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.comp-card {
    background: var(--bg-terminal);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    transition: border-color 0.2s;
}

.comp-card:hover { border-color: #1e293b; }

.comp-card .c-interface {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.82rem;
    color: var(--cyan);
    margin-bottom: 0.15rem;
}

.comp-card .c-impl {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
}

.comp-card .c-desc {
    font-size: 0.82rem;
    color: var(--text-secondary);
}

/* ---- DOCS FOOTER OVERRIDE ---- */
footer { padding: 3rem 2rem; }
footer p { font-size: 0.82rem; }

/* ---- RESPONSIVE ---- */
@media (max-width: 900px) {
    .docs-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: relative;
        top: 0;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding: 1.5rem;
    }

    .docs-content { padding: 2rem 1.5rem; }
}
