candle-graph 0.10.0

TensorFlow Profiler-style execution graphs for candle-rs (trace-only)
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
/* Candle / Hugging Face: neutral workspace, warm identity, explicit evidence states. */
:root {
  color-scheme: light;
  --bg: #ffffff;
  --pane: #ffffff;
  --surface-2: #f3f4f6;
  --fg: #1f2937;
  --muted: #4b5563;
  --quiet: #6b7280;
  --border: #e5e7eb;
  --border-strong: #858d99;
  --brand: #ffd21e;
  --brand-ink: #713f12;
  --accent: #9a4700;
  --accent-soft: #fff8e6;
  --on-accent: #1f2937;
  --focus: #b45309;
  --chart: #c2620a;
  --control-bg: #f9fafb;
  --control-border: #858d99;
  --hazard: #b91c1c;
  --success: #166534;
  --warning: #854d0e;
  --info: #1d4ed8;
  --canvas: #fafafa;
  --canvas-grid: #e5e7eb;
  --edge: #6b7280;
  --edge-composition: #8b7562;
  --op: #9a4700;
  --op-bg: #fffbeb;
  --tensor: #4b5563;
  --tensor-bg: #f3f4f6;
  --module: #6b7280;
  --module-bg: #f9fafb;
  --layer-band: rgb(107 114 128 / 3%);
  --heat-low: #9c8263;
  --heat-high: #b45309;
  --sidebar-w: 288px;
  --inspector-w: 320px;
  --radius: 12px;
  --radius-sm: 8px;
  --font-sans: "Source Sans Pro", "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", "Cascadia Code", "DejaVu Sans Mono", ui-monospace, monospace;
}
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111111;
  --pane: #171717;
  --surface-2: #232323;
  --fg: #f3f4f6;
  --muted: #c1c3c8;
  --quiet: #a1a1aa;
  --border: #303030;
  --border-strong: #737373;
  --brand: #ffd21e;
  --brand-ink: #713f12;
  --accent: #fbbf24;
  --accent-soft: #302819;
  --on-accent: #1f2937;
  --focus: #fbbf24;
  --chart: #f2a43b;
  --control-bg: #202020;
  --control-border: #737373;
  --hazard: #fca5a5;
  --success: #86efac;
  --warning: #fcd34d;
  --info: #93c5fd;
  --canvas: #111111;
  --canvas-grid: #292929;
  --edge: #a1a1aa;
  --edge-composition: #b4a08b;
  --op: #fbbf24;
  --op-bg: #292319;
  --tensor: #c1c3c8;
  --tensor-bg: #232323;
  --module: #a1a1aa;
  --module-bg: #202020;
  --layer-band: rgb(161 161 170 / 3%);
  --heat-low: #88765e;
  --heat-high: #fbbf24;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--fg); }
html { font: 14px/1.5 var(--font-sans); -webkit-font-smoothing: antialiased; }
body { display: flex; flex-direction: column; overflow: hidden; }
button, input, select { font: inherit; }
button, summary, a, input[type="radio"] { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
button, summary { cursor: pointer; }
a { color: var(--accent); text-underline-offset: 3px; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { text-wrap: balance; }
h1 { font-size: 28px; line-height: 1.25; font-weight: 600; letter-spacing: -.04em; }
h2 { font-size: 18px; line-height: 1.4; font-weight: 600; letter-spacing: -.02em; }
h3 { font-size: 15px; font-weight: 600; }
p { text-wrap: pretty; }
button:focus-visible, a:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
#profile-viewer:focus { outline-offset: -3px; }
.sr { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: fixed; top: 8px; left: 8px; transform: translateY(-160%); z-index: 100; background: var(--pane); padding: 12px 20px; border-radius: var(--radius-sm); }
.skip:focus { transform: none; }
.subtle, .field-hint, .table-note { color: var(--muted); font-size: 12px; }
.mono, .metric-value, .numeric { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
kbd { font: 11px/1.5 var(--font-mono); color: var(--muted); border: 1px solid var(--border); border-radius: 4px; padding: 0 4px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 8px 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--pane); color: var(--fg); font-size: 13px; font-weight: 500; text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--surface-2); border-color: var(--border-strong); color: var(--fg); }
.btn:active { background: var(--surface-2); }
.btn.primary { background: var(--brand); color: var(--on-accent); border-color: var(--brand); }
.btn.primary:hover { filter: brightness(.95); }
.btn.icon { width: 40px; padding: 8px; font-size: 20px; flex: 0 0 40px; }
.btn:disabled { cursor: default; opacity: .45; background: var(--surface-2); color: var(--muted); border-color: var(--border); }
.top { display: flex; align-items: center; gap: 20px; min-height: 72px; padding: 12px 32px; background: var(--pane); border-bottom: 1px solid var(--border); flex-shrink: 0; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--fg); text-decoration: none; font-size: 20px; font-weight: 650; letter-spacing: -.03em; }
.brand-light { font-weight: 400; color: var(--muted); margin-left: 5px; }
.brand-mark { width: 36px; height: 36px; flex-shrink: 0; }
.brand-mark .brand-tile { fill: var(--brand); }
.brand-mark .brand-flame { fill: var(--brand-ink); }
.brand-mark .brand-wax { fill: none; stroke: var(--brand-ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.header-divider { height: 24px; width: 1px; background: var(--border); }
.cov { flex: 1; min-width: 0; font: 12px/1.5 var(--font-mono); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.offline-label { color: var(--muted); font-size: 12px; margin-right: 8px; border: 1px solid var(--border); border-radius: 999px; padding: 4px 10px; }
.offline-label::before { content: ""; display: inline-block; width: 6px; height: 6px; background: var(--quiet); border-radius: 50%; margin-right: 8px; }
.view-nav { display: flex; align-items: center; justify-content: space-between; padding: 0 32px; background: var(--pane); border-bottom: 1px solid var(--border); flex-shrink: 0; gap: 20px; }
.tabs { display: flex; min-width: 0; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 12px;  flex-shrink: 0; background: transparent; color: var(--muted); border: 0; border-bottom: 3px solid transparent; font-size: 13px; font-weight: 500; white-space: nowrap; }
.tab svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.tab:hover { color: var(--fg); background: var(--control-bg); }
.tab[aria-selected="true"] { color: var(--fg); border-bottom-color: var(--brand); font-weight: 600; }
.tab:focus-visible { outline-offset: -3px; }
.nav-context { flex-shrink: 0; color: var(--muted); font-size: 12px; }
.layout { flex: 1; display: flex; min-height: 0; }
.pane { min-width: 0; min-height: 0; overflow: hidden; display: flex; flex-direction: column; }
.pane-canvas { flex: 1; position: relative; }
.pane-sidebar { width: var(--sidebar-w); flex-shrink: 0; background: var(--pane); }
.pane-inspector { width: var(--inspector-w); flex-shrink: 0; background: var(--pane); }
.pane-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 60px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.pane-h h2 { margin: 0; font-size: 14px; }
.resize-handle { flex: 0 0 4px; cursor: col-resize; background: var(--border); }
.resize-handle:hover, .resize-handle.active { background: var(--accent); }
.scroll-area { overflow: auto; min-height: 0; scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
.view-panel { flex: 1; padding: 36px 32px; }
.view-panel > * { max-width: 1240px; margin-left: auto; margin-right: auto; }
.view-heading, .evidence-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.view-heading h1, .evidence-header h1 { margin-bottom: 8px; overflow-wrap: anywhere; }
.view-heading p, .evidence-header p { margin-bottom: 0; color: var(--muted); max-width: 720px; }
.eyebrow { color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 8px !important; }
.heading-actions { display: flex; flex-wrap: wrap; gap: 8px; flex-shrink: 0; padding-top: 24px; }
.run-subtitle { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 13px; }
.run-subtitle span + span { padding-left: 16px; border-left: 1px solid var(--border-strong); }
.run-status { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 24px; padding: 12px 16px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--control-bg); font-size: 13px; }
.run-status.is-failed { border-color: var(--hazard); }
.run-status p { flex: 1; margin: 0; color: var(--muted); }
.status-badge { display: inline-flex; align-items: center; gap: 5px; width: fit-content; flex-shrink: 0; color: var(--muted); font-size: 11px; font-weight: 600; line-height: 1.5; background: var(--surface-2); border: 1px solid var(--border); padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.status-valid, .status-available, .status-captured, .status-complete { color: var(--success); background: color-mix(in srgb, var(--success) 7%, var(--pane)); border-color: color-mix(in srgb, var(--success) 20%, var(--border)); }
.status-warning, .status-partial { color: var(--warning); background: color-mix(in srgb, var(--warning) 7%, var(--pane)); border-color: color-mix(in srgb, var(--warning) 20%, var(--border)); }
.status-failed, .status-invalid, .status-error, .status-non_finite { color: var(--hazard); background: color-mix(in srgb, var(--hazard) 7%, var(--pane)); border-color: color-mix(in srgb, var(--hazard) 20%, var(--border)); }
.measurement-invalid { color: var(--hazard); font-family: var(--font-sans); }
.metric-strip { display: grid; grid-template-columns: 1.3fr 1fr 1fr; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); margin-bottom: 28px; overflow: hidden; }
.metric { min-width: 0; padding: 24px; }
.metric + .metric { border-left: 1px solid var(--border); }
.metric-label { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; font-size: 13px; font-weight: 500; }
.metric-value { font-size: 26px; font-weight: 500; letter-spacing: -.05em; line-height: 1.3; overflow-wrap: anywhere; }
.metric:first-child .metric-value { color: var(--fg); font-weight: 600; }
.metric p { color: var(--muted); font-size: 12px; margin: 8px 0 0; }
.overview-columns { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, 1fr); gap: 24px; margin-bottom: 24px; align-items: start; }
.evidence-card, .data-section, .disclosure { background: var(--pane); border: 1px solid var(--border); border-radius: var(--radius); min-width: 0; padding: 24px; margin-bottom: 20px; }
.overview-columns > .evidence-card { margin-bottom: 0; }
.section-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 12px; }
.section-heading h2 { margin: 0; }
.section-heading a { font-size: 12px; font-weight: 500; }
.section-intro { font-size: 13px; color: var(--muted); margin-bottom: 20px; }
.hotspot-list { margin: 0; padding: 0; list-style: none; }
.hotspot-list li + li { border-top: 1px solid var(--border); }
.hotspot-link { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; padding: 16px 0; color: var(--fg); text-decoration: none; }
.hotspot-link:hover .hotspot-name { color: var(--accent); text-decoration: underline; }
.hotspot-name { font: 12px/1.5 var(--font-mono); overflow-wrap: anywhere; }
.hotspot-time { font: 12px/1.5 var(--font-mono); font-variant-numeric: tabular-nums; }
.cost-track { display: block; height: 5px; border-radius: 2px; background: var(--surface-2); grid-column: 1 / -1; overflow: hidden; }
.cost-track > span { display: block; height: 100%; background: var(--chart); border-radius: inherit; }
.coverage-list { margin: 0; }
.coverage-list > div { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.coverage-list dt { font-size: 13px; }
.coverage-list dd { margin: 0; }
.coverage-footnote { color: var(--muted); font-size: 12px; margin: 16px 0 0; }
.disclosure { padding: 0; }
.disclosure > summary { display: flex; align-items: center; gap: 12px; padding: 20px 24px; list-style: none; font-size: 14px; font-weight: 500; border-radius: var(--radius); }
.disclosure > summary::-webkit-details-marker { display: none; }
.disclosure > summary::before { content: "›"; color: var(--muted); font-size: 20px; width: 12px; flex-shrink: 0; }
.disclosure[open] > summary::before { transform: rotate(90deg); }
.disclosure > summary:hover { background: var(--surface-2); }
.disclosure > summary span { margin-left: auto; color: var(--muted); font-size: 12px; font-weight: 400; }
.disclosure-content { padding: 0 24px 24px; }
.key-values { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px 24px; margin: 0; }
.key-values > div { min-width: 0; }
.key-values dt { color: var(--muted); font-size: 12px; margin-bottom: 4px; }
.key-values dd { margin: 0; font: 12px/1.7 var(--font-mono); overflow-wrap: anywhere; }
.notice-list { list-style: none; margin: 0; padding: 0; }
.notice { padding: 16px; border-left: 3px solid var(--info); background: var(--bg); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.notice + .notice { margin-top: 12px; }
.notice-title { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 13px; }
.notice p { color: var(--muted); font-size: 13px; margin: 8px 0 0; overflow-wrap: anywhere; }
.notice-warning, .notice-partial { border-left-color: var(--warning); }
.notice-failed, .notice-invalid, .notice-error { border-left-color: var(--hazard); }
.notice-missing, .notice-absent { border-left-color: var(--border-strong); }
.section-empty { color: var(--muted); font-size: 13px; margin-bottom: 0; }
.view-summary { color: var(--muted); font-size: 13px; margin-bottom: 20px; }
.view-summary strong { color: var(--fg); }
.content-empty, .gpu-empty, .empty { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: 32px; min-height: 240px; background: var(--pane); border: 1px solid var(--border); border-radius: var(--radius); }
.content-empty strong { font-size: 18px; }
.content-empty p, .gpu-empty p, .empty p { color: var(--muted); max-width: 680px; margin: 12px 0; }
.content-empty .btn, .gpu-empty .btn { margin-top: 16px; }
.gpu-empty { margin-bottom: 24px; }
.gpu-empty-mark { color: var(--muted); font: 12px var(--font-mono); letter-spacing: .12em; margin-bottom: 20px; }
.table-controls { display: flex; align-items: end; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.table-controls label { display: flex; flex-direction: column; gap: 6px; color: var(--muted); font-size: 12px; }
.table-controls .filter-field { flex: 1; min-width: 180px; max-width: 400px; }
input[type="search"], select { width: 100%; min-height: 40px; padding: 8px 12px; color: var(--fg); background: var(--control-bg); border: 1px solid var(--control-border); border-radius: var(--radius-sm); font-size: 13px; }
input::placeholder { color: var(--quiet); }
.table-wrap { position: relative; overflow: auto; max-width: 100%; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--pane); scrollbar-width: thin; }
.data-table, .timeline-table, .peak-table table { width: 100%; border-collapse: collapse; font-size: 12px; }
.data-table th, .data-table td, .timeline-table th, .timeline-table td, .peak-table th, .peak-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
.data-table th, .timeline-table th, .peak-table th { position: sticky; top: 0; background: var(--control-bg); color: var(--muted); font-size: 12px; font-weight: 500; white-space: nowrap; z-index: 1; }
.data-table td { min-width: 120px; max-width: 420px; overflow-wrap: anywhere; }
.data-table tbody tr { line-height: 1.65; }
.data-table .numeric, .timeline-table .numeric { text-align: right; white-space: nowrap; }
.data-table td, .timeline-table td, .peak-table td { font-variant-numeric: tabular-nums; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: color-mix(in srgb, var(--accent-soft) 45%, var(--pane)); }
.pagination { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; padding-top: 12px; }
.pagination p { margin: 0; color: var(--muted); font-size: 12px; }
.pagination-actions { display: flex; gap: 8px; }
.table-row-action { border: 0; background: transparent; color: var(--fg); font: 12px/1.6 var(--font-mono); padding: 4px 0; text-align: left; overflow-wrap: anywhere; }
.table-row-action:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.span-cost-table { min-width: 740px; }
.span-cost-table td:first-child { min-width: 240px; }
.span-cost-table .cost-track { width: 96px; margin: 8px 0 0 auto; height: 4px; }
.span-cost-table tr.sel { background: var(--accent-soft); }
.table-sort { border: 0; background: transparent; padding: 0; color: inherit; font: inherit; min-height: 24px; }
.table-sort:hover, th[aria-sort="descending"] .table-sort, th[aria-sort="ascending"] .table-sort { color: var(--accent); }
.memory-chart { width: 100%; display: block; height: auto; min-height: 180px; max-height: 340px; margin: 24px 0; }
.chart-axis { stroke: var(--border-strong); stroke-width: 1; }
.chart-grid { stroke: var(--border); stroke-dasharray: 3 5; }
.chart-label { fill: var(--muted); font: 11px var(--font-mono); }
.memory-categories { display: flex; flex-wrap: wrap; gap: 12px 24px; color: var(--muted); font-size: 12px; }
.trace-navigation { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.search-box { padding: 16px; }
.search-box label { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 12px; margin-bottom: 8px; }
.field-hint { margin: 8px 0 0; }
.span-tree { flex: 1; padding: 0 8px 16px; }
.span-row { display: flex; align-items: center; gap: 8px; padding: 10px 8px; min-height: 44px; border-radius: var(--radius-sm); cursor: pointer; }
.span-row:hover, .span-row[aria-selected="true"] { background: var(--accent-soft); }
.span-row[aria-selected="true"] .span-name { color: var(--accent); }
.span-row.context-row .span-name { color: var(--muted); }
.span-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 11px/1.6 var(--font-mono); }
.span-ms { white-space: nowrap; color: var(--muted); font: 10px/1.5 var(--font-mono); font-variant-numeric: tabular-nums; }
.tw { display: inline-flex; align-items: center; justify-content: center; width: 20px; flex: 0 0 20px; min-height: 24px; padding: 0; border: 0; background: transparent; color: var(--muted); }
.sidebar-note { border-top: 1px solid var(--border); margin: 0; padding: 16px; font-size: 12px; color: var(--muted); }
.graph-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 24px; border-bottom: 1px solid var(--border); background: var(--pane); }
.graph-toolbar h1 { font-size: 18px; margin: 0 0 4px; }
.graph-toolbar p { margin: 0; }
.toolbar-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.canvas-wrap { flex: 1; min-height: 0; position: relative; overflow: hidden; background: var(--canvas); background-image: radial-gradient(var(--canvas-grid) 1px, transparent 1px); background-size: 20px 20px; }
#graph-canvas { display: block; width: 100%; height: 100%; position: absolute; inset: 0; touch-action: none; cursor: grab; }
#graph-canvas.is-panning { cursor: grabbing; user-select: none; }
.empty { position: absolute; inset: 24px; z-index: 1; }
.canvas-hint { position: absolute; top: 12px; left: 16px; color: var(--muted); font-size: 11px; pointer-events: none; padding: 4px 8px; background: var(--canvas); border-radius: 4px; }
.canvas-controls { display: flex; align-items: center; position: absolute; bottom: 20px; right: 20px; padding: 4px; gap: 4px; background: var(--pane); border: 1px solid var(--border); border-radius: 8px; }
.canvas-controls .btn { border-color: transparent; }
.zoom-label { width: 48px; text-align: center; font: 11px var(--font-mono); color: var(--muted); }
.legend-float { position: absolute; left: 20px; bottom: 20px; max-width: calc(100% - 240px); background: var(--pane); border: 1px solid var(--border); border-radius: 8px; padding: 12px; }
.legend-toggle { min-height: 24px; padding: 0; background: none; border: 0; color: var(--fg); font-size: 12px; font-weight: 600; }
.legend-body { margin-top: 8px; font-size: 11px; color: var(--muted); }
.legend-float.collapsed .legend-body { display: none; }
.legend-body fieldset { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.legend-body legend { margin-bottom: 4px; }
.legend-body label { display: flex; align-items: center; min-height: 28px; gap: 4px; }
input[type="radio"] { accent-color: var(--accent); }
.heat-scale { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.heat-ramp { height: 4px; flex: 1; background: linear-gradient(to right, var(--heat-low), var(--heat-high)); border-radius: 2px; }
.edge-key { display: flex; gap: 16px; margin-top: 8px; }
.lg::before { content: ""; display: inline-block; width: 16px; border-top: 2px solid var(--edge); margin-right: 6px; vertical-align: middle; }
.lg.kind-module::before { border-color: var(--edge-composition); border-top-style: dashed; }
.graph-tooltip { position: absolute; z-index: 10; pointer-events: none; background: var(--pane); border: 1px solid var(--border-strong); border-radius: 8px; padding: 12px; max-width: 320px; opacity: 0; }
.graph-tooltip.visible { opacity: 1; }
.tt-title { font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.tt-meta { font-size: 11px; color: var(--muted); margin-top: 4px; }
.inspector-scroll { flex: 1; padding: 20px; }
#inspector { margin: 0; }
#inspector > div { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; border-bottom: 1px solid var(--border); padding: 12px 0; }
#inspector .inspector-identity { display: block; padding-top: 0; padding-bottom: 20px; }
#inspector dt { color: var(--muted); font-size: 12px; }
#inspector dd { margin: 0; overflow-wrap: anywhere; font: 12px/1.6 var(--font-mono); }
#inspector .inspector-identity dd { color: var(--accent); font-size: 14px; margin-top: 8px; }
.inspector-note { color: var(--muted); font-size: 12px; margin: 20px 0; }
.inspector-link { width: 100%; }
.inspector-peak { margin-top: 24px; font-size: 12px; }
.inspector-peak summary { padding: 8px 0; }
.peak-table { overflow: auto; }
.peak-table th, .peak-table td { padding: 8px; font-size: 11px; }
.layer-band { fill: var(--layer-band); pointer-events: none; }
.node { cursor: pointer; }
.node.dim .node-card { stroke: var(--border-strong); }
.node-card { fill: var(--pane); stroke-width: 2; }
.node.op .node-card { fill: var(--op-bg); }
.node.tensor .node-card { fill: var(--tensor-bg); }
.node.sel .node-card, .node:focus-visible .node-card { stroke: var(--focus) !important; stroke-width: 4; stroke-dasharray: 7 3; }
.node-body { height: 100%; width: 100%; overflow: hidden; padding: 12px; display: flex; flex-direction: column; justify-content: center; color: var(--fg); pointer-events: none; }
.nb-kind { color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .08em; }
.nb-title { font: 600 12px/1.35 var(--font-mono); overflow-wrap: anywhere; }
.nb-sub { font: 10px/1.4 var(--font-mono); color: var(--muted); margin-top: 4px; }
.edge-group { pointer-events: none; }
.edge { fill: none; stroke: var(--edge); stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.edge-composition { stroke: var(--edge-composition); stroke-dasharray: 6 4; }
.edge-group.dim { opacity: .2; }
.edge-label { font: 10px var(--font-mono); fill: var(--muted); }
.edge-group.sel .edge { stroke: var(--focus); stroke-width: 3; }
dialog { width: min(640px, calc(100% - 32px)); max-height: calc(100% - 48px); overflow: auto; overscroll-behavior: contain; padding: 28px; color: var(--fg); background: var(--pane); border: 1px solid var(--border-strong); border-radius: 16px; }
dialog::backdrop { background: rgb(0 0 0 / 55%); }
.dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.dialog-header h2 { margin: 0; font-size: 24px; }
dialog > p, .guide-definitions dd { color: var(--muted); font-size: 13px; }
.guide-definitions { display: grid; gap: 16px; margin: 24px 0; }
.guide-definitions dt { font-weight: 600; margin-bottom: 4px; }
.guide-definitions dd { margin: 0; }
.shortcuts { display: grid; gap: 8px; }
.shortcuts > div { display: flex; gap: 16px; }
.shortcuts dt { width: 72px; }
.shortcuts dd { margin: 0; color: var(--muted); font-size: 12px; }
@media (max-width: 1150px) {
  .overview-columns { grid-template-columns: minmax(0, 1.2fr) minmax(280px, 1fr); }
  .nav-context, .offline-label { display: none; }
  .view-panel { padding: 24px; }
  .pane-inspector { width: 280px; }
  .graph-toolbar { flex-wrap: wrap; }
}
@media (max-width: 900px) {
  .top { padding: 12px 20px; gap: 12px; }
  .view-nav { padding: 0 20px; }
  .tabs { gap: 4px; }
  .overview-columns { grid-template-columns: minmax(0, 1fr); }
  .pane-inspector { position: fixed; right: 16px; bottom: 16px; top: 148px; width: min(360px, calc(100% - 32px)); z-index: 20; border: 1px solid var(--border-strong); border-radius: var(--radius); }
  .pane-sidebar { position: absolute; left: 0; top: 0; bottom: 0; z-index: 15; width: min(320px, 85vw); border-right: 1px solid var(--border-strong); }
  .layout { position: relative; }
  .resize-handle { display: none; }
  .metric { padding: 20px; }
  .metric-value { font-size: 22px; }
}
@media (max-width: 600px) {
  .top { padding: 12px 16px; flex-wrap: wrap; gap: 8px; }
  .brand { font-size: 18px; gap: 8px; }
  .brand-mark { width: 28px; height: 28px; }
  .top-actions { margin-left: auto; }
  .top-actions .btn { font-size: 12px; min-height: 40px; padding: 8px; }
  .top-actions kbd, .header-divider { display: none; }
  .cov { order: 3; flex-basis: 100%; font-size: 11px; }
  .view-nav { padding: 0 16px; }
  .tabs { width: 100%; gap: 4px; }
  .tab { font-size: 12px; min-height: 48px; padding: 12px 8px; }
  .tab svg { display: none; }
  .view-panel { padding: 24px 16px; }
  h1 { font-size: 24px; }
  .view-heading, .evidence-header { flex-direction: column; gap: 16px; }
  .heading-actions { padding: 0; }
  .metric-strip { grid-template-columns: minmax(0, 1fr); }
  .metric { padding: 20px; }
  .metric + .metric { border-left: 0; border-top: 1px solid var(--border); }
  .metric-label { margin-bottom: 8px; }
  .metric-value { font-size: 24px; }
  .evidence-card, .data-section { padding: 20px; }
  .disclosure > summary { padding: 16px; flex-wrap: wrap; }
  .disclosure-content { padding: 0 16px 20px; }
  .disclosure > summary span { margin-left: 24px; }
  .key-values { grid-template-columns: minmax(0, 1fr); }
  .table-controls > label { flex: 1; }
  .table-controls .filter-field { max-width: none; flex-basis: 100%; }
  .graph-toolbar { padding: 16px; gap: 12px; }
  .toolbar-actions { gap: 8px; }
  .toolbar-actions .btn { font-size: 12px; padding: 8px; }
  .canvas-controls { bottom: 16px; right: 16px; }
  .legend-float { left: 16px; bottom: 72px; max-width: calc(100% - 32px); }
  .canvas-hint { font-size: 10px; left: 8px; }
  .pane-inspector { top: 164px; }
  .btn, .span-row, summary, .table-row-action, .table-sort, .legend-toggle, .legend-body label { min-height: 44px; }
  .run-status p { flex-basis: 100%; order: 3; }
  .run-status a { margin-left: auto; }
  .content-empty, .gpu-empty, .empty { padding: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
@media print {
  body { display: block; height: auto; }
  .top, .view-nav, .pane-sidebar, .pane-inspector, .resize-handle, .graph-toolbar, .legend-float, .canvas-controls, .canvas-hint, .table-controls, .pagination-actions { display: none !important; }
  .layout, .view-panel { display: block; overflow: visible; height: auto; }
  .view-panel[hidden] { display: none !important; }
  .view-panel { padding: 0; }
  .canvas-wrap { height: 800px; }
  .table-wrap { overflow: visible; }
}
.nb-title { fill: var(--fg); }
.nb-sub, .nb-kind { fill: var(--muted); }
.details-subheading { margin-top: 24px; }
.gpu-empty code { display: block; max-width: 100%; white-space: pre-wrap; overflow-wrap: anywhere; font: 12px/1.7 var(--font-mono); background: var(--surface-2); padding: 12px; border-radius: var(--radius-sm); }
@media (prefers-contrast: more) {
  :root { --border: var(--border-strong); --quiet: var(--muted); }
  .status-badge { border-color: currentColor; }
}

#viewer-status { top: 0; left: 0; }