@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,897 @@
1
+ @layer icen.components {
2
+ /*
3
+ * @icen.ai/ui — kb-search.css(检索域:kb-retrieval / kb-filter / kb-rerank / kb-hittest)
4
+ * 共享原语在 kb.css(.icen-kb-score/.icen-kb-hit mark/.icen-kb-chip/.icen-kb-num/.icen-kb-badge/.icen-kb-empty…),
5
+ * 本文件只做本域专属结构。DOM 契约见 docs/spec/kb-family.md §5.11–5.14 与各 behavior 头注释。
6
+ *
7
+ * 域内纪律(spec §2):
8
+ * - 参数栏 gap 8、控件高 28;行基元 28px 节奏;组内 8px、区块 12–16px
9
+ * - accent 稀缺:每个视图唯一 accent 级操作(检索「运行」/ 测试「运行全部」);其余 ghost 24px
10
+ * - 数字一律 .icen-kb-num(mono + tabular-nums);元信息 11–11.5px faint
11
+ * - 显式禁用不隐藏(alpha 脱离混合模式 / 阈值脱离重排 / 组深度达上限 → .is-off + disabled)
12
+ * - 只用 --icen-token-* 与 kb.css 原语;动效 ≤240ms ease-out;reduced-motion 走全局规则
13
+ */
14
+
15
+ /* ══════════════ 0. 域内共享控件基元 ══════════════ */
16
+
17
+ /* Text fields share input.css; only domain widths/flex allocation are local. */
18
+
19
+ /* 滑杆(alpha 混合权重 / 分数阈值):自实现简单拖杆,input[type=range] 样式化 */
20
+ .icen-kb-range {
21
+ -webkit-appearance: none;
22
+ appearance: none;
23
+ width: 96px;
24
+ height: 28px;
25
+ margin: 0;
26
+ background: transparent;
27
+ accent-color: var(--icen-token-accent);
28
+ cursor: pointer;
29
+ }
30
+ .icen-kb-range::-webkit-slider-runnable-track {
31
+ height: 3px;
32
+ border-radius: 2px; /* guard:allow-radius 微构件(bar/dot/track/指示器等图形级,不属容器圆角面) */
33
+ background: var(--icen-token-line-soft);
34
+ }
35
+ .icen-kb-range::-webkit-slider-thumb {
36
+ -webkit-appearance: none;
37
+ appearance: none;
38
+ width: 11px;
39
+ height: 11px;
40
+ margin-top: -4px;
41
+ border-radius: 50%;
42
+ background: var(--icen-token-bg);
43
+ border: 1.5px solid var(--icen-token-text-muted);
44
+ transition: border-color 0.16s ease-out;
45
+ }
46
+ .icen-kb-range:hover:not(:disabled)::-webkit-slider-thumb {
47
+ border-color: var(--icen-token-text);
48
+ }
49
+ .icen-kb-range::-moz-range-track {
50
+ height: 3px;
51
+ border-radius: 2px; /* guard:allow-radius 微构件(bar/dot/track/指示器等图形级,不属容器圆角面) */
52
+ background: var(--icen-token-line-soft);
53
+ }
54
+ .icen-kb-range::-moz-range-thumb {
55
+ width: 9px;
56
+ height: 9px;
57
+ border-radius: 50%;
58
+ background: var(--icen-token-bg);
59
+ border: 1.5px solid var(--icen-token-text-muted);
60
+ }
61
+ .icen-kb-range:disabled {
62
+ opacity: 0.45;
63
+ cursor: not-allowed;
64
+ }
65
+ .icen-kb-range:focus-visible {
66
+ outline: 2px solid var(--icen-token-accent);
67
+ outline-offset: 2px;
68
+ }
69
+
70
+ /* 开关(重排 / 重排对比):中性色——accent 留给运行钮 */
71
+ .icen-kb-switch {
72
+ position: relative;
73
+ flex: 0 0 auto;
74
+ width: 30px;
75
+ height: 17px;
76
+ padding: 0;
77
+ border-radius: var(--icen-radius-full);
78
+ border: 1px solid var(--icen-token-line-soft);
79
+ background: var(--icen-token-bg-soft);
80
+ cursor: pointer;
81
+ transition: background-color 0.16s ease-out, border-color 0.16s ease-out;
82
+ }
83
+ .icen-kb-switch::after {
84
+ content: '';
85
+ position: absolute;
86
+ top: 2px;
87
+ left: 2px; /* guard:allow-physical 开关是物理隐喻控件(Material 惯例:RTL 下方向保持物理,不镜像) */
88
+ width: 11px;
89
+ height: 11px;
90
+ border-radius: 50%;
91
+ background: var(--icen-token-text-faint);
92
+ transition: transform 0.16s ease-out, background-color 0.16s ease-out;
93
+ }
94
+ .icen-kb-switch[aria-checked='true'] {
95
+ background: color-mix(in srgb, var(--icen-token-text) 10%, transparent);
96
+ border-color: var(--icen-token-line);
97
+ }
98
+ .icen-kb-switch[aria-checked='true']::after {
99
+ transform: translateX(13px); /* guard:allow-physical translateX 位移属物理动画语义(开关不随 RTL 镜像) */
100
+ background: var(--icen-token-text);
101
+ }
102
+ .icen-kb-switch:focus-visible {
103
+ outline: 2px solid var(--icen-token-accent);
104
+ outline-offset: 2px;
105
+ }
106
+ .icen-kb-toggle {
107
+ display: inline-flex;
108
+ align-items: center;
109
+ gap: 6px;
110
+ }
111
+ .icen-kb-toggle-label {
112
+ font-size: 12px;
113
+ color: var(--icen-token-text-muted);
114
+ }
115
+
116
+ /* 运行钮:本视图唯一 accent 级操作(btn-primary 语义,域内自持样式) */
117
+ .icen-kb-run {
118
+ display: inline-flex;
119
+ align-items: center;
120
+ gap: 6px;
121
+ height: 28px;
122
+ padding: 0 14px;
123
+ font: inherit;
124
+ font-size: 12.5px;
125
+ font-weight: 600;
126
+ letter-spacing: 0.02em;
127
+ color: var(--icen-token-on-accent);
128
+ background: var(--icen-token-accent-strong);
129
+ border: 1px solid var(--icen-token-accent);
130
+ border-radius: var(--icen-radius-sm);
131
+ cursor: pointer;
132
+ transition: background-color 0.16s ease-out, border-color 0.16s ease-out, opacity 0.16s ease-out;
133
+ }
134
+ .icen-kb-run svg {
135
+ width: 12px;
136
+ height: 12px;
137
+ }
138
+ .icen-kb-run:hover:not(:disabled) {
139
+ background: var(--icen-token-accent-deep);
140
+ border-color: var(--icen-token-accent-deep);
141
+ }
142
+ .icen-kb-run:disabled {
143
+ opacity: var(--icen-disabled-opacity);
144
+ cursor: not-allowed;
145
+ pointer-events: none;
146
+ }
147
+
148
+ /* ghost 操作钮(24px:filter 增删 / DSL 复制 / hittest pin 与删除 / 参数复制) */
149
+ .icen-kb-params-copy,
150
+ .icen-kb-filter-act,
151
+ .icen-kb-hittest-pin,
152
+ .icen-kb-hittest-remove {
153
+ display: inline-flex;
154
+ align-items: center;
155
+ justify-content: center;
156
+ width: 24px;
157
+ height: 24px;
158
+ padding: 0;
159
+ font: inherit;
160
+ font-size: 12.5px;
161
+ line-height: 1;
162
+ color: var(--icen-token-text-muted);
163
+ background: transparent;
164
+ border: 1px solid transparent;
165
+ border-radius: var(--icen-radius-sm);
166
+ cursor: pointer;
167
+ transition: color 0.16s ease-out, background-color 0.16s ease-out, border-color 0.16s ease-out;
168
+ }
169
+ .icen-kb-params-copy:hover,
170
+ .icen-kb-filter-act:hover:not(:disabled),
171
+ .icen-kb-hittest-pin:hover,
172
+ .icen-kb-hittest-remove:hover {
173
+ color: var(--icen-token-text);
174
+ background: var(--icen-token-bg-soft);
175
+ border-color: var(--icen-token-line-soft);
176
+ }
177
+ .icen-kb-filter-act:disabled {
178
+ opacity: var(--icen-disabled-opacity);
179
+ cursor: not-allowed;
180
+ }
181
+ .icen-kb-filter-act.is-danger:hover:not(:disabled),
182
+ .icen-kb-hittest-remove:hover {
183
+ color: var(--icen-token-error);
184
+ }
185
+ .icen-kb-params-copy.is-copied,
186
+ .icen-kb-filter-dsl-copy.is-copied {
187
+ color: var(--icen-token-success);
188
+ }
189
+ .icen-kb-params-copy {
190
+ width: 22px;
191
+ height: 22px;
192
+ }
193
+ .icen-kb-params-copy svg {
194
+ width: 12px;
195
+ height: 12px;
196
+ }
197
+
198
+ /* scoreKind 微型 chip(retrieval hit / rerank 列头共用) */
199
+ .icen-kb-chip--kind {
200
+ font-size: 10px;
201
+ padding: 1px 6px;
202
+ color: var(--icen-token-text-faint);
203
+ }
204
+
205
+ /* ══════════════ 1. kb-retrieval 检索 playground ══════════════ */
206
+
207
+ .icen-kb-retrieval {
208
+ display: flex;
209
+ flex-direction: column;
210
+ gap: 12px;
211
+ }
212
+
213
+ .icen-kb-retrieval-bar {
214
+ display: flex;
215
+ flex-wrap: wrap;
216
+ align-items: center;
217
+ gap: 10px 14px;
218
+ }
219
+
220
+ .icen-kb-retrieval-query {
221
+ flex: 1 1 200px;
222
+ min-width: 160px;
223
+ }
224
+
225
+ /* 模式 segmented(向量|关键词|混合):激活态用层级色,不与运行钮抢 accent */
226
+ .icen-kb-modes {
227
+ display: inline-flex;
228
+ align-items: center;
229
+ gap: 2px;
230
+ box-sizing: border-box;
231
+ height: 28px;
232
+ padding: 2px;
233
+ background: var(--icen-token-bg-soft);
234
+ border: 1px solid var(--icen-token-line-soft);
235
+ border-radius: var(--icen-radius-sm);
236
+ }
237
+ .icen-kb-mode-item {
238
+ height: 22px;
239
+ padding: 0 10px;
240
+ font: inherit;
241
+ font-size: 12px;
242
+ line-height: 1;
243
+ color: var(--icen-token-text-muted);
244
+ background: transparent;
245
+ border: none;
246
+ border-radius: 4px; /* guard:allow-radius 微构件(bar/dot/track/指示器等图形级,不属容器圆角面) */
247
+ cursor: pointer;
248
+ transition: color 0.16s ease-out, background-color 0.16s ease-out;
249
+ }
250
+ .icen-kb-mode-item:hover {
251
+ color: var(--icen-token-text);
252
+ }
253
+ .icen-kb-mode-item.is-active {
254
+ background: var(--icen-token-bg);
255
+ color: var(--icen-token-text);
256
+ font-weight: 600;
257
+ box-shadow: var(--icen-token-shadow-inset);
258
+ }
259
+ .icen-kb-mode-item:focus-visible {
260
+ outline: 2px solid var(--icen-token-accent);
261
+ outline-offset: -2px;
262
+ }
263
+
264
+ /* topK 步进器 */
265
+ .icen-kb-step {
266
+ display: inline-flex;
267
+ align-items: center;
268
+ height: 28px;
269
+ overflow: hidden;
270
+ background: var(--icen-token-bg);
271
+ border: 1px solid var(--icen-token-line-soft);
272
+ border-radius: var(--icen-radius-sm);
273
+ }
274
+ .icen-kb-step-btn {
275
+ width: 26px;
276
+ height: 100%;
277
+ font: inherit;
278
+ font-size: 13px;
279
+ color: var(--icen-token-text-muted);
280
+ background: transparent;
281
+ border: none;
282
+ cursor: pointer;
283
+ transition: background-color 0.16s ease-out, color 0.16s ease-out;
284
+ }
285
+ .icen-kb-step-btn:hover:not(:disabled) {
286
+ background: var(--icen-token-bg-soft);
287
+ color: var(--icen-token-text);
288
+ }
289
+ .icen-kb-step-btn:disabled {
290
+ opacity: var(--icen-disabled-opacity);
291
+ cursor: not-allowed;
292
+ }
293
+ .icen-kb-step-value {
294
+ min-width: 26px;
295
+ text-align: center;
296
+ }
297
+
298
+ /* alpha 双端滑杆:两端语义文案(title 提示);非混合模式显式禁用不隐藏 */
299
+ .icen-kb-alpha {
300
+ display: inline-flex;
301
+ align-items: center;
302
+ gap: 6px;
303
+ height: 28px;
304
+ }
305
+ .icen-kb-alpha-end {
306
+ font-size: 10.5px;
307
+ color: var(--icen-token-text-faint);
308
+ cursor: help;
309
+ white-space: nowrap;
310
+ }
311
+ .icen-kb-alpha.is-off {
312
+ opacity: 0.55;
313
+ }
314
+
315
+ /* 阈值 + 存活计数:rerank 关闭时 N/A(显式禁用不隐藏) */
316
+ .icen-kb-threshold {
317
+ display: inline-flex;
318
+ align-items: center;
319
+ gap: 6px;
320
+ height: 28px;
321
+ }
322
+ .icen-kb-threshold-count {
323
+ min-width: 150px;
324
+ white-space: nowrap;
325
+ }
326
+ .icen-kb-threshold.is-off .icen-kb-threshold-count {
327
+ color: var(--icen-token-text-faint);
328
+ }
329
+
330
+ .icen-kb-retrieval-bar .icen-kb-run {
331
+ margin-inline-start: auto;
332
+ }
333
+
334
+ /* 检索身份选择(权限域注入的控件,spec §9.7;固定身份集——服务端 token 语义,不接受自由输入)。
335
+ 弹层选择器(icen-select)域钩子:面样式随 select.css,此处只管布局 */
336
+ .icen-kb-retrieval-idn-group { display: inline-flex; align-items: center; gap: 6px; }
337
+ .icen-kb-retrieval-idn { flex: 0 0 auto; inline-size: auto; }
338
+
339
+ /* 可复制参数 JSON 行(.icen-kb-meta mono;DSL 双表示纪律):不换行不断词,横向滚动 */
340
+ .icen-kb-params {
341
+ display: flex;
342
+ align-items: center;
343
+ gap: 6px;
344
+ min-width: 0;
345
+ max-width: 100%;
346
+ }
347
+ .icen-kb-params-text {
348
+ flex: 1 1 auto;
349
+ min-width: 0;
350
+ overflow-x: auto;
351
+ white-space: pre;
352
+ word-break: normal;
353
+ font-family: var(--icen-font-mono);
354
+ }
355
+
356
+ /* 命中列表:rank 列 28px 物理右对齐(数字 LTR 文种惯例,RTL 不镜像),hover 浮起 */
357
+ .icen-kb-hits {
358
+ display: flex;
359
+ flex-direction: column;
360
+ gap: 4px;
361
+ }
362
+ .icen-kb-hit {
363
+ display: grid;
364
+ grid-template-columns: 28px minmax(0, 1fr) auto;
365
+ gap: 10px;
366
+ padding: 8px 10px;
367
+ background: var(--icen-token-bg-soft);
368
+ border: 1px solid transparent;
369
+ border-radius: var(--icen-radius-md);
370
+ transition: border-color 0.16s ease-out, box-shadow 0.16s ease-out;
371
+ }
372
+ /* hover 阴影抬升仅可悬停设备生效(触屏关闭,AGENTS 动效守卫) */
373
+ @media (hover: hover) and (pointer: fine) {
374
+ .icen-kb-hit:hover {
375
+ border-color: var(--icen-token-line-soft);
376
+ box-shadow: var(--icen-token-shadow-card);
377
+ }
378
+ }
379
+ .icen-kb-hit-rank {
380
+ width: 28px;
381
+ padding-top: 1px;
382
+ text-align: right; /* guard:allow-physical rank 是数字(LTR 文种),物理右对齐惯例,RTL 不镜像 */
383
+ font-size: 12px;
384
+ color: var(--icen-token-text-faint);
385
+ }
386
+ .icen-kb-hit-main {
387
+ display: flex;
388
+ flex-direction: column;
389
+ gap: 3px;
390
+ min-inline-size: 0;
391
+ }
392
+ .icen-kb-hit-title {
393
+ font-size: 13px;
394
+ font-weight: 500;
395
+ color: var(--icen-token-text);
396
+ white-space: nowrap;
397
+ overflow: hidden;
398
+ text-overflow: ellipsis;
399
+ }
400
+ .icen-kb-hit-snippet {
401
+ display: -webkit-box;
402
+ -webkit-box-orient: vertical;
403
+ -webkit-line-clamp: 2;
404
+ overflow: hidden;
405
+ font-size: 12.5px;
406
+ line-height: 1.65;
407
+ color: var(--icen-token-text-muted);
408
+ }
409
+ /* 多命中分色轮转(补 kb-quote 的 data-icen-hit 轮转到 .icen-kb-hit mark) */
410
+ .icen-kb-hit mark[data-icen-hit='1'] {
411
+ background: color-mix(in srgb, var(--icen-token-warning) 22%, transparent);
412
+ }
413
+ .icen-kb-hit mark[data-icen-hit='2'] {
414
+ background: color-mix(in srgb, var(--icen-token-info) 20%, transparent);
415
+ }
416
+ .icen-kb-hit-meta {
417
+ display: flex;
418
+ flex-wrap: wrap;
419
+ gap: 4px;
420
+ }
421
+ .icen-kb-hit-meta:empty {
422
+ display: none;
423
+ }
424
+ .icen-kb-hit-side {
425
+ display: flex;
426
+ flex-direction: column;
427
+ align-items: flex-end;
428
+ gap: 4px;
429
+ }
430
+
431
+ /* 分数拆解:vectorPart/keywordPart 微型双段条(向量=accent / 关键词=info) */
432
+ .icen-kb-score-dual {
433
+ display: inline-flex;
434
+ width: 88px;
435
+ height: 3px;
436
+ overflow: hidden;
437
+ border-radius: 2px; /* guard:allow-radius 微构件(bar/dot/track/指示器等图形级,不属容器圆角面) */
438
+ background: var(--icen-token-line-soft);
439
+ }
440
+ .icen-kb-score-dual i {
441
+ display: block;
442
+ height: 100%;
443
+ }
444
+ .icen-kb-score-dual .icen-kb-score-dual-vec {
445
+ background: var(--icen-token-accent);
446
+ opacity: 0.75;
447
+ }
448
+ .icen-kb-score-dual .icen-kb-score-dual-kw {
449
+ flex: 1 1 auto;
450
+ background: var(--icen-token-info);
451
+ opacity: 0.8;
452
+ }
453
+
454
+ /* 分数条固定轨道:bar 定宽 64px、不参与 flex 伸缩,i 定量不缩——
455
+ 跨行条长与百分比严格成比例(0.488 与 0.131 肉眼可辨;retrieval 与 rerank 同规) */
456
+ .icen-kb-retrieval .icen-kb-score-bar,
457
+ .icen-kb-rerank .icen-kb-score-bar {
458
+ display: block;
459
+ flex: 0 0 64px;
460
+ width: 64px;
461
+ min-width: 0;
462
+ }
463
+ .icen-kb-retrieval .icen-kb-score-bar > i,
464
+ .icen-kb-rerank .icen-kb-score-bar > i {
465
+ display: block;
466
+ flex: 0 0 auto;
467
+ }
468
+
469
+ /* explain 折叠小字 */
470
+ .icen-kb-hit-explain-fold {
471
+ display: flex;
472
+ flex-direction: column;
473
+ align-items: flex-end;
474
+ gap: 3px;
475
+ }
476
+ .icen-kb-hit-explain-toggle {
477
+ padding: 0;
478
+ font: inherit;
479
+ font-size: 10.5px;
480
+ color: var(--icen-token-text-faint);
481
+ background: transparent;
482
+ border: none;
483
+ cursor: pointer;
484
+ }
485
+ .icen-kb-hit-explain-toggle:hover {
486
+ color: var(--icen-token-text-muted);
487
+ text-decoration: underline;
488
+ }
489
+ .icen-kb-hit-explain {
490
+ max-inline-size: 320px;
491
+ font-size: 10.5px;
492
+ line-height: 1.6;
493
+ text-align: end;
494
+ white-space: normal;
495
+ word-break: break-all;
496
+ }
497
+
498
+ /* 运行态 */
499
+ .icen-kb-retrieval.is-busy .icen-kb-hits {
500
+ opacity: 0.6;
501
+ }
502
+ .icen-kb-retrieval.is-busy .icen-kb-hit {
503
+ pointer-events: none;
504
+ }
505
+
506
+ /* ══════════════ 2. kb-filter 过滤器构建器 ══════════════ */
507
+
508
+ .icen-kb-filter {
509
+ display: flex;
510
+ flex-direction: column;
511
+ gap: 12px;
512
+ }
513
+
514
+ /* 组:嵌套组缩进 16px + 连接线(body 起始缘竖线 + rule 行横线,RTL 镜像) */
515
+ .icen-kb-filter-group {
516
+ padding: 8px;
517
+ border: 1px solid var(--icen-token-line-soft);
518
+ border-radius: var(--icen-radius-md);
519
+ }
520
+ .icen-kb-filter-group .icen-kb-filter-group {
521
+ background: var(--icen-token-bg-soft);
522
+ }
523
+ .icen-kb-filter-head {
524
+ display: flex;
525
+ align-items: center;
526
+ gap: 6px;
527
+ margin-bottom: 6px;
528
+ }
529
+ .icen-kb-filter-op-toggle {
530
+ height: 24px;
531
+ padding: 0 10px;
532
+ font-family: var(--icen-font-mono);
533
+ font-size: 11px;
534
+ letter-spacing: 0.5px;
535
+ color: var(--icen-token-text-muted);
536
+ background: var(--icen-token-bg);
537
+ border: 1px solid var(--icen-token-line-soft);
538
+ border-radius: var(--icen-radius-sm);
539
+ cursor: pointer;
540
+ transition: color 0.16s ease-out, border-color 0.16s ease-out;
541
+ }
542
+ .icen-kb-filter-op-toggle:hover {
543
+ color: var(--icen-token-text);
544
+ border-color: var(--icen-token-line);
545
+ }
546
+ .icen-kb-filter-op-toggle.is-or {
547
+ font-weight: 600;
548
+ color: var(--icen-token-text);
549
+ }
550
+ .icen-kb-filter-head .icen-kb-filter-act {
551
+ padding: 0 8px;
552
+ width: auto;
553
+ }
554
+
555
+ .icen-kb-filter-body {
556
+ display: flex;
557
+ flex-direction: column;
558
+ gap: 6px;
559
+ margin-inline-start: 16px;
560
+ padding-inline-start: 10px;
561
+ border-inline-start: 1px solid var(--icen-token-line-soft);
562
+ }
563
+
564
+ .icen-kb-filter-rule {
565
+ position: relative;
566
+ display: flex;
567
+ flex-wrap: wrap; /* 窄栏兜底:值输入挤不下时独占次行全宽,日期串不截字 */
568
+ align-items: center;
569
+ gap: 6px;
570
+ }
571
+ /* rule → 组竖线的横向连接线(竖线沿 inline-start,RTL 镜像) */
572
+ .icen-kb-filter-rule::before {
573
+ content: '';
574
+ position: absolute;
575
+ top: 50%;
576
+ inset-inline-start: -10px;
577
+ width: 10px;
578
+ height: 1px;
579
+ background: var(--icen-token-line-soft);
580
+ }
581
+ .icen-kb-filter-field {
582
+ width: 120px;
583
+ flex: 0 0 auto;
584
+ font-family: var(--icen-font-mono);
585
+ font-size: var(--icen-density-font-size-sm);
586
+ }
587
+ .icen-kb-filter-op {
588
+ /* 弹层选择器(icen-select)域钩子:面样式随 select.css,此处只管布局 */
589
+ flex: 0 0 auto;
590
+ inline-size: auto;
591
+ }
592
+ .icen-kb-filter-value {
593
+ flex: 1 1 120px;
594
+ min-width: 104px; /* 12px mono 下容得下整条日期串 2026-07-01,不截字 */
595
+ font-family: var(--icen-font-mono);
596
+ font-size: var(--icen-density-font-size-sm);
597
+ }
598
+
599
+ /* DSL 镜像(Mongo JSON / OData tab 切换,mono 可复制) */
600
+ .icen-kb-filter-dsl {
601
+ display: flex;
602
+ flex-direction: column;
603
+ gap: 5px;
604
+ padding: 6px 8px;
605
+ background: var(--icen-token-bg-soft);
606
+ border: 1px solid var(--icen-token-line-soft);
607
+ border-radius: var(--icen-radius-md);
608
+ }
609
+ .icen-kb-filter-dsl-bar {
610
+ display: flex;
611
+ align-items: center;
612
+ gap: 4px;
613
+ }
614
+ .icen-kb-filter-dsl-tab {
615
+ height: 22px;
616
+ padding: 0 10px;
617
+ font-family: var(--icen-font-mono);
618
+ font-size: 11px;
619
+ color: var(--icen-token-text-faint);
620
+ background: transparent;
621
+ border: 1px solid transparent;
622
+ border-radius: var(--icen-radius-sm);
623
+ cursor: pointer;
624
+ transition: color 0.16s ease-out, background-color 0.16s ease-out, border-color 0.16s ease-out;
625
+ }
626
+ .icen-kb-filter-dsl-tab:hover {
627
+ color: var(--icen-token-text-muted);
628
+ }
629
+ .icen-kb-filter-dsl-tab.is-active {
630
+ color: var(--icen-token-text);
631
+ background: var(--icen-token-bg);
632
+ border-color: var(--icen-token-line-soft);
633
+ }
634
+ .icen-kb-filter-dsl-copy {
635
+ margin-inline-start: auto;
636
+ width: auto;
637
+ padding: 0 8px;
638
+ font-size: 11px;
639
+ }
640
+ .icen-kb-filter-dsl-text {
641
+ display: block;
642
+ max-block-size: 110px;
643
+ overflow: auto;
644
+ line-height: 1.6;
645
+ /* DSL 镜像(Mongo/OData):mono + 不换行不断词,横向滚动兜底 */
646
+ white-space: pre;
647
+ word-break: normal;
648
+ font-family: var(--icen-font-mono);
649
+ }
650
+
651
+ /* ══════════════ 3. kb-rerank rerank A/B 对比 ══════════════ */
652
+
653
+ .icen-kb-rerank {
654
+ display: flex;
655
+ flex-direction: column;
656
+ gap: 10px;
657
+ /* 窄视口兜底:网格按列 min-width 整体横向滚动,「重排后」末列不被截断 */
658
+ min-width: 0;
659
+ overflow-x: auto;
660
+ }
661
+ .icen-kb-rerank-head {
662
+ display: flex;
663
+ align-items: center;
664
+ gap: 8px;
665
+ }
666
+ .icen-kb-rerank-switch-label {
667
+ margin-inline-start: auto;
668
+ }
669
+ .icen-kb-rerank-grid {
670
+ display: grid;
671
+ grid-template-columns: minmax(200px, 1fr) 52px minmax(200px, 1fr);
672
+ min-width: 470px; /* 列最小宽合计:低于此宽走横向滚动而非压缩截断 */
673
+ column-gap: 8px;
674
+ row-gap: 2px;
675
+ align-items: stretch;
676
+ }
677
+ .icen-kb-rerank-grid > .icen-kb-empty {
678
+ grid-column: 1 / -1;
679
+ }
680
+ .icen-kb-rerank-colhead {
681
+ display: flex;
682
+ align-items: center;
683
+ gap: 6px;
684
+ min-height: 26px;
685
+ padding: 0 8px;
686
+ font-size: 11.5px;
687
+ color: var(--icen-token-text-muted);
688
+ border-bottom: 1px solid var(--icen-token-line-soft);
689
+ }
690
+ .icen-kb-rerank-colhead--delta {
691
+ justify-content: center;
692
+ font-family: var(--icen-font-mono);
693
+ }
694
+ /* 行容器 display:contents:三格参与网格对齐,行 hover 整排点亮 */
695
+ .icen-kb-rerank-row {
696
+ display: contents;
697
+ }
698
+ .icen-kb-rerank-row:hover > .icen-kb-rerank-col {
699
+ background: var(--icen-token-bg-soft);
700
+ }
701
+ .icen-kb-rerank-col {
702
+ display: flex;
703
+ align-items: center;
704
+ gap: 8px;
705
+ min-height: 32px;
706
+ padding: 3px 8px;
707
+ border-radius: var(--icen-radius-sm);
708
+ transition: background-color 0.16s ease-out;
709
+ }
710
+ .icen-kb-rerank-col.is-missing {
711
+ /* 落选列不降透明(透明会被 axe 算进对比度):落选语义由 muted 文案承担 */
712
+ }
713
+ .icen-kb-rerank-rank {
714
+ flex: 0 0 auto;
715
+ width: 18px;
716
+ text-align: right; /* guard:allow-physical rank 是数字(LTR 文种),物理右对齐惯例,RTL 不镜像 */
717
+ font-size: 11.5px;
718
+ }
719
+ .icen-kb-rerank-title {
720
+ flex: 1 1 auto;
721
+ min-inline-size: 0;
722
+ overflow: hidden;
723
+ font-size: 12.5px;
724
+ color: var(--icen-token-text);
725
+ white-space: nowrap;
726
+ text-overflow: ellipsis;
727
+ }
728
+ .icen-kb-rerank-missing {
729
+ flex: 1 1 auto;
730
+ font-size: 11px;
731
+ color: var(--icen-token-text-muted);
732
+ }
733
+ /* delta 箭头:上升绿 / 下降红 / 持平或单侧缺失 — */
734
+ .icen-kb-rerank-delta {
735
+ display: flex;
736
+ align-items: center;
737
+ justify-content: center;
738
+ font-family: var(--icen-font-mono);
739
+ font-variant-numeric: tabular-nums;
740
+ font-size: 11.5px;
741
+ color: var(--icen-token-text-faint);
742
+ }
743
+ .icen-kb-rerank-delta.is-up {
744
+ font-weight: 600;
745
+ color: var(--icen-token-success);
746
+ }
747
+ .icen-kb-rerank-delta.is-down {
748
+ font-weight: 600;
749
+ color: var(--icen-token-error);
750
+ }
751
+ /* 开关关闭:重排后列压淡(显式禁用不隐藏) */
752
+ .icen-kb-rerank.is-off .icen-kb-rerank-col--after {
753
+ opacity: 0.45;
754
+ }
755
+
756
+ /* ══════════════ 4. kb-hittest 召回测试集 ══════════════ */
757
+
758
+ .icen-kb-hittest {
759
+ display: flex;
760
+ flex-direction: column;
761
+ gap: 12px;
762
+ }
763
+ .icen-kb-hittest > .icen-kb-run {
764
+ align-self: flex-start;
765
+ }
766
+
767
+ /* 统计头:命中率大数字 + 均分 + 通过 x/y + 参数快照徽标 */
768
+ .icen-kb-hittest-stats {
769
+ display: flex;
770
+ flex-wrap: wrap;
771
+ align-items: center;
772
+ gap: 20px;
773
+ padding: 10px 12px;
774
+ background: var(--icen-token-bg-soft);
775
+ border: 1px solid var(--icen-token-line-soft);
776
+ border-radius: var(--icen-radius-md);
777
+ }
778
+ .icen-kb-hittest-stat {
779
+ display: flex;
780
+ align-items: baseline;
781
+ gap: 6px;
782
+ }
783
+ .icen-kb-hittest-stat-label {
784
+ font-size: 10.5px;
785
+ letter-spacing: 0.3px;
786
+ color: var(--icen-token-text-faint);
787
+ }
788
+ .icen-kb-hittest-hitrate {
789
+ font-size: 22px;
790
+ font-weight: 600;
791
+ color: var(--icen-token-text);
792
+ }
793
+ .icen-kb-hittest-stats .icen-kb-badge {
794
+ margin-inline-start: auto;
795
+ }
796
+
797
+ /* 问题列表 */
798
+ .icen-kb-hittest-list {
799
+ display: flex;
800
+ flex-direction: column;
801
+ gap: 4px;
802
+ }
803
+ .icen-kb-hittest-row {
804
+ display: grid;
805
+ grid-template-columns: 24px minmax(0, 1fr) auto 28px 24px;
806
+ gap: 8px;
807
+ align-items: center;
808
+ min-height: 30px;
809
+ padding: 3px 8px;
810
+ border-radius: var(--icen-radius-sm);
811
+ }
812
+ .icen-kb-hittest-row:hover {
813
+ background: var(--icen-token-bg-soft);
814
+ }
815
+ .icen-kb-hittest-pin svg {
816
+ width: 13px;
817
+ height: 13px;
818
+ opacity: 0.55;
819
+ }
820
+ .icen-kb-hittest-pin.is-pinned {
821
+ color: var(--icen-token-text);
822
+ }
823
+ .icen-kb-hittest-pin.is-pinned svg {
824
+ opacity: 1;
825
+ }
826
+ .icen-kb-hittest-q {
827
+ overflow: hidden;
828
+ font-size: 13px;
829
+ color: var(--icen-token-text);
830
+ white-space: nowrap;
831
+ text-overflow: ellipsis;
832
+ }
833
+ .icen-kb-hittest-expected {
834
+ display: inline-flex;
835
+ align-items: center;
836
+ gap: 4px;
837
+ max-width: 42%;
838
+ overflow: hidden;
839
+ }
840
+ .icen-kb-hittest-result {
841
+ width: 28px;
842
+ text-align: center;
843
+ font-weight: 600;
844
+ color: var(--icen-token-text-faint);
845
+ }
846
+ .icen-kb-hittest-row.is-pass .icen-kb-hittest-result {
847
+ color: var(--icen-token-success);
848
+ }
849
+ .icen-kb-hittest-row.is-fail .icen-kb-hittest-result {
850
+ color: var(--icen-token-error);
851
+ }
852
+ .icen-kb-hittest-remove {
853
+ opacity: 0;
854
+ }
855
+ .icen-kb-hittest-row:hover .icen-kb-hittest-remove,
856
+ .icen-kb-hittest-remove:focus-visible {
857
+ opacity: 1;
858
+ }
859
+
860
+ /* 新增问题 */
861
+ .icen-kb-hittest-add {
862
+ display: flex;
863
+ gap: 8px;
864
+ }
865
+ .icen-kb-hittest-input {
866
+ flex: 1 1 auto;
867
+ }
868
+ .icen-kb-hittest-add-btn {
869
+ height: 28px;
870
+ padding: 0 12px;
871
+ font: inherit;
872
+ font-size: 12.5px;
873
+ color: var(--icen-token-text-muted);
874
+ background: var(--icen-token-bg);
875
+ border: 1px solid var(--icen-token-line-soft);
876
+ border-radius: var(--icen-radius-sm);
877
+ cursor: pointer;
878
+ transition: color 0.16s ease-out, border-color 0.16s ease-out;
879
+ }
880
+ .icen-kb-hittest-add-btn:hover {
881
+ color: var(--icen-token-text);
882
+ border-color: var(--icen-token-line);
883
+ }
884
+
885
+ /* ══════════════ 5. 密度档(spec §2:compact 行高收紧) ══════════════ */
886
+
887
+ [data-icen-density='compact'] .icen-kb-hit {
888
+ padding: 5px 8px;
889
+ }
890
+ [data-icen-density='compact'] .icen-kb-hittest-row {
891
+ min-height: 24px;
892
+ }
893
+ [data-icen-density='compact'] .icen-kb-rerank-col {
894
+ min-height: 26px;
895
+ }
896
+
897
+ }