html[data-theme='dark'] .forum-rich-content {
	color: var(--forum-text, #e8e8e8);
}

html[data-theme='dark'] .forum-rich-content blockquote {
	margin: 1em 0;
	padding: 0.6em 0.9em;
	border-left: 3px solid var(--forum-border, #35383c);
	border-radius: 0 6px 6px 0;
	color: var(--forum-text, #e8e8e8);
	background: var(--forum-surface-raised, #23262a);
}

html[data-theme='dark'] .forum-rich-content a {
	color: var(--forum-accent, #52cb82);
}

html[data-theme='dark'] .forum-rich-content :is(td, th) {
	border-color: var(--forum-border, #35383c);
}

html[data-theme='dark'] .forum-rich-content pre {
	margin: 1em 0;
	padding: 0.8em 1em;
	border: 1px solid var(--forum-border, #35383c);
	border-radius: 8px;
	background: var(--forum-canvas, #111315);
	color: var(--forum-text, #e8e8e8);
	overflow-x: auto;
}

html[data-theme='dark'] .forum-rich-content :is(pre, pre *) {
	font-family: ui-monospace, SFMono-Regular, Consolas, 'Liberation Mono', monospace;
	white-space: pre !important;
	overflow-wrap: normal !important;
	word-break: normal !important;
	text-wrap: nowrap !important;
}

html[data-theme='dark'] .forum-rich-content code {
	font-family: ui-monospace, SFMono-Regular, Consolas, 'Liberation Mono', monospace;
}

html[data-theme='dark'] .forum-rich-content :not(pre) > code {
	padding: 0.12em 0.35em;
	border-radius: 4px;
	background: var(--forum-surface-raised, #23262a);
}

html[data-theme='dark'] .forum-rich-content pre :is(.forum-code-comment, .token.comment, .hljs-comment) { color: #9fa8b3; }
html[data-theme='dark'] .forum-rich-content pre :is(.forum-code-string, .token.string, .hljs-string) { color: #a8d89e; }
html[data-theme='dark'] .forum-rich-content pre :is(.forum-code-keyword, .token.keyword, .hljs-keyword) { color: #e0b5fa; }

html[data-theme='dark'] .forum-rich-content .forum-authored-colors[style*='--forum-authored-text'] {
	color: var(--forum-authored-text) !important;
	background-color: var(--forum-authored-base) !important;
	background-image: linear-gradient(var(--forum-authored-fill), var(--forum-authored-fill));
}

html[data-theme='dark'] .forum-rich-content :is(img, iframe) {
	outline: 1px solid var(--forum-border, #35383c);
}

html[data-theme='dark'] .forum-rich-content iframe {
	background: var(--forum-surface-raised, #23262a);
}

html[data-theme='dark'] .forum-embed :is(.popup-content, .iframe-container, .loading-indicator, .error-message, .url-select) {
	background: var(--forum-surface, #1a1c1f);
	color: var(--forum-text, #e8e8e8);
}

html[data-theme='dark'] .forum-embed :is(.popup-header, .header-close-btn:hover) {
	background: var(--forum-surface-raised, #23262a);
}

html[data-theme='dark'] .forum-embed :is(.popup-header, .url-select) {
	border-color: var(--forum-border, #35383c);
}

html[data-theme='dark'] .forum-embed :is(.popup-title, .header-close-btn, .error-message p) {
	color: var(--forum-text, #e8e8e8);
}

html[data-theme='dark'] .forum-embed .external-link {
	color: var(--forum-accent, #37c763);
	border-color: currentColor;
}

html[data-theme='dark'] .forum-embed .external-link:hover {
	background: var(--forum-surface-raised, #23262a);
}

html[data-theme='dark'] .forum-embed .spinner {
	border-color: var(--forum-border, #35383c);
	border-top-color: var(--forum-accent, #37c763);
}

html[data-theme='dark'] .forum-embed .content-iframe {
	color-scheme: dark;
}

html.forum-editor-frame[data-theme='dark'],
html.forum-editor-frame[data-theme='dark'] body.forum-rich-content {
	background: var(--forum-surface, #1a1c1f);
	color: var(--forum-text, #e8e8e8);
}
