@icen.ai/ui 0.8.1 → 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 (335) hide show
  1. package/AGENTS.md +176 -75
  2. package/README.md +66 -88
  3. package/dist/base.css +208 -179
  4. package/dist/behaviors/accordion.mjs +8 -8
  5. package/dist/behaviors/ai-branch.d.mts +19 -0
  6. package/dist/behaviors/ai-branch.mjs +1133 -0
  7. package/dist/behaviors/ai-chat.d.mts +12 -10
  8. package/dist/behaviors/ai-chat.mjs +1125 -155
  9. package/dist/behaviors/ai-composer.d.mts +44 -12
  10. package/dist/behaviors/ai-composer.mjs +2084 -523
  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 +26 -0
  15. package/dist/behaviors/ai-feedback.mjs +1212 -0
  16. package/dist/behaviors/ai-panel.d.mts +21 -7
  17. package/dist/behaviors/ai-panel.mjs +1308 -264
  18. package/dist/behaviors/ai-provider.mjs +1003 -101
  19. package/dist/behaviors/ai-threads.d.mts +38 -0
  20. package/dist/behaviors/ai-threads.mjs +1233 -0
  21. package/dist/behaviors/ai-tool.d.mts +2 -2
  22. package/dist/behaviors/ai-tool.mjs +2042 -396
  23. package/dist/behaviors/ai-tools.d.mts +89 -16
  24. package/dist/behaviors/ai-tools.mjs +4453 -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 +174 -8
  34. package/dist/behaviors/charts.mjs +2632 -192
  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 +313 -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 +34 -0
  68. package/dist/behaviors/kb-access.mjs +2459 -0
  69. package/dist/behaviors/kb-acl.d.mts +50 -0
  70. package/dist/behaviors/kb-acl.mjs +1345 -0
  71. package/dist/behaviors/kb-answer.d.mts +38 -0
  72. package/dist/behaviors/kb-answer.mjs +3707 -0
  73. package/dist/behaviors/kb-audit.d.mts +23 -0
  74. package/dist/behaviors/kb-audit.mjs +1297 -0
  75. package/dist/behaviors/kb-canvas.d.mts +44 -0
  76. package/dist/behaviors/kb-canvas.mjs +1512 -0
  77. package/dist/behaviors/kb-chain.d.mts +15 -0
  78. package/dist/behaviors/kb-chain.mjs +1192 -0
  79. package/dist/behaviors/kb-checkpoint.d.mts +16 -0
  80. package/dist/behaviors/kb-checkpoint.mjs +1492 -0
  81. package/dist/behaviors/kb-chunks.d.mts +31 -0
  82. package/dist/behaviors/kb-chunks.mjs +1414 -0
  83. package/dist/behaviors/kb-citation.d.mts +38 -0
  84. package/dist/behaviors/kb-citation.mjs +1699 -0
  85. package/dist/behaviors/kb-clarify.d.mts +20 -0
  86. package/dist/behaviors/kb-clarify.mjs +1176 -0
  87. package/dist/behaviors/kb-conflict.d.mts +22 -0
  88. package/dist/behaviors/kb-conflict.mjs +1206 -0
  89. package/dist/behaviors/kb-connector.d.mts +17 -0
  90. package/dist/behaviors/kb-connector.mjs +1303 -0
  91. package/dist/behaviors/kb-core.d.mts +534 -0
  92. package/dist/behaviors/kb-core.mjs +1805 -0
  93. package/dist/behaviors/kb-eval.d.mts +22 -0
  94. package/dist/behaviors/kb-eval.mjs +2235 -0
  95. package/dist/behaviors/kb-explain.d.mts +11 -0
  96. package/dist/behaviors/kb-explain.mjs +1165 -0
  97. package/dist/behaviors/kb-filter.d.mts +31 -0
  98. package/dist/behaviors/kb-filter.mjs +2417 -0
  99. package/dist/behaviors/kb-gap.d.mts +27 -0
  100. package/dist/behaviors/kb-gap.mjs +1195 -0
  101. package/dist/behaviors/kb-hittest.d.mts +34 -0
  102. package/dist/behaviors/kb-hittest.mjs +1352 -0
  103. package/dist/behaviors/kb-metadata.d.mts +29 -0
  104. package/dist/behaviors/kb-metadata.mjs +1248 -0
  105. package/dist/behaviors/kb-passage.d.mts +41 -0
  106. package/dist/behaviors/kb-passage.mjs +1469 -0
  107. package/dist/behaviors/kb-pipeline.d.mts +18 -0
  108. package/dist/behaviors/kb-pipeline.mjs +1301 -0
  109. package/dist/behaviors/kb-qa.d.mts +26 -0
  110. package/dist/behaviors/kb-qa.mjs +1260 -0
  111. package/dist/behaviors/kb-rerank.d.mts +20 -0
  112. package/dist/behaviors/kb-rerank.mjs +1248 -0
  113. package/dist/behaviors/kb-retrieval.d.mts +49 -0
  114. package/dist/behaviors/kb-retrieval.mjs +2585 -0
  115. package/dist/behaviors/kb-review.d.mts +44 -0
  116. package/dist/behaviors/kb-review.mjs +2282 -0
  117. package/dist/behaviors/kb-sandbox.d.mts +33 -0
  118. package/dist/behaviors/kb-sandbox.mjs +1247 -0
  119. package/dist/behaviors/kb-segment.d.mts +32 -0
  120. package/dist/behaviors/kb-segment.mjs +1431 -0
  121. package/dist/behaviors/kb-select.d.mts +24 -0
  122. package/dist/behaviors/kb-select.mjs +1989 -0
  123. package/dist/behaviors/kb-sources.d.mts +27 -0
  124. package/dist/behaviors/kb-sources.mjs +1287 -0
  125. package/dist/behaviors/kb-sql.d.mts +43 -0
  126. package/dist/behaviors/kb-sql.mjs +1865 -0
  127. package/dist/behaviors/kb-trace.d.mts +16 -0
  128. package/dist/behaviors/kb-trace.mjs +1328 -0
  129. package/dist/behaviors/kb-visibility.d.mts +44 -0
  130. package/dist/behaviors/kb-visibility.mjs +1331 -0
  131. package/dist/behaviors/kb-who-can.d.mts +32 -0
  132. package/dist/behaviors/kb-who-can.mjs +2216 -0
  133. package/dist/behaviors/mentions.d.mts +93 -0
  134. package/dist/behaviors/mentions.mjs +2152 -0
  135. package/dist/behaviors/modal.d.mts +4 -3
  136. package/dist/behaviors/modal.mjs +1055 -33
  137. package/dist/behaviors/nav.d.mts +1 -1
  138. package/dist/behaviors/nav.mjs +6 -6
  139. package/dist/behaviors/notification.d.mts +16 -8
  140. package/dist/behaviors/notification.mjs +1615 -265
  141. package/dist/behaviors/panel.d.mts +4 -0
  142. package/dist/behaviors/panel.mjs +994 -0
  143. package/dist/behaviors/popover.d.mts +28 -5
  144. package/dist/behaviors/popover.mjs +225 -24
  145. package/dist/behaviors/select.d.mts +5 -2
  146. package/dist/behaviors/select.mjs +1410 -117
  147. package/dist/behaviors/sidebar.d.mts +1 -1
  148. package/dist/behaviors/sidebar.mjs +13 -13
  149. package/dist/behaviors/slider.d.mts +1 -1
  150. package/dist/behaviors/slider.mjs +9 -9
  151. package/dist/behaviors/split-pane.d.mts +1 -1
  152. package/dist/behaviors/split-pane.mjs +7 -7
  153. package/dist/behaviors/suggestions.d.mts +27 -0
  154. package/dist/behaviors/suggestions.mjs +1089 -0
  155. package/dist/behaviors/svg-parse.d.mts +14 -0
  156. package/dist/behaviors/svg-parse.mjs +37 -0
  157. package/dist/behaviors/tabs.d.mts +2 -2
  158. package/dist/behaviors/tabs.mjs +25 -25
  159. package/dist/behaviors/tag-input.d.mts +23 -5
  160. package/dist/behaviors/tag-input.mjs +1359 -104
  161. package/dist/behaviors/theme-switcher.d.mts +24 -0
  162. package/dist/behaviors/theme-switcher.mjs +1981 -0
  163. package/dist/behaviors/theme.d.mts +15 -8
  164. package/dist/behaviors/theme.mjs +390 -28
  165. package/dist/behaviors/toast.d.mts +24 -25
  166. package/dist/behaviors/toast.mjs +1266 -88
  167. package/dist/behaviors/tooltip.d.mts +4 -0
  168. package/dist/behaviors/tooltip.mjs +378 -0
  169. package/dist/behaviors/tree-select.d.mts +69 -0
  170. package/dist/behaviors/tree-select.mjs +1907 -0
  171. package/dist/behaviors/tree.d.mts +1 -1
  172. package/dist/behaviors/tree.mjs +15 -15
  173. package/dist/behaviors/upload.d.mts +3 -2
  174. package/dist/behaviors/upload.mjs +1076 -66
  175. package/dist/cli.mjs +5 -6
  176. package/dist/components/ai-branch.mjs +3 -0
  177. package/dist/components/ai-chat.css +846 -458
  178. package/dist/components/ai-diff.css +153 -132
  179. package/dist/components/ai-feedback.mjs +3 -0
  180. package/dist/components/ai-panel.css +495 -270
  181. package/dist/components/ai-threads.mjs +3 -0
  182. package/dist/components/ai-tool.css +393 -238
  183. package/dist/components/autocomplete.css +61 -0
  184. package/dist/components/autocomplete.mjs +3 -0
  185. package/dist/components/back-top.css +34 -31
  186. package/dist/components/badge.css +44 -41
  187. package/dist/components/breadcrumb.css +67 -46
  188. package/dist/components/btn.css +80 -74
  189. package/dist/components/card.css +117 -106
  190. package/dist/components/cascader.css +311 -0
  191. package/dist/components/cascader.mjs +3 -0
  192. package/dist/components/chart-area.css +8 -2
  193. package/dist/components/chart-bar.css +95 -33
  194. package/dist/components/chart-gauge.css +14 -11
  195. package/dist/components/chart-graph.css +60 -0
  196. package/dist/components/chart-graph.mjs +4 -0
  197. package/dist/components/chart-heatmap.css +96 -90
  198. package/dist/components/chart-line.css +8 -3
  199. package/dist/components/chart-map.mjs +3 -0
  200. package/dist/components/chart-pie.css +9 -6
  201. package/dist/components/chart-radar.css +8 -5
  202. package/dist/components/chart-scatter.css +9 -6
  203. package/dist/components/chart-scatter.mjs +1 -1
  204. package/dist/components/chart-sparkline.css +5 -2
  205. package/dist/components/chart-stack.css +14 -11
  206. package/dist/components/charts.css +190 -67
  207. package/dist/components/charts.mjs +1 -0
  208. package/dist/components/code-block.css +418 -0
  209. package/dist/components/code-block.mjs +4 -0
  210. package/dist/components/command-palette.css +138 -117
  211. package/dist/components/content.css +257 -251
  212. package/dist/components/copy.css +72 -44
  213. package/dist/components/datatable.css +423 -181
  214. package/dist/components/date-picker.css +135 -104
  215. package/dist/components/empty.css +68 -65
  216. package/dist/components/feedback.css +201 -183
  217. package/dist/components/form-validate.css +120 -0
  218. package/dist/components/form-validate.mjs +3 -0
  219. package/dist/components/form.css +150 -127
  220. package/dist/components/icon.css +102 -0
  221. package/dist/components/icon.mjs +3 -0
  222. package/dist/components/input.css +159 -104
  223. package/dist/components/kb-access.mjs +4 -0
  224. package/dist/components/kb-acl.mjs +4 -0
  225. package/dist/components/kb-agent.css +496 -0
  226. package/dist/components/kb-answer.mjs +4 -0
  227. package/dist/components/kb-audit.mjs +4 -0
  228. package/dist/components/kb-canvas.mjs +4 -0
  229. package/dist/components/kb-chain.mjs +4 -0
  230. package/dist/components/kb-checkpoint.mjs +4 -0
  231. package/dist/components/kb-chunks.mjs +4 -0
  232. package/dist/components/kb-citation.mjs +4 -0
  233. package/dist/components/kb-clarify.mjs +4 -0
  234. package/dist/components/kb-conflict.mjs +4 -0
  235. package/dist/components/kb-connector.mjs +4 -0
  236. package/dist/components/kb-data.css +653 -0
  237. package/dist/components/kb-eval.mjs +4 -0
  238. package/dist/components/kb-explain.mjs +4 -0
  239. package/dist/components/kb-filter.mjs +4 -0
  240. package/dist/components/kb-gap.mjs +4 -0
  241. package/dist/components/kb-ground.css +578 -0
  242. package/dist/components/kb-hittest.mjs +4 -0
  243. package/dist/components/kb-ingest.css +882 -0
  244. package/dist/components/kb-metadata.mjs +4 -0
  245. package/dist/components/kb-ops.css +554 -0
  246. package/dist/components/kb-passage.mjs +4 -0
  247. package/dist/components/kb-perm.css +433 -0
  248. package/dist/components/kb-pipeline.mjs +4 -0
  249. package/dist/components/kb-qa.mjs +4 -0
  250. package/dist/components/kb-rerank.mjs +4 -0
  251. package/dist/components/kb-retrieval.mjs +4 -0
  252. package/dist/components/kb-review.mjs +4 -0
  253. package/dist/components/kb-sandbox.mjs +4 -0
  254. package/dist/components/kb-search.css +897 -0
  255. package/dist/components/kb-segment.mjs +4 -0
  256. package/dist/components/kb-sources.mjs +4 -0
  257. package/dist/components/kb-sql.mjs +4 -0
  258. package/dist/components/kb-trace.mjs +4 -0
  259. package/dist/components/kb-visibility.mjs +4 -0
  260. package/dist/components/kb-who-can.mjs +4 -0
  261. package/dist/components/kb.css +263 -0
  262. package/dist/components/kb.mjs +9 -0
  263. package/dist/components/layout.css +85 -82
  264. package/dist/components/material-chinese.css +73 -0
  265. package/dist/components/material-soviet.css +76 -0
  266. package/dist/components/material.css +275 -0
  267. package/dist/components/media.css +220 -166
  268. package/dist/components/mentions.css +189 -0
  269. package/dist/components/mentions.mjs +3 -0
  270. package/dist/components/menu.css +113 -105
  271. package/dist/components/modal.css +107 -112
  272. package/dist/components/nav.css +118 -115
  273. package/dist/components/notification.css +238 -174
  274. package/dist/components/pagination.css +56 -53
  275. package/dist/components/panel.css +66 -63
  276. package/dist/components/panel.mjs +1 -0
  277. package/dist/components/pill.css +81 -71
  278. package/dist/components/popover.css +67 -53
  279. package/dist/components/scroll-area.css +113 -110
  280. package/dist/components/segmented.css +146 -143
  281. package/dist/components/select.css +206 -186
  282. package/dist/components/sidebar.css +137 -127
  283. package/dist/components/slider.css +117 -114
  284. package/dist/components/split-pane.css +112 -109
  285. package/dist/components/stat.css +112 -106
  286. package/dist/components/steps.css +109 -103
  287. package/dist/components/switch.css +138 -134
  288. package/dist/components/table.css +131 -107
  289. package/dist/components/tabs.css +114 -108
  290. package/dist/components/tag-input.css +48 -133
  291. package/dist/components/tag.css +81 -71
  292. package/dist/components/theme-switcher.css +105 -0
  293. package/dist/components/theme-switcher.mjs +3 -0
  294. package/dist/components/toast.css +100 -86
  295. package/dist/components/toolbar.css +45 -42
  296. package/dist/components/tooltip.css +102 -43
  297. package/dist/components/tooltip.mjs +1 -0
  298. package/dist/components/tree-select.css +416 -0
  299. package/dist/components/tree-select.mjs +3 -0
  300. package/dist/components/upload.css +135 -92
  301. package/dist/fonts/LICENSES/ark-pixel/OFL.txt +96 -0
  302. package/dist/fonts/LICENSES/cubic-11/OFL.txt +108 -0
  303. package/dist/fonts/LICENSES/galmuri/LICENSE.txt +93 -0
  304. package/dist/fonts/OFL.txt +96 -0
  305. package/dist/fonts/README.md +14 -0
  306. package/dist/fonts/fusion-pixel-12px-zh-hans.woff2 +0 -0
  307. package/dist/index.d.mts +64 -15
  308. package/dist/index.mjs +28049 -8595
  309. package/dist/react.d.mts +91 -0
  310. package/dist/react.mjs +8208 -0
  311. package/dist/registry.json +454 -15
  312. package/dist/tokens/chinese.css +44 -0
  313. package/dist/tokens/colors.css +365 -1222
  314. package/dist/tokens/design.css +109 -0
  315. package/dist/tokens/dtcg.json +11198 -0
  316. package/dist/tokens/figma.variables.json +7017 -0
  317. package/dist/tokens/icon-masks.css +78 -0
  318. package/dist/tokens/pixel.css +50 -0
  319. package/dist/tokens/soviet.css +44 -0
  320. package/dist/tokens/style-profiles.css +36 -547
  321. package/dist/tokens/themes.json +308 -0
  322. package/dist/tokens/tokens-studio.json +6728 -0
  323. package/dist/tokens/typography.css +21 -18
  324. package/dist/tokens.css +1555 -1801
  325. package/dist/ui.css +16147 -8597
  326. package/dist/vue.d.mts +344 -0
  327. package/dist/vue.mjs +7781 -0
  328. package/docs/spec/ai-input-experience.md +75 -0
  329. package/docs/spec/ai-native.md +238 -147
  330. package/docs/spec/design-philosophy.md +189 -0
  331. package/docs/spec/design-primitives.md +196 -0
  332. package/docs/spec/kb-family.md +475 -0
  333. package/package.json +42 -7
  334. package/dist/retro-effects.css +0 -255
  335. package/dist/tokens/retro-effects.css +0 -255
@@ -0,0 +1,882 @@
1
+ @layer icen.components {
2
+ /*
3
+ * @icen.ai/ui — kb-ingest.css(摄取域:kb-pipeline / kb-chunks / kb-segment / kb-connector / kb-metadata / kb-qa)
4
+ *
5
+ * 共享原语在 kb.css(.icen-kb-row/.icen-kb-dot/.icen-kb-fold-head/.icen-kb-chip/.icen-kb-num/.icen-kb-meta/.icen-kb-badge/.icen-kb-empty/.icen-kb-notice…),
6
+ * 本文件只做本域专属结构。DOM 契约见 docs/spec/kb-family.md §5.5–5.10 与各 behavior 头注释。
7
+ *
8
+ * 域内纪律(spec §2):
9
+ * - 摄取域=中性行 + 状态色只给状态点与徽标(连线/边框一律层级色)
10
+ * - 数字 .icen-kb-num;元信息 .icen-kb-meta;材料 bg → bg-soft 两档;圆角 --icen-radius-md(容器)/ --icen-radius-sm(行内)
11
+ * - 动效 ≤240ms ease-out;运行脉冲交给 kb.css .icen-kb-dot.is-live;reduced-motion 全退化为瞬时
12
+ * - 域控件布局(输入视觉复用基础组件):.icen-kb-btn(钮)/ .icen-kb-input(输入)/ .icen-kb-seg(mini segmented),输入原语随 tokens.css 提供
13
+ * - 只消费 --icen-token-* / --icen-radius-* / --icen-font-mono,附缺省回退,可独立安装
14
+ */
15
+
16
+ /* ══════════════ 域控件布局(输入视觉复用基础组件)(.icen-kb-btn / .icen-kb-input / .icen-kb-seg) ══════════════ */
17
+
18
+ .icen-kb-btn {
19
+ display: inline-flex;
20
+ align-items: center;
21
+ gap: 5px;
22
+ padding: 3px 10px;
23
+ border: 1px solid var(--icen-token-line-soft);
24
+ border-radius: var(--icen-radius-sm);
25
+ background: var(--icen-token-bg-soft);
26
+ color: var(--icen-token-text-muted);
27
+ font: inherit;
28
+ font-size: 12px;
29
+ line-height: 1.5;
30
+ white-space: nowrap;
31
+ cursor: pointer;
32
+ transition:
33
+ color 0.16s ease-out,
34
+ border-color 0.16s ease-out,
35
+ background-color 0.16s ease-out;
36
+ }
37
+ .icen-kb-btn:hover {
38
+ color: var(--icen-token-text);
39
+ border-color: var(--icen-token-line);
40
+ }
41
+ .icen-kb-btn:focus-visible {
42
+ outline: 2px solid var(--icen-token-accent);
43
+ outline-offset: 1px;
44
+ }
45
+ .icen-kb-btn:disabled,
46
+ .icen-kb-btn[aria-disabled='true'] {
47
+ opacity: 0.5;
48
+ cursor: not-allowed;
49
+ }
50
+ .icen-kb-btn svg {
51
+ width: 13px;
52
+ height: 13px;
53
+ flex: 0 0 auto;
54
+ }
55
+
56
+ /* Input surface/geometry comes from the shared input recipe in tokens.css. */
57
+ .icen-kb-input[aria-invalid='true'] {
58
+ border-color: var(--icen-token-error);
59
+ }
60
+ .icen-kb-input--mono {
61
+ font-family: var(--icen-font-mono);
62
+ font-size: var(--icen-density-font-size-sm);
63
+ }
64
+
65
+ .icen-kb-seg {
66
+ display: inline-flex;
67
+ gap: 2px;
68
+ padding: 2px;
69
+ border: 1px solid var(--icen-token-line-soft);
70
+ border-radius: var(--icen-radius-sm);
71
+ background: var(--icen-token-bg-soft);
72
+ }
73
+ .icen-kb-seg-item {
74
+ border: none;
75
+ background: none;
76
+ padding: 2px 10px;
77
+ border-radius: calc(var(--icen-radius-sm) - 2px);
78
+ font: inherit;
79
+ font-size: 12px;
80
+ line-height: 1.5;
81
+ color: var(--icen-token-text-muted);
82
+ cursor: pointer;
83
+ transition:
84
+ color 0.16s ease-out,
85
+ background-color 0.16s ease-out;
86
+ }
87
+ .icen-kb-seg-item:hover {
88
+ color: var(--icen-token-text);
89
+ }
90
+ .icen-kb-seg-item.is-active {
91
+ background: var(--icen-token-bg);
92
+ color: var(--icen-token-text);
93
+ box-shadow: 0 0 0 1px var(--icen-token-line-soft);
94
+ }
95
+ .icen-kb-seg-item:focus-visible {
96
+ outline: 2px solid var(--icen-token-accent);
97
+ outline-offset: -2px;
98
+ }
99
+ .icen-kb-seg-item:disabled {
100
+ opacity: 0.45;
101
+ cursor: not-allowed;
102
+ }
103
+
104
+ /* ══════════════ kb-pipeline · 解析管线时间线(§5.5) ══════════════ */
105
+
106
+ .icen-kb-pipeline {
107
+ border: 1px solid var(--icen-token-line-soft);
108
+ border-radius: var(--icen-radius-md);
109
+ background: var(--icen-token-bg-soft);
110
+ padding: 6px 8px;
111
+ min-width: 0;
112
+ }
113
+ .icen-kb-pipeline-list {
114
+ display: flex;
115
+ flex-direction: column;
116
+ gap: 10px;
117
+ min-width: 0;
118
+ }
119
+
120
+ .icen-kb-pipeline-head {
121
+ display: flex;
122
+ align-items: center;
123
+ gap: 6px;
124
+ min-width: 0;
125
+ }
126
+ .icen-kb-pipeline-head > .icen-kb-pipeline-toggle {
127
+ flex: 1 1 auto;
128
+ min-width: 0;
129
+ }
130
+ .icen-kb-pipeline-head > .icen-kb-pipeline-rerun {
131
+ flex: 0 0 auto;
132
+ }
133
+
134
+ /* 头部状态徽章:状态色只落在徽章(点由 .icen-kb-dot 承担) */
135
+ .icen-kb-pipeline-state {
136
+ display: inline-flex;
137
+ align-items: center;
138
+ gap: 5px;
139
+ flex: 0 0 auto;
140
+ font-size: 11.5px;
141
+ color: var(--icen-token-text-faint);
142
+ }
143
+ .icen-kb-pipeline-state.is-running .icen-kb-pipeline-state-label { color: var(--icen-token-accent-text); }
144
+ .icen-kb-pipeline-state.is-done .icen-kb-pipeline-state-label { color: var(--icen-token-success); }
145
+ .icen-kb-pipeline-state.is-fail .icen-kb-pipeline-state-label { color: var(--icen-token-error); }
146
+ .icen-kb-pipeline-state.is-cancel .icen-kb-pipeline-state-label { color: var(--icen-token-text-muted); }
147
+
148
+ .icen-kb-pipeline-title {
149
+ flex: 1 1 auto;
150
+ min-width: 0;
151
+ color: var(--icen-token-text);
152
+ font-size: 13px;
153
+ overflow: hidden;
154
+ text-overflow: ellipsis;
155
+ white-space: nowrap;
156
+ }
157
+
158
+ /* 可选细粒度进度条(run.icen-progress 定义时出现):3px 细线,与上下内容各留 8px */
159
+ .icen-kb-pipeline-progress {
160
+ height: 3px;
161
+ margin: 8px;
162
+ border-radius: 2px; /* guard:allow-radius 微构件(bar/dot/track/指示器等图形级,不属容器圆角面) */
163
+ background: var(--icen-token-line-soft);
164
+ overflow: hidden;
165
+ }
166
+ .icen-kb-pipeline-progress > i {
167
+ display: block;
168
+ height: 100%;
169
+ border-radius: 2px; /* guard:allow-radius 微构件(bar/dot/track/指示器等图形级,不属容器圆角面) */
170
+ background: var(--icen-token-accent);
171
+ opacity: 0.7;
172
+ transition: width 0.24s ease-out;
173
+ }
174
+
175
+ /* 步骤时间线:纵向连线(层级色,不给状态色;沿 inline-start,RTL 镜像) */
176
+ .icen-kb-pipeline-steps {
177
+ list-style: none;
178
+ margin: 4px 0 0;
179
+ padding: 0;
180
+ padding-inline-start: 6px;
181
+ display: flex;
182
+ flex-direction: column;
183
+ gap: 2px;
184
+ min-inline-size: 0;
185
+ }
186
+ .icen-kb-pipeline-step {
187
+ position: relative;
188
+ display: flex;
189
+ align-items: center;
190
+ gap: 8px;
191
+ min-height: 26px;
192
+ padding: 1px 2px;
193
+ border-radius: var(--icen-radius-sm);
194
+ }
195
+ .icen-kb-pipeline-step:not(:last-child)::before {
196
+ content: '';
197
+ position: absolute;
198
+ inset-inline-start: 6.5px;
199
+ top: 15px;
200
+ bottom: -5px;
201
+ width: 1px;
202
+ background: var(--icen-token-line-soft);
203
+ }
204
+ .icen-kb-pipeline-step > .icen-kb-dot {
205
+ position: relative;
206
+ z-index: 1;
207
+ flex: 0 0 auto;
208
+ }
209
+ .icen-kb-pipeline-step-label {
210
+ font-size: 12.5px;
211
+ color: var(--icen-token-text);
212
+ white-space: nowrap;
213
+ }
214
+ .icen-kb-step-detail {
215
+ font-size: 11.5px;
216
+ color: var(--icen-token-text-faint);
217
+ overflow: hidden;
218
+ text-overflow: ellipsis;
219
+ white-space: nowrap;
220
+ min-width: 0;
221
+ }
222
+ /* 状态映射:未开始/排队/取消 中性弱化;进行中 accent;完成 muted;失败 danger */
223
+ .icen-kb-pipeline-step.is-unstart .icen-kb-pipeline-step-label,
224
+ .icen-kb-pipeline-step.is-queued .icen-kb-pipeline-step-label { color: var(--icen-token-text-faint); }
225
+ .icen-kb-pipeline-step.is-running .icen-kb-pipeline-step-label { color: var(--icen-token-accent-text); }
226
+ .icen-kb-pipeline-step.is-done .icen-kb-pipeline-step-label { color: var(--icen-token-text-muted); }
227
+ .icen-kb-pipeline-step.is-cancel .icen-kb-pipeline-step-label {
228
+ color: var(--icen-token-text-faint);
229
+ text-decoration: line-through;
230
+ }
231
+ .icen-kb-pipeline-step.is-fail .icen-kb-pipeline-step-label { color: var(--icen-token-error); }
232
+ .icen-kb-pipeline-step-elapsed {
233
+ margin-inline-start: auto;
234
+ flex: 0 0 auto;
235
+ }
236
+
237
+ /* 失败错误区:阶段定位 + 原因(fail 时随 body 展开) */
238
+ .icen-kb-pipeline-error {
239
+ display: flex;
240
+ align-items: flex-start;
241
+ gap: 8px;
242
+ margin-top: 8px;
243
+ padding: 8px 10px;
244
+ border-radius: var(--icen-radius-sm);
245
+ background: color-mix(in srgb, var(--icen-token-error) 7%, transparent);
246
+ }
247
+ .icen-kb-pipeline-error > svg {
248
+ width: 13px;
249
+ height: 13px;
250
+ flex: 0 0 auto;
251
+ color: var(--icen-token-error);
252
+ margin-top: 2px;
253
+ }
254
+ .icen-kb-pipeline-error-stage {
255
+ flex: 0 0 auto;
256
+ font-family: var(--icen-font-mono);
257
+ font-size: 11.5px;
258
+ font-weight: 600;
259
+ color: var(--icen-token-error);
260
+ }
261
+ .icen-kb-pipeline-error-msg {
262
+ flex: 1 1 auto;
263
+ min-width: 0;
264
+ font-size: 12px;
265
+ line-height: 1.6;
266
+ color: var(--icen-token-text-muted);
267
+ }
268
+
269
+ /* ══════════════ kb-chunks · chunk 编辑器(§5.6) ══════════════ */
270
+
271
+ .icen-kb-chunks {
272
+ display: flex;
273
+ flex-direction: column;
274
+ gap: 10px;
275
+ min-width: 0;
276
+ }
277
+ .icen-kb-chunks-bar {
278
+ display: flex;
279
+ align-items: center;
280
+ gap: 8px;
281
+ flex-wrap: wrap;
282
+ }
283
+ .icen-kb-chunks-bar .icen-kb-chunks-mode {
284
+ flex: 0 0 auto;
285
+ }
286
+ .icen-kb-chunks-bar .icen-kb-chunks-search {
287
+ flex: 1 1 auto;
288
+ min-width: 140px;
289
+ }
290
+ .icen-kb-chunks-bar .icen-kb-chunks-add {
291
+ flex: 0 0 auto;
292
+ }
293
+
294
+ .icen-kb-chunk-list {
295
+ display: flex;
296
+ flex-direction: column;
297
+ gap: 8px;
298
+ min-width: 0;
299
+ }
300
+
301
+ .icen-kb-chunk {
302
+ display: grid;
303
+ grid-template-columns: auto minmax(0, 1fr) auto;
304
+ align-items: start;
305
+ gap: 10px;
306
+ padding: 8px 10px;
307
+ border: 1px solid var(--icen-token-line-soft);
308
+ border-radius: var(--icen-radius-md);
309
+ background: var(--icen-token-bg-soft);
310
+ transition: opacity 0.16s ease-out;
311
+ }
312
+ /* available=false:不删除但排除出检索 → 整体降透明度 */
313
+ .icen-kb-chunk.is-off {
314
+ color: var(--icen-token-text-muted); /* 停用态落在文字色而非整卡透明(透明度会被 axe 算进对比度) */
315
+ }
316
+
317
+ /* 启用开关(kb 域自持,无 switch.css 依赖) */
318
+ .icen-kb-chunk-switch {
319
+ display: inline-flex;
320
+ align-items: center;
321
+ gap: 6px;
322
+ margin-top: 2px;
323
+ font-size: 11.5px;
324
+ color: var(--icen-token-text-faint);
325
+ cursor: pointer;
326
+ user-select: none;
327
+ }
328
+ .icen-kb-chunk-switch input {
329
+ position: absolute;
330
+ width: 0;
331
+ height: 0;
332
+ opacity: 0;
333
+ }
334
+ .icen-kb-chunk-switch-track {
335
+ position: relative;
336
+ flex: 0 0 auto;
337
+ width: 26px;
338
+ height: 15px;
339
+ border-radius: var(--icen-radius-full);
340
+ background: var(--icen-token-line-soft);
341
+ transition: background-color 0.16s ease-out;
342
+ }
343
+ .icen-kb-chunk-switch-thumb {
344
+ position: absolute;
345
+ top: 2px;
346
+ left: 2px; /* guard:allow-physical 开关是物理隐喻控件(Material 惯例:RTL 下方向保持物理,不镜像) */
347
+ width: 11px;
348
+ height: 11px;
349
+ border-radius: 50%;
350
+ background: var(--icen-token-bg);
351
+ box-shadow: 0 0 0 1px var(--icen-token-line-soft);
352
+ transition: transform 0.16s ease-out;
353
+ }
354
+ .icen-kb-chunk-switch input:checked + .icen-kb-chunk-switch-track {
355
+ background: var(--icen-token-success);
356
+ }
357
+ .icen-kb-chunk-switch input:checked + .icen-kb-chunk-switch-track > .icen-kb-chunk-switch-thumb {
358
+ transform: translateX(11px); /* guard:allow-physical translateX 位移属物理动画语义(开关不随 RTL 镜像) */
359
+ }
360
+ .icen-kb-chunk-switch input:focus-visible + .icen-kb-chunk-switch-track {
361
+ outline: 2px solid var(--icen-token-accent);
362
+ outline-offset: 1px;
363
+ }
364
+
365
+ .icen-kb-chunk-main {
366
+ display: flex;
367
+ flex-direction: column;
368
+ gap: 5px;
369
+ min-inline-size: 0;
370
+ }
371
+ /* 行内编辑:静默无边,编辑态(focus)边框 accent */
372
+ .icen-kb-chunk-content {
373
+ padding: 2px 6px;
374
+ margin: 0 -6px;
375
+ border: 1px solid transparent;
376
+ border-radius: var(--icen-radius-sm);
377
+ font-size: 12.5px;
378
+ line-height: 1.7;
379
+ color: var(--icen-token-text);
380
+ white-space: pre-wrap;
381
+ word-break: break-word;
382
+ transition: border-color 0.16s ease-out, background-color 0.16s ease-out;
383
+ }
384
+ .icen-kb-chunk-content:focus {
385
+ outline: none;
386
+ border-color: var(--icen-token-accent);
387
+ background: var(--icen-token-bg);
388
+ }
389
+
390
+ .icen-kb-chunk-keywords {
391
+ display: flex;
392
+ align-items: center;
393
+ flex-wrap: wrap;
394
+ gap: 4px;
395
+ min-inline-size: 0;
396
+ }
397
+ .icen-kb-chunk-keyword-x {
398
+ border: none;
399
+ background: none;
400
+ padding: 0;
401
+ padding-inline-start: 3px;
402
+ font: inherit;
403
+ font-size: 12px;
404
+ line-height: 1;
405
+ color: var(--icen-token-text-faint);
406
+ cursor: pointer;
407
+ }
408
+ .icen-kb-chunk-keyword-x:hover {
409
+ color: var(--icen-token-error);
410
+ }
411
+ .icen-kb-chunk-keyword-x:focus-visible {
412
+ outline: 2px solid var(--icen-token-accent);
413
+ outline-offset: 1px;
414
+ }
415
+ .icen-kb-chunk-keyword-input {
416
+ border: none;
417
+ background: none;
418
+ outline: none;
419
+ padding: 2px 4px;
420
+ width: 96px;
421
+ font-family: var(--icen-font-mono);
422
+ font-size: 11px;
423
+ color: var(--icen-token-text);
424
+ }
425
+ .icen-kb-chunk-keyword-input::placeholder {
426
+ color: var(--icen-token-text-faint);
427
+ }
428
+
429
+ .icen-kb-chunk-meta {
430
+ color: var(--icen-token-text-muted);
431
+ }
432
+ .icen-kb-chunk-edited-flag {
433
+ color: var(--icen-token-warning);
434
+ }
435
+
436
+ /* ══════════════ kb-segment · 分段策略 + 实时预览(§5.7) ══════════════ */
437
+
438
+ .icen-kb-segment-host {
439
+ min-width: 0;
440
+ }
441
+ .icen-kb-segment {
442
+ display: grid;
443
+ grid-template-columns: minmax(260px, 5fr) minmax(0, 7fr);
444
+ gap: 16px;
445
+ min-width: 0;
446
+ }
447
+ @media (max-width: 720px) {
448
+ .icen-kb-segment {
449
+ grid-template-columns: minmax(0, 1fr);
450
+ }
451
+ }
452
+
453
+ .icen-kb-segment-form {
454
+ display: flex;
455
+ flex-direction: column;
456
+ gap: 10px;
457
+ min-width: 0;
458
+ }
459
+ .icen-kb-segment-locked {
460
+ color: var(--icen-token-warning);
461
+ }
462
+ .icen-kb-segment-locked svg {
463
+ color: var(--icen-token-warning);
464
+ }
465
+ .icen-kb-field {
466
+ display: flex;
467
+ flex-direction: column;
468
+ gap: 4px;
469
+ min-width: 0;
470
+ }
471
+ .icen-kb-field > .icen-kb-field-label {
472
+ font-size: 11.5px;
473
+ color: var(--icen-token-text-faint);
474
+ }
475
+ .icen-kb-field > .icen-kb-input {
476
+ width: 100%;
477
+ }
478
+ .icen-kb-segment-overlap-error {
479
+ margin-top: -4px;
480
+ color: var(--icen-token-error);
481
+ }
482
+ .icen-kb-segment-clean {
483
+ display: flex;
484
+ flex-wrap: wrap;
485
+ gap: 6px 14px;
486
+ }
487
+ .icen-kb-segment-clean-item {
488
+ display: inline-flex;
489
+ align-items: center;
490
+ gap: 5px;
491
+ font-size: 12px;
492
+ color: var(--icen-token-text-muted);
493
+ cursor: pointer;
494
+ user-select: none;
495
+ }
496
+ .icen-kb-segment-clean-item .icen-checkbox { flex: 0 0 auto; }
497
+
498
+ .icen-kb-segment-preview {
499
+ display: flex;
500
+ flex-direction: column;
501
+ gap: 8px;
502
+ padding: 10px;
503
+ border: 1px solid var(--icen-token-line-soft);
504
+ border-radius: var(--icen-radius-md);
505
+ background: var(--icen-token-bg);
506
+ min-width: 0;
507
+ min-height: 0;
508
+ }
509
+ .icen-kb-segment-stats {
510
+ display: flex;
511
+ align-items: baseline;
512
+ gap: 12px;
513
+ flex-wrap: wrap;
514
+ }
515
+ .icen-kb-segment-stat {
516
+ font-size: 12.5px;
517
+ color: var(--icen-token-text);
518
+ }
519
+ .icen-kb-segment-blocks {
520
+ display: flex;
521
+ flex-direction: column;
522
+ gap: 6px;
523
+ min-width: 0;
524
+ min-height: 0;
525
+ max-height: 480px;
526
+ overflow-y: auto;
527
+ }
528
+ .icen-kb-segment-block {
529
+ display: grid;
530
+ grid-template-columns: auto minmax(0, 1fr);
531
+ gap: 8px;
532
+ padding: 6px 8px;
533
+ border: 1px solid var(--icen-token-line-soft);
534
+ border-radius: var(--icen-radius-sm);
535
+ background: var(--icen-token-bg-soft);
536
+ }
537
+ .icen-kb-segment-block-no {
538
+ color: var(--icen-token-text-faint);
539
+ }
540
+ /* 内容截断 200px,点击展开(渐进披露) */
541
+ .icen-kb-segment-block-text {
542
+ max-height: 200px;
543
+ overflow: hidden;
544
+ font-size: 12.5px;
545
+ line-height: 1.7;
546
+ color: var(--icen-token-text-muted);
547
+ white-space: pre-wrap;
548
+ word-break: break-word;
549
+ cursor: pointer;
550
+ transition: max-height 0.16s ease-out;
551
+ }
552
+ .icen-kb-segment-block-text.is-open {
553
+ max-height: none;
554
+ }
555
+ .icen-kb-segment-block-text:focus-visible {
556
+ outline: 2px solid var(--icen-token-accent);
557
+ outline-offset: 1px;
558
+ }
559
+
560
+ /* ══════════════ kb-connector · 连接器卡(§5.8) ══════════════ */
561
+
562
+ .icen-kb-connector-grid {
563
+ display: grid;
564
+ grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
565
+ gap: 12px;
566
+ min-width: 0;
567
+ }
568
+
569
+ .icen-kb-connector {
570
+ display: flex;
571
+ flex-direction: column;
572
+ gap: 8px;
573
+ padding-block: 10px;
574
+ padding-inline: 14px 12px;
575
+ border: 1px solid var(--icen-token-line-soft);
576
+ border-inline-start: 2px solid var(--icen-token-line-soft);
577
+ border-radius: var(--icen-radius-md);
578
+ background: var(--icen-token-bg-soft);
579
+ min-inline-size: 0;
580
+ }
581
+ /* 健康起始缘 2px 色条(connectorHealth 判定;色只在此与状态点上;RTL 镜像) */
582
+ .icen-kb-connector.is-healthy { border-inline-start-color: var(--icen-token-success); }
583
+ .icen-kb-connector.is-stale { border-inline-start-color: var(--icen-token-warning); }
584
+ .icen-kb-connector.is-failing { border-inline-start-color: var(--icen-token-error); }
585
+ .icen-kb-connector.is-off { border-inline-start-color: var(--icen-token-line); }
586
+
587
+ .icen-kb-connector-head {
588
+ display: flex;
589
+ align-items: center;
590
+ gap: 8px;
591
+ min-inline-size: 0;
592
+ }
593
+ /* .icen-kb-source-icon 基元归 kb-ground.css;本域兜底一份最小骨架(同名同义,共存不冲突) */
594
+ .icen-kb-connector-head .icen-kb-source-icon {
595
+ flex: 0 0 auto;
596
+ display: inline-flex;
597
+ color: var(--icen-token-text-muted);
598
+ }
599
+ .icen-kb-connector-head .icen-kb-source-icon svg {
600
+ width: 16px;
601
+ height: 16px;
602
+ }
603
+ .icen-kb-connector-main {
604
+ flex: 1 1 auto;
605
+ min-inline-size: 0;
606
+ display: flex;
607
+ flex-direction: column;
608
+ gap: 1px;
609
+ }
610
+ .icen-kb-connector-name {
611
+ font-size: 13px;
612
+ font-weight: 600;
613
+ color: var(--icen-token-text);
614
+ overflow: hidden;
615
+ text-overflow: ellipsis;
616
+ white-space: nowrap;
617
+ }
618
+ .icen-kb-connector-sub {
619
+ font-size: 11.5px;
620
+ color: var(--icen-token-text-faint);
621
+ overflow: hidden;
622
+ text-overflow: ellipsis;
623
+ white-space: nowrap;
624
+ }
625
+ /* 同步计划:mono 不换行(cron 原值包 .icen-kb-chip;人类可读文本 .icen-kb-meta)——绝不散点裸渲 */
626
+ .icen-kb-connector-schedule {
627
+ flex: 0 0 auto;
628
+ font-family: var(--icen-font-mono);
629
+ white-space: nowrap;
630
+ }
631
+
632
+ /* 指标区:CSS grid 两列对齐(label 11px faint 起始缘、value .icen-kb-num 行内末端,同列基线) */
633
+ .icen-kb-connector-metrics {
634
+ display: grid;
635
+ grid-template-columns: repeat(2, minmax(0, 1fr));
636
+ gap: 6px 12px;
637
+ }
638
+ .icen-kb-connector-signal {
639
+ display: flex;
640
+ align-items: baseline;
641
+ gap: 6px;
642
+ min-inline-size: 0;
643
+ min-height: 22px;
644
+ }
645
+ /* 健康状态点与文字基线并排时垂直居中,避免点悬浮 */
646
+ .icen-kb-connector-signal .icen-kb-dot {
647
+ align-self: center;
648
+ }
649
+ .icen-kb-connector-signal-label {
650
+ flex: 0 0 auto;
651
+ font-size: 11px;
652
+ color: var(--icen-token-text-faint);
653
+ }
654
+ .icen-kb-connector-signal-value {
655
+ flex: 1 1 auto;
656
+ min-inline-size: 0;
657
+ margin-inline-start: auto;
658
+ font-size: 12px;
659
+ color: var(--icen-token-text);
660
+ text-align: end;
661
+ overflow: hidden;
662
+ text-overflow: ellipsis;
663
+ white-space: nowrap;
664
+ }
665
+ /* 凭证与指标同排版(文字值行内末端对齐同列),仅以颜色区分:过期 = error 红与 failing 一致,未配置 warning,正常 muted */
666
+ .icen-kb-connector-cred.is-expired {
667
+ color: var(--icen-token-error);
668
+ font-weight: 500;
669
+ }
670
+ .icen-kb-connector-cred.is-none {
671
+ color: var(--icen-token-warning);
672
+ }
673
+ .icen-kb-connector-cred.is-ok {
674
+ color: var(--icen-token-text-muted);
675
+ }
676
+
677
+ .icen-kb-connector-foot {
678
+ display: flex;
679
+ align-items: center;
680
+ justify-content: space-between;
681
+ gap: 8px;
682
+ padding-top: 8px;
683
+ border-top: 1px solid var(--icen-token-line-soft);
684
+ flex-wrap: wrap;
685
+ }
686
+ .icen-kb-connector-actions {
687
+ display: inline-flex;
688
+ align-items: center;
689
+ gap: 6px;
690
+ flex-wrap: wrap;
691
+ }
692
+ .icen-kb-connector-actions .icen-kb-btn {
693
+ padding: 2px 8px;
694
+ font-size: 11.5px;
695
+ }
696
+
697
+ /* ══════════════ kb-metadata · 元数据管理(§5.9) ══════════════ */
698
+
699
+ .icen-kb-metadata {
700
+ min-width: 0;
701
+ }
702
+ .icen-kb-metadata-table {
703
+ width: 100%;
704
+ border-collapse: collapse;
705
+ table-layout: fixed;
706
+ }
707
+ .icen-kb-metadata-th {
708
+ padding: 4px 8px;
709
+ border-bottom: 1px solid var(--icen-token-line-soft);
710
+ font-size: 11.5px;
711
+ font-weight: 500;
712
+ color: var(--icen-token-text-faint);
713
+ text-align: start;
714
+ white-space: nowrap;
715
+ }
716
+ .icen-kb-metadata-th:nth-child(1) { width: 32%; }
717
+ .icen-kb-metadata-th:nth-child(2) { width: 84px; }
718
+ .icen-kb-metadata-th:nth-child(4) { width: 60px; }
719
+ .icen-kb-metadata-row > td {
720
+ padding: 4px 8px;
721
+ border-bottom: 1px solid var(--icen-token-line-soft);
722
+ font-size: 12.5px;
723
+ vertical-align: middle;
724
+ overflow: hidden;
725
+ text-overflow: ellipsis;
726
+ white-space: nowrap;
727
+ }
728
+ .icen-kb-metadata-row:hover > td {
729
+ background: var(--icen-token-bg-soft);
730
+ }
731
+ .icen-kb-metadata-key {
732
+ font-family: var(--icen-font-mono);
733
+ font-size: 12px;
734
+ color: var(--icen-token-text);
735
+ }
736
+ .icen-kb-metadata-key-label {
737
+ font-size: 11px;
738
+ color: var(--icen-token-text-faint);
739
+ }
740
+ .icen-kb-metadata-builtin-flag {
741
+ margin-inline-start: 6px;
742
+ font-size: 10.5px;
743
+ color: var(--icen-token-text-faint);
744
+ border: 1px solid var(--icen-token-line-soft);
745
+ border-radius: var(--icen-radius-full);
746
+ padding: 1px 6px;
747
+ }
748
+ .icen-kb-metadata-type {
749
+ font-family: var(--icen-font-mono);
750
+ }
751
+ .icen-kb-metadata-readonly {
752
+ color: var(--icen-token-text-muted);
753
+ }
754
+ .icen-kb-metadata-value .icen-kb-input {
755
+ inline-size: 100%;
756
+ }
757
+ .icen-kb-metadata-ops {
758
+ text-align: end;
759
+ }
760
+ .icen-kb-metadata-ops .icen-kb-btn {
761
+ padding: 1px 8px;
762
+ font-size: 11.5px;
763
+ }
764
+ .icen-kb-metadata-empty {
765
+ padding: 18px 8px !important; /* guard:allow-important 状态/守卫覆盖需压制变体优先级 */
766
+ text-align: center;
767
+ color: var(--icen-token-text-faint);
768
+ white-space: normal !important; /* guard:allow-important 状态/守卫覆盖需压制变体优先级 */
769
+ }
770
+ .icen-kb-metadata-new {
771
+ display: flex;
772
+ align-items: center;
773
+ gap: 8px;
774
+ flex-wrap: wrap;
775
+ margin-top: 10px;
776
+ }
777
+ .icen-kb-metadata-new .icen-kb-metadata-new-key {
778
+ width: 220px;
779
+ }
780
+
781
+ /* ══════════════ kb-qa · 认证问答对编辑器(§5.10) ══════════════ */
782
+
783
+ .icen-kb-qa {
784
+ min-inline-size: 0;
785
+ }
786
+ .icen-kb-qa-bar {
787
+ display: flex;
788
+ align-items: center;
789
+ gap: 8px;
790
+ flex-wrap: wrap;
791
+ margin-bottom: 8px;
792
+ }
793
+ .icen-kb-qa-bar .icen-kb-qa-hint {
794
+ flex: 1 1 auto;
795
+ min-inline-size: 0;
796
+ overflow: hidden;
797
+ text-overflow: ellipsis;
798
+ }
799
+ .icen-kb-qa-table {
800
+ inline-size: 100%;
801
+ border-collapse: collapse;
802
+ table-layout: fixed;
803
+ }
804
+ .icen-kb-qa-th {
805
+ padding: 4px 8px;
806
+ border-bottom: 1px solid var(--icen-token-line-soft);
807
+ font-size: 11.5px;
808
+ font-weight: 500;
809
+ color: var(--icen-token-text-faint);
810
+ text-align: start;
811
+ white-space: nowrap;
812
+ }
813
+ .icen-kb-qa-th:nth-child(1) { width: 44%; }
814
+ .icen-kb-qa-th:nth-child(2) { width: 44%; }
815
+ .icen-kb-qa-th:nth-child(3) { width: 52px; }
816
+ .icen-kb-qa-row > td {
817
+ padding: 4px 8px;
818
+ border-bottom: 1px solid var(--icen-token-line-soft);
819
+ font-size: 12.5px;
820
+ vertical-align: top;
821
+ }
822
+ .icen-kb-qa-row:hover > td {
823
+ background: var(--icen-token-bg-soft);
824
+ }
825
+ /* 行内编辑格:静默,focus 内描边 accent */
826
+ .icen-kb-qa-q,
827
+ .icen-kb-qa-a {
828
+ outline: none;
829
+ border-radius: var(--icen-radius-sm);
830
+ padding: 2px 4px;
831
+ margin: -2px -4px;
832
+ line-height: 1.7;
833
+ word-break: break-word;
834
+ transition: box-shadow 0.16s ease-out;
835
+ }
836
+ .icen-kb-qa-q:focus,
837
+ .icen-kb-qa-a:focus {
838
+ box-shadow: inset 0 0 0 1px var(--icen-token-accent);
839
+ }
840
+ .icen-kb-qa-q:empty::before,
841
+ .icen-kb-qa-a:empty::before {
842
+ content: '…';
843
+ color: var(--icen-token-text-faint);
844
+ }
845
+ .icen-kb-qa-ops {
846
+ text-align: end;
847
+ vertical-align: middle;
848
+ }
849
+ .icen-kb-qa-ops .icen-kb-btn {
850
+ padding: 1px 8px;
851
+ font-size: 11.5px;
852
+ }
853
+ .icen-kb-qa-empty {
854
+ padding: 18px 8px !important; /* guard:allow-important 状态/守卫覆盖需压制变体优先级 */
855
+ text-align: center;
856
+ color: var(--icen-token-text-faint);
857
+ }
858
+
859
+ /* ══════════════ 密度 / 动效守卫 ══════════════ */
860
+
861
+ [data-icen-density='compact'] .icen-kb-pipeline-step { min-height: 22px; }
862
+ [data-icen-density='compact'] .icen-kb-chunk { padding: 5px 8px; gap: 8px; }
863
+ [data-icen-density='compact'] .icen-kb-metadata-row > td,
864
+ [data-icen-density='compact'] .icen-kb-qa-row > td { padding-top: 2px; padding-bottom: 2px; }
865
+
866
+ @media (prefers-reduced-motion: reduce) {
867
+ .icen-kb-btn,
868
+ .icen-kb-input,
869
+ .icen-kb-seg-item,
870
+ .icen-kb-chunk,
871
+ .icen-kb-chunk-content,
872
+ .icen-kb-chunk-switch-track,
873
+ .icen-kb-chunk-switch-thumb,
874
+ .icen-kb-pipeline-progress > i,
875
+ .icen-kb-segment-block-text,
876
+ .icen-kb-qa-q,
877
+ .icen-kb-qa-a {
878
+ transition: none;
879
+ }
880
+ }
881
+
882
+ }