/* Only CMS content surfaces: shared table geometry with explicit surface colors. */
:where(.x0dash-prose, .markdown-preview, .wysiwyg-editor) {
    --content-table-bg: #ffffff;
    --content-table-text: #1f2937;
    --content-table-head: #e5e7eb;
    --content-table-stripe: #f3f4f6;
    --content-table-border: #6b7280;
}

body.admin-body :is(.markdown-preview, .wysiwyg-editor),
body.x0dash-body .x0dash-prose {
    --content-table-bg: #0d1117;
    --content-table-text: #e6edf3;
    --content-table-head: #21262d;
    --content-table-stripe: #161b22;
    --content-table-border: #57606a;
}

:is(.x0dash-prose, .markdown-preview, .wysiwyg-editor) table {
    width: 100%;
    border-collapse: collapse;
    margin: 1em 0;
    color: var(--content-table-text);
    background: var(--content-table-bg);
}

:is(.x0dash-prose, .markdown-preview, .wysiwyg-editor) :is(th, td) {
    padding: 0.65em 0.8em;
    border: 1px solid var(--content-table-border);
    color: var(--content-table-text);
    background: var(--content-table-bg);
    vertical-align: top;
    text-align: left;
}

:is(.x0dash-prose, .markdown-preview, .wysiwyg-editor) th {
    font-weight: 700;
    background: var(--content-table-head);
}

:is(.x0dash-prose, .markdown-preview, .wysiwyg-editor) tbody tr:nth-child(even) td {
    background: var(--content-table-stripe);
}

:is(.x0dash-prose, .markdown-preview, .wysiwyg-editor) img {
    max-width: 100%;
    height: auto;
}

:is(.x0dash-prose, .markdown-preview, .wysiwyg-editor) table img {
    width: auto;
}

:is(.x0dash-prose, .markdown-preview, .wysiwyg-editor) ul {
    list-style: disc outside;
    padding-left: 1.4em;
}

:is(.x0dash-prose, .markdown-preview, .wysiwyg-editor) ol {
    list-style: decimal outside;
    padding-left: 1.4em;
}
