ashu1069 commited on
Commit
dabb502
·
1 Parent(s): 7496d56

ui: retheme via Gradio CSS variables — coherent contrast on every component

Browse files
Files changed (1) hide show
  1. app.py +276 -299
app.py CHANGED
@@ -161,391 +161,368 @@ def dispatch(mode: str, image_path: str | None, head: str, jurisdiction: str):
161
 
162
 
163
  CSS = """
164
- @import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,300;9..144,400;9..144,500&family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');
165
-
166
- :root {
167
- --bg-0: #04080a;
168
- --bg-1: #07120f;
169
- --bg-2: #0a1f17;
 
 
 
170
  --emerald: #00d97e;
171
  --emerald-glow: #00ff8c;
172
  --cyan: #00e5ff;
173
  --leaf: #7dd3a8;
174
  --ink: #f1faf4;
175
- --ink-dim: #b8d2c6;
176
  --ink-muted: #8aa79b;
177
- --line: rgba(125, 211, 168, 0.14);
178
- --line-bright: rgba(125, 211, 168, 0.28);
179
- --panel: rgba(10, 28, 22, 0.55);
180
- --panel-hi: rgba(18, 42, 32, 0.72);
181
- }
182
 
183
- /* ===== Page background ===== */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
184
  html, body, gradio-app, .gradio-container {
185
- background: radial-gradient(ellipse 80% 60% at 20% 0%, rgba(0, 217, 126, 0.18), transparent 60%),
186
- radial-gradient(ellipse 70% 50% at 85% 20%, rgba(0, 229, 255, 0.10), transparent 60%),
187
- radial-gradient(ellipse 90% 70% at 50% 110%, rgba(0, 217, 126, 0.10), transparent 60%),
188
- linear-gradient(180deg, #04080a 0%, #061410 50%, #04080a 100%) !important;
189
- color: var(--ink) !important;
 
190
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif !important;
 
191
  }
192
- .gradio-container { max-width: 1280px !important; margin: 0 auto !important; }
193
 
194
  /* ===== Hero ===== */
195
- #hero { padding: 32px 4px 12px; }
196
  #hero h1 {
197
  font-family: "Fraunces", Georgia, serif;
198
  font-weight: 400;
199
  font-size: clamp(2rem, 5vw, 3.4rem);
200
  letter-spacing: -0.025em;
201
- line-height: 1; margin: 0; color: var(--ink);
202
  }
203
  #hero h1 em {
204
  font-style: italic;
205
- background: linear-gradient(135deg, var(--emerald-glow), var(--cyan));
206
  -webkit-background-clip: text; background-clip: text;
207
  -webkit-text-fill-color: transparent;
208
  font-weight: 300;
209
  }
210
- #hero p { color: var(--ink-dim); margin-top: 14px; max-width: 680px; line-height: 1.55; }
 
211
  #hero .chip {
212
  display: inline-flex; gap: 8px; align-items: center;
213
  padding: 6px 14px; border-radius: 999px;
214
- border: 1px solid var(--line-bright);
215
  background: linear-gradient(135deg, rgba(0, 217, 126, 0.08), rgba(0, 229, 255, 0.04));
216
- color: var(--leaf); font-size: 0.82rem; font-weight: 500;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
217
  }
218
- .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--emerald-glow);
219
- box-shadow: 0 0 12px var(--emerald-glow); display: inline-block;
220
- animation: pulse 1.6s ease-in-out infinite; }
221
- @keyframes pulse { 0%,100% {opacity:1;} 50% {opacity:0.4;} }
222
-
223
- /* ===== Catch-all: every Gradio block becomes a glass panel ===== */
224
- .gradio-container [class*="block"],
225
- .gradio-container [class*="panel"],
226
- .gradio-container [class*="form"],
227
- .gradio-container .form,
228
- .gradio-container .block {
229
- background: var(--panel) !important;
230
- border: 1px solid var(--line) !important;
231
- border-radius: 14px !important;
232
- backdrop-filter: blur(10px);
233
  }
234
- /* Don't double-wrap rows/cols they're transparent layout containers */
235
- .gradio-container [class*="row"],
236
- .gradio-container [class*="column"],
237
- .gradio-container [class*="group"]:not([class*="block"]) {
238
- background: transparent !important;
239
- border: 0 !important;
240
- backdrop-filter: none;
 
241
  }
242
-
243
- /* ===== Labels ===== */
244
- .gradio-container label,
245
- .gradio-container [class*="label"] {
246
- color: var(--ink-dim) !important;
247
- font-size: 0.78rem !important;
 
 
 
 
 
 
248
  font-weight: 600 !important;
249
- letter-spacing: 0.06em;
250
  text-transform: uppercase;
 
 
251
  }
252
 
253
- /* ===== Inputs (textbox, dropdown, etc.) ===== */
254
- .gradio-container input[type="text"],
255
- .gradio-container input[type="number"],
256
- .gradio-container textarea,
257
- .gradio-container select,
258
- .gradio-container [class*="input"] input,
259
- .gradio-container [class*="textbox"] textarea {
260
- background: rgba(4, 12, 9, 0.7) !important;
261
- color: var(--ink) !important;
262
- border: 1px solid var(--line) !important;
263
- border-radius: 10px !important;
264
- font-family: "Inter", sans-serif !important;
265
- }
266
- .gradio-container input:focus,
267
- .gradio-container textarea:focus,
268
- .gradio-container select:focus {
269
- border-color: var(--emerald) !important;
270
- outline: 0 !important;
271
- box-shadow: 0 0 0 3px rgba(0, 217, 126, 0.15) !important;
272
- }
273
-
274
- /* ===== Dropdown menu ===== */
275
- .gradio-container [class*="dropdown"] [class*="options"],
276
- .gradio-container [class*="dropdown"] ul,
277
- .gradio-container [role="listbox"] {
278
- background: var(--bg-1) !important;
279
- border: 1px solid var(--line-bright) !important;
280
- border-radius: 10px !important;
281
- color: var(--ink) !important;
282
- }
283
- .gradio-container [role="option"] {
284
- color: var(--ink) !important;
285
- }
286
- .gradio-container [role="option"]:hover,
287
- .gradio-container [role="option"][aria-selected="true"] {
288
- background: rgba(0, 217, 126, 0.12) !important;
289
- color: var(--emerald-glow) !important;
290
- }
291
-
292
- /* ===== Radio buttons ===== */
293
- .gradio-container [class*="radio"] label,
294
- .gradio-container input[type="radio"] + span,
295
- .gradio-container [role="radio"] {
296
- background: rgba(4, 12, 9, 0.55) !important;
297
- border: 1px solid var(--line) !important;
298
- border-radius: 10px !important;
299
- color: var(--ink-dim) !important;
300
- padding: 8px 14px !important;
301
- cursor: pointer !important;
302
- font-weight: 500 !important;
303
- text-transform: none !important;
304
- letter-spacing: 0 !important;
305
- font-size: 0.9rem !important;
306
- transition: all 200ms;
307
- }
308
- .gradio-container [class*="radio"] input[type="radio"]:checked + span,
309
- .gradio-container [class*="radio"] [aria-checked="true"],
310
- .gradio-container [role="radio"][aria-checked="true"] {
311
- background: linear-gradient(135deg, rgba(0, 217, 126, 0.18), rgba(0, 229, 255, 0.08)) !important;
312
- border-color: var(--emerald) !important;
313
- color: var(--emerald-glow) !important;
314
- }
315
-
316
- /* ===== Buttons ===== */
317
- .gradio-container button {
318
- font-family: "Inter", sans-serif !important;
319
- font-weight: 600 !important;
320
- border-radius: 999px !important;
321
- transition: all 240ms cubic-bezier(0.2, 0.8, 0.2, 1) !important;
322
- }
323
- .gradio-container button[class*="primary"],
324
- .gradio-container .primary {
325
- background: linear-gradient(135deg, var(--emerald) 0%, var(--cyan) 100%) !important;
326
- color: #04130c !important;
327
- border: 0 !important;
328
- box-shadow: 0 6px 24px rgba(0, 217, 126, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
329
- }
330
- .gradio-container button[class*="primary"]:hover {
331
- transform: translateY(-1px);
332
- box-shadow: 0 12px 32px rgba(0, 217, 126, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
333
- }
334
- .gradio-container button[class*="secondary"],
335
- .gradio-container button:not([class*="primary"]) {
336
- background: rgba(125, 211, 168, 0.06) !important;
337
- color: var(--ink) !important;
338
- border: 1px solid var(--line-bright) !important;
339
  }
340
- .gradio-container button:not([class*="primary"]):hover {
341
- background: rgba(0, 217, 126, 0.12) !important;
342
- border-color: var(--emerald) !important;
 
343
  }
344
 
345
- /* ===== Image upload zone ===== */
346
- .gradio-container [class*="image"] [class*="upload"],
347
  .gradio-container [data-testid="image"],
 
348
  .gradio-container [class*="ImageUploader"] {
349
  background: rgba(4, 12, 9, 0.55) !important;
350
- border: 1.5px dashed var(--line-bright) !important;
351
  border-radius: 14px !important;
352
- color: var(--ink-dim) !important;
353
  transition: all 220ms;
354
  }
355
  .gradio-container [class*="image"] [class*="upload"]:hover {
356
- border-color: var(--emerald) !important;
357
  background: rgba(0, 217, 126, 0.05) !important;
358
  }
359
- .gradio-container [class*="image"] svg {
360
- color: var(--leaf) !important;
 
361
  }
 
362
 
363
  /* ===== Examples gallery ===== */
364
- .gradio-container [class*="examples"] table,
365
- .gradio-container [class*="example"] {
366
  background: transparent !important;
 
 
 
 
367
  border: 0 !important;
368
  }
369
  .gradio-container [class*="examples"] tr,
370
- .gradio-container [class*="example"] td {
371
- background: rgba(7, 18, 15, 0.6) !important;
372
- border: 1px solid var(--line) !important;
373
  border-radius: 10px !important;
374
- color: var(--ink-dim) !important;
 
375
  }
376
  .gradio-container [class*="examples"] tr:hover {
377
- border-color: var(--emerald) !important;
378
- background: rgba(0, 217, 126, 0.05) !important;
379
- }
380
-
381
- /* ===== Output: Markdown rendering ===== */
382
- .gradio-container [class*="markdown"],
383
- .gradio-container [class*="prose"] {
384
- color: var(--ink) !important;
385
- font-family: "Inter", sans-serif !important;
386
- }
387
- .gradio-container [class*="markdown"] h1,
388
- .gradio-container [class*="markdown"] h2,
389
- .gradio-container [class*="markdown"] h3 {
390
- font-family: "Fraunces", Georgia, serif !important;
391
- font-weight: 400 !important;
392
- letter-spacing: -0.015em !important;
393
- color: var(--ink) !important;
394
- margin-top: 4px !important;
395
- }
396
- .gradio-container [class*="markdown"] h3 {
397
- font-size: 1.4rem !important;
398
- border-bottom: 1px solid var(--line) !important;
399
- padding-bottom: 8px;
400
- }
401
- .gradio-container [class*="markdown"] strong { color: var(--ink) !important; }
402
- .gradio-container [class*="markdown"] em { color: var(--leaf) !important; font-style: italic; }
403
- .gradio-container [class*="markdown"] code {
404
- background: rgba(0, 217, 126, 0.08) !important;
405
- color: var(--leaf) !important;
406
- font-family: "JetBrains Mono", ui-monospace, monospace !important;
407
- padding: 2px 6px !important;
408
- border-radius: 6px !important;
409
- font-size: 0.86em !important;
410
- border: 1px solid var(--line);
411
- }
412
- .gradio-container [class*="markdown"] table {
413
- border-collapse: separate !important;
414
- border-spacing: 0 !important;
415
- width: 100%;
416
- margin: 12px 0 !important;
417
- border: 1px solid var(--line) !important;
418
- border-radius: 10px !important;
419
- overflow: hidden;
420
  }
421
- .gradio-container [class*="markdown"] th,
422
- .gradio-container [class*="markdown"] td {
423
- padding: 10px 14px !important;
424
- border-bottom: 1px solid var(--line) !important;
425
- text-align: left !important;
426
- background: rgba(7, 18, 15, 0.5) !important;
427
  }
428
- .gradio-container [class*="markdown"] tr:last-child td { border-bottom: 0 !important; }
429
- .gradio-container [class*="markdown"] th {
430
- background: rgba(0, 217, 126, 0.06) !important;
431
- color: var(--leaf) !important;
 
432
  font-weight: 600 !important;
 
433
  text-transform: uppercase;
434
- font-size: 0.74rem;
435
- letter-spacing: 0.08em;
436
  }
437
 
438
- /* ===== Output: Code block (JSON) ===== */
439
  .gradio-container [class*="code"] pre,
440
  .gradio-container [class*="code"] code,
441
  .gradio-container [class*="Code"] pre {
442
  background: rgba(2, 8, 6, 0.92) !important;
443
  color: #d2efe0 !important;
444
  font-family: "JetBrains Mono", ui-monospace, monospace !important;
445
- font-size: 0.82rem !important;
446
- line-height: 1.6 !important;
447
  border-radius: 12px !important;
448
- border: 1px solid var(--line) !important;
449
  padding: 16px !important;
450
  }
451
  .gradio-container [class*="code"] .token.string { color: #a5e8ff !important; }
452
  .gradio-container [class*="code"] .token.property,
453
- .gradio-container [class*="code"] .token.key { color: var(--leaf) !important; }
454
  .gradio-container [class*="code"] .token.number { color: #ffb547 !important; }
455
  .gradio-container [class*="code"] .token.boolean,
456
  .gradio-container [class*="code"] .token.null { color: #ff9bcc !important; }
457
-
458
- /* ===== Accordion ===== */
459
- .gradio-container [class*="accordion"] [class*="label"],
460
- .gradio-container details summary {
461
- color: var(--leaf) !important;
462
- font-weight: 600 !important;
463
- letter-spacing: 0.06em;
464
- text-transform: uppercase;
465
- font-size: 0.78rem !important;
466
- cursor: pointer;
467
- }
468
-
469
- /* ===== Section titles (gr.Markdown ### Capture / Passport) ===== */
470
- .gradio-container [class*="markdown"] > h3:first-child {
471
- font-size: 1.6rem !important;
472
- border-bottom: 0 !important;
473
- padding-bottom: 0;
474
- margin-bottom: 12px !important;
475
- display: flex; align-items: center; gap: 12px;
476
- }
477
- .gradio-container [class*="markdown"] > h3:first-child::before {
478
- content: "";
479
- width: 28px; height: 1px;
480
- background: linear-gradient(90deg, var(--emerald), transparent);
481
- }
482
 
483
  /* ===== Scrollbars ===== */
484
  .gradio-container ::-webkit-scrollbar { width: 8px; height: 8px; }
485
- .gradio-container ::-webkit-scrollbar-thumb { background: rgba(125, 211, 168, 0.18); border-radius: 4px; }
486
  .gradio-container ::-webkit-scrollbar-track { background: transparent; }
487
 
488
  /* ===== Selection ===== */
489
  ::selection { background: rgba(0, 217, 126, 0.35); color: white; }
490
 
491
- /* ===== Footer ===== */
492
- .gradio-container a { color: var(--leaf) !important; }
493
- .gradio-container a:hover { color: var(--emerald-glow) !important; }
494
-
495
- /* ===== Force readable text everywhere ===== */
496
- .gradio-container,
497
- .gradio-container p,
498
- .gradio-container span,
499
- .gradio-container div {
500
- color: var(--ink);
501
- }
502
- .gradio-container [class*="markdown"] p,
503
- .gradio-container [class*="markdown"] li,
504
- .gradio-container [class*="markdown"] td {
505
- color: var(--ink) !important;
506
- }
507
- /* Gradio's small "info" / helper text under inputs */
508
- .gradio-container [class*="info"],
509
- .gradio-container [class*="hint"],
510
- .gradio-container [class*="description"],
511
- .gradio-container [class*="help"],
512
- .gradio-container small {
513
- color: var(--ink-dim) !important;
514
- font-size: 0.82rem !important;
515
- font-weight: 400 !important;
516
- letter-spacing: 0 !important;
517
- text-transform: none !important;
518
- opacity: 1 !important;
519
- margin-top: 6px !important;
520
- }
521
- /* Placeholder text */
522
  .gradio-container input::placeholder,
523
- .gradio-container textarea::placeholder {
524
- color: var(--ink-muted) !important;
525
- opacity: 1 !important;
526
- }
527
- /* Example gallery cells text */
528
- .gradio-container [class*="examples"] td,
529
- .gradio-container [class*="examples"] span,
530
- .gradio-container [class*="example"] span {
531
- color: var(--ink) !important;
532
- }
533
- /* Image upload "drop image here" / "click to upload" text */
534
- .gradio-container [class*="image"] [class*="upload"] *,
535
- .gradio-container [class*="upload-text"],
536
- .gradio-container [class*="empty"] {
537
- color: var(--ink-dim) !important;
538
- }
539
- /* Radio option text — keep readable when not selected */
540
- .gradio-container [role="radio"]:not([aria-checked="true"]),
541
- .gradio-container [class*="radio"] label:not([class*="selected"]) {
542
- color: var(--ink) !important;
543
- }
544
- /* Dropdown selected value */
545
- .gradio-container [class*="dropdown"] input,
546
- .gradio-container [class*="dropdown"] [class*="single"] {
547
- color: var(--ink) !important;
548
- }
549
  """
550
 
551
  HERO_HTML = """
 
161
 
162
 
163
  CSS = """
164
+ @import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,300;9..144,400;9..144,500;9..144,600&family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');
165
+
166
+ /* ============================================================
167
+ Gradio CSS variable overrides — single source of truth.
168
+ Every component (input, button, code, dropdown, examples,
169
+ accordion) reads from these, so we don't fight selectors.
170
+ ============================================================ */
171
+ :root, .gradio-container, body, gradio-app {
172
+ /* Palette */
173
  --emerald: #00d97e;
174
  --emerald-glow: #00ff8c;
175
  --cyan: #00e5ff;
176
  --leaf: #7dd3a8;
177
  --ink: #f1faf4;
178
+ --ink-dim: #c4d8cd;
179
  --ink-muted: #8aa79b;
 
 
 
 
 
180
 
181
+ /* Body */
182
+ --body-background-fill: transparent;
183
+ --body-text-color: #f1faf4;
184
+ --body-text-color-subdued: #c4d8cd;
185
+ --body-text-size: 14px;
186
+ --background-fill-primary: rgba(10, 28, 22, 0.62);
187
+ --background-fill-secondary: rgba(7, 18, 15, 0.55);
188
+ --border-color-primary: rgba(125, 211, 168, 0.20);
189
+ --border-color-accent: #00d97e;
190
+ --border-color-accent-subdued: rgba(0, 217, 126, 0.35);
191
+
192
+ /* Accent */
193
+ --color-accent: #00d97e;
194
+ --color-accent-soft: rgba(0, 217, 126, 0.18);
195
+ --link-text-color: #7dd3a8;
196
+ --link-text-color-active: #00ff8c;
197
+ --link-text-color-hover: #00ff8c;
198
+ --link-text-color-visited: #7dd3a8;
199
+
200
+ /* Block (panel) */
201
+ --block-background-fill: rgba(10, 28, 22, 0.62);
202
+ --block-border-color: rgba(125, 211, 168, 0.20);
203
+ --block-border-width: 1px;
204
+ --block-radius: 14px;
205
+ --block-padding: 18px;
206
+ --block-shadow: 0 4px 24px rgba(0, 0, 0, 0.18);
207
+ --block-label-background-fill: transparent;
208
+ --block-label-text-color: #c4d8cd;
209
+ --block-label-text-size: 0.78rem;
210
+ --block-label-text-weight: 600;
211
+ --block-title-background-fill: transparent;
212
+ --block-title-text-color: #f1faf4;
213
+ --block-title-text-size: 1rem;
214
+ --block-title-text-weight: 600;
215
+ --block-info-text-color: #c4d8cd;
216
+ --block-info-text-size: 0.82rem;
217
+ --block-info-text-weight: 400;
218
+
219
+ /* Inputs */
220
+ --input-background-fill: rgba(4, 12, 9, 0.7);
221
+ --input-background-fill-focus: rgba(4, 12, 9, 0.85);
222
+ --input-background-fill-hover: rgba(7, 18, 15, 0.85);
223
+ --input-border-color: rgba(125, 211, 168, 0.22);
224
+ --input-border-color-focus: #00d97e;
225
+ --input-border-color-hover: rgba(125, 211, 168, 0.34);
226
+ --input-text-size: 0.92rem;
227
+ --input-text-weight: 400;
228
+ --input-padding: 10px 14px;
229
+ --input-radius: 10px;
230
+ --input-shadow: none;
231
+ --input-shadow-focus: 0 0 0 3px rgba(0, 217, 126, 0.18);
232
+ --input-placeholder-color: #8aa79b;
233
+
234
+ /* Buttons */
235
+ --button-primary-background-fill: linear-gradient(135deg, #00d97e 0%, #00e5ff 100%);
236
+ --button-primary-background-fill-hover: linear-gradient(135deg, #00ff8c 0%, #00e5ff 100%);
237
+ --button-primary-text-color: #04130c;
238
+ --button-primary-text-color-hover: #04130c;
239
+ --button-primary-border-color: transparent;
240
+ --button-primary-border-color-hover: transparent;
241
+ --button-primary-shadow: 0 6px 24px rgba(0, 217, 126, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.25);
242
+ --button-primary-shadow-hover: 0 12px 32px rgba(0, 217, 126, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.3);
243
+ --button-secondary-background-fill: rgba(125, 211, 168, 0.06);
244
+ --button-secondary-background-fill-hover: rgba(0, 217, 126, 0.12);
245
+ --button-secondary-text-color: #f1faf4;
246
+ --button-secondary-text-color-hover: #f1faf4;
247
+ --button-secondary-border-color: rgba(125, 211, 168, 0.34);
248
+ --button-secondary-border-color-hover: #00d97e;
249
+ --button-secondary-shadow: none;
250
+ --button-large-padding: 14px 26px;
251
+ --button-large-radius: 999px;
252
+ --button-large-text-size: 0.95rem;
253
+ --button-large-text-weight: 600;
254
+ --button-small-padding: 8px 14px;
255
+ --button-small-radius: 999px;
256
+ --button-small-text-size: 0.85rem;
257
+ --button-small-text-weight: 500;
258
+ --button-transition: all 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
259
+
260
+ /* Checkboxes / radios */
261
+ --checkbox-background-color: rgba(4, 12, 9, 0.7);
262
+ --checkbox-background-color-selected: #00d97e;
263
+ --checkbox-border-color: rgba(125, 211, 168, 0.34);
264
+ --checkbox-border-color-selected: #00d97e;
265
+ --checkbox-border-color-focus: #00d97e;
266
+ --checkbox-border-color-hover: #00d97e;
267
+ --checkbox-label-background-fill: rgba(4, 12, 9, 0.55);
268
+ --checkbox-label-background-fill-selected: rgba(0, 217, 126, 0.16);
269
+ --checkbox-label-background-fill-hover: rgba(0, 217, 126, 0.06);
270
+ --checkbox-label-border-color: rgba(125, 211, 168, 0.22);
271
+ --checkbox-label-border-color-selected: #00d97e;
272
+ --checkbox-label-text-color: #f1faf4;
273
+ --checkbox-label-text-color-selected: #00ff8c;
274
+ --checkbox-label-padding: 9px 14px;
275
+
276
+ /* Slider */
277
+ --slider-color: #00d97e;
278
+
279
+ /* Code */
280
+ --code-background-fill: rgba(2, 8, 6, 0.92);
281
+ --code-text-color: #d2efe0;
282
+
283
+ /* Tabs */
284
+ --tab-text-color-selected: #00ff8c;
285
+
286
+ /* Radii */
287
+ --radius-xxs: 6px;
288
+ --radius-xs: 8px;
289
+ --radius-sm: 10px;
290
+ --radius-md: 12px;
291
+ --radius-lg: 14px;
292
+ --radius-xl: 18px;
293
+ --layout-gap: 16px;
294
+
295
+ /* Neutral scale */
296
+ --neutral-50: #f1faf4;
297
+ --neutral-100: #d8e8df;
298
+ --neutral-200: #c4d8cd;
299
+ --neutral-300: #a4c0b3;
300
+ --neutral-400: #8aa79b;
301
+ --neutral-500: #6e8c80;
302
+ --neutral-600: #517065;
303
+ --neutral-700: #3a544b;
304
+ --neutral-800: #243832;
305
+ --neutral-900: #142420;
306
+ --neutral-950: #04080a;
307
+
308
+ /* Primary scale */
309
+ --primary-50: #d8fde9;
310
+ --primary-100: #aef9d2;
311
+ --primary-200: #80f1b8;
312
+ --primary-300: #4eea9a;
313
+ --primary-400: #1ee37c;
314
+ --primary-500: #00d97e;
315
+ --primary-600: #00b265;
316
+ --primary-700: #008c4f;
317
+ --primary-800: #006639;
318
+ --primary-900: #003f24;
319
+ --primary-950: #00210f;
320
+ }
321
+
322
+ /* ===== Page background — kept as a fixed layer behind everything ===== */
323
  html, body, gradio-app, .gradio-container {
324
+ background:
325
+ radial-gradient(ellipse 80% 60% at 20% 0%, rgba(0, 217, 126, 0.18), transparent 60%),
326
+ radial-gradient(ellipse 70% 50% at 85% 20%, rgba(0, 229, 255, 0.10), transparent 60%),
327
+ radial-gradient(ellipse 90% 70% at 50% 110%, rgba(0, 217, 126, 0.10), transparent 60%),
328
+ linear-gradient(180deg, #04080a 0%, #061410 50%, #04080a 100%) !important;
329
+ color: #f1faf4 !important;
330
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif !important;
331
+ min-height: 100vh;
332
  }
333
+ .gradio-container { max-width: 1280px !important; margin: 0 auto !important; padding: 0 24px !important; }
334
 
335
  /* ===== Hero ===== */
336
+ #hero { padding: 36px 4px 16px; }
337
  #hero h1 {
338
  font-family: "Fraunces", Georgia, serif;
339
  font-weight: 400;
340
  font-size: clamp(2rem, 5vw, 3.4rem);
341
  letter-spacing: -0.025em;
342
+ line-height: 1; margin: 0; color: #f1faf4;
343
  }
344
  #hero h1 em {
345
  font-style: italic;
346
+ background: linear-gradient(135deg, #00ff8c, #00e5ff);
347
  -webkit-background-clip: text; background-clip: text;
348
  -webkit-text-fill-color: transparent;
349
  font-weight: 300;
350
  }
351
+ #hero p { color: #c4d8cd; margin-top: 14px; max-width: 680px; line-height: 1.6; font-size: 1rem; }
352
+ #hero p strong { color: #f1faf4; }
353
  #hero .chip {
354
  display: inline-flex; gap: 8px; align-items: center;
355
  padding: 6px 14px; border-radius: 999px;
356
+ border: 1px solid rgba(125, 211, 168, 0.34);
357
  background: linear-gradient(135deg, rgba(0, 217, 126, 0.08), rgba(0, 229, 255, 0.04));
358
+ color: #7dd3a8; font-size: 0.82rem; font-weight: 500;
359
+ }
360
+ .dot { width: 8px; height: 8px; border-radius: 50%; background: #00ff8c;
361
+ box-shadow: 0 0 12px #00ff8c; display: inline-block;
362
+ animation: matter-pulse 1.6s ease-in-out infinite; }
363
+ @keyframes matter-pulse { 0%,100% {opacity:1;} 50% {opacity:0.4;} }
364
+
365
+ /* ===== Markdown content (Passport summary, pipeline, section titles) ===== */
366
+ .gradio-container .prose,
367
+ .gradio-container .markdown,
368
+ .gradio-container [class*="md"] {
369
+ color: #f1faf4 !important;
370
+ }
371
+ .gradio-container .prose p,
372
+ .gradio-container .prose li,
373
+ .gradio-container .prose td,
374
+ .gradio-container .prose strong { color: #f1faf4 !important; }
375
+ .gradio-container .prose em { color: #7dd3a8 !important; font-style: italic; }
376
+ .gradio-container .prose h1,
377
+ .gradio-container .prose h2,
378
+ .gradio-container .prose h3,
379
+ .gradio-container .prose h4 {
380
+ font-family: "Fraunces", Georgia, serif !important;
381
+ font-weight: 400 !important;
382
+ letter-spacing: -0.015em !important;
383
+ color: #f1faf4 !important;
384
  }
385
+ .gradio-container .prose h3 { font-size: 1.35rem !important; margin-top: 4px !important; }
386
+ .gradio-container .prose code {
387
+ background: rgba(0, 217, 126, 0.10) !important;
388
+ color: #7dd3a8 !important;
389
+ font-family: "JetBrains Mono", ui-monospace, monospace !important;
390
+ padding: 2px 7px !important;
391
+ border-radius: 6px !important;
392
+ font-size: 0.86em !important;
393
+ border: 1px solid rgba(125, 211, 168, 0.20);
 
 
 
 
 
 
394
  }
395
+ .gradio-container .prose table {
396
+ border-collapse: separate !important;
397
+ border-spacing: 0 !important;
398
+ width: 100%;
399
+ margin: 14px 0 !important;
400
+ border: 1px solid rgba(125, 211, 168, 0.20) !important;
401
+ border-radius: 12px !important;
402
+ overflow: hidden;
403
  }
404
+ .gradio-container .prose th,
405
+ .gradio-container .prose td {
406
+ padding: 11px 14px !important;
407
+ border-bottom: 1px solid rgba(125, 211, 168, 0.14) !important;
408
+ text-align: left !important;
409
+ background: rgba(7, 18, 15, 0.45) !important;
410
+ color: #f1faf4 !important;
411
+ }
412
+ .gradio-container .prose tr:last-child td { border-bottom: 0 !important; }
413
+ .gradio-container .prose th {
414
+ background: rgba(0, 217, 126, 0.10) !important;
415
+ color: #7dd3a8 !important;
416
  font-weight: 600 !important;
 
417
  text-transform: uppercase;
418
+ font-size: 0.72rem;
419
+ letter-spacing: 0.08em;
420
  }
421
 
422
+ /* Section titles ("### Capture", "### Passport") get a gradient leader */
423
+ .gradio-container .prose > h3:first-child {
424
+ display: flex; align-items: center; gap: 12px;
425
+ margin-bottom: 10px !important;
426
+ font-size: 1.5rem !important;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
427
  }
428
+ .gradio-container .prose > h3:first-child::before {
429
+ content: ""; width: 32px; height: 2px;
430
+ background: linear-gradient(90deg, #00d97e, transparent);
431
+ border-radius: 2px;
432
  }
433
 
434
+ /* ===== Image upload zone — reinforce dashed border + readable text ===== */
 
435
  .gradio-container [data-testid="image"],
436
+ .gradio-container [class*="image"] [class*="upload"],
437
  .gradio-container [class*="ImageUploader"] {
438
  background: rgba(4, 12, 9, 0.55) !important;
439
+ border: 1.5px dashed rgba(125, 211, 168, 0.40) !important;
440
  border-radius: 14px !important;
441
+ color: #c4d8cd !important;
442
  transition: all 220ms;
443
  }
444
  .gradio-container [class*="image"] [class*="upload"]:hover {
445
+ border-color: #00d97e !important;
446
  background: rgba(0, 217, 126, 0.05) !important;
447
  }
448
+ .gradio-container [class*="image"] [class*="upload"] *,
449
+ .gradio-container [class*="upload-text"] {
450
+ color: #c4d8cd !important;
451
  }
452
+ .gradio-container [class*="image"] svg { color: #7dd3a8 !important; }
453
 
454
  /* ===== Examples gallery ===== */
455
+ .gradio-container [class*="examples"] {
 
456
  background: transparent !important;
457
+ }
458
+ .gradio-container [class*="examples"] table {
459
+ border-collapse: separate !important;
460
+ border-spacing: 8px !important;
461
  border: 0 !important;
462
  }
463
  .gradio-container [class*="examples"] tr,
464
+ .gradio-container [class*="examples"] td {
465
+ background: rgba(7, 18, 15, 0.55) !important;
466
+ border: 1px solid rgba(125, 211, 168, 0.18) !important;
467
  border-radius: 10px !important;
468
+ color: #f1faf4 !important;
469
+ transition: all 200ms;
470
  }
471
  .gradio-container [class*="examples"] tr:hover {
472
+ border-color: #00d97e !important;
473
+ background: rgba(0, 217, 126, 0.06) !important;
474
+ transform: translateY(-1px);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
475
  }
476
+ .gradio-container [class*="examples"] th {
477
+ color: #7dd3a8 !important;
478
+ font-size: 0.72rem;
479
+ text-transform: uppercase;
480
+ letter-spacing: 0.08em;
 
481
  }
482
+
483
+ /* ===== Accordion (Passport JSON drawer) ===== */
484
+ .gradio-container details summary,
485
+ .gradio-container [class*="accordion"] [class*="title"] {
486
+ color: #7dd3a8 !important;
487
  font-weight: 600 !important;
488
+ letter-spacing: 0.06em;
489
  text-transform: uppercase;
490
+ font-size: 0.78rem !important;
 
491
  }
492
 
493
+ /* ===== Code block (JSON pane) ===== */
494
  .gradio-container [class*="code"] pre,
495
  .gradio-container [class*="code"] code,
496
  .gradio-container [class*="Code"] pre {
497
  background: rgba(2, 8, 6, 0.92) !important;
498
  color: #d2efe0 !important;
499
  font-family: "JetBrains Mono", ui-monospace, monospace !important;
500
+ font-size: 0.8rem !important;
501
+ line-height: 1.65 !important;
502
  border-radius: 12px !important;
503
+ border: 1px solid rgba(125, 211, 168, 0.18) !important;
504
  padding: 16px !important;
505
  }
506
  .gradio-container [class*="code"] .token.string { color: #a5e8ff !important; }
507
  .gradio-container [class*="code"] .token.property,
508
+ .gradio-container [class*="code"] .token.key { color: #7dd3a8 !important; }
509
  .gradio-container [class*="code"] .token.number { color: #ffb547 !important; }
510
  .gradio-container [class*="code"] .token.boolean,
511
  .gradio-container [class*="code"] .token.null { color: #ff9bcc !important; }
512
+ .gradio-container [class*="code"] .token.punctuation { color: #8aa79b !important; }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
513
 
514
  /* ===== Scrollbars ===== */
515
  .gradio-container ::-webkit-scrollbar { width: 8px; height: 8px; }
516
+ .gradio-container ::-webkit-scrollbar-thumb { background: rgba(125, 211, 168, 0.22); border-radius: 4px; }
517
  .gradio-container ::-webkit-scrollbar-track { background: transparent; }
518
 
519
  /* ===== Selection ===== */
520
  ::selection { background: rgba(0, 217, 126, 0.35); color: white; }
521
 
522
+ /* ===== Catch-all readability ===== */
523
+ .gradio-container { color: #f1faf4; }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
524
  .gradio-container input::placeholder,
525
+ .gradio-container textarea::placeholder { color: #8aa79b !important; opacity: 1 !important; }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
526
  """
527
 
528
  HERO_HTML = """