@icen.ai/ui 0.9.0 → 0.10.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 (281) hide show
  1. package/AGENTS.md +138 -80
  2. package/README.md +66 -91
  3. package/dist/base.css +208 -179
  4. package/dist/behaviors/accordion.mjs +8 -8
  5. package/dist/behaviors/ai-branch.d.mts +1 -1
  6. package/dist/behaviors/ai-branch.mjs +1010 -94
  7. package/dist/behaviors/ai-chat.d.mts +7 -7
  8. package/dist/behaviors/ai-chat.mjs +1071 -161
  9. package/dist/behaviors/ai-composer.d.mts +44 -12
  10. package/dist/behaviors/ai-composer.mjs +1997 -524
  11. package/dist/behaviors/ai-core.d.mts +1 -1
  12. package/dist/behaviors/ai-core.mjs +1016 -107
  13. package/dist/behaviors/ai-diff.mjs +1019 -127
  14. package/dist/behaviors/ai-feedback.d.mts +1 -1
  15. package/dist/behaviors/ai-feedback.mjs +1035 -126
  16. package/dist/behaviors/ai-panel.d.mts +8 -8
  17. package/dist/behaviors/ai-panel.mjs +1284 -266
  18. package/dist/behaviors/ai-provider.mjs +1003 -101
  19. package/dist/behaviors/ai-threads.d.mts +1 -1
  20. package/dist/behaviors/ai-threads.mjs +1068 -154
  21. package/dist/behaviors/ai-tool.d.mts +2 -2
  22. package/dist/behaviors/ai-tool.mjs +2037 -396
  23. package/dist/behaviors/ai-tools.d.mts +89 -16
  24. package/dist/behaviors/ai-tools.mjs +4448 -372
  25. package/dist/behaviors/autocomplete.d.mts +53 -0
  26. package/dist/behaviors/autocomplete.mjs +1600 -0
  27. package/dist/behaviors/back-top.d.mts +1 -1
  28. package/dist/behaviors/back-top.mjs +951 -14
  29. package/dist/behaviors/carousel.d.mts +1 -1
  30. package/dist/behaviors/carousel.mjs +906 -11
  31. package/dist/behaviors/cascader.d.mts +48 -0
  32. package/dist/behaviors/cascader.mjs +1853 -0
  33. package/dist/behaviors/charts.d.mts +72 -8
  34. package/dist/behaviors/charts.mjs +1901 -256
  35. package/dist/behaviors/code-block.d.mts +36 -0
  36. package/dist/behaviors/code-block.mjs +1611 -0
  37. package/dist/behaviors/command-palette.d.mts +9 -6
  38. package/dist/behaviors/command-palette.mjs +161 -59
  39. package/dist/behaviors/context-menu.d.mts +9 -8
  40. package/dist/behaviors/context-menu.mjs +1112 -44
  41. package/dist/behaviors/controls.d.mts +13 -13
  42. package/dist/behaviors/controls.mjs +989 -130
  43. package/dist/behaviors/copy.d.mts +21 -2
  44. package/dist/behaviors/copy.mjs +1206 -42
  45. package/dist/behaviors/datatable.d.mts +53 -3
  46. package/dist/behaviors/datatable.mjs +1963 -207
  47. package/dist/behaviors/date-picker.d.mts +0 -1
  48. package/dist/behaviors/date-picker.mjs +1340 -293
  49. package/dist/behaviors/design.d.mts +54 -0
  50. package/dist/behaviors/design.mjs +109 -0
  51. package/dist/behaviors/dropdown.d.mts +5 -6
  52. package/dist/behaviors/dropdown.mjs +262 -110
  53. package/dist/behaviors/events.d.mts +120 -3
  54. package/dist/behaviors/events.mjs +47 -2
  55. package/dist/behaviors/feedback.d.mts +30 -0
  56. package/dist/behaviors/feedback.mjs +296 -0
  57. package/dist/behaviors/focus.d.mts +8 -0
  58. package/dist/behaviors/focus.mjs +24 -0
  59. package/dist/behaviors/form-validate.d.mts +102 -0
  60. package/dist/behaviors/form-validate.mjs +6091 -0
  61. package/dist/behaviors/i18n.d.mts +789 -0
  62. package/dist/behaviors/i18n.mjs +1711 -0
  63. package/dist/behaviors/icons.d.mts +93 -0
  64. package/dist/behaviors/icons.mjs +113 -0
  65. package/dist/behaviors/input.d.mts +9 -1
  66. package/dist/behaviors/input.mjs +1056 -60
  67. package/dist/behaviors/kb-access.d.mts +1 -1
  68. package/dist/behaviors/kb-access.mjs +2129 -239
  69. package/dist/behaviors/kb-acl.d.mts +6 -6
  70. package/dist/behaviors/kb-acl.mjs +1119 -179
  71. package/dist/behaviors/kb-answer.mjs +2070 -418
  72. package/dist/behaviors/kb-audit.d.mts +1 -1
  73. package/dist/behaviors/kb-audit.mjs +1076 -154
  74. package/dist/behaviors/kb-canvas.mjs +1100 -177
  75. package/dist/behaviors/kb-chain.mjs +1022 -100
  76. package/dist/behaviors/kb-checkpoint.d.mts +1 -1
  77. package/dist/behaviors/kb-checkpoint.mjs +1319 -169
  78. package/dist/behaviors/kb-chunks.mjs +1152 -213
  79. package/dist/behaviors/kb-citation.d.mts +1 -1
  80. package/dist/behaviors/kb-citation.mjs +1201 -179
  81. package/dist/behaviors/kb-clarify.mjs +1058 -130
  82. package/dist/behaviors/kb-conflict.mjs +1041 -119
  83. package/dist/behaviors/kb-connector.mjs +1104 -176
  84. package/dist/behaviors/kb-core.d.mts +6 -1
  85. package/dist/behaviors/kb-core.mjs +1077 -162
  86. package/dist/behaviors/kb-eval.mjs +1971 -144
  87. package/dist/behaviors/kb-explain.d.mts +1 -1
  88. package/dist/behaviors/kb-explain.mjs +1024 -102
  89. package/dist/behaviors/kb-filter.mjs +2008 -178
  90. package/dist/behaviors/kb-gap.d.mts +1 -1
  91. package/dist/behaviors/kb-gap.mjs +1043 -121
  92. package/dist/behaviors/kb-hittest.d.mts +1 -1
  93. package/dist/behaviors/kb-hittest.mjs +1093 -150
  94. package/dist/behaviors/kb-metadata.mjs +1052 -130
  95. package/dist/behaviors/kb-passage.d.mts +2 -2
  96. package/dist/behaviors/kb-passage.mjs +1101 -161
  97. package/dist/behaviors/kb-pipeline.d.mts +2 -2
  98. package/dist/behaviors/kb-pipeline.mjs +1082 -162
  99. package/dist/behaviors/kb-qa.mjs +1088 -160
  100. package/dist/behaviors/kb-rerank.mjs +1047 -114
  101. package/dist/behaviors/kb-retrieval.mjs +2063 -224
  102. package/dist/behaviors/kb-review.mjs +1990 -159
  103. package/dist/behaviors/kb-sandbox.d.mts +1 -1
  104. package/dist/behaviors/kb-sandbox.mjs +1026 -104
  105. package/dist/behaviors/kb-segment.mjs +1111 -179
  106. package/dist/behaviors/kb-select.d.mts +24 -0
  107. package/dist/behaviors/kb-select.mjs +1989 -0
  108. package/dist/behaviors/kb-sources.d.mts +1 -1
  109. package/dist/behaviors/kb-sources.mjs +1084 -170
  110. package/dist/behaviors/kb-sql.d.mts +1 -1
  111. package/dist/behaviors/kb-sql.mjs +1143 -226
  112. package/dist/behaviors/kb-trace.d.mts +1 -1
  113. package/dist/behaviors/kb-trace.mjs +1042 -128
  114. package/dist/behaviors/kb-visibility.mjs +1086 -158
  115. package/dist/behaviors/kb-who-can.mjs +1974 -137
  116. package/dist/behaviors/mentions.d.mts +93 -0
  117. package/dist/behaviors/mentions.mjs +2152 -0
  118. package/dist/behaviors/modal.d.mts +4 -3
  119. package/dist/behaviors/modal.mjs +1055 -33
  120. package/dist/behaviors/nav.d.mts +1 -1
  121. package/dist/behaviors/nav.mjs +6 -6
  122. package/dist/behaviors/notification.d.mts +16 -8
  123. package/dist/behaviors/notification.mjs +1615 -265
  124. package/dist/behaviors/panel.d.mts +4 -0
  125. package/dist/behaviors/panel.mjs +994 -0
  126. package/dist/behaviors/popover.d.mts +28 -5
  127. package/dist/behaviors/popover.mjs +225 -24
  128. package/dist/behaviors/select.d.mts +5 -2
  129. package/dist/behaviors/select.mjs +1410 -117
  130. package/dist/behaviors/sidebar.d.mts +1 -1
  131. package/dist/behaviors/sidebar.mjs +13 -13
  132. package/dist/behaviors/slider.d.mts +1 -1
  133. package/dist/behaviors/slider.mjs +9 -9
  134. package/dist/behaviors/split-pane.d.mts +1 -1
  135. package/dist/behaviors/split-pane.mjs +7 -7
  136. package/dist/behaviors/suggestions.d.mts +27 -0
  137. package/dist/behaviors/suggestions.mjs +1089 -0
  138. package/dist/behaviors/svg-parse.d.mts +14 -0
  139. package/dist/behaviors/svg-parse.mjs +37 -0
  140. package/dist/behaviors/tabs.d.mts +2 -2
  141. package/dist/behaviors/tabs.mjs +25 -25
  142. package/dist/behaviors/tag-input.d.mts +23 -5
  143. package/dist/behaviors/tag-input.mjs +1359 -104
  144. package/dist/behaviors/theme-switcher.d.mts +24 -0
  145. package/dist/behaviors/theme-switcher.mjs +1981 -0
  146. package/dist/behaviors/theme.d.mts +15 -8
  147. package/dist/behaviors/theme.mjs +390 -28
  148. package/dist/behaviors/toast.d.mts +24 -25
  149. package/dist/behaviors/toast.mjs +1266 -88
  150. package/dist/behaviors/tooltip.d.mts +4 -0
  151. package/dist/behaviors/tooltip.mjs +378 -0
  152. package/dist/behaviors/tree-select.d.mts +69 -0
  153. package/dist/behaviors/tree-select.mjs +1907 -0
  154. package/dist/behaviors/tree.d.mts +1 -1
  155. package/dist/behaviors/tree.mjs +15 -15
  156. package/dist/behaviors/upload.d.mts +3 -2
  157. package/dist/behaviors/upload.mjs +1076 -66
  158. package/dist/cli.mjs +5 -6
  159. package/dist/components/ai-chat.css +666 -573
  160. package/dist/components/ai-diff.css +153 -132
  161. package/dist/components/ai-panel.css +351 -343
  162. package/dist/components/ai-tool.css +393 -238
  163. package/dist/components/autocomplete.css +61 -0
  164. package/dist/components/autocomplete.mjs +3 -0
  165. package/dist/components/back-top.css +34 -31
  166. package/dist/components/badge.css +44 -41
  167. package/dist/components/breadcrumb.css +67 -46
  168. package/dist/components/btn.css +80 -74
  169. package/dist/components/card.css +117 -106
  170. package/dist/components/cascader.css +311 -0
  171. package/dist/components/cascader.mjs +3 -0
  172. package/dist/components/chart-area.css +8 -2
  173. package/dist/components/chart-bar.css +95 -33
  174. package/dist/components/chart-gauge.css +14 -11
  175. package/dist/components/chart-graph.css +20 -17
  176. package/dist/components/chart-heatmap.css +96 -90
  177. package/dist/components/chart-line.css +8 -3
  178. package/dist/components/chart-pie.css +9 -6
  179. package/dist/components/chart-radar.css +8 -5
  180. package/dist/components/chart-scatter.css +9 -6
  181. package/dist/components/chart-sparkline.css +5 -2
  182. package/dist/components/chart-stack.css +14 -11
  183. package/dist/components/charts.css +164 -73
  184. package/dist/components/code-block.css +418 -0
  185. package/dist/components/code-block.mjs +4 -0
  186. package/dist/components/command-palette.css +138 -117
  187. package/dist/components/content.css +257 -251
  188. package/dist/components/copy.css +72 -44
  189. package/dist/components/datatable.css +423 -181
  190. package/dist/components/date-picker.css +135 -104
  191. package/dist/components/empty.css +68 -65
  192. package/dist/components/feedback.css +201 -183
  193. package/dist/components/form-validate.css +120 -0
  194. package/dist/components/form-validate.mjs +3 -0
  195. package/dist/components/form.css +150 -127
  196. package/dist/components/icon.css +102 -0
  197. package/dist/components/icon.mjs +3 -0
  198. package/dist/components/input.css +159 -104
  199. package/dist/components/kb-agent.css +188 -173
  200. package/dist/components/kb-data.css +257 -253
  201. package/dist/components/kb-ground.css +197 -185
  202. package/dist/components/kb-ingest.css +334 -350
  203. package/dist/components/kb-ops.css +265 -259
  204. package/dist/components/kb-perm.css +260 -271
  205. package/dist/components/kb-search.css +317 -360
  206. package/dist/components/kb.css +120 -109
  207. package/dist/components/layout.css +85 -82
  208. package/dist/components/material-chinese.css +73 -0
  209. package/dist/components/material-soviet.css +76 -0
  210. package/dist/components/material.css +275 -0
  211. package/dist/components/media.css +220 -166
  212. package/dist/components/mentions.css +189 -0
  213. package/dist/components/mentions.mjs +3 -0
  214. package/dist/components/menu.css +113 -105
  215. package/dist/components/modal.css +107 -112
  216. package/dist/components/nav.css +118 -115
  217. package/dist/components/notification.css +238 -174
  218. package/dist/components/pagination.css +56 -53
  219. package/dist/components/panel.css +66 -63
  220. package/dist/components/panel.mjs +1 -0
  221. package/dist/components/pill.css +81 -71
  222. package/dist/components/popover.css +67 -53
  223. package/dist/components/scroll-area.css +113 -110
  224. package/dist/components/segmented.css +146 -143
  225. package/dist/components/select.css +206 -186
  226. package/dist/components/sidebar.css +137 -127
  227. package/dist/components/slider.css +117 -114
  228. package/dist/components/split-pane.css +112 -109
  229. package/dist/components/stat.css +112 -106
  230. package/dist/components/steps.css +109 -103
  231. package/dist/components/switch.css +138 -134
  232. package/dist/components/table.css +131 -107
  233. package/dist/components/tabs.css +114 -108
  234. package/dist/components/tag-input.css +48 -133
  235. package/dist/components/tag.css +81 -71
  236. package/dist/components/theme-switcher.css +105 -0
  237. package/dist/components/theme-switcher.mjs +3 -0
  238. package/dist/components/toast.css +100 -86
  239. package/dist/components/toolbar.css +45 -42
  240. package/dist/components/tooltip.css +102 -43
  241. package/dist/components/tooltip.mjs +1 -0
  242. package/dist/components/tree-select.css +416 -0
  243. package/dist/components/tree-select.mjs +3 -0
  244. package/dist/components/upload.css +135 -92
  245. package/dist/fonts/LICENSES/ark-pixel/OFL.txt +96 -0
  246. package/dist/fonts/LICENSES/cubic-11/OFL.txt +108 -0
  247. package/dist/fonts/LICENSES/galmuri/LICENSE.txt +93 -0
  248. package/dist/fonts/OFL.txt +96 -0
  249. package/dist/fonts/README.md +14 -0
  250. package/dist/fonts/fusion-pixel-12px-zh-hans.woff2 +0 -0
  251. package/dist/index.d.mts +28 -14
  252. package/dist/index.mjs +20705 -9601
  253. package/dist/react.d.mts +91 -0
  254. package/dist/react.mjs +8208 -0
  255. package/dist/registry.json +130 -13
  256. package/dist/tokens/chinese.css +44 -0
  257. package/dist/tokens/colors.css +365 -1222
  258. package/dist/tokens/design.css +109 -0
  259. package/dist/tokens/dtcg.json +11198 -0
  260. package/dist/tokens/figma.variables.json +7017 -0
  261. package/dist/tokens/icon-masks.css +78 -0
  262. package/dist/tokens/pixel.css +50 -0
  263. package/dist/tokens/soviet.css +44 -0
  264. package/dist/tokens/style-profiles.css +36 -547
  265. package/dist/tokens/themes.json +308 -0
  266. package/dist/tokens/tokens-studio.json +6728 -0
  267. package/dist/tokens/typography.css +21 -18
  268. package/dist/tokens.css +1555 -1801
  269. package/dist/ui.css +11975 -9831
  270. package/dist/vue.d.mts +344 -0
  271. package/dist/vue.mjs +7781 -0
  272. package/docs/spec/ai-input-experience.md +75 -0
  273. package/docs/spec/ai-native.md +238 -147
  274. package/docs/spec/design-philosophy.md +189 -0
  275. package/docs/spec/design-primitives.md +196 -0
  276. package/docs/spec/kb-family.md +147 -115
  277. package/package.json +43 -8
  278. package/dist/retro-effects.css +0 -255
  279. package/dist/tokens/retro-effects.css +0 -255
  280. package/docs/research/2026-10-03-ai-kb-components.md +0 -392
  281. package/docs/research/2026-10-03-kb-permissions.md +0 -992
@@ -1,30 +1,31 @@
1
+ @layer icen.components {
1
2
  /*
2
3
  * @icen.ai/ui — kb-data.css(问数域:kb-sql / kb-answer / kb-clarify / kb-explain)
3
- * 共享原语在 kb.css(.kb-row/.kb-num/.kb-chip/.kb-badge/.kb-fold-head/.kb-notice…),
4
+ * 共享原语在 kb.css(.icen-kb-row/.icen-kb-num/.icen-kb-chip/.icen-kb-badge/.icen-kb-fold-head/.icen-kb-notice…),
4
5
  * 本文件只做本域专属结构。DOM 契约见 docs/spec/kb-family.md §5.15–5.18 与各 behavior 头注释。
5
6
  *
6
7
  * 域内色彩纪律(spec §2 数字域):
7
- * - 数字本身永远中性色(.kb-num / 结果表右对齐列),success 只表达「可信资产」(认证徽章);
8
+ * - 数字本身永远中性色(.icen-kb-num / 结果表右对齐列),success 只表达「可信资产」(认证徽章);
8
9
  * - SQL 着色是语法层级信号不是装饰:全部 color-mix 半透明降饱和(kw=accent /
9
10
  * str=success / num=warning / fn=info / cmt=faint);
10
11
  * - 修正卡 = warning 边框(告警语义);权限提示不可关闭(诚实呈现,无 dismiss 样式钩子)。
11
- * 只消费 --token-* / --radius-* / --density-* / --font-mono;明暗自适应走 token 与 .dark 档。
12
+ * 只消费 --icen-token-* / --icen-radius-* / --icen-density-* / --icen-font-mono;明暗自适应走 token 与 [data-icen-theme="dark"] 档。
12
13
  */
13
14
 
14
15
  /* ═══════════════════ kb-sql · 生成 SQL 卡片 ═══════════════════ */
15
16
 
16
- .kb-sql {
17
+ .icen-kb-sql {
17
18
  display: flex;
18
19
  flex-direction: column;
19
20
  gap: 8px;
20
21
  min-width: 0;
21
22
  padding: 10px 12px;
22
- border: 1px solid var(--token-line-soft);
23
- border-radius: var(--radius-md, 10px);
24
- background: var(--token-surface);
23
+ border: 1px solid var(--icen-token-line-soft);
24
+ border-radius: var(--icen-radius-md);
25
+ background: var(--icen-token-surface);
25
26
  }
26
27
 
27
- .kb-sql-head {
28
+ .icen-kb-sql-head {
28
29
  display: flex;
29
30
  align-items: center;
30
31
  gap: 8px;
@@ -32,14 +33,14 @@
32
33
  min-height: 24px;
33
34
  }
34
35
 
35
- .kb-sql-title {
36
+ .icen-kb-sql-title {
36
37
  font-size: 13px;
37
38
  font-weight: 600;
38
- color: var(--token-text);
39
+ color: var(--icen-token-text);
39
40
  white-space: nowrap;
40
41
  }
41
42
 
42
- .kb-sql-tables {
43
+ .icen-kb-sql-tables {
43
44
  display: inline-flex;
44
45
  align-items: center;
45
46
  gap: 4px;
@@ -47,16 +48,16 @@
47
48
  min-width: 0;
48
49
  }
49
50
 
50
- .kb-sql-actions {
51
+ .icen-kb-sql-actions {
51
52
  display: inline-flex;
52
53
  align-items: center;
53
54
  gap: 6px;
54
- margin-left: auto;
55
+ margin-inline-start: auto;
55
56
  flex: 0 0 auto;
56
57
  }
57
58
 
58
59
  /* ghost 图标钮(复制/编辑/应用/确认共用底座) */
59
- .kb-sql-btn {
60
+ .icen-kb-sql-btn {
60
61
  display: inline-flex;
61
62
  align-items: center;
62
63
  gap: 4px;
@@ -64,310 +65,311 @@
64
65
  padding: 2px 8px;
65
66
  font: inherit;
66
67
  font-size: 11.5px;
67
- color: var(--token-text-muted);
68
+ color: var(--icen-token-text-muted);
68
69
  background: transparent;
69
- border: 1px solid var(--token-line-soft);
70
- border-radius: var(--radius-sm, 6px);
70
+ border: 1px solid var(--icen-token-line-soft);
71
+ border-radius: var(--icen-radius-sm);
71
72
  cursor: pointer;
72
73
  white-space: nowrap;
73
74
  }
74
- .kb-sql-btn:hover:not(:disabled) {
75
- color: var(--token-text);
76
- border-color: var(--token-line);
77
- background: var(--token-bg-soft);
75
+ .icen-kb-sql-btn:hover:not(:disabled) {
76
+ color: var(--icen-token-text);
77
+ border-color: var(--icen-token-line);
78
+ background: var(--icen-token-bg-soft);
78
79
  }
79
- .kb-sql-btn:focus-visible {
80
- outline: 2px solid var(--token-accent);
80
+ .icen-kb-sql-btn:focus-visible {
81
+ outline: 2px solid var(--icen-token-accent);
81
82
  outline-offset: 1px;
82
83
  }
83
- .kb-sql-btn:disabled {
84
+ .icen-kb-sql-btn:disabled {
84
85
  opacity: 0.55;
85
86
  cursor: default;
86
87
  }
87
- .kb-sql-btn-icon,
88
- .kb-sql-btn-icon svg {
88
+ .icen-kb-sql-btn-icon,
89
+ .icen-kb-sql-btn-icon svg {
89
90
  width: 12px;
90
91
  height: 12px;
91
92
  flex: 0 0 auto;
92
93
  }
93
- .kb-sql-btn--run {
94
- color: var(--token-accent);
95
- border-color: color-mix(in srgb, var(--token-accent) 45%, transparent);
94
+ .icen-kb-sql-btn--run {
95
+ color: var(--icen-token-accent);
96
+ border-color: color-mix(in srgb, var(--icen-token-accent) 45%, transparent);
96
97
  }
97
- .kb-sql-btn--run:hover:not(:disabled) {
98
- color: var(--token-accent);
99
- border-color: var(--token-accent);
100
- background: var(--token-accent-subtle, transparent);
98
+ .icen-kb-sql-btn--run:hover:not(:disabled) {
99
+ color: var(--icen-token-accent);
100
+ border-color: var(--icen-token-accent);
101
+ background: var(--icen-token-accent-subtle);
101
102
  }
102
103
  /* 修正卡内的主行动(一屏一个 accent 级操作:此处告警色承载) */
103
- .kb-sql-btn--apply {
104
- color: var(--token-warning);
105
- border-color: color-mix(in srgb, var(--token-warning) 45%, transparent);
106
- background: var(--token-warning-muted, transparent);
104
+ .icen-kb-sql-btn--apply {
105
+ color: var(--icen-token-warning);
106
+ border-color: color-mix(in srgb, var(--icen-token-warning) 45%, transparent);
107
+ background: var(--icen-token-warning-muted);
107
108
  }
108
- .kb-sql-btn--apply:hover:not(:disabled) {
109
- color: var(--token-warning);
110
- border-color: var(--token-warning);
109
+ .icen-kb-sql-btn--apply:hover:not(:disabled) {
110
+ color: var(--icen-token-warning);
111
+ border-color: var(--icen-token-warning);
111
112
  }
112
113
 
113
- /* SQL 码块:浅色 bg-soft / 深色更深一档(.dark 类,与 tokens 同机制) */
114
- .kb-sql-code {
114
+ /* SQL 码块:浅色 bg-soft / 深色更深一档([data-icen-theme="dark"] 类,与 tokens 同机制) */
115
+ .icen-kb-sql-code {
115
116
  margin: 0;
116
117
  padding: 10px 12px;
117
- background: var(--token-bg-soft);
118
- border: 1px solid var(--token-line-soft);
119
- border-radius: var(--radius-sm, 6px);
120
- font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
118
+ background: var(--icen-token-bg-soft);
119
+ border: 1px solid var(--icen-token-line-soft);
120
+ border-radius: var(--icen-radius-sm);
121
+ font-family: var(--icen-font-mono);
121
122
  font-size: 12px;
122
123
  line-height: 1.65;
123
- color: var(--token-text);
124
+ color: var(--icen-token-text);
124
125
  white-space: pre;
125
126
  overflow: auto;
126
127
  max-height: 320px;
127
128
  tab-size: 2;
128
129
  }
129
- .dark .kb-sql-code {
130
- background: color-mix(in srgb, var(--token-bg) 85%, black);
131
- border-color: color-mix(in srgb, var(--token-line-soft) 70%, transparent);
130
+ [data-icen-theme="dark"] .icen-kb-sql-code {
131
+ background: color-mix(in srgb, var(--icen-token-bg) 85%, black);
132
+ border-color: color-mix(in srgb, var(--icen-token-line-soft) 70%, transparent);
132
133
  }
133
134
 
134
135
  /* 语法 token:color-mix 半透明降饱和(语法层级,非装饰) */
135
- .kb-sql-tok--kw { color: color-mix(in srgb, var(--token-accent) 85%, transparent); }
136
- .kb-sql-tok--str { color: color-mix(in srgb, var(--token-success) 82%, transparent); }
137
- .kb-sql-tok--num { color: color-mix(in srgb, var(--token-warning) 85%, transparent); }
138
- .kb-sql-tok--fn { color: color-mix(in srgb, var(--token-info) 88%, transparent); }
139
- .kb-sql-tok--cmt { color: color-mix(in srgb, var(--token-text-faint) 72%, transparent); font-style: italic; }
136
+ .icen-kb-sql-tok--kw { color: var(--icen-token-accent-text); }
137
+ .icen-kb-sql-tok--str { color: color-mix(in srgb, var(--icen-token-success) 82%, transparent); }
138
+ .icen-kb-sql-tok--num { color: color-mix(in srgb, var(--icen-token-warning) 50%, var(--icen-token-text)); }
139
+ .icen-kb-sql-tok--fn { color: var(--icen-token-info); }
140
+ .icen-kb-sql-tok--cmt { color: var(--icen-token-text-muted); font-style: italic; }
140
141
 
141
142
  /* 修正卡(warning 边框:「修复已就绪」心智) */
142
- .kb-sql-fix {
143
+ .icen-kb-sql-fix {
143
144
  display: flex;
144
145
  flex-direction: column;
145
146
  gap: 8px;
146
147
  padding: 8px 10px;
147
- border: 1px solid color-mix(in srgb, var(--token-warning) 45%, transparent);
148
- border-radius: var(--radius-sm, 6px);
149
- background: color-mix(in srgb, var(--token-warning) 5%, transparent);
148
+ border: 1px solid color-mix(in srgb, var(--icen-token-warning) 45%, transparent);
149
+ border-radius: var(--icen-radius-sm);
150
+ background: color-mix(in srgb, var(--icen-token-warning) 5%, transparent);
150
151
  }
151
- .kb-sql-fix-head {
152
+ .icen-kb-sql-fix-head {
152
153
  display: flex;
153
154
  align-items: center;
154
155
  gap: 8px;
155
156
  flex-wrap: wrap;
156
157
  }
157
- .kb-sql-fix-title {
158
+ .icen-kb-sql-fix-title {
158
159
  display: inline-flex;
159
160
  align-items: center;
160
161
  gap: 6px;
161
162
  font-size: 12px;
162
- color: var(--token-warning);
163
+ color: var(--icen-token-warning);
163
164
  }
164
- .kb-sql-fix-title svg {
165
+ .icen-kb-sql-fix-title svg {
165
166
  width: 13px;
166
167
  height: 13px;
167
168
  flex: 0 0 auto;
168
169
  }
169
- .kb-sql-fix-title + .kb-sql-btn,
170
- .kb-sql-fix-head .kb-sql-btn {
171
- margin-left: auto;
170
+ .icen-kb-sql-fix-title + .icen-kb-sql-btn,
171
+ .icen-kb-sql-fix-head .icen-kb-sql-btn {
172
+ margin-inline-start: auto;
172
173
  }
173
- .kb-sql-fix-diff {
174
- min-width: 0;
175
- border-radius: var(--radius-sm, 6px);
174
+ .icen-kb-sql-fix-diff {
175
+ min-inline-size: 0;
176
+ border-radius: var(--icen-radius-sm);
176
177
  overflow: hidden;
177
178
  }
178
- .kb-sql-fix-diff .ai-diff-file {
179
- border: 1px solid var(--token-line-soft);
179
+ .icen-kb-sql-fix-diff .icen-ai-diff-file {
180
+ border: 1px solid var(--icen-token-line-soft);
180
181
  }
181
182
 
182
183
  /* 编辑态:pre ↔ textarea 同尺寸心智(mono) */
183
- .kb-sql-editor {
184
+ .icen-kb-sql-editor {
184
185
  display: flex;
185
186
  flex-direction: column;
186
187
  gap: 8px;
187
188
  }
188
- .kb-sql-editor[hidden] {
189
+ .icen-kb-sql-editor[hidden] {
189
190
  display: none;
190
191
  }
191
- .kb-sql-textarea {
192
+ .icen-kb-sql-textarea {
192
193
  width: 100%;
193
194
  min-height: 132px;
194
195
  padding: 10px 12px;
195
- font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
196
+ font-family: var(--icen-font-mono);
196
197
  font-size: 12px;
197
198
  line-height: 1.65;
198
- color: var(--token-text);
199
- background: var(--token-bg-soft);
200
- border: 1px solid var(--token-line);
201
- border-radius: var(--radius-sm, 6px);
199
+ color: var(--icen-token-text);
200
+ background: var(--icen-token-bg-soft);
201
+ border: 1px solid var(--icen-token-line);
202
+ border-radius: var(--icen-radius-sm);
202
203
  resize: vertical;
203
204
  tab-size: 2;
204
205
  }
205
- .kb-sql-textarea:focus-visible {
206
- outline: 2px solid var(--token-accent);
206
+ .icen-kb-sql-textarea:focus-visible {
207
+ outline: 2px solid var(--icen-token-accent);
207
208
  outline-offset: -1px;
208
209
  }
209
- .kb-sql-editor-actions {
210
+ .icen-kb-sql-editor-actions {
210
211
  display: flex;
211
212
  justify-content: flex-end;
212
213
  gap: 8px;
213
214
  }
214
- .kb-sql.is-editing .kb-sql-fix {
215
+ .icen-kb-sql.is-editing .icen-kb-sql-fix {
215
216
  display: none; /* 编辑当前 SQL 时隐藏旧版修复对比,避免双修离心 */
216
217
  }
217
218
 
218
219
  /* ═══════════════════ kb-clarify · 澄清反问卡 ═══════════════════ */
219
220
 
220
- .kb-clarify {
221
+ .icen-kb-clarify {
221
222
  display: flex;
222
223
  flex-direction: column;
223
224
  gap: 8px;
224
225
  padding: 10px 12px;
225
- border: 1px dashed var(--token-line-dashed, var(--token-line-soft));
226
- border-radius: var(--radius-sm, 6px);
227
- background: var(--token-bg-soft);
226
+ border: 1px dashed var(--icen-token-line-dashed);
227
+ border-radius: var(--icen-radius-sm);
228
+ background: var(--icen-token-bg-soft);
228
229
  }
229
- .kb-clarify.is-answered {
230
+ .icen-kb-clarify.is-answered {
230
231
  border-style: solid;
231
- border-color: color-mix(in srgb, var(--token-accent) 30%, transparent);
232
+ border-color: color-mix(in srgb, var(--icen-token-accent) 30%, transparent);
232
233
  }
233
- .kb-clarify-q {
234
+ .icen-kb-clarify-q {
234
235
  display: flex;
235
236
  align-items: flex-start;
236
237
  gap: 6px;
237
238
  font-size: 13px;
238
- color: var(--token-text);
239
+ color: var(--icen-token-text);
239
240
  line-height: 1.6;
240
241
  }
241
- .kb-clarify-qicon,
242
- .kb-clarify-qicon svg {
242
+ .icen-kb-clarify-qicon,
243
+ .icen-kb-clarify-qicon svg {
243
244
  width: 14px;
244
245
  height: 14px;
245
246
  flex: 0 0 auto;
246
247
  margin-top: 2px;
247
- color: var(--token-accent);
248
+ color: var(--icen-token-accent);
248
249
  }
249
- .kb-clarify-qtext {
250
+ .icen-kb-clarify-qtext {
250
251
  min-width: 0;
251
252
  }
252
- .kb-clarify-opts {
253
+ .icen-kb-clarify-opts {
253
254
  display: flex;
254
255
  flex-wrap: wrap;
255
256
  gap: 6px;
256
257
  }
257
- .kb-clarify-opt {
258
+ .icen-kb-clarify-opt {
258
259
  font: inherit;
259
260
  font-size: 12px;
260
261
  min-height: 24px;
261
262
  padding: 3px 12px;
262
- color: var(--token-text-muted);
263
- background: var(--token-surface);
264
- border: 1px solid var(--token-line-soft);
265
- border-radius: 999px;
263
+ color: var(--icen-token-text-muted);
264
+ background: var(--icen-token-surface);
265
+ border: 1px solid var(--icen-token-line-soft);
266
+ border-radius: var(--icen-radius-full);
266
267
  cursor: pointer;
267
268
  transition: color 0.16s ease-out, border-color 0.16s ease-out, background 0.16s ease-out;
268
269
  }
269
- .kb-clarify-opt:hover:not(:disabled) {
270
- color: var(--token-text);
271
- border-color: color-mix(in srgb, var(--token-accent) 45%, transparent);
270
+ .icen-kb-clarify-opt:hover:not(:disabled) {
271
+ color: var(--icen-token-text);
272
+ border-color: color-mix(in srgb, var(--icen-token-accent) 45%, transparent);
272
273
  }
273
- .kb-clarify-opt:focus-visible {
274
- outline: 2px solid var(--token-accent);
274
+ .icen-kb-clarify-opt:focus-visible {
275
+ outline: 2px solid var(--icen-token-accent);
275
276
  outline-offset: 1px;
276
277
  }
277
- .kb-clarify-opt.is-picked {
278
- color: var(--token-accent);
279
- border-color: color-mix(in srgb, var(--token-accent) 55%, transparent);
280
- background: var(--token-accent-subtle, transparent);
278
+ .icen-kb-clarify-opt.is-picked {
279
+ color: var(--icen-token-accent);
280
+ border-color: color-mix(in srgb, var(--icen-token-accent) 55%, transparent);
281
+ background: var(--icen-token-accent-subtle);
281
282
  }
282
- .kb-clarify-opt:disabled {
283
+ .icen-kb-clarify-opt:disabled {
283
284
  opacity: 0.55;
284
285
  cursor: default;
285
286
  }
286
- .kb-clarify-resolved {
287
+ .icen-kb-clarify-resolved {
287
288
  font-size: 12px;
288
- color: var(--token-text-muted);
289
+ color: var(--icen-token-text-muted);
289
290
  }
290
- .kb-clarify-picked {
291
+ .icen-kb-clarify-picked {
291
292
  font-weight: 600;
292
- color: var(--token-text);
293
+ color: var(--icen-token-text);
293
294
  }
294
- .kb-clarify-reason {
295
+ .icen-kb-clarify-reason {
295
296
  font-size: 11.5px;
296
- color: var(--token-text-faint);
297
+ color: var(--icen-token-text-faint);
297
298
  }
298
299
 
299
300
  /* ═══════════════════ kb-explain · 口径解释折叠 ═══════════════════ */
300
301
 
301
- .kb-explain {
302
+ .icen-kb-explain {
302
303
  min-width: 0;
303
- border: 1px solid var(--token-line-soft);
304
- border-radius: var(--radius-sm, 6px);
305
- background: var(--token-bg-soft);
304
+ border: 1px solid var(--icen-token-line-soft);
305
+ border-radius: var(--icen-radius-sm);
306
+ background: var(--icen-token-bg-soft);
306
307
  overflow: hidden;
307
308
  }
308
- .kb-explain-head {
309
+ .icen-kb-explain-head {
309
310
  border-radius: 0;
310
311
  }
311
- .kb-explain-head:hover {
312
- border-radius: var(--radius-sm, 6px);
312
+ .icen-kb-explain-head:hover {
313
+ border-radius: var(--icen-radius-sm);
313
314
  }
314
- .kb-explain-title {
315
+ .icen-kb-explain-title {
315
316
  white-space: nowrap;
316
317
  overflow: hidden;
317
318
  text-overflow: ellipsis;
318
319
  }
319
- .kb-explain-body {
320
+ .icen-kb-explain-body {
320
321
  display: flex;
321
322
  flex-direction: column;
322
323
  gap: 8px;
323
- padding: 4px 10px 10px 28px;
324
+ padding-block: 4px 10px;
325
+ padding-inline: 10px 28px;
324
326
  }
325
- .kb-explain-group {
327
+ .icen-kb-explain-group {
326
328
  display: flex;
327
329
  align-items: baseline;
328
330
  gap: 6px;
329
331
  flex-wrap: wrap;
330
332
  }
331
- .kb-explain-group-label {
333
+ .icen-kb-explain-group-label {
332
334
  flex: 0 0 auto;
333
- min-width: 2.5em;
335
+ min-inline-size: 2.5em;
334
336
  font-size: 11px;
335
- color: var(--token-text-faint);
337
+ color: var(--icen-token-text-faint);
336
338
  }
337
- .kb-explain-metrics {
339
+ .icen-kb-explain-metrics {
338
340
  display: flex;
339
341
  flex-direction: column;
340
342
  gap: 4px;
341
343
  padding-top: 8px;
342
- border-top: 1px dashed var(--token-line-dashed, var(--token-line-soft));
344
+ border-top: 1px dashed var(--icen-token-line-dashed);
343
345
  }
344
- .kb-explain-metric {
346
+ .icen-kb-explain-metric {
345
347
  display: flex;
346
348
  align-items: center;
347
349
  gap: 10px;
348
350
  flex-wrap: wrap;
349
351
  font-size: 12.5px;
350
352
  }
351
- .kb-explain-metric-name {
352
- color: var(--token-text);
353
+ .icen-kb-explain-metric-name {
354
+ color: var(--icen-token-text);
353
355
  font-weight: 500;
354
356
  }
355
- .kb-explain-metric-ref {
357
+ .icen-kb-explain-metric-ref {
356
358
  font-size: 11.5px;
357
- color: var(--token-accent);
359
+ color: var(--icen-token-accent);
358
360
  text-decoration: none;
359
- border-bottom: 1px solid color-mix(in srgb, var(--token-accent) 35%, transparent);
361
+ border-bottom: 1px solid color-mix(in srgb, var(--icen-token-accent) 35%, transparent);
360
362
  }
361
- .kb-explain-metric-ref:hover {
362
- border-bottom-color: var(--token-accent);
363
+ .icen-kb-explain-metric-ref:hover {
364
+ border-bottom-color: var(--icen-token-accent);
363
365
  }
364
- .kb-explain-count {
366
+ .icen-kb-explain-count {
365
367
  flex: 0 0 auto;
366
368
  }
367
369
 
368
370
  /* ═══════════════════ kb-answer · 答案组合容器 ═══════════════════ */
369
371
 
370
- .kb-answer {
372
+ .icen-kb-answer {
371
373
  display: flex;
372
374
  flex-direction: column;
373
375
  gap: 12px;
@@ -376,13 +378,13 @@
376
378
  }
377
379
 
378
380
  /* 徽章区 */
379
- .kb-answer-badges {
381
+ .icen-kb-answer-badges {
380
382
  display: flex;
381
383
  align-items: center;
382
384
  gap: 8px;
383
385
  flex-wrap: wrap;
384
386
  }
385
- .kb-verified {
387
+ .icen-kb-verified {
386
388
  display: inline-flex;
387
389
  align-items: center;
388
390
  gap: 8px;
@@ -392,258 +394,260 @@
392
394
  background: none;
393
395
  border: none;
394
396
  cursor: pointer;
395
- text-align: left;
397
+ text-align: start;
396
398
  }
397
- .kb-verified:focus-visible {
398
- outline: 2px solid var(--token-accent);
399
+ .icen-kb-verified:focus-visible {
400
+ outline: 2px solid var(--icen-token-accent);
399
401
  outline-offset: 3px;
400
- border-radius: var(--radius-sm, 6px);
402
+ border-radius: var(--icen-radius-sm);
401
403
  }
402
- .kb-verified-via {
404
+ .icen-kb-verified-via {
403
405
  font-size: 11.5px;
404
- color: var(--token-text-muted);
406
+ color: var(--icen-token-text-muted);
405
407
  }
406
- .kb-verified-note {
408
+ .icen-kb-verified-note {
407
409
  font-size: 11.5px;
408
- color: var(--token-text-faint);
410
+ color: var(--icen-token-text-faint);
409
411
  }
410
- .kb-verified-hint {
412
+ .icen-kb-verified-hint {
411
413
  font-size: 11px;
412
- color: var(--token-text-faint);
413
- border-left: 2px solid var(--token-line-soft);
414
- padding-left: 8px;
414
+ color: var(--icen-token-text-faint);
415
+ border-inline-start: 2px solid var(--icen-token-line-soft);
416
+ padding-inline-start: 8px;
415
417
  }
416
- .kb-verified:hover .kb-verified-via {
417
- color: var(--token-text);
418
+ .icen-kb-verified:hover .icen-kb-verified-via {
419
+ color: var(--icen-token-text);
418
420
  }
419
421
 
420
422
  /* 权限提示(行级过滤 + 脱敏列;不可关闭) */
421
- .kb-perm {
423
+ .icen-kb-perm {
422
424
  display: flex;
423
425
  align-items: center;
424
426
  gap: 8px;
425
427
  flex-wrap: wrap;
426
428
  width: 100%;
427
429
  padding: 4px 8px;
428
- border-radius: var(--radius-sm, 6px);
429
- background: var(--token-bg-soft);
430
+ border-radius: var(--icen-radius-sm);
431
+ background: var(--icen-token-bg-soft);
430
432
  font-size: 11.5px;
431
- color: var(--token-text-muted);
433
+ color: var(--icen-token-text-muted);
432
434
  }
433
- .kb-perm-icon,
434
- .kb-perm-icon svg {
435
+ .icen-kb-perm-icon,
436
+ .icen-kb-perm-icon svg {
435
437
  width: 12px;
436
438
  height: 12px;
437
439
  flex: 0 0 auto;
438
- color: var(--token-text-faint);
440
+ color: var(--icen-token-text-faint);
439
441
  }
440
- .kb-perm-mask {
442
+ .icen-kb-perm-mask {
441
443
  display: inline-flex;
442
444
  align-items: center;
443
445
  gap: 4px;
444
446
  flex-wrap: wrap;
445
447
  }
446
- .kb-perm-mask-label {
447
- color: var(--token-text-faint);
448
+ .icen-kb-perm-mask-label {
449
+ color: var(--icen-token-text-faint);
448
450
  }
449
- .kb-perm-mask .kb-chip {
450
- border-color: color-mix(in srgb, var(--token-warning) 35%, transparent);
451
+ .icen-kb-perm-mask .icen-kb-chip {
452
+ border-color: color-mix(in srgb, var(--icen-token-warning) 35%, transparent);
451
453
  }
452
454
 
453
- /* 正文与简化引用角标(与 kb-ground 域 .kb-citation 类名一致;默认弱化,hover 点亮) */
454
- .kb-answer-body {
455
+ /* 正文与简化引用角标(与 kb-ground 域 .icen-kb-citation 类名一致;默认弱化,hover 点亮) */
456
+ .icen-kb-answer-body {
455
457
  font-size: 13px;
456
458
  line-height: 1.75;
457
- color: var(--token-text);
459
+ color: var(--icen-token-text);
458
460
  white-space: pre-wrap;
459
461
  overflow-wrap: anywhere;
460
462
  }
461
- .kb-answer-body .kb-citation {
463
+ .icen-kb-answer-body .icen-kb-citation {
462
464
  font-size: 10.5px;
463
465
  line-height: 1;
464
466
  margin: 0 1px;
465
467
  padding: 1px 5px;
466
- color: var(--token-text-faint);
467
- background: var(--token-bg-soft);
468
- border: 1px solid var(--token-line-soft);
469
- border-radius: 999px;
468
+ color: var(--icen-token-text-faint);
469
+ background: var(--icen-token-bg-soft);
470
+ border: 1px solid var(--icen-token-line-soft);
471
+ border-radius: var(--icen-radius-full);
470
472
  cursor: default;
471
473
  transition: color 0.16s ease-out, border-color 0.16s ease-out;
472
474
  }
473
- .kb-answer-body .kb-citation:hover {
474
- color: var(--token-accent);
475
- border-color: color-mix(in srgb, var(--token-accent) 45%, transparent);
475
+ .icen-kb-answer-body .icen-kb-citation:hover {
476
+ color: var(--icen-token-accent);
477
+ border-color: color-mix(in srgb, var(--icen-token-accent) 45%, transparent);
476
478
  }
477
479
 
478
480
  /* 槽位 */
479
- .kb-answer-clarify,
480
- .kb-answer-explain {
481
+ .icen-kb-answer-clarify,
482
+ .icen-kb-answer-explain {
481
483
  min-width: 0;
482
484
  }
483
485
 
484
486
  /* 结果表:滚动容器 + sticky 表头 + 数字列右对齐(数字永远中性色) */
485
- .kb-answer-results {
487
+ .icen-kb-answer-results {
486
488
  display: flex;
487
489
  flex-direction: column;
488
490
  gap: 6px;
489
491
  min-width: 0;
490
492
  }
491
- .kb-result-meta {
493
+ .icen-kb-result-meta {
492
494
  display: flex;
493
495
  align-items: center;
494
496
  gap: 10px;
495
497
  flex-wrap: wrap;
496
498
  }
497
- .kb-result-export {
499
+ .icen-kb-result-export {
498
500
  display: inline-flex;
499
501
  gap: 6px;
500
- margin-left: auto;
502
+ margin-inline-start: auto;
501
503
  }
502
- .kb-result-export-btn {
504
+ .icen-kb-result-export-btn {
503
505
  font: inherit;
504
506
  font-size: 11.5px;
505
507
  min-height: 22px;
506
508
  padding: 2px 8px;
507
- color: var(--token-text-muted);
509
+ color: var(--icen-token-text-muted);
508
510
  background: transparent;
509
- border: 1px solid var(--token-line-soft);
510
- border-radius: var(--radius-sm, 6px);
511
+ border: 1px solid var(--icen-token-line-soft);
512
+ border-radius: var(--icen-radius-sm);
511
513
  cursor: pointer;
512
514
  }
513
- .kb-result-export-btn:hover:not(:disabled) {
514
- color: var(--token-text);
515
- border-color: var(--token-line);
516
- background: var(--token-bg-soft);
515
+ .icen-kb-result-export-btn:hover:not(:disabled) {
516
+ color: var(--icen-token-text);
517
+ border-color: var(--icen-token-line);
518
+ background: var(--icen-token-bg-soft);
517
519
  }
518
- .kb-result-export-btn:focus-visible {
519
- outline: 2px solid var(--token-accent);
520
+ .icen-kb-result-export-btn:focus-visible {
521
+ outline: 2px solid var(--icen-token-accent);
520
522
  outline-offset: 1px;
521
523
  }
522
- .kb-result-export-btn:disabled {
524
+ .icen-kb-result-export-btn:disabled {
523
525
  opacity: 0.55;
524
526
  cursor: default;
525
527
  }
526
- .kb-result-scroll {
528
+ .icen-kb-result-scroll {
527
529
  overflow: auto;
528
530
  max-height: 360px;
529
- border: 1px solid var(--token-line-soft);
530
- border-radius: var(--radius-sm, 6px);
531
- background: var(--token-surface);
531
+ border: 1px solid var(--icen-token-line-soft);
532
+ border-radius: var(--icen-radius-sm);
533
+ background: var(--icen-token-surface);
532
534
  }
533
- .kb-result-table {
535
+ .icen-kb-result-table {
534
536
  width: 100%;
535
537
  border-collapse: separate;
536
538
  border-spacing: 0;
537
539
  font-size: 12.5px;
538
540
  }
539
- .kb-result-table th {
541
+ .icen-kb-result-table th {
540
542
  position: sticky;
541
543
  top: 0;
542
544
  z-index: 1;
543
545
  padding: 6px 10px;
544
- background: var(--token-bg-soft);
545
- border-bottom: 1px solid var(--token-line-soft);
546
+ background: var(--icen-token-bg-soft);
547
+ border-bottom: 1px solid var(--icen-token-line-soft);
546
548
  font-size: 11.5px;
547
549
  font-weight: 600;
548
- color: var(--token-text-muted);
549
- text-align: left;
550
+ color: var(--icen-token-text-muted);
551
+ text-align: start;
550
552
  white-space: nowrap;
551
553
  }
552
- .kb-result-table td {
554
+ .icen-kb-result-table td {
553
555
  padding: 5px 10px;
554
- border-bottom: 1px solid color-mix(in srgb, var(--token-line-soft) 50%, transparent);
555
- color: var(--token-text);
556
+ border-bottom: 1px solid color-mix(in srgb, var(--icen-token-line-soft) 50%, transparent);
557
+ color: var(--icen-token-text);
556
558
  white-space: nowrap;
557
559
  }
558
- .kb-result-table tbody tr:last-child td {
560
+ .icen-kb-result-table tbody tr:last-child td {
559
561
  border-bottom: none;
560
562
  }
561
- .kb-result-table tbody tr:hover td {
562
- background: var(--token-bg-soft);
563
+ .icen-kb-result-table tbody tr:hover td {
564
+ background: var(--icen-token-bg-soft);
563
565
  }
564
- /* 数字列:等宽 + tabular-nums + 右对齐(值本身中性色) */
565
- .kb-result-table th.kb-num,
566
- .kb-result-table td.kb-num {
567
- font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
566
+ /* 数字列:等宽 + tabular-nums + 右对齐(数字是 LTR 文种,物理右对齐惯例,RTL 不镜像) */
567
+ .icen-kb-result-table th.icen-kb-num,
568
+ .icen-kb-result-table td.icen-kb-num {
569
+ font-family: var(--icen-font-mono);
568
570
  font-variant-numeric: tabular-nums;
569
- text-align: right;
571
+ text-align: right; /* guard:allow-physical 数字列物理右对齐惯例,RTL 不镜像 */
570
572
  }
571
- .kb-result-null {
572
- color: var(--token-text-faint);
573
+ .icen-kb-result-null {
574
+ color: var(--icen-token-text-faint);
573
575
  }
574
- .kb-result-truncated {
576
+ .icen-kb-result-truncated {
575
577
  padding: 2px 8px;
576
578
  }
577
579
 
578
580
  /* 图表区(renderChart 复用;类型切换 chips) */
579
- .kb-answer-chart {
581
+ .icen-kb-answer-chart {
580
582
  display: flex;
581
583
  flex-direction: column;
582
584
  gap: 8px;
583
585
  min-width: 0;
584
586
  }
585
- .kb-chart-switch {
587
+ .icen-kb-chart-switch {
586
588
  display: flex;
587
589
  align-items: center;
588
590
  gap: 6px;
589
591
  }
590
- .kb-chart-chip {
592
+ .icen-kb-chart-chip {
591
593
  font: inherit;
592
594
  font-size: 11.5px;
593
595
  min-height: 22px;
594
596
  padding: 2px 10px;
595
- color: var(--token-text-muted);
597
+ color: var(--icen-token-text-muted);
596
598
  background: transparent;
597
- border: 1px solid var(--token-line-soft);
598
- border-radius: 999px;
599
+ border: 1px solid var(--icen-token-line-soft);
600
+ border-radius: var(--icen-radius-full);
599
601
  cursor: pointer;
600
602
  transition: color 0.16s ease-out, border-color 0.16s ease-out, background 0.16s ease-out;
601
603
  }
602
- .kb-chart-chip:hover {
603
- color: var(--token-text);
604
- border-color: var(--token-line);
604
+ .icen-kb-chart-chip:hover {
605
+ color: var(--icen-token-text);
606
+ border-color: var(--icen-token-line);
605
607
  }
606
- .kb-chart-chip:focus-visible {
607
- outline: 2px solid var(--token-accent);
608
+ .icen-kb-chart-chip:focus-visible {
609
+ outline: 2px solid var(--icen-token-accent);
608
610
  outline-offset: 1px;
609
611
  }
610
- .kb-chart-chip.is-active {
611
- color: var(--token-accent);
612
- border-color: color-mix(in srgb, var(--token-accent) 55%, transparent);
613
- background: var(--token-accent-subtle, transparent);
612
+ .icen-kb-chart-chip.is-active {
613
+ color: var(--icen-token-accent-text);
614
+ border-color: color-mix(in srgb, var(--icen-token-accent) 55%, transparent);
615
+ background: var(--icen-token-accent-subtle);
614
616
  }
615
- .kb-chart-mount {
617
+ .icen-kb-chart-mount {
616
618
  min-height: 0;
617
619
  }
618
620
 
619
621
  /* 追问建议 */
620
- .kb-answer-followups {
622
+ .icen-kb-answer-followups {
621
623
  display: flex;
622
624
  align-items: center;
623
625
  gap: 6px;
624
626
  flex-wrap: wrap;
625
627
  }
626
- .kb-followups-label {
628
+ .icen-kb-followups-label {
627
629
  font-size: 11.5px;
628
- color: var(--token-text-faint);
630
+ color: var(--icen-token-text-faint);
629
631
  }
630
- .kb-followup {
632
+ .icen-kb-followup {
631
633
  cursor: pointer;
632
634
  transition: border-color 0.16s ease-out, color 0.16s ease-out;
633
635
  }
634
- .kb-followup:hover {
635
- color: var(--token-text);
636
- border-color: color-mix(in srgb, var(--token-accent) 45%, transparent);
636
+ .icen-kb-followup:hover {
637
+ color: var(--icen-token-text);
638
+ border-color: color-mix(in srgb, var(--icen-token-accent) 45%, transparent);
637
639
  }
638
- .kb-followup:focus-visible {
639
- outline: 2px solid var(--token-accent);
640
+ .icen-kb-followup:focus-visible {
641
+ outline: 2px solid var(--icen-token-accent);
640
642
  outline-offset: 1px;
641
643
  }
642
644
 
643
645
  /* ═══════════════════ 密度档 ═══════════════════ */
644
646
 
645
- [data-density='compact'] .kb-sql { padding: 8px 10px; gap: 6px; }
646
- [data-density='compact'] .kb-result-table th { padding: 4px 8px; }
647
- [data-density='compact'] .kb-result-table td { padding: 3px 8px; }
648
- [data-density='compact'] .kb-answer { gap: 8px; }
649
- [data-density='compact'] .kb-clarify { padding: 8px 10px; }
647
+ [data-icen-density='compact'] .icen-kb-sql { padding: 8px 10px; gap: 6px; }
648
+ [data-icen-density='compact'] .icen-kb-result-table th { padding: 4px 8px; }
649
+ [data-icen-density='compact'] .icen-kb-result-table td { padding: 3px 8px; }
650
+ [data-icen-density='compact'] .icen-kb-answer { gap: 8px; }
651
+ [data-icen-density='compact'] .icen-kb-clarify { padding: 8px 10px; }
652
+
653
+ }