/* What renderMarkdown (ui/MarkdownView.ts) builds, wherever it lands: a
   dashboard text panel, a Knowledge Base article and its preview. */
.markdown-view pre {
    margin: 0 0 .75rem;
    padding: .6rem .75rem;
    background: var(--color-surface-muted);
    border-radius: 4px;
    overflow-x: auto;
    white-space: pre;
    color: var(--color-text);
}
.markdown-view pre code { padding: 0; background: none; color: inherit; font-size: inherit; }
.markdown-view blockquote {
    margin: 0 0 .75rem;
    padding: .1rem 0 .1rem .75rem;
    border-left: 3px solid var(--color-border-strong);
    color: var(--color-text-secondary);
}
.markdown-view blockquote > :last-child { margin-bottom: 0; }
.markdown-view hr { margin: .75rem 0; border: 0; border-top: 1px solid var(--color-border); }
.markdown-view img { max-width: 100%; height: auto; }
/* Wide tables scroll inside themselves rather than widening the page. */
.markdown-view table { display: block; max-width: 100%; margin: 0 0 .75rem; overflow-x: auto; border-collapse: collapse; }
.markdown-view th, .markdown-view td { padding: .3rem .6rem; border: 1px solid var(--color-border); }
.markdown-view th { background: var(--color-surface-muted); font-weight: 600; }

/* An article's type: the reader, the editor's preview and its version dialog. */
.knowledge-body, .kbe-preview, .kbe-version-body { overflow-wrap: anywhere; line-height: 1.55; }
.knowledge-body h1, .kbe-preview h1, .kbe-version-body h1 { font-size: 1.5rem; }
.knowledge-body h2, .kbe-preview h2, .kbe-version-body h2 { font-size: 1.25rem; }
.knowledge-body h3, .kbe-preview h3, .kbe-version-body h3 { font-size: 1.1rem; }
