@bytechain.cn/colamd-themes 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (108) hide show
  1. package/.claude/skills/colamd-themes-preview.skill.md +333 -0
  2. package/.claude/skills/colamd-themes.skill.md +155 -0
  3. package/.hermes/skills/tools/colamd-themes/SKILL.md +159 -0
  4. package/.openclaw/skills/colamd-themes/SKILL.md +166 -0
  5. package/.opencode/skills/colamd-themes/SKILL.md +162 -0
  6. package/.trae/rules/colamd-themes.md +150 -0
  7. package/CHANGELOG.md +102 -0
  8. package/README.md +373 -0
  9. package/README_CN.md +373 -0
  10. package/RELEASENOTE.md +177 -0
  11. package/dist/cli.d.ts +2 -0
  12. package/dist/cli.js +208 -0
  13. package/dist/cli.js.map +1 -0
  14. package/dist/color-systems.d.ts +17 -0
  15. package/dist/color-systems.js +251 -0
  16. package/dist/color-systems.js.map +1 -0
  17. package/dist/color-utils.d.ts +9 -0
  18. package/dist/color-utils.js +112 -0
  19. package/dist/color-utils.js.map +1 -0
  20. package/dist/contrast.d.ts +15 -0
  21. package/dist/contrast.js +63 -0
  22. package/dist/contrast.js.map +1 -0
  23. package/dist/docx-style-paradigm.d.ts +153 -0
  24. package/dist/docx-style-paradigm.js +640 -0
  25. package/dist/docx-style-paradigm.js.map +1 -0
  26. package/dist/export-cli.d.ts +10 -0
  27. package/dist/export-cli.js +266 -0
  28. package/dist/export-cli.js.map +1 -0
  29. package/dist/extractors/base.d.ts +6 -0
  30. package/dist/extractors/base.js +3 -0
  31. package/dist/extractors/base.js.map +1 -0
  32. package/dist/extractors/docx-extractor.d.ts +52 -0
  33. package/dist/extractors/docx-extractor.js +370 -0
  34. package/dist/extractors/docx-extractor.js.map +1 -0
  35. package/dist/extractors/pdf-extractor.d.ts +66 -0
  36. package/dist/extractors/pdf-extractor.js +430 -0
  37. package/dist/extractors/pdf-extractor.js.map +1 -0
  38. package/dist/extractors/url-extractor.d.ts +104 -0
  39. package/dist/extractors/url-extractor.js +761 -0
  40. package/dist/extractors/url-extractor.js.map +1 -0
  41. package/dist/generator.d.ts +4 -0
  42. package/dist/generator.js +71 -0
  43. package/dist/generator.js.map +1 -0
  44. package/dist/index.d.ts +10 -0
  45. package/dist/index.js +9 -0
  46. package/dist/index.js.map +1 -0
  47. package/dist/mermaid-presets.d.ts +14 -0
  48. package/dist/mermaid-presets.js +122 -0
  49. package/dist/mermaid-presets.js.map +1 -0
  50. package/dist/models.d.ts +106 -0
  51. package/dist/models.js +92 -0
  52. package/dist/models.js.map +1 -0
  53. package/dist/renderer.d.ts +70 -0
  54. package/dist/renderer.js +204 -0
  55. package/dist/renderer.js.map +1 -0
  56. package/dist/templates/template.css +498 -0
  57. package/dist/templates/theme-paradigm.md +658 -0
  58. package/dist/templates/theme-template.hbs +370 -0
  59. package/dist/theme-store.d.ts +37 -0
  60. package/dist/theme-store.js +90 -0
  61. package/dist/theme-store.js.map +1 -0
  62. package/dist/validators.d.ts +26 -0
  63. package/dist/validators.js +144 -0
  64. package/dist/validators.js.map +1 -0
  65. package/package.json +36 -0
  66. package/skills/build-skills.sh +166 -0
  67. package/skills/colamd-themes/SKILL.md +148 -0
  68. package/src/cli.ts +200 -0
  69. package/src/color-systems.ts +289 -0
  70. package/src/color-utils.ts +120 -0
  71. package/src/contrast.ts +66 -0
  72. package/src/docx-style-paradigm.ts +811 -0
  73. package/src/export-cli.ts +301 -0
  74. package/src/extractors/base.ts +8 -0
  75. package/src/extractors/docx-extractor.ts +417 -0
  76. package/src/extractors/pdf-extractor.ts +527 -0
  77. package/src/extractors/url-extractor.ts +927 -0
  78. package/src/generator.ts +88 -0
  79. package/src/index.ts +29 -0
  80. package/src/mermaid-presets.ts +142 -0
  81. package/src/models.ts +212 -0
  82. package/src/renderer.ts +277 -0
  83. package/src/templates/template.css +498 -0
  84. package/src/templates/theme-paradigm.md +658 -0
  85. package/src/templates/theme-template.hbs +370 -0
  86. package/src/theme-store.ts +112 -0
  87. package/src/types/pdf-parse.d.ts +12 -0
  88. package/src/validators.ts +176 -0
  89. package/themes/.gitkeep +0 -0
  90. package/themes/academic-paper-pt.css +1805 -0
  91. package/themes/academic-paper.css +1099 -0
  92. package/themes/academic-style.css +2430 -0
  93. package/themes/colly.css +370 -0
  94. package/themes/elegant.css +671 -0
  95. package/themes/forest-ink.css +664 -0
  96. package/themes/guizang.css +732 -0
  97. package/themes/meeting-minutes.css +370 -0
  98. package/themes/pixso-design.css +1261 -0
  99. package/themes/salvator-blog.css +370 -0
  100. package/themes/swiss-design copy.css +746 -0
  101. package/themes/swiss-design.css +746 -0
  102. package/themes/template.css +498 -0
  103. package/themes/trae-blue.css +737 -0
  104. package/themes-preview/colly-preview.html +623 -0
  105. package/themes-preview/demo-content.md +187 -0
  106. package/themes-preview/meeting-minutes-preview.html +625 -0
  107. package/themes-preview/salvator-blog-preview.html +623 -0
  108. package/tsconfig.json +18 -0
@@ -0,0 +1,498 @@
1
+ /*
2
+ * ColaMD 主题模板:{你的主题名称}
3
+ * 版本:v3.0(模块化 + 变量驱动范式)
4
+ *
5
+ * ═══════════════════════════════════════════════════════════
6
+ * 使用说明(面向用户 & AI Agent)
7
+ * ═══════════════════════════════════════════════════════════
8
+ *
9
+ * 【快速上手】
10
+ * 1. 修改 SECTION 1 的种子色板 (5 个种子色)
11
+ * 2. 修改 SECTION 1 的字体选择 (3 组字体栈)
12
+ * 3. 保存,导入 ColaMD:Theme > Import Theme
13
+ * → 其余变量自动推导,无需手动调整
14
+ *
15
+ * 【变量命名规则】
16
+ * --seed-* = 用户定义的原始设计令牌 (SECTION 1)
17
+ * --color-* = 自动推导的色阶变量 (SECTION 2)
18
+ * --font-* = 字体栈变量
19
+ * --mermaid-* = Mermaid 图表变量 (被内置 variables.css 消费)
20
+ *
21
+ * 【架构原理】
22
+ * 本文件只定义变量 + 极小量微调选择器。
23
+ * 所有 Mermaid SVG 样式由 src/.../mermaid/variables.css 自动映射。
24
+ * 所有编辑器排版由 src/.../base.css 自动承继。
25
+ * → 主题作者只需关注「变量值」,无需写重复的选择器。
26
+ *
27
+ * 【配色方法论】
28
+ * 浅色主题:seed-surface 最浅 → seed-panel 稍深 → seed-ink 最深
29
+ * 深色主题:反转以上关系
30
+ * 点缀色 (seed-accent):占页面 5-10% 面积,用于链接/强调/边框
31
+ *
32
+ * ═══════════════════════════════════════════════════════════
33
+ * SECTION 1 — 设计令牌 (Design Tokens)
34
+ * 用户只需修改此区域的数值
35
+ * ═══════════════════════════════════════════════════════════ */
36
+
37
+ body.theme-custom {
38
+
39
+ /* ═══════════════════════════════════════════════════════════
40
+ 1.1 种子色板 (Seed Palette)
41
+ 修改这 5 个种子色即可改变整个主题的视觉基调
42
+ ═══════════════════════════════════════════════════════════ */
43
+
44
+ /* 点缀色:用于链接、强调、Mermaid 高亮、引用边框(占页面 ≤10%) */
45
+ --seed-accent: #6366f1; /* 主色 (Indigo) */
46
+ --seed-accent-light: #eef2ff; /* 浅变体 (bg 用途) */
47
+ --seed-accent-dark: #4f46e5; /* 深变体 (hover/text) */
48
+
49
+ /* 表面色:页面底色层次(从浅到深,3 级) */
50
+ --seed-surface: #ffffff; /* L0 页面背景 (最浅) */
51
+ --seed-panel: #f8f9fb; /* L1 卡片/代码区背景 */
52
+ --seed-panel-alt: #f1f3f5; /* L2 表头/引用块背景 */
53
+
54
+ /* 文字色:前景色层次(从深到浅,3 级) */
55
+ --seed-ink: #1a1d26; /* T0 正文/标题 (最深) */
56
+ --seed-ink-muted: #6b7280; /* T1 次要文字 */
57
+ --seed-ink-dim: #9ca3af; /* T2 弱化/禁用文字 */
58
+
59
+ /* 边框色 */
60
+ --seed-border: #e5e7eb; /* 分割线/表格边框 */
61
+ --seed-border-strong: #d1d5db; /* 强调边框 */
62
+
63
+ /* ═══════════════════════════════════════════════════════════
64
+ 1.2 字体系统 (Typography)
65
+ ═══════════════════════════════════════════════════════════ */
66
+
67
+ /* 正文字体栈:优先西文 → 中文衬线 → 通用衬线 */
68
+ --font-body: "Inter", "SF Pro Text", -apple-system, BlinkMacSystemFont,
69
+ "Noto Serif SC", "Source Han Serif SC", "Songti SC",
70
+ Georgia, "Times New Roman", serif;
71
+
72
+ /* 标题字体栈:无衬线优先,与正文形成对比 */
73
+ --font-heading: "Inter", "SF Pro Display", -apple-system, BlinkMacSystemFont,
74
+ "Noto Sans SC", "Source Han Sans SC", "PingFang SC",
75
+ "Microsoft YaHei", sans-serif;
76
+
77
+ /* 等宽字体栈:代码/公式 */
78
+ --font-code: "JetBrains Mono", "SF Mono", "Fira Code", Menlo, Consolas, monospace;
79
+
80
+ /* Mermaid 图表字体(与标题保持一致,字号独立控制) */
81
+ --font-mermaid: var(--font-heading);
82
+
83
+ /* ═══════════════════════════════════════════════════════════
84
+ 1.3 字号 & 间距
85
+ ═══════════════════════════════════════════════════════════ */
86
+
87
+ /* 基准字号 (1rem = 该值) */
88
+ --font-size-root: 16px;
89
+
90
+ /* 标题倍率(相对于根字号) */
91
+ --font-scale-h1: 2.0; /* 32px */
92
+ --font-scale-h2: 1.5; /* 24px */
93
+ --font-scale-h3: 1.25; /* 20px */
94
+ --font-scale-h4: 1.1; /* 17.6px */
95
+ --font-scale-h5: 1.0; /* 16px */
96
+ --font-scale-h6: 0.95; /* 15.2px */
97
+
98
+ /* Mermaid 独立字号 */
99
+ --font-size-mermaid: 13px;
100
+
101
+ /* 行高 */
102
+ --line-height-body: 1.75;
103
+ --line-height-heading: 1.35;
104
+ --line-height-code: 1.6;
105
+
106
+ /* ═══════════════════════════════════════════════════════════
107
+ 1.4 圆角 & 间距 (可选)
108
+ ═══════════════════════════════════════════════════════════ */
109
+ --radius-sm: 3px;
110
+ --radius-md: 6px;
111
+ --radius-lg: 10px;
112
+ --content-width: 820px;
113
+
114
+ /* ═══════════════════════════════════════════════════════════
115
+ SECTION 2 — 语义映射 (Semantic Mapping)
116
+ 将 SECTION 1 的令牌自动映射到 ColaMD 内置系统消费的变量
117
+ 通常无需修改,除非需要特殊微调某个语义角色
118
+ ═══════════════════════════════════════════════════════════ */
119
+
120
+ /* ── 2.1 编辑区表面色 ── */
121
+ --bg-color: var(--seed-surface);
122
+ --surface-color: var(--seed-panel);
123
+ --surface-alt: var(--seed-panel-alt);
124
+
125
+ /* ── 2.2 编辑区文字色 ── */
126
+ --text-color: var(--seed-ink);
127
+ --heading-color: var(--seed-ink);
128
+ --text-muted: var(--seed-ink-muted);
129
+ --text-dim: var(--seed-ink-dim);
130
+
131
+ /* ── 2.3 链接 & 强调 ── */
132
+ --link-color: var(--seed-accent);
133
+ --accent-color: var(--seed-accent);
134
+ --accent-dark: var(--seed-accent-dark);
135
+ --accent-light: var(--seed-accent-light);
136
+ --selection-bg: rgba(99, 102, 241, 0.15); /* 手动匹配 accent */
137
+
138
+ /* ── 2.4 边框 & 分割线 ── */
139
+ --border-color: var(--seed-border);
140
+ --blockquote-border: var(--seed-accent);
141
+ --hr-color: var(--seed-border);
142
+
143
+ /* ── 2.5 内联代码 ── */
144
+ --code-bg: var(--seed-panel);
145
+ --code-color: var(--seed-accent-dark);
146
+
147
+ /* ── 2.6 代码块 ── */
148
+ --code-block-bg: var(--seed-panel-alt);
149
+ --code-block-text: var(--seed-ink);
150
+ --code-block-color: var(--seed-ink);
151
+
152
+ /* ── 2.7 引用块 ── */
153
+ --blockquote-bg: var(--seed-panel);
154
+
155
+ /* ── 2.8 表格 ── */
156
+ --table-header-bg: var(--seed-panel);
157
+ --table-border: var(--seed-border);
158
+
159
+ /* ── 2.9 滚动条 ── */
160
+ --scrollbar-thumb: var(--seed-border-strong);
161
+ --scrollbar-thumb-hover: var(--seed-ink-muted);
162
+
163
+ /* ═══════════════════════════════════════════════════════════
164
+ SECTION 3 — Mermaid 图表变量 (20 核心变量)
165
+ 由内置 src/.../mermaid/variables.css 自动消费
166
+ 变量说明注释标注了每个变量的视觉作用
167
+ ═══════════════════════════════════════════════════════════ */
168
+
169
+ /* ── 3.1 容器 ── */
170
+ --mermaid-background: var(--seed-panel); /* 图表容器背景 */
171
+ --mermaid-border-color: var(--seed-border); /* 图表容器边框 */
172
+ --mermaid-border-radius: var(--radius-md); /* 图表容器圆角 */
173
+ --mermaid-padding: 20px; /* 图表容器内边距 */
174
+
175
+ /* ── 3.2 字体 ── */
176
+ --mermaid-font-family: var(--font-mermaid); /* 图表内字体 */
177
+ --mermaid-font-size: var(--font-size-mermaid); /* 图表内字号 */
178
+
179
+ /* ── 3.3 节点 (所有图表类型的矩形/圆形/菱形等) ── */
180
+ --mermaid-node-fill: var(--seed-panel); /* 节点填充色 */
181
+ --mermaid-node-stroke: var(--seed-accent); /* 节点描边色 */
182
+ --mermaid-node-stroke-width: 1.5px; /* 节点描边宽度 */
183
+ --mermaid-node-text: var(--seed-ink); /* 节点内文字色 */
184
+
185
+ /* ── 3.4 连线 (边/箭头) ── */
186
+ --mermaid-edge-stroke: var(--seed-ink-muted); /* 连线颜色 */
187
+ --mermaid-edge-stroke-width: 1.5px; /* 连线宽度 */
188
+
189
+ /* ── 3.5 聚类 (Subgraph / 子图容器) ── */
190
+ --mermaid-cluster-fill: rgba(99, 102, 241, 0.06); /* 聚类填充 */
191
+ --mermaid-cluster-stroke: var(--seed-accent); /* 聚类边框 */
192
+
193
+ /* ── 3.6 标签 (节点内文本 / 边标签文本) ── */
194
+ --mermaid-label-text: var(--seed-ink); /* 标签文字色 */
195
+ --mermaid-edge-label-text: var(--seed-ink-muted); /* 边标签文字色 */
196
+ --mermaid-edge-label-bg: var(--seed-surface); /* 边标签背景色 */
197
+
198
+ /* ── 3.7 标题 & 坐标轴 (Pie/Gantt/XYChart 等) ── */
199
+ --mermaid-title-text: var(--seed-ink); /* 图表标题色 */
200
+ --mermaid-axis-text: var(--seed-ink-muted); /* 坐标轴文字色 */
201
+ --mermaid-highlight: var(--seed-accent); /* 高亮/标记色 */
202
+
203
+ /* ── 3.8 人物节点 (Sequence / C4 等) ── */
204
+ --mermaid-person-stroke: var(--seed-ink); /* 人物描边色 */
205
+ --mermaid-person-fill: var(--seed-panel); /* 人物填充色 */
206
+
207
+ /* ── 3.9 标签 Y 偏移 (微调文字垂直对齐,通常 0 或 -3px) ── */
208
+ --mermaid-label-offset-y: 0px;
209
+
210
+ /* ═══════════════════════════════════════════════════════════
211
+ SECTION 4 — 排版微调 (Fine Tuning)
212
+ 仅覆盖 base.css 未通过变量处理的样式
213
+ 所有值继续引用变量,禁止硬编码
214
+ ═══════════════════════════════════════════════════════════ */
215
+
216
+
217
+ /* ── 4.1 中文字体适应:适当增大行高 ── */
218
+ --line-height-base: var(--line-height-body);
219
+
220
+ /* ── 4.2 深色代码块需要文字变亮 (可选,若代码块背景很深则启用) ── */
221
+ /* --code-block-text: #e4e7ed; */ /* 默认注释,按需取消 */
222
+ }
223
+
224
+ /* ═════════════════════════════════════════════════════════════
225
+ SECTION 5 — 选择器级微调 (Selector Fine-Tuning)
226
+ 仅用于 base.css 不提供的个性化样式
227
+ 所有值严格引用变量,禁止出现裸色值/裸字号
228
+ ═════════════════════════════════════════════════════════════ */
229
+
230
+ /* ── 5.1 全局:字体 + 底色 + 字号 ── */
231
+ html { font-size: var(--font-size-root); }
232
+ body.theme-custom, html, body {
233
+ background-color: var(--bg-color);
234
+ color: var(--text-color);
235
+ font-family: var(--font-body);
236
+ line-height: var(--line-height-body);
237
+ }
238
+
239
+ /* ── 5.2 编辑区 ── */
240
+ #write {
241
+ max-width: var(--content-width);
242
+ margin: 0 auto;
243
+ padding: 30px 60px 100px;
244
+ }
245
+
246
+ /* ── 5.3 标题:字体 + 倍率 ── */
247
+ body.theme-custom h1, body.theme-custom h2, body.theme-custom h3,
248
+ body.theme-custom h4, body.theme-custom h5, body.theme-custom h6 {
249
+ font-family: var(--font-heading);
250
+ color: var(--heading-color);
251
+ font-weight: 700;
252
+ line-height: var(--line-height-heading);
253
+ }
254
+
255
+ body.theme-custom h1 { font-size: calc(var(--font-size-root) * var(--font-scale-h1)); }
256
+ body.theme-custom h2 { font-size: calc(var(--font-size-root) * var(--font-scale-h2)); }
257
+ body.theme-custom h3 { font-size: calc(var(--font-size-root) * var(--font-scale-h3)); }
258
+ body.theme-custom h4 { font-size: calc(var(--font-size-root) * var(--font-scale-h4)); }
259
+ body.theme-custom h5 { font-size: calc(var(--font-size-root) * var(--font-scale-h5)); }
260
+ body.theme-custom h6 { font-size: calc(var(--font-size-root) * var(--font-scale-h6)); }
261
+
262
+ /* ── 5.4 内联强调:使用点缀色 ── */
263
+ body.theme-custom strong { color: var(--accent-color); }
264
+
265
+ /* ── 5.5 内联代码 ── */
266
+ body.theme-custom code {
267
+ font-family: var(--font-code);
268
+ background: var(--code-bg);
269
+ color: var(--code-color);
270
+ }
271
+
272
+ /* ── 5.6 代码块 ── */
273
+ body.theme-custom pre {
274
+ background: var(--code-block-bg);
275
+ font-family: var(--font-code);
276
+ line-height: var(--line-height-code);
277
+ }
278
+ body.theme-custom pre code {
279
+ color: var(--code-block-text);
280
+ background: transparent;
281
+ }
282
+
283
+ /* ── 5.7 引用块 ── */
284
+ body.theme-custom blockquote {
285
+ background: var(--blockquote-bg);
286
+ border-left: 4px solid var(--blockquote-border);
287
+ }
288
+
289
+ /* ── 5.8 表格表头 ── */
290
+ body.theme-custom table th {
291
+ background: var(--table-header-bg);
292
+ font-weight: 700;
293
+ border-bottom: 2px solid var(--accent-color);
294
+ }
295
+
296
+ /* ── 5.9 分割线 ── */
297
+ body.theme-custom hr {
298
+ border: none;
299
+ border-top: 1px solid var(--hr-color);
300
+ }
301
+
302
+ /* ── 5.10 图片居中 ── */
303
+ body.theme-custom img { max-width: 100%; }
304
+
305
+ /* ── 5.11 Mermaid 图表标题(跟随图表的 p) ── */
306
+ /* 用于 **图X ...** 这类 Markdown 标题自动居中 */
307
+ body.theme-custom .mermaid-block + p {
308
+ text-align: center;
309
+ font-family: var(--font-heading);
310
+ font-size: calc(var(--font-size-mermaid) + 2px);
311
+ color: var(--text-muted);
312
+ }
313
+
314
+ /* ── 5.12 响应式 ── */
315
+ @media only screen and (max-width: 768px) {
316
+ #write { padding: 20px; }
317
+ body.theme-custom .mermaid-block { padding: 12px; }
318
+ body.theme-custom .mermaid-preview svg { max-width: 100% !important; height: auto !important; }
319
+ }
320
+
321
+ /* ═════════════════════════════════════════════════════════════
322
+ SECTION 6 — 打印 / 导出 (Print / Export)
323
+ 原则:屏幕样式的完整镜像。每个屏幕属性都必须在 print 中显式声明。
324
+ 禁止在 print 中引入新色值,禁止遗漏任何有色/有尺寸的元素。
325
+ ═════════════════════════════════════════════════════════════ */
326
+ @media print {
327
+ @page { margin: 20mm; }
328
+
329
+ /* ── 6.0 变量重声明(Chromium 打印引擎会丢失 CSS 变量,需重新注入) ── */
330
+ body.theme-custom {
331
+ --seed-accent: #6366f1; /* ⬅ 与 SECTION 1.1 保持完全一致 */
332
+ --seed-accent-dark: #4f46e5;
333
+ --seed-surface: #ffffff;
334
+ --seed-ink: #1a1d26;
335
+ --seed-ink-muted: #6b7280;
336
+ --seed-panel: #f8f9fb;
337
+ --seed-panel-alt: #f1f3f5;
338
+ --seed-border: #e5e7eb;
339
+ --font-size-root: 16px;
340
+ --line-height-body: 1.75;
341
+ --line-height-heading: 1.35;
342
+ --line-height-code: 1.6;
343
+ --font-scale-h1: 2.0;
344
+ --font-scale-h2: 1.5;
345
+ --font-scale-h3: 1.25;
346
+ --font-scale-h4: 1.1;
347
+ --font-scale-h5: 1.0;
348
+ --font-scale-h6: 0.95;
349
+ --content-width: 820px;
350
+ --font-size-mermaid: 13px;
351
+ --accent-color: var(--seed-accent);
352
+ --accent-dark: var(--seed-accent-dark);
353
+ --code-bg: var(--seed-panel);
354
+ --code-color: var(--seed-accent-dark);
355
+ --code-block-bg: var(--seed-panel-alt);
356
+ --code-block-text: var(--seed-ink);
357
+ --blockquote-bg: var(--seed-panel);
358
+ --table-header-bg: var(--seed-panel);
359
+ --border-color: var(--seed-border);
360
+ --hr-color: var(--seed-border);
361
+ --font-body: "Inter", "SF Pro Text", -apple-system, BlinkMacSystemFont,
362
+ "Noto Serif SC", "Source Han Serif SC", "Songti SC",
363
+ Georgia, "Times New Roman", serif;
364
+ --font-heading: "Inter", "SF Pro Display", -apple-system, BlinkMacSystemFont,
365
+ "Noto Sans SC", "Source Han Sans SC", "PingFang SC",
366
+ "Microsoft YaHei", sans-serif;
367
+ --font-code: "JetBrains Mono", "SF Mono", "Fira Code", Menlo, Consolas, monospace;
368
+ }
369
+
370
+ /* ── 6.1 根元素:字号 + 字体 + 行高 + 底色 ── */
371
+ html {
372
+ font-size: var(--font-size-root) !important;
373
+ }
374
+ html, body, body.theme-custom {
375
+ background: var(--seed-surface) !important;
376
+ color: var(--seed-ink) !important;
377
+ font-family: var(--font-body) !important;
378
+ line-height: var(--line-height-body) !important;
379
+ -webkit-print-color-adjust: exact !important;
380
+ print-color-adjust: exact !important;
381
+ }
382
+
383
+ /* ── 6.2 编辑区 ── */
384
+ #write {
385
+ max-width: var(--content-width) !important;
386
+ margin: 0 auto !important;
387
+ padding: 30px 60px 100px !important;
388
+ }
389
+
390
+ /* ── 6.3 标题:字号 + 字体 + 字重 + 行高 ── */
391
+ body.theme-custom h1, body.theme-custom h2, body.theme-custom h3,
392
+ body.theme-custom h4, body.theme-custom h5, body.theme-custom h6 {
393
+ font-family: var(--font-heading) !important;
394
+ color: var(--seed-ink) !important;
395
+ font-weight: 700 !important;
396
+ line-height: var(--line-height-heading) !important;
397
+ -webkit-print-color-adjust: exact !important;
398
+ print-color-adjust: exact !important;
399
+ }
400
+ body.theme-custom h1 { font-size: calc(var(--font-size-root) * var(--font-scale-h1)) !important; }
401
+ body.theme-custom h2 { font-size: calc(var(--font-size-root) * var(--font-scale-h2)) !important; }
402
+ body.theme-custom h3 { font-size: calc(var(--font-size-root) * var(--font-scale-h3)) !important; }
403
+ body.theme-custom h4 { font-size: calc(var(--font-size-root) * var(--font-scale-h4)) !important; }
404
+ body.theme-custom h5 { font-size: calc(var(--font-size-root) * var(--font-scale-h5)) !important; }
405
+ body.theme-custom h6 { font-size: calc(var(--font-size-root) * var(--font-scale-h6)) !important; }
406
+
407
+ /* ── 6.4 内联强调 ── */
408
+ body.theme-custom strong {
409
+ color: var(--accent-color) !important;
410
+ font-weight: 700 !important;
411
+ -webkit-print-color-adjust: exact !important;
412
+ print-color-adjust: exact !important;
413
+ }
414
+
415
+ /* ── 6.5 内联代码:字体 + 背景 + 颜色 ── */
416
+ body.theme-custom code {
417
+ font-family: var(--font-code) !important;
418
+ background: var(--code-bg) !important;
419
+ color: var(--code-color) !important;
420
+ -webkit-print-color-adjust: exact !important;
421
+ print-color-adjust: exact !important;
422
+ }
423
+
424
+ /* ── 6.6 代码块:背景 + 字体 + 行高 ── */
425
+ body.theme-custom pre {
426
+ background: var(--code-block-bg) !important;
427
+ font-family: var(--font-code) !important;
428
+ line-height: var(--line-height-code) !important;
429
+ -webkit-print-color-adjust: exact !important;
430
+ print-color-adjust: exact !important;
431
+ }
432
+ body.theme-custom pre code {
433
+ color: var(--code-block-text) !important;
434
+ background: transparent !important;
435
+ }
436
+
437
+ /* ── 6.7 引用块:背景 + 左侧竖线(色值与屏幕一致:accent) ── */
438
+ body.theme-custom blockquote {
439
+ background: var(--blockquote-bg) !important;
440
+ border-left: 4px solid var(--seed-accent) !important;
441
+ -webkit-print-color-adjust: exact !important;
442
+ print-color-adjust: exact !important;
443
+ }
444
+
445
+ /* ── 6.8 表格:边框合并 + 表头 ── */
446
+ body.theme-custom table {
447
+ border-collapse: collapse !important;
448
+ }
449
+ body.theme-custom table th {
450
+ background: var(--table-header-bg) !important;
451
+ color: var(--seed-ink) !important;
452
+ font-weight: 700 !important;
453
+ border-bottom: 2px solid var(--accent-color) !important;
454
+ -webkit-print-color-adjust: exact !important;
455
+ print-color-adjust: exact !important;
456
+ }
457
+ body.theme-custom table td {
458
+ border-color: var(--seed-border) !important;
459
+ }
460
+
461
+ /* ── 6.9 链接 ── */
462
+ body.theme-custom a {
463
+ color: var(--seed-accent) !important;
464
+ -webkit-print-color-adjust: exact !important;
465
+ print-color-adjust: exact !important;
466
+ }
467
+
468
+ /* ── 6.10 分割线 ── */
469
+ body.theme-custom hr {
470
+ border: none !important;
471
+ border-top: 1px solid var(--hr-color) !important;
472
+ }
473
+
474
+ /* ── 6.11 图片 ── */
475
+ body.theme-custom img {
476
+ max-width: 100% !important;
477
+ }
478
+
479
+ /* ── 6.12 Mermaid 图表容器 ── */
480
+ body.theme-custom .mermaid-block {
481
+ background: var(--seed-surface) !important;
482
+ border-color: var(--seed-border) !important;
483
+ -webkit-print-color-adjust: exact !important;
484
+ print-color-adjust: exact !important;
485
+ }
486
+ body.theme-custom .mermaid-preview svg * {
487
+ -webkit-print-color-adjust: exact !important;
488
+ print-color-adjust: exact !important;
489
+ }
490
+
491
+ /* ── 6.13 图表标题 ── */
492
+ body.theme-custom .mermaid-block + p {
493
+ color: var(--seed-ink-muted) !important;
494
+ text-align: center !important;
495
+ font-family: var(--font-heading) !important;
496
+ font-size: calc(var(--font-size-mermaid) + 2px) !important;
497
+ }
498
+ }