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 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
/* Add global page margins */
.gradio-container {
   padding-left: 12rem !important;
   padding-right: 12rem !important;
}

/* Context boxes styling - make them same size */
#basic_context_box,
#basic_sources_in_context_box {
    height: 400px !important;
}

#basic_context_box textarea {
    height: 370px !important;
    min-height: 370px !important;
    max-height: 370px !important;
    resize: none !important;
    overflow-y: auto !important;
    box-sizing: border-box !important;
}

/* HighlightedTextbox - clean approach */
#basic_sources_in_context_box {
    height: 400px !important;
    overflow: hidden !important;
}

/* Target multiple possible content containers */
#basic_sources_in_context_box > div:last-child,
#basic_sources_in_context_box .highlighted-textbox,
#basic_sources_in_context_box [data-testid="highlighted-textbox"],
#basic_sources_in_context_box .textbox {
    height: 370px !important;
    max-height: 370px !important;
    overflow-y: auto !important;
    padding: 10px !important;
    box-sizing: border-box !important;
}

/* Response box - adjusted height to account for button with smaller spacing */
#basic_response_box {
    height: 415px !important;
    overflow: hidden !important;
}

/* Target the content area more specifically - fill entire space */
#basic_response_box > div:last-child,
#basic_response_box .highlighted-text,
#basic_response_box [data-testid="highlighted-text"] {
    height: 405px !important;
    max-height: 405px !important;
    overflow-y: auto !important;
    padding: 5px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

/* Full response traceback button styling - smaller spacing and consistent font */
#basic_response_box + button,
button[value="πŸ” Traceback Entire Response"] {
    margin: 5px 0 !important;
    width: 100% !important;
    flex-shrink: 0 !important;
    font-size: var(--text-lg) !important;
    font-weight: var(--weight-semibold) !important;
}

/* Ensure the right column content fits properly with button */
.gradio-row.equal-height .gradio-column:last-child {
    padding-bottom: 0 !important;
}

/* Ensure consistent column heights */
.gradio-row.equal-height {
    display: flex !important;
    align-items: stretch !important;
}

.gradio-row.equal-height > .gradio-column {
    display: flex !important;
    flex-direction: column !important;
}

/* Lower section column height matching */
.gradio-row.equal-height .gradio-column {
    min-height: 450px !important;
    height: 450px !important;
    display: flex !important;
    flex-direction: column !important;
}

/* Lower left instruction box sizing */
.gradio-row.equal-height .gradio-column:first-child .gradio-textbox:first-child textarea {
    height: 80px !important;
    min-height: 80px !important;
    max-height: 80px !important;
    resize: none !important;
}

/* Lower left response input box sizing - increased to match right side */
.gradio-row.equal-height .gradio-column:first-child .gradio-textbox:last-child textarea {
    height: 210px !important;
    min-height: 210px !important;
    max-height: 210px !important;
    resize: none !important;
    overflow-y: auto !important;
}

/* Button spacing - reduced for better layout */
.gradio-row.equal-height .gradio-button {
    margin: 5px 0 !important;
    flex-shrink: 0 !important;
}

/* Fix tabs container height */
.gradio-tabs {
    height: 400px !important;
}

.gradio-tabitem {
    height: 370px !important;
}

/* Clean fallback rules */
.gradio-row.equal-height [class*="gradio-"] {
    box-sizing: border-box !important;
}

/* Ensure inner content fills containers properly */
#basic_response_box div,
#basic_sources_in_context_box div {
    height: inherit !important;
    margin: 0 !important;
}

/* Force full height on content elements */
#basic_response_box .highlighted-text > div,
#basic_sources_in_context_box .highlighted-textbox > div {
    height: 100% !important;
    min-height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Remove any default spacing on response box */
#basic_response_box .label-wrap {
    margin-bottom: 2px !important;
}

#basic_response_box .block {
    padding: 0 !important;
    margin: 0 !important;
}

.example-title {
    text-align: left !important;
    font-size: 1.5rem !important;
    font-weight: bold !important;
}

/* Custom app title styling with Monochrome theme colors */
.app-title {
    text-align: center !important;
    margin: 2rem 0 !important;
}

.app-title .highlight {
    background: #ff6b35 !important;
    color: white !important;
    padding: 2px 9px !important;
    border-radius: 10px !important;
    font-weight: 700 !important;
    font-size: 3rem !important;
    margin-right: 4px !important;
    display: inline-block !important;
}

.app-title .brand {
    color: #333333 !important;
    font-weight: 700 !important;
    font-size: 3rem !important;
    margin-right: 12px !important;
}

.app-title .subtitle {
    color: #666666 !important;
    font-weight: 400 !important;
    font-size: 1.6rem !important;
    display: block !important;
    margin-top: 12px !important;
}

/* Larger font for app description */
.app-description p {
    font-size: 1.25rem !important; /* Increased from default */
    color: #555555 !important;
    line-height: 1.6 !important;
}

.app-description-2 p {
    font-size: 1.25rem !important; /* Increased from default */
    color: #555555 !important;
    line-height: 1.6 !important;
}


/* Attribution highlighting styles - use Gradio theme colors */
.gradio-container .highlighted-text mark,
.gradio-container mark,
.highlighted-text mark,
mark {
    border-radius: 3px !important;
    padding: 1px 3px !important;
    font-weight: 600 !important;
    margin: 0 !important;
    display: inline !important;
    line-height: inherit !important;
    border: none !important;
    box-decoration-break: clone !important;
    -webkit-box-decoration-break: clone !important;
}

/* Ensure highlighting works in response boxes */
.gradio-container #basic_response_box mark,
.gradio-container #basic_sources_box mark {
    font-family: inherit !important;
    font-size: inherit !important;
}

/* Set consistent height for both context boxes */
.gradio-container #basic_context_box,
.gradio-container #basic_sources_in_context_box {
    height: 500px !important;
}

/* Ensure the left textbox and its textarea respect the height constraint */
.gradio-container #basic_context_box {
    max-height: 500px !important;
}

.gradio-container #basic_context_box textarea {
    height: 460px !important;
    max-height: 460px !important;
    overflow-y: auto !important;
    resize: none !important;
}

/* Make highlighted context tab look exactly like regular context tab */
.gradio-container #basic_sources_in_context_box {
    background: var(--input-background-fill) !important;
    border: 1px solid var(--input-border-color) !important;
    border-radius: var(--input-radius) !important;
    color: var(--body-text-color) !important;
    font-family: var(--font) !important;
    font-size: var(--text-sm) !important;
    line-height: var(--line-sm) !important;
    padding: var(--input-padding) !important;
    height: 600px !important;
    overflow: hidden !important;
}

/* Set height for response box container */
.gradio-container #basic_response_box {
    height: 600px !important;
    overflow: hidden !important;
}

/* Apply scrolling only to the inner content areas */
.gradio-container #basic_sources_in_context_box .highlight,
.gradio-container #basic_sources_in_context_box > div > div {
    max-height: 600px !important;
    overflow-y: auto !important;
}

.gradio-container #basic_response_box .highlight,
.gradio-container #basic_response_box > div > div {
    max-height: 600px !important;
    overflow-y: auto !important;
}

/* Add a separator between the two context boxes */
#basic_context_box {
    border-right: 1px solid var(--border-color-primary) !important;
}

/* Ensure all text is visible with proper color */
.gradio-container #basic_sources_in_context_box,
.gradio-container #basic_sources_in_context_box * {
    color: var(--body-text-color) !important;
}

/* Keep highlighting functionality working */
.gradio-container #basic_sources_in_context_box mark {
    color: var(--body-text-color) !important;
    font-weight: 600 !important;
    border-radius: 4px !important;
    padding: 2px 4px !important;
    margin: 0 1px !important;
}



/* Only customize example buttons - let Gradio theme handle everything else */

/* Example buttons container */
.example-button-container {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)) !important;
    gap: 16px !important;
    margin: 0px 0 !important;
    padding: 0 !important;
}

/* Example button styling */
.example-button button,
button.example-button {
    width: 100% !important;
    height: 180px !important;
    border-radius: 8px !important;
    border: 0px solid transparent !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    overflow: hidden !important;
    box-shadow: none !important;
    font-size: 1.4rem !important;
    font-weight: 700 !important;
    color: white !important;
    text-align: center !important;
    padding: 20px !important;
    position: relative !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    text-shadow: 
        0 2px 6px rgba(0, 0, 0, 0.7),
        1px 1px 2px rgba(0, 0, 0, 0.8) !important;
}

/* Light overlay for better image visibility - now uses ::after */
.example-button button::after,
button.example-button::after {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(0, 0, 0, 0.1) !important;
    z-index: 1 !important;
    transition: background 0.2s ease !important;
    pointer-events: none !important;
}

/* Text content above overlay */
.example-button button span,
button.example-button span {
    position: relative !important;
    z-index: 3 !important;
    text-shadow: 
        0 2px 6px rgba(0, 0, 0, 0.7),
        1px 1px 2px rgba(0, 0, 0, 0.8) !important;
    font-weight: 700 !important;
    letter-spacing: 0.5px !important;
}

/* Make sure button text itself is also above blur */
.example-button button,
button.example-button {
    z-index: 0 !important;
    position: relative !important;
}

.example-button button *,
button.example-button * {
    position: relative !important;
    z-index: 3 !important;
}

/* Hover effects */
.example-button button:hover,
button.example-button:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
}

.example-button button:hover::after,
button.example-button:hover::after {
    background: rgba(0, 0, 0, 0.05) !important;
}

/* Specific button backgrounds with solid colors and textures */
.example-paper button, button.example-paper {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

.example-paper button::before, button.example-paper::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 2px,
        rgba(255,255,255,0.1) 2px,
        rgba(255,255,255,0.1) 4px
    ) !important;
    z-index: 1 !important;
}

.example-movie button, button.example-movie {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%) !important;
}

.example-movie button::before, button.example-movie::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: radial-gradient(circle at 20% 50%, rgba(255,255,255,0.15) 2px, transparent 2px),
                radial-gradient(circle at 80% 50%, rgba(255,255,255,0.15) 2px, transparent 2px) !important;
    background-size: 20px 20px !important;
    z-index: 1 !important;
}

.example-code button, button.example-code {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%) !important;
}

.example-code button::before, button.example-code::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: repeating-linear-gradient(
        90deg,
        transparent,
        transparent 8px,
        rgba(255,255,255,0.1) 8px,
        rgba(255,255,255,0.1) 10px
    ) !important;
    z-index: 1 !important;
}

.example-paper-alt button, button.example-paper-alt {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%) !important;
}

.example-paper-alt button::before, button.example-paper-alt::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: repeating-conic-gradient(
        from 0deg at 50% 50%,
        transparent 0deg,
        rgba(255,255,255,0.1) 30deg,
        transparent 60deg
    ) !important;
    background-size: 30px 30px !important;
    z-index: 1 !important;
}

.example-movie-alt button, button.example-movie-alt {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%) !important;
}

.example-movie-alt button::before, button.example-movie-alt::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: repeating-linear-gradient(
        -45deg,
        transparent,
        transparent 3px,
        rgba(255,255,255,0.15) 3px,
        rgba(255,255,255,0.15) 6px
    ) !important;
    z-index: 1 !important;
}

.example-code-alt button, button.example-code-alt {
    background: linear-gradient(135deg, #a8e6cf 0%, #ffd3a5 100%) !important;
}

.example-code-alt button::before, button.example-code-alt::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: radial-gradient(circle at 25% 25%, rgba(255,255,255,0.12) 1px, transparent 1px),
                radial-gradient(circle at 75% 75%, rgba(255,255,255,0.12) 1px, transparent 1px) !important;
    background-size: 15px 15px !important;
    z-index: 1 !important;
}

/* Mobile responsiveness for example buttons and title */
@media (max-width: 768px) {
    .gradio-container {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    .example-button-container {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }
    
    .example-button button,
    button.example-button {
        height: 160px !important;
        font-size: 1.2rem !important;
        padding: 15px !important;
    }
    
    /* Mobile title sizing */
    .app-title .highlight,
    .app-title .brand {
        font-size: 2.2rem !important;
    }
    
    .app-title .subtitle {
        font-size: 1.4rem !important;
    }
}

/* Tablet responsiveness for example buttons only */
@media (max-width: 1024px) and (min-width: 769px) {
    .example-button-container {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}