TomLii commited on
Commit
53ce6da
·
1 Parent(s): 8a78e83

Rebuild styling on Base theme: full blue-white palette, no grey panels

Browse files
Files changed (1) hide show
  1. app.py +268 -154
app.py CHANGED
@@ -60,60 +60,99 @@ SEARCH_CACHE: Dict[str, Dict[str, Any]] = {}
60
  VISIT_CACHE: Dict[str, Dict[str, Any]] = {}
61
  LOGO_PATH = str(Path(__file__).resolve().parent / "assets" / "quest-logo.png")
62
 
63
- # Gradio 5: neutral defaults read as grey; tune theme variables so panels/forms match the blue‑white UI.
64
- APP_THEME = gr.themes.Soft(
 
65
  primary_hue=gr.themes.colors.blue,
66
  secondary_hue=gr.themes.colors.sky,
67
  neutral_hue=gr.themes.colors.blue,
68
  font=gr.themes.GoogleFont("Manrope"),
69
  font_mono=gr.themes.GoogleFont("JetBrains Mono"),
70
  ).set(
71
- body_background_fill="#f3f8ff",
72
  body_text_color="#0f2744",
73
  body_text_color_subdued="#4a6a8c",
74
  color_accent="*primary_600",
 
75
  background_fill_primary="#ffffff",
76
- background_fill_secondary="#e8f1ff",
77
- border_color_primary="#c7dbfa",
78
  border_color_accent="*primary_500",
79
- block_background_fill="transparent",
80
  block_border_width="0px",
81
  block_border_color="transparent",
82
- block_shadow="none",
 
83
  block_label_background_fill="transparent",
84
  block_label_border_width="0px",
 
 
 
 
85
  block_title_border_width="0px",
86
  panel_background_fill="transparent",
87
  panel_border_width="0px",
88
  panel_border_color="transparent",
89
  input_background_fill="#ffffff",
90
- input_border_color="#93c5fd",
 
 
91
  input_border_width="1px",
 
92
  input_shadow="none",
93
- input_shadow_focus="none",
94
  code_background_fill="#f0f7ff",
95
  slider_color="*primary_500",
 
 
 
 
 
96
  button_secondary_background_fill="#ffffff",
97
  button_secondary_background_fill_hover="#eff6ff",
98
- button_secondary_border_color="#93c5fd",
 
99
  button_cancel_background_fill="#ffffff",
100
  button_cancel_background_fill_hover="#eff6ff",
101
- button_cancel_border_color="#93c5fd",
 
102
  table_border_color="#dbeafe",
103
  table_even_background_fill="#fafdff",
104
  table_odd_background_fill="#ffffff",
105
  )
106
 
107
  CUSTOM_CSS = """
108
- /* Gradio 5 uses versioned root classes (e.g. gradio-container-5-29-0); match all of them. */
 
 
 
 
 
 
109
  [class*="gradio-container"] {
110
- max-width: 1200px !important;
111
  color: #0f2744;
112
  }
113
 
114
- .banner-logo-image img,
115
- [class*="gradio-container"] .image-container img,
116
- [class*="gradio-container"] .image-frame img {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
117
  width: 100%;
118
  max-width: 360px;
119
  height: auto;
@@ -124,41 +163,35 @@ CUSTOM_CSS = """
124
  box-shadow: none !important;
125
  }
126
 
127
- [class*="gradio-container"] .image-container,
128
- [class*="gradio-container"] .image-frame {
129
- border: none !important;
130
- background: transparent !important;
131
- box-shadow: none !important;
132
- }
133
-
134
  .section-card {
135
- border: none !important;
136
- border-radius: 0 !important;
137
- padding: 0 !important;
 
 
 
 
 
138
  background: transparent !important;
 
139
  box-shadow: none !important;
 
140
  }
141
 
142
  .section-heading {
143
  font-size: 0.72rem;
144
  font-weight: 700;
145
- letter-spacing: 0.08em;
146
  text-transform: uppercase;
147
  color: #2563eb;
148
- margin: 0 0 10px 0;
149
- padding-bottom: 8px;
150
- border-bottom: 1px solid rgba(37, 99, 235, 0.18);
151
- }
152
-
153
- .layout-gap {
154
- gap: 20px;
155
- align-items: flex-start;
156
- }
157
-
158
- .right-stack > * {
159
- margin-bottom: 10px;
160
  }
161
 
 
162
  .icon-grid {
163
  display: grid;
164
  grid-template-columns: repeat(2, minmax(0, 1fr));
@@ -167,174 +200,239 @@ CUSTOM_CSS = """
167
  max-width: 360px;
168
  margin: 0 auto;
169
  }
170
-
171
  .icon-link {
172
  display: flex;
173
  align-items: center;
174
  justify-content: center;
175
  gap: 8px;
176
- padding: 14px 14px;
177
- border-radius: 14px;
178
  text-decoration: none !important;
179
  color: #1d4ed8 !important;
180
- background: linear-gradient(180deg, #ffffff 0%, #f0f7ff 100%);
181
  font-weight: 600;
182
- font-size: 17px;
183
- box-shadow: 0 1px 0 rgba(37, 99, 235, 0.06), 0 8px 24px rgba(37, 99, 235, 0.08);
184
- border: 1px solid rgba(147, 197, 253, 0.65);
185
- transition: transform 0.15s ease, box-shadow 0.15s ease;
186
  }
187
-
188
  .icon-link:hover {
189
  transform: translateY(-1px);
190
- box-shadow: 0 4px 20px rgba(37, 99, 235, 0.12);
 
191
  }
192
 
 
 
193
  [class*="gradio-container"] .gr-button-primary {
194
- background: linear-gradient(135deg, #1d4ed8 0%, #3b82f6 100%) !important;
195
- color: white !important;
196
  border: none !important;
197
- box-shadow: 0 8px 22px rgba(37, 99, 235, 0.28) !important;
198
  }
199
-
200
- [class*="gradio-container"] .gr-button-secondary {
201
- background: #ffffff !important;
202
- color: #1d4ed8 !important;
203
- border: 1px solid rgba(147, 197, 253, 0.9) !important;
204
- box-shadow: 0 1px 2px rgba(15, 39, 68, 0.04) !important;
205
- }
206
-
207
- [class*="gradio-container"] .gr-button-secondary:hover {
208
- background: #f0f7ff !important;
209
  }
210
-
 
 
211
  [class*="gradio-container"] .gr-button-stop {
212
  background: #ffffff !important;
213
  color: #1d4ed8 !important;
214
- border: 1px solid rgba(147, 197, 253, 0.9) !important;
215
- box-shadow: 0 1px 2px rgba(15, 39, 68, 0.04) !important;
216
  }
217
-
 
 
218
  [class*="gradio-container"] .gr-button-stop:hover {
219
- background: #f0f7ff !important;
 
220
  }
221
 
 
222
  [class*="gradio-container"] .gr-group,
223
  [class*="gradio-container"] fieldset,
224
  [class*="gradio-container"] .gr-box,
225
- [class*="gradio-container"] .gr-panel {
226
- border: none !important;
227
- box-shadow: none !important;
 
 
 
228
  background: transparent !important;
229
  }
230
-
231
- /* Form rows use theme vars; keep chrome transparent so only inputs read as “cards”. */
232
- [class*="gradio-container"] .gr-form,
233
- [class*="gradio-container"] .form {
234
  background: transparent !important;
235
- border: none !important;
236
- box-shadow: none !important;
237
  }
238
 
 
239
  [class*="gradio-container"] textarea,
240
- [class*="gradio-container"] input:not([type="checkbox"]):not([type="radio"]) {
241
  background: #ffffff !important;
242
- border: 1px solid rgba(147, 197, 253, 0.85) !important;
243
- box-shadow: 0 6px 18px rgba(37, 99, 235, 0.06) !important;
244
  border-radius: 14px !important;
 
245
  }
246
-
 
247
  [class*="gradio-container"] textarea:focus,
248
  [class*="gradio-container"] input:focus {
249
  border-color: #3b82f6 !important;
250
- box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2) !important;
 
251
  }
252
 
253
- [class*="gradio-container"] .gr-markdown,
254
- [class*="gradio-container"] .prose {
255
- color: #0f2744 !important;
 
 
 
 
 
 
256
  }
257
-
258
- [class*="gradio-container"] .gr-markdown a,
259
- [class*="gradio-container"] .prose a {
 
 
 
 
 
 
 
260
  color: #1d4ed8 !important;
261
  }
262
 
263
- /* Tabs: no heavy panels */
264
- [class*="gradio-container"] .tabs {
265
- border: none !important;
 
 
266
  background: transparent !important;
 
267
  }
268
 
269
- .inline-example-title {
270
- font-size: 0.72rem;
271
- font-weight: 700;
272
- letter-spacing: 0.08em;
273
- text-transform: uppercase;
274
- color: #2563eb;
275
- margin: 16px 0 4px 0;
276
- }
277
-
278
- .example-buttons {
279
- display: grid;
280
- gap: 10px;
281
- margin-top: 8px;
282
- }
283
-
284
- .example-note {
285
- color: #4a6a8c;
286
- font-size: 12px;
287
- margin: 0 0 6px 0;
288
  }
289
-
290
- .no-frame {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
291
  background: transparent !important;
292
- border: none !important;
293
- box-shadow: none !important;
294
  }
295
-
296
- .slider-root .noUi-target,
297
- .slider-root [role="slider"] {
298
- --track-color: #dbeafe;
299
- --range-color: #2563eb;
300
  }
301
-
302
- .slider-root .noUi-target {
303
- background: #dbeafe !important;
304
  }
305
-
306
- .slider-root .noUi-connect {
307
- background: #2563eb !important;
308
- }
309
-
310
- [class*="gradio-container"] .noUi-target {
311
- border: none !important;
312
- box-shadow: none !important;
313
- background: #e8f1ff !important;
314
  }
315
-
316
- [class*="gradio-container"] .noUi-connect {
317
  background: #2563eb !important;
318
  }
319
 
320
- [class*="gradio-container"] .noUi-handle {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
321
  border: none !important;
322
- box-shadow: 0 0 0 2px #2563eb, 0 2px 8px rgba(37, 99, 235, 0.2) !important;
323
- background: #ffffff !important;
 
 
324
  }
325
 
326
- /* Example preset buttons live in normal Button blocks; soften any label chrome */
327
- [class*="gradio-container"] .example-buttons .gr-form {
328
- gap: 10px !important;
 
 
 
 
 
329
  }
 
 
330
 
 
331
  [class*="gradio-container"] [data-testid="block-examples"] {
332
- background: linear-gradient(180deg, #f7fbff 0%, #eef4ff 100%) !important;
 
333
  border-radius: 16px !important;
334
  padding: 12px !important;
335
- border: 1px solid rgba(147, 197, 253, 0.45) !important;
336
  }
337
-
338
  [class*="gradio-container"] [data-testid="block-examples"] table,
339
  [class*="gradio-container"] [data-testid="block-examples"] thead,
340
  [class*="gradio-container"] [data-testid="block-examples"] tbody,
@@ -343,19 +441,21 @@ CUSTOM_CSS = """
343
  border: none !important;
344
  background: transparent !important;
345
  }
346
-
347
  [class*="gradio-container"] [data-testid="block-examples"] button {
348
  background: #ffffff !important;
349
  color: #1d4ed8 !important;
350
- border: none !important;
351
  border-radius: 12px !important;
352
- box-shadow: inset 0 0 0 1px rgba(147, 197, 253, 0.9) !important;
353
  font-size: 13px !important;
354
  }
355
-
356
  [class*="gradio-container"] [data-testid="block-examples"] button:hover {
357
  background: #eff6ff !important;
 
358
  }
 
 
 
359
  """
360
 
361
 
@@ -657,20 +757,21 @@ with gr.Blocks(
657
  placeholder="Ask anything you want to research...",
658
  lines=6,
659
  )
660
- with gr.Row():
661
  run_btn = gr.Button("Run Research", variant="primary", size="lg")
662
  stop_btn = gr.Button("Stop", variant="stop", size="lg")
663
  clear_btn = gr.Button("Clear", variant="secondary", size="lg")
664
 
665
  with gr.Group(elem_classes="section-card"):
666
- gr.HTML('<div class="inline-example-title">Try Examples</div>')
667
  gr.HTML('<div class="example-note">Click to auto-fill the chat box</div>')
668
  with gr.Column(elem_classes="example-buttons"):
669
- ex1_btn = gr.Button("🌏 Plan a 2-day Tokyo trip under $250 with trade-offs", variant="secondary")
670
- ex2_btn = gr.Button("🤖 Compare 3 open-source coding agents with pros/cons", variant="secondary")
671
- ex3_btn = gr.Button("⚖️ RAG vs fine-tuning for legal QA: which and why?", variant="secondary")
672
 
673
  with gr.Group(elem_classes="section-card"):
 
674
  with gr.Tabs():
675
  with gr.TabItem("Result"):
676
  answer = gr.Markdown(label="Final Answer")
@@ -710,13 +811,26 @@ with gr.Blocks(
710
  allow_custom_value=True,
711
  info="You can type any model id supported by HF Inference API.",
712
  )
713
- max_turns = gr.Slider(label="Max Turns", minimum=2, maximum=20, value=8, step=1, elem_classes="slider-root")
 
 
 
 
 
 
714
  max_search_results = gr.Slider(
715
- label="Search Results Per Query", minimum=1, maximum=10, value=5, step=1
716
- , elem_classes="slider-root"
 
 
 
717
  )
718
  temperature = gr.Slider(
719
- label="Temperature", minimum=0.0, maximum=1.5, value=0.4, step=0.1, elem_classes="slider-root"
 
 
 
 
720
  )
721
 
722
  run_event = run_btn.click(
 
60
  VISIT_CACHE: Dict[str, Dict[str, Any]] = {}
61
  LOGO_PATH = str(Path(__file__).resolve().parent / "assets" / "quest-logo.png")
62
 
63
+ # Gradio 5 default themes pull greys from the neutral palette; Base + explicit overrides keep
64
+ # the whole UI on a strict blue/white scheme without unwanted slate panels.
65
+ APP_THEME = gr.themes.Base(
66
  primary_hue=gr.themes.colors.blue,
67
  secondary_hue=gr.themes.colors.sky,
68
  neutral_hue=gr.themes.colors.blue,
69
  font=gr.themes.GoogleFont("Manrope"),
70
  font_mono=gr.themes.GoogleFont("JetBrains Mono"),
71
  ).set(
72
+ body_background_fill="#f5f9ff",
73
  body_text_color="#0f2744",
74
  body_text_color_subdued="#4a6a8c",
75
  color_accent="*primary_600",
76
+ color_accent_soft="#dbeafe",
77
  background_fill_primary="#ffffff",
78
+ background_fill_secondary="#f0f6ff",
79
+ border_color_primary="#dbeafe",
80
  border_color_accent="*primary_500",
81
+ block_background_fill="#ffffff",
82
  block_border_width="0px",
83
  block_border_color="transparent",
84
+ block_shadow="0 1px 2px rgba(15,39,68,0.04), 0 10px 30px rgba(37,99,235,0.06)",
85
+ block_radius="18px",
86
  block_label_background_fill="transparent",
87
  block_label_border_width="0px",
88
+ block_label_text_color="#3b5b7a",
89
+ block_label_text_weight="600",
90
+ block_title_text_color="#0f2744",
91
+ block_title_text_weight="700",
92
  block_title_border_width="0px",
93
  panel_background_fill="transparent",
94
  panel_border_width="0px",
95
  panel_border_color="transparent",
96
  input_background_fill="#ffffff",
97
+ input_background_fill_focus="#ffffff",
98
+ input_border_color="#bfdbfe",
99
+ input_border_color_focus="*primary_500",
100
  input_border_width="1px",
101
+ input_radius="14px",
102
  input_shadow="none",
103
+ input_shadow_focus="0 0 0 3px rgba(59,130,246,0.18)",
104
  code_background_fill="#f0f7ff",
105
  slider_color="*primary_500",
106
+ button_primary_background_fill="linear-gradient(135deg,#1d4ed8 0%,#3b82f6 100%)",
107
+ button_primary_background_fill_hover="linear-gradient(135deg,#1e40af 0%,#2563eb 100%)",
108
+ button_primary_text_color="#ffffff",
109
+ button_primary_border_color="transparent",
110
+ button_primary_shadow="0 8px 22px rgba(37,99,235,0.28)",
111
  button_secondary_background_fill="#ffffff",
112
  button_secondary_background_fill_hover="#eff6ff",
113
+ button_secondary_text_color="*primary_700",
114
+ button_secondary_border_color="#bfdbfe",
115
  button_cancel_background_fill="#ffffff",
116
  button_cancel_background_fill_hover="#eff6ff",
117
+ button_cancel_text_color="*primary_700",
118
+ button_cancel_border_color="#bfdbfe",
119
  table_border_color="#dbeafe",
120
  table_even_background_fill="#fafdff",
121
  table_odd_background_fill="#ffffff",
122
  )
123
 
124
  CUSTOM_CSS = """
125
+ /* Gradio 5 uses versioned root classes (gradio-container-5-29-0). Match all of them and
126
+ replace every neutral grey surface with white / soft-blue tints. */
127
+
128
+ html, body, gradio-app, [class*="gradio-container"] {
129
+ background: #f5f9ff !important;
130
+ }
131
+
132
  [class*="gradio-container"] {
133
+ max-width: 1180px !important;
134
  color: #0f2744;
135
  }
136
 
137
+ [class*="gradio-container"] *::selection { background: rgba(37,99,235,0.18); }
138
+
139
+ /* --- LEFT/RIGHT layout --- */
140
+ .layout-gap { gap: 24px !important; align-items: flex-start; }
141
+ .right-stack > * { margin-bottom: 12px; }
142
+ .action-row { gap: 10px !important; margin-top: 12px; }
143
+ .action-row button { min-width: 0; flex: 1; }
144
+
145
+ /* --- LOGO --- */
146
+ .banner-logo-image,
147
+ .banner-logo-image .image-container,
148
+ .banner-logo-image .image-frame,
149
+ .banner-logo-image > div,
150
+ .banner-logo-image button {
151
+ background: transparent !important;
152
+ border: none !important;
153
+ box-shadow: none !important;
154
+ }
155
+ .banner-logo-image img {
156
  width: 100%;
157
  max-width: 360px;
158
  height: auto;
 
163
  box-shadow: none !important;
164
  }
165
 
166
+ /* --- SECTION CARDS --- */
167
+ /* `section-card` becomes a real white rounded card with soft blue shadow, no grey. */
 
 
 
 
 
168
  .section-card {
169
+ background: #ffffff !important;
170
+ border: 1px solid rgba(191,219,254,0.55) !important;
171
+ border-radius: 20px !important;
172
+ box-shadow: 0 1px 2px rgba(15,39,68,0.03), 0 16px 40px rgba(37,99,235,0.07) !important;
173
+ padding: 18px !important;
174
+ }
175
+ /* `no-frame` opts a card out of all chrome (used for logo + icon grid). */
176
+ .no-frame {
177
  background: transparent !important;
178
+ border: none !important;
179
  box-shadow: none !important;
180
+ padding: 0 !important;
181
  }
182
 
183
  .section-heading {
184
  font-size: 0.72rem;
185
  font-weight: 700;
186
+ letter-spacing: 0.1em;
187
  text-transform: uppercase;
188
  color: #2563eb;
189
+ margin: 0 0 14px 0;
190
+ padding-bottom: 10px;
191
+ border-bottom: 1px solid rgba(37,99,235,0.14);
 
 
 
 
 
 
 
 
 
192
  }
193
 
194
+ /* --- ICON GRID (Paper / Code / Dataset / Model) --- */
195
  .icon-grid {
196
  display: grid;
197
  grid-template-columns: repeat(2, minmax(0, 1fr));
 
200
  max-width: 360px;
201
  margin: 0 auto;
202
  }
 
203
  .icon-link {
204
  display: flex;
205
  align-items: center;
206
  justify-content: center;
207
  gap: 8px;
208
+ padding: 16px 14px;
209
+ border-radius: 16px;
210
  text-decoration: none !important;
211
  color: #1d4ed8 !important;
212
+ background: #ffffff;
213
  font-weight: 600;
214
+ font-size: 16px;
215
+ border: 1px solid rgba(191,219,254,0.7);
216
+ box-shadow: 0 1px 2px rgba(15,39,68,0.03), 0 10px 28px rgba(37,99,235,0.07);
217
+ transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
218
  }
 
219
  .icon-link:hover {
220
  transform: translateY(-1px);
221
+ border-color: #93c5fd;
222
+ box-shadow: 0 4px 18px rgba(37,99,235,0.14);
223
  }
224
 
225
+ /* --- BUTTONS --- */
226
+ [class*="gradio-container"] button.primary,
227
  [class*="gradio-container"] .gr-button-primary {
228
+ background: linear-gradient(135deg,#1d4ed8 0%,#3b82f6 100%) !important;
229
+ color: #ffffff !important;
230
  border: none !important;
231
+ box-shadow: 0 8px 22px rgba(37,99,235,0.28) !important;
232
  }
233
+ [class*="gradio-container"] button.primary:hover,
234
+ [class*="gradio-container"] .gr-button-primary:hover {
235
+ background: linear-gradient(135deg,#1e40af 0%,#2563eb 100%) !important;
236
+ box-shadow: 0 10px 26px rgba(37,99,235,0.34) !important;
 
 
 
 
 
 
237
  }
238
+ [class*="gradio-container"] button.secondary,
239
+ [class*="gradio-container"] button.stop,
240
+ [class*="gradio-container"] .gr-button-secondary,
241
  [class*="gradio-container"] .gr-button-stop {
242
  background: #ffffff !important;
243
  color: #1d4ed8 !important;
244
+ border: 1px solid #bfdbfe !important;
245
+ box-shadow: 0 1px 2px rgba(15,39,68,0.04) !important;
246
  }
247
+ [class*="gradio-container"] button.secondary:hover,
248
+ [class*="gradio-container"] button.stop:hover,
249
+ [class*="gradio-container"] .gr-button-secondary:hover,
250
  [class*="gradio-container"] .gr-button-stop:hover {
251
+ background: #eff6ff !important;
252
+ border-color: #93c5fd !important;
253
  }
254
 
255
+ /* --- KILL DEFAULT GREY BLOCKS / FORMS / PANELS --- */
256
  [class*="gradio-container"] .gr-group,
257
  [class*="gradio-container"] fieldset,
258
  [class*="gradio-container"] .gr-box,
259
+ [class*="gradio-container"] .gr-panel,
260
+ [class*="gradio-container"] .form,
261
+ [class*="gradio-container"] .gr-form,
262
+ [class*="gradio-container"] .block,
263
+ [class*="gradio-container"] .wrap,
264
+ [class*="gradio-container"] .container {
265
  background: transparent !important;
266
  }
267
+ /* Anything Gradio decides to paint with neutral_50 → make it white-on-card. */
268
+ [class*="gradio-container"] [class*="svelte-"] > .form {
 
 
269
  background: transparent !important;
 
 
270
  }
271
 
272
+ /* --- INPUTS / TEXTAREA --- */
273
  [class*="gradio-container"] textarea,
274
+ [class*="gradio-container"] input:not([type="checkbox"]):not([type="radio"]):not([type="range"]) {
275
  background: #ffffff !important;
276
+ border: 1px solid #bfdbfe !important;
277
+ box-shadow: none !important;
278
  border-radius: 14px !important;
279
+ color: #0f2744 !important;
280
  }
281
+ [class*="gradio-container"] textarea::placeholder,
282
+ [class*="gradio-container"] input::placeholder { color: #7591b3 !important; }
283
  [class*="gradio-container"] textarea:focus,
284
  [class*="gradio-container"] input:focus {
285
  border-color: #3b82f6 !important;
286
+ box-shadow: 0 0 0 3px rgba(59,130,246,0.2) !important;
287
+ outline: none !important;
288
  }
289
 
290
+ /* --- DROPDOWN --- */
291
+ [class*="gradio-container"] [data-testid="dropdown"],
292
+ [class*="gradio-container"] [data-testid="dropdown"] > .wrap,
293
+ [class*="gradio-container"] .secondary-wrap,
294
+ [class*="gradio-container"] [class*="dropdown"] .wrap {
295
+ background: #ffffff !important;
296
+ border: 1px solid #bfdbfe !important;
297
+ border-radius: 14px !important;
298
+ box-shadow: none !important;
299
  }
300
+ [class*="gradio-container"] .options ul,
301
+ [class*="gradio-container"] .options {
302
+ background: #ffffff !important;
303
+ border: 1px solid #bfdbfe !important;
304
+ border-radius: 12px !important;
305
+ box-shadow: 0 12px 30px rgba(37,99,235,0.12) !important;
306
+ }
307
+ [class*="gradio-container"] .options li[aria-selected="true"],
308
+ [class*="gradio-container"] .options li:hover {
309
+ background: #eff6ff !important;
310
  color: #1d4ed8 !important;
311
  }
312
 
313
+ /* Small "info / help" labels under inputs */
314
+ [class*="gradio-container"] .info,
315
+ [class*="gradio-container"] [data-testid*="info"],
316
+ [class*="gradio-container"] .gr-info {
317
+ color: #6b86a6 !important;
318
  background: transparent !important;
319
+ font-size: 12px !important;
320
  }
321
 
322
+ /* --- SLIDERS (Gradio uses native input[type=range], not noUi) --- */
323
+ [class*="gradio-container"] input[type="range"] {
324
+ -webkit-appearance: none;
325
+ appearance: none;
326
+ width: 100%;
327
+ height: 6px;
328
+ background: #dbeafe;
329
+ border-radius: 999px;
330
+ outline: none;
331
+ box-shadow: none !important;
332
+ border: none !important;
 
 
 
 
 
 
 
 
333
  }
334
+ [class*="gradio-container"] input[type="range"]::-webkit-slider-runnable-track {
335
+ height: 6px;
336
+ background: linear-gradient(90deg,#2563eb var(--val,50%), #dbeafe var(--val,50%));
337
+ border-radius: 999px;
338
+ }
339
+ [class*="gradio-container"] input[type="range"]::-webkit-slider-thumb {
340
+ -webkit-appearance: none;
341
+ appearance: none;
342
+ width: 18px;
343
+ height: 18px;
344
+ border-radius: 50%;
345
+ background: #ffffff;
346
+ border: 2px solid #2563eb;
347
+ box-shadow: 0 2px 6px rgba(37,99,235,0.25);
348
+ margin-top: -6px;
349
+ cursor: pointer;
350
+ }
351
+ [class*="gradio-container"] input[type="range"]::-moz-range-track {
352
+ height: 6px;
353
+ background: #dbeafe;
354
+ border-radius: 999px;
355
+ }
356
+ [class*="gradio-container"] input[type="range"]::-moz-range-progress {
357
+ height: 6px;
358
+ background: #2563eb;
359
+ border-radius: 999px;
360
+ }
361
+ [class*="gradio-container"] input[type="range"]::-moz-range-thumb {
362
+ width: 16px;
363
+ height: 16px;
364
+ border-radius: 50%;
365
+ background: #ffffff;
366
+ border: 2px solid #2563eb;
367
+ box-shadow: 0 2px 6px rgba(37,99,235,0.25);
368
+ }
369
+ /* The legacy noUi slider, kept just in case */
370
+ [class*="gradio-container"] .noUi-target { background: #dbeafe !important; border: none !important; box-shadow: none !important; }
371
+ [class*="gradio-container"] .noUi-connect { background: #2563eb !important; }
372
+ [class*="gradio-container"] .noUi-handle { background: #ffffff !important; border: 2px solid #2563eb !important; box-shadow: 0 2px 8px rgba(37,99,235,0.2) !important; }
373
+
374
+ /* --- TABS --- */
375
+ [class*="gradio-container"] .tabs,
376
+ [class*="gradio-container"] .tab-container,
377
+ [class*="gradio-container"] .tab-wrapper {
378
  background: transparent !important;
 
 
379
  }
380
+ [class*="gradio-container"] .tab-container::after {
381
+ background: rgba(37,99,235,0.18) !important;
 
 
 
382
  }
383
+ [class*="gradio-container"] .tab-wrapper button {
384
+ color: #4a6a8c !important;
385
+ font-weight: 600 !important;
386
  }
387
+ [class*="gradio-container"] .tab-wrapper button.selected {
388
+ color: #1d4ed8 !important;
 
 
 
 
 
 
 
389
  }
390
+ [class*="gradio-container"] .tab-wrapper button.selected::after {
 
391
  background: #2563eb !important;
392
  }
393
 
394
+ /* --- MARKDOWN / PROSE --- */
395
+ [class*="gradio-container"] .gr-markdown,
396
+ [class*="gradio-container"] .prose,
397
+ [class*="gradio-container"] .markdown { color: #0f2744 !important; }
398
+ [class*="gradio-container"] .gr-markdown a,
399
+ [class*="gradio-container"] .prose a { color: #1d4ed8 !important; }
400
+
401
+ /* --- CODE BLOCK (Trace tab) --- */
402
+ [class*="gradio-container"] .codemirror-wrapper,
403
+ [class*="gradio-container"] .cm-editor,
404
+ [class*="gradio-container"] .cm-scroller,
405
+ [class*="gradio-container"] .cm-gutters,
406
+ [class*="gradio-container"] .cm-content {
407
+ background: #f3f8ff !important;
408
+ color: #0f2744 !important;
409
  border: none !important;
410
+ }
411
+ [class*="gradio-container"] .cm-gutters {
412
+ border-right: 1px solid #dbeafe !important;
413
+ color: #6b86a6 !important;
414
  }
415
 
416
+ /* --- "Try Examples" preset buttons --- */
417
+ .inline-example-title {
418
+ font-size: 0.72rem;
419
+ font-weight: 700;
420
+ letter-spacing: 0.1em;
421
+ text-transform: uppercase;
422
+ color: #2563eb;
423
+ margin: 0 0 4px 0;
424
  }
425
+ .example-note { color: #4a6a8c; font-size: 12px; margin: 0 0 10px 0; }
426
+ .example-buttons { display: grid; gap: 10px; margin-top: 4px; }
427
 
428
+ /* --- gr.Examples component (currently unused but defensively styled) --- */
429
  [class*="gradio-container"] [data-testid="block-examples"] {
430
+ background: #f0f6ff !important;
431
+ border: 1px solid #dbeafe !important;
432
  border-radius: 16px !important;
433
  padding: 12px !important;
434
+ box-shadow: none !important;
435
  }
 
436
  [class*="gradio-container"] [data-testid="block-examples"] table,
437
  [class*="gradio-container"] [data-testid="block-examples"] thead,
438
  [class*="gradio-container"] [data-testid="block-examples"] tbody,
 
441
  border: none !important;
442
  background: transparent !important;
443
  }
 
444
  [class*="gradio-container"] [data-testid="block-examples"] button {
445
  background: #ffffff !important;
446
  color: #1d4ed8 !important;
447
+ border: 1px solid #bfdbfe !important;
448
  border-radius: 12px !important;
449
+ box-shadow: none !important;
450
  font-size: 13px !important;
451
  }
 
452
  [class*="gradio-container"] [data-testid="block-examples"] button:hover {
453
  background: #eff6ff !important;
454
+ border-color: #93c5fd !important;
455
  }
456
+
457
+ /* Hide the small "footer" branding so nothing grey leaks in below the app */
458
+ footer { display: none !important; }
459
  """
460
 
461
 
 
757
  placeholder="Ask anything you want to research...",
758
  lines=6,
759
  )
760
+ with gr.Row(elem_classes="action-row"):
761
  run_btn = gr.Button("Run Research", variant="primary", size="lg")
762
  stop_btn = gr.Button("Stop", variant="stop", size="lg")
763
  clear_btn = gr.Button("Clear", variant="secondary", size="lg")
764
 
765
  with gr.Group(elem_classes="section-card"):
766
+ gr.HTML('<div class="section-heading">Try Examples</div>')
767
  gr.HTML('<div class="example-note">Click to auto-fill the chat box</div>')
768
  with gr.Column(elem_classes="example-buttons"):
769
+ ex1_btn = gr.Button("🌏 Plan a 2-day Tokyo trip under $250 with trade-offs", variant="secondary")
770
+ ex2_btn = gr.Button("🤖 Compare 3 open-source coding agents with pros/cons", variant="secondary")
771
+ ex3_btn = gr.Button("⚖️ RAG vs fine-tuning for legal QA: which and why?", variant="secondary")
772
 
773
  with gr.Group(elem_classes="section-card"):
774
+ gr.HTML('<div class="section-heading">Output</div>')
775
  with gr.Tabs():
776
  with gr.TabItem("Result"):
777
  answer = gr.Markdown(label="Final Answer")
 
811
  allow_custom_value=True,
812
  info="You can type any model id supported by HF Inference API.",
813
  )
814
+ max_turns = gr.Slider(
815
+ label="Max Turns",
816
+ minimum=2,
817
+ maximum=20,
818
+ value=8,
819
+ step=1,
820
+ )
821
  max_search_results = gr.Slider(
822
+ label="Search Results Per Query",
823
+ minimum=1,
824
+ maximum=10,
825
+ value=5,
826
+ step=1,
827
  )
828
  temperature = gr.Slider(
829
+ label="Temperature",
830
+ minimum=0.0,
831
+ maximum=1.5,
832
+ value=0.4,
833
+ step=0.1,
834
  )
835
 
836
  run_event = run_btn.click(