Repository navigation
Expand file tree
/
Copy pathapplication-styles.css
More file actions
455 lines (417 loc) · 25.9 KB
/
Copy pathapplication-styles.css
File metadata and controls
455 lines (417 loc) · 25.9 KB
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
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
:root {
color-scheme: light;
--bg: #eef3fb;
--panel: #ffffff;
--panel-soft: #f8fafc;
--text: #172033;
--muted: #64748b;
--border: #d6deed;
--primary: #5b5ce2;
--primary-dark: #3730a3;
--primary-soft: #eeefff;
--success: #047857;
--success-soft: #e9fbf3;
--danger: #b42318;
--danger-soft: #fff1f2;
--warning: #b45309;
--node-fill: #ffffff;
--node-stroke: #7c8ba1;
--edge: #8da0bb;
--highlight: #f59e0b;
--traversal: #10b981;
--statement: #6157e8;
--expression: #0891b2;
--value-node: #059669;
--statement-fill: #f0efff;
--expression-fill: #eafcff;
--value-fill: #ecfbf4;
--shadow: 0 2px 4px rgba(30, 41, 59, 0.04), 0 16px 38px rgba(44, 56, 91, 0.09);
}
body.dark {
color-scheme: dark;
--bg: #07111f;
--panel: #101a2d;
--panel-soft: #0c1628;
--text: #e5edf9;
--muted: #9aacbf;
--border: #293a56;
--primary: #818cf8;
--primary-dark: #a5b4fc;
--primary-soft: #20284b;
--success: #6ee7b7;
--success-soft: #12372d;
--danger: #fda4af;
--danger-soft: #3a1720;
--warning: #fbbf24;
--node-fill: #172033;
--node-stroke: #8192ad;
--edge: #52627c;
--highlight: #fbbf24;
--traversal: #34d399;
--statement: #818cf8;
--expression: #22d3ee;
--value-node: #4ade80;
--statement-fill: #22234a;
--expression-fill: #123341;
--value-fill: #123628;
--shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}
* { box-sizing: border-box; }
body {
margin: 0;
min-height: 100vh;
background:
radial-gradient(circle at 7% 18%, color-mix(in srgb, var(--primary) 10%, transparent), transparent 27rem),
radial-gradient(circle at 93% 34%, rgba(6, 182, 212, 0.09), transparent 29rem),
radial-gradient(circle at 78% 88%, rgba(139, 92, 246, 0.06), transparent 26rem),
var(--bg);
color: var(--text);
font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
transition: background 180ms ease, color 180ms ease;
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.topbar {
position: relative;
overflow: hidden;
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 1rem;
padding: 1.35rem clamp(1rem, 4vw, 3.5rem);
color: white;
background: linear-gradient(118deg, #091a3a 0%, #25216f 34%, #5130b7 67%, #126b91 112%);
border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}
.topbar::before, .topbar::after { content: ''; position: absolute; border-radius: 50%; pointer-events: none; }
.topbar::before { width: 350px; height: 350px; right: 11%; top: -265px; border: 1px solid rgba(125, 211, 252, 0.25); box-shadow: 0 0 90px rgba(99, 102, 241, 0.2); }
.topbar::after { width: 230px; height: 230px; right: 2%; bottom: -175px; background: rgba(34, 211, 238, 0.2); filter: blur(6px); }
.topbar > * { position: relative; z-index: 1; }
.brand-block { display: flex; align-items: center; gap: 1rem; }
.brand-mark {
flex: 0 0 auto;
width: 62px;
height: 62px;
display: grid;
place-items: center;
border: 1px solid rgba(255, 255, 255, 0.42);
border-radius: 19px;
background: linear-gradient(145deg, rgba(255, 255, 255, 0.22), rgba(99, 102, 241, 0.24));
box-shadow: inset 0 1px rgba(255, 255, 255, 0.28), 0 12px 28px rgba(5, 10, 40, 0.22);
font: 800 0.92rem ui-monospace, monospace;
letter-spacing: 0.04em;
}
.topbar h1 { margin: 0.08rem 0 0.2rem; font-size: clamp(1.75rem, 3vw, 2.55rem); letter-spacing: -0.025em; text-shadow: 0 5px 24px rgba(7, 14, 45, 0.28); }
.eyebrow { margin: 0; font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase; opacity: 0.82; }
.subtitle { margin: 0; max-width: 760px; opacity: 0.88; }
.project-badges { display: flex; flex-wrap: wrap; gap: 0.38rem; margin-top: 0.72rem; }
.project-badges span { padding: 0.3rem 0.56rem; border: 1px solid rgba(255, 255, 255, 0.25); border-radius: 999px; background: rgba(255, 255, 255, 0.11); color: rgba(255, 255, 255, 0.92); font-size: 0.67rem; font-weight: 700; backdrop-filter: blur(8px); }
.icon-button {
min-width: 42px;
height: 42px;
border: 1px solid rgba(255, 255, 255, 0.35);
border-radius: 12px;
color: white;
background: rgba(255, 255, 255, 0.14);
transition: background 150ms ease, transform 150ms ease, border-color 150ms ease;
}
.icon-button:hover { transform: translateY(-1px); border-color: rgba(255, 255, 255, 0.58); background: rgba(255, 255, 255, 0.21); }
.theme-button { display: flex; align-items: center; justify-content: center; gap: 0.45rem; padding: 0 0.85rem; }
.theme-label { font-size: 0.78rem; font-weight: 700; }
.header-actions { display: flex; align-items: center; gap: 0.6rem; }
.live-badge { display: inline-flex; align-items: center; gap: 0.42rem; padding: 0.55rem 0.72rem; border: 1px solid rgba(255, 255, 255, 0.25); border-radius: 11px; background: rgba(15, 23, 42, 0.15); color: rgba(255, 255, 255, 0.92); font-size: 0.73rem; font-weight: 700; white-space: nowrap; }
.live-badge i, .inspector-status i { width: 7px; height: 7px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.14); }
.pipeline {
width: min(1600px, calc(100% - 2.5rem));
margin: 1rem auto 0;
display: grid;
grid-template-columns: auto 1fr;
align-items: center;
gap: 1.5rem;
padding: 0.72rem 0.9rem;
border: 1px solid var(--border);
border-radius: 14px;
background: linear-gradient(120deg, var(--panel), color-mix(in srgb, var(--primary-soft) 42%, var(--panel)));
box-shadow: 0 8px 24px rgba(42, 53, 88, 0.07);
color: var(--muted);
}
.pipeline-heading { padding-right: 1.2rem; border-right: 1px solid var(--border); }
.pipeline-heading span { display: block; color: var(--text); font-size: 0.78rem; font-weight: 800; }
.pipeline-heading small { display: block; margin-top: 0.16rem; color: var(--muted); font-size: 0.66rem; }
.pipeline-track { display: flex; align-items: center; justify-content: center; gap: 0.65rem; min-width: 0; }
.pipeline-track span { display: inline-flex; align-items: center; gap: 0.42rem; white-space: nowrap; }
.pipeline-track em { color: var(--muted); font-size: 0.76rem; font-style: normal; font-weight: 600; }
.pipeline-track b { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 8px; background: linear-gradient(145deg, var(--primary-soft), color-mix(in srgb, #bfdbfe 52%, var(--primary-soft))); color: var(--primary-dark); font-size: 0.68rem; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary) 10%, transparent); }
.pipeline-track i { color: var(--primary); font-style: normal; opacity: 0.75; }
.app-shell {
width: min(1600px, 100%);
margin: 0 auto;
padding: 1rem 1.25rem 1.25rem;
display: grid;
grid-template-columns: minmax(270px, 0.85fr) minmax(480px, 1.7fr) minmax(290px, 0.95fr);
gap: 1rem;
align-items: start;
}
.panel {
position: relative;
background: var(--panel);
border: 1px solid var(--border);
border-radius: 20px;
box-shadow: var(--shadow);
transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}
.panel:hover { border-color: color-mix(in srgb, var(--primary) 34%, var(--border)); box-shadow: 0 3px 5px rgba(30, 41, 59, 0.04), 0 20px 46px rgba(58, 68, 110, 0.11); }
.editor-panel { border-top: 3px solid #0891b2; }
.workspace-panel { border-top: 3px solid #6157e8; }
.details-panel { border-top: 3px solid #059669; }
.editor-panel > .panel-label { color: #0e7490; }
.workspace-label { color: #4f46e5; }
.details-panel .panel-label { color: #047857; }
body.dark .editor-panel > .panel-label { color: #22d3ee; }
body.dark .workspace-label { color: #a5b4fc; }
body.dark .details-panel .panel-label { color: #6ee7b7; }
.editor-panel, .details-panel { padding: 1rem; }
.workspace-panel { overflow: hidden; }
.panel-label { margin-bottom: 0.65rem; color: var(--primary-dark); font-size: 0.66rem; font-weight: 850; letter-spacing: 0.13em; text-transform: uppercase; }
.workspace-label { padding: 1rem 1rem 0; margin-bottom: 0; }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.8rem; margin-bottom: 0.75rem; }
.section-heading h2, .tab-content h2 { margin: 0; font-size: 1.05rem; }
.title-with-icon { display: flex; align-items: center; gap: 0.48rem; }
.title-with-icon > span { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; background: linear-gradient(145deg, var(--primary-soft), color-mix(in srgb, #bae6fd 45%, var(--primary-soft))); color: var(--primary-dark); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary) 10%, transparent); font: 800 0.72rem ui-monospace, monospace; }
.section-heading p { margin: 0.28rem 0 0; color: var(--muted); font-size: 0.84rem; line-height: 1.45; }
.sample-picker { min-width: 115px; color: var(--muted); font-size: 0.78rem; }
.sample-picker select, .traversal-bar select {
width: 100%;
margin-top: 0.25rem;
padding: 0.55rem 0.65rem;
border: 1px solid var(--border);
border-radius: 10px;
background: var(--panel-soft);
color: var(--text);
}
.editor-frame { overflow: hidden; border: 1px solid #26344b; border-radius: 15px; background: #0f172a; box-shadow: inset 0 1px rgba(255,255,255,0.04), 0 8px 20px rgba(15,23,42,0.12); }
.editor-bar { display: flex; align-items: center; gap: 0.6rem; height: 38px; padding: 0 0.75rem; border-bottom: 1px solid #26344b; background: #111c30; color: #94a3b8; font: 0.72rem ui-monospace, monospace; }
.editor-bar kbd { margin-left: auto; padding: 0.2rem 0.42rem; border: 1px solid #34445e; border-radius: 5px; background: #0b1323; color: #cbd5e1; font: inherit; }
.window-dots { display: flex; gap: 0.3rem; }
.window-dots i { width: 8px; height: 8px; border-radius: 50%; background: #fb7185; }
.window-dots i:nth-child(2) { background: #fbbf24; }
.window-dots i:nth-child(3) { background: #34d399; }
#sourceInput {
width: 100%;
min-height: 410px;
resize: vertical;
display: block;
border: 0;
border-radius: 0;
padding: 0.9rem;
background: #0f172a;
color: #e2e8f0;
caret-color: white;
font: 0.9rem/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
tab-size: 2;
}
#sourceInput:focus, select:focus, input:focus, button:focus-visible { outline: 3px solid color-mix(in srgb, var(--primary) 35%, transparent); outline-offset: 2px; }
.button-row, .export-row { display: flex; gap: 0.55rem; margin-top: 0.75rem; }
.primary-button, .secondary-button {
border-radius: 10px;
padding: 0.68rem 0.9rem;
border: 1px solid transparent;
font-weight: 750;
transition: transform 150ms ease, border-color 150ms ease, background 150ms ease, box-shadow 150ms ease;
}
.primary-button { flex: 1; background: linear-gradient(135deg, #4f46e5, #7c3aed 58%, #0891b2 125%); color: white; box-shadow: 0 8px 18px rgba(79, 70, 229, 0.25); }
.primary-button:hover { transform: translateY(-1px); box-shadow: 0 10px 22px color-mix(in srgb, var(--primary) 29%, transparent); }
.secondary-button { background: var(--panel-soft); border-color: var(--border); color: var(--text); }
.secondary-button:hover { transform: translateY(-1px); border-color: var(--primary); }
.compact { padding: 0.54rem 0.72rem; white-space: nowrap; }
.helper-text { color: var(--muted); font-size: 0.78rem; line-height: 1.45; }
.helper-text code { color: var(--primary-dark); }
.message { margin-top: 0.7rem; border-radius: 11px; padding: 0.75rem; font-size: 0.85rem; line-height: 1.45; }
.message.error { color: var(--danger); background: var(--danger-soft); border: 1px solid color-mix(in srgb, var(--danger) 28%, transparent); }
.message.success { color: var(--success); background: var(--success-soft); border: 1px solid color-mix(in srgb, var(--success) 28%, transparent); }
.hidden { display: none !important; }
.tree-heading { padding: 0.65rem 1rem 0; }
.toolbar { display: flex; gap: 0.4rem; }
.tool-button {
min-width: 38px;
height: 36px;
border: 1px solid var(--border);
border-radius: 9px;
background: var(--panel-soft);
color: var(--text);
font-weight: 800;
}
.tool-button:hover { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-dark); }
.text-tool { padding: 0 0.65rem; font-size: 0.78rem; }
.zoom-level { min-width: 44px; align-self: center; color: var(--muted); text-align: center; font: 0.72rem ui-monospace, monospace; }
.tree-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.55rem; padding: 0 1rem 0.8rem; }
.tree-stats > div { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; padding: 0.58rem 0.68rem; border: 1px solid var(--border); border-radius: 11px; background: linear-gradient(145deg, var(--panel-soft), var(--panel)); }
.tree-stats > div::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--primary); opacity: 0.9; }
.tree-stats > div:nth-child(2)::before { background: #8b5cf6; }
.tree-stats > div:nth-child(3)::before { background: #0891b2; }
.tree-stats > div:nth-child(4)::before { background: #059669; }
.tree-stats span { color: var(--muted); font-size: 0.7rem; }
.tree-stats strong { font-size: 0.8rem; }
.status-ready { color: var(--success); }
.status-error { color: var(--danger); }
.canvas-wrap {
position: relative;
height: 590px;
overflow: hidden;
background:
linear-gradient(color-mix(in srgb, var(--border) 72%, transparent) 1px, transparent 1px),
linear-gradient(90deg, color-mix(in srgb, var(--border) 72%, transparent) 1px, transparent 1px),
radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--primary) 7%, transparent), transparent 45%),
var(--panel-soft);
background-size: 28px 28px;
border-top: 1px solid var(--border);
border-bottom: 1px solid var(--border);
}
#treeSvg { width: 100%; height: 100%; touch-action: none; user-select: none; }
#treeSvg.panning { cursor: grabbing; }
.edge { fill: none; stroke: var(--edge); stroke-width: 2; }
.node-group { cursor: pointer; }
.node-rect { fill: var(--node-fill); stroke: var(--node-stroke); stroke-width: 2; rx: 12; ry: 12; filter: drop-shadow(0 3px 4px rgba(15,23,42,0.08)); transition: stroke 160ms ease, stroke-width 160ms ease, fill 160ms ease, filter 160ms ease; }
.node-group:hover .node-rect { stroke: var(--primary); stroke-width: 3; }
.node-group.selected .node-rect { stroke: var(--highlight); stroke-width: 4; fill: color-mix(in srgb, var(--highlight) 10%, var(--node-fill)); }
.node-group.traversing .node-rect { stroke: var(--traversal); stroke-width: 5; fill: color-mix(in srgb, var(--traversal) 13%, var(--node-fill)); }
.node-group[data-kind="statement"] .node-rect { fill: var(--statement-fill); stroke: var(--statement); }
.node-group[data-kind="expression"] .node-rect { fill: var(--expression-fill); stroke: var(--expression); }
.node-group[data-kind="value"] .node-rect { fill: var(--value-fill); stroke: var(--value-node); }
.node-group.selected .node-rect { stroke: var(--highlight); }
.node-group.traversing .node-rect { stroke: var(--traversal); }
.node-title { fill: var(--text); font-size: 13px; font-weight: 700; text-anchor: middle; dominant-baseline: middle; pointer-events: none; }
.node-value { fill: var(--muted); font-size: 11px; text-anchor: middle; dominant-baseline: middle; pointer-events: none; }
.empty-state { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; color: var(--muted); pointer-events: none; }
.empty-state h3 { margin: 0.4rem 0 0.15rem; color: var(--text); }
.empty-state p { margin: 0; font-size: 0.85rem; }
.empty-icon { width: 58px; height: 58px; margin: 0 auto; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 16px; background: var(--panel); font-size: 1.5rem; }
.tree-legend { position: absolute; left: 12px; bottom: 12px; display: flex; gap: 0.7rem; padding: 0.45rem 0.6rem; border: 1px solid var(--border); border-radius: 9px; background: color-mix(in srgb, var(--panel) 92%, transparent); color: var(--muted); font-size: 0.68rem; backdrop-filter: blur(8px); }
.tree-legend span { display: inline-flex; align-items: center; gap: 0.3rem; }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--statement); }
.legend-dot.expression { background: var(--expression); }
.legend-dot.value { background: var(--value-node); }
.traversal-bar {
display: grid;
grid-template-columns: minmax(120px, 0.8fr) minmax(130px, 1fr) auto auto auto;
align-items: end;
gap: 0.65rem;
padding: 0.8rem 1rem;
}
.traversal-bar label { color: var(--muted); font-size: 0.78rem; }
.traversal-bar input[type="range"] { width: 100%; margin-top: 0.72rem; accent-color: var(--primary); }
.traversal-output { margin: 0 1rem 1rem; min-height: 46px; padding: 0.7rem; border: 1px dashed var(--border); border-radius: 10px; color: var(--muted); font: 0.78rem/1.5 ui-monospace, monospace; overflow-wrap: anywhere; }
.inspector-heading { display: flex; align-items: center; justify-content: space-between; gap: 0.7rem; margin: -0.05rem 0 0.8rem; padding: 0.15rem 0 0.8rem; border-bottom: 1px solid var(--border); }
.inspector-heading .panel-label { margin: 0 0 0.22rem; }
.inspector-heading strong { display: block; font-size: 1rem; }
.inspector-status { display: inline-flex; align-items: center; gap: 0.38rem; padding: 0.36rem 0.52rem; border-radius: 999px; background: var(--success-soft); color: var(--success); font-size: 0.68rem; font-weight: 800; }
.inspector-status i { width: 6px; height: 6px; box-shadow: none; }
.tabs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.2rem; padding-bottom: 0.8rem; border-bottom: 1px solid var(--border); }
.tab { border: 0; border-radius: 8px; padding: 0.55rem 0.25rem; background: transparent; color: var(--muted); font-size: 0.78rem; font-weight: 700; }
.tab.active { background: linear-gradient(145deg, var(--primary-soft), color-mix(in srgb, #dbeafe 45%, var(--primary-soft))); color: var(--primary-dark); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary) 14%, transparent); }
.tab-content { display: none; padding-top: 0.9rem; }
.tab-content.active { display: block; }
.placeholder-copy { color: var(--muted); font-size: 0.86rem; line-height: 1.55; }
.tab-title-row { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; }
.badge { border-radius: 999px; padding: 0.25rem 0.55rem; background: var(--primary-soft); color: var(--primary-dark); font-size: 0.72rem; font-weight: 700; }
.link-button { border: 0; padding: 0; background: transparent; color: var(--primary); font-weight: 700; font-size: 0.78rem; }
.inline-actions { display: flex; gap: 0.7rem; }
.panel-note { margin: 0.4rem 0 0.75rem; color: var(--muted); font-size: 0.75rem; line-height: 1.4; }
.property-list { display: grid; gap: 0.48rem; margin: 0; }
.property-row { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 0.6rem; padding: 0.55rem; border-radius: 9px; background: var(--panel-soft); }
.property-row dt { color: var(--muted); font-size: 0.75rem; }
.property-row dd { margin: 0; font: 0.78rem/1.45 ui-monospace, monospace; overflow-wrap: anywhere; }
.token-list { max-height: 500px; overflow: auto; margin-top: 0.7rem; display: grid; gap: 0.4rem; }
.token-item { display: grid; grid-template-columns: 1fr auto; gap: 0.5rem; padding: 0.52rem; border: 1px solid var(--border); border-radius: 9px; background: var(--panel-soft); }
.token-main { min-width: 0; }
.token-type { display: block; color: var(--primary-dark); font-size: 0.7rem; font-weight: 800; }
.token-value { font: 0.78rem ui-monospace, monospace; overflow-wrap: anywhere; }
.token-location { color: var(--muted); font-size: 0.68rem; white-space: nowrap; }
.symbol-table { overflow: hidden; border: 1px solid var(--border); border-radius: 10px; }
.symbol-table.placeholder-copy { padding: 0.7rem; }
.symbol-row { display: grid; grid-template-columns: 1fr 0.8fr 1.2fr; gap: 0.4rem; padding: 0.58rem 0.62rem; border-bottom: 1px solid var(--border); font-size: 0.74rem; }
.symbol-row:last-child { border-bottom: 0; }
.symbol-row.header { background: var(--panel-soft); color: var(--muted); font-weight: 700; }
.symbol-row code { color: var(--primary-dark); overflow-wrap: anywhere; }
.code-output, .grammar-block { max-height: 500px; overflow: auto; margin: 0.7rem 0 0; padding: 0.75rem; border: 1px solid var(--border); border-radius: 10px; background: #0f172a; color: #dbeafe; font: 0.75rem/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.grammar-block { max-height: none; color: #d1fae5; }
.export-row .secondary-button { width: 100%; }
footer { padding: 0.15rem 1.25rem 1.5rem; text-align: center; color: var(--muted); font-size: 0.75rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@media (max-width: 1180px) {
.app-shell { grid-template-columns: minmax(280px, 0.8fr) minmax(500px, 1.4fr); }
.details-panel { grid-column: 1 / -1; }
.pipeline { grid-template-columns: 1fr; gap: 0.65rem; }
.pipeline-heading { padding: 0 0 0.55rem; border-right: 0; border-bottom: 1px solid var(--border); text-align: center; }
}
@media (max-width: 820px) {
.app-shell { grid-template-columns: 1fr; padding: 0.75rem; }
.details-panel { grid-column: auto; }
#sourceInput { min-height: 300px; }
.canvas-wrap { height: 500px; }
.traversal-bar { grid-template-columns: 1fr 1fr; }
.pipeline-track { overflow-x: auto; justify-content: flex-start; padding-bottom: 0.2rem; }
}
@media (max-width: 520px) {
.topbar { padding: 1rem; }
.brand-mark, .theme-label, .live-badge { display: none; }
.pipeline { width: calc(100% - 1.5rem); }
.project-badges span:last-child { display: none; }
.section-heading { flex-direction: column; }
.sample-picker { width: 100%; }
.tree-heading { align-items: stretch; }
.toolbar { width: 100%; }
.tool-button { flex: 1; }
.traversal-bar { grid-template-columns: 1fr; }
.tree-stats { grid-template-columns: repeat(2, 1fr); }
.tree-legend { flex-wrap: wrap; max-width: calc(100% - 24px); }
.tabs { grid-template-columns: repeat(3, 1fr); }
}
/* Later compiler stages use a full-width work area so code stays readable. */
.compiler-lab { margin: 1.5rem auto; width: calc(100% - 3rem); max-width: 1880px; padding: 1.5rem; }
.compiler-lab .section-heading { flex-wrap: wrap; gap: 1rem; }
.compiler-lab h2 { margin: .4rem 0; }
.compiler-lab h3 { font-size: 1rem; margin: 1rem 0; }
.compiler-lab p, .compiler-lab td { font-size: 1rem; }
.compiler-summary { border: 1px solid var(--border); background: var(--panel-soft); padding: 1rem; border-radius: 8px; line-height: 1.6; }
.lab-tabs { display: flex; flex-wrap: wrap; gap: .5rem; padding: .5rem 0 1rem; border-bottom: 1px solid var(--border); }
.lab-tab { padding: .8rem 1rem; background: var(--panel-soft); color: var(--text); border: 1px solid var(--border); border-radius: 8px; font: inherit; font-size: .875rem; cursor: pointer; }
.lab-tab.active { background: var(--primary); color: #fff; border-color: var(--primary); }
body.dark .lab-tab.active { color: #101a2d; }
.lab-tab:focus-visible, .compiler-lab button:focus-visible { outline: 3px solid var(--highlight); outline-offset: 3px; }
.lab-panel[hidden] { display: none; }
.lab-columns { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.5rem; }
.lab-columns > div { min-width: 0; }
.table-scroll { overflow: auto; max-height: 32rem; }
.compiler-table { width: 100%; border-collapse: collapse; text-align: left; }
.compiler-table th, .compiler-table td { padding: .75rem; border-bottom: 1px solid var(--border); overflow-wrap: anywhere; }
.compiler-table th { font-size: .875rem; background: var(--panel-soft); position: sticky; top: 0; }
.compiler-table td { font-family: ui-monospace, monospace; }
.compiler-lab .code-output { font-size: .875rem; line-height: 1.7; max-height: 32rem; overflow: auto; }
.diagnostic { padding: 1rem; margin-bottom: .75rem; border-radius: 8px; border: 1px solid var(--border); }
.diagnostic p { margin: .5rem 0; }
.diagnostic-error { background: var(--danger-soft); border-left: 4px solid var(--danger); }
.diagnostic-info { background: var(--panel-soft); border-left: 4px solid var(--primary); }
.compiler-lab button:disabled { opacity: .55; cursor: not-allowed; }
.cfg-graph { overflow: auto; max-height: 40rem; border: 1px solid var(--border); border-radius: 8px; padding: 1rem; background: var(--panel-soft); }
.cfg-graph > svg { display: block; max-width: none; color: var(--muted); }
.cfg-block rect { fill: var(--panel); stroke: var(--primary); stroke-width: 1.5; }
.cfg-block.unreachable rect { stroke-dasharray: 6 4; stroke: var(--muted); }
.cfg-block-title { fill: var(--primary-dark); font: 600 16px system-ui, sans-serif; }
.cfg-instruction { fill: var(--text); font: 14px ui-monospace, monospace; }
.cfg-edge-label { fill: var(--muted); font: 14px system-ui, sans-serif; }
.cfg-graph summary { cursor: pointer; padding: 1rem 0; color: var(--text); }
.pipeline-track { flex-wrap: wrap; }
@media (max-width: 900px) { .lab-columns { grid-template-columns: minmax(0, 1fr); } .compiler-lab { width: calc(100% - 1.5rem); padding: 1rem; } }
.workbench-nav { display: flex; gap: .75rem; flex-wrap: wrap; margin: 1rem 1.5rem; }
.workbench-nav a { font-size: .875rem; color: var(--primary-dark); background: var(--panel); padding: .65rem 1rem; border: 1px solid var(--border); border-radius: 8px; text-decoration: none; }
.workbench-nav a:focus-visible { outline: 3px solid var(--highlight); outline-offset: 2px; }
#compilerLab, #grammarLab { scroll-margin-top: 1rem; }
.backend-controls, .trace-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; margin-top: 1rem; }
.backend-controls label { display: flex; gap: .75rem; align-items: center; font-size: .875rem; }
.grammar-editor, .grammar-token-input { display: block; width: 100%; border: 1px solid var(--border); border-radius: 8px; color: var(--text); background: var(--panel-soft); font: 1rem/1.7 ui-monospace, monospace; padding: 1rem; margin-top: .5rem; }
.grammar-editor { min-height: 220px; resize: vertical; tab-size: 2; }
.grammar-editor:focus, .grammar-token-input:focus { outline: 2px solid var(--primary); outline-offset: 2px; }
#grammarLab .compiler-table td { white-space: nowrap; }
#grammarWarnings p { font-size: .875rem; }
.trace-heading .inline-actions { flex-wrap: wrap; }