@icen.ai/ui 0.10.0 → 0.11.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 (355) hide show
  1. package/AGENTS.md +79 -309
  2. package/LICENSE +21 -0
  3. package/README.md +43 -54
  4. package/dist/base.css +57 -16
  5. package/dist/behaviors/accordion.mjs +1 -1
  6. package/dist/behaviors/ai-branch.mjs +1 -0
  7. package/dist/behaviors/ai-chat.d.mts +2 -2
  8. package/dist/behaviors/ai-chat.mjs +53 -10
  9. package/dist/behaviors/ai-composer.d.mts +5 -5
  10. package/dist/behaviors/ai-composer.mjs +21 -10
  11. package/dist/behaviors/ai-core.mjs +1 -0
  12. package/dist/behaviors/ai-diff.mjs +1 -0
  13. package/dist/behaviors/ai-feedback.mjs +1 -0
  14. package/dist/behaviors/ai-panel.d.mts +2 -2
  15. package/dist/behaviors/ai-panel.mjs +1 -0
  16. package/dist/behaviors/ai-provider.d.mts +1 -1
  17. package/dist/behaviors/ai-provider.mjs +1 -0
  18. package/dist/behaviors/ai-threads.mjs +1 -0
  19. package/dist/behaviors/ai-tool.d.mts +1 -1
  20. package/dist/behaviors/ai-tool.mjs +57 -24
  21. package/dist/behaviors/ai-tools.mjs +937 -28
  22. package/dist/behaviors/autocomplete.d.mts +1 -1
  23. package/dist/behaviors/autocomplete.mjs +1 -0
  24. package/dist/behaviors/back-top.mjs +1 -0
  25. package/dist/behaviors/carousel.mjs +8 -1
  26. package/dist/behaviors/cascader.mjs +14 -0
  27. package/dist/behaviors/charts.mjs +56 -20
  28. package/dist/behaviors/code-block.mjs +9 -1
  29. package/dist/behaviors/command-palette.mjs +3 -3
  30. package/dist/behaviors/context-menu.d.mts +2 -2
  31. package/dist/behaviors/context-menu.mjs +1 -0
  32. package/dist/behaviors/controls.d.mts +8 -8
  33. package/dist/behaviors/controls.mjs +37 -6
  34. package/dist/behaviors/copy.mjs +1 -0
  35. package/dist/behaviors/datatable.d.mts +3 -3
  36. package/dist/behaviors/datatable.mjs +76 -11
  37. package/dist/behaviors/date-picker.mjs +1 -0
  38. package/dist/behaviors/events.d.mts +10 -10
  39. package/dist/behaviors/events.mjs +11 -1
  40. package/dist/behaviors/form-validate.d.mts +10 -1
  41. package/dist/behaviors/form-validate.mjs +266 -4611
  42. package/dist/behaviors/i18n.d.mts +1 -0
  43. package/dist/behaviors/i18n.mjs +2 -0
  44. package/dist/behaviors/input.mjs +3 -0
  45. package/dist/behaviors/kb-access.d.mts +2 -2
  46. package/dist/behaviors/kb-access.mjs +8 -2
  47. package/dist/behaviors/kb-acl.d.mts +2 -2
  48. package/dist/behaviors/kb-acl.mjs +1 -0
  49. package/dist/behaviors/kb-answer.d.mts +2 -2
  50. package/dist/behaviors/kb-answer.mjs +56 -23
  51. package/dist/behaviors/kb-audit.d.mts +2 -2
  52. package/dist/behaviors/kb-audit.mjs +1 -0
  53. package/dist/behaviors/kb-canvas.d.mts +3 -3
  54. package/dist/behaviors/kb-canvas.mjs +1 -0
  55. package/dist/behaviors/kb-chain.d.mts +2 -2
  56. package/dist/behaviors/kb-chain.mjs +1 -0
  57. package/dist/behaviors/kb-checkpoint.d.mts +2 -2
  58. package/dist/behaviors/kb-checkpoint.mjs +1 -0
  59. package/dist/behaviors/kb-chunks.d.mts +2 -2
  60. package/dist/behaviors/kb-chunks.mjs +1 -0
  61. package/dist/behaviors/kb-citation.d.mts +2 -2
  62. package/dist/behaviors/kb-citation.mjs +20 -6
  63. package/dist/behaviors/kb-clarify.d.mts +2 -2
  64. package/dist/behaviors/kb-clarify.mjs +1 -0
  65. package/dist/behaviors/kb-conflict.d.mts +2 -2
  66. package/dist/behaviors/kb-conflict.mjs +1 -0
  67. package/dist/behaviors/kb-connector.d.mts +2 -2
  68. package/dist/behaviors/kb-connector.mjs +1 -0
  69. package/dist/behaviors/kb-core.d.mts +1 -1
  70. package/dist/behaviors/kb-core.mjs +1 -0
  71. package/dist/behaviors/kb-eval.d.mts +2 -2
  72. package/dist/behaviors/kb-eval.mjs +8 -2
  73. package/dist/behaviors/kb-explain.d.mts +2 -2
  74. package/dist/behaviors/kb-explain.mjs +13 -2
  75. package/dist/behaviors/kb-filter.d.mts +2 -2
  76. package/dist/behaviors/kb-filter.mjs +8 -2
  77. package/dist/behaviors/kb-gap.d.mts +2 -2
  78. package/dist/behaviors/kb-gap.mjs +1 -0
  79. package/dist/behaviors/kb-hittest.d.mts +2 -2
  80. package/dist/behaviors/kb-hittest.mjs +2 -1
  81. package/dist/behaviors/kb-metadata.mjs +6 -0
  82. package/dist/behaviors/kb-passage.d.mts +2 -2
  83. package/dist/behaviors/kb-passage.mjs +1 -0
  84. package/dist/behaviors/kb-pipeline.d.mts +2 -2
  85. package/dist/behaviors/kb-pipeline.mjs +1 -0
  86. package/dist/behaviors/kb-qa.mjs +1 -0
  87. package/dist/behaviors/kb-rerank.d.mts +2 -2
  88. package/dist/behaviors/kb-rerank.mjs +1 -0
  89. package/dist/behaviors/kb-retrieval.d.mts +2 -2
  90. package/dist/behaviors/kb-retrieval.mjs +18 -4
  91. package/dist/behaviors/kb-review.d.mts +2 -2
  92. package/dist/behaviors/kb-review.mjs +8 -2
  93. package/dist/behaviors/kb-sandbox.d.mts +2 -2
  94. package/dist/behaviors/kb-sandbox.mjs +7 -1
  95. package/dist/behaviors/kb-segment.d.mts +2 -2
  96. package/dist/behaviors/kb-segment.mjs +2 -1
  97. package/dist/behaviors/kb-select.mjs +8 -2
  98. package/dist/behaviors/kb-sources.d.mts +2 -2
  99. package/dist/behaviors/kb-sources.mjs +1 -0
  100. package/dist/behaviors/kb-sql.d.mts +2 -2
  101. package/dist/behaviors/kb-sql.mjs +1 -0
  102. package/dist/behaviors/kb-trace.d.mts +2 -2
  103. package/dist/behaviors/kb-trace.mjs +9 -3
  104. package/dist/behaviors/kb-visibility.d.mts +2 -2
  105. package/dist/behaviors/kb-visibility.mjs +1 -0
  106. package/dist/behaviors/kb-who-can.d.mts +2 -2
  107. package/dist/behaviors/kb-who-can.mjs +8 -2
  108. package/dist/behaviors/mentions.d.mts +1 -1
  109. package/dist/behaviors/mentions.mjs +1 -0
  110. package/dist/behaviors/modal.d.mts +1 -1
  111. package/dist/behaviors/modal.mjs +1 -0
  112. package/dist/behaviors/notification.d.mts +2 -2
  113. package/dist/behaviors/notification.mjs +14 -3
  114. package/dist/behaviors/panel.mjs +1 -0
  115. package/dist/behaviors/scroll-area.d.mts +17 -0
  116. package/dist/behaviors/scroll-area.mjs +59 -0
  117. package/dist/behaviors/select.mjs +8 -2
  118. package/dist/behaviors/slider.mjs +3 -3
  119. package/dist/behaviors/split-pane.mjs +2 -0
  120. package/dist/behaviors/suggestions.mjs +1 -0
  121. package/dist/behaviors/tabs.mjs +10 -0
  122. package/dist/behaviors/tag-input.mjs +1 -0
  123. package/dist/behaviors/theme-switcher.d.mts +2 -2
  124. package/dist/behaviors/theme-switcher.mjs +17 -2
  125. package/dist/behaviors/theme.mjs +16 -2
  126. package/dist/behaviors/toast.d.mts +2 -2
  127. package/dist/behaviors/toast.mjs +1 -0
  128. package/dist/behaviors/tree-select.mjs +14 -0
  129. package/dist/behaviors/tree.mjs +4 -4
  130. package/dist/behaviors/upload.mjs +1 -0
  131. package/dist/behaviors/url-safety.d.mts +8 -0
  132. package/dist/behaviors/url-safety.mjs +11 -0
  133. package/dist/components/accordion.d.mts +2 -0
  134. package/dist/components/ai-branch.d.mts +2 -0
  135. package/dist/components/ai-chat.css +40 -33
  136. package/dist/components/ai-chat.d.mts +2 -0
  137. package/dist/components/ai-composer.d.mts +2 -0
  138. package/dist/components/ai-context.d.mts +2 -0
  139. package/dist/components/ai-context.mjs +1 -0
  140. package/dist/components/ai-diff.css +6 -6
  141. package/dist/components/ai-diff.d.mts +2 -0
  142. package/dist/components/ai-feedback.d.mts +2 -0
  143. package/dist/components/ai-files.d.mts +2 -0
  144. package/dist/components/ai-message.d.mts +2 -0
  145. package/dist/components/ai-panel.css +12 -10
  146. package/dist/components/ai-reasoning.d.mts +2 -0
  147. package/dist/components/ai-subagent.d.mts +2 -0
  148. package/dist/components/ai-subagent.mjs +1 -0
  149. package/dist/components/ai-threads.d.mts +2 -0
  150. package/dist/components/ai-todo.d.mts +2 -0
  151. package/dist/components/ai-todo.mjs +1 -0
  152. package/dist/components/ai-tool-call.d.mts +2 -0
  153. package/dist/components/ai-tool-call.mjs +1 -0
  154. package/dist/components/ai-tool.css +16 -16
  155. package/dist/components/ai-usage.d.mts +2 -0
  156. package/dist/components/alert.d.mts +2 -0
  157. package/dist/components/autocomplete.css +12 -12
  158. package/dist/components/autocomplete.d.mts +2 -0
  159. package/dist/components/avatar.d.mts +2 -0
  160. package/dist/components/back-top.css +47 -16
  161. package/dist/components/back-top.d.mts +2 -0
  162. package/dist/components/badge.css +1 -1
  163. package/dist/components/badge.d.mts +2 -0
  164. package/dist/components/breadcrumb.css +26 -8
  165. package/dist/components/breadcrumb.d.mts +2 -0
  166. package/dist/components/btn.css +67 -62
  167. package/dist/components/btn.d.mts +2 -0
  168. package/dist/components/card.css +22 -22
  169. package/dist/components/card.d.mts +2 -0
  170. package/dist/components/carousel.d.mts +2 -0
  171. package/dist/components/cascader.css +56 -35
  172. package/dist/components/cascader.d.mts +2 -0
  173. package/dist/components/chart-area.css +46 -0
  174. package/dist/components/chart-area.d.mts +2 -0
  175. package/dist/components/chart-bar.css +66 -19
  176. package/dist/components/chart-bar.d.mts +2 -0
  177. package/dist/components/chart-calendar.d.mts +2 -0
  178. package/dist/components/chart-gauge.css +23 -3
  179. package/dist/components/chart-gauge.d.mts +2 -0
  180. package/dist/components/chart-graph.css +15 -3
  181. package/dist/components/chart-graph.d.mts +2 -0
  182. package/dist/components/chart-heatmap.css +117 -95
  183. package/dist/components/chart-heatmap.d.mts +2 -0
  184. package/dist/components/chart-line.css +54 -0
  185. package/dist/components/chart-line.d.mts +2 -0
  186. package/dist/components/chart-map.d.mts +2 -0
  187. package/dist/components/chart-pie.css +29 -0
  188. package/dist/components/chart-pie.d.mts +2 -0
  189. package/dist/components/chart-radar.css +50 -1
  190. package/dist/components/chart-radar.d.mts +2 -0
  191. package/dist/components/chart-scatter.css +39 -2
  192. package/dist/components/chart-scatter.d.mts +2 -0
  193. package/dist/components/chart-sparkline.css +20 -0
  194. package/dist/components/chart-sparkline.d.mts +2 -0
  195. package/dist/components/chart-stack.css +16 -5
  196. package/dist/components/chart-stack.d.mts +2 -0
  197. package/dist/components/charts.css +80 -35
  198. package/dist/components/charts.d.mts +2 -0
  199. package/dist/components/code-block.css +10 -8
  200. package/dist/components/code-block.d.mts +2 -0
  201. package/dist/components/command-palette.css +45 -38
  202. package/dist/components/command-palette.d.mts +2 -0
  203. package/dist/components/content.css +62 -57
  204. package/dist/components/context-menu.d.mts +2 -0
  205. package/dist/components/copy.css +10 -10
  206. package/dist/components/copy.d.mts +2 -0
  207. package/dist/components/datatable.css +72 -59
  208. package/dist/components/datatable.d.mts +2 -0
  209. package/dist/components/date-picker.css +26 -26
  210. package/dist/components/date-picker.d.mts +2 -0
  211. package/dist/components/desc.d.mts +2 -0
  212. package/dist/components/dropdown.d.mts +2 -0
  213. package/dist/components/empty.css +16 -16
  214. package/dist/components/empty.d.mts +2 -0
  215. package/dist/components/feedback.css +31 -29
  216. package/dist/components/form-validate.css +20 -6
  217. package/dist/components/form-validate.d.mts +2 -0
  218. package/dist/components/form.css +17 -14
  219. package/dist/components/form.d.mts +2 -0
  220. package/dist/components/icon.css +21 -10
  221. package/dist/components/icon.d.mts +2 -0
  222. package/dist/components/input.css +22 -22
  223. package/dist/components/input.d.mts +2 -0
  224. package/dist/components/kb-access.d.mts +2 -0
  225. package/dist/components/kb-acl.d.mts +2 -0
  226. package/dist/components/kb-agent.css +134 -55
  227. package/dist/components/kb-answer.d.mts +2 -0
  228. package/dist/components/kb-audit.d.mts +2 -0
  229. package/dist/components/kb-canvas.d.mts +2 -0
  230. package/dist/components/kb-chain.d.mts +2 -0
  231. package/dist/components/kb-checkpoint.d.mts +2 -0
  232. package/dist/components/kb-chunks.d.mts +2 -0
  233. package/dist/components/kb-citation.d.mts +2 -0
  234. package/dist/components/kb-clarify.d.mts +2 -0
  235. package/dist/components/kb-conflict.d.mts +2 -0
  236. package/dist/components/kb-connector.d.mts +2 -0
  237. package/dist/components/kb-data.css +192 -80
  238. package/dist/components/kb-eval.d.mts +2 -0
  239. package/dist/components/kb-explain.d.mts +2 -0
  240. package/dist/components/kb-filter.d.mts +2 -0
  241. package/dist/components/kb-gap.d.mts +2 -0
  242. package/dist/components/kb-ground.css +165 -73
  243. package/dist/components/kb-hittest.d.mts +2 -0
  244. package/dist/components/kb-ingest.css +308 -113
  245. package/dist/components/kb-metadata.d.mts +2 -0
  246. package/dist/components/kb-ops.css +189 -75
  247. package/dist/components/kb-passage.d.mts +2 -0
  248. package/dist/components/kb-perm.css +158 -87
  249. package/dist/components/kb-pipeline.d.mts +2 -0
  250. package/dist/components/kb-qa.d.mts +2 -0
  251. package/dist/components/kb-rerank.d.mts +2 -0
  252. package/dist/components/kb-retrieval.d.mts +2 -0
  253. package/dist/components/kb-review.d.mts +2 -0
  254. package/dist/components/kb-sandbox.d.mts +2 -0
  255. package/dist/components/kb-search.css +353 -116
  256. package/dist/components/kb-segment.d.mts +2 -0
  257. package/dist/components/kb-sources.d.mts +2 -0
  258. package/dist/components/kb-sql.d.mts +2 -0
  259. package/dist/components/kb-trace.d.mts +2 -0
  260. package/dist/components/kb-visibility.d.mts +2 -0
  261. package/dist/components/kb-who-can.d.mts +2 -0
  262. package/dist/components/kb.css +60 -36
  263. package/dist/components/kb.d.mts +2 -0
  264. package/dist/components/kbd.d.mts +2 -0
  265. package/dist/components/layout.css +10 -10
  266. package/dist/components/layout.d.mts +2 -0
  267. package/dist/components/list.d.mts +2 -0
  268. package/dist/components/material-chinese.css +10 -0
  269. package/dist/components/material-soviet.css +10 -0
  270. package/dist/components/material.css +61 -18
  271. package/dist/components/media-card.d.mts +2 -0
  272. package/dist/components/media.css +22 -27
  273. package/dist/components/mentions.css +18 -17
  274. package/dist/components/mentions.d.mts +2 -0
  275. package/dist/components/menu.css +32 -28
  276. package/dist/components/modal.css +30 -27
  277. package/dist/components/modal.d.mts +2 -0
  278. package/dist/components/nav.css +48 -44
  279. package/dist/components/nav.d.mts +2 -0
  280. package/dist/components/notification.css +31 -25
  281. package/dist/components/notification.d.mts +2 -0
  282. package/dist/components/pagination.css +15 -13
  283. package/dist/components/pagination.d.mts +2 -0
  284. package/dist/components/panel.css +19 -20
  285. package/dist/components/panel.d.mts +2 -0
  286. package/dist/components/pill.css +8 -7
  287. package/dist/components/pill.d.mts +2 -0
  288. package/dist/components/popover.css +32 -23
  289. package/dist/components/popover.d.mts +2 -0
  290. package/dist/components/progress.d.mts +2 -0
  291. package/dist/components/rating.d.mts +2 -0
  292. package/dist/components/result.d.mts +2 -0
  293. package/dist/components/scroll-area.css +84 -112
  294. package/dist/components/scroll-area.d.mts +2 -0
  295. package/dist/components/scroll-area.mjs +1 -0
  296. package/dist/components/segmented.css +47 -29
  297. package/dist/components/segmented.d.mts +2 -0
  298. package/dist/components/select.css +80 -41
  299. package/dist/components/select.d.mts +2 -0
  300. package/dist/components/sidebar.css +42 -38
  301. package/dist/components/sidebar.d.mts +2 -0
  302. package/dist/components/skeleton.d.mts +2 -0
  303. package/dist/components/slider.css +26 -22
  304. package/dist/components/slider.d.mts +2 -0
  305. package/dist/components/spinner.d.mts +2 -0
  306. package/dist/components/split-pane.css +16 -7
  307. package/dist/components/split-pane.d.mts +2 -0
  308. package/dist/components/stat.css +17 -16
  309. package/dist/components/stat.d.mts +2 -0
  310. package/dist/components/steps.css +26 -26
  311. package/dist/components/steps.d.mts +2 -0
  312. package/dist/components/switch.css +78 -39
  313. package/dist/components/switch.d.mts +2 -0
  314. package/dist/components/table.css +54 -32
  315. package/dist/components/table.d.mts +2 -0
  316. package/dist/components/tabs.css +53 -32
  317. package/dist/components/tabs.d.mts +2 -0
  318. package/dist/components/tag-input.css +12 -8
  319. package/dist/components/tag-input.d.mts +2 -0
  320. package/dist/components/tag.css +20 -12
  321. package/dist/components/tag.d.mts +2 -0
  322. package/dist/components/theme-switcher.css +7 -7
  323. package/dist/components/theme-switcher.d.mts +2 -0
  324. package/dist/components/timeline.d.mts +2 -0
  325. package/dist/components/toast.css +34 -30
  326. package/dist/components/toast.d.mts +2 -0
  327. package/dist/components/toolbar.css +19 -18
  328. package/dist/components/toolbar.d.mts +2 -0
  329. package/dist/components/tooltip.css +9 -8
  330. package/dist/components/tooltip.d.mts +2 -0
  331. package/dist/components/tree-select.css +63 -40
  332. package/dist/components/tree-select.d.mts +2 -0
  333. package/dist/components/tree.d.mts +2 -0
  334. package/dist/components/upload.css +9 -11
  335. package/dist/components/upload.d.mts +2 -0
  336. package/dist/index.d.mts +85 -84
  337. package/dist/index.mjs +14764 -14311
  338. package/dist/react.d.mts +18 -18
  339. package/dist/react.mjs +135 -36
  340. package/dist/registry.json +795 -64
  341. package/dist/tokens/colors.css +6 -0
  342. package/dist/tokens/design.css +130 -30
  343. package/dist/tokens/dtcg.json +6189 -1461
  344. package/dist/tokens/figma.variables.json +4107 -345
  345. package/dist/tokens/pixel.css +3 -0
  346. package/dist/tokens/scrollbars.css +40 -0
  347. package/dist/tokens/tokens-studio.json +5191 -271
  348. package/dist/tokens.css +304 -81
  349. package/dist/ui.css +4050 -2148
  350. package/dist/vue.d.mts +17 -17
  351. package/dist/vue.mjs +129 -34
  352. package/docs/spec/design-philosophy.md +5 -5
  353. package/docs/spec/design-primitives.md +10 -10
  354. package/docs/spec/scrollbars.md +46 -0
  355. package/package.json +16 -3
@@ -7,22 +7,23 @@
7
7
  * 域内纪律(spec §2):
8
8
  * - 参数栏 gap 8、控件高 28;行基元 28px 节奏;组内 8px、区块 12–16px
9
9
  * - accent 稀缺:每个视图唯一 accent 级操作(检索「运行」/ 测试「运行全部」);其余 ghost 24px
10
- * - 数字一律 .icen-kb-num(mono + tabular-nums);元信息 11–11.5px faint
10
+ * - 数字一律 .icen-kb-num(mono + tabular-nums);元信息 11–12px faint
11
11
  * - 显式禁用不隐藏(alpha 脱离混合模式 / 阈值脱离重排 / 组深度达上限 → .is-off + disabled)
12
12
  * - 只用 --icen-token-* 与 kb.css 原语;动效 ≤240ms ease-out;reduced-motion 走全局规则
13
13
  */
14
14
 
15
15
  /* ══════════════ 0. 域内共享控件基元 ══════════════ */
16
16
 
17
- /* Text fields share input.css; only domain widths/flex allocation are local. */
17
+ /* 文本输入视觉随 input.css;本域只负责宽度与 flex 分配。 */
18
18
 
19
19
  /* 滑杆(alpha 混合权重 / 分数阈值):自实现简单拖杆,input[type=range] 样式化 */
20
20
  .icen-kb-range {
21
21
  -webkit-appearance: none;
22
22
  appearance: none;
23
23
  width: 96px;
24
- height: 28px;
24
+ height: var(--icen-density-item-height);
25
25
  margin: 0;
26
+ border-radius: var(--icen-radius-full);
26
27
  background: transparent;
27
28
  accent-color: var(--icen-token-accent);
28
29
  cursor: pointer;
@@ -39,32 +40,42 @@
39
40
  height: 11px;
40
41
  margin-top: -4px;
41
42
  border-radius: 50%;
42
- background: var(--icen-token-bg);
43
+ background: var(--icen-token-surface);
43
44
  border: 1.5px solid var(--icen-token-text-muted);
44
- transition: border-color 0.16s ease-out;
45
+ transition: border-color var(--icen-tx-fast), background-color var(--icen-tx-fast);
45
46
  }
46
47
  .icen-kb-range:hover:not(:disabled)::-webkit-slider-thumb {
47
48
  border-color: var(--icen-token-text);
48
49
  }
50
+ .icen-kb-range:active:not(:disabled)::-webkit-slider-thumb {
51
+ border-color: var(--icen-token-accent-strong);
52
+ }
49
53
  .icen-kb-range::-moz-range-track {
50
54
  height: 3px;
51
55
  border-radius: 2px; /* guard:allow-radius 微构件(bar/dot/track/指示器等图形级,不属容器圆角面) */
52
56
  background: var(--icen-token-line-soft);
53
57
  }
54
58
  .icen-kb-range::-moz-range-thumb {
55
- width: 9px;
56
- height: 9px;
59
+ width: 11px;
60
+ height: 11px;
57
61
  border-radius: 50%;
58
- background: var(--icen-token-bg);
62
+ background: var(--icen-token-surface);
59
63
  border: 1.5px solid var(--icen-token-text-muted);
64
+ transition: border-color var(--icen-tx-fast), background-color var(--icen-tx-fast);
65
+ }
66
+ .icen-kb-range:hover:not(:disabled)::-moz-range-thumb {
67
+ border-color: var(--icen-token-text);
68
+ }
69
+ .icen-kb-range:active:not(:disabled)::-moz-range-thumb {
70
+ border-color: var(--icen-token-accent-strong);
60
71
  }
61
72
  .icen-kb-range:disabled {
62
- opacity: 0.45;
73
+ opacity: var(--icen-disabled-opacity);
63
74
  cursor: not-allowed;
64
75
  }
65
76
  .icen-kb-range:focus-visible {
66
- outline: 2px solid var(--icen-token-accent);
67
- outline-offset: 2px;
77
+ outline: none;
78
+ box-shadow: var(--icen-ring);
68
79
  }
69
80
 
70
81
  /* 开关(重排 / 重排对比):中性色——accent 留给运行钮 */
@@ -78,30 +89,56 @@
78
89
  border: 1px solid var(--icen-token-line-soft);
79
90
  background: var(--icen-token-bg-soft);
80
91
  cursor: pointer;
81
- transition: background-color 0.16s ease-out, border-color 0.16s ease-out;
92
+ transition: background-color var(--icen-tx-fast), border-color var(--icen-tx-fast);
93
+ }
94
+ /* 视觉尺寸保持 30×17,命中区扩到 36×27(WCAG 2.5.8 下限),不改变排版占位 */
95
+ .icen-kb-switch::before {
96
+ content: '';
97
+ position: absolute;
98
+ inset: -5px -3px;
99
+ border-radius: var(--icen-radius-full);
82
100
  }
83
101
  .icen-kb-switch::after {
84
102
  content: '';
85
103
  position: absolute;
86
104
  top: 2px;
87
- left: 2px; /* guard:allow-physical 开关是物理隐喻控件(Material 惯例:RTL 下方向保持物理,不镜像) */
105
+ left: 2px; /* guard:allow-physical 开关是物理隐喻控件(RTL 下方向保持物理,不镜像) */
88
106
  width: 11px;
89
107
  height: 11px;
90
108
  border-radius: 50%;
91
- background: var(--icen-token-text-faint);
92
- transition: transform 0.16s ease-out, background-color 0.16s ease-out;
109
+ background: var(--icen-token-text-muted);
110
+ transition: transform var(--icen-tx-fast), background-color var(--icen-tx-fast);
111
+ }
112
+ .icen-kb-switch:hover:not(:disabled):not([aria-checked='true']) {
113
+ background: var(--icen-token-fill-hover);
114
+ border-color: var(--icen-token-line);
115
+ }
116
+ .icen-kb-switch:active:not(:disabled):not([aria-checked='true']) {
117
+ background: var(--icen-token-fill-pressed);
93
118
  }
94
119
  .icen-kb-switch[aria-checked='true'] {
95
- background: color-mix(in srgb, var(--icen-token-text) 10%, transparent);
120
+ background: color-mix(in srgb, var(--icen-token-text) 12%, transparent);
96
121
  border-color: var(--icen-token-line);
97
122
  }
123
+ .icen-kb-switch[aria-checked='true']:hover:not(:disabled) {
124
+ background: color-mix(in srgb, var(--icen-token-text) 16%, transparent);
125
+ border-color: var(--icen-token-line-strong);
126
+ }
127
+ .icen-kb-switch[aria-checked='true']:active:not(:disabled) {
128
+ background: color-mix(in srgb, var(--icen-token-text) 20%, transparent);
129
+ }
98
130
  .icen-kb-switch[aria-checked='true']::after {
99
131
  transform: translateX(13px); /* guard:allow-physical translateX 位移属物理动画语义(开关不随 RTL 镜像) */
100
132
  background: var(--icen-token-text);
101
133
  }
134
+ .icen-kb-switch:disabled {
135
+ opacity: var(--icen-disabled-opacity);
136
+ cursor: not-allowed;
137
+ pointer-events: none;
138
+ }
102
139
  .icen-kb-switch:focus-visible {
103
- outline: 2px solid var(--icen-token-accent);
104
- outline-offset: 2px;
140
+ outline: none;
141
+ box-shadow: var(--icen-ring);
105
142
  }
106
143
  .icen-kb-toggle {
107
144
  display: inline-flex;
@@ -109,7 +146,7 @@
109
146
  gap: 6px;
110
147
  }
111
148
  .icen-kb-toggle-label {
112
- font-size: 12px;
149
+ font-size: var(--icen-density-font-size-xs);
113
150
  color: var(--icen-token-text-muted);
114
151
  }
115
152
 
@@ -118,27 +155,35 @@
118
155
  display: inline-flex;
119
156
  align-items: center;
120
157
  gap: 6px;
121
- height: 28px;
122
- padding: 0 14px;
158
+ height: var(--icen-density-item-height);
159
+ padding: 0 12px;
123
160
  font: inherit;
124
- font-size: 12.5px;
161
+ font-size: var(--icen-density-font-size-md);
125
162
  font-weight: 600;
126
- letter-spacing: 0.02em;
163
+ letter-spacing: var(--icen-letter-spacing-control);
127
164
  color: var(--icen-token-on-accent);
128
165
  background: var(--icen-token-accent-strong);
129
- border: 1px solid var(--icen-token-accent);
130
- border-radius: var(--icen-radius-sm);
166
+ border: 1px solid var(--icen-token-accent-strong);
167
+ border-radius: var(--icen-control-radius);
131
168
  cursor: pointer;
132
- transition: background-color 0.16s ease-out, border-color 0.16s ease-out, opacity 0.16s ease-out;
169
+ transition: background-color var(--icen-tx-fast), border-color var(--icen-tx-fast), opacity var(--icen-tx-fast);
133
170
  }
134
171
  .icen-kb-run svg {
135
- width: 12px;
136
- height: 12px;
172
+ width: 14px;
173
+ height: 14px;
137
174
  }
138
175
  .icen-kb-run:hover:not(:disabled) {
139
176
  background: var(--icen-token-accent-deep);
140
177
  border-color: var(--icen-token-accent-deep);
141
178
  }
179
+ .icen-kb-run:active:not(:disabled) {
180
+ background: color-mix(in srgb, var(--icen-token-accent-deep) 88%, var(--icen-token-text));
181
+ border-color: color-mix(in srgb, var(--icen-token-accent-deep) 88%, var(--icen-token-text));
182
+ }
183
+ .icen-kb-run:focus-visible {
184
+ outline: none;
185
+ box-shadow: var(--icen-ring);
186
+ }
142
187
  .icen-kb-run:disabled {
143
188
  opacity: var(--icen-disabled-opacity);
144
189
  cursor: not-allowed;
@@ -153,27 +198,42 @@
153
198
  display: inline-flex;
154
199
  align-items: center;
155
200
  justify-content: center;
201
+ gap: 4px;
156
202
  width: 24px;
157
203
  height: 24px;
158
204
  padding: 0;
159
205
  font: inherit;
160
- font-size: 12.5px;
206
+ font-size: var(--icen-density-font-size-xs);
161
207
  line-height: 1;
162
208
  color: var(--icen-token-text-muted);
163
209
  background: transparent;
164
210
  border: 1px solid transparent;
165
211
  border-radius: var(--icen-radius-sm);
166
212
  cursor: pointer;
167
- transition: color 0.16s ease-out, background-color 0.16s ease-out, border-color 0.16s ease-out;
213
+ transition: color var(--icen-tx-fast), background-color var(--icen-tx-fast), border-color var(--icen-tx-fast);
168
214
  }
169
215
  .icen-kb-params-copy:hover,
170
216
  .icen-kb-filter-act:hover:not(:disabled),
171
217
  .icen-kb-hittest-pin:hover,
172
218
  .icen-kb-hittest-remove:hover {
173
219
  color: var(--icen-token-text);
174
- background: var(--icen-token-bg-soft);
220
+ background: var(--icen-token-fill-hover);
175
221
  border-color: var(--icen-token-line-soft);
176
222
  }
223
+ .icen-kb-params-copy:active,
224
+ .icen-kb-filter-act:active:not(:disabled),
225
+ .icen-kb-hittest-pin:active,
226
+ .icen-kb-hittest-remove:active {
227
+ background: var(--icen-token-fill-pressed);
228
+ border-color: var(--icen-token-line);
229
+ }
230
+ .icen-kb-params-copy:focus-visible,
231
+ .icen-kb-filter-act:focus-visible,
232
+ .icen-kb-hittest-pin:focus-visible,
233
+ .icen-kb-hittest-remove:focus-visible {
234
+ outline: none;
235
+ box-shadow: var(--icen-ring);
236
+ }
177
237
  .icen-kb-filter-act:disabled {
178
238
  opacity: var(--icen-disabled-opacity);
179
239
  cursor: not-allowed;
@@ -181,24 +241,27 @@
181
241
  .icen-kb-filter-act.is-danger:hover:not(:disabled),
182
242
  .icen-kb-hittest-remove:hover {
183
243
  color: var(--icen-token-error);
244
+ background: var(--icen-token-error-muted);
245
+ border-color: color-mix(in srgb, var(--icen-token-error) 38%, transparent);
184
246
  }
185
247
  .icen-kb-params-copy.is-copied,
186
248
  .icen-kb-filter-dsl-copy.is-copied {
187
249
  color: var(--icen-token-success);
188
250
  }
189
251
  .icen-kb-params-copy {
190
- width: 22px;
191
- height: 22px;
252
+ width: 24px; /* WCAG 2.5.8 下限(22 → 24) */
253
+ height: 24px;
192
254
  }
193
255
  .icen-kb-params-copy svg {
194
- width: 12px;
195
- height: 12px;
256
+ width: 13px;
257
+ height: 13px;
196
258
  }
197
259
 
198
260
  /* scoreKind 微型 chip(retrieval hit / rerank 列头共用) */
199
261
  .icen-kb-chip--kind {
200
- font-size: 10px;
201
- padding: 1px 6px;
262
+ font-size: var(--icen-density-font-size-xs);
263
+ letter-spacing: 0.01em;
264
+ padding: 0 6px;
202
265
  color: var(--icen-token-text-faint);
203
266
  }
204
267
 
@@ -214,7 +277,7 @@
214
277
  display: flex;
215
278
  flex-wrap: wrap;
216
279
  align-items: center;
217
- gap: 10px 14px;
280
+ gap: 10px 12px;
218
281
  }
219
282
 
220
283
  .icen-kb-retrieval-query {
@@ -228,64 +291,81 @@
228
291
  align-items: center;
229
292
  gap: 2px;
230
293
  box-sizing: border-box;
231
- height: 28px;
232
- padding: 2px;
294
+ height: var(--icen-density-item-height);
295
+ padding: 1px;
233
296
  background: var(--icen-token-bg-soft);
234
297
  border: 1px solid var(--icen-token-line-soft);
235
298
  border-radius: var(--icen-radius-sm);
236
299
  }
237
300
  .icen-kb-mode-item {
238
- height: 22px;
301
+ height: 24px;
239
302
  padding: 0 10px;
240
303
  font: inherit;
241
- font-size: 12px;
304
+ font-size: var(--icen-density-font-size-md);
305
+ font-weight: 500;
242
306
  line-height: 1;
243
307
  color: var(--icen-token-text-muted);
244
308
  background: transparent;
245
309
  border: none;
246
- border-radius: 4px; /* guard:allow-radius 微构件(bar/dot/track/指示器等图形级,不属容器圆角面) */
310
+ border-radius: max(0px, calc(var(--icen-radius-sm) - 2px));
247
311
  cursor: pointer;
248
- transition: color 0.16s ease-out, background-color 0.16s ease-out;
312
+ transition: color var(--icen-tx-fast), background-color var(--icen-tx-fast), box-shadow var(--icen-tx-fast);
249
313
  }
250
- .icen-kb-mode-item:hover {
314
+ .icen-kb-mode-item:hover:not(.is-active) {
251
315
  color: var(--icen-token-text);
316
+ background: var(--icen-token-fill-hover);
317
+ }
318
+ .icen-kb-mode-item:active:not(.is-active) {
319
+ background: var(--icen-token-fill-pressed);
252
320
  }
253
321
  .icen-kb-mode-item.is-active {
254
- background: var(--icen-token-bg);
322
+ background: var(--icen-token-surface-raised);
255
323
  color: var(--icen-token-text);
256
- font-weight: 600;
257
- box-shadow: var(--icen-token-shadow-inset);
324
+ box-shadow: var(--icen-token-shadow-control);
258
325
  }
259
326
  .icen-kb-mode-item:focus-visible {
260
- outline: 2px solid var(--icen-token-accent);
261
- outline-offset: -2px;
327
+ outline: none;
328
+ box-shadow: var(--icen-ring);
262
329
  }
263
330
 
264
331
  /* topK 步进器 */
265
332
  .icen-kb-step {
266
333
  display: inline-flex;
267
334
  align-items: center;
268
- height: 28px;
335
+ height: var(--icen-density-item-height);
269
336
  overflow: hidden;
270
337
  background: var(--icen-token-bg);
271
338
  border: 1px solid var(--icen-token-line-soft);
272
339
  border-radius: var(--icen-radius-sm);
340
+ transition: box-shadow var(--icen-tx-fast);
341
+ }
342
+ .icen-kb-step:has(.icen-kb-step-btn:focus-visible) {
343
+ box-shadow: var(--icen-ring);
273
344
  }
274
345
  .icen-kb-step-btn {
275
346
  width: 26px;
276
347
  height: 100%;
277
348
  font: inherit;
278
- font-size: 13px;
349
+ font-size: var(--icen-density-font-size-md);
350
+ font-weight: 500;
351
+ line-height: 1;
352
+ font-variant-numeric: tabular-nums;
279
353
  color: var(--icen-token-text-muted);
280
354
  background: transparent;
281
355
  border: none;
282
356
  cursor: pointer;
283
- transition: background-color 0.16s ease-out, color 0.16s ease-out;
357
+ transition: background-color var(--icen-tx-fast), color var(--icen-tx-fast);
284
358
  }
285
359
  .icen-kb-step-btn:hover:not(:disabled) {
286
- background: var(--icen-token-bg-soft);
360
+ background: var(--icen-token-fill-hover);
287
361
  color: var(--icen-token-text);
288
362
  }
363
+ .icen-kb-step-btn:active:not(:disabled) {
364
+ background: var(--icen-token-fill-pressed);
365
+ }
366
+ .icen-kb-step-btn:focus-visible {
367
+ outline: none;
368
+ }
289
369
  .icen-kb-step-btn:disabled {
290
370
  opacity: var(--icen-disabled-opacity);
291
371
  cursor: not-allowed;
@@ -300,16 +380,17 @@
300
380
  display: inline-flex;
301
381
  align-items: center;
302
382
  gap: 6px;
303
- height: 28px;
383
+ height: var(--icen-density-item-height);
304
384
  }
305
385
  .icen-kb-alpha-end {
306
- font-size: 10.5px;
386
+ font-size: var(--icen-density-font-size-xs);
387
+ line-height: 1.4;
307
388
  color: var(--icen-token-text-faint);
308
389
  cursor: help;
309
390
  white-space: nowrap;
310
391
  }
311
392
  .icen-kb-alpha.is-off {
312
- opacity: 0.55;
393
+ opacity: var(--icen-disabled-opacity);
313
394
  }
314
395
 
315
396
  /* 阈值 + 存活计数:rerank 关闭时 N/A(显式禁用不隐藏) */
@@ -317,7 +398,7 @@
317
398
  display: inline-flex;
318
399
  align-items: center;
319
400
  gap: 6px;
320
- height: 28px;
401
+ height: var(--icen-density-item-height);
321
402
  }
322
403
  .icen-kb-threshold-count {
323
404
  min-width: 150px;
@@ -357,7 +438,7 @@
357
438
  .icen-kb-hits {
358
439
  display: flex;
359
440
  flex-direction: column;
360
- gap: 4px;
441
+ gap: 6px;
361
442
  }
362
443
  .icen-kb-hit {
363
444
  display: grid;
@@ -365,14 +446,14 @@
365
446
  gap: 10px;
366
447
  padding: 8px 10px;
367
448
  background: var(--icen-token-bg-soft);
368
- border: 1px solid transparent;
449
+ border: 1px solid var(--icen-token-line-soft);
369
450
  border-radius: var(--icen-radius-md);
370
- transition: border-color 0.16s ease-out, box-shadow 0.16s ease-out;
451
+ transition: border-color var(--icen-tx-fast), box-shadow var(--icen-tx-fast);
371
452
  }
372
453
  /* hover 阴影抬升仅可悬停设备生效(触屏关闭,AGENTS 动效守卫) */
373
454
  @media (hover: hover) and (pointer: fine) {
374
455
  .icen-kb-hit:hover {
375
- border-color: var(--icen-token-line-soft);
456
+ border-color: var(--icen-token-line);
376
457
  box-shadow: var(--icen-token-shadow-card);
377
458
  }
378
459
  }
@@ -380,18 +461,21 @@
380
461
  width: 28px;
381
462
  padding-top: 1px;
382
463
  text-align: right; /* guard:allow-physical rank 是数字(LTR 文种),物理右对齐惯例,RTL 不镜像 */
383
- font-size: 12px;
464
+ font-size: var(--icen-density-font-size-xs);
465
+ line-height: 1.5;
384
466
  color: var(--icen-token-text-faint);
385
467
  }
386
468
  .icen-kb-hit-main {
387
469
  display: flex;
388
470
  flex-direction: column;
389
- gap: 3px;
471
+ gap: 4px;
390
472
  min-inline-size: 0;
391
473
  }
392
474
  .icen-kb-hit-title {
393
- font-size: 13px;
475
+ font-size: var(--icen-density-font-size-md);
394
476
  font-weight: 500;
477
+ line-height: 1.4;
478
+ letter-spacing: var(--icen-letter-spacing-control);
395
479
  color: var(--icen-token-text);
396
480
  white-space: nowrap;
397
481
  overflow: hidden;
@@ -402,8 +486,8 @@
402
486
  -webkit-box-orient: vertical;
403
487
  -webkit-line-clamp: 2;
404
488
  overflow: hidden;
405
- font-size: 12.5px;
406
- line-height: 1.65;
489
+ font-size: var(--icen-density-font-size-md);
490
+ line-height: 1.7;
407
491
  color: var(--icen-token-text-muted);
408
492
  }
409
493
  /* 多命中分色轮转(补 kb-quote 的 data-icen-hit 轮转到 .icen-kb-hit mark) */
@@ -416,7 +500,7 @@
416
500
  .icen-kb-hit-meta {
417
501
  display: flex;
418
502
  flex-wrap: wrap;
419
- gap: 4px;
503
+ gap: 6px;
420
504
  }
421
505
  .icen-kb-hit-meta:empty {
422
506
  display: none;
@@ -425,7 +509,7 @@
425
509
  display: flex;
426
510
  flex-direction: column;
427
511
  align-items: flex-end;
428
- gap: 4px;
512
+ gap: 6px;
429
513
  }
430
514
 
431
515
  /* 分数拆解:vectorPart/keywordPart 微型双段条(向量=accent / 关键词=info) */
@@ -471,25 +555,37 @@
471
555
  display: flex;
472
556
  flex-direction: column;
473
557
  align-items: flex-end;
474
- gap: 3px;
558
+ gap: 4px;
475
559
  }
476
560
  .icen-kb-hit-explain-toggle {
477
- padding: 0;
561
+ display: inline-flex;
562
+ align-items: center;
563
+ justify-content: center;
564
+ padding: 0 4px;
478
565
  font: inherit;
479
- font-size: 10.5px;
566
+ font-size: var(--icen-density-font-size-xs);
567
+ line-height: 1;
480
568
  color: var(--icen-token-text-faint);
481
569
  background: transparent;
482
570
  border: none;
571
+ border-radius: var(--icen-radius-xs);
483
572
  cursor: pointer;
573
+ min-inline-size: 24px; /* WCAG 2.5.8 下限 */
574
+ min-block-size: 24px;
575
+ transition: color var(--icen-tx-fast);
484
576
  }
485
577
  .icen-kb-hit-explain-toggle:hover {
486
578
  color: var(--icen-token-text-muted);
487
579
  text-decoration: underline;
488
580
  }
581
+ .icen-kb-hit-explain-toggle:focus-visible {
582
+ outline: none;
583
+ box-shadow: var(--icen-ring);
584
+ }
489
585
  .icen-kb-hit-explain {
490
586
  max-inline-size: 320px;
491
- font-size: 10.5px;
492
- line-height: 1.6;
587
+ font-size: var(--icen-density-font-size-xs);
588
+ line-height: 1.65;
493
589
  text-align: end;
494
590
  white-space: normal;
495
591
  word-break: break-all;
@@ -513,7 +609,7 @@
513
609
 
514
610
  /* 组:嵌套组缩进 16px + 连接线(body 起始缘竖线 + rule 行横线,RTL 镜像) */
515
611
  .icen-kb-filter-group {
516
- padding: 8px;
612
+ padding: 8px 10px;
517
613
  border: 1px solid var(--icen-token-line-soft);
518
614
  border-radius: var(--icen-radius-md);
519
615
  }
@@ -523,26 +619,35 @@
523
619
  .icen-kb-filter-head {
524
620
  display: flex;
525
621
  align-items: center;
526
- gap: 6px;
527
- margin-bottom: 6px;
622
+ gap: 8px;
623
+ min-height: var(--icen-density-item-height);
624
+ margin-bottom: 8px;
528
625
  }
529
626
  .icen-kb-filter-op-toggle {
530
- height: 24px;
531
- padding: 0 10px;
627
+ height: var(--icen-density-item-height);
628
+ padding: 0 12px;
532
629
  font-family: var(--icen-font-mono);
533
- font-size: 11px;
534
- letter-spacing: 0.5px;
630
+ font-size: var(--icen-density-font-size-xs);
631
+ letter-spacing: .3px;
535
632
  color: var(--icen-token-text-muted);
536
633
  background: var(--icen-token-bg);
537
634
  border: 1px solid var(--icen-token-line-soft);
538
635
  border-radius: var(--icen-radius-sm);
539
636
  cursor: pointer;
540
- transition: color 0.16s ease-out, border-color 0.16s ease-out;
637
+ transition: color var(--icen-tx-fast), background-color var(--icen-tx-fast), border-color var(--icen-tx-fast);
541
638
  }
542
639
  .icen-kb-filter-op-toggle:hover {
543
640
  color: var(--icen-token-text);
641
+ background: var(--icen-token-fill-hover);
544
642
  border-color: var(--icen-token-line);
545
643
  }
644
+ .icen-kb-filter-op-toggle:active {
645
+ background: var(--icen-token-fill-pressed);
646
+ }
647
+ .icen-kb-filter-op-toggle:focus-visible {
648
+ outline: none;
649
+ box-shadow: var(--icen-ring);
650
+ }
546
651
  .icen-kb-filter-op-toggle.is-or {
547
652
  font-weight: 600;
548
653
  color: var(--icen-token-text);
@@ -550,6 +655,7 @@
550
655
  .icen-kb-filter-head .icen-kb-filter-act {
551
656
  padding: 0 8px;
552
657
  width: auto;
658
+ height: var(--icen-density-item-height);
553
659
  }
554
660
 
555
661
  .icen-kb-filter-body {
@@ -567,6 +673,7 @@
567
673
  flex-wrap: wrap; /* 窄栏兜底:值输入挤不下时独占次行全宽,日期串不截字 */
568
674
  align-items: center;
569
675
  gap: 6px;
676
+ min-height: var(--icen-density-item-height);
570
677
  }
571
678
  /* rule → 组竖线的横向连接线(竖线沿 inline-start,RTL 镜像) */
572
679
  .icen-kb-filter-rule::before {
@@ -600,8 +707,8 @@
600
707
  .icen-kb-filter-dsl {
601
708
  display: flex;
602
709
  flex-direction: column;
603
- gap: 5px;
604
- padding: 6px 8px;
710
+ gap: 6px;
711
+ padding: 8px;
605
712
  background: var(--icen-token-bg-soft);
606
713
  border: 1px solid var(--icen-token-line-soft);
607
714
  border-radius: var(--icen-radius-md);
@@ -609,39 +716,49 @@
609
716
  .icen-kb-filter-dsl-bar {
610
717
  display: flex;
611
718
  align-items: center;
612
- gap: 4px;
719
+ gap: 6px;
613
720
  }
614
721
  .icen-kb-filter-dsl-tab {
615
- height: 22px;
616
- padding: 0 10px;
722
+ height: 24px;
723
+ padding: 0 8px;
617
724
  font-family: var(--icen-font-mono);
618
- font-size: 11px;
725
+ font-size: var(--icen-density-font-size-xs);
619
726
  color: var(--icen-token-text-faint);
620
727
  background: transparent;
621
728
  border: 1px solid transparent;
622
729
  border-radius: var(--icen-radius-sm);
623
730
  cursor: pointer;
624
- transition: color 0.16s ease-out, background-color 0.16s ease-out, border-color 0.16s ease-out;
731
+ transition: color var(--icen-tx-fast), background-color var(--icen-tx-fast), border-color var(--icen-tx-fast);
625
732
  }
626
733
  .icen-kb-filter-dsl-tab:hover {
627
734
  color: var(--icen-token-text-muted);
735
+ background: var(--icen-token-fill-hover);
736
+ }
737
+ .icen-kb-filter-dsl-tab:active {
738
+ background: var(--icen-token-fill-pressed);
628
739
  }
629
740
  .icen-kb-filter-dsl-tab.is-active {
630
741
  color: var(--icen-token-text);
631
742
  background: var(--icen-token-bg);
632
743
  border-color: var(--icen-token-line-soft);
633
744
  }
745
+ .icen-kb-filter-dsl-tab:focus-visible {
746
+ outline: none;
747
+ box-shadow: var(--icen-ring);
748
+ }
634
749
  .icen-kb-filter-dsl-copy {
635
750
  margin-inline-start: auto;
636
751
  width: auto;
637
752
  padding: 0 8px;
638
- font-size: 11px;
753
+ font-size: var(--icen-density-font-size-xs);
639
754
  }
640
755
  .icen-kb-filter-dsl-text {
641
756
  display: block;
642
757
  max-block-size: 110px;
643
758
  overflow: auto;
644
- line-height: 1.6;
759
+ font-size: var(--icen-density-font-size-xs);
760
+ line-height: 1.65;
761
+ color: var(--icen-token-text-muted);
645
762
  /* DSL 镜像(Mongo/OData):mono + 不换行不断词,横向滚动兜底 */
646
763
  white-space: pre;
647
764
  word-break: normal;
@@ -662,6 +779,7 @@
662
779
  display: flex;
663
780
  align-items: center;
664
781
  gap: 8px;
782
+ min-height: var(--icen-density-item-height);
665
783
  }
666
784
  .icen-kb-rerank-switch-label {
667
785
  margin-inline-start: auto;
@@ -681,9 +799,11 @@
681
799
  display: flex;
682
800
  align-items: center;
683
801
  gap: 6px;
684
- min-height: 26px;
802
+ min-height: var(--icen-density-item-height);
685
803
  padding: 0 8px;
686
- font-size: 11.5px;
804
+ font-size: var(--icen-density-font-size-xs);
805
+ font-weight: 500;
806
+ letter-spacing: .3px;
687
807
  color: var(--icen-token-text-muted);
688
808
  border-bottom: 1px solid var(--icen-token-line-soft);
689
809
  }
@@ -696,16 +816,16 @@
696
816
  display: contents;
697
817
  }
698
818
  .icen-kb-rerank-row:hover > .icen-kb-rerank-col {
699
- background: var(--icen-token-bg-soft);
819
+ background: var(--icen-token-fill-hover);
700
820
  }
701
821
  .icen-kb-rerank-col {
702
822
  display: flex;
703
823
  align-items: center;
704
824
  gap: 8px;
705
- min-height: 32px;
706
- padding: 3px 8px;
825
+ min-height: var(--icen-density-item-height);
826
+ padding: 2px 8px;
707
827
  border-radius: var(--icen-radius-sm);
708
- transition: background-color 0.16s ease-out;
828
+ transition: background-color var(--icen-tx-fast);
709
829
  }
710
830
  .icen-kb-rerank-col.is-missing {
711
831
  /* 落选列不降透明(透明会被 axe 算进对比度):落选语义由 muted 文案承担 */
@@ -714,20 +834,23 @@
714
834
  flex: 0 0 auto;
715
835
  width: 18px;
716
836
  text-align: right; /* guard:allow-physical rank 是数字(LTR 文种),物理右对齐惯例,RTL 不镜像 */
717
- font-size: 11.5px;
837
+ font-size: var(--icen-density-font-size-xs);
838
+ line-height: 1.5;
839
+ color: var(--icen-token-text-faint);
718
840
  }
719
841
  .icen-kb-rerank-title {
720
842
  flex: 1 1 auto;
721
843
  min-inline-size: 0;
722
844
  overflow: hidden;
723
- font-size: 12.5px;
845
+ font-size: var(--icen-density-font-size-md);
846
+ line-height: 1.4;
724
847
  color: var(--icen-token-text);
725
848
  white-space: nowrap;
726
849
  text-overflow: ellipsis;
727
850
  }
728
851
  .icen-kb-rerank-missing {
729
852
  flex: 1 1 auto;
730
- font-size: 11px;
853
+ font-size: var(--icen-density-font-size-xs);
731
854
  color: var(--icen-token-text-muted);
732
855
  }
733
856
  /* delta 箭头:上升绿 / 下降红 / 持平或单侧缺失 — */
@@ -737,7 +860,8 @@
737
860
  justify-content: center;
738
861
  font-family: var(--icen-font-mono);
739
862
  font-variant-numeric: tabular-nums;
740
- font-size: 11.5px;
863
+ font-size: var(--icen-density-font-size-xs);
864
+ letter-spacing: .01em;
741
865
  color: var(--icen-token-text-faint);
742
866
  }
743
867
  .icen-kb-rerank-delta.is-up {
@@ -750,7 +874,7 @@
750
874
  }
751
875
  /* 开关关闭:重排后列压淡(显式禁用不隐藏) */
752
876
  .icen-kb-rerank.is-off .icen-kb-rerank-col--after {
753
- opacity: 0.45;
877
+ opacity: var(--icen-disabled-opacity);
754
878
  }
755
879
 
756
880
  /* ══════════════ 4. kb-hittest 召回测试集 ══════════════ */
@@ -769,7 +893,7 @@
769
893
  display: flex;
770
894
  flex-wrap: wrap;
771
895
  align-items: center;
772
- gap: 20px;
896
+ gap: 16px;
773
897
  padding: 10px 12px;
774
898
  background: var(--icen-token-bg-soft);
775
899
  border: 1px solid var(--icen-token-line-soft);
@@ -781,13 +905,16 @@
781
905
  gap: 6px;
782
906
  }
783
907
  .icen-kb-hittest-stat-label {
784
- font-size: 10.5px;
785
- letter-spacing: 0.3px;
908
+ font-size: var(--icen-density-font-size-xs);
909
+ letter-spacing: .3px;
786
910
  color: var(--icen-token-text-faint);
787
911
  }
788
912
  .icen-kb-hittest-hitrate {
789
913
  font-size: 22px;
790
914
  font-weight: 600;
915
+ line-height: 1.1;
916
+ letter-spacing: -.01em;
917
+ font-variant-numeric: tabular-nums;
791
918
  color: var(--icen-token-text);
792
919
  }
793
920
  .icen-kb-hittest-stats .icen-kb-badge {
@@ -805,17 +932,22 @@
805
932
  grid-template-columns: 24px minmax(0, 1fr) auto 28px 24px;
806
933
  gap: 8px;
807
934
  align-items: center;
808
- min-height: 30px;
809
- padding: 3px 8px;
935
+ min-height: var(--icen-density-item-height);
936
+ padding: 2px 8px;
810
937
  border-radius: var(--icen-radius-sm);
938
+ transition: background-color var(--icen-tx-fast);
811
939
  }
812
940
  .icen-kb-hittest-row:hover {
813
- background: var(--icen-token-bg-soft);
941
+ background: var(--icen-token-fill-hover);
814
942
  }
815
943
  .icen-kb-hittest-pin svg {
816
944
  width: 13px;
817
945
  height: 13px;
818
946
  opacity: 0.55;
947
+ transition: opacity var(--icen-tx-fast);
948
+ }
949
+ .icen-kb-hittest-row:hover .icen-kb-hittest-pin svg {
950
+ opacity: 0.8;
819
951
  }
820
952
  .icen-kb-hittest-pin.is-pinned {
821
953
  color: var(--icen-token-text);
@@ -825,7 +957,8 @@
825
957
  }
826
958
  .icen-kb-hittest-q {
827
959
  overflow: hidden;
828
- font-size: 13px;
960
+ font-size: var(--icen-density-font-size-md);
961
+ line-height: 1.5;
829
962
  color: var(--icen-token-text);
830
963
  white-space: nowrap;
831
964
  text-overflow: ellipsis;
@@ -841,6 +974,8 @@
841
974
  width: 28px;
842
975
  text-align: center;
843
976
  font-weight: 600;
977
+ line-height: 1.5;
978
+ font-variant-numeric: tabular-nums;
844
979
  color: var(--icen-token-text-faint);
845
980
  }
846
981
  .icen-kb-hittest-row.is-pass .icen-kb-hittest-result {
@@ -851,6 +986,7 @@
851
986
  }
852
987
  .icen-kb-hittest-remove {
853
988
  opacity: 0;
989
+ transition: opacity var(--icen-tx-fast);
854
990
  }
855
991
  .icen-kb-hittest-row:hover .icen-kb-hittest-remove,
856
992
  .icen-kb-hittest-remove:focus-visible {
@@ -866,32 +1002,133 @@
866
1002
  flex: 1 1 auto;
867
1003
  }
868
1004
  .icen-kb-hittest-add-btn {
869
- height: 28px;
1005
+ height: var(--icen-density-item-height);
870
1006
  padding: 0 12px;
871
1007
  font: inherit;
872
- font-size: 12.5px;
1008
+ font-size: var(--icen-density-font-size-md);
1009
+ font-weight: 500;
873
1010
  color: var(--icen-token-text-muted);
874
1011
  background: var(--icen-token-bg);
875
1012
  border: 1px solid var(--icen-token-line-soft);
876
1013
  border-radius: var(--icen-radius-sm);
877
1014
  cursor: pointer;
878
- transition: color 0.16s ease-out, border-color 0.16s ease-out;
1015
+ transition: color var(--icen-tx-fast), background-color var(--icen-tx-fast), border-color var(--icen-tx-fast);
879
1016
  }
880
- .icen-kb-hittest-add-btn:hover {
1017
+ .icen-kb-hittest-add-btn:hover:not(:disabled) {
881
1018
  color: var(--icen-token-text);
1019
+ background: var(--icen-token-fill-hover);
882
1020
  border-color: var(--icen-token-line);
883
1021
  }
1022
+ .icen-kb-hittest-add-btn:active:not(:disabled) {
1023
+ background: var(--icen-token-fill-pressed);
1024
+ }
1025
+ .icen-kb-hittest-add-btn:focus-visible {
1026
+ outline: none;
1027
+ box-shadow: var(--icen-ring);
1028
+ }
1029
+ .icen-kb-hittest-add-btn:disabled {
1030
+ opacity: var(--icen-disabled-opacity);
1031
+ cursor: not-allowed;
1032
+ }
884
1033
 
885
1034
  /* ══════════════ 5. 密度档(spec §2:compact 行高收紧) ══════════════ */
886
1035
 
887
1036
  [data-icen-density='compact'] .icen-kb-hit {
888
- padding: 5px 8px;
1037
+ padding: 6px 8px;
1038
+ gap: 8px;
889
1039
  }
890
1040
  [data-icen-density='compact'] .icen-kb-hittest-row {
891
- min-height: 24px;
1041
+ min-height: var(--icen-density-item-height);
892
1042
  }
893
1043
  [data-icen-density='compact'] .icen-kb-rerank-col {
894
- min-height: 26px;
1044
+ min-height: var(--icen-density-item-height);
1045
+ }
1046
+ [data-icen-density='compact'] .icen-kb-hittest-stats {
1047
+ gap: 12px;
1048
+ padding: 8px 10px;
1049
+ }
1050
+ [data-icen-density='compact'] .icen-kb-filter-group {
1051
+ padding: 6px 8px;
1052
+ }
1053
+ [data-icen-density='compact'] .icen-kb-filter-head {
1054
+ margin-bottom: 6px;
1055
+ }
1056
+ [data-icen-density='compact'] .icen-kb-filter-dsl {
1057
+ padding: 6px;
1058
+ }
1059
+
1060
+ /* ══════════════ 6. 高对比模式(forced-colors) ══════════════
1061
+ 自绘控件不能只靠底色/阴影区分状态:补边框与系统色,焦点改用 Highlight 轮廓。 */
1062
+ @media (forced-colors: active) {
1063
+ .icen-kb-switch,
1064
+ .icen-kb-filter-op-toggle,
1065
+ .icen-kb-step,
1066
+ .icen-kb-hit,
1067
+ .icen-kb-hittest-add-btn {
1068
+ border-color: CanvasText;
1069
+ }
1070
+ .icen-kb-params-copy,
1071
+ .icen-kb-filter-act,
1072
+ .icen-kb-hittest-pin,
1073
+ .icen-kb-hittest-remove {
1074
+ border-color: CanvasText;
1075
+ }
1076
+ .icen-kb-hittest-remove {
1077
+ opacity: 1;
1078
+ }
1079
+ .icen-kb-switch {
1080
+ background: Canvas;
1081
+ }
1082
+ .icen-kb-switch[aria-checked='true'] {
1083
+ forced-color-adjust: none;
1084
+ background: Highlight;
1085
+ border-color: Highlight;
1086
+ }
1087
+ .icen-kb-switch[aria-checked='true']::after {
1088
+ background: HighlightText;
1089
+ }
1090
+ .icen-kb-mode-item.is-active,
1091
+ .icen-kb-filter-dsl-tab.is-active {
1092
+ forced-color-adjust: none;
1093
+ background: Highlight;
1094
+ border-color: Highlight;
1095
+ color: HighlightText;
1096
+ }
1097
+ .icen-kb-score-dual {
1098
+ outline: 1px solid CanvasText;
1099
+ outline-offset: 1px;
1100
+ }
1101
+ .icen-kb-hit:hover,
1102
+ .icen-kb-filter-op-toggle:hover {
1103
+ border-color: Highlight;
1104
+ }
1105
+ .icen-kb-rerank-delta.is-up,
1106
+ .icen-kb-rerank-delta.is-down,
1107
+ .icen-kb-hittest-row.is-pass .icen-kb-hittest-result,
1108
+ .icen-kb-hittest-row.is-fail .icen-kb-hittest-result {
1109
+ forced-color-adjust: none;
1110
+ }
1111
+ .icen-kb-range:focus-visible,
1112
+ .icen-kb-switch:focus-visible,
1113
+ .icen-kb-run:focus-visible,
1114
+ .icen-kb-params-copy:focus-visible,
1115
+ .icen-kb-filter-act:focus-visible,
1116
+ .icen-kb-hittest-pin:focus-visible,
1117
+ .icen-kb-hittest-remove:focus-visible,
1118
+ .icen-kb-mode-item:focus-visible,
1119
+ .icen-kb-hit-explain-toggle:focus-visible,
1120
+ .icen-kb-filter-op-toggle:focus-visible,
1121
+ .icen-kb-filter-dsl-tab:focus-visible,
1122
+ .icen-kb-hittest-add-btn:focus-visible {
1123
+ outline: 2px solid Highlight;
1124
+ outline-offset: 2px;
1125
+ box-shadow: none;
1126
+ }
1127
+ .icen-kb-step:has(.icen-kb-step-btn:focus-visible) {
1128
+ outline: 2px solid Highlight;
1129
+ outline-offset: 2px;
1130
+ box-shadow: none;
1131
+ }
895
1132
  }
896
1133
 
897
1134
  }