@sparkelf/dsh-genui 0.0.0-stage → 0.11.4-patch.1

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 (210) hide show
  1. package/CHANGELOG.md +597 -0
  2. package/LICENSE +21 -0
  3. package/README.md +292 -2
  4. package/README.zh-CN.md +307 -0
  5. package/SKILL.md +261 -0
  6. package/cordis.patch.yml +9 -0
  7. package/demo-prompts.md +118 -0
  8. package/lib/assets/echarts-core.js +43 -0
  9. package/lib/assets/echarts-full.js +72 -0
  10. package/lib/assets/mermaid.js +3591 -0
  11. package/lib/assets/standalone-runtime.js +1506 -0
  12. package/lib/assets/three.js +3844 -0
  13. package/lib/client.js +405 -0
  14. package/lib/index.js +5187 -0
  15. package/lib/invariant.js +19 -0
  16. package/lib/types/client/EChartNode.d.ts +13 -0
  17. package/lib/types/client/ErrorBoundary.d.ts +30 -0
  18. package/lib/types/client/GenuiBlock.d.ts +9 -0
  19. package/lib/types/client/PlotBlock.d.ts +44 -0
  20. package/lib/types/client/TemplateDrawer.d.ts +7 -0
  21. package/lib/types/client/achievement-store.d.ts +35 -0
  22. package/lib/types/client/achievement-toast.d.ts +2 -0
  23. package/lib/types/client/achievements.d.ts +63 -0
  24. package/lib/types/client/action-context.d.ts +7 -0
  25. package/lib/types/client/artifact/ExportableGenuiBlock.d.ts +6 -0
  26. package/lib/types/client/artifact/create.d.ts +5 -0
  27. package/lib/types/client/artifact/download.d.ts +9 -0
  28. package/lib/types/client/artifact/html.d.ts +5 -0
  29. package/lib/types/client/artifact/index.d.ts +8 -0
  30. package/lib/types/client/artifact/json.d.ts +3 -0
  31. package/lib/types/client/artifact/parse.d.ts +3 -0
  32. package/lib/types/client/artifact/portability.d.ts +4 -0
  33. package/lib/types/client/artifact/standalone-theme.d.ts +2 -0
  34. package/lib/types/client/artifact/types.d.ts +33 -0
  35. package/lib/types/client/asset-echarts-core.d.ts +1 -0
  36. package/lib/types/client/asset-echarts.d.ts +17 -0
  37. package/lib/types/client/asset-loader.d.ts +33 -0
  38. package/lib/types/client/asset-mermaid.d.ts +1 -0
  39. package/lib/types/client/asset-three.d.ts +1 -0
  40. package/lib/types/client/blocks/advanced.d.ts +101 -0
  41. package/lib/types/client/blocks/basic.d.ts +22 -0
  42. package/lib/types/client/blocks/charts.d.ts +53 -0
  43. package/lib/types/client/blocks/checkbox.d.ts +17 -0
  44. package/lib/types/client/blocks/diagram/geometry.d.ts +73 -0
  45. package/lib/types/client/blocks/diagram/index.d.ts +5 -0
  46. package/lib/types/client/blocks/diagram/layout.d.ts +41 -0
  47. package/lib/types/client/blocks/diagram/theme.d.ts +37 -0
  48. package/lib/types/client/blocks/forms.d.ts +77 -0
  49. package/lib/types/client/blocks/image.d.ts +6 -0
  50. package/lib/types/client/blocks/render-node.d.ts +10 -0
  51. package/lib/types/client/blocks/state.d.ts +63 -0
  52. package/lib/types/client/blocks/svg.d.ts +4 -0
  53. package/lib/types/client/dom-fence.d.ts +30 -0
  54. package/lib/types/client/echarts-engine.d.ts +4 -0
  55. package/lib/types/client/echarts-lazy.d.ts +18 -0
  56. package/lib/types/client/embed.d.ts +10 -0
  57. package/lib/types/client/fence-render.d.ts +106 -0
  58. package/lib/types/client/gallery.d.ts +7 -0
  59. package/lib/types/client/genui-runtime/diagnostics.d.ts +18 -0
  60. package/lib/types/client/genui-runtime/index.d.ts +1 -0
  61. package/lib/types/client/genui-runtime/limits.d.ts +54 -0
  62. package/lib/types/client/genui-runtime/normalize.d.ts +15 -0
  63. package/lib/types/client/genui-runtime/schema.d.ts +87 -0
  64. package/lib/types/client/genui-runtime/value-utils.d.ts +18 -0
  65. package/lib/types/client/guard.d.ts +144 -0
  66. package/lib/types/client/i18n/en.d.ts +307 -0
  67. package/lib/types/client/i18n/index.d.ts +44 -0
  68. package/lib/types/client/i18n/runtime.d.ts +64 -0
  69. package/lib/types/client/i18n/zh.d.ts +8 -0
  70. package/lib/types/client/index.d.ts +36 -0
  71. package/lib/types/client/inline.d.ts +5 -0
  72. package/lib/types/client/interaction-store.d.ts +48 -0
  73. package/lib/types/client/mermaid-core.d.ts +8 -0
  74. package/lib/types/client/mermaid-lazy.d.ts +9 -0
  75. package/lib/types/client/mermaid-safe.d.ts +52 -0
  76. package/lib/types/client/panel-command.d.ts +34 -0
  77. package/lib/types/client/panel-store.d.ts +94 -0
  78. package/lib/types/client/panel.d.ts +18 -0
  79. package/lib/types/client/parse-partial.d.ts +63 -0
  80. package/lib/types/client/primitive-adapter.d.ts +4 -0
  81. package/lib/types/client/primitive-labels.d.ts +18 -0
  82. package/lib/types/client/safe-math.d.ts +43 -0
  83. package/lib/types/client/scene3d-core.d.ts +21 -0
  84. package/lib/types/client/scene3d-lazy.d.ts +8 -0
  85. package/lib/types/client/session-resolver.d.ts +8 -0
  86. package/lib/types/client/source-fence.d.ts +29 -0
  87. package/lib/types/client/spec.d.ts +709 -0
  88. package/lib/types/client/standalone/asset-loader.d.ts +2 -0
  89. package/lib/types/client/standalone/bootstrap-types.d.ts +9 -0
  90. package/lib/types/client/standalone/katex-style.d.ts +1 -0
  91. package/lib/types/client/standalone/primitive-adapter.d.ts +54 -0
  92. package/lib/types/client/standalone/runtime.d.ts +2 -0
  93. package/lib/types/client/submission-registry.d.ts +51 -0
  94. package/lib/types/client/svg-fence.d.ts +2 -0
  95. package/lib/types/client/table-details.d.ts +20 -0
  96. package/lib/types/client/templates.d.ts +41 -0
  97. package/lib/types/client/toolview.d.ts +7 -0
  98. package/lib/types/client/walk-spec.d.ts +3 -0
  99. package/lib/types/index.d.ts +1 -0
  100. package/lib/types/plugin/chart-contract.d.ts +9 -0
  101. package/lib/types/plugin/fence-feedback.d.ts +151 -0
  102. package/lib/types/plugin/genui-diagnostic.d.ts +13 -0
  103. package/lib/types/plugin/index.d.ts +35 -0
  104. package/lib/types/plugin/inline-content-diagnostic.d.ts +8 -0
  105. package/lib/types/plugin/invariant.d.ts +15 -0
  106. package/lib/types/plugin/tool.d.ts +27 -0
  107. package/lib/types/shared/fence-repair.d.ts +78 -0
  108. package/lib/types/shared/fence-resolve.d.ts +39 -0
  109. package/package.json +249 -4
  110. package/src/client/EChartNode.tsx +466 -0
  111. package/src/client/ErrorBoundary.tsx +67 -0
  112. package/src/client/GenuiBlock.module.css +2221 -0
  113. package/src/client/GenuiBlock.tsx +235 -0
  114. package/src/client/PlotBlock.module.css +171 -0
  115. package/src/client/PlotBlock.tsx +492 -0
  116. package/src/client/TemplateDrawer.module.css +152 -0
  117. package/src/client/TemplateDrawer.tsx +147 -0
  118. package/src/client/achievement-store.ts +151 -0
  119. package/src/client/achievement-toast.tsx +71 -0
  120. package/src/client/achievements.ts +160 -0
  121. package/src/client/action-context.ts +32 -0
  122. package/src/client/artifact/ArtifactExport.module.css +64 -0
  123. package/src/client/artifact/ExportableGenuiBlock.tsx +100 -0
  124. package/src/client/artifact/create.ts +69 -0
  125. package/src/client/artifact/download.ts +42 -0
  126. package/src/client/artifact/html.ts +157 -0
  127. package/src/client/artifact/index.ts +15 -0
  128. package/src/client/artifact/json.ts +6 -0
  129. package/src/client/artifact/parse.ts +32 -0
  130. package/src/client/artifact/portability.ts +47 -0
  131. package/src/client/artifact/standalone-theme.ts +94 -0
  132. package/src/client/artifact/types.ts +44 -0
  133. package/src/client/asset-echarts-core.ts +39 -0
  134. package/src/client/asset-echarts.ts +27 -0
  135. package/src/client/asset-loader.ts +96 -0
  136. package/src/client/asset-mermaid.ts +13 -0
  137. package/src/client/asset-three.ts +12 -0
  138. package/src/client/blocks/advanced.tsx +537 -0
  139. package/src/client/blocks/basic.tsx +121 -0
  140. package/src/client/blocks/charts.tsx +999 -0
  141. package/src/client/blocks/checkbox.tsx +61 -0
  142. package/src/client/blocks/diagram/geometry.ts +151 -0
  143. package/src/client/blocks/diagram/index.tsx +293 -0
  144. package/src/client/blocks/diagram/layout.ts +202 -0
  145. package/src/client/blocks/diagram/theme.ts +127 -0
  146. package/src/client/blocks/forms.tsx +531 -0
  147. package/src/client/blocks/image.tsx +28 -0
  148. package/src/client/blocks/render-node.tsx +494 -0
  149. package/src/client/blocks/state.ts +65 -0
  150. package/src/client/blocks/svg.tsx +66 -0
  151. package/src/client/dom-fence.tsx +1123 -0
  152. package/src/client/echarts-engine.ts +9 -0
  153. package/src/client/echarts-lazy.ts +41 -0
  154. package/src/client/embed.ts +19 -0
  155. package/src/client/fence-render.tsx +266 -0
  156. package/src/client/gallery.ts +215 -0
  157. package/src/client/genui-runtime/diagnostics.ts +165 -0
  158. package/src/client/genui-runtime/index.ts +1 -0
  159. package/src/client/genui-runtime/limits.ts +54 -0
  160. package/src/client/genui-runtime/normalize.ts +329 -0
  161. package/src/client/genui-runtime/schema.ts +352 -0
  162. package/src/client/genui-runtime/value-utils.ts +67 -0
  163. package/src/client/guard.ts +1965 -0
  164. package/src/client/i18n/en.ts +335 -0
  165. package/src/client/i18n/index.ts +125 -0
  166. package/src/client/i18n/runtime.ts +130 -0
  167. package/src/client/i18n/zh.ts +330 -0
  168. package/src/client/index.tsx +228 -0
  169. package/src/client/inline.ts +106 -0
  170. package/src/client/interaction-store.ts +127 -0
  171. package/src/client/mermaid-core.ts +158 -0
  172. package/src/client/mermaid-lazy.ts +31 -0
  173. package/src/client/mermaid-safe.ts +122 -0
  174. package/src/client/panel-command.ts +138 -0
  175. package/src/client/panel-store.ts +471 -0
  176. package/src/client/panel.tsx +287 -0
  177. package/src/client/parse-partial.ts +170 -0
  178. package/src/client/primitive-adapter.ts +13 -0
  179. package/src/client/primitive-labels.ts +55 -0
  180. package/src/client/safe-math.ts +298 -0
  181. package/src/client/scene3d-core.ts +195 -0
  182. package/src/client/scene3d-lazy.ts +26 -0
  183. package/src/client/session-resolver.ts +33 -0
  184. package/src/client/source-fence.ts +70 -0
  185. package/src/client/spec.ts +896 -0
  186. package/src/client/standalone/asset-loader.ts +9 -0
  187. package/src/client/standalone/bootstrap-types.ts +11 -0
  188. package/src/client/standalone/katex-style.ts +1 -0
  189. package/src/client/standalone/primitive-adapter.tsx +94 -0
  190. package/src/client/standalone/runtime.tsx +27 -0
  191. package/src/client/submission-registry.ts +150 -0
  192. package/src/client/svg-fence.tsx +39 -0
  193. package/src/client/table-details.ts +151 -0
  194. package/src/client/templates.ts +322 -0
  195. package/src/client/toolview.tsx +67 -0
  196. package/src/client/walk-spec.ts +43 -0
  197. package/src/css-modules.d.ts +5 -0
  198. package/src/index.ts +9 -0
  199. package/src/plugin/chart-contract.ts +13 -0
  200. package/src/plugin/fence-feedback.ts +655 -0
  201. package/src/plugin/genui-diagnostic.ts +112 -0
  202. package/src/plugin/index.ts +224 -0
  203. package/src/plugin/inline-content-diagnostic.ts +178 -0
  204. package/src/plugin/invariant.ts +30 -0
  205. package/src/plugin/node-shims.d.ts +31 -0
  206. package/src/plugin/tool.ts +424 -0
  207. package/src/shared/fence-repair.ts +536 -0
  208. package/src/shared/fence-resolve.ts +80 -0
  209. package/tsconfig.json +35 -0
  210. package/tsdown.config.ts +275 -0
@@ -0,0 +1,2221 @@
1
+ /* GenuiBlock: the ```dsh-ui fence renders as an inline component block in the
2
+ conversation. Design system v2 (0.5.0): every geometry and color decision
3
+ resolves through the token layer below, which converges the old grab-bag of
4
+ sizes/gaps/radii (17 font sizes, 6 radii, 10+ gap values, 13 tint levels)
5
+ into five scales:
6
+
7
+ · type display 24 / h1 20 / h2 16 / h3·body 14 / title 13 / meta 12 / data 11
8
+ · spacing 4 · 8 · 12 · 16 (--dsl-g-gap-*)
9
+ · radius surface 12 · control 8 · pill 999
10
+ · color one brand accent for interaction+data; success/warn/error only
11
+ for state; tints normalized to 8% (subtle) / 14% (strong)
12
+ · surfaces components only (card/quiz/plot/accordion…) — the fence block
13
+ itself stays transparent inline; no slab around every fence
14
+
15
+ All colors come from the --dsw-alias-* / --dsw-static-* host tokens; the
16
+ literals here are only last-resort fallbacks for hosts without the token
17
+ sheets. */
18
+
19
+ /* Dark theme: the page is near-black, so the card is lifted by the host's own
20
+ layer step (layer-2) plus a small 4% overlay of the theme's label colour.
21
+ Light mode uses no tint at all — see the token block below for why. */
22
+ body[data-ds-dark-theme] .block,
23
+ body[data-ds-dark-theme] .panel {
24
+ --dsl-g-surface: color-mix(in srgb, var(--dsw-alias-label-primary) 4%,
25
+ var(--dsw-alias-bg-layer-2, var(--dsw-alias-bg-layer-1, var(--dsw-alias-markdown-code-block, transparent))));
26
+ --dsl-g-shadow-card: none;
27
+ }
28
+
29
+ .block,
30
+ .panel {
31
+ /* ── design tokens (design system v2) ──
32
+ Declared on both the inline fence root and the session panel root: the
33
+ panel header sits OUTSIDE the inner .block, so without the shared
34
+ declaration its --dsl-g-* references resolved to undefined (the badge
35
+ gap/padding collapsed to zero). */
36
+ --dsl-g-radius-surface: 12px;
37
+ --dsl-g-radius-control: 8px;
38
+ --dsl-g-radius-sm: 6px;
39
+ --dsl-g-radius-pill: 999px;
40
+
41
+ /* Design system v4: the v3 scale was too compressed — every level sat
42
+ within 26..12px, so nothing dominated. v4 restores a display contrast
43
+ (hero 34 / display 28 / h1 24 / h2 19 / h3 16) against a 14.5px body, and
44
+ the reading floor stays 12px. */
45
+ --dsl-g-font-hero: 34px;
46
+ --dsl-g-font-display: 28px;
47
+ --dsl-g-font-h1: 24px;
48
+ --dsl-g-font-h2: 19px;
49
+ --dsl-g-font-h3: 16px;
50
+ --dsl-g-font-body: 14.5px;
51
+ --dsl-g-font-title: 13.5px;
52
+ --dsl-g-font-meta: 12.5px;
53
+ --dsl-g-font-data: 12px;
54
+
55
+ --dsl-g-gap-lg: 16px;
56
+ --dsl-g-gap-md: 12px;
57
+ --dsl-g-gap-sm: 8px;
58
+ --dsl-g-gap-xs: 4px;
59
+
60
+ --dsl-g-border: var(--dsw-alias-border-l1, var(--dsw-alias-border-l2, rgba(255, 255, 255, 0.12)));
61
+ --dsl-g-border-strong: var(--dsw-alias-border-l2, rgba(255, 255, 255, 0.12));
62
+ --dsl-g-accent: var(--dsw-alias-state-business-primary, #4f8ef7);
63
+ --dsl-g-accent-soft: color-mix(in srgb, var(--dsl-g-accent) var(--dsl-g-tint), transparent);
64
+ /* Row/surface hover: a 4% wash of the theme's own label color works on
65
+ * dark AND light hosts without any off-brand literal. */
66
+ --dsl-g-hover: color-mix(in srgb, var(--dsw-alias-label-primary) 4%, transparent);
67
+ /* Zebra rows / table header wash: half the hover strength, so a striped
68
+ table still reads as one surface rather than a stack of bands. */
69
+ --dsl-g-zebra: color-mix(in srgb, var(--dsw-alias-label-primary) 2.5%, transparent);
70
+ --dsl-g-tint: 8%;
71
+ --dsl-g-tint-strong: 14%;
72
+ --dsl-g-font-mono: var(--ds-font-family-code, ui-monospace, 'SF Mono', monospace);
73
+ /* Elevation is theme-specific, because the two themes lift a card off the
74
+ page by OPPOSITE means:
75
+ light: the host maps every bg layer to white, so there is no layer step
76
+ to take. The card is WHITE, and the lift is carried by the 1px
77
+ surface border plus the shadow — the shadow branch of the
78
+ documented rule "adjacent light surfaces need a >=4% lightness
79
+ step OR a shadow of at least 0 1px 3px rgba(0,0,0,0.10)".
80
+ dark : the page is near-black and drop shadows are nearly invisible
81
+ there, so the layer step + a 4% label overlay do the lifting
82
+ (see the dark override above).
83
+ Do NOT darken the light surface to make it "visible": a card below the
84
+ page's lightness reads as recessed/disabled, not elevated. 0.10.0 shipped
85
+ exactly that — a 10% label tint (= #e7e7e8, page 255) reported in issue
86
+ #159 as "every card is grey". The 1px border keeps its 12% weight and is
87
+ drawn over the surface, so on white it resolves to a quiet #e2e2e3
88
+ hairline instead of 0.10.0's #cdcdce. */
89
+ --dsl-g-surface: var(--dsw-alias-bg-layer-2,
90
+ var(--dsw-alias-bg-layer-1, var(--dsw-alias-markdown-code-block, #fff)));
91
+ /* Borders separate, shadows lift (design standard: "shadows over borders"):
92
+ the outline stays quiet and the layered shadow carries the depth, with the
93
+ first layer at the documented minimum `0 1px 3px rgba(0,0,0,0.10)`. */
94
+ --dsl-g-border-surface: color-mix(in srgb, var(--dsw-alias-label-primary) 8%, transparent);
95
+ --dsl-g-shadow-card: none;
96
+ }
97
+
98
+ .block {
99
+ /* Inline in the conversation: no canvas, no border, no padding — the
100
+ components themselves (card/quiz/plot/…) carry the surfaces. A slab
101
+ around every fence was tried and rejected: a lone stat or text node
102
+ does not need a card wrapper. */
103
+ margin: 8px 0;
104
+ color: var(--dsw-alias-label-primary);
105
+ /* Numbers line up wherever they appear (stats, tables, progress, legends). */
106
+ font-variant-numeric: tabular-nums;
107
+ }
108
+ /* Content-box padding made a <select> and an <input> with the same
109
+ width:100% measure 365 vs 391px. One reset inside our subtree. */
110
+ .block *, .block *::before, .block *::after,
111
+ .panel *, .panel *::before, .panel *::after { box-sizing: border-box; }
112
+
113
+ .banner {
114
+ /* Hierarchy through type, not decoration: 22px/800 with generous space
115
+ below. The accent bars v4 added read as PPT chrome and are gone. */
116
+ font-size: 22px;
117
+ font-weight: 800;
118
+ letter-spacing: -0.02em;
119
+ color: var(--dsw-alias-label-primary);
120
+ padding-bottom: 14px;
121
+ margin-bottom: 18px;
122
+ border-bottom: 1px solid var(--dsl-g-border);
123
+ }
124
+
125
+ /* ---------- layout primitives ---------- */
126
+
127
+ .col { display: flex; flex-direction: column; gap: var(--dsl-g-gap-md); }
128
+ .row { display: flex; align-items: center; gap: var(--dsl-g-gap-md); }
129
+ .row.wrap { flex-wrap: wrap; }
130
+ /* Cards contain fluid charts/tables: divide the available row, not their
131
+ min-content widths (which can collapse a horizontal chart's tracks). */
132
+ .row > .card { flex: 1 1 0; align-self: stretch; }
133
+ .grid { display: grid; gap: var(--dsl-g-gap-md); }
134
+ /* Bento child: occupies N grid columns (the wrapper exists only so the child
135
+ keeps its own layout). */
136
+ .gridSpan { display: flex; flex-direction: column; min-width: 0; }
137
+ .gridSpan > * { flex: 1; }
138
+ /* Narrow conversation column (phone / split pane): a fixed 3-4 column grid
139
+ would squeeze every cell, so the grid collapses to one column. The inline
140
+ gridTemplateColumns from the spec needs !important to be overridden. */
141
+ @media (max-width: 560px) {
142
+ .grid { grid-template-columns: 1fr !important; }
143
+ .row { flex-wrap: wrap; }
144
+ .row > .card { flex-basis: 100%; }
145
+ }
146
+ .spacer { flex: 1; }
147
+ .divider {
148
+ height: 1px;
149
+ background: var(--dsw-alias-markdown-hr, var(--dsl-g-border));
150
+ border: none;
151
+ margin: var(--dsl-g-gap-xs) 0;
152
+ }
153
+
154
+ .card {
155
+ /* Elevated surface: on the dark theme layer-1 (35,35,36) sits only ~14 units
156
+ above the page (21,21,23) and read as "a black box". layer-2 (44,44,46) is
157
+ the host's own elevated surface; light theme maps all layers to one colour,
158
+ so this changes nothing there. */
159
+ background: var(--dsl-g-surface);
160
+ border: 1px solid var(--dsl-g-border-surface);
161
+ border-radius: var(--dsl-g-radius-surface);
162
+ padding: var(--dsl-g-gap-lg);
163
+ display: flex;
164
+ flex-direction: column;
165
+ gap: var(--dsl-g-gap-md);
166
+ min-width: 0;
167
+ box-shadow: var(--dsl-g-shadow-card);
168
+ }
169
+ /* Bento rows size every card to the tallest one. Without this, a short card
170
+ (a single donut next to a tall table) kept its content pinned to the top and
171
+ left a large dead block underneath. The last child absorbs the extra height,
172
+ and the graphic shapes centre themselves inside it. */
173
+ .card > :last-child { flex: 1 1 auto; min-height: 0; }
174
+ .card > .chart,
175
+ .card > .lineChart,
176
+ .card > .donut,
177
+ .card > .hbars { justify-content: center; }
178
+ .card > .col { justify-content: center; }
179
+
180
+ .cardTitle {
181
+ /* Was 12.5px uppercase with tracking while the card BODY is 14.5px: the
182
+ title read as a small grey label, which is why nothing scanned. A card
183
+ title is a section heading, so it sits above body size, sentence case,
184
+ no tracking. The 12.5px uppercase treatment belongs to eyebrows only. */
185
+ font-size: var(--dsl-g-font-h3);
186
+ font-weight: 650;
187
+ letter-spacing: -0.01em;
188
+ text-transform: none;
189
+ color: var(--dsw-alias-label-secondary);
190
+ }
191
+
192
+ /* ---------- text ---------- */
193
+
194
+ .text { color: var(--dsw-alias-label-primary); white-space: pre-line; }
195
+ .text.h1 {
196
+ font-size: var(--dsl-g-font-h1);
197
+ font-weight: 800;
198
+ line-height: 1.25;
199
+ letter-spacing: -0.02em;
200
+ }
201
+ .text.h2 {
202
+ font-size: var(--dsl-g-font-h2);
203
+ font-weight: 700;
204
+ line-height: 1.3;
205
+ letter-spacing: -0.015em;
206
+ }
207
+ .text.h3 { font-size: var(--dsl-g-font-h3); font-weight: 650; line-height: 1.45; }
208
+ /* CJK reads looser than Latin at the same size: 1.7 for body copy, 1.65 for
209
+ secondary lines, and no letter-spacing on Chinese runs (0.02em inserts
210
+ visible gaps between Han characters). */
211
+ /* ~65ch keeps a comfortable reading measure when the block is wide. */
212
+ .text.body { font-size: var(--dsl-g-font-body); line-height: 1.7; color: var(--dsw-alias-label-primary); text-wrap: pretty; max-width: 68ch; }
213
+ .text.muted { font-size: var(--dsl-g-font-title); line-height: 1.65; color: var(--dsw-alias-label-secondary); }
214
+ .text.caption { font-size: var(--dsl-g-font-meta); line-height: 1.6; color: var(--dsw-alias-label-secondary); }
215
+ .text.center { text-align: center; }
216
+
217
+ /* ---------- controls ---------- */
218
+
219
+ .button {
220
+ border: 1px solid var(--dsl-g-border);
221
+ background: var(--dsw-alias-bg-layer-1);
222
+ color: var(--dsw-alias-label-primary);
223
+ border-radius: var(--dsl-g-radius-control);
224
+ padding: 8px var(--dsl-g-gap-lg);
225
+ font-size: var(--dsl-g-font-title);
226
+ font-weight: 600;
227
+ font-family: inherit;
228
+ line-height: 1.4;
229
+ cursor: pointer;
230
+ transition: border-color 0.15s, filter 0.15s, background 0.15s, transform 0.1s;
231
+ text-align: center;
232
+ white-space: pre-line;
233
+ /* A button in a `col` must hug its label; only `full: true` stretches.
234
+ (Default flex `align-items: stretch` used to make every stacked button a
235
+ full-width slab.) */
236
+ align-self: flex-start;
237
+ }
238
+
239
+ .button:hover:not(:disabled) { border-color: var(--dsl-g-accent); filter: brightness(1.06); }
240
+ .button.primary:hover:not(:disabled) { filter: brightness(1.08); }
241
+ /* Press feedback: a 1px sink makes every actionable control feel mechanical. */
242
+ .button:active:not(:disabled) { transform: translateY(1px); filter: brightness(0.97); }
243
+ /* Display-only buttons (no action): honest disabled affordance — the
244
+ * clickable-looking dead button was the top interaction complaint. */
245
+ .button:disabled {
246
+ cursor: not-allowed;
247
+ opacity: 0.45;
248
+ filter: none;
249
+ box-shadow: none;
250
+ pointer-events: none;
251
+ }
252
+ .button.primary {
253
+ background: var(--dsl-g-accent);
254
+ border: none;
255
+ color: #fff;
256
+ box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
257
+ }
258
+ .button.danger {
259
+ background: color-mix(in srgb, var(--dsw-alias-state-error-primary, #ff6b6b) var(--dsl-g-tint), transparent);
260
+ border-color: color-mix(in srgb, var(--dsw-alias-state-error-primary, #ff6b6b) 30%, transparent);
261
+ color: var(--dsw-alias-state-error-primary, #ffb3b3);
262
+ }
263
+ .button.success {
264
+ background: color-mix(in srgb, var(--dsw-alias-state-success-primary, #3ecf8e) var(--dsl-g-tint), transparent);
265
+ border-color: color-mix(in srgb, var(--dsw-alias-state-success-primary, #3ecf8e) 30%, transparent);
266
+ color: var(--dsw-alias-state-success-secondary, #9fe8c5);
267
+ }
268
+ .button.ghost { background: transparent; }
269
+ .button.full { width: 100%; }
270
+ .button.small { padding: 4px 12px; font-size: var(--dsl-g-font-meta); border-radius: var(--dsl-g-radius-control); }
271
+
272
+ .field { display: flex; flex-direction: column; gap: var(--dsl-g-gap-xs); }
273
+ .field > span { font-size: var(--dsl-g-font-meta); color: var(--dsw-alias-label-tertiary); }
274
+
275
+ .input, .select {
276
+ background: var(--dsl-g-surface);
277
+ border: 1px solid var(--dsl-g-border-surface);
278
+ border-radius: var(--dsl-g-radius-control);
279
+ color: var(--dsw-alias-label-primary);
280
+ padding: 8px 12px;
281
+ font-size: var(--dsl-g-font-title);
282
+ font-family: inherit;
283
+ outline: none;
284
+ width: 100%;
285
+ }
286
+
287
+ .input:focus, .select:focus {
288
+ border-color: var(--dsl-g-accent);
289
+ box-shadow: 0 0 0 3px color-mix(in srgb, var(--dsl-g-accent) var(--dsl-g-tint-strong), transparent);
290
+ }
291
+ .input::placeholder { color: var(--dsw-alias-label-caption, #5b6378); }
292
+
293
+ .checkbox { display: flex; align-items: center; gap: var(--dsl-g-gap-sm); font-size: var(--dsl-g-font-title); color: var(--dsw-alias-label-secondary); cursor: pointer; }
294
+ .checkbox input { accent-color: var(--dsl-g-accent); width: 15px; height: 15px; }
295
+ .checkbox input:focus-visible {
296
+ outline: 2px solid var(--dsl-g-accent);
297
+ outline-offset: 2px;
298
+ border-radius: 4px;
299
+ }
300
+
301
+ .link {
302
+ color: var(--dsl-g-accent);
303
+ background: none;
304
+ border: none;
305
+ font-size: var(--dsl-g-font-title);
306
+ font-family: inherit;
307
+ padding: 0;
308
+ cursor: pointer;
309
+ text-decoration: none;
310
+ }
311
+ .link:hover { text-decoration: underline; }
312
+
313
+ /* Link without a whitelisted href: plain styled text, no pointer affordance. */
314
+ .linkText {
315
+ color: var(--dsl-g-accent);
316
+ font-size: var(--dsl-g-font-title);
317
+ font-family: inherit;
318
+ text-decoration: none;
319
+ }
320
+
321
+ /* ---------- native media ---------- */
322
+
323
+ .media {
324
+ margin: 0;
325
+ padding: var(--dsl-g-gap-md);
326
+ display: flex;
327
+ flex-direction: column;
328
+ gap: var(--dsl-g-gap-sm);
329
+ background: var(--dsl-g-surface);
330
+ border: 1px solid var(--dsl-g-border-surface);
331
+ border-radius: var(--dsl-g-radius-surface);
332
+ }
333
+ .mediaLabel { font-size: var(--dsl-g-font-title); font-weight: 600; color: var(--dsw-alias-label-primary); }
334
+ .mediaPlayer { display: block; width: 100%; min-width: 0; border-radius: var(--dsl-g-radius-control); }
335
+ /* Reserve the box before the bytes arrive: without an intrinsic ratio an
336
+ unloaded <img> collapses to 0px and the card looks broken. */
337
+ img.mediaPlayer { aspect-ratio: 16 / 9; object-fit: cover; background: var(--dsl-g-surface); }
338
+ .videoPlayer { max-height: min(70vh, 720px); background: #000; object-fit: contain; }
339
+ .mediaError { font-size: var(--dsl-g-font-title); color: var(--dsw-alias-state-error-primary, #f25a5a); }
340
+
341
+ /* ---------- hero (cover band) ----------
342
+ The answer's focal point: an eyebrow, an oversized metric, a title and a
343
+ subtitle on a soft tinted surface. Tone changes the wash, never the layout. */
344
+
345
+ .hero {
346
+ position: relative;
347
+ display: flex;
348
+ flex-direction: column;
349
+ gap: 6px;
350
+ padding: 22px 24px 24px;
351
+ border-radius: 14px;
352
+ border: 1px solid var(--dsl-g-border-surface);
353
+ background:
354
+ radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--dsl-g-accent) 22%, transparent) 0%, transparent 58%),
355
+ linear-gradient(180deg, color-mix(in srgb, var(--dsl-g-accent) 7%, transparent), transparent 70%),
356
+ var(--dsw-alias-bg-layer-2, var(--dsw-alias-bg-layer-1, transparent));
357
+ overflow: hidden;
358
+ box-shadow: var(--dsl-g-shadow-card);
359
+ }
360
+ .heroSuccess {
361
+ background:
362
+ radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--dsw-alias-state-success-primary, #3ecf8e) 20%, transparent) 0%, transparent 58%),
363
+ linear-gradient(180deg, color-mix(in srgb, var(--dsw-alias-state-success-primary, #3ecf8e) 6%, transparent), transparent 70%),
364
+ var(--dsw-alias-bg-layer-2, var(--dsw-alias-bg-layer-1, transparent));
365
+ }
366
+ .heroWarning {
367
+ background:
368
+ radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--dsw-alias-state-warn-primary, #f5b83d) 20%, transparent) 0%, transparent 58%),
369
+ linear-gradient(180deg, color-mix(in srgb, var(--dsw-alias-state-warn-primary, #f5b83d) 6%, transparent), transparent 70%),
370
+ var(--dsw-alias-bg-layer-2, var(--dsw-alias-bg-layer-1, transparent));
371
+ }
372
+ .heroDanger {
373
+ background:
374
+ radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--dsw-alias-state-error-primary, #ff6b6b) 18%, transparent) 0%, transparent 58%),
375
+ linear-gradient(180deg, color-mix(in srgb, var(--dsw-alias-state-error-primary, #ff6b6b) 6%, transparent), transparent 70%),
376
+ var(--dsw-alias-bg-layer-2, var(--dsw-alias-bg-layer-1, transparent));
377
+ }
378
+ .heroLabel {
379
+ font-size: var(--dsl-g-font-meta);
380
+ font-weight: 700;
381
+ letter-spacing: 0.1em;
382
+ color: var(--dsw-alias-label-secondary);
383
+ }
384
+ .heroTop { display: flex; align-items: baseline; gap: var(--dsl-g-gap-md); flex-wrap: wrap; }
385
+ .heroValue {
386
+ display: inline-flex;
387
+ align-items: baseline;
388
+ gap: 4px;
389
+ font-family: var(--dsl-g-font-mono);
390
+ font-size: 52px;
391
+ font-weight: 750;
392
+ letter-spacing: -0.028em;
393
+ line-height: 1;
394
+ color: var(--dsw-alias-label-primary);
395
+ font-variant-numeric: tabular-nums;
396
+ }
397
+ .heroUnit { font-size: 0.44em; font-weight: 650; letter-spacing: 0; color: var(--dsw-alias-label-secondary); }
398
+ .heroSpark { margin-left: auto; width: 168px; align-self: center; }
399
+ .heroTitle { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; color: var(--dsw-alias-label-primary); line-height: 1.3; }
400
+ .heroSubtitle { font-size: var(--dsl-g-font-title); color: var(--dsw-alias-label-secondary); line-height: 1.6; text-wrap: pretty; }
401
+
402
+ /* ---------- inline markup (inline.ts) ----------
403
+ Emphasis that stays INSIDE a sentence: a paragraph should not have to be
404
+ split into several nodes to bold one phrase. */
405
+ .inlineCode {
406
+ font-family: var(--dsl-g-font-mono);
407
+ font-size: 0.92em;
408
+ padding: 1px 5px;
409
+ border-radius: 5px;
410
+ background: var(--dsl-g-surface);
411
+ border: 1px solid var(--dsl-g-border-surface);
412
+ white-space: nowrap;
413
+ }
414
+ .inlineStrong { font-weight: 680; color: var(--dsw-alias-label-primary); }
415
+ .inlineMark {
416
+ background: color-mix(in srgb, var(--dsl-g-accent) 20%, transparent);
417
+ color: inherit;
418
+ padding: 0 3px;
419
+ border-radius: 4px;
420
+ }
421
+ .inlineLink { color: var(--dsl-g-accent); text-decoration: underline; text-underline-offset: 2px; }
422
+ .inlineLink:hover { text-decoration-thickness: 2px; }
423
+
424
+ /* ---------- badges / stat / progress ---------- */
425
+
426
+ .badge {
427
+ display: inline-flex;
428
+ align-items: center;
429
+ gap: var(--dsl-g-gap-xs);
430
+ font-size: var(--dsl-g-font-meta);
431
+ font-weight: 500;
432
+ line-height: 1.5;
433
+ letter-spacing: 0.01em;
434
+ padding: 1px 10px;
435
+ border-radius: var(--dsl-g-radius-pill);
436
+ width: fit-content;
437
+ background: color-mix(in srgb, var(--dsw-alias-label-tertiary) var(--dsl-g-tint), transparent);
438
+ color: var(--dsw-alias-label-secondary);
439
+ border: 1px solid var(--dsl-g-border);
440
+ }
441
+ .badge.success {
442
+ background: color-mix(in srgb, var(--dsw-alias-state-success-primary, #3ecf8e) var(--dsl-g-tint), transparent);
443
+ color: var(--dsw-alias-state-success-secondary, #7fe3b4);
444
+ border-color: color-mix(in srgb, var(--dsw-alias-state-success-primary, #3ecf8e) 30%, transparent);
445
+ }
446
+ .badge.warn {
447
+ background: color-mix(in srgb, var(--dsw-alias-state-warn-primary, #f5b83d) var(--dsl-g-tint), transparent);
448
+ color: var(--dsw-alias-state-warn-secondary, #f7cf7d);
449
+ border-color: color-mix(in srgb, var(--dsw-alias-state-warn-primary, #f5b83d) 30%, transparent);
450
+ }
451
+ .badge.danger {
452
+ background: color-mix(in srgb, var(--dsw-alias-state-error-primary, #ff6b6b) var(--dsl-g-tint), transparent);
453
+ color: var(--dsw-alias-state-error-primary, #ff9d9d);
454
+ border-color: color-mix(in srgb, var(--dsw-alias-state-error-primary, #ff6b6b) 30%, transparent);
455
+ }
456
+ .badge.accent {
457
+ background: color-mix(in srgb, var(--dsl-g-accent) var(--dsl-g-tint), transparent);
458
+ color: var(--dsw-alias-state-business-primary, #9cc3ff);
459
+ border-color: color-mix(in srgb, var(--dsl-g-accent) 30%, transparent);
460
+ }
461
+
462
+ .stat {
463
+ display: flex;
464
+ flex-direction: column;
465
+ gap: 4px;
466
+ /* Metric card: the number IS the design. No accent stripe, no bar — the
467
+ 40px figure against a 12px uppercase label carries the hierarchy. */
468
+ padding: 14px 16px 15px;
469
+ border: 1px solid var(--dsl-g-border-surface);
470
+ border-radius: var(--dsl-g-radius-surface);
471
+ background: var(--dsl-g-surface);
472
+ min-width: 0;
473
+ overflow: hidden;
474
+ box-shadow: var(--dsl-g-shadow-card);
475
+ }
476
+ /* Hero stat: one number is the answer's anchor (use it once per fence). */
477
+ .statHero { padding: 18px 20px 20px; }
478
+ .statHero .statValue { font-size: 44px; line-height: 1.02; letter-spacing: -0.035em; }
479
+ .statHero .statLabel { font-size: 13px; }
480
+ .grid > .stat, .row > .stat { border-left: 1px solid var(--dsl-g-border); }
481
+ .statLabel {
482
+ font-size: var(--dsl-g-font-meta);
483
+ color: var(--dsw-alias-label-secondary);
484
+ letter-spacing: 0.05em;
485
+ line-height: 1.4;
486
+ }
487
+ .statValue {
488
+ display: flex;
489
+ align-items: baseline;
490
+ gap: 3px;
491
+ font-family: var(--dsl-g-font-mono);
492
+ font-size: var(--dsl-g-font-hero);
493
+ font-weight: 700;
494
+ letter-spacing: -0.03em;
495
+ font-variant-numeric: tabular-nums;
496
+ color: var(--dsw-alias-label-primary);
497
+ line-height: 1.05;
498
+ overflow-wrap: anywhere;
499
+ }
500
+ /* Unit suffix (%, GB, k, ms): same baseline, half the size, muted — the
501
+ number keeps the weight. This is the real typography win in v5. */
502
+ .statUnit {
503
+ font-size: 0.5em;
504
+ font-weight: 600;
505
+ letter-spacing: 0;
506
+ color: var(--dsw-alias-label-secondary);
507
+ }
508
+ .statHero .statUnit { font-size: 0.46em; }
509
+ .statDelta {
510
+ font-size: var(--dsl-g-font-meta);
511
+ font-weight: 600;
512
+ width: fit-content;
513
+ padding: 0 6px;
514
+ border-radius: var(--dsl-g-radius-pill);
515
+ color: var(--dsw-alias-label-secondary);
516
+ background: color-mix(in srgb, var(--dsw-alias-label-primary) 5%, transparent);
517
+ }
518
+ .statDelta.up { color: var(--dsw-alias-state-success-secondary, #1f9d63); background: color-mix(in srgb, var(--dsw-alias-state-success-primary, #22c55e) 12%, transparent); }
519
+ .statSpark {
520
+ display: block;
521
+ width: calc(100% + 32px);
522
+ max-width: none;
523
+ height: 30px;
524
+ margin: 6px -16px -15px;
525
+ overflow: visible;
526
+ }
527
+ .statHero .statSpark { width: calc(100% + 40px); margin: 8px -20px -20px; }
528
+
529
+ .statDelta.down { color: var(--dsw-alias-state-error-primary, #d94848); background: color-mix(in srgb, var(--dsw-alias-state-error-primary, #f25a5a) 12%, transparent); }
530
+
531
+ .progress { display: flex; flex-direction: column; gap: var(--dsl-g-gap-sm); }
532
+ .progressRow {
533
+ display: flex;
534
+ justify-content: space-between;
535
+ gap: var(--dsl-g-gap-md);
536
+ font-size: var(--dsl-g-font-meta);
537
+ color: var(--dsw-alias-label-secondary);
538
+ }
539
+ .progressRow span:last-child { font-family: var(--dsl-g-font-mono); color: var(--dsw-alias-label-primary); font-weight: 600; }
540
+ .track {
541
+ height: 8px;
542
+ border-radius: var(--dsl-g-radius-pill);
543
+ background: color-mix(in srgb, var(--dsw-alias-label-primary) 7%, transparent);
544
+ overflow: hidden;
545
+ box-shadow: inset 0 0 0 1px var(--dsl-g-border);
546
+ }
547
+ .fill {
548
+ height: 100%;
549
+ border-radius: var(--dsl-g-radius-pill);
550
+ /* A faint top sheen keeps the accent bar from reading as a flat slab. */
551
+ background: linear-gradient(180deg, color-mix(in srgb, var(--dsl-g-accent) 85%, white), var(--dsl-g-accent));
552
+ transition: width 0.5s ease;
553
+ }
554
+
555
+ /* ---------- list / table / chart / tabs / avatar ---------- */
556
+
557
+ .list { display: flex; flex-direction: column; }
558
+ .li {
559
+ position: relative;
560
+ padding: 9px var(--dsl-g-gap-xs) 9px 16px;
561
+ display: flex;
562
+ flex-direction: column;
563
+ gap: 3px;
564
+ }
565
+ /* Accent dot instead of a bare indented line: 202 of ~3.7k real nodes are
566
+ list items, and a marker makes a multi-line list scannable at a glance. */
567
+ .li::before {
568
+ content: "";
569
+ position: absolute;
570
+ left: 2px;
571
+ top: 15px;
572
+ width: 5px;
573
+ height: 5px;
574
+ border-radius: 50%;
575
+ background: var(--dsl-g-accent);
576
+ opacity: 0.6;
577
+ }
578
+ .li + .li { border-top: 1px solid var(--dsl-g-border); }
579
+ .li:last-child { border-bottom: none; }
580
+ .liTitle { font-size: var(--dsl-g-font-body); color: var(--dsw-alias-label-primary); font-weight: 650; line-height: 1.5; }
581
+ .liDesc { font-size: var(--dsl-g-font-meta); color: var(--dsw-alias-label-secondary); line-height: 1.55; }
582
+
583
+ .tableWrap {
584
+ /* The rows already carry hairlines; an outline around them would add a second, heavier
585
+ boundary. Scrolling stays so a wide table does not clip its columns. */
586
+ overflow-x: auto;
587
+ overscroll-behavior-x: contain;
588
+ max-width: 100%;
589
+ min-width: 0;
590
+ }
591
+ .table { width: 100%; border-collapse: collapse; font-size: var(--dsl-g-font-title); }
592
+ .table th {
593
+ text-align: left;
594
+ padding: 9px var(--dsl-g-gap-md);
595
+ color: var(--dsw-alias-label-secondary);
596
+ font-weight: 700;
597
+ font-size: var(--dsl-g-font-meta);
598
+ border-bottom: 1px solid var(--dsl-g-border-strong);
599
+ background: var(--dsl-g-zebra);
600
+ white-space: nowrap;
601
+ }
602
+ .table td {
603
+ padding: 10px var(--dsl-g-gap-md);
604
+ border-bottom: 1px solid var(--dsl-g-border);
605
+ color: var(--dsw-alias-label-primary);
606
+ white-space: nowrap;
607
+ font-variant-numeric: tabular-nums;
608
+ line-height: 1.5;
609
+ vertical-align: middle;
610
+ }
611
+ /* The first column is the row's name: give it the weight of a label so a
612
+ table reads as "these rows, these values" instead of a uniform grid. */
613
+ .table td:first-child { font-weight: 600; }
614
+ .table th:first-child { color: var(--dsw-alias-label-primary); }
615
+ .table tbody tr:nth-child(even) { background: var(--dsl-g-zebra); }
616
+ .table tbody tr:hover { background: var(--dsl-g-hover); }
617
+ .table tr:last-child td { border-bottom: none; }
618
+ /* Numeric columns (auto-detected) right-align with tabular numerals — the
619
+ table's data voice. */
620
+ .table th.thNum, .table td.tdNum { text-align: right; }
621
+ /* Signed values read as a delta chip (+12.4% / -3%) without any new spec
622
+ field: the renderer classifies the cell text. */
623
+ .tdDelta { font-weight: 600; }
624
+ .tdDeltaUp { color: var(--dsw-alias-state-success-secondary, #1f9d63); }
625
+ .tdDeltaDown { color: var(--dsw-alias-state-error-primary, #d94848); }
626
+ /* A cell carrying real line breaks opts out of the `nowrap` data voice.
627
+ Prose keeps `pre-line` (newlines paint, spaces collapse as everywhere else);
628
+ a code-shaped cell uses `pre-wrap` so leading indentation survives too.
629
+ Either way the newline characters stay in the DOM, which is what makes the
630
+ cell selectable and copyable as the multi-line snippet the model wrote. */
631
+ .table th.tdMultiline,
632
+ .table td.tdMultiline {
633
+ white-space: pre-line;
634
+ overflow-wrap: anywhere;
635
+ word-break: normal;
636
+ vertical-align: top;
637
+ }
638
+ .table th.tdCode,
639
+ .table td.tdCode {
640
+ white-space: pre-wrap;
641
+ overflow-wrap: anywhere;
642
+ word-break: normal;
643
+ vertical-align: top;
644
+ }
645
+ /* An inline code span keeps its own spacing too (a pasted snippet often lives
646
+ inside backticks), matching the block-level code surface. */
647
+ .inlineCode { white-space: pre-wrap; }
648
+ /* Rich-text owners must paint the real newlines kept by renderInline. Scope
649
+ this to prose/labels: table data keeps nowrap and code keeps pre-wrap. For
650
+ flex controls, target the label span so emphasis and plain text share one
651
+ line-formatting context (rather than becoming separate flex items). */
652
+ .calloutBody,
653
+ .liTitle,
654
+ .liDesc,
655
+ .kvValue,
656
+ .tlDesc,
657
+ .detailBody,
658
+ .accBody,
659
+ .banner,
660
+ .cardTitle,
661
+ .mediaLabel,
662
+ .heroLabel,
663
+ .heroTitle,
664
+ .heroSubtitle,
665
+ .statLabel,
666
+ .ringLabel,
667
+ .ringSub,
668
+ .calloutTitle,
669
+ .stepTitle,
670
+ .stepDesc,
671
+ .kvKey,
672
+ .tlTitle,
673
+ .tlTime,
674
+ .accTitle,
675
+ .field > span,
676
+ .fieldLabel,
677
+ .switchLabel,
678
+ .radio > span,
679
+ .checkbox > span,
680
+ .tab,
681
+ .badgeLabel,
682
+ .gradeQ,
683
+ .gradeAns,
684
+ .gradeRight,
685
+ .gradeExp,
686
+ .quizQuestion,
687
+ .quizFeedback,
688
+ .quizExplanation { white-space: pre-line; }
689
+
690
+ /* sortable header button (v2.9) */
691
+ .thSort {
692
+ background: none;
693
+ border: none;
694
+ padding: 0;
695
+ margin: 0;
696
+ color: inherit;
697
+ font: inherit;
698
+ font-weight: inherit;
699
+ cursor: pointer;
700
+ text-align: left;
701
+ transition: color 0.12s;
702
+ }
703
+ .table th.thNum .thSort { text-align: right; width: 100%; }
704
+ .thSort:hover { color: var(--dsw-alias-label-primary); }
705
+ /* The ACTIVE sort column stays at full contrast — the sort direction mark
706
+ alone is too faint to read which header owns the order. */
707
+ .table th[aria-sort]:not([aria-sort="none"]) .thSort { color: var(--dsw-alias-label-primary); }
708
+ .thSortMark { color: var(--dsl-g-accent); }
709
+ .thSort:focus-visible { outline: 2px solid var(--dsl-g-accent); outline-offset: 1px; border-radius: var(--dsl-g-radius-control); }
710
+
711
+ /* Chart skeleton: plot area with baseline + 25/50/75% gridlines, category
712
+ labels in their own row below the axis (they must never cross the lines). */
713
+ .chart { position: relative; display: flex; flex-direction: column; gap: var(--dsl-g-gap-sm); }
714
+ /* Y-axis gutter + plot share one measured box so tick labels line up with the
715
+ gridlines instead of being guessed from the container height. */
716
+ .chartBody { display: flex; gap: 6px; align-items: stretch; }
717
+ .chartYAxis { position: relative; width: 42px; flex-shrink: 0; }
718
+ .chartYTick {
719
+ position: absolute;
720
+ right: 0;
721
+ transform: translateY(50%);
722
+ font-family: var(--dsl-g-font-mono);
723
+ font-size: var(--dsl-g-font-data);
724
+ color: var(--dsw-alias-label-tertiary);
725
+ white-space: nowrap;
726
+ }
727
+ .chartPlot {
728
+ position: relative;
729
+ display: flex;
730
+ align-items: flex-end;
731
+ gap: var(--dsl-g-gap-sm);
732
+ height: 160px;
733
+ flex: 1;
734
+ min-width: 0;
735
+ }
736
+ .baseline {
737
+ position: absolute;
738
+ left: 0; right: 0; bottom: 0;
739
+ height: 1px;
740
+ background: var(--dsl-g-border-strong);
741
+ pointer-events: none;
742
+ }
743
+ .gridline {
744
+ position: absolute;
745
+ left: 0; right: 0;
746
+ height: 1px;
747
+ background: var(--dsw-alias-border-l1, rgba(255, 255, 255, 0.06));
748
+ pointer-events: none;
749
+ }
750
+ .chartLabels { display: flex; gap: var(--dsl-g-gap-sm); }
751
+ .chartLabels > span { flex: 1; min-width: 0; }
752
+ .chartLegend {
753
+ display: flex;
754
+ flex-wrap: wrap;
755
+ gap: var(--dsl-g-gap-md);
756
+ font-size: var(--dsl-g-font-meta);
757
+ color: var(--dsw-alias-label-secondary);
758
+ line-height: 1.5;
759
+ }
760
+ .legendItem { display: inline-flex; align-items: center; gap: 6px; }
761
+ .legendSwatch { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
762
+ .lineArea { fill: var(--dsl-g-accent); opacity: 0.1; }
763
+
764
+ /* Instant hover readout (charts). Native `title` is slow and cannot show a
765
+ stacked breakdown; this is drawn by the chart itself. */
766
+ .chartTip {
767
+ position: absolute;
768
+ transform: translate(-50%, calc(-100% - 10px));
769
+ display: flex;
770
+ flex-direction: column;
771
+ gap: 2px;
772
+ padding: 6px 10px;
773
+ border-radius: var(--dsl-g-radius-control);
774
+ border: 1px solid var(--dsl-g-border-strong);
775
+ background: var(--dsw-alias-bg-layer-3, var(--dsw-alias-bg-layer-2, var(--dsw-alias-bg-layer-1, #1c1c1e)));
776
+ box-shadow: 0 8px 22px rgba(0, 0, 0, 0.3);
777
+ color: var(--dsw-alias-label-primary);
778
+ font-size: var(--dsl-g-font-meta);
779
+ line-height: 1.4;
780
+ white-space: nowrap;
781
+ pointer-events: none;
782
+ z-index: 6;
783
+ }
784
+ .chartTipRow { display: flex; justify-content: space-between; gap: 14px; }
785
+ .chartTipValue { font-family: var(--dsl-g-font-mono); font-weight: 600; font-variant-numeric: tabular-nums; }
786
+ /* Value printed inside a stacked segment when the segment is tall enough. */
787
+ .stackValue {
788
+ display: block;
789
+ text-align: center;
790
+ font-family: var(--dsl-g-font-mono);
791
+ font-size: var(--dsl-g-font-data);
792
+ font-weight: 700;
793
+ line-height: 1.5;
794
+ color: #fff;
795
+ text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
796
+ font-variant-numeric: tabular-nums;
797
+ }
798
+ .barCol {
799
+ position: relative;
800
+ flex: 1;
801
+ min-width: 0;
802
+ height: 100%;
803
+ }
804
+ .barValue {
805
+ position: absolute;
806
+ left: 0;
807
+ right: 0;
808
+ font-family: var(--dsl-g-font-mono);
809
+ font-size: var(--dsl-g-font-data);
810
+ font-variant-numeric: tabular-nums;
811
+ color: var(--dsw-alias-label-primary);
812
+ font-weight: 600;
813
+ text-align: center;
814
+ line-height: 1.2;
815
+ }
816
+ .stack {
817
+ position: absolute;
818
+ left: 0;
819
+ right: 0;
820
+ bottom: 0;
821
+ display: flex;
822
+ flex-direction: column-reverse;
823
+ /* A hairline gap between segments: without it a two-colour stack reads as
824
+ one block and the boundary is impossible to find. */
825
+ gap: 2px;
826
+ border-radius: 5px 5px 0 0;
827
+ overflow: hidden;
828
+ transition: height 0.6s ease;
829
+ }
830
+ .stackSeg { width: 100%; transition: height 0.6s ease, filter 0.15s; }
831
+ .stackSeg:hover { filter: brightness(1.15); }
832
+ .barFill {
833
+ position: absolute;
834
+ left: 0;
835
+ right: 0;
836
+ border-radius: 5px 5px 0 0;
837
+ min-height: 2px;
838
+ background: linear-gradient(180deg, color-mix(in srgb, var(--dsl-g-accent) 78%, white), var(--dsl-g-accent));
839
+ transition: height 0.6s ease, filter 0.15s;
840
+ }
841
+ .barFill:hover { filter: brightness(1.18); }
842
+ .barLabel {
843
+ font-size: var(--dsl-g-font-meta);
844
+ color: var(--dsw-alias-label-secondary);
845
+ text-align: center;
846
+ white-space: nowrap;
847
+ overflow: hidden;
848
+ text-overflow: ellipsis;
849
+ line-height: 1.5;
850
+ }
851
+
852
+ .tabs { display: flex; flex-direction: column; gap: var(--dsl-g-gap-md); }
853
+ .tabBar { display: flex; gap: 2px; border-bottom: 1px solid var(--dsl-g-border); }
854
+ .tab {
855
+ background: transparent;
856
+ border: none;
857
+ /* Inactive tabs were tertiary (barely readable); secondary + a hover wash
858
+ keeps the hierarchy while staying legible. */
859
+ color: var(--dsw-alias-label-secondary);
860
+ font-size: var(--dsl-g-font-title);
861
+ font-weight: 600;
862
+ font-family: inherit;
863
+ padding: 8px 14px;
864
+ border-bottom: 2px solid transparent;
865
+ border-radius: var(--dsl-g-radius-sm) var(--dsl-g-radius-sm) 0 0;
866
+ margin-bottom: -1px;
867
+ cursor: pointer;
868
+ line-height: 1.5;
869
+ transition: color 0.15s, background 0.15s, border-bottom-color 0.15s;
870
+ }
871
+ .tab:hover { color: var(--dsw-alias-label-primary); background: var(--dsl-g-hover); }
872
+ .tabActive { color: var(--dsw-alias-label-primary); font-weight: 650; border-bottom-color: var(--dsl-g-accent); }
873
+ .tab:focus-visible { outline: 2px solid var(--dsl-g-accent); outline-offset: -2px; }
874
+
875
+ .avatar {
876
+ width: 32px;
877
+ height: 32px;
878
+ border-radius: 50%;
879
+ display: grid;
880
+ place-items: center;
881
+ font-size: var(--dsl-g-font-title);
882
+ font-weight: 700;
883
+ color: #fff;
884
+ flex-shrink: 0;
885
+ border: 1px solid rgba(255, 255, 255, 0.14);
886
+ box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
887
+ }
888
+
889
+ /* ---------- callout ----------
890
+ 语义由「底色 + 标题色」表达,不用左侧竖条:竖条是 PPT 式装饰,底色与
891
+ 文字色才是信息层级。 */
892
+
893
+ .callout {
894
+ display: flex;
895
+ flex-direction: column;
896
+ gap: 3px;
897
+ padding: 12px 15px;
898
+ border-radius: var(--dsl-g-radius-surface);
899
+ border: 1px solid var(--dsl-g-border-surface);
900
+ font-size: var(--dsl-g-font-title);
901
+ line-height: 1.65;
902
+ background: var(--dsl-g-surface);
903
+ box-shadow: var(--dsl-g-shadow-card);
904
+ }
905
+ .calloutInfo { background: color-mix(in srgb, var(--dsl-g-accent) var(--dsl-g-tint), transparent); }
906
+ .calloutSuccess { background: color-mix(in srgb, var(--dsw-alias-state-success-primary, #3ecf8e) var(--dsl-g-tint), transparent); }
907
+ .calloutWarning { background: color-mix(in srgb, var(--dsw-alias-state-warn-primary, #f5b83d) var(--dsl-g-tint), transparent); }
908
+ .calloutError { background: color-mix(in srgb, var(--dsw-alias-state-error-primary, #ff6b6b) var(--dsl-g-tint), transparent); }
909
+ .calloutInfo .calloutTitle { color: var(--dsw-alias-state-business-primary, #4f8ef7); }
910
+ .calloutSuccess .calloutTitle { color: var(--dsw-alias-state-success-primary, #2f9e6b); }
911
+ .calloutWarning .calloutTitle { color: var(--dsw-alias-state-warn-primary, #b8860b); }
912
+ .calloutError .calloutTitle { color: var(--dsw-alias-state-error-primary, #d94848); }
913
+ .calloutTitle {
914
+ display: flex;
915
+ align-items: center;
916
+ gap: 6px;
917
+ font-weight: 700;
918
+ font-size: var(--dsl-g-font-h3);
919
+ letter-spacing: -0.005em;
920
+ color: var(--dsw-alias-label-primary);
921
+ }
922
+ .calloutBody { color: var(--dsw-alias-label-secondary); }
923
+
924
+ /* ---------- steps ---------- */
925
+
926
+ .steps {
927
+ list-style: none;
928
+ margin: 0;
929
+ padding: 0;
930
+ display: flex;
931
+ flex-direction: column;
932
+ gap: var(--dsl-g-gap-md);
933
+ }
934
+ .step { position: relative; display: flex; gap: var(--dsl-g-gap-md); align-items: flex-start; }
935
+ /* Connector between markers: turns a stack of badges into a visible sequence. */
936
+ .step:not(:last-child)::before {
937
+ content: "";
938
+ position: absolute;
939
+ left: 11px;
940
+ top: 27px;
941
+ bottom: calc(-1 * var(--dsl-g-gap-md));
942
+ width: 1px;
943
+ background: var(--dsl-g-border);
944
+ }
945
+ /* The rail behind a finished step picks up the success tint, so the sequence
946
+ reads as progress instead of a row of badges. */
947
+ .stepDone:not(:last-child)::before { background: color-mix(in srgb, var(--dsw-alias-state-success-primary, #3ecf8e) 45%, transparent); }
948
+ .stepTitle { transition: color 0.15s; }
949
+ .stepActive .stepTitle { color: var(--dsl-g-accent); }
950
+ .stepMarker {
951
+ width: 24px;
952
+ height: 24px;
953
+ border-radius: 50%;
954
+ display: grid;
955
+ place-items: center;
956
+ font-size: var(--dsl-g-font-meta);
957
+ font-weight: 700;
958
+ flex-shrink: 0;
959
+ background: var(--dsl-g-surface);
960
+ border: 1px solid var(--dsl-g-border-surface);
961
+ color: var(--dsw-alias-label-secondary);
962
+ z-index: 1;
963
+ }
964
+ .stepDone .stepMarker {
965
+ background: color-mix(in srgb, var(--dsw-alias-state-success-primary, #3ecf8e) 18%, transparent);
966
+ border-color: color-mix(in srgb, var(--dsw-alias-state-success-primary, #3ecf8e) 55%, transparent);
967
+ color: var(--dsw-alias-state-success-primary, #2f9e6b);
968
+ font-size: 13px;
969
+ }
970
+ .stepActive .stepMarker {
971
+ background: color-mix(in srgb, var(--dsl-g-accent) var(--dsl-g-tint-strong), transparent);
972
+ border-color: var(--dsl-g-accent);
973
+ color: var(--dsl-g-accent);
974
+ }
975
+ .stepContent { display: flex; flex-direction: column; gap: 2px; padding-top: 2px; }
976
+ .stepTitle { font-size: var(--dsl-g-font-body); font-weight: 650; color: var(--dsw-alias-label-primary); line-height: 1.45; }
977
+ .stepDesc { font-size: var(--dsl-g-font-meta); color: var(--dsw-alias-label-secondary); line-height: 1.55; }
978
+
979
+ /* ---------- keyvalue ---------- */
980
+
981
+ .keyvalue { margin: 0; display: flex; flex-direction: column; }
982
+ .kvRow {
983
+ display: flex;
984
+ gap: var(--dsl-g-gap-md);
985
+ padding: 7px 0;
986
+ font-size: var(--dsl-g-font-title);
987
+ align-items: baseline;
988
+ }
989
+ .kvRow + .kvRow { border-top: 1px solid var(--dsl-g-border); }
990
+ .kvRow:last-child { border-bottom: none; }
991
+ .kvKey { width: 120px; flex-shrink: 0; color: var(--dsw-alias-label-secondary); font-weight: 600; }
992
+ .kvValue { margin: 0; color: var(--dsw-alias-label-primary); font-weight: 600; word-break: break-word; line-height: 1.5; font-variant-numeric: tabular-nums; }
993
+
994
+ /* ---------- json scalar ---------- */
995
+
996
+ .jsonScalar { font-family: var(--dsl-g-font-mono); font-size: var(--dsl-g-font-title); color: var(--dsw-alias-label-secondary); }
997
+
998
+ /* ---------- chart variants ---------- */
999
+
1000
+ .lineChart { position: relative; display: flex; flex-direction: column; gap: var(--dsl-g-gap-sm); }
1001
+ .linePath { fill: none; stroke: var(--dsl-g-accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
1002
+ .lineDot { fill: var(--dsl-g-accent); transition: filter 0.15s; }
1003
+ .lineDot:hover { filter: brightness(1.3); }
1004
+ .lineGrid { stroke: var(--dsw-alias-border-l1, rgba(255, 255, 255, 0.07)); stroke-width: 1; }
1005
+ .lineGridAxis { stroke: var(--dsl-g-border-strong); stroke-width: 1; }
1006
+ .lineTick {
1007
+ fill: var(--dsw-alias-label-tertiary);
1008
+ font-family: var(--dsl-g-font-mono);
1009
+ font-size: var(--dsl-g-font-data);
1010
+ }
1011
+ .lineLabel {
1012
+ fill: var(--dsw-alias-label-secondary);
1013
+ font-size: var(--dsl-g-font-meta);
1014
+ }
1015
+ .lineLabels { display: flex; justify-content: space-between; }
1016
+
1017
+ .groupedBars { display: flex; gap: var(--dsl-g-gap-xs); align-items: flex-end; height: 100%; width: 100%; }
1018
+ .groupedBar {
1019
+ flex: 1;
1020
+ display: flex;
1021
+ flex-direction: column;
1022
+ align-items: center;
1023
+ justify-content: flex-end;
1024
+ gap: 2px;
1025
+ min-width: 0;
1026
+ height: 100%;
1027
+ }
1028
+ .groupValue {
1029
+ font-family: var(--dsl-g-font-mono);
1030
+ font-size: var(--dsl-g-font-data);
1031
+ font-variant-numeric: tabular-nums;
1032
+ color: var(--dsw-alias-label-secondary);
1033
+ line-height: 1.2;
1034
+ max-width: 100%;
1035
+ overflow: hidden;
1036
+ text-overflow: ellipsis;
1037
+ }
1038
+ .groupedFill { flex: 0 0 auto; width: 100%; border-radius: 4px 4px 2px 2px; min-height: 3px; background: var(--dsl-g-accent); transition: filter 0.15s; }
1039
+ .groupedFill:hover { filter: brightness(1.18); }
1040
+
1041
+ .donut { position: relative; display: flex; align-items: center; gap: var(--dsl-g-gap-lg); }
1042
+ .donutTrack { stroke: var(--dsw-alias-border-l1, rgba(255, 255, 255, 0.08)); }
1043
+ .donutSeg { transition: filter 0.15s; }
1044
+ .donutSeg:hover { filter: brightness(1.18); }
1045
+ .donutTotal { fill: var(--dsw-alias-label-primary); font-size: var(--dsl-g-font-h2); font-weight: 700; }
1046
+ .donutTotalLabel { fill: var(--dsw-alias-label-tertiary); font-size: 10px; }
1047
+ .donutLegend { display: flex; flex-direction: column; justify-content: center; gap: var(--dsl-g-gap-sm); font-size: var(--dsl-g-font-meta); color: var(--dsw-alias-label-secondary); line-height: 1.5; }
1048
+ .donutPct { color: var(--dsw-alias-label-tertiary); font-variant-numeric: tabular-nums; }
1049
+
1050
+ /* ---------- progress ring + target marker ---------- */
1051
+
1052
+ .ring { display: flex; align-items: center; gap: var(--dsl-g-gap-md); }
1053
+ .ringTrack { stroke: color-mix(in srgb, var(--dsw-alias-label-primary) 8%, transparent); }
1054
+ .ringFill { stroke: var(--dsl-g-accent); transition: stroke-dasharray 0.6s ease; }
1055
+ .ringValue {
1056
+ fill: var(--dsw-alias-label-primary);
1057
+ font-family: var(--dsl-g-font-mono);
1058
+ font-size: 17px;
1059
+ font-weight: 700;
1060
+ font-variant-numeric: tabular-nums;
1061
+ }
1062
+ .ringMeta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
1063
+ .ringLabel { font-size: var(--dsl-g-font-body); font-weight: 650; color: var(--dsw-alias-label-primary); }
1064
+ .ringSub { font-size: var(--dsl-g-font-meta); color: var(--dsw-alias-label-secondary); }
1065
+
1066
+ .track { position: relative; overflow: visible; }
1067
+ .targetMark {
1068
+ position: absolute;
1069
+ top: -3px;
1070
+ bottom: -3px;
1071
+ width: 2px;
1072
+ margin-left: -1px;
1073
+ border-radius: 1px;
1074
+ background: var(--dsw-alias-label-primary);
1075
+ opacity: 0.6;
1076
+ }
1077
+
1078
+ /* Live-filter feedback: how many rows survived the bound control. */
1079
+ .filterRow td {
1080
+ padding: 7px var(--dsl-g-gap-md);
1081
+ border-top: 1px solid var(--dsl-g-border);
1082
+ color: var(--dsw-alias-label-secondary);
1083
+ font-size: var(--dsl-g-font-meta);
1084
+ font-variant-numeric: tabular-nums;
1085
+ background: transparent;
1086
+ }
1087
+ .filterHint {
1088
+ display: block;
1089
+ padding-top: 6px;
1090
+ color: var(--dsw-alias-label-secondary);
1091
+ font-size: var(--dsl-g-font-meta);
1092
+ }
1093
+
1094
+ /* Export chips (`table.export`): a quiet toolbar above the table. */
1095
+ .tableTools {
1096
+ display: flex;
1097
+ justify-content: flex-end;
1098
+ gap: 6px;
1099
+ padding: 6px 8px 4px;
1100
+ }
1101
+ .tableTool {
1102
+ padding: 2px 9px;
1103
+ border: 1px solid var(--dsl-g-border);
1104
+ border-radius: var(--dsl-g-radius-pill);
1105
+ background: transparent;
1106
+ color: var(--dsw-alias-label-secondary);
1107
+ font-family: inherit;
1108
+ font-size: var(--dsl-g-font-meta);
1109
+ cursor: pointer;
1110
+ transition: color 0.15s, border-color 0.15s, background 0.15s;
1111
+ }
1112
+ .tableTool:hover { color: var(--dsw-alias-label-primary); border-color: var(--dsl-g-border-strong); background: var(--dsl-g-hover); }
1113
+ .tableTool:focus-visible { outline: 2px solid var(--dsl-g-accent); outline-offset: 1px; }
1114
+ /* Card accent (`card.accent`): the border comes in inline; the title lifts the
1115
+ hue toward the theme's own text colour so it stays legible on dark AND light
1116
+ surfaces (a raw accent colour on a dark card reads muddy). */
1117
+ .card[style*="--dsl-card-accent"] > .cardTitle {
1118
+ color: color-mix(in srgb, var(--dsl-card-accent) 38%, var(--dsw-alias-label-primary));
1119
+ }
1120
+
1121
+ /* Master-detail rows (table.details): a chevron in the first cell opens a
1122
+ full-width panel underneath, so a table can drill down without leaving the
1123
+ page or opening a modal. */
1124
+ .detailCell { padding-left: var(--dsl-g-gap-sm); }
1125
+ .detailToggle {
1126
+ display: inline-flex;
1127
+ align-items: center;
1128
+ gap: 6px;
1129
+ padding: 0;
1130
+ border: none;
1131
+ background: none;
1132
+ font: inherit;
1133
+ font-weight: 600;
1134
+ color: inherit;
1135
+ cursor: pointer;
1136
+ text-align: left;
1137
+ }
1138
+ .detailToggle:hover { color: var(--dsl-g-accent); }
1139
+ .detailToggle:focus-visible { outline: 2px solid var(--dsl-g-accent); outline-offset: 2px; border-radius: 4px; }
1140
+ .detailChevron {
1141
+ flex-shrink: 0;
1142
+ font-size: 10px;
1143
+ color: var(--dsw-alias-label-tertiary);
1144
+ transition: transform 0.18s ease;
1145
+ }
1146
+ .detailChevron[data-open="true"] { transform: rotate(90deg); }
1147
+ .table tbody tr.detailRow > td {
1148
+ padding: 0 var(--dsl-g-gap-md) 12px;
1149
+ background: color-mix(in srgb, var(--dsw-alias-label-primary) 3%, transparent);
1150
+ border-bottom: 1px solid var(--dsl-g-border);
1151
+ }
1152
+ .table tbody tr.detailRow:hover > td { background: color-mix(in srgb, var(--dsw-alias-label-primary) 3%, transparent); }
1153
+ .detailBody {
1154
+ display: flex;
1155
+ flex-direction: column;
1156
+ gap: var(--dsl-g-gap-sm);
1157
+ padding: 12px 14px;
1158
+ border-radius: var(--dsl-g-radius-control);
1159
+ background: var(--dsw-alias-bg-layer-1, transparent);
1160
+ box-shadow: inset 2px 0 0 color-mix(in srgb, var(--dsl-g-accent) 45%, transparent);
1161
+ }
1162
+
1163
+ /* Section header rows (types[0] === 'group').
1164
+ v7 looked like a data row; v8 was a heavy band; v9 was quiet but still read
1165
+ as "same level" — a hairline and air do not say "these rows belong to me".
1166
+ v10 makes the relationship structural: the header is a TOGGLE (chevron +
1167
+ label + child count) and its rows are indented children under a guide rail,
1168
+ so the tree is unmistakable and each section can be folded away. */
1169
+ .groupRow td {
1170
+ background: none;
1171
+ padding: 22px var(--dsl-g-gap-md) 6px;
1172
+ border-top: none;
1173
+ border-bottom: none;
1174
+ box-shadow: inset 0 1px 0 var(--dsl-g-border);
1175
+ }
1176
+ .table tbody tr.groupRow:first-child td { box-shadow: none; padding-top: 10px; }
1177
+ .table tbody tr.groupRow:hover { background: none; }
1178
+ .table tbody tr.groupRow:nth-child(even) { background: none; }
1179
+ .groupToggle {
1180
+ display: inline-flex;
1181
+ align-items: center;
1182
+ gap: 7px;
1183
+ padding: 0;
1184
+ border: none;
1185
+ background: none;
1186
+ font: inherit;
1187
+ font-size: var(--dsl-g-font-title);
1188
+ font-weight: 650;
1189
+ letter-spacing: 0.02em;
1190
+ color: var(--dsw-alias-label-primary);
1191
+ cursor: pointer;
1192
+ }
1193
+ .groupToggle:hover { color: var(--dsl-g-accent); }
1194
+ .groupToggle:focus-visible { outline: 2px solid var(--dsl-g-accent); outline-offset: 2px; border-radius: 4px; }
1195
+ .groupChevron { color: var(--dsw-alias-label-tertiary); font-size: 11px; width: 10px; }
1196
+ .groupCount {
1197
+ padding: 0 7px;
1198
+ border-radius: var(--dsl-g-radius-pill);
1199
+ background: color-mix(in srgb, var(--dsw-alias-label-primary) 7%, transparent);
1200
+ color: var(--dsw-alias-label-secondary);
1201
+ font-size: var(--dsl-g-font-meta);
1202
+ font-weight: 600;
1203
+ font-variant-numeric: tabular-nums;
1204
+ }
1205
+ /* Children: indented one level and tied to the section by a guide rail. */
1206
+ .table tbody tr.groupChild td:first-child {
1207
+ padding-left: calc(var(--dsl-g-gap-md) + 22px);
1208
+ position: relative;
1209
+ }
1210
+ .table tbody tr.groupChild td:first-child::before {
1211
+ content: "";
1212
+ position: absolute;
1213
+ left: calc(var(--dsl-g-gap-md) + 8px);
1214
+ top: 0;
1215
+ bottom: 0;
1216
+ width: 1px;
1217
+ background: var(--dsl-g-border);
1218
+ }
1219
+ .table tbody tr.groupChild:last-child td:first-child::before { bottom: 50%; }
1220
+ .table tfoot td {
1221
+ border-top: 1px solid var(--dsl-g-border-strong);
1222
+ border-bottom: none;
1223
+ font-weight: 700;
1224
+ color: var(--dsw-alias-label-primary);
1225
+ background: color-mix(in srgb, var(--dsw-alias-label-primary) 4%, transparent);
1226
+ }
1227
+
1228
+ /* Card surface tones: tint + colored title, no bars. */
1229
+ .cardInfo { background: color-mix(in srgb, var(--dsl-g-accent) var(--dsl-g-tint), transparent); }
1230
+ .cardSuccess { background: color-mix(in srgb, var(--dsw-alias-state-success-primary, #3ecf8e) var(--dsl-g-tint), transparent); }
1231
+ .cardWarning { background: color-mix(in srgb, var(--dsw-alias-state-warn-primary, #f5b83d) var(--dsl-g-tint), transparent); }
1232
+ .cardDanger { background: color-mix(in srgb, var(--dsw-alias-state-error-primary, #ff6b6b) var(--dsl-g-tint), transparent); }
1233
+ .cardInfo > .cardTitle { color: var(--dsw-alias-state-business-primary, #4f8ef7); }
1234
+ .cardSuccess > .cardTitle { color: var(--dsw-alias-state-success-primary, #2f9e6b); }
1235
+ .cardWarning > .cardTitle { color: var(--dsw-alias-state-warn-primary, #b8860b); }
1236
+ .cardDanger > .cardTitle { color: var(--dsw-alias-state-error-primary, #d94848); }
1237
+
1238
+ /* ---------- horizontal bars (chart.horizontal) ---------- */
1239
+
1240
+ .hbars { display: flex; flex-direction: column; gap: var(--dsl-g-gap-sm); }
1241
+ .hbarRow { display: flex; align-items: center; gap: var(--dsl-g-gap-md); }
1242
+ .hbarLabel {
1243
+ width: 96px;
1244
+ flex-shrink: 0;
1245
+ text-align: right;
1246
+ font-size: var(--dsl-g-font-meta);
1247
+ color: var(--dsw-alias-label-secondary);
1248
+ white-space: nowrap;
1249
+ overflow: hidden;
1250
+ text-overflow: ellipsis;
1251
+ }
1252
+ .hbarTracks { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
1253
+ .hbarSeg { height: 100%; }
1254
+ .hbarTrack {
1255
+ display: flex;
1256
+ height: 14px;
1257
+ border-radius: var(--dsl-g-radius-sm);
1258
+ background: color-mix(in srgb, var(--dsw-alias-label-primary) 7%, transparent);
1259
+ overflow: hidden;
1260
+ }
1261
+ .hbarFill {
1262
+ height: 100%;
1263
+ min-width: 2px;
1264
+ border-radius: var(--dsl-g-radius-sm);
1265
+ background: var(--dsl-g-accent);
1266
+ transition: width 0.6s ease;
1267
+ }
1268
+ .hbarValue {
1269
+ width: 64px;
1270
+ flex-shrink: 0;
1271
+ text-align: right;
1272
+ font-family: var(--dsl-g-font-mono);
1273
+ font-size: var(--dsl-g-font-data);
1274
+ color: var(--dsw-alias-label-primary);
1275
+ font-variant-numeric: tabular-nums;
1276
+ }
1277
+
1278
+ /* ---------- table cell types (types: ["bar"|"badge"|...]) ---------- */
1279
+
1280
+ .cellBadge {
1281
+ display: inline-block;
1282
+ padding: 1px 8px;
1283
+ border-radius: var(--dsl-g-radius-pill);
1284
+ background: color-mix(in srgb, var(--dsl-g-accent) var(--dsl-g-tint), transparent);
1285
+ color: var(--dsw-alias-label-primary);
1286
+ font-size: var(--dsl-g-font-meta);
1287
+ font-weight: 600;
1288
+ }
1289
+ .cellSpark { display: block; width: 88px; height: 22px; overflow: visible; }
1290
+ .cellRing { display: inline-flex; align-items: center; gap: 6px; }
1291
+ .cellRingText {
1292
+ font-family: var(--dsl-g-font-mono);
1293
+ font-size: var(--dsl-g-font-data);
1294
+ color: var(--dsw-alias-label-primary);
1295
+ font-variant-numeric: tabular-nums;
1296
+ }
1297
+ .cellIndex {
1298
+ display: inline-block;
1299
+ min-width: 18px;
1300
+ font-family: var(--dsl-g-font-mono);
1301
+ font-size: var(--dsl-g-font-data);
1302
+ color: var(--dsw-alias-label-tertiary);
1303
+ font-variant-numeric: tabular-nums;
1304
+ }
1305
+ .cellBar {
1306
+ position: relative;
1307
+ display: block;
1308
+ min-width: 104px;
1309
+ height: 18px;
1310
+ border-radius: var(--dsl-g-radius-sm);
1311
+ background: color-mix(in srgb, var(--dsw-alias-label-primary) 7%, transparent);
1312
+ overflow: hidden;
1313
+ }
1314
+ .cellBarFill {
1315
+ position: absolute;
1316
+ inset: 0 auto 0 0;
1317
+ border-radius: var(--dsl-g-radius-sm);
1318
+ background: color-mix(in srgb, var(--dsl-g-accent) 72%, transparent);
1319
+ }
1320
+ .cellBarText {
1321
+ position: relative;
1322
+ display: block;
1323
+ text-align: right;
1324
+ padding: 0 6px;
1325
+ font-family: var(--dsl-g-font-mono);
1326
+ font-size: var(--dsl-g-font-data);
1327
+ line-height: 18px;
1328
+ color: var(--dsw-alias-label-primary);
1329
+ }
1330
+
1331
+ /* ---------- radio / switch / textarea ---------- */
1332
+
1333
+ .fieldGroup { display: flex; flex-direction: column; gap: var(--dsl-g-gap-sm); }
1334
+ .fieldLabel { font-size: var(--dsl-g-font-meta); color: var(--dsw-alias-label-tertiary); }
1335
+ .radio { display: flex; align-items: center; gap: var(--dsl-g-gap-sm); font-size: var(--dsl-g-font-title); color: var(--dsw-alias-label-secondary); cursor: pointer; line-height: 1.5; }
1336
+ .radio input { accent-color: var(--dsl-g-accent); }
1337
+ .radio input:focus-visible {
1338
+ outline: 2px solid var(--dsl-g-accent);
1339
+ outline-offset: 2px;
1340
+ border-radius: 50%;
1341
+ }
1342
+
1343
+ /* ---------- submit(交卷聚合 / 本地判卷) ---------- */
1344
+
1345
+ .submitRow { display: flex; align-items: center; gap: var(--dsl-g-gap-md); margin-top: 2px; }
1346
+ .submit { align-self: flex-start; }
1347
+ .submitHint { font-size: var(--dsl-g-font-meta); color: var(--dsw-alias-label-tertiary); }
1348
+
1349
+ .btnSent {
1350
+ margin-left: var(--dsl-g-gap-sm);
1351
+ font-size: var(--dsl-g-font-meta);
1352
+ font-weight: 600;
1353
+ color: var(--dsw-alias-state-success-primary, #3ecf8e);
1354
+ }
1355
+
1356
+ /* local grading result panel */
1357
+ .gradeWrap { display: flex; flex-direction: column; gap: var(--dsl-g-gap-md); }
1358
+ .gradeScore { display: flex; align-items: baseline; gap: var(--dsl-g-gap-sm); }
1359
+ .gradeScoreValue { font-size: var(--dsl-g-font-display); font-weight: 700; color: var(--dsw-alias-label-primary); line-height: 1.2; }
1360
+ .gradeScoreLabel { font-size: var(--dsl-g-font-meta); color: var(--dsw-alias-label-tertiary); }
1361
+ .gradeList { display: flex; flex-direction: column; gap: var(--dsl-g-gap-sm); }
1362
+ .gradeItem {
1363
+ display: grid;
1364
+ /* Question on its own full row (see .gradeQ), then tag | answer. The
1365
+ answer column must be minmax(0,1fr): a bare 1fr child defaults to
1366
+ min-width:auto, so a long question in an auto column squeezes the
1367
+ answer down to one CJK glyph per line (#62). */
1368
+ grid-template-columns: auto minmax(0, 1fr);
1369
+ gap: 6px 10px;
1370
+ align-items: baseline;
1371
+ font-size: var(--dsl-g-font-title);
1372
+ padding: var(--dsl-g-gap-sm) 12px;
1373
+ border-radius: var(--dsl-g-radius-control);
1374
+ border: 1px solid var(--dsl-g-border);
1375
+ background: var(--dsw-alias-bg-layer-1);
1376
+ line-height: 1.5;
1377
+ }
1378
+ .gradeItemOk { border-color: color-mix(in srgb, var(--dsw-alias-state-success-primary, #3ecf8e) 30%, transparent); }
1379
+ .gradeItemNo { border-color: color-mix(in srgb, var(--dsw-alias-state-error-primary, #ff6b6b) 30%, transparent); }
1380
+ .gradeQ { grid-column: 1 / -1; margin-bottom: 8px; overflow-wrap: anywhere; font-weight: 600; color: var(--dsw-alias-label-primary); }
1381
+ .gradeTag { font-weight: 700; }
1382
+ .gradeItemOk .gradeTag { color: var(--dsw-alias-state-success-primary, #3ecf8e); }
1383
+ .gradeItemNo .gradeTag { color: var(--dsw-alias-state-error-primary, #ff6b6b); }
1384
+ .gradeAns { overflow-wrap: anywhere; color: var(--dsw-alias-label-secondary); }
1385
+ .gradeRight { color: var(--dsw-alias-state-error-primary, #ffb3b3); }
1386
+ .gradeExp { grid-column: 1 / -1; overflow-wrap: anywhere; font-size: var(--dsl-g-font-meta); color: var(--dsw-alias-label-tertiary); line-height: 1.5; }
1387
+
1388
+ .switchRow { display: flex; align-items: center; justify-content: space-between; gap: var(--dsl-g-gap-md); cursor: pointer; }
1389
+ .switchRow:focus-within .switch { box-shadow: 0 0 0 3px color-mix(in srgb, var(--dsl-g-accent) var(--dsl-g-tint-strong), transparent); }
1390
+ .switchLabel { font-size: var(--dsl-g-font-title); color: var(--dsw-alias-label-primary); line-height: 1.5; }
1391
+ .switch {
1392
+ width: 38px; height: 22px; border-radius: var(--dsl-g-radius-pill);
1393
+ border: 1px solid var(--dsl-g-border);
1394
+ background: var(--dsw-alias-bg-base, #17171a);
1395
+ position: relative;
1396
+ transition: background 0.2s;
1397
+ }
1398
+ .switchOn { background: var(--dsl-g-accent); border-color: transparent; }
1399
+ .switchKnob {
1400
+ position: absolute;
1401
+ top: 3px; left: 3px;
1402
+ width: 14px; height: 14px;
1403
+ border-radius: 50%;
1404
+ background: #fff;
1405
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
1406
+ transition: left 0.2s;
1407
+ }
1408
+ .switchOn .switchKnob { left: 19px; }
1409
+
1410
+ /* slider form node (v2.9) */
1411
+ .sliderRow {
1412
+ display: flex;
1413
+ align-items: center;
1414
+ gap: var(--dsl-g-gap-md);
1415
+ width: 100%;
1416
+ }
1417
+ .sliderInput {
1418
+ flex: 1;
1419
+ min-width: 0;
1420
+ accent-color: var(--dsl-g-accent);
1421
+ }
1422
+ .sliderInput:focus-visible {
1423
+ outline: 2px solid var(--dsl-g-accent);
1424
+ outline-offset: 2px;
1425
+ border-radius: 4px;
1426
+ }
1427
+ .sliderValue {
1428
+ min-width: 44px;
1429
+ text-align: right;
1430
+ font-family: var(--dsl-g-font-mono);
1431
+ font-size: var(--dsl-g-font-data);
1432
+ color: var(--dsw-alias-label-primary);
1433
+ }
1434
+
1435
+ .textarea {
1436
+ width: 100%;
1437
+ background: var(--dsl-g-surface);
1438
+ border: 1px solid var(--dsl-g-border-surface);
1439
+ border-radius: var(--dsl-g-radius-control);
1440
+ color: var(--dsw-alias-label-primary);
1441
+ padding: var(--dsl-g-gap-sm) 12px;
1442
+ font-size: var(--dsl-g-font-title);
1443
+ font-family: inherit;
1444
+ line-height: 1.5;
1445
+ outline: none;
1446
+ resize: vertical;
1447
+ }
1448
+ .textarea:focus {
1449
+ border-color: var(--dsl-g-accent);
1450
+ box-shadow: 0 0 0 3px color-mix(in srgb, var(--dsl-g-accent) var(--dsl-g-tint-strong), transparent);
1451
+ }
1452
+
1453
+ /* ---------- accordion ---------- */
1454
+
1455
+ .accordion {
1456
+ display: flex;
1457
+ flex-direction: column;
1458
+ border: 1px solid var(--dsl-g-border-surface);
1459
+ border-radius: var(--dsl-g-radius-surface);
1460
+ overflow: hidden;
1461
+ background: var(--dsl-g-surface);
1462
+ box-shadow: var(--dsl-g-shadow-card);
1463
+ }
1464
+ .accItem { border-bottom: 1px solid var(--dsl-g-border); }
1465
+ .accItem:last-child { border-bottom: none; }
1466
+ .accHead {
1467
+ width: 100%;
1468
+ display: flex;
1469
+ align-items: center;
1470
+ justify-content: space-between;
1471
+ gap: var(--dsl-g-gap-sm);
1472
+ background: transparent;
1473
+ border: none;
1474
+ color: var(--dsw-alias-label-primary);
1475
+ padding: 12px 15px;
1476
+ font-size: var(--dsl-g-font-body);
1477
+ font-weight: 600;
1478
+ cursor: pointer;
1479
+ font-family: inherit;
1480
+ line-height: 1.5;
1481
+ text-align: left;
1482
+ transition: background 0.15s, color 0.15s;
1483
+ }
1484
+ .accHead:hover { background: var(--dsl-g-hover); }
1485
+ .accHead[aria-expanded="true"] { border-bottom: 1px solid var(--dsl-g-border); }
1486
+ /* One chevron that rotates, instead of swapping glyphs: the state change reads
1487
+ as motion, and the closed/open shapes stay consistent. */
1488
+ .accChevron {
1489
+ flex-shrink: 0;
1490
+ color: var(--dsw-alias-label-tertiary);
1491
+ font-size: 11px;
1492
+ transition: transform 0.2s ease;
1493
+ }
1494
+ .accChevron[data-open="true"] { transform: rotate(90deg); }
1495
+ .accBody {
1496
+ padding: 12px 15px 14px;
1497
+ display: flex;
1498
+ flex-direction: column;
1499
+ gap: var(--dsl-g-gap-sm);
1500
+ background: color-mix(in srgb, var(--dsw-alias-label-primary) 2%, transparent);
1501
+ }
1502
+
1503
+ /* ---------- copy chip ---------- */
1504
+
1505
+ .copyChip {
1506
+ border: 1px solid var(--dsl-g-border);
1507
+ background: var(--dsw-alias-bg-layer-1);
1508
+ color: var(--dsw-alias-label-primary);
1509
+ border-radius: var(--dsl-g-radius-control);
1510
+ padding: 6px 14px;
1511
+ font-size: var(--dsl-g-font-title);
1512
+ font-weight: 600;
1513
+ font-family: inherit;
1514
+ cursor: pointer;
1515
+ width: fit-content;
1516
+ transition: all 0.15s;
1517
+ }
1518
+ .copyChip:hover { border-color: var(--dsl-g-accent); }
1519
+ .copyChip:active { transform: translateY(1px); }
1520
+ .copyChipDone { border-color: var(--dsw-alias-state-success-primary, #3ecf8e); color: var(--dsw-alias-state-success-primary, #3ecf8e); }
1521
+
1522
+ /* ---------- mermaid ---------- */
1523
+
1524
+ .mermaid { overflow-x: auto; padding: var(--dsl-g-gap-xs) 0; }
1525
+ .mermaid svg { max-width: 100%; height: auto; }
1526
+ .mermaidFallback { display: flex; flex-direction: column; gap: var(--dsl-g-gap-sm); }
1527
+ .mermaidFallback pre {
1528
+ margin: 0;
1529
+ padding: var(--dsl-g-gap-sm) 10px;
1530
+ background: var(--dsw-alias-bg-base, #17171a);
1531
+ border: 1px solid var(--dsl-g-border);
1532
+ border-radius: var(--dsl-g-radius-control);
1533
+ overflow-x: auto;
1534
+ font-family: var(--dsl-g-font-mono);
1535
+ font-size: var(--dsl-g-font-meta);
1536
+ }
1537
+ .mermaidErr { color: var(--dsw-alias-state-error-primary, #ff6b6b); font-size: var(--dsl-g-font-meta); }
1538
+ .mermaidHint { color: var(--dsw-alias-label-tertiary); font-size: var(--dsl-g-font-meta); }
1539
+
1540
+ /* ---------- scene3d ---------- */
1541
+
1542
+ .scene3dWrap { display: flex; flex-direction: column; gap: var(--dsl-g-gap-sm); }
1543
+
1544
+ /* ---------- echart ---------- */
1545
+
1546
+ .echartWrap {
1547
+ display: flex;
1548
+ flex-direction: column;
1549
+ gap: var(--dsl-g-gap-sm);
1550
+ padding: var(--dsl-g-gap-md);
1551
+ background: var(--dsw-alias-bg-layer-1, var(--dsw-alias-markdown-code-block));
1552
+ border: 1px solid var(--dsl-g-border);
1553
+ border-radius: var(--dsl-g-radius-surface);
1554
+ }
1555
+ .echartTitle {
1556
+ font-size: var(--dsl-g-font-title);
1557
+ font-weight: 600;
1558
+ color: var(--dsw-alias-label-primary);
1559
+ }
1560
+ .echartCanvas {
1561
+ width: 100%;
1562
+ min-height: 0;
1563
+ }
1564
+ .echartHint {
1565
+ color: var(--dsw-alias-label-tertiary);
1566
+ font-size: var(--dsl-g-font-meta);
1567
+ }
1568
+ .echartFallback {
1569
+ display: flex;
1570
+ flex-direction: column;
1571
+ gap: var(--dsl-g-gap-sm);
1572
+ padding: var(--dsl-g-gap-md);
1573
+ background: var(--dsw-alias-bg-layer-1, var(--dsw-alias-markdown-code-block));
1574
+ border: 1px solid var(--dsl-g-border);
1575
+ border-radius: var(--dsl-g-radius-surface);
1576
+ }
1577
+ .echartErr {
1578
+ color: var(--dsw-alias-state-error-primary, #ff6b6b);
1579
+ font-size: var(--dsl-g-font-meta);
1580
+ }
1581
+ .scene3dTitle { font-size: var(--dsl-g-font-title); font-weight: 700; color: var(--dsw-alias-label-primary); }
1582
+ .scene3dCanvas {
1583
+ height: 240px;
1584
+ border-radius: var(--dsl-g-radius-surface);
1585
+ overflow: hidden;
1586
+ background: var(--dsw-alias-bg-base, #17171a);
1587
+ border: 1px solid var(--dsl-g-border);
1588
+ }
1589
+ .scene3dCanvas canvas { display: block; }
1590
+ .scene3dHint { color: var(--dsw-alias-label-tertiary); font-size: var(--dsl-g-font-meta); }
1591
+
1592
+ /* ---------- timeline ---------- */
1593
+
1594
+ .timeline { display: flex; flex-direction: column; }
1595
+ .tlItem { display: flex; gap: var(--dsl-g-gap-md); }
1596
+ .tlRail { display: flex; flex-direction: column; align-items: center; width: 10px; flex-shrink: 0; }
1597
+ .tlDot {
1598
+ width: 9px;
1599
+ height: 9px;
1600
+ border-radius: 50%;
1601
+ margin-top: 5px;
1602
+ flex-shrink: 0;
1603
+ background: var(--dsl-g-accent);
1604
+ /* A soft halo instead of a hard ring: the dot reads as a marker on the rail
1605
+ rather than a bullet stuck to the text. */
1606
+ box-shadow: 0 0 0 3px color-mix(in srgb, var(--dsl-g-accent) 16%, transparent);
1607
+ transition: transform 0.15s ease;
1608
+ }
1609
+ .tlItem:hover .tlDot { transform: scale(1.15); }
1610
+ .tlLine { flex: 1; width: 1px; margin: 4px 0 0; background: var(--dsl-g-border); }
1611
+ .tlBody { padding-bottom: 18px; flex: 1; min-width: 0; }
1612
+ .tlItem:last-child .tlBody { padding-bottom: 0; }
1613
+ .tlHead { display: flex; align-items: baseline; gap: var(--dsl-g-gap-md); }
1614
+ .tlTitle { font-size: var(--dsl-g-font-body); font-weight: 650; color: var(--dsw-alias-label-primary); line-height: 1.45; }
1615
+ .tlTime {
1616
+ margin-left: auto;
1617
+ white-space: nowrap;
1618
+ font-family: var(--dsl-g-font-mono);
1619
+ font-size: var(--dsl-g-font-data);
1620
+ color: var(--dsw-alias-label-tertiary);
1621
+ font-variant-numeric: tabular-nums;
1622
+ }
1623
+ .tlDesc { font-size: var(--dsl-g-font-title); color: var(--dsw-alias-label-secondary); margin-top: 3px; line-height: 1.55; }
1624
+
1625
+ /* ---------- file tree ---------- */
1626
+
1627
+ .fileTree {
1628
+ font-family: var(--dsl-g-font-mono);
1629
+ font-size: var(--dsl-g-font-meta);
1630
+ display: flex;
1631
+ flex-direction: column;
1632
+ /* A deep/long row must never collapse the column: the tree itself is the
1633
+ horizontal scroll container (mirrors .tableWrap). Names additionally
1634
+ ellipsize, so scroll appears only when indentation still overflows. */
1635
+ overflow-x: auto;
1636
+ overscroll-behavior-x: contain;
1637
+ max-width: 100%;
1638
+ min-width: 0;
1639
+ }
1640
+ .ftChildren { display: block; }
1641
+ .ftRow {
1642
+ position: relative;
1643
+ display: flex;
1644
+ align-items: center;
1645
+ gap: 6px;
1646
+ min-height: 26px;
1647
+ padding: 2px var(--dsl-g-gap-xs);
1648
+ border-radius: var(--dsl-g-radius-sm);
1649
+ transition: background 0.12s;
1650
+ }
1651
+ .ftRow:hover { background: color-mix(in srgb, var(--dsw-alias-label-primary) 5%, transparent); }
1652
+ /* One hairline per depth level: the rail that makes a tree read as a tree. */
1653
+ /* Depth rails are absolutely positioned so the indentation itself stays the
1654
+ inline padding-left on the row (it must survive a stylesheet failure). */
1655
+ .ftGuide {
1656
+ position: absolute;
1657
+ top: 0;
1658
+ bottom: 0;
1659
+ width: 1px;
1660
+ background: var(--dsl-g-border);
1661
+ }
1662
+ .ftChevron {
1663
+ width: 10px;
1664
+ flex-shrink: 0;
1665
+ font-size: 10px;
1666
+ line-height: 1;
1667
+ color: var(--dsw-alias-label-tertiary);
1668
+ transition: transform 0.15s ease;
1669
+ transform-origin: 50% 50%;
1670
+ }
1671
+ .ftChevron[data-open="true"] { transform: rotate(90deg); }
1672
+ .ftGlyph { display: inline-flex; flex-shrink: 0; color: var(--dsw-alias-label-tertiary); }
1673
+ .ftGlyphDir { color: var(--dsl-g-accent); }
1674
+ /* Long paths must stay on ONE line (issue #28: per-character vertical
1675
+ wrapping when the host message column gets narrow). */
1676
+ .ftName {
1677
+ color: var(--dsw-alias-label-secondary);
1678
+ font-size: var(--dsl-g-font-title);
1679
+ white-space: nowrap;
1680
+ overflow: hidden;
1681
+ text-overflow: ellipsis;
1682
+ min-width: 0;
1683
+ }
1684
+ .ftDir { color: var(--dsw-alias-label-primary); font-weight: 650; }
1685
+ .ftNameBtn {
1686
+ display: inline-flex;
1687
+ align-items: center;
1688
+ gap: var(--dsl-g-gap-sm);
1689
+ min-width: 0;
1690
+ max-width: 100%;
1691
+ background: none;
1692
+ border: none;
1693
+ font-family: inherit;
1694
+ font-size: var(--dsl-g-font-title);
1695
+ padding: 0;
1696
+ cursor: default;
1697
+ text-align: left;
1698
+ }
1699
+ /* Directory rows are interactive: show the affordance only when clickable. */
1700
+ button.ftNameBtn[aria-expanded] { cursor: pointer; }
1701
+ .ftNameBtn:focus-visible { outline: 2px solid var(--dsl-g-accent); outline-offset: 1px; border-radius: var(--dsl-g-radius-control); }
1702
+
1703
+ /* ---------- breadcrumb ---------- */
1704
+
1705
+ .breadcrumb { display: flex; align-items: center; flex-wrap: wrap; gap: var(--dsl-g-gap-xs); font-size: var(--dsl-g-font-title); }
1706
+ .bcItem { display: inline-flex; align-items: center; gap: var(--dsl-g-gap-xs); }
1707
+ .bcText { color: var(--dsw-alias-label-secondary); cursor: pointer; }
1708
+ .bcText:hover { color: var(--dsl-g-accent); }
1709
+ .bcCurrent { color: var(--dsw-alias-label-primary); font-weight: 600; cursor: default; }
1710
+ .bcSep { color: var(--dsw-alias-label-caption, var(--dsw-alias-label-tertiary)); }
1711
+
1712
+ /* ---------- streaming skeleton ----------
1713
+ Shown while a fence body is still arriving and no component has finished.
1714
+ It replaces half-written JSON with a quiet shimmer that mirrors the block
1715
+ layout; the settle sweep restores the raw code block if the body never
1716
+ parses. */
1717
+
1718
+ .skeleton {
1719
+ display: flex;
1720
+ flex-direction: column;
1721
+ gap: var(--dsl-g-gap-md);
1722
+ padding: var(--dsl-g-gap-lg);
1723
+ border: 1px solid var(--dsl-g-border);
1724
+ border-radius: var(--dsl-g-radius-surface);
1725
+ background: var(--dsl-g-surface);
1726
+ }
1727
+ .skeletonTitle {
1728
+ display: block;
1729
+ width: 34%;
1730
+ height: 12px;
1731
+ border-radius: var(--dsl-g-radius-pill);
1732
+ }
1733
+ .skeletonBars { display: flex; gap: var(--dsl-g-gap-sm); }
1734
+ .skeletonBars > span { display: block; height: 44px; border-radius: var(--dsl-g-radius-control); }
1735
+ .skeletonBlock { display: block; height: 76px; border-radius: var(--dsl-g-radius-control); }
1736
+ .skeletonTitle,
1737
+ .skeletonBars > span,
1738
+ .skeletonBlock {
1739
+ background: linear-gradient(
1740
+ 90deg,
1741
+ color-mix(in srgb, var(--dsw-alias-label-primary) 6%, transparent) 0%,
1742
+ color-mix(in srgb, var(--dsw-alias-label-primary) 13%, transparent) 50%,
1743
+ color-mix(in srgb, var(--dsw-alias-label-primary) 6%, transparent) 100%
1744
+ );
1745
+ background-size: 200% 100%;
1746
+ animation: dsl-skeleton 1.4s ease-in-out infinite;
1747
+ }
1748
+ @keyframes dsl-skeleton {
1749
+ 0% { background-position: 200% 0; }
1750
+ 100% { background-position: -200% 0; }
1751
+ }
1752
+ @media (prefers-reduced-motion: reduce) {
1753
+ .skeletonTitle,
1754
+ .skeletonBars > span,
1755
+ .skeletonBlock { animation: none; }
1756
+ }
1757
+
1758
+ /* ---------- staggered reveal ---------- */
1759
+
1760
+ @keyframes genuiReveal {
1761
+ from { opacity: 0; transform: translateY(10px); }
1762
+ to { opacity: 1; transform: translateY(0); }
1763
+ }
1764
+
1765
+ @keyframes genuiPopIn {
1766
+ from { opacity: 0; transform: translateY(2px); }
1767
+ to { opacity: 1; transform: translateY(0); }
1768
+ }
1769
+
1770
+ .reveal {
1771
+ animation: genuiReveal 0.45s cubic-bezier(0.22, 1, 0.36, 1) backwards;
1772
+ }
1773
+
1774
+ /* "✓ 已触发" confirmation chip: appears next to the button without layout
1775
+ shift risk (it inherits the flex row's gap). `backwards`, not `both`: the
1776
+ chip's natural (post-animation) style is already visible/no-transform, so
1777
+ pinning the end keyframe would only retain an unnecessary transform. */
1778
+ .btnSent { animation: genuiPopIn 0.2s ease backwards; }
1779
+
1780
+ /* 尊重用户的减弱动效偏好 */
1781
+ @media (prefers-reduced-motion: reduce) {
1782
+ .reveal { animation: none; }
1783
+ .btnSent { animation: none; }
1784
+ .fill { transition: none; }
1785
+ .barFill { transition: none; }
1786
+ .switch, .switchKnob { transition: none; }
1787
+ }
1788
+
1789
+ /* ---------- thin scrollbars ----------
1790
+ Overflow containers (table, file-tree, mermaid, panel) get a restrained
1791
+ thin scrollbar instead of the browser's chunky default. WebKit hosts need
1792
+ the pseudo-element twin; Firefox takes scrollbar-width. */
1793
+ .tableWrap, .fileTree, .mermaid, .panelBody {
1794
+ scrollbar-width: thin;
1795
+ scrollbar-color: var(--dsw-alias-border-l2, rgba(255, 255, 255, 0.22)) transparent;
1796
+ }
1797
+ .tableWrap::-webkit-scrollbar, .fileTree::-webkit-scrollbar,
1798
+ .mermaid::-webkit-scrollbar, .panelBody::-webkit-scrollbar {
1799
+ width: 8px;
1800
+ height: 8px;
1801
+ }
1802
+ .tableWrap::-webkit-scrollbar-thumb, .fileTree::-webkit-scrollbar-thumb,
1803
+ .mermaid::-webkit-scrollbar-thumb, .panelBody::-webkit-scrollbar-thumb {
1804
+ background: var(--dsw-alias-border-l2, rgba(255, 255, 255, 0.22));
1805
+ border-radius: 4px;
1806
+ }
1807
+ .tableWrap::-webkit-scrollbar-track, .fileTree::-webkit-scrollbar-track,
1808
+ .mermaid::-webkit-scrollbar-track, .panelBody::-webkit-scrollbar-track {
1809
+ background: transparent;
1810
+ }
1811
+
1812
+ /* ---------- a11y utility ---------- */
1813
+
1814
+ /* Visually hidden but announced: live regions ride on this clip pattern. */
1815
+ .visuallyHidden {
1816
+ position: absolute;
1817
+ width: 1px;
1818
+ height: 1px;
1819
+ margin: -1px;
1820
+ padding: 0;
1821
+ border: 0;
1822
+ overflow: hidden;
1823
+ clip: rect(0 0 0 0);
1824
+ clip-path: inset(50%);
1825
+ white-space: nowrap;
1826
+ }
1827
+
1828
+ /* ---------- quiz ---------- */
1829
+
1830
+ .quiz {
1831
+ display: flex;
1832
+ flex-direction: column;
1833
+ gap: var(--dsl-g-gap-md);
1834
+ padding: var(--dsl-g-gap-lg);
1835
+ background: var(--dsw-alias-bg-layer-1);
1836
+ border: 1px solid var(--dsl-g-border);
1837
+ border-radius: var(--dsl-g-radius-surface);
1838
+ }
1839
+ .quizQuestion { font-size: var(--dsl-g-font-body); font-weight: 600; color: var(--dsw-alias-label-primary); line-height: 1.6; }
1840
+ .quizOptions { display: flex; flex-direction: column; gap: var(--dsl-g-gap-sm); }
1841
+ .quizOpt {
1842
+ display: flex;
1843
+ align-items: center;
1844
+ gap: var(--dsl-g-gap-sm);
1845
+ text-align: left;
1846
+ background: var(--dsw-alias-bg-base, #17171a);
1847
+ border: 1px solid var(--dsl-g-border);
1848
+ border-radius: var(--dsl-g-radius-control);
1849
+ padding: 10px 14px;
1850
+ font-size: var(--dsl-g-font-title);
1851
+ font-family: inherit;
1852
+ color: var(--dsw-alias-label-secondary);
1853
+ cursor: pointer;
1854
+ line-height: 1.5;
1855
+ transition: border-color 0.15s, background 0.15s;
1856
+ }
1857
+ .quizOpt:hover:not(:disabled) { border-color: var(--dsl-g-accent); background: var(--dsl-g-accent-soft); }
1858
+ .quizOpt:focus-visible, .button:focus-visible, .tab:focus-visible, .accHead:focus-visible,
1859
+ .copyChip:focus-visible, .link:focus-visible, .quizRetry:focus-visible, .resetBtn:focus-visible,
1860
+ .playBtn:focus-visible, .bcText:focus-visible {
1861
+ outline: 2px solid var(--dsl-g-accent);
1862
+ outline-offset: 1px;
1863
+ }
1864
+ .quizOpt:disabled { cursor: default; opacity: 0.85; }
1865
+ .quizOptCorrect {
1866
+ display: flex;
1867
+ align-items: center;
1868
+ gap: var(--dsl-g-gap-sm);
1869
+ text-align: left;
1870
+ background: color-mix(in srgb, var(--dsw-alias-state-success-primary, #3ecf8e) var(--dsl-g-tint), transparent);
1871
+ border: 1px solid color-mix(in srgb, var(--dsw-alias-state-success-primary, #3ecf8e) 40%, transparent);
1872
+ border-radius: var(--dsl-g-radius-control);
1873
+ padding: 10px 14px;
1874
+ font-size: var(--dsl-g-font-title);
1875
+ font-family: inherit;
1876
+ color: var(--dsw-alias-state-success-primary, #3ecf8e);
1877
+ font-weight: 600;
1878
+ line-height: 1.5;
1879
+ }
1880
+ .quizOptWrong {
1881
+ display: flex;
1882
+ align-items: center;
1883
+ gap: var(--dsl-g-gap-sm);
1884
+ text-align: left;
1885
+ background: color-mix(in srgb, var(--dsw-alias-state-error-primary, #ff6b6b) var(--dsl-g-tint), transparent);
1886
+ border: 1px solid color-mix(in srgb, var(--dsw-alias-state-error-primary, #ff6b6b) 30%, transparent);
1887
+ border-radius: var(--dsl-g-radius-control);
1888
+ padding: 10px 14px;
1889
+ font-size: var(--dsl-g-font-title);
1890
+ font-family: inherit;
1891
+ color: var(--dsw-alias-state-error-primary, #ff6b6b);
1892
+ font-weight: 600;
1893
+ line-height: 1.5;
1894
+ }
1895
+ .quizOptReveal {
1896
+ display: flex;
1897
+ align-items: center;
1898
+ gap: var(--dsl-g-gap-sm);
1899
+ text-align: left;
1900
+ background: color-mix(in srgb, var(--dsw-alias-state-success-primary, #3ecf8e) var(--dsl-g-tint), transparent);
1901
+ border: 1px dashed color-mix(in srgb, var(--dsw-alias-state-success-primary, #3ecf8e) 40%, transparent);
1902
+ border-radius: var(--dsl-g-radius-control);
1903
+ padding: 10px 14px;
1904
+ font-size: var(--dsl-g-font-title);
1905
+ font-family: inherit;
1906
+ color: var(--dsw-alias-state-success-primary, #3ecf8e);
1907
+ line-height: 1.5;
1908
+ }
1909
+ .quizMarker {
1910
+ display: inline-block;
1911
+ width: 14px;
1912
+ text-align: center;
1913
+ font-weight: 700;
1914
+ color: var(--dsw-alias-label-tertiary);
1915
+ flex-shrink: 0;
1916
+ }
1917
+ .quizOptCorrect .quizMarker { color: var(--dsw-alias-state-success-primary, #3ecf8e); }
1918
+ .quizOptWrong .quizMarker { color: var(--dsw-alias-state-error-primary, #ff6b6b); }
1919
+ .quizResult { display: flex; flex-direction: column; gap: var(--dsl-g-gap-sm); }
1920
+ .quizCorrectMsg { font-size: var(--dsl-g-font-title); font-weight: 600; color: var(--dsw-alias-state-success-primary, #3ecf8e); }
1921
+ .quizWrongMsg { font-size: var(--dsl-g-font-title); font-weight: 600; color: var(--dsw-alias-state-error-primary, #ff6b6b); }
1922
+ .quizFeedback { font-size: var(--dsl-g-font-meta); font-weight: 400; color: var(--dsw-alias-label-secondary); margin-top: 3px; line-height: 1.5; }
1923
+ .quizExplanation {
1924
+ font-size: var(--dsl-g-font-meta);
1925
+ color: var(--dsw-alias-label-tertiary);
1926
+ line-height: 1.6;
1927
+ padding: var(--dsl-g-gap-sm) 10px;
1928
+ border-top: 1px solid var(--dsl-g-border);
1929
+ }
1930
+ .quizRetry {
1931
+ width: fit-content;
1932
+ background: transparent;
1933
+ border: 1px solid var(--dsl-g-border);
1934
+ color: var(--dsw-alias-label-secondary);
1935
+ border-radius: var(--dsl-g-radius-control);
1936
+ padding: 6px 14px;
1937
+ font-size: var(--dsl-g-font-title);
1938
+ font-family: inherit;
1939
+ cursor: pointer;
1940
+ }
1941
+ .quizRetry:hover { border-color: var(--dsl-g-accent); color: var(--dsl-g-accent); }
1942
+
1943
+ /* ---------- render_ui tool card ---------- */
1944
+
1945
+ .tool {
1946
+ /* The tool row already provides card chrome; the block sits directly. */
1947
+ margin: 4px 0;
1948
+ }
1949
+
1950
+ .toolFallback {
1951
+ display: flex;
1952
+ align-items: center;
1953
+ gap: var(--dsl-g-gap-md);
1954
+ padding: var(--dsl-g-gap-sm) 12px;
1955
+ border: 1px solid var(--dsl-g-border);
1956
+ border-radius: var(--dsl-g-radius-surface);
1957
+ background: var(--dsw-alias-bg-layer-1, var(--dsw-alias-markdown-code-block));
1958
+ font-size: var(--dsl-g-font-title);
1959
+ }
1960
+
1961
+ .toolFallbackTitle {
1962
+ font-weight: 600;
1963
+ color: var(--dsw-alias-label-primary);
1964
+ }
1965
+
1966
+ .toolFallbackMeta {
1967
+ color: var(--dsw-alias-label-secondary);
1968
+ font-variant-numeric: tabular-nums;
1969
+ overflow: hidden;
1970
+ text-overflow: ellipsis;
1971
+ white-space: nowrap;
1972
+ }
1973
+
1974
+ /* ---------- session panel dock ---------- */
1975
+
1976
+ .panel {
1977
+ /* Distinct from ordinary inline fences: accent border + badge header so a
1978
+ session panel is recognizable at a glance. */
1979
+ /* Align with the host's composer width axis (same geometry as the TodoDock
1980
+ cards it shares conversation.input.dock with): centered, inset by the
1981
+ side clearance and the dock inset chain, capped at the composer card
1982
+ width. Falls back to safe literals when the host does not define the
1983
+ --dsh-composer-* tokens. */
1984
+ margin: 10px auto 2px;
1985
+ width: calc(100% - var(--dsh-composer-side-clearance, 16px) * 2 - var(--dsh-composer-dock-inset, 8px) * 4);
1986
+ max-width: calc(var(--dsh-composer-card-max-width, 780px) - var(--dsh-composer-dock-inset, 8px) * 4);
1987
+ border: 1px solid color-mix(in srgb, var(--dsw-alias-state-business-primary, #4f8ef7) 35%, transparent);
1988
+ border-radius: 12px;
1989
+ background: var(--dsw-alias-bg-layer-1, rgba(255, 255, 255, 0.04));
1990
+ overflow: hidden;
1991
+ }
1992
+
1993
+ .panelHeader {
1994
+ display: flex;
1995
+ align-items: center;
1996
+ /* Header/body divider so the panel reads as a card with a title bar, not a
1997
+ slab with text glued to it (user report: "body 缺少内边框"). */
1998
+ border-bottom: 1px solid var(--dsw-alias-border-l1, rgba(127, 127, 127, 0.25));
1999
+ }
2000
+
2001
+ .panelToggle {
2002
+ display: flex;
2003
+ align-items: center;
2004
+ /* 10px matches the TodoDock header rhythm (gap: 10px) — the badge and the
2005
+ title no longer collapse together once the shared --dsl-g-gap-sm token
2006
+ reaches this element. */
2007
+ gap: 10px;
2008
+ flex: 1 1 auto;
2009
+ min-width: 0;
2010
+ padding: 9px 14px;
2011
+ border: 0;
2012
+ background: none;
2013
+ color: inherit;
2014
+ font: inherit;
2015
+ font-size: var(--dsl-g-font-title);
2016
+ cursor: pointer;
2017
+ }
2018
+
2019
+ .panelToggle:hover { background: rgba(255, 255, 255, 0.04); }
2020
+
2021
+ /* In-place dismiss (issue #23): a compact ✕ at the right end of the header,
2022
+ distinct from the collapse/expand toggle. Applies the exact `/panel clear`
2023
+ local override — no navigation, no reload, state persists across refresh. */
2024
+ .panelClose {
2025
+ flex: 0 0 auto;
2026
+ width: 26px;
2027
+ height: 26px;
2028
+ margin-right: 8px;
2029
+ display: flex;
2030
+ align-items: center;
2031
+ justify-content: center;
2032
+ padding: 0;
2033
+ border: 0;
2034
+ border-radius: 6px;
2035
+ background: transparent;
2036
+ color: inherit;
2037
+ font-size: 13px;
2038
+ line-height: 1;
2039
+ cursor: pointer;
2040
+ opacity: 0.65;
2041
+ }
2042
+
2043
+ .panelClose:hover {
2044
+ background: rgba(255, 255, 255, 0.08);
2045
+ opacity: 1;
2046
+ }
2047
+
2048
+ .panelClose:focus-visible {
2049
+ outline: 1px solid var(--dsw-alias-state-business-primary, #4f8ef7);
2050
+ outline-offset: 1px;
2051
+ opacity: 1;
2052
+ }
2053
+
2054
+ /* ---- 0.9.4 template center & onboarding ---- */
2055
+ .panelTpl {
2056
+ flex: 0 0 auto;
2057
+ height: 26px;
2058
+ margin-right: 4px;
2059
+ padding: 0 10px;
2060
+ display: flex;
2061
+ align-items: center;
2062
+ border: 1px solid var(--dsw-alias-border-l1, rgba(255, 255, 255, 0.12));
2063
+ border-radius: 8px;
2064
+ background: transparent;
2065
+ color: var(--dsw-alias-label-secondary, rgba(255, 255, 255, 0.6));
2066
+ font-size: 12px;
2067
+ line-height: 1.5;
2068
+ cursor: pointer;
2069
+ opacity: 0.85;
2070
+ }
2071
+
2072
+ .panelTpl:hover {
2073
+ background: rgba(255, 255, 255, 0.08);
2074
+ opacity: 1;
2075
+ }
2076
+
2077
+ .panelTplActive {
2078
+ border-color: var(--dsw-alias-state-business-primary, #4f8ef7);
2079
+ color: var(--dsw-alias-state-business-primary, #4f8ef7);
2080
+ }
2081
+
2082
+ .panelOnboard .panelHeader {
2083
+ cursor: default;
2084
+ }
2085
+
2086
+ .panelOnboardText {
2087
+ flex: 1;
2088
+ min-width: 0;
2089
+ padding: 0 8px;
2090
+ font-size: 12px;
2091
+ line-height: 1.5;
2092
+ color: var(--dsw-alias-label-secondary, rgba(255, 255, 255, 0.6));
2093
+ }
2094
+
2095
+ .panelFlash {
2096
+ padding: 6px 12px;
2097
+ border-top: 1px solid var(--dsw-alias-border-l1, rgba(255, 255, 255, 0.12));
2098
+ font-size: 12px;
2099
+ line-height: 1.5;
2100
+ color: var(--dsw-alias-state-success-primary, #6ccb5f);
2101
+ background: color-mix(in srgb, var(--dsw-alias-state-success-primary, #6ccb5f) 8%, transparent);
2102
+ }
2103
+
2104
+ .panelHint {
2105
+ padding: 6px 14px;
2106
+ border-top: 1px solid var(--dsw-alias-border-l1, rgba(255, 255, 255, 0.12));
2107
+ font-size: 12px;
2108
+ line-height: 1.5;
2109
+ color: var(--dsw-alias-state-business-primary, #4f8ef7);
2110
+ background: color-mix(in srgb, var(--dsw-alias-state-business-primary, #4f8ef7) 8%, transparent);
2111
+ }
2112
+
2113
+ /* ---- 0.9.5 achievement toasts ---- */
2114
+ .achToasts {
2115
+ position: fixed;
2116
+ right: 16px;
2117
+ bottom: 16px;
2118
+ display: flex;
2119
+ flex-direction: column;
2120
+ gap: 8px;
2121
+ z-index: 9999;
2122
+ pointer-events: none;
2123
+ }
2124
+
2125
+ .achToast {
2126
+ display: flex;
2127
+ align-items: flex-start;
2128
+ gap: 10px;
2129
+ width: 300px;
2130
+ padding: 10px 12px;
2131
+ border: 1px solid color-mix(in srgb, var(--dsw-alias-state-business-primary, #4f8ef7) 35%, transparent);
2132
+ border-radius: var(--dsl-g-radius-surface, 12px);
2133
+ background: var(--dsw-alias-bg-layer-2, rgba(0, 0, 0, 0.85));
2134
+ box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
2135
+ }
2136
+
2137
+ .achToastBadge {
2138
+ flex: none;
2139
+ font-size: 18px;
2140
+ line-height: 1.2;
2141
+ }
2142
+
2143
+ .achToastBody {
2144
+ min-width: 0;
2145
+ }
2146
+
2147
+ .achToastName {
2148
+ font-size: 13px;
2149
+ font-weight: 600;
2150
+ color: var(--dsw-alias-state-business-primary, #4f8ef7);
2151
+ }
2152
+
2153
+ .achToastDesc {
2154
+ margin-top: 2px;
2155
+ font-size: 12px;
2156
+ line-height: 1.5;
2157
+ color: var(--dsw-alias-label-secondary, rgba(255, 255, 255, 0.6));
2158
+ }
2159
+
2160
+ .panelBadge {
2161
+ flex: none;
2162
+ font-size: 11px;
2163
+ line-height: 1.6;
2164
+ padding: 0 var(--dsl-g-gap-sm);
2165
+ border-radius: 6px;
2166
+ background: color-mix(in srgb, var(--dsw-alias-state-business-primary, #4f8ef7) var(--dsl-g-tint-strong), transparent);
2167
+ /* The semantic token adapts per theme: deepseek-500 on light canvases
2168
+ (≈5.7:1), deepseek-400 on dark — never the hardcoded #7ba8ff that
2169
+ failed AA on light backgrounds. */
2170
+ color: var(--dsw-alias-state-business-primary, #7ba8ff);
2171
+ font-weight: 600;
2172
+ letter-spacing: 0.04em;
2173
+ }
2174
+
2175
+ .panelTitle {
2176
+ font-weight: 600;
2177
+ color: var(--dsw-alias-label-primary, #e6e6e6);
2178
+ overflow: hidden;
2179
+ text-overflow: ellipsis;
2180
+ white-space: nowrap;
2181
+ }
2182
+
2183
+ .panelChevron {
2184
+ /* Same glyph cell + color as the TodoDock header chevron (grid-centered,
2185
+ label-tertiary), so the arrow reads as a host control, not typed text. */
2186
+ display: grid;
2187
+ place-items: center;
2188
+ flex: none;
2189
+ margin-left: auto;
2190
+ color: var(--dsw-alias-label-tertiary);
2191
+ }
2192
+
2193
+ .panelBody {
2194
+ /* Default height; a drag on the resize handle above overrides it inline.
2195
+ max-height would cap the user's drag, so the fixed height lives here and
2196
+ JS takes over once the user resizes. */
2197
+ height: 360px;
2198
+ overflow-y: auto;
2199
+ padding: 0 16px var(--dsl-g-gap-lg);
2200
+ }
2201
+
2202
+ /* Drag strip on the panel's TOP edge (above the header): vertical resize
2203
+ (ns-resize). touch-action: none keeps the pointer stream on touch
2204
+ devices. Full width so it reads as the panel's top border. */
2205
+ .panelResizeHandle {
2206
+ height: 6px;
2207
+ border-radius: 3px;
2208
+ cursor: ns-resize;
2209
+ touch-action: none;
2210
+ background: transparent;
2211
+ transition: background 0.15s;
2212
+ }
2213
+
2214
+ .panelResizeHandle:hover,
2215
+ .panelResizeHandleActive {
2216
+ background: color-mix(in srgb, var(--dsw-alias-state-business-primary, #4f8ef7) 35%, transparent);
2217
+ }
2218
+
2219
+ /* Formula markup remains phrasing content inside labels and buttons. */
2220
+ .inlineMath { display: inline; }
2221
+ .inlineMath [class~="katex-display"] { max-width: 100%; overflow-x: auto; overflow-y: hidden; }