/* ============================================================
   md-engine.css —— 「Markdown 引擎」自带代码高亮主题的作用域化副本
   ------------------------------------------------------------
   来源：~/Markdown引擎/lib/github.min.css（浅色）与 github-dark.min.css（深色）
        —— highlight.js 官方 GitHub 主题，随引擎一起搬运，未改配色。
   为什么不是直接 <link> 两个主题文件：hljs 的类名（.hljs-keyword 等）是
   全局的，两份一起加载必然互相覆盖。这里按 [data-theme] 前缀作用域化，
   并且只保留颜色规则（内边距/底色交给 chat.css 的 .cx-code / .cx-pre）。
   重新生成：node gen-md-css.js github.min.css github-dark.min.css > md-engine.css
   ============================================================ */

/* ── 浅色主题 ── */
[data-theme="light"] .cx-md .hljs { color:#24292e;background: transparent; }
[data-theme="light"] .cx-md .hljs-doctag { color:#d73a49 }
[data-theme="light"] .cx-md .hljs-keyword { color:#d73a49 }
[data-theme="light"] .cx-md .hljs-meta .hljs-keyword { color:#d73a49 }
[data-theme="light"] .cx-md .hljs-template-tag { color:#d73a49 }
[data-theme="light"] .cx-md .hljs-template-variable { color:#d73a49 }
[data-theme="light"] .cx-md .hljs-type { color:#d73a49 }
[data-theme="light"] .cx-md .hljs-variable.language_ { color:#d73a49 }
[data-theme="light"] .cx-md .hljs-title { color:#6f42c1 }
[data-theme="light"] .cx-md .hljs-title.class_ { color:#6f42c1 }
[data-theme="light"] .cx-md .hljs-title.class_.inherited__ { color:#6f42c1 }
[data-theme="light"] .cx-md .hljs-title.function_ { color:#6f42c1 }
[data-theme="light"] .cx-md .hljs-attr { color:#005cc5 }
[data-theme="light"] .cx-md .hljs-attribute { color:#005cc5 }
[data-theme="light"] .cx-md .hljs-literal { color:#005cc5 }
[data-theme="light"] .cx-md .hljs-meta { color:#005cc5 }
[data-theme="light"] .cx-md .hljs-number { color:#005cc5 }
[data-theme="light"] .cx-md .hljs-operator { color:#005cc5 }
[data-theme="light"] .cx-md .hljs-selector-attr { color:#005cc5 }
[data-theme="light"] .cx-md .hljs-selector-class { color:#005cc5 }
[data-theme="light"] .cx-md .hljs-selector-id { color:#005cc5 }
[data-theme="light"] .cx-md .hljs-variable { color:#005cc5 }
[data-theme="light"] .cx-md .hljs-meta .hljs-string { color:#032f62 }
[data-theme="light"] .cx-md .hljs-regexp { color:#032f62 }
[data-theme="light"] .cx-md .hljs-string { color:#032f62 }
[data-theme="light"] .cx-md .hljs-built_in { color:#e36209 }
[data-theme="light"] .cx-md .hljs-symbol { color:#e36209 }
[data-theme="light"] .cx-md .hljs-code { color:#6a737d }
[data-theme="light"] .cx-md .hljs-comment { color:#6a737d }
[data-theme="light"] .cx-md .hljs-formula { color:#6a737d }
[data-theme="light"] .cx-md .hljs-name { color:#22863a }
[data-theme="light"] .cx-md .hljs-quote { color:#22863a }
[data-theme="light"] .cx-md .hljs-selector-pseudo { color:#22863a }
[data-theme="light"] .cx-md .hljs-selector-tag { color:#22863a }
[data-theme="light"] .cx-md .hljs-subst { color:#24292e }
[data-theme="light"] .cx-md .hljs-section { color:#005cc5;font-weight:700 }
[data-theme="light"] .cx-md .hljs-bullet { color:#735c0f }
[data-theme="light"] .cx-md .hljs-emphasis { color:#24292e;font-style:italic }
[data-theme="light"] .cx-md .hljs-strong { color:#24292e;font-weight:700 }
[data-theme="light"] .cx-md .hljs-addition { color:#22863a;background-color:#f0fff4 }
[data-theme="light"] .cx-md .hljs-deletion { color:#b31d28;background-color:#ffeef0 }

/* ── 深色主题 ── */
[data-theme="dark"] .cx-md .hljs { color:#c9d1d9;background: transparent; }
[data-theme="dark"] .cx-md .hljs-doctag { color:#ff7b72 }
[data-theme="dark"] .cx-md .hljs-keyword { color:#ff7b72 }
[data-theme="dark"] .cx-md .hljs-meta .hljs-keyword { color:#ff7b72 }
[data-theme="dark"] .cx-md .hljs-template-tag { color:#ff7b72 }
[data-theme="dark"] .cx-md .hljs-template-variable { color:#ff7b72 }
[data-theme="dark"] .cx-md .hljs-type { color:#ff7b72 }
[data-theme="dark"] .cx-md .hljs-variable.language_ { color:#ff7b72 }
[data-theme="dark"] .cx-md .hljs-title { color:#d2a8ff }
[data-theme="dark"] .cx-md .hljs-title.class_ { color:#d2a8ff }
[data-theme="dark"] .cx-md .hljs-title.class_.inherited__ { color:#d2a8ff }
[data-theme="dark"] .cx-md .hljs-title.function_ { color:#d2a8ff }
[data-theme="dark"] .cx-md .hljs-attr { color:#79c0ff }
[data-theme="dark"] .cx-md .hljs-attribute { color:#79c0ff }
[data-theme="dark"] .cx-md .hljs-literal { color:#79c0ff }
[data-theme="dark"] .cx-md .hljs-meta { color:#79c0ff }
[data-theme="dark"] .cx-md .hljs-number { color:#79c0ff }
[data-theme="dark"] .cx-md .hljs-operator { color:#79c0ff }
[data-theme="dark"] .cx-md .hljs-selector-attr { color:#79c0ff }
[data-theme="dark"] .cx-md .hljs-selector-class { color:#79c0ff }
[data-theme="dark"] .cx-md .hljs-selector-id { color:#79c0ff }
[data-theme="dark"] .cx-md .hljs-variable { color:#79c0ff }
[data-theme="dark"] .cx-md .hljs-meta .hljs-string { color:#a5d6ff }
[data-theme="dark"] .cx-md .hljs-regexp { color:#a5d6ff }
[data-theme="dark"] .cx-md .hljs-string { color:#a5d6ff }
[data-theme="dark"] .cx-md .hljs-built_in { color:#ffa657 }
[data-theme="dark"] .cx-md .hljs-symbol { color:#ffa657 }
[data-theme="dark"] .cx-md .hljs-code { color:#8b949e }
[data-theme="dark"] .cx-md .hljs-comment { color:#8b949e }
[data-theme="dark"] .cx-md .hljs-formula { color:#8b949e }
[data-theme="dark"] .cx-md .hljs-name { color:#7ee787 }
[data-theme="dark"] .cx-md .hljs-quote { color:#7ee787 }
[data-theme="dark"] .cx-md .hljs-selector-pseudo { color:#7ee787 }
[data-theme="dark"] .cx-md .hljs-selector-tag { color:#7ee787 }
[data-theme="dark"] .cx-md .hljs-subst { color:#c9d1d9 }
[data-theme="dark"] .cx-md .hljs-section { color:#1f6feb;font-weight:700 }
[data-theme="dark"] .cx-md .hljs-bullet { color:#f2cc60 }
[data-theme="dark"] .cx-md .hljs-emphasis { color:#c9d1d9;font-style:italic }
[data-theme="dark"] .cx-md .hljs-strong { color:#c9d1d9;font-weight:700 }
[data-theme="dark"] .cx-md .hljs-addition { color:#aff5b4;background-color:#033a16 }
[data-theme="dark"] .cx-md .hljs-deletion { color:#ffdcd7;background-color:#67060c }

/* ── 与 app 代码块外壳对齐：内边距/圆角由 .cx-pre 负责，主题只上色 ── */
.cx-md .cx-code pre.hljs,
.cx-md pre.hljs { background: transparent; padding: var(--md-pre-pad, 12px); }
.cx-md code.hljs { padding: 0; background: transparent; }
