File size: 27,314 Bytes
b63da11
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
@import url('https://fonts.googleapis.com/css2?family=Syne:wght@500;600;700;800&family=DM+Sans:ital,wght@0,300;0,400;0,500;1,400&family=DM+Mono:wght@400;500&display=swap');

/* uglytool.dev β€” After Hours theme (v5)
 * You bought this file. Modify whatever you want β€” tweak the amber,
 * swap the font, remove the credit. It's yours now.
 */
:root,
:root.dark,
.gradio-container,
.gradio-container.dark,
body.dark {
  --ut-bg:            #151412;
  --ut-bg-deep:       #0f0e0d;
  --ut-bg-tint:       #23201b;
  --ut-panel:         #25221e;
  --ut-surface:       rgba(35, 32, 28, 0.78);
  --ut-surface-solid: #2b2721;
  --ut-surface-hover: #342f2a;
  --ut-surface-nested: rgba(36, 34, 32, 0.40);
  --ut-border:        rgba(255, 218, 159, 0.12);
  --ut-border-strong: rgba(255, 218, 159, 0.24);

  --ut-ink:           #f3eee6;
  --ut-ink-strong:    #fdfbf6;
  --ut-muted:         #a79a8a;
  --ut-dim:           #6d655b;
  --ut-on-accent:     #14110e;
  --ut-selection-ink: #fdfbf6;

  --ut-accent:        #c17f3a;
  --ut-accent-bright: #f2b35f;
  --ut-accent-deep:   #8f5925;
  --ut-accent-mid:    #d8954a;
  --ut-accent-soft:   rgba(242, 179, 95, 0.12);
  --ut-accent-dim:    rgba(242, 179, 95, 0.06);
  --ut-accent-rim:    rgba(242, 179, 95, 0.28);

  --ut-warm:          #ffcf86;
  --ut-warm-soft:     rgba(255, 207, 134, 0.12);
  --ut-warm-rim:      rgba(255, 207, 134, 0.28);

  --ut-cool:          #80786e;
  --ut-cool-soft:     rgba(128, 120, 110, 0.16);
  --ut-cool-rim:      rgba(128, 120, 110, 0.34);

  --ut-title-ink:     var(--ut-accent-bright);
  --ut-title-glow:    0 0 22px rgba(242, 179, 95, 0.20);

  --ut-font-display:  'Syne', ui-sans-serif, sans-serif;
  --ut-font-body:     'DM Sans', ui-sans-serif, system-ui, sans-serif;
  --ut-font-mono:     'DM Mono', ui-monospace, monospace;

  --ut-radius:        18px;
  --ut-radius-sm:     12px;
  --ut-radius-xs:     8px;
  --ut-radius-pill:   999px;
  --ut-transition:    220ms cubic-bezier(0.22, 0.61, 0.36, 1);

  --ut-shadow:        0 28px 70px rgba(0, 0, 0, 0.42),
                   0 1px 0 rgba(255, 218, 159, 0.07) inset,
                   0 0 0 1px rgba(255, 218, 159, 0.035) inset;
  --ut-shadow-sm:     0 10px 28px rgba(0, 0, 0, 0.30);
  --ut-glow:          0 0 34px rgba(242, 179, 95, 0.20);

  --ut-bg-layers:     radial-gradient(ellipse 72% 46% at 78% -8%, rgba(242, 179, 95, 0.14), transparent 58%),
                   radial-gradient(ellipse 56% 40% at 8% 18%, rgba(255, 207, 134, 0.055), transparent 60%),
                   linear-gradient(180deg, var(--ut-bg-tint) 0%, var(--ut-bg) 56%, var(--ut-bg-deep) 100%);
  --ut-nav-bg:        rgba(15, 14, 13, 0.76);
  --ut-card-sheen:    linear-gradient(180deg, rgba(255, 218, 159, 0.035), transparent 48%);
  --ut-bleed:         linear-gradient(180deg, rgba(242, 179, 95, 0.09), rgba(242, 179, 95, 0) 48%),
                   repeating-linear-gradient(180deg, rgba(242, 179, 95, 0.045) 0 1px, transparent 1px 30px);
  --ut-grid:          linear-gradient(90deg, rgba(242, 179, 95, 0.035) 1px, transparent 1px),
                   linear-gradient(180deg, rgba(242, 179, 95, 0.025) 1px, transparent 1px);
  --ut-grid-size:     72px 72px;
  --ut-focus-glow:    0 0 20px rgba(242, 179, 95, 0.12);
  --ut-btn-grad:      linear-gradient(135deg, #c17f3a 0%, #f2b35f 100%);
  --ut-btn-grad-hover:linear-gradient(135deg, #f2b35f 0%, #ffd493 100%);
  --ut-btn-shadow:    0 10px 24px rgba(0, 0, 0, 0.26), 0 0 0 1px rgba(255, 255, 255, 0.14) inset;
  --ut-btn-shadow-hover: 0 14px 34px rgba(0, 0, 0, 0.30), 0 0 0 1px rgba(255, 255, 255, 0.20) inset;
  --ut-thumb-glow:    0 0 12px rgba(128, 120, 110, 0.30);
  --ut-arrow:         url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M0 0l6 7 6-7z' fill='%23f2b35f'/%3E%3C/svg%3E");
  --ut-scroll:        rgba(242, 179, 95, 0.28);
  --ut-scroll-hover:  rgba(242, 179, 95, 0.48);
  --ut-code-block-bg: rgba(0, 0, 0, 0.25);
}

/* ============================================================
 * Gradio engine variables β€” map the framework's hooks to our tokens.
 * ============================================================ */
:root,
:root.dark,
.gradio-container,
.gradio-container.dark,
body.dark {
  --body-background-fill: var(--ut-bg);
  --background-fill-primary: var(--ut-panel);
  --background-fill-secondary: var(--ut-surface-solid);
  --body-text-color: var(--ut-ink);
  --body-text-color-subdued: var(--ut-muted);
  --color-accent: var(--ut-accent);
  --color-accent-soft: var(--ut-accent-soft);
  --border-color-primary: var(--ut-border);
  --border-color-accent: var(--ut-cool);

  --block-background-fill: var(--ut-surface);
  --block-border-color: var(--ut-border);
  --block-border-width: 1px;
  --block-radius: var(--ut-radius);
  --block-shadow: var(--ut-shadow);

  --block-title-background-fill: transparent;
  --block-title-border-color: transparent;
  --block-title-text-color: var(--ut-ink);
  --block-title-text-size: 1.05rem;
  --block-title-text-weight: 700;
  --block-label-background-fill: transparent;
  --block-label-border-color: transparent;
  --block-label-text-color: var(--ut-accent-bright);
  --block-label-text-size: 0.72rem;
  --block-label-text-weight: 500;

  --input-background-fill: var(--ut-surface-solid);
  --input-background-fill-focus: var(--ut-surface-solid);
  --input-border-color: var(--ut-border);
  --input-border-color-focus: var(--ut-cool);
  --input-text-size: 0.9rem;
  --input-radius: var(--ut-radius-sm);

  --button-primary-background-fill: var(--ut-accent);
  --button-primary-background-fill-hover: var(--ut-accent-bright);
  --button-primary-text-color: var(--ut-on-accent);
  --button-primary-text-color-hover: var(--ut-on-accent);
  --button-primary-border-color: var(--ut-accent);
  --button-secondary-background-fill: var(--ut-surface-solid);
  --button-secondary-background-fill-hover: var(--ut-surface-hover);
  --button-secondary-text-color: var(--ut-ink);
  --button-secondary-text-color-hover: var(--ut-ink-strong);
  --button-secondary-border-color: var(--ut-border-strong);
  --button-large-text-size: 0.92rem;
  --button-large-text-weight: 600;
  --button-large-radius: var(--ut-radius-sm);

  --slider-color: var(--ut-cool);

  --font: var(--ut-font-body);
  --font-mono: var(--ut-font-mono);

  --radius-xxs: 2px;
  --radius-xs: 4px;
  --radius-sm: var(--ut-radius-xs);
  --radius-md: var(--ut-radius-sm);
  --radius-lg: var(--ut-radius);
}

/* ============================================================
 * Part 2 β€” Root containers Β· LAYERED BACKGROUND + decorations
 * ============================================================ */

html body,
html body.dark,
html body .gradio-container,
html body .gradio-container.dark,
html body .stApp,
html body .stApp > div,
html body [data-testid="stAppViewContainer"] {
  background: var(--ut-bg-layers) !important;
  background-attachment: fixed !important;
  color: var(--ut-ink) !important;
  font-family: var(--ut-font-body) !important;
  line-height: 1.6 !important;
}

/* Decorative light-bleed + faint engineering grid on the app shell */
html body .gradio-container::before,
html body .stApp::before {
  content: "" !important;
  position: fixed !important;
  inset: 0 0 auto 0 !important;
  height: 230px !important;
  pointer-events: none !important;
  z-index: 0 !important;
  background: var(--ut-bleed) !important;
  -webkit-mask-image: linear-gradient(180deg, black, transparent 88%) !important;
  mask-image: linear-gradient(180deg, black, transparent 88%) !important;
  opacity: 0.72 !important;
}
html body .gradio-container::after,
html body .stApp::after {
  content: "" !important;
  position: fixed !important;
  inset: 0 !important;
  pointer-events: none !important;
  z-index: 0 !important;
  background-image: var(--ut-grid) !important;
  background-size: var(--ut-grid-size) !important;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, black 18%, black 82%, transparent 100%) !important;
  mask-image: linear-gradient(180deg, transparent 0%, black 18%, black 82%, transparent 100%) !important;
  opacity: 0.42 !important;
}

html body .main .block-container,
html body .stApp [data-testid="stVerticalBlock"] {
  background: transparent !important;
  position: relative !important;
  z-index: 1 !important;
}

/* ============================================================
 * Part 3 β€” Typography
 * ============================================================ */

html body h1, html body h2, html body h3, html body h4, html body h5, html body h6,
html body .gradio-container h1, html body .gradio-container h2, html body .gradio-container h3,
html body .gradio-container h4, html body .gradio-container h5, html body .gradio-container h6,
html body .gradio-container h1 *, html body .gradio-container h2 *, html body .gradio-container h3 *,
html body .prose h1, html body .prose h2, html body .prose h3, html body .prose h4,
html body .prose h1 *, html body .prose h2 *, html body .prose h3 *,
html body .markdown h1, html body .markdown h2, html body .markdown h3,
html body .markdown h1 *, html body .markdown h2 *, html body .markdown h3 *,
html body .gr-markdown h1, html body .gr-markdown h2, html body .gr-markdown h3,
html body .gr-markdown h1 *, html body .gr-markdown h2 *, html body .gr-markdown h3 *,
html body .stApp h1, html body .stApp h2, html body .stApp h3,
html body [data-testid="stMarkdownContainer"] h1,
html body [data-testid="stMarkdownContainer"] h2,
html body [data-testid="stMarkdownContainer"] h3,
html body [data-testid="stMarkdownContainer"] h1 *,
html body [data-testid="stMarkdownContainer"] h2 *,
html body [data-testid="stMarkdownContainer"] h3 * {
  font-family: var(--ut-font-display) !important;
  font-weight: 700 !important;
  letter-spacing: -0.02em !important;
  color: var(--ut-ink) !important;
  -webkit-text-fill-color: var(--ut-ink) !important;
  background-image: none !important;
  background-clip: unset !important;
  -webkit-background-clip: unset !important;
  line-height: 1.12 !important;
}

html body h1, html body .gradio-container h1, html body .stApp h1 {
  font-size: 2.6rem !important;
  line-height: 1.05 !important;
  margin-bottom: 0.3em !important;
  letter-spacing: -0.03em !important;
  color: var(--ut-title-ink) !important;
  -webkit-text-fill-color: var(--ut-title-ink) !important;
  text-shadow: var(--ut-title-glow) !important;
}
html body h2, html body .gradio-container h2, html body .stApp h2 {
  font-size: 1.5rem !important;
  color: var(--ut-accent) !important;
  -webkit-text-fill-color: var(--ut-accent) !important;
}
html body h3, html body .gradio-container h3, html body .stApp h3,
html body h4, html body .gradio-container h4, html body .stApp h4,
html body h3 *, html body .gradio-container h3 *, html body .stApp h3 *,
html body h4 *, html body .gradio-container h4 *, html body .stApp h4 *,
html body [data-testid="stMarkdownContainer"] h3,
html body [data-testid="stMarkdownContainer"] h3 *,
html body .gr-markdown h3, html body .gr-markdown h3 *,
html body .markdown h3, html body .markdown h3 * {
  font-size: 1.1rem !important;
  letter-spacing: -0.01em !important;
  font-weight: 500 !important;
  color: var(--ut-accent-deep) !important;
  -webkit-text-fill-color: var(--ut-accent-deep) !important;
}

html body em,
html body .gradio-container em,
html body .stApp em {
  font-style: italic !important;
  color: var(--ut-ink) !important;
}

html body blockquote,
html body .gradio-container blockquote,
html body .stApp blockquote {
  border-left: 2px solid var(--ut-accent-rim) !important;
  padding-left: 16px !important;
  color: var(--ut-muted) !important;
  font-style: italic !important;
}

/* ============================================================
 * Part 4 β€” Labels Β· LETTERSPACED UPPERCASE
 * ============================================================ */

html body .gradio-container .block-label,
html body .gradio-container .block-label *,
html body .gradio-container label,
html body .gradio-container label > *,
html body .gradio-container [class*="label-wrap"],
html body .gradio-container [class*="label-wrap"] *,
html body .gradio-container [data-testid*="label"],
html body .gradio-container .wrap > label,
html body .stApp label,
html body .stApp [data-testid="stWidgetLabel"],
html body .stApp [data-testid="stWidgetLabel"] > *,
html body .stApp [data-testid="stWidgetLabel"] p {
  font-family: var(--ut-font-mono) !important;
  font-size: 0.78rem !important;
  color: var(--ut-accent-bright) !important;
  letter-spacing: 0.13em !important;
  text-transform: uppercase !important;
  font-weight: 600 !important;
  background: transparent !important;
}

/* Section eyebrows / kickers β€” even more letterspaced */
html body .gradio-container .ut-eyebrow,
html body .stApp .ut-eyebrow {
  font-family: var(--ut-font-mono) !important;
  font-size: 0.68rem !important;
  color: var(--ut-muted) !important;
  letter-spacing: 0.2em !important;
  text-transform: uppercase !important;
}

/* ============================================================
 * Part 5 β€” Cards / blocks Β· TRANSLUCENT GLASS + SOFT GLOW
 * ============================================================ */

html body .gradio-container .block,
html body .gradio-container .gr-block,
html body .gradio-container .gr-padded,
html body .gradio-container .gr-form,
html body .gradio-container .form,
html body .gradio-container .gr-box,
html body .stApp [data-testid="stForm"],
html body .stApp [data-testid="stExpander"] {
  background: var(--ut-card-sheen), var(--ut-surface) !important;
  -webkit-backdrop-filter: blur(18px) saturate(140%) !important;
  backdrop-filter: blur(18px) saturate(140%) !important;
  border: 1px solid var(--ut-border) !important;
  border-radius: var(--ut-radius) !important;
  box-shadow: var(--ut-shadow) !important;
  padding: 22px !important;
  position: relative !important;
  z-index: 1 !important;
  transition: border-color var(--ut-transition), box-shadow var(--ut-transition) !important;
}

/* Top hairline accent on cards (matches the Path B wrapper) */
html body .gradio-container .block::before,
html body .gradio-container .form::before,
html body .stApp [data-testid="stForm"]::before {
  content: "" !important;
  position: absolute !important;
  top: 0 !important; left: 0 !important; right: 0 !important;
  height: 1px !important;
  background: var(--ut-card-hairline) !important;
  opacity: 0.66 !important;
  pointer-events: none !important;
  z-index: 2 !important;
}

html body .gradio-container .block:hover,
html body .gradio-container .form:hover,
html body .stApp [data-testid="stForm"]:hover {
  border-color: var(--ut-border-strong) !important;
}

/* Layout wrappers + text blocks must NOT look like cards (kills the
   russian-doll nesting: the page wrapper and markdown headings render flat) */
html body .gradio-container .wrap,
html body .gradio-container main.contain,
html body .gradio-container .block:has([data-testid="markdown-wrapper"]) {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  padding: 0 !important;
}
html body .gradio-container .wrap::before,
html body .gradio-container main.contain::before,
html body .gradio-container .block:has([data-testid="markdown-wrapper"])::before {
  display: none !important;
}

/* Inputs sitting directly inside a form-card shouldn't double-card */
html body .gradio-container .form .block {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
}
html body .gradio-container .form .block::before { display: none !important; }

/* Nested inner blocks β€” slightly less prominent */
html body .gradio-container .block .block:not(.form .block),
html body .gradio-container .block .gr-form {
  background: var(--ut-surface-nested) !important;
  box-shadow: none !important;
  padding: 16px !important;
}

/* ============================================================
 * Part 6 β€” Inputs Β· refined borders, generous radii, cool focus glow
 * ============================================================ */

html body .gradio-container input[type="text"],
html body .gradio-container input[type="number"],
html body .gradio-container input[type="email"],
html body .gradio-container input[type="password"],
html body .gradio-container input[type="search"],
html body .gradio-container textarea,
html body .gradio-container select,
html body .gradio-container .gr-textbox,
html body .gradio-container .gr-textbox textarea,
html body .gradio-container .gr-textbox input,
html body .stApp input[type="text"],
html body .stApp input[type="number"],
html body .stApp textarea,
html body .stApp [data-baseweb="select"] > div,
html body .stApp [data-baseweb="input"] {
  background: var(--ut-surface-solid) !important;
  border: 1px solid var(--ut-border-strong) !important;
  border-radius: var(--ut-radius-sm) !important;
  color: var(--ut-ink) !important;
  font-family: var(--ut-font-mono) !important;
  font-size: 0.9rem !important;
  caret-color: var(--ut-warm) !important;
  padding: 13px 16px !important;
  transition: border-color var(--ut-transition), box-shadow var(--ut-transition) !important;
}

html body .gradio-container textarea,
html body .stApp textarea {
  min-height: 130px !important;
  line-height: 1.6 !important;
}

html body .gradio-container input:focus,
html body .gradio-container textarea:focus,
html body .gradio-container select:focus,
html body .stApp input:focus,
html body .stApp textarea:focus {
  border-color: var(--ut-cool) !important;
  outline: none !important;
  box-shadow: 0 0 0 3px var(--ut-accent-soft), var(--ut-focus-glow) !important;
}

html body .gradio-container ::placeholder,
html body .stApp ::placeholder {
  color: var(--ut-dim) !important;
}

/* Custom select β€” inline SVG accent arrow */
html body .gradio-container select,
html body .gradio-container .gr-dropdown select {
  appearance: none !important;
  -webkit-appearance: none !important;
  background-image: var(--ut-arrow) !important;
  background-repeat: no-repeat !important;
  background-position: right 14px center !important;
  padding-right: 38px !important;
}

/* Numeric outputs β€” tabular nums */
html body .gradio-container .gr-number input,
html body .gradio-container [class*="number"] input,
html body .gradio-container .output-number,
html body .gradio-container .metric,
html body .stApp [data-testid="stMetricValue"],
html body .stApp [data-testid="stNumberInput"] input {
  font-variant-numeric: tabular-nums !important;
  font-feature-settings: 'tnum' !important;
}

/* ============================================================
 * Part 7 β€” Buttons Β· gradient fill + glow hover
 * ============================================================ */

html body .gradio-container button,
html body .gradio-container .gr-button,
html body .gradio-container [class*="gr-button"],
html body .gradio-container button.primary,
html body .gradio-container .primary,
html body .stApp .stButton > button,
html body .stApp button[kind="primary"] {
  background: var(--ut-btn-grad) !important;
  color: var(--ut-on-accent) !important;
  font-family: var(--ut-font-display) !important;
  font-weight: 600 !important;
  font-size: 0.92rem !important;
  letter-spacing: 0.02em !important;
  border: none !important;
  border-radius: var(--ut-radius-sm) !important;
  padding: 13px 28px !important;
  cursor: pointer !important;
  box-shadow: var(--ut-btn-shadow) !important;
  transition: transform 100ms ease,
              box-shadow var(--ut-transition),
              background var(--ut-transition) !important;
}

html body .gradio-container button:hover,
html body .gradio-container .gr-button:hover,
html body .stApp .stButton > button:hover {
  background: var(--ut-btn-grad-hover) !important;
  color: var(--ut-on-accent) !important;
  box-shadow: var(--ut-btn-shadow-hover), var(--ut-glow) !important;
}

html body .gradio-container button:active,
html body .stApp .stButton > button:active {
  transform: scale(0.985) !important;
  background: var(--ut-accent-deep) !important;
}

html body .gradio-container button.secondary,
html body .gradio-container .secondary,
html body .stApp button[kind="secondary"] {
  background: var(--ut-surface-solid) !important;
  color: var(--ut-ink) !important;
  border: 1px solid var(--ut-border-strong) !important;
  box-shadow: var(--ut-shadow-sm) !important;
}

html body .gradio-container button.secondary:hover,
html body .stApp button[kind="secondary"]:hover {
  background: var(--ut-surface-hover) !important;
  border-color: var(--ut-accent-rim) !important;
  color: var(--ut-ink-strong) !important;
}

/* ============================================================
 * Part 8 β€” Sliders, checkboxes, radios Β· cool accent
 * ============================================================ */

html body input[type="range"] {
  accent-color: var(--ut-cool) !important;
  height: 4px !important;
}
html body input[type="range"]::-webkit-slider-thumb {
  background: var(--ut-cool) !important;
  border: 2px solid var(--ut-bg) !important;
  box-shadow: 0 0 0 1px var(--ut-cool-rim), var(--ut-thumb-glow) !important;
  width: 16px !important;
  height: 16px !important;
}
html body input[type="range"]::-moz-range-thumb {
  background: var(--ut-cool) !important;
  border: 2px solid var(--ut-bg) !important;
  width: 16px !important;
  height: 16px !important;
}
html body input[type="checkbox"],
html body input[type="radio"] {
  accent-color: var(--ut-accent) !important;
  width: 15px !important;
  height: 15px !important;
}

/* ============================================================
 * Part 9 β€” File uploads
 * ============================================================ */

html body .gradio-container .gr-file-upload,
html body .gradio-container input[type="file"],
html body .stApp [data-testid="stFileUploader"],
html body .stApp [data-testid="stFileUploaderDropzone"] {
  background: var(--ut-accent-dim) !important;
  border: 1px dashed var(--ut-accent-rim) !important;
  border-radius: var(--ut-radius-sm) !important;
  color: var(--ut-ink) !important;
  transition: background var(--ut-transition),
              border-color var(--ut-transition) !important;
}
html body .gradio-container .gr-file-upload:hover,
html body .stApp [data-testid="stFileUploader"]:hover {
  background: var(--ut-accent-soft) !important;
  border-color: var(--ut-accent) !important;
}

html body input[type="file"]::file-selector-button {
  background: var(--ut-accent-soft) !important;
  color: var(--ut-accent) !important;
  border: 1px solid var(--ut-accent-rim) !important;
  border-radius: var(--ut-radius-xs) !important;
  padding: 7px 14px !important;
  margin-right: 14px !important;
  font-family: var(--ut-font-mono) !important;
  font-size: 0.78rem !important;
  letter-spacing: 0.06em !important;
  cursor: pointer !important;
}

/* ============================================================
 * Part 10 β€” Markdown, code, links
 * ============================================================ */

html body .gradio-container .markdown,
html body .gradio-container .gr-markdown,
html body .gradio-container .prose,
html body .stApp [data-testid="stMarkdownContainer"] {
  color: var(--ut-ink) !important;
  font-family: var(--ut-font-body) !important;
  line-height: 1.65 !important;
}

html body .gradio-container a,
html body .stApp a {
  color: var(--ut-accent) !important;
  text-decoration: none !important;
  border-bottom: 1px solid var(--ut-accent-rim) !important;
  transition: border-color var(--ut-transition), color var(--ut-transition) !important;
}
html body .gradio-container a:hover,
html body .stApp a:hover {
  color: var(--ut-accent-bright) !important;
  border-bottom-color: var(--ut-accent) !important;
}

html body code,
html body .gradio-container code,
html body .stApp code {
  background: var(--ut-accent-dim) !important;
  color: var(--ut-accent) !important;
  font-family: var(--ut-font-mono) !important;
  font-size: 0.86em !important;
  padding: 2px 7px !important;
  border-radius: var(--ut-radius-xs) !important;
  border: 1px solid var(--ut-accent-rim) !important;
}

html body pre code,
html body .gradio-container pre code {
  border: 1px solid var(--ut-border) !important;
  background: var(--ut-code-block-bg) !important;
  display: block !important;
  padding: 14px 16px !important;
  border-radius: var(--ut-radius-sm) !important;
  line-height: 1.55 !important;
}

/* ============================================================
 * Part 11 β€” Callout / interpretation card
 * Use class .ut-callout on a div for editorial-voice prose blocks.
 * ============================================================ */

html body .ut-callout,
html body .gradio-container .ut-callout,
html body .stApp .ut-callout,
html body .gradio-container [class*="info"]:not(button):not(input),
html body .stApp .stAlert {
  background: var(--ut-accent-soft) !important;
  border: 1px solid var(--ut-accent-rim) !important;
  border-radius: var(--ut-radius-sm) !important;
  padding: 14px 18px !important;
  font-size: 0.9rem !important;
  color: var(--ut-muted) !important;
  line-height: 1.6 !important;
}

html body .ut-callout strong,
html body .gradio-container .ut-callout strong,
html body .stApp .ut-callout strong {
  color: var(--ut-ink) !important;
  font-weight: 600 !important;
}

/* ============================================================
 * Part 12 β€” Scrollbars + Streamlit chrome
 * ============================================================ */

html body ::-webkit-scrollbar { width: 10px; height: 10px; }
html body ::-webkit-scrollbar-track {
  background: transparent;
}
html body ::-webkit-scrollbar-thumb {
  background: var(--ut-scroll);
  border-radius: var(--ut-radius-pill);
  border: 2px solid transparent;
  background-clip: padding-box;
}
html body ::-webkit-scrollbar-thumb:hover {
  background: var(--ut-scroll-hover);
  background-clip: padding-box;
  border: 2px solid transparent;
}

html body .stApp header[data-testid="stHeader"] {
  background: var(--ut-nav-bg) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  backdrop-filter: blur(14px) !important;
  border-bottom: 1px solid var(--ut-border) !important;
}
html body .stApp [data-testid="stSidebar"] {
  background: var(--ut-panel) !important;
  border-right: 1px solid var(--ut-border) !important;
}

/* ============================================================
 * Part 13 β€” Misc polish
 * ============================================================ */

html body hr,
html body .gradio-container hr,
html body .stApp hr {
  border: none !important;
  border-top: 1px solid var(--ut-border) !important;
  margin: 24px 0 !important;
}

html body ::selection {
  background: var(--ut-accent-soft);
  color: var(--ut-selection-ink);
}

/* Animate things appearing β€” subtle, not distracting */
@media (prefers-reduced-motion: no-preference) {
  html body .gradio-container .block,
  html body .stApp [data-testid="stForm"] {
    animation: ut-fade-in 320ms cubic-bezier(0.22, 0.61, 0.36, 1);
  }
  @keyframes ut-fade-in {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
  }
}