styles.css 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345
  1. * { box-sizing: border-box; }
  2. html, body { margin: 0; padding: 0; font-family: -apple-system, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif; font-size: 13px; color: #111827; background: #f5f5f7; }
  3. /* case 页布局: body 固定 viewport 高 + overflow hidden, 唯一的滚动容器是 .scroll-area; 页头 / declarations / source / legend / 表格全装在里面.
  4. 滚动时它们一起向上滚走, 只有 thead 因 position: sticky 留在顶 — 这是用户要求的"只冻结表头两行". */
  5. body { height: 100vh; overflow: hidden; }
  6. header.page-header { padding: 14px 20px 8px; background: #fff; border-bottom: 1px solid #e5e7eb; }
  7. header.page-header h1 { margin: 0 0 6px; font-size: 16px; font-weight: 600; }
  8. header.page-header .meta { color: #6b7280; font-size: 12px; line-height: 1.5; }
  9. /* 工序头部 + declare 块 */
  10. details.declarations { margin: 12px 20px 0; background: #fff; border: 1px solid #e2e8f0; border-radius: 6px; }
  11. details.declarations[open] summary { border-bottom: 1px solid #e2e8f0; }
  12. details.declarations summary { padding: 10px 14px; cursor: pointer; font-size: 13px; line-height: 1.65; list-style: none; }
  13. details.declarations summary::-webkit-details-marker { display: none; }
  14. details.declarations summary::before { content: '▼ '; color: #94a3b8; font-size: 10px; margin-right: 4px; }
  15. details.declarations:not([open]) summary::before { content: '▶ '; }
  16. details.declarations .proc-name { color: #1f2937; font-size: 14px; }
  17. details.declarations .decl-purpose { color: #475569; margin-left: 12px; font-size: 12px; }
  18. details.declarations .decl-meta { color: #6b7280; font-size: 11.5px; margin-left: 16px; }
  19. details.declarations .tag-mini { display: inline-block; padding: 1px 7px; font-size: 11px; background: #fef3c7; border-radius: 3px; color: #92400e; margin-left: 8px; }
  20. .decl-body { padding: 12px 18px 14px; display: flex; flex-wrap: wrap; gap: 14px 32px; }
  21. .decl-section { min-width: 260px; flex: 1 1 280px; }
  22. .decl-label { color: #475569; font-size: 11.5px; font-weight: 600; margin-bottom: 6px; padding-bottom: 4px; border-bottom: 1px dashed #e2e8f0; }
  23. .decl-row { padding: 3px 0; font-size: 12.5px; line-height: 1.65; }
  24. .decl-row .name { font-weight: 500; color: #1f2937; margin-left: 4px; }
  25. .decl-row .decl-default { color: #6b7280; font-size: 11.5px; margin-left: 6px; }
  26. .decl-row .decl-desc { color: #6b7280; font-size: 11.5px; margin-left: 6px; }
  27. /* 原文 */
  28. details.source-block { margin: 8px 20px 12px; background: #fff; border: 1px solid #e2e8f0; border-radius: 6px; }
  29. details.source-block summary { padding: 8px 14px; cursor: pointer; font-size: 12px; color: #475569; list-style: none; }
  30. details.source-block summary::-webkit-details-marker { display: none; }
  31. details.source-block summary::before { content: '▶ '; color: #94a3b8; font-size: 10px; margin-right: 4px; }
  32. details.source-block[open] summary::before { content: '▼ '; }
  33. .source-body { padding: 6px 18px 12px; font-size: 12.5px; line-height: 1.65; }
  34. .source-body a { color: #2563eb; word-break: break-all; }
  35. .source-body .source-meta { color: #94a3b8; font-size: 11px; margin-top: 4px; }
  36. .source-body .source-excerpt { color: #1f2937; margin: 8px 0; padding: 8px 10px; background: #f8fafc; border-left: 3px solid #94a3b8; font-size: 12px; }
  37. .source-body hr.src-divider { border: 0; border-top: 1px dashed #cbd5e1; margin: 10px 0; }
  38. .source-body .src-p { margin: 6px 0; color: #1f2937; }
  39. .source-body .src-img-wrap, .source-body .src-cover { text-align: center; margin: 8px 0; }
  40. .source-body .src-img { max-width: 100%; max-height: 480px; border-radius: 4px; border: 1px solid #e2e8f0; }
  41. .source-body .src-video { margin: 8px 0; }
  42. .source-body .src-video a { display: inline-block; padding: 4px 10px; background: #fef3c7; color: #78350f; text-decoration: none; border-radius: 3px; font-size: 11.5px; }
  43. .source-body .source-full { max-height: 720px; overflow-y: auto; padding: 6px 12px; background: #fff; border: 1px solid #e2e8f0; border-radius: 4px; }
  44. /* Legend */
  45. .legend { padding: 10px 20px; background: #fff; border-bottom: 1px solid #e5e7eb; font-size: 11.5px; color: #6b7280; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
  46. .legend .group { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; }
  47. .legend .group .gh { display: inline-block; padding: 2px 8px; border-radius: 3px; color: #1f2937; font-weight: 600; cursor: pointer; user-select: none; }
  48. .legend .group .gh:hover { filter: brightness(0.92); }
  49. .legend .group .gh.all-off { opacity: 0.45; text-decoration: line-through; }
  50. .legend .group.gray .gh { background: #e2e8f0; }
  51. .legend .group.yellow .gh { background: #fde68a; }
  52. .legend .group.green .gh { background: #bbf7d0; }
  53. .legend .group.blue .gh { background: #bfdbfe; }
  54. .legend .col-toggle { display: inline-block; padding: 2px 7px; border: 1px solid #cbd5e1; border-radius: 3px; background: #fff; cursor: pointer; font-size: 11.5px; color: #334155; user-select: none; }
  55. .legend .col-toggle:hover { background: #f1f5f9; }
  56. .legend .col-toggle.off { color: #94a3b8; background: #f1f5f9; text-decoration: line-through; border-color: #e2e8f0; }
  57. .legend .inferred-toggle { display: inline-block; padding: 2px 8px; border: 1px solid #d97706; border-radius: 3px;
  58. background: #fffbeb; color: #92400e; cursor: pointer; font-size: 11.5px;
  59. font-weight: 600; user-select: none; margin-left: 8px; }
  60. .legend .inferred-toggle.on { background: #fef3c7; box-shadow: inset 0 0 0 1px #d97706; }
  61. .legend .legend-hint { color: #94a3b8; font-size: 11px; margin-left: auto; }
  62. /* 表格容器 */
  63. .table-wrap { background: #fff; }
  64. /* case 页 .scroll-area: 占满 body, 自身承担两轴滚动. 内部不嵌套 overflow 容器, 否则 sticky 锚点会被抢走.
  65. (browser 页不会走这条 — 它在 .browser-main 内, 不直接挂 body 下) */
  66. body > .scroll-area { height: 100%; overflow: auto; background: #f5f5f7; }
  67. table.proc { width: max-content; min-width: 100%; border-collapse: collapse; background: #fff; table-layout: auto; font-size: 12px; }
  68. table.proc th, table.proc td { border: 1px solid #e5e7eb; padding: 6px 8px; vertical-align: top; line-height: 1.5; }
  69. table.proc thead th { font-weight: 600; text-align: center; font-size: 12.5px; padding: 8px 6px; }
  70. table.proc tbody td { font-size: 12px; }
  71. /* 列宽 (需求 3 列固定 width, 其他 min-width) */
  72. table.proc th.col-idx, table.proc td.idx { width: 38px; min-width: 38px; max-width: 38px; text-align: center; }
  73. table.proc th.col-intent, table.proc td.intent { width: 240px; min-width: 240px; max-width: 240px; }
  74. table.proc th.col-effect, table.proc td.effect { width: 80px; min-width: 80px; max-width: 80px; }
  75. table.proc th.col-via { min-width: 110px; }
  76. table.proc th.col-action { min-width: 130px; }
  77. table.proc th.col-directive { min-width: 200px; }
  78. table.proc th.col-config { min-width: 150px; }
  79. table.proc th.col-decorator { min-width: 130px; }
  80. table.proc th.col-memo { min-width: 220px; }
  81. table.proc th.col-control { min-width: 80px; }
  82. table.proc th.col-feature { min-width: 80px; }
  83. /* 值列整段 <...> — 表示该值是对内容的描述, 不是内容本身. 整段 inline italic gray bg. */
  84. .value-desc { display: inline; padding: 1px 4px; border-radius: 3px;
  85. background: rgba(241, 245, 249, 0.7); color: #475569; font-style: italic; }
  86. /* 值列不允许截断 */
  87. table.proc td.in-value, table.proc td.out-value {
  88. white-space: pre-wrap; word-break: break-word; overflow-wrap: anywhere;
  89. max-width: 320px;
  90. }
  91. table.proc td.directive, table.proc td.config,
  92. table.proc td.decorator, table.proc td.memo {
  93. white-space: pre-wrap; word-break: break-word; overflow-wrap: anywhere;
  94. max-width: 280px;
  95. }
  96. /* 实质/形式 列 — 内容是短路径, 收窄列宽强制换行 (避免空旷低信息密度) */
  97. table.proc th.col-in-substance, table.proc td.in-substance,
  98. table.proc th.col-out-substance, table.proc td.out-substance,
  99. table.proc th.col-in-form, table.proc td.in-form,
  100. table.proc th.col-out-form, table.proc td.out-form { width: 90px; min-width: 90px; max-width: 90px;
  101. word-break: break-all; overflow-wrap: anywhere; }
  102. table.proc th.col-in-type, table.proc th.col-out-type { min-width: 90px; }
  103. table.proc th.col-in-name, table.proc th.col-out-name { min-width: 110px; }
  104. table.proc th.col-in-value, table.proc th.col-out-value { min-width: 180px; }
  105. table.proc th.col-in-anchor, table.proc th.col-out-anchor { min-width: 110px; }
  106. /* 冻结 需求 组 (idx + 目的 + 作用) — left 累计 = 0 / 38 / 278 */
  107. table.proc th.col-idx, table.proc td.idx { position: sticky; left: 0; z-index: 2; }
  108. table.proc th.col-intent, table.proc td.intent { position: sticky; left: 38px; z-index: 2; }
  109. table.proc th.col-effect, table.proc td.effect { position: sticky; left: 278px; z-index: 2; }
  110. table.proc thead th.col-group-demand { position: sticky; left: 0; z-index: 3; }
  111. table.proc thead th.col-idx, table.proc thead th.col-intent, table.proc thead th.col-effect { z-index: 3; }
  112. table.proc td.effect, table.proc thead th.col-effect, table.proc thead th.col-group-demand {
  113. box-shadow: 6px 0 8px -4px rgba(0,0,0,0.18);
  114. }
  115. /* 冻结 表头 — 滚动时组名/列名行 stick to top */
  116. table.proc thead th { position: sticky; top: 0; z-index: 3; }
  117. table.proc thead tr:nth-child(2) th { top: 33px; }
  118. /* 4 个 corner cell (sticky-left + sticky-top 同时生效) z-index 加高, 避免被 tbody sticky-left 列覆盖 */
  119. table.proc thead th.col-group-demand,
  120. table.proc thead th.col-idx,
  121. table.proc thead th.col-intent,
  122. table.proc thead th.col-effect { z-index: 5; }
  123. /* 颜色分组背景 */
  124. table.proc td.idx, table.proc td.intent, table.proc td.effect { background: #f8fafc; }
  125. table.proc thead th.col-group-demand { background: #1e293b; color: #fff; }
  126. table.proc thead tr:nth-child(2) th.col-idx,
  127. table.proc thead tr:nth-child(2) th.col-intent,
  128. table.proc thead tr:nth-child(2) th.col-effect { background: #475569; color: #fff; }
  129. table.proc td.in-substance, table.proc td.in-form, table.proc td.in-type, table.proc td.in-name, table.proc td.in-value, table.proc td.in-anchor { background: #fefce8; }
  130. table.proc thead th.col-group-input { background: #b45309; color: #fff; }
  131. table.proc thead tr:nth-child(2) th.col-in-substance,
  132. table.proc thead tr:nth-child(2) th.col-in-form,
  133. table.proc thead tr:nth-child(2) th.col-in-type,
  134. table.proc thead tr:nth-child(2) th.col-in-name,
  135. table.proc thead tr:nth-child(2) th.col-in-value,
  136. table.proc thead tr:nth-child(2) th.col-in-anchor { background: #d97706; color: #fff; }
  137. table.proc td.via, table.proc td.action, table.proc td.directive, table.proc td.config,
  138. table.proc td.decorator, table.proc td.memo, table.proc td.control, table.proc td.feature { background: #f0fdf4; }
  139. table.proc thead th.col-group-impl { background: #065f46; color: #fff; }
  140. table.proc thead tr:nth-child(2) th.col-via,
  141. table.proc thead tr:nth-child(2) th.col-action,
  142. table.proc thead tr:nth-child(2) th.col-directive,
  143. table.proc thead tr:nth-child(2) th.col-config,
  144. table.proc thead tr:nth-child(2) th.col-decorator,
  145. table.proc thead tr:nth-child(2) th.col-memo,
  146. table.proc thead tr:nth-child(2) th.col-control,
  147. table.proc thead tr:nth-child(2) th.col-feature { background: #047857; color: #fff; }
  148. table.proc td.out-substance, table.proc td.out-form, table.proc td.out-type, table.proc td.out-name, table.proc td.out-value, table.proc td.out-anchor { background: #eff6ff; }
  149. table.proc thead th.col-group-output { background: #1e40af; color: #fff; }
  150. table.proc thead tr:nth-child(2) th.col-out-substance,
  151. table.proc thead tr:nth-child(2) th.col-out-form,
  152. table.proc thead tr:nth-child(2) th.col-out-type,
  153. table.proc thead tr:nth-child(2) th.col-out-name,
  154. table.proc thead tr:nth-child(2) th.col-out-value,
  155. table.proc thead tr:nth-child(2) th.col-out-anchor { background: #2563eb; color: #fff; }
  156. /* 组间分隔粗线 */
  157. table.proc th.col-effect, table.proc td.effect,
  158. table.proc th.col-in-anchor, table.proc td.in-anchor,
  159. table.proc th.col-feature, table.proc td.feature { border-right: 3px solid #94a3b8; }
  160. /* 行边框 / 块头 / nested */
  161. table.proc tr.step-main > td { border-top: 1.5px solid #94a3b8; }
  162. table.proc tr.step-sub > td { border-top: 1px dashed #cbd5e1; }
  163. table.proc tr.block-header { font-weight: 600; }
  164. table.proc tr.block-header > td.intent { background: #e2e8f0; }
  165. table.proc tr.step-nested > td.idx { color: #6b7280; }
  166. /* ───────── 原子能力 atom rows + badge ─────────
  167. atom = step 沿单个 (实质 OR 形式) 维度的投影. 默认全收起, 点击 step 行 idx 列的 ⚛N 徽章展开/收起. */
  168. table.proc tr.atom-row { display: none; }
  169. table.proc tr.atom-row.show, table.proc tr.atom-row:target { display: table-row; }
  170. /* :target 高亮 — 从能力浏览页跳转过来时让对应 step/atom 行闪烁定位 */
  171. table.proc tr:target > td {
  172. animation: rowTargetFlash 1.6s ease-out;
  173. box-shadow: inset 4px 0 0 #6d28d9;
  174. }
  175. @keyframes rowTargetFlash {
  176. 0% { background-color: #fef3c7 !important; }
  177. 100% { background-color: inherit; }
  178. }
  179. table.proc tr.atom-row > td { border-top: 1px dotted #d8b4fe !important; }
  180. /* atom 行整体淡紫底, sticky 三列 (idx/intent/effect) 加深一档 */
  181. table.proc tr.atom-row > td.in-substance, table.proc tr.atom-row > td.in-form,
  182. table.proc tr.atom-row > td.in-type, table.proc tr.atom-row > td.in-name,
  183. table.proc tr.atom-row > td.in-value, table.proc tr.atom-row > td.in-anchor {
  184. background: #fdf4ff !important;
  185. }
  186. table.proc tr.atom-row > td.via, table.proc tr.atom-row > td.action,
  187. table.proc tr.atom-row > td.directive, table.proc tr.atom-row > td.config,
  188. table.proc tr.atom-row > td.decorator, table.proc tr.atom-row > td.memo,
  189. table.proc tr.atom-row > td.control, table.proc tr.atom-row > td.feature {
  190. background: #faf5ff !important;
  191. }
  192. table.proc tr.atom-row > td.out-substance, table.proc tr.atom-row > td.out-form,
  193. table.proc tr.atom-row > td.out-type, table.proc tr.atom-row > td.out-name,
  194. table.proc tr.atom-row > td.out-value, table.proc tr.atom-row > td.out-anchor {
  195. background: #fdf4ff !important;
  196. }
  197. table.proc tr.atom-row > td.idx, table.proc tr.atom-row > td.intent,
  198. table.proc tr.atom-row > td.effect {
  199. background: #f3e8ff !important;
  200. }
  201. table.proc tr.atom-row > td.idx.atom-idx {
  202. color: #6d28d9; font-style: italic; text-align: center; font-size: 11px;
  203. }
  204. table.proc tr.atom-row .atom-name {
  205. color: #6d28d9; font-weight: 600; font-size: 11.5px; margin-bottom: 4px;
  206. padding: 1px 6px; background: #ede9fe; border-radius: 3px; display: inline-block;
  207. }
  208. /* atom badge — 挂在 step 行 idx 列下方, 点击展开/收起该 step 的 atoms */
  209. .atom-badge {
  210. display: inline-block; margin-top: 4px; padding: 1px 5px;
  211. font-size: 9.5px; background: #ede9fe; color: #6d28d9;
  212. border-radius: 8px; cursor: pointer; user-select: none;
  213. font-weight: 600; white-space: nowrap; line-height: 1.3;
  214. }
  215. .atom-badge:hover { background: #ddd6fe; }
  216. .atom-badge.open { background: #6d28d9; color: #fff; }
  217. .atom-badge .atom-arrow { font-size: 8px; }
  218. /* 返回行 */
  219. tr.return-row > td { background: #fde68a !important; font-weight: 600; padding: 8px; }
  220. /* chip — 中性灰底 (供 declaration / drawer / 返回行); 表格内 type chip 由下方列色覆盖 */
  221. .chip { display: inline-block; padding: 1px 7px; border-radius: 10px; font-size: 11.5px; color: #1f2937; background: #d1d5db; cursor: pointer; user-select: none; }
  222. .chip:hover { filter: brightness(0.95); box-shadow: 0 0 0 1px #1e293b; }
  223. /* 表格 in-type / out-type 列内 chip 统一列色 (黄/蓝区分输入输出) */
  224. table.proc td.in-type .chip { background: #fde68a !important; color: #78350f; }
  225. table.proc td.out-type .chip { background: #bfdbfe !important; color: #1e3a8a; }
  226. /* keyword / name / flow */
  227. .kw { color: #6d28d9; font-weight: 600; }
  228. .name { color: #0f172a; }
  229. .name:hover, .name.var-highlight { background: #fef3c7; cursor: pointer; }
  230. .flow { color: #6b7280; font-size: 11.5px; font-style: italic; }
  231. /* intent tokens */
  232. .intent-text { color: #1f2937; line-height: 1.55; }
  233. .intent-tok { display: inline-block; padding: 1px 5px; border-radius: 3px; margin: 0 1px; font-size: 11.5px; }
  234. /* intent token: 底色对应其引用的列. 输入列黄, 输出列蓝, 实现列绿, 需求列灰. */
  235. /* 需求 (灰) */
  236. .intent-tok.ik-effect { background: #cbd5e1; color: #1f2937; }
  237. /* 实现 (绿系) — 3 个不同饱和度区分 */
  238. .intent-tok.ik-via { background: #d1fae5; color: #064e3b; font-family: ui-monospace, "SF Mono", monospace; font-size: 11px; }
  239. .intent-tok.ik-act { background: #86efac; color: #14532d; }
  240. .intent-tok.ik-control { background: #99f6e4; color: #134e4a; }
  241. /* feature 禁止 intent 引用; 用 ik-other 警告色 */
  242. .intent-tok.ik-other { background: #fee2e2; color: #991b1b; text-decoration: line-through; }
  243. /* 输入·类型 (黄圆胶囊) / 输出·类型 (蓝圆胶囊) */
  244. .intent-tok.ik-in-type { background: #fde68a; color: #78350f; border-radius: 10px; padding: 1px 8px; font-weight: 500; }
  245. .intent-tok.ik-out-type { background: #bfdbfe; color: #1e3a8a; border-radius: 10px; padding: 1px 8px; font-weight: 500; }
  246. /* 输入·实质 / 输出·实质 (矩形 tag) */
  247. .intent-tok.ik-in-sub { background: #fef3c7; color: #92400e; }
  248. .intent-tok.ik-out-sub { background: #dbeafe; color: #1e40af; }
  249. /* 输入·形式 / 输出·形式 (矩形 tag 斜体) */
  250. .intent-tok.ik-in-form { background: #fef3c7; color: #92400e; font-style: italic; }
  251. .intent-tok.ik-out-form { background: #dbeafe; color: #1e40af; font-style: italic; }
  252. /* substance/form 路径文本 */
  253. td.in-substance > span, td.in-form > span,
  254. td.out-substance > span, td.out-form > span {
  255. display: inline-block; padding: 1px 4px; border-radius: 2px; font-size: 11px;
  256. color: #1f2937; background: rgba(255,255,255,0.6); border: 1px solid rgba(0,0,0,0.06);
  257. word-break: break-all; line-height: 1.4; cursor: pointer;
  258. }
  259. td.effect > span, td.action > span, td.feature > span {
  260. display: inline-block; padding: 1px 5px; border-radius: 2px; font-size: 11.5px;
  261. color: #0f172a; background: rgba(255,255,255,0.7); cursor: pointer; border: 1px solid rgba(0,0,0,0.06);
  262. }
  263. /* 指令/配置/运行/备注 列 — 多条目 vertical 堆叠 */
  264. td.directive .instr-item, td.config .instr-item, td.decorator .instr-item, td.memo .instr-item {
  265. display: block; font-size: 11.5px; color: #1f2937; margin: 2px 0; line-height: 1.5;
  266. }
  267. /* row-focus 加深底色 */
  268. td.row-focus { font-weight: 600; color: #0f172a; }
  269. td.idx.row-focus, td.intent.row-focus, td.effect.row-focus { background: #e2e8f0 !important; }
  270. td.in-substance.row-focus, td.in-form.row-focus, td.in-type.row-focus, td.in-name.row-focus, td.in-value.row-focus, td.in-anchor.row-focus { background: #fde68a !important; }
  271. td.via.row-focus, td.action.row-focus, td.directive.row-focus, td.config.row-focus,
  272. td.decorator.row-focus, td.memo.row-focus, td.control.row-focus, td.feature.row-focus { background: #bbf7d0 !important; }
  273. td.out-substance.row-focus, td.out-form.row-focus, td.out-type.row-focus, td.out-name.row-focus, td.out-value.row-focus, td.out-anchor.row-focus { background: #bfdbfe !important; }
  274. /* inferred 角标 */
  275. sup.inferred { color: #b45309; font-size: 10px; font-weight: bold; padding: 0 2px; cursor: help; }
  276. /* 任意 cell 推断补全标记 — 「推」角标 + hover 显示 reason (不再加虚线下划线, 由角标承担识别) */
  277. td.is-inferred {
  278. cursor: help;
  279. }
  280. td.is-inferred::after {
  281. content: '推';
  282. display: inline-block;
  283. font-size: 9px;
  284. color: #92400e;
  285. background: rgba(254, 243, 199, 0.9);
  286. padding: 0 3px;
  287. border-radius: 2px;
  288. margin-left: 4px;
  289. vertical-align: top;
  290. font-weight: 600;
  291. border: 1px solid #fbbf24;
  292. }
  293. /* 低置信留空变体: AI 想过但拿不准, 故意留空; 角标变 推? 与高置信 推 区分 (spec §推断补全标记 C) */
  294. td.is-inferred.is-low-confidence::after { content: '推?'; }
  295. /* 高亮模式: legend 点击"高亮推断" 时, body 加 show-inferred 类, 所有推断 cell 加重底色 */
  296. body.show-inferred td.is-inferred {
  297. background: #fef3c7 !important;
  298. box-shadow: inset 0 0 0 1px #d97706;
  299. }
  300. /* 列隐藏 */
  301. .col-hidden { display: none !important; }
  302. /* drawer */
  303. .drawer-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.35); display: none; z-index: 100; }
  304. .drawer-overlay.open { display: block; }
  305. .drawer { position: fixed; right: 0; top: 0; bottom: 0; width: 520px; max-width: 90vw; background: #fff; box-shadow: -4px 0 16px rgba(0,0,0,0.15); z-index: 101; overflow-y: auto; transform: translateX(100%); transition: transform 0.2s ease-out; }
  306. .drawer.open { transform: translateX(0); }
  307. .drawer header { padding: 14px 18px; background: #1e293b; color: #fff; border-bottom: 0; position: sticky; top: 0; z-index: 2; }
  308. .drawer header h2 { margin: 0; font-size: 14px; }
  309. .drawer .close { position: absolute; right: 12px; top: 12px; background: transparent; color: #fff; border: 0; cursor: pointer; font-size: 18px; }
  310. .drawer .content { padding: 14px 18px; font-size: 12.5px; line-height: 1.6; color: #1f2937; }
  311. .drawer .content h3 { margin: 14px 0 6px; font-size: 12.5px; color: #047857; }
  312. .drawer .content pre { background: #f3f4f6; padding: 8px; border-radius: 3px; font-size: 11.5px; overflow-x: auto; line-height: 1.5; white-space: pre-wrap; }
  313. .drawer .content .row { margin: 4px 0; }
  314. .drawer .content .row b { color: #374151; }
  315. .drawer .tree { font-family: ui-monospace, "SF Mono", monospace; font-size: 11.5px; }
  316. .drawer .tree .node { padding: 1px 0; }
  317. .drawer .tree .highlight { background: #fde68a; padding: 1px 4px; border-radius: 2px; font-weight: 600; }
  318. .drawer .warning { background: #fef3c7; border-left: 3px solid #f59e0b; padding: 8px 10px; margin: 8px 0; font-size: 12px; }