/* ============================================================
   Documentation — Browsable markdown docs view
   ============================================================ */

.docs-view {
    height: 100%;
    overflow-y: auto;
}

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

.docs-content {
    padding: 24px 32px;
    max-width: 800px;
}

.docs-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.docs-empty p {
    margin-top: 8px;
    font-size: 0.875rem;
}

/* ── Markdown rendering ───────────────────────────────────── */

.docs-content h1 {
    font-size: var(--type-page-size);
    margin: 0 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.docs-content h2 {
    font-size: var(--fs-xl);
    margin: 24px 0 8px;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--border);
}

.docs-content h3 {
    font-size: var(--fs-lg);
    margin: 20px 0 6px;
}

.docs-content h4 {
    font-size: var(--fs-lg);
    margin: 16px 0 4px;
}

/* A screenshot in a page (#5038): as wide as the page allows, never wider. */
.docs-content img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 12px 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.docs-content p {
    margin: 8px 0;
    line-height: 1.6;
    font-size: 0.875rem;
}

.docs-content code {
    background: var(--bg-tertiary);
    padding: 2px 5px;
    border-radius: var(--radius-xs);
    font-size: 0.8125rem;
}

.docs-content pre {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    overflow-x: auto;
    font-size: 0.8125rem;
    line-height: 1.5;
    margin: 8px 0;
}

.docs-content pre code {
    background: none;
    padding: 0;
}

.docs-content table {
    border-collapse: collapse;
    width: 100%;
    margin: 8px 0;
    font-size: 0.8125rem;
}

.docs-content th,
.docs-content td {
    border: 1px solid var(--border);
    padding: 6px 10px;
    text-align: left;
}

.docs-content th {
    background: var(--bg-tertiary);
    font-weight: 600;
}

.docs-content ul,
.docs-content ol {
    padding-left: 1.5em;
    margin: 6px 0;
    font-size: 0.875rem;
    line-height: 1.6;
}

.docs-content li {
    margin: 3px 0;
}

.docs-content blockquote {
    border-left: 3px solid var(--border);
    padding-left: 12px;
    color: var(--text-secondary);
    margin: 8px 0;
}

.docs-content a {
    color: var(--accent);
}

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

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

@media (max-width: 700px) {
    .docs-content {
        padding: 16px;
    }
}
