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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
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
/* Base styles */
body, .gradio-container {
    background-color: #ffffff;
    font-size: 15px;
    overflow-x: hidden !important;
}

/* Main color variables for a simpler, more subdued theme */
:root {
    --primary: #FF7D1E;         /* Main orange accent - used sparingly */
    --primary-light: #FFF8F2;   /* Very subtle orange tint */
    --primary-selected: #FFE8D5; /* More visible but still subtle orange for selections */
    --accent: #6B7280;          /* Neutral gray for most UI elements */
    --text-dark: #333333;       /* Dark text */
    --text-medium: #666666;     /* Medium text */
    --border-light: #E6E6E6;    /* Light border */
    --background-light: #F9F9F9; /* Light background */
    --highlight: #FFFBEB;       /* Subtle highlight color */
    --model-a-color: #92B4F4;   /* Model A color (blue) */
    --model-b-color: #F8ADA7;   /* Model B color (red) */
}

/* Tab styling */
.tabs {
    margin-top: 0 !important;
}

/* Style for tab buttons */
.tab-nav {
    background-color: var(--background-light) !important;
    padding: 5px 10px !important;
    border-radius: 8px 8px 0 0 !important;
    border-bottom: 1px solid var(--border-light) !important;
}
.tab-nav button {
    font-size: 1.1em !important;
    font-weight: 600 !important;
    padding: 10px 25px !important;
    margin: 0 5px !important;
    border-radius: 6px 6px 0 0 !important;
    border: none !important;
    background-color: transparent !important;
    color: var(--text-medium) !important;
    transition: all 0.3s ease !important;
}
.tab-nav button.selected {
    background-color: white !important;
    color: var(--primary) !important;
    border-bottom: 2px solid var(--primary) !important;
}
.tab-nav button:hover:not(.selected) {
    background-color: rgba(255,255,255,0.5) !important;
    color: var(--text-dark) !important;
}

/* Tab content area */
.tabitem {
    border: none !important;
    padding: 20px 10px !important;
}

/* Style the row containing the Query title */
#query-title-row {
    margin: 0 !important;
    padding: 0 10px !important;
    display: flex !important;
    align-items: center !important;
    overflow: hidden !important;
    height: 40px !important;
}

#query-title-row h3 {
    margin: 0 !important;
    padding: 0 !important;
    font-size: 1.2em !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    flex-grow: 0 !important;
    flex-shrink: 0 !important;
    white-space: nowrap !important;
    overflow: visible !important;
    color: var(--text-dark) !important;
}

/* New query container layout with button next to box */
#query-container {
    display: flex !important;
    align-items: stretch !important;
    gap: 10px !important;
    margin: 0 10px 8px 10px !important;
    overflow: visible !important;
}

/* Style the query box - optimized for long queries */
.query-box-row {
    background-color: #F0F7FF !important; /* Light blue background */
    padding: 12px 15px !important;
    border-radius: 6px !important;
    border: 1px solid #D1E3F8 !important; /* Light blue border */
    margin: 0 !important;
    align-items: flex-start !important;
    flex: 1 1 50% !important;
    max-width: 50% !important;
    overflow: visible !important;
    display: flex !important;
    min-height: 50px !important;
    height: auto !important;
}

/* Context description styling - simple version */
.context-description {
    background-color: transparent !important;
    padding: 0 15px !important;
    margin: 0 0 15px 0 !important;
    font-style: normal !important;
    color: var(--text-medium) !important; /* Lighter text color */
    font-size: 1.05em !important; /* Slightly larger */
}

.context-topic {
    display: inline-flex !important;
    align-items: center !important;
    background-color: transparent !important; /* No background */
    padding: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.topic-label {
    font-weight: 600 !important;
    color: var(--text-medium) !important; /* Lighter text color */
    margin-right: 6px !important;
}

/* Style the Get Random Question button */
.query-button {
    padding: 0 20px !important;
    border-radius: 6px !important;
    font-weight: 500 !important;
    flex: 0 0 auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background-color: var(--background-light) !important;
    color: var(--text-medium) !important;
    border: 1px solid var(--border-light) !important;
    font-size: 0.95em !important;
    min-height: 50px !important;
    white-space: nowrap !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05) !important;
}

.query-button:hover {
    background-color: var(--primary-light) !important;
    color: var(--primary) !important;
    border-color: var(--primary) !important;
}

/* Context header row with title and toggle button */
#context-header-row {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 8px !important;
    padding: 0 10px !important;
}

/* Context title styling */
.context-title {
    margin: 0 !important;
    padding: 0 !important;
    font-size: 1.2em !important;
    font-weight: 600 !important;
    color: var(--text-dark) !important;
}

/* Style for the context toggle button */
.context-toggle-button {
    background-color: var(--background-light) !important;
    color: var(--text-medium) !important;
    padding: 5px 10px !important;
    border-radius: 4px !important;
    border: 1px solid var(--border-light) !important;
    font-size: 0.85em !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    margin: 0 !important;
    height: 30px !important;
    line-height: 1 !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: 150px !important;
}

.context-toggle-button:hover {
    background-color: var(--primary-light) !important;
    color: var(--primary) !important;
    border-color: var(--primary) !important;
}

/* Style the Markdown component displaying the query text */
.query-text {
    padding: 0 !important;
    margin: 0 !important;
    background-color: transparent !important;
    border: none !important;
    overflow: visible !important;
    width: 100% !important;
}

/* Style the actual query text */
.query-text p {
    font-size: 1.2em !important;
    font-weight: 600 !important;
    color: #2E5AAC !important; /* Blue for query text */
    line-height: 1.4 !important;
    margin: 0 !important;
    padding: 0 !important;
    background-color: transparent !important;
    border: none !important;
    overflow-wrap: break-word !important;
    word-wrap: break-word !important;
    word-break: normal !important;
    hyphens: auto !important;
    white-space: normal !important;
}

/* Container for context items */
.context-items-container {
    border-radius: 6px;
    overflow: hidden;
}

/* Style for individual context items */
.context-item {
    border: 1px solid var(--border-light);
    background-color: var(--background-light);
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 8px;
    font-size: 1em;
    line-height: 1.5;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

/* Style for primary context items */
.primary-context {
    border-left: 3px solid #FFF0F0 !important; /* Light red border */
}

/* Style for chunk headers */
.chunk-header {
    font-weight: 600;
    color: #2E5AAC;
    margin-bottom: 8px;
    padding-bottom: 5px;
    border-bottom: 1px solid #D1E3F8;
}

/* Style for highlighted text within context items */
.highlight {
    background-color: #FFECB3 !important;
    padding: 0.1em 0.3em !important;
    border-radius: 3px !important;
    font-weight: 600 !important;
    color: #664500 !important;
}

/* Markdown table styling */
.md-table {
    width: 100% !important;
    border-collapse: collapse !important;
    margin: 10px 0 !important;
    font-size: 0.95em !important;
}

.md-table th {
    background-color: #F0F7FF !important;
    color: #2E5AAC !important;
    font-weight: 600 !important;
    text-align: left !important;
    padding: 10px !important;
    border: 1px solid #D1E3F8 !important;
}

.md-table td {
    padding: 8px 10px !important;
    border: 1px solid #E6E6E6 !important;
    vertical-align: top !important;
}

.md-table tr:nth-child(even) {
    background-color: #F9F9F9 !important;
}

.md-table tr:hover {
    background-color: #F0F7FF !important;
}

/* Style for the insufficient context alert */
.insufficient-alert {
    border: 2px solid #f78989;
    background-color: #fff0f0;
    color: #b92020;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 12px;
    font-size: 1em;
}
.insufficient-alert strong {
    display: block;
    margin-bottom: 5px;
    font-size: 1.05em;
}
.insufficient-alert p {
    margin: 0;
    font-size: 1em;
}

/* Style for section headings */
.section-heading {
    color: var(--text-dark) !important;
    margin: 5px 0 2px 0 !important;
    padding: 0 !important;
    font-weight: 600 !important;
    font-size: 1.2em !important;
}

/* Style the group displaying model summaries */
.summary-card {
    border: 1px solid var(--border-light);
    padding: 12px !important;
    border-radius: 6px;
    height: 100%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
    background-color: var(--background-light) !important;
}

/* Apply specific background colors to summary cards */
.summary-card-a {
    border-left: 3px solid #92B4F4 !important; /* Lighter blue accent */
}
.summary-card-b {
    border-left: 3px solid #F8ADA7 !important; /* Light red accent */
}

/* Style the Textbox itself inside the summary card */
.summary-card textarea {
    font-size: 1em !important;
    line-height: 1.4 !important;
    background-color: rgba(255,255,255,0.7) !important;
}
/* Style the Textbox label */
.summary-card .gr-input-label {
    display: block !important;
    padding: 0 0 5px 0 !important;
    margin: 0 !important;
    font-size: 1.05em !important;
    font-weight: 600 !important;
    color: var(--text-dark) !important;
}

/* Style the voting buttons */
.vote-button {
    flex-grow: 1;
    margin: 0 5px !important;
    font-size: 1.05em !important;
    padding: 12px 15px !important;
    border-radius: 6px !important;
    transition: all 0.2s ease !important;
    background-color: var(--background-light) !important;
    border: 1px solid var(--border-light) !important;
    min-height: 50px !important;
    font-weight: 500 !important;
    color: var(--text-dark) !important;
    margin-bottom: 5px !important;
}

/* Hover effect for A/B/Tie buttons */
.vote-button:hover:not(.vote-button-neither) {
    background-color: var(--primary-light) !important;
    border-color: var(--primary) !important;
    color: var(--primary) !important;
}

/* Hover effect for Neither button */
.vote-button-neither:hover {
    background-color: #fff0f0 !important; 
    border-color: #f78989 !important;
    color: #b92020 !important;
}

/* Style for selected buttons with persistent selection state */
.vote-button.selected:not(.vote-button-neither) {
    border-width: 2px !important; 
    border-style: solid !important;
    border-color: #FF7D1E !important;
    background-color: #FFF2E6 !important;
    color: #FF7D1E !important;
    font-weight: 600 !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1) !important;
}

/* Special neither button styling when selected */
.vote-button-neither.selected { 
    border-width: 2px !important;
    border-style: solid !important;
    border-color: #f78989 !important;
    background-color: #fff0f0 !important; 
    color: #b92020 !important;
    font-weight: 600 !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1) !important;
}

/* Ensure selection state persists when hovered */
.vote-button.selected:hover:not(.vote-button-neither) {
    border-color: #FF7D1E !important;
    background-color: #FFF2E6 !important;
    color: #FF7D1E !important;
}

/* Ensure neither selection state persists when hovered */
.vote-button-neither.selected:hover { 
    border-color: #f78989 !important;
    background-color: #fff0f0 !important; 
    color: #b92020 !important;
}

/* Style the feedback section */
.feedback-section {
    padding: 3px 0 !important;
    background-color: transparent !important;
    margin-top: 3px !important;
    margin-bottom: 3px !important;
    font-size: 1em;
    border: none !important;
    box-shadow: none !important;
}

/* Improved feedback checkbox styling */
.feedback-section .gr-check-radio {
    font-size: 1.05em !important;
}

.feedback-section .gr-check-radio span { 
    font-size: 1.05em !important;
    color: var(--text-dark) !important;
}

/* Checkbox larger size and color customization */
.feedback-section input[type="checkbox"] {
    width: 18px !important;
    height: 18px !important;
    margin-right: 6px !important;
}

/* Make the checkbox checked color stronger */
.feedback-section input[type="checkbox"]:checked {
    accent-color: #FF8C38 !important;
    border-color: #FF8C38 !important;
    background-color: #FF8C38 !important;
}

/* Style for model reveals */
.model-reveal {
    font-size: 1.3em !important;
    padding: 8px 0 !important;
    text-align: center !important;
    margin-top: 5px !important;
    font-weight: 600 !important;
    border-radius: 6px !important;
}

/* Style for model A reveal */
.model-a-reveal {
    background-color: #F0F7FF !important;
}

/* Style for model B reveal */
.model-b-reveal {
    background-color: #FFF0F0 !important;
}

/* Style the control buttons area */
.control-buttons button {
    margin: 0 10px !important;
    font-size: 1em !important;
    border-radius: 6px !important;
    padding: 8px 16px !important;
    transition: all 0.2s ease !important;
}

/* Make headings slightly larger */
h3 {
    font-size: 1.2em !important;
    font-weight: 600 !important;
    margin: 5px 0 2px 0 !important;
    padding: 0 !important;
    color: var(--text-dark) !important;
}
/* Adjust main title size */
h1 {
    font-size: 1.6em !important;
    color: var(--primary) !important;
    margin: 10px 0 5px 0 !important;
    padding: 0 !important;
}
/* Adjust main description size */
#main-interface-area > p:first-of-type {
    font-size: 1em !important;
    margin: 0 0 8px 0 !important;
    padding: 0 !important;
    line-height: 1.4 !important;
    color: var(--text-medium) !important;
}

/* Adjust CheckboxGroup label/choices size */
.feedback-section .gr-input-label {
    font-size: 1.1em !important;
    font-weight: 600 !important;
    margin-bottom: 0.6em !important;
    color: var(--text-dark) !important;
}

/* Adjust DataFrame font size */
.gr-dataframe table {
    font-size: 0.95em !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    border-radius: 6px !important;
    overflow: hidden !important;
}
.gr-dataframe th, .gr-dataframe td {
    padding: 8px 10px !important;
    border: none !important;
    border-bottom: 1px solid var(--border-light) !important;
}
.gr-dataframe th {
    background-color: var(--background-light) !important;
    color: var(--text-dark) !important;
    font-weight: 600 !important;
}

/* Reduce space caused by Markdown wrappers */
.gradio-container .prose {
    line-height: 1.4 !important;
    margin: 0 !important;
    padding: 0 !important;
}
hr {
    margin: 5px 0 !important;
    border: none !important;
    height: 1px !important;
    background-color: var(--border-light) !important;
}

/* Fix for any scrollbar issues */
.gradio-row {
    overflow: visible !important;
}

/* Submit button styling */
#submit-button {
    background-color: var(--primary) !important;
    color: white !important;
    padding: 12px 30px !important;
    border-radius: 6px !important;
    font-weight: 600 !important;
    font-size: 1.2em !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.08) !important;
    border: none !important;
    margin-top: 15px !important;
}

#submit-button:hover {
    background-color: #E56E0F !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.12) !important;
}

/* Try another button styling */
#try-another-btn {
    background-color: var(--primary) !important;
    color: white !important;
    padding: 10px 25px !important;
    border-radius: 6px !important;
    font-weight: 600 !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.08) !important;
    border: none !important;
}

#try-another-btn:hover {
    background-color: #E56E0F !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.12) !important;
}

/* Reduce vertical spacing */
.gradio-column > *, .gradio-row > * {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

.gradio-markdown {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

/* Reduce container padding */
.gradio-container {
    padding: 0 !important;
}

/* Custom compact spacing for specific sections */
#main-interface-area > div {
    margin-bottom: 4px !important;
}

/* Media query for responsive behavior on smaller screens */
@media screen and (max-width: 768px) {
    #query-container {
        flex-direction: column !important;
    }
    
    .query-box-row {
        flex: 1 1 100% !important;
        max-width: 100% !important;
        margin-bottom: 10px !important;
    }
    
    .query-button {
        width: 100% !important;
    }
}