Minette Kaunismäki commited on
Commit
754a227
·
1 Parent(s): 3473c50

fixing mobile rendering

Browse files
Files changed (2) hide show
  1. app.py +659 -87
  2. ui.py +56 -66
app.py CHANGED
@@ -110,6 +110,22 @@ custom_css = """
110
  color-scheme: light;
111
  }
112
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
113
  html, body, .gradio-container, .main {
114
  background: var(--pruna-bg-primary) !important;
115
  color: var(--pruna-text-primary) !important;
@@ -123,9 +139,34 @@ body, .gradio-container {
123
  }
124
 
125
  .gradio-container {
 
126
  max-width: 1200px !important;
127
  margin: 0 auto !important;
128
  padding-top: 0 !important;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
129
  }
130
 
131
  /* —— App header (InferBench only) —— */
@@ -183,7 +224,9 @@ button.theme-toggle {
183
  z-index: 6;
184
  }
185
  .app-header .theme-toggle:hover,
186
- button.theme-toggle:hover {
 
 
187
  color: var(--pruna-menu-hover-color) !important;
188
  background: var(--pruna-menu-hover-bg) !important;
189
  border-color: var(--pruna-menu-border) !important;
@@ -220,7 +263,7 @@ button.theme-toggle[data-mode="light"] .theme-icon-moon { display: block !import
220
  align-items: center;
221
  justify-content: center;
222
  gap: 12px;
223
- width: max-content !important;
224
  max-width: 100%;
225
  margin: 0 auto;
226
  }
@@ -247,7 +290,9 @@ button.theme-toggle[data-mode="light"] .theme-icon-moon { display: block !import
247
  .main-tabs .tab-container {
248
  height: auto !important;
249
  justify-content: center !important;
250
- overflow: visible !important;
 
 
251
  gap: 2px;
252
  }
253
  .main-tabs .tab-container::after {
@@ -267,7 +312,8 @@ button.theme-toggle[data-mode="light"] .theme-icon-moon { display: block !import
267
  min-height: 44px !important;
268
  height: auto !important;
269
  }
270
- .main-tabs .tab-container > button:hover:not(.selected) {
 
271
  color: var(--pruna-tab-hover) !important;
272
  background: transparent !important;
273
  }
@@ -286,6 +332,242 @@ button.theme-toggle[data-mode="light"] .theme-icon-moon { display: block !import
286
  border-radius: 0 !important;
287
  }
288
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
289
  /* —— Benchmark view menu (Leaderboard / Graphs / Compare) —— */
290
  .benchmark-back-btn,
291
  .benchmark-back-btn.block,
@@ -335,12 +617,16 @@ button.theme-toggle[data-mode="light"] .theme-icon-moon { display: block !import
335
  box-shadow: none !important;
336
  padding: 0 !important;
337
  margin: 4px 0 20px !important;
 
 
338
  }
339
  .benchmark-view-menu .wrap {
340
  display: grid !important;
341
  grid-template-columns: repeat(3, minmax(0, 1fr));
342
  gap: 4px !important;
343
  width: 100%;
 
 
344
  padding: 4px !important;
345
  border: 1px solid var(--pruna-menu-border) !important;
346
  border-radius: 12px !important;
@@ -385,60 +671,143 @@ button.theme-toggle[data-mode="light"] .theme-icon-moon { display: block !import
385
  }
386
  @media (max-width: 700px) {
387
  .benchmark-view-menu .wrap {
388
- grid-template-columns: 1fr;
 
 
 
 
 
389
  }
390
  }
391
 
392
  /* Surfaces */
393
- .benchmark-catalogue-row {
394
- width: 100%;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
395
  gap: 16px !important;
396
  align-items: stretch !important;
 
 
 
397
  }
398
- .benchmark-catalogue-row > div {
399
- display: flex !important;
400
- flex-direction: column !important;
401
- height: 100% !important;
 
 
402
  }
403
- .benchmark-card-col {
 
 
 
404
  display: flex !important;
405
  flex-direction: column !important;
406
- justify-content: space-between !important;
407
- gap: 16px !important;
408
- height: 100% !important;
409
- min-height: 240px !important;
410
- padding: 18px 20px !important;
 
411
  border: 1px solid var(--pruna-border) !important;
412
  border-radius: 16px !important;
413
  background: var(--pruna-card-bg) !important;
414
  box-shadow: var(--pruna-card-shadow) !important;
415
  }
 
 
 
 
 
 
 
 
 
 
 
416
  .benchmark-card-col:hover {
417
  border-color: color-mix(in srgb, var(--pruna-accent) 50%, transparent) !important;
418
  }
419
- .benchmark-card-body {
420
- flex: 1 1 auto;
421
- min-height: 0;
 
 
 
 
 
 
 
 
 
 
 
422
  }
423
  .benchmark-card-title {
 
 
 
424
  color: var(--pruna-text-primary);
425
- font-size: 1.25rem;
426
  font-weight: 700;
427
  line-height: 1.3;
428
- margin: 0 0 8px;
 
 
 
 
 
 
 
429
  }
430
  .benchmark-card-blurb {
431
  margin: 0;
432
  color: var(--pruna-text-body);
433
- font-size: 0.95rem;
434
  line-height: 1.45;
435
  }
436
  .benchmark-card-col .benchmark-open-btn,
437
- .benchmark-card-col button {
438
- margin-top: auto !important;
 
 
 
 
439
  width: 100% !important;
 
 
440
  align-self: stretch !important;
441
- flex-shrink: 0 !important;
442
  }
443
  .home-callouts > div,
444
  .compare-prompt-block {
@@ -615,32 +984,25 @@ button.theme-toggle[data-mode="light"] .theme-icon-moon { display: block !import
615
  max-width: none !important;
616
  overflow: visible !important;
617
  }
618
- .home-snapshots-table {
619
- display: table !important;
620
- width: 100% !important;
621
- border-collapse: separate !important;
622
- border-spacing: 0 12px !important;
623
- margin: 0 !important;
624
- table-layout: fixed !important;
625
- border: none !important;
626
- background: transparent !important;
627
- }
628
- .home-snapshots-table tbody {
629
- display: table-row-group !important;
630
  }
631
- .home-snapshots-table tr {
632
- display: table-row !important;
 
 
 
633
  }
634
- .home-snapshots-table td.home-snap-cell {
635
- display: table-cell !important;
636
- vertical-align: top !important;
637
- width: 50% !important;
638
- padding: 0 !important;
639
- border: 0 !important;
640
- background: transparent !important;
641
  }
642
- .home-snapshots-table td.home-snap-cell:first-child {
643
- padding-right: 24px !important;
644
  }
645
  .home-snap-title,
646
  .prose .home-snap-title {
@@ -690,7 +1052,7 @@ button.theme-toggle[data-mode="light"] .theme-icon-moon { display: block !import
690
  .home-top-list li,
691
  .prose .home-top-list li {
692
  display: grid;
693
- grid-template-columns: 28px minmax(0, 1fr) auto;
694
  gap: 10px;
695
  align-items: center;
696
  padding: 8px 0;
@@ -698,24 +1060,9 @@ button.theme-toggle[data-mode="light"] .theme-icon-moon { display: block !import
698
  color: var(--pruna-text-primary) !important;
699
  }
700
  @media (max-width: 700px) {
701
- .home-snapshots-table,
702
- .home-snapshots-table tbody,
703
- .home-snapshots-table tr,
704
- .home-snapshots-table td {
705
- display: block;
706
- width: 100% !important;
707
- }
708
- .home-snapshots-table {
709
- margin: 4px 0 8px;
710
- border-spacing: 0;
711
- }
712
- .home-snapshots-table td.home-snap-cell,
713
- .home-snapshots-table td.home-snap-cell:first-child {
714
- padding: 0 !important;
715
- margin-bottom: 8px;
716
- }
717
- .home-snap-top {
718
- margin-bottom: 16px;
719
  }
720
  }
721
  .home-rank,
@@ -743,6 +1090,7 @@ button.theme-toggle[data-mode="light"] .theme-icon-moon { display: block !import
743
  font-variant-numeric: tabular-nums;
744
  color: var(--pruna-score) !important;
745
  font-weight: 600;
 
746
  }
747
  .home-empty,
748
  .prose .home-empty {
@@ -760,10 +1108,15 @@ button.theme-toggle[data-mode="light"] .theme-icon-moon { display: block !import
760
  .pareto-plot .modebar { display: none !important; }
761
 
762
  .leaderboard-controls {
 
 
763
  align-items: end !important;
764
  gap: 10px !important;
765
  margin-bottom: 12px;
766
  }
 
 
 
767
  .leaderboard-controls > .block,
768
  .leaderboard-controls .form,
769
  .leaderboard-controls .block {
@@ -832,6 +1185,8 @@ button.theme-toggle[data-mode="light"] .theme-icon-moon { display: block !import
832
  .ranking-table-host.block,
833
  .ranking-table-host .padded,
834
  .ranking-table-host.prose {
 
 
835
  border: none !important;
836
  outline: none !important;
837
  background: transparent !important;
@@ -839,6 +1194,9 @@ button.theme-toggle[data-mode="light"] .theme-icon-moon { display: block !import
839
  padding: 0 !important;
840
  margin: 0 !important;
841
  width: 100% !important;
 
 
 
842
  --block-border-width: 0 !important;
843
  }
844
  .ranking-table-scroll {
@@ -846,9 +1204,14 @@ button.theme-toggle[data-mode="light"] .theme-icon-moon { display: block !import
846
  border-radius: 12px;
847
  background: var(--pruna-menu-bg);
848
  box-shadow: none;
 
 
 
849
  max-height: min(70vh, 720px);
850
- overflow: auto;
 
851
  -webkit-overflow-scrolling: touch;
 
852
  }
853
  .ranking-table,
854
  .prose .ranking-table {
@@ -1000,9 +1363,22 @@ button.theme-toggle[data-mode="light"] .theme-icon-moon { display: block !import
1000
  }
1001
 
1002
  .compare-samples-help { color: var(--pruna-text-body); margin-bottom: 8px; }
1003
- .compare-controls {
1004
- align-items: flex-end !important;
 
 
 
 
 
 
 
 
1005
  gap: 12px !important;
 
 
 
 
 
1006
  margin-bottom: 16px;
1007
  }
1008
  .compare-controls > .block,
@@ -1015,6 +1391,8 @@ button.theme-toggle[data-mode="light"] .theme-icon-moon { display: block !import
1015
  box-shadow: none !important;
1016
  padding: 0 !important;
1017
  --block-border-width: 0 !important;
 
 
1018
  }
1019
  .compare-controls label,
1020
  .compare-controls span[data-testid="block-info"] {
@@ -1030,22 +1408,85 @@ button.theme-toggle[data-mode="light"] .theme-icon-moon { display: block !import
1030
  min-height: 1.15rem;
1031
  }
1032
  .compare-controls .compare-models {
1033
- flex: 4 1 0 !important;
1034
- min-width: 280px !important;
 
 
 
1035
  }
1036
  .compare-controls .compare-prompt-count {
1037
- flex: 1 1 180px !important;
1038
- max-width: 240px !important;
 
 
 
1039
  }
1040
- .compare-controls .compare-models .wrap-inner,
1041
- .compare-controls .compare-models .wrap {
 
 
 
 
 
 
1042
  min-height: 40px !important;
1043
- height: 40px !important;
 
1044
  border: 1px solid var(--pruna-input-border) !important;
1045
  border-radius: 10px !important;
1046
  background: var(--pruna-input-bg) !important;
1047
  box-shadow: none !important;
1048
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1049
  .compare-controls .compare-prompt-count .wrap {
1050
  display: grid !important;
1051
  grid-template-columns: minmax(0, 1fr) auto;
@@ -1112,14 +1553,92 @@ button.theme-toggle[data-mode="light"] .theme-icon-moon { display: block !import
1112
  background: transparent !important;
1113
  box-shadow: none !important;
1114
  }
1115
- .compare-controls .compare-shuffle,
1116
- .compare-controls .compare-shuffle button {
1117
- height: 40px !important;
1118
- min-height: 40px !important;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1119
  margin: 0 !important;
1120
- padding: 0 14px !important;
1121
  border-radius: 10px !important;
1122
- align-self: flex-end !important;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1123
  }
1124
  .compare-prompt-block {
1125
  margin: 0 0 22px;
@@ -1143,7 +1662,43 @@ button.theme-toggle[data-mode="light"] .theme-icon-moon { display: block !import
1143
  font-size: 15px;
1144
  line-height: 1.45;
1145
  }
1146
- .compare-row { display: grid; gap: 12px; }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1147
  .compare-cell { min-width: 0; }
1148
  .compare-model-label {
1149
  margin-bottom: 6px;
@@ -1255,6 +1810,12 @@ button.theme-toggle[data-mode="light"] .theme-icon-moon { display: block !import
1255
  text-transform: none !important;
1256
  }
1257
 
 
 
 
 
 
 
1258
  .markdown p, .md p, .prose p,
1259
  .gradio-container .markdown p {
1260
  margin: 0 0 0.8rem !important;
@@ -1301,6 +1862,9 @@ button.theme-toggle[data-mode="light"] .theme-icon-moon { display: block !import
1301
  /* Card / list titles sit under section headings */
1302
  .home-snap-title,
1303
  .benchmark-card-title {
 
 
 
1304
  margin: 0 0 6px !important;
1305
  font-size: 0.95rem !important;
1306
  font-weight: 600 !important;
@@ -1342,14 +1906,22 @@ label, .block-label span {
1342
  a { color: var(--pruna-link); }
1343
 
1344
  /* Gradio form chrome → playground */
1345
- button.primary, .gr-button-primary,
1346
- button.primary:hover, .primary-button {
 
1347
  background: var(--pruna-accent) !important;
1348
  border: 1px solid color-mix(in oklab, var(--pruna-accent) 72%, transparent) !important;
1349
  color: #fff !important;
1350
  border-radius: 8px !important;
1351
  box-shadow: inset 0 1px #fff3 !important;
1352
  font-weight: 600 !important;
 
 
 
 
 
 
 
1353
  }
1354
  .block, .gr-group, .form, .panel {
1355
  border-color: var(--pruna-border) !important;
 
110
  color-scheme: light;
111
  }
112
 
113
+ html, body {
114
+ width: 100% !important;
115
+ max-width: 100% !important;
116
+ overflow-x: clip;
117
+ -webkit-tap-highlight-color: transparent;
118
+ }
119
+ html, body, .gradio-container, .main {
120
+ background: var(--pruna-bg-primary) !important;
121
+ color: var(--pruna-text-primary) !important;
122
+ font-family: var(--pruna-font) !important;
123
+ }
124
+ button, a, label, input, select, textarea,
125
+ [role="button"], [role="tab"], [role="radio"],
126
+ .gradio-container * {
127
+ -webkit-tap-highlight-color: transparent !important;
128
+ }
129
  html, body, .gradio-container, .main {
130
  background: var(--pruna-bg-primary) !important;
131
  color: var(--pruna-text-primary) !important;
 
139
  }
140
 
141
  .gradio-container {
142
+ width: 100% !important;
143
  max-width: 1200px !important;
144
  margin: 0 auto !important;
145
  padding-top: 0 !important;
146
+ padding-left: 20px !important;
147
+ padding-right: 20px !important;
148
+ box-sizing: border-box !important;
149
+ overflow-x: clip;
150
+ }
151
+ .gradio-container .main,
152
+ .gradio-container .wrap,
153
+ .gradio-container .contain,
154
+ .gradio-container .block,
155
+ .gradio-container .form,
156
+ .gradio-container .row,
157
+ .gradio-container .column,
158
+ .gradio-container .gap,
159
+ .gradio-container .html-container,
160
+ .gradio-container .prose,
161
+ .gradio-container .padded,
162
+ .main-tabs,
163
+ .main-tabs .tab-wrapper,
164
+ .main-tabs .tabitem,
165
+ .benchmark-catalogue,
166
+ .benchmark-detail,
167
+ .benchmark-panel,
168
+ .leaderboard-controls {
169
+ max-width: 100% !important;
170
  }
171
 
172
  /* —— App header (InferBench only) —— */
 
224
  z-index: 6;
225
  }
226
  .app-header .theme-toggle:hover,
227
+ .app-header .theme-toggle:active,
228
+ button.theme-toggle:hover,
229
+ button.theme-toggle:active {
230
  color: var(--pruna-menu-hover-color) !important;
231
  background: var(--pruna-menu-hover-bg) !important;
232
  border-color: var(--pruna-menu-border) !important;
 
263
  align-items: center;
264
  justify-content: center;
265
  gap: 12px;
266
+ width: auto !important;
267
  max-width: 100%;
268
  margin: 0 auto;
269
  }
 
290
  .main-tabs .tab-container {
291
  height: auto !important;
292
  justify-content: center !important;
293
+ flex-wrap: wrap !important;
294
+ overflow: hidden !important;
295
+ max-width: 100% !important;
296
  gap: 2px;
297
  }
298
  .main-tabs .tab-container::after {
 
312
  min-height: 44px !important;
313
  height: auto !important;
314
  }
315
+ .main-tabs .tab-container > button:hover:not(.selected),
316
+ .main-tabs .tab-container > button:active:not(.selected) {
317
  color: var(--pruna-tab-hover) !important;
318
  background: transparent !important;
319
  }
 
332
  border-radius: 0 !important;
333
  }
334
 
335
+ /* —— About: two columns on desktop, stacked on phone —— */
336
+ .about-layout,
337
+ .about-layout.row,
338
+ .about-layout .form {
339
+ display: flex !important;
340
+ flex-wrap: wrap !important;
341
+ align-items: flex-start !important;
342
+ gap: 8px 40px !important;
343
+ width: 100% !important;
344
+ }
345
+ .about-layout > .about-col,
346
+ .about-layout .form > .about-col {
347
+ flex: 1 1 340px !important;
348
+ min-width: 280px !important;
349
+ max-width: 100% !important;
350
+ }
351
+ .about-copy,
352
+ .about-copy.block,
353
+ .about-copy .prose,
354
+ .about-copy.prose,
355
+ .about-copy.padded {
356
+ border: none !important;
357
+ background: transparent !important;
358
+ box-shadow: none !important;
359
+ padding: 0 !important;
360
+ margin: 0 !important;
361
+ width: 100% !important;
362
+ max-width: 100% !important;
363
+ overflow-wrap: break-word !important;
364
+ word-break: break-word !important;
365
+ }
366
+ .about-copy ol,
367
+ .about-copy ul,
368
+ .about-copy .prose ol,
369
+ .about-copy .prose ul {
370
+ padding-left: 1.25rem !important;
371
+ margin: 0 0 0.8rem !important;
372
+ }
373
+ .about-copy li,
374
+ .about-copy .prose li {
375
+ overflow-wrap: break-word;
376
+ }
377
+
378
+ @media (max-width: 700px) {
379
+ .gradio-container {
380
+ padding-left: 12px !important;
381
+ padding-right: 12px !important;
382
+ }
383
+ .gradio-container .block,
384
+ .gradio-container .form,
385
+ .gradio-container .row,
386
+ .gradio-container .column,
387
+ .gradio-container .wrap,
388
+ .benchmark-catalogue,
389
+ .benchmark-detail,
390
+ .benchmark-panel,
391
+ .leaderboard-controls {
392
+ min-width: 0 !important;
393
+ max-width: 100% !important;
394
+ }
395
+ .app-header {
396
+ padding: 4px 40px 0 8px;
397
+ margin: 4px 0 12px;
398
+ }
399
+ .app-header-logo {
400
+ width: 36px !important;
401
+ height: 42px !important;
402
+ }
403
+ .app-header-brand h1,
404
+ .gradio-container .app-header-brand h1 {
405
+ font-size: 1.55rem !important;
406
+ }
407
+ .app-header-tagline {
408
+ font-size: 0.88rem !important;
409
+ padding: 0 8px !important;
410
+ }
411
+ .main-tabs > .tab-wrapper {
412
+ margin: 0 0 14px !important;
413
+ }
414
+ .main-tabs .tab-container {
415
+ flex-wrap: wrap !important;
416
+ justify-content: center !important;
417
+ gap: 0 !important;
418
+ }
419
+ .main-tabs .tab-container > button {
420
+ padding: 10px 12px !important;
421
+ font-size: 0.88rem !important;
422
+ min-height: 40px !important;
423
+ }
424
+ .about-layout,
425
+ .about-layout.row,
426
+ .about-layout .form {
427
+ flex-direction: column !important;
428
+ flex-wrap: nowrap !important;
429
+ gap: 8px !important;
430
+ }
431
+ .about-layout > .about-col,
432
+ .about-layout > div {
433
+ flex: 1 1 auto !important;
434
+ width: 100% !important;
435
+ }
436
+ .about-copy h1,
437
+ .about-copy .prose h1 {
438
+ font-size: 1.3rem !important;
439
+ }
440
+ .about-copy h2,
441
+ .about-copy .prose h2 {
442
+ margin-top: 1.25rem !important;
443
+ font-size: 1.12rem !important;
444
+ }
445
+ .community-footer-links {
446
+ gap: 10px 14px;
447
+ }
448
+ .home-snapshots-grid {
449
+ grid-template-columns: 1fr;
450
+ gap: 22px;
451
+ }
452
+ .home-model {
453
+ overflow-wrap: anywhere;
454
+ }
455
+ .benchmark-catalogue-row,
456
+ .benchmark-catalogue-row.row,
457
+ .benchmark-catalogue-row .form {
458
+ flex-direction: column !important;
459
+ flex-wrap: nowrap !important;
460
+ align-items: stretch !important;
461
+ height: auto !important;
462
+ flex-grow: 0 !important;
463
+ }
464
+ .benchmark-catalogue-row .benchmark-card-col {
465
+ width: 100% !important;
466
+ flex: 0 0 auto !important;
467
+ align-self: stretch !important;
468
+ min-width: 0 !important;
469
+ min-height: 0 !important;
470
+ height: auto !important;
471
+ }
472
+ .leaderboard-controls,
473
+ .leaderboard-controls.row,
474
+ .leaderboard-controls .form {
475
+ flex-direction: column !important;
476
+ align-items: stretch !important;
477
+ }
478
+ .leaderboard-controls > div,
479
+ .leaderboard-controls .form > div {
480
+ flex: 1 1 auto !important;
481
+ width: 100% !important;
482
+ max-width: 100% !important;
483
+ }
484
+ .ranking-table-scroll {
485
+ max-height: min(75vh, 640px);
486
+ width: 100%;
487
+ }
488
+ .ranking-table th,
489
+ .ranking-table td,
490
+ .prose .ranking-table th,
491
+ .prose .ranking-table td {
492
+ padding: 8px 10px !important;
493
+ }
494
+ .ranking-table .rank,
495
+ .prose .ranking-table .rank,
496
+ .ranking-table th.rank {
497
+ position: sticky !important;
498
+ left: 0 !important;
499
+ width: 2.4rem;
500
+ min-width: 2.4rem;
501
+ }
502
+ .ranking-table .model-cell,
503
+ .prose .ranking-table .model-cell,
504
+ .ranking-table th.model-cell {
505
+ position: sticky !important;
506
+ left: 2.4rem !important;
507
+ min-width: 108px;
508
+ max-width: 36vw;
509
+ }
510
+ .ranking-table .model-cell strong {
511
+ white-space: nowrap;
512
+ }
513
+ .compare-controls,
514
+ .compare-controls.row,
515
+ .compare-controls .form {
516
+ flex-direction: column !important;
517
+ flex-wrap: nowrap !important;
518
+ flex: 0 0 auto !important;
519
+ align-items: stretch !important;
520
+ align-content: flex-start !important;
521
+ height: auto !important;
522
+ min-height: 0 !important;
523
+ gap: 10px !important;
524
+ margin-bottom: 12px !important;
525
+ }
526
+ .compare-controls .compare-models,
527
+ .compare-controls .compare-prompt-count,
528
+ .compare-controls .compare-shuffle,
529
+ .compare-controls .form > div {
530
+ flex: 0 0 auto !important;
531
+ width: 100% !important;
532
+ max-width: 100% !important;
533
+ min-width: 0 !important;
534
+ height: auto !important;
535
+ min-height: 0 !important;
536
+ align-self: stretch !important;
537
+ }
538
+ .compare-controls .compare-prompt-count {
539
+ max-width: 100% !important;
540
+ }
541
+ .compare-controls .compare-models .wrap,
542
+ .compare-controls .compare-models .wrap-inner {
543
+ height: auto !important;
544
+ min-height: 40px !important;
545
+ }
546
+ .compare-controls .compare-shuffle,
547
+ .compare-controls .compare-shuffle button {
548
+ width: 100% !important;
549
+ align-self: stretch !important;
550
+ margin-top: 0 !important;
551
+ }
552
+ .compare-row {
553
+ grid-template-columns: 1fr !important;
554
+ }
555
+ .compare-prompt-meta {
556
+ flex-wrap: wrap;
557
+ }
558
+ .pareto-layout,
559
+ .pareto-layout.row,
560
+ .pareto-layout .form {
561
+ flex-direction: column !important;
562
+ }
563
+ .pareto-layout > .pareto-col,
564
+ .pareto-layout > div,
565
+ .pareto-layout .form > div {
566
+ flex: 1 1 auto !important;
567
+ width: 100% !important;
568
+ }
569
+ }
570
+
571
  /* —— Benchmark view menu (Leaderboard / Graphs / Compare) —— */
572
  .benchmark-back-btn,
573
  .benchmark-back-btn.block,
 
617
  box-shadow: none !important;
618
  padding: 0 !important;
619
  margin: 4px 0 20px !important;
620
+ max-width: 100% !important;
621
+ min-width: 0 !important;
622
  }
623
  .benchmark-view-menu .wrap {
624
  display: grid !important;
625
  grid-template-columns: repeat(3, minmax(0, 1fr));
626
  gap: 4px !important;
627
  width: 100%;
628
+ max-width: 100%;
629
+ min-width: 0;
630
  padding: 4px !important;
631
  border: 1px solid var(--pruna-menu-border) !important;
632
  border-radius: 12px !important;
 
671
  }
672
  @media (max-width: 700px) {
673
  .benchmark-view-menu .wrap {
674
+ grid-template-columns: repeat(3, minmax(0, 1fr));
675
+ }
676
+ .benchmark-view-menu label {
677
+ padding: 8px 4px !important;
678
+ font-size: 0.75rem !important;
679
+ text-align: center;
680
  }
681
  }
682
 
683
  /* Surfaces */
684
+ .benchmark-catalogue,
685
+ .benchmark-catalogue .row,
686
+ .benchmark-catalogue .column,
687
+ .benchmark-catalogue .form,
688
+ .benchmark-detail,
689
+ .benchmark-detail .row,
690
+ .benchmark-detail .column,
691
+ .benchmark-detail .form,
692
+ .benchmark-panel,
693
+ .benchmark-panel .row,
694
+ .benchmark-panel .column,
695
+ .benchmark-panel .form {
696
+ min-width: 0 !important;
697
+ max-width: 100% !important;
698
+ }
699
+ .benchmark-catalogue.column,
700
+ .benchmark-catalogue.block,
701
+ .benchmark-catalogue .stretch,
702
+ .benchmark-panel.column,
703
+ .benchmark-panel.block,
704
+ .benchmark-panel .stretch {
705
+ flex-grow: 0 !important;
706
+ height: auto !important;
707
+ min-height: 0 !important;
708
+ justify-content: flex-start !important;
709
+ }
710
+ .benchmark-catalogue-row,
711
+ .benchmark-catalogue-row.row,
712
+ .benchmark-catalogue-row .form {
713
+ display: flex !important;
714
+ flex-direction: row !important;
715
+ flex-wrap: wrap !important;
716
+ width: 100% !important;
717
  gap: 16px !important;
718
  align-items: stretch !important;
719
+ align-content: flex-start !important;
720
+ flex-grow: 0 !important;
721
+ height: auto !important;
722
  }
723
+ .benchmark-catalogue-row .benchmark-card-col {
724
+ flex: 1 1 280px !important;
725
+ align-self: stretch !important;
726
+ min-width: 280px !important;
727
+ max-width: 100% !important;
728
+ height: auto !important;
729
  }
730
+ .benchmark-card-col,
731
+ .benchmark-card-col.block,
732
+ .benchmark-card-col.column,
733
+ .benchmark-card-col.stretch {
734
  display: flex !important;
735
  flex-direction: column !important;
736
+ justify-content: flex-start !important;
737
+ align-items: stretch !important;
738
+ gap: 12px !important;
739
+ height: auto !important;
740
+ min-height: 0 !important;
741
+ padding: 16px !important;
742
  border: 1px solid var(--pruna-border) !important;
743
  border-radius: 16px !important;
744
  background: var(--pruna-card-bg) !important;
745
  box-shadow: var(--pruna-card-shadow) !important;
746
  }
747
+ .benchmark-card-col .form {
748
+ display: flex !important;
749
+ flex-direction: column !important;
750
+ justify-content: flex-start !important;
751
+ align-items: stretch !important;
752
+ gap: 12px !important;
753
+ width: 100% !important;
754
+ height: auto !important;
755
+ min-height: 0 !important;
756
+ flex: 0 0 auto !important;
757
+ }
758
  .benchmark-card-col:hover {
759
  border-color: color-mix(in srgb, var(--pruna-accent) 50%, transparent) !important;
760
  }
761
+ .benchmark-card-body,
762
+ .benchmark-card-col > .block,
763
+ .benchmark-card-col .html-container,
764
+ .benchmark-card-col .prose,
765
+ .benchmark-card-col .padded,
766
+ .benchmark-card-col .block {
767
+ flex: 0 0 auto !important;
768
+ height: auto !important;
769
+ min-height: 0 !important;
770
+ margin: 0 !important;
771
+ padding: 0 !important;
772
+ border: none !important;
773
+ background: transparent !important;
774
+ box-shadow: none !important;
775
  }
776
  .benchmark-card-title {
777
+ display: flex;
778
+ align-items: center;
779
+ gap: 8px;
780
  color: var(--pruna-text-primary);
781
+ font-size: 1.15rem;
782
  font-weight: 700;
783
  line-height: 1.3;
784
+ margin: 0 0 6px;
785
+ }
786
+ .benchmark-card-emoji {
787
+ display: inline-flex;
788
+ align-items: center;
789
+ justify-content: center;
790
+ flex-shrink: 0;
791
+ line-height: 1;
792
  }
793
  .benchmark-card-blurb {
794
  margin: 0;
795
  color: var(--pruna-text-body);
796
+ font-size: 0.9rem;
797
  line-height: 1.45;
798
  }
799
  .benchmark-card-col .benchmark-open-btn,
800
+ .benchmark-card-col button,
801
+ .benchmark-card-col button.sm,
802
+ .benchmark-card-col button.primary {
803
+ display: flex !important;
804
+ justify-content: center !important;
805
+ align-items: center !important;
806
  width: 100% !important;
807
+ min-width: 0 !important;
808
+ margin: 0 !important;
809
  align-self: stretch !important;
810
+ flex: 0 0 auto !important;
811
  }
812
  .home-callouts > div,
813
  .compare-prompt-block {
 
984
  max-width: none !important;
985
  overflow: visible !important;
986
  }
987
+ .home-snapshots-grid {
988
+ display: grid;
989
+ grid-template-columns: repeat(2, minmax(0, 1fr));
990
+ gap: 20px 32px;
991
+ width: 100%;
992
+ margin: 4px 0 8px;
993
+ align-items: stretch;
 
 
 
 
 
994
  }
995
+ .home-snap-card {
996
+ display: flex;
997
+ flex-direction: column;
998
+ min-width: 0;
999
+ height: 100%;
1000
  }
1001
+ .home-snap-card .home-snap-blurb {
1002
+ margin-top: 6px !important;
 
 
 
 
 
1003
  }
1004
+ .home-snap-card .home-snap-top {
1005
+ margin-top: auto;
1006
  }
1007
  .home-snap-title,
1008
  .prose .home-snap-title {
 
1052
  .home-top-list li,
1053
  .prose .home-top-list li {
1054
  display: grid;
1055
+ grid-template-columns: 28px minmax(0, 1fr) 4.75rem;
1056
  gap: 10px;
1057
  align-items: center;
1058
  padding: 8px 0;
 
1060
  color: var(--pruna-text-primary) !important;
1061
  }
1062
  @media (max-width: 700px) {
1063
+ .home-snapshots-grid {
1064
+ grid-template-columns: 1fr;
1065
+ gap: 22px;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1066
  }
1067
  }
1068
  .home-rank,
 
1090
  font-variant-numeric: tabular-nums;
1091
  color: var(--pruna-score) !important;
1092
  font-weight: 600;
1093
+ text-align: right;
1094
  }
1095
  .home-empty,
1096
  .prose .home-empty {
 
1108
  .pareto-plot .modebar { display: none !important; }
1109
 
1110
  .leaderboard-controls {
1111
+ display: flex !important;
1112
+ flex-wrap: wrap !important;
1113
  align-items: end !important;
1114
  gap: 10px !important;
1115
  margin-bottom: 12px;
1116
  }
1117
+ .leaderboard-controls > div {
1118
+ min-width: 0 !important;
1119
+ }
1120
  .leaderboard-controls > .block,
1121
  .leaderboard-controls .form,
1122
  .leaderboard-controls .block {
 
1185
  .ranking-table-host.block,
1186
  .ranking-table-host .padded,
1187
  .ranking-table-host.prose {
1188
+ display: grid !important;
1189
+ grid-template-columns: minmax(0, 1fr) !important;
1190
  border: none !important;
1191
  outline: none !important;
1192
  background: transparent !important;
 
1194
  padding: 0 !important;
1195
  margin: 0 !important;
1196
  width: 100% !important;
1197
+ max-width: 100% !important;
1198
+ min-width: 0 !important;
1199
+ overflow: hidden !important;
1200
  --block-border-width: 0 !important;
1201
  }
1202
  .ranking-table-scroll {
 
1204
  border-radius: 12px;
1205
  background: var(--pruna-menu-bg);
1206
  box-shadow: none;
1207
+ width: 100%;
1208
+ max-width: 100%;
1209
+ min-width: 0;
1210
  max-height: min(70vh, 720px);
1211
+ overflow-x: auto;
1212
+ overflow-y: auto;
1213
  -webkit-overflow-scrolling: touch;
1214
+ overscroll-behavior-x: contain;
1215
  }
1216
  .ranking-table,
1217
  .prose .ranking-table {
 
1363
  }
1364
 
1365
  .compare-samples-help { color: var(--pruna-text-body); margin-bottom: 8px; }
1366
+ .compare-controls,
1367
+ .compare-controls.row,
1368
+ .compare-controls.column,
1369
+ .compare-controls .form {
1370
+ display: flex !important;
1371
+ flex-direction: column !important;
1372
+ flex-wrap: nowrap !important;
1373
+ align-items: stretch !important;
1374
+ align-content: flex-start !important;
1375
+ justify-content: flex-start !important;
1376
  gap: 12px !important;
1377
+ width: 100% !important;
1378
+ max-width: 100% !important;
1379
+ flex-grow: 0 !important;
1380
+ height: auto !important;
1381
+ min-height: 0 !important;
1382
  margin-bottom: 16px;
1383
  }
1384
  .compare-controls > .block,
 
1391
  box-shadow: none !important;
1392
  padding: 0 !important;
1393
  --block-border-width: 0 !important;
1394
+ height: auto !important;
1395
+ min-height: 0 !important;
1396
  }
1397
  .compare-controls label,
1398
  .compare-controls span[data-testid="block-info"] {
 
1408
  min-height: 1.15rem;
1409
  }
1410
  .compare-controls .compare-models {
1411
+ flex: 0 0 auto !important;
1412
+ width: 100% !important;
1413
+ min-width: 0 !important;
1414
+ max-width: 100% !important;
1415
+ align-self: stretch !important;
1416
  }
1417
  .compare-controls .compare-prompt-count {
1418
+ flex: 0 0 auto !important;
1419
+ width: 100% !important;
1420
+ min-width: 0 !important;
1421
+ max-width: 100% !important;
1422
+ align-self: stretch !important;
1423
  }
1424
+ .compare-controls .compare-shuffle {
1425
+ flex: 0 0 auto !important;
1426
+ width: 100% !important;
1427
+ max-width: 100% !important;
1428
+ align-self: stretch !important;
1429
+ }
1430
+ .compare-controls .compare-models .wrap,
1431
+ .compare-controls .compare-models .wrap-inner {
1432
  min-height: 40px !important;
1433
+ height: auto !important;
1434
+ overflow: hidden !important;
1435
  border: 1px solid var(--pruna-input-border) !important;
1436
  border-radius: 10px !important;
1437
  background: var(--pruna-input-bg) !important;
1438
  box-shadow: none !important;
1439
  }
1440
+ .compare-controls .compare-models .wrap-inner {
1441
+ display: flex !important;
1442
+ flex-direction: row !important;
1443
+ flex-wrap: wrap !important;
1444
+ align-items: center !important;
1445
+ gap: 6px !important;
1446
+ width: 100% !important;
1447
+ padding: 4px 8px !important;
1448
+ }
1449
+ .compare-controls .compare-models .secondary-wrap {
1450
+ display: flex !important;
1451
+ flex-direction: row !important;
1452
+ flex-wrap: wrap !important;
1453
+ align-items: center !important;
1454
+ gap: 6px !important;
1455
+ flex: 1 1 auto !important;
1456
+ width: auto !important;
1457
+ min-width: 0 !important;
1458
+ height: auto !important;
1459
+ margin: 0 !important;
1460
+ padding: 0 !important;
1461
+ border: none !important;
1462
+ background: transparent !important;
1463
+ box-shadow: none !important;
1464
+ }
1465
+ .compare-controls .compare-models .token {
1466
+ display: inline-flex !important;
1467
+ align-items: center !important;
1468
+ justify-content: center !important;
1469
+ width: auto !important;
1470
+ max-width: 100% !important;
1471
+ margin: 0 !important;
1472
+ white-space: nowrap !important;
1473
+ }
1474
+ .compare-controls .compare-models .token:empty {
1475
+ display: none !important;
1476
+ }
1477
+ .compare-controls .compare-models input {
1478
+ width: auto !important;
1479
+ min-width: 2.5rem !important;
1480
+ flex: 1 1 5rem !important;
1481
+ height: 28px !important;
1482
+ min-height: 28px !important;
1483
+ }
1484
+ .compare-controls .compare-models .dropdown-arrow,
1485
+ .compare-controls .compare-models .icon-wrap {
1486
+ flex: 0 0 auto !important;
1487
+ align-self: center !important;
1488
+ margin-left: auto !important;
1489
+ }
1490
  .compare-controls .compare-prompt-count .wrap {
1491
  display: grid !important;
1492
  grid-template-columns: minmax(0, 1fr) auto;
 
1553
  background: transparent !important;
1554
  box-shadow: none !important;
1555
  }
1556
+ .compare-controls .compare-shuffle.block:not(button) {
1557
+ width: 100% !important;
1558
+ max-width: 100% !important;
1559
+ align-self: stretch !important;
1560
+ background: transparent !important;
1561
+ border: none !important;
1562
+ box-shadow: none !important;
1563
+ padding: 0 !important;
1564
+ }
1565
+ .compare-controls button.compare-shuffle,
1566
+ .compare-controls .compare-shuffle button,
1567
+ .compare-controls .compare-shuffle button.primary,
1568
+ .compare-controls .compare-shuffle button.secondary {
1569
+ display: inline-flex !important;
1570
+ justify-content: center !important;
1571
+ align-items: center !important;
1572
+ width: 100% !important;
1573
+ min-width: 0 !important;
1574
+ height: 44px !important;
1575
+ min-height: 44px !important;
1576
  margin: 0 !important;
1577
+ padding: 0 16px !important;
1578
  border-radius: 10px !important;
1579
+ align-self: stretch !important;
1580
+ appearance: none !important;
1581
+ -webkit-appearance: none !important;
1582
+ -webkit-tap-highlight-color: transparent !important;
1583
+ background: var(--pruna-accent) !important;
1584
+ border: 1px solid color-mix(in oklab, var(--pruna-accent) 72%, transparent) !important;
1585
+ color: #fff !important;
1586
+ font-family: var(--pruna-font) !important;
1587
+ font-size: 0.95rem !important;
1588
+ font-weight: 600 !important;
1589
+ letter-spacing: -0.01em !important;
1590
+ box-shadow: inset 0 1px #fff3 !important;
1591
+ outline: none !important;
1592
+ }
1593
+ .compare-controls button.compare-shuffle:hover,
1594
+ .compare-controls button.compare-shuffle:active,
1595
+ .compare-controls button.compare-shuffle:focus,
1596
+ .compare-controls button.compare-shuffle:focus-visible,
1597
+ .compare-controls .compare-shuffle button:hover,
1598
+ .compare-controls .compare-shuffle button:active,
1599
+ .compare-controls .compare-shuffle button:focus,
1600
+ .compare-controls .compare-shuffle button:focus-visible {
1601
+ background: var(--pruna-accent) !important;
1602
+ border-color: color-mix(in oklab, var(--pruna-accent) 72%, transparent) !important;
1603
+ color: #fff !important;
1604
+ outline: none !important;
1605
+ box-shadow: inset 0 1px #fff3 !important;
1606
+ -webkit-tap-highlight-color: transparent !important;
1607
+ }
1608
+ @media (min-width: 701px) {
1609
+ .compare-controls,
1610
+ .compare-controls.row,
1611
+ .compare-controls.column,
1612
+ .compare-controls .form {
1613
+ flex-direction: row !important;
1614
+ flex-wrap: nowrap !important;
1615
+ align-items: flex-end !important;
1616
+ }
1617
+ .compare-controls .compare-models {
1618
+ flex: 4 1 0 !important;
1619
+ width: auto !important;
1620
+ max-width: none !important;
1621
+ align-self: flex-end !important;
1622
+ }
1623
+ .compare-controls .compare-prompt-count {
1624
+ flex: 1 1 200px !important;
1625
+ width: auto !important;
1626
+ min-width: 180px !important;
1627
+ max-width: 280px !important;
1628
+ align-self: flex-end !important;
1629
+ }
1630
+ .compare-controls .compare-shuffle,
1631
+ .compare-controls .compare-shuffle.block:not(button) {
1632
+ flex: 0 0 auto !important;
1633
+ width: auto !important;
1634
+ max-width: none !important;
1635
+ align-self: flex-end !important;
1636
+ }
1637
+ .compare-controls button.compare-shuffle,
1638
+ .compare-controls .compare-shuffle button {
1639
+ width: auto !important;
1640
+ min-width: 10.5rem !important;
1641
+ }
1642
  }
1643
  .compare-prompt-block {
1644
  margin: 0 0 22px;
 
1662
  font-size: 15px;
1663
  line-height: 1.45;
1664
  }
1665
+ .compare-gallery,
1666
+ .compare-gallery.block,
1667
+ .compare-gallery .html-container,
1668
+ .compare-gallery .prose {
1669
+ width: 100% !important;
1670
+ max-width: 100% !important;
1671
+ min-width: 0 !important;
1672
+ overflow-x: hidden !important;
1673
+ }
1674
+ .compare-row { display: grid; gap: 12px; min-width: 0; width: 100%; }
1675
+ .compare-prompt-text { overflow-wrap: anywhere; }
1676
+ .pareto-layout,
1677
+ .pareto-layout.row,
1678
+ .pareto-layout .form {
1679
+ display: flex !important;
1680
+ flex-wrap: wrap !important;
1681
+ align-items: flex-start !important;
1682
+ gap: 16px !important;
1683
+ width: 100% !important;
1684
+ max-width: 100% !important;
1685
+ }
1686
+ .pareto-layout > .pareto-col,
1687
+ .pareto-layout .form > .pareto-col {
1688
+ flex: 1 1 320px !important;
1689
+ min-width: 280px !important;
1690
+ max-width: 100% !important;
1691
+ }
1692
+ .pareto-plot,
1693
+ .pareto-plot.block,
1694
+ .pareto-plot .plotly,
1695
+ .pareto-plot .js-plotly-plot,
1696
+ .pareto-plot .plot-container,
1697
+ .pareto-plot .svg-container,
1698
+ .pareto-plot .main-svg {
1699
+ width: 100% !important;
1700
+ max-width: 100% !important;
1701
+ }
1702
  .compare-cell { min-width: 0; }
1703
  .compare-model-label {
1704
  margin-bottom: 6px;
 
1810
  text-transform: none !important;
1811
  }
1812
 
1813
+ .markdown, .md, .prose,
1814
+ .gradio-container .markdown,
1815
+ .gradio-container .prose {
1816
+ overflow-wrap: break-word;
1817
+ max-width: 100%;
1818
+ }
1819
  .markdown p, .md p, .prose p,
1820
  .gradio-container .markdown p {
1821
  margin: 0 0 0.8rem !important;
 
1862
  /* Card / list titles sit under section headings */
1863
  .home-snap-title,
1864
  .benchmark-card-title {
1865
+ display: flex !important;
1866
+ align-items: center !important;
1867
+ gap: 8px !important;
1868
  margin: 0 0 6px !important;
1869
  font-size: 0.95rem !important;
1870
  font-weight: 600 !important;
 
1906
  a { color: var(--pruna-link); }
1907
 
1908
  /* Gradio form chrome → playground */
1909
+ button.primary, .gr-button-primary, .primary-button,
1910
+ button.primary:hover, button.primary:active, button.primary:focus,
1911
+ .gr-button-primary:hover, .gr-button-primary:active {
1912
  background: var(--pruna-accent) !important;
1913
  border: 1px solid color-mix(in oklab, var(--pruna-accent) 72%, transparent) !important;
1914
  color: #fff !important;
1915
  border-radius: 8px !important;
1916
  box-shadow: inset 0 1px #fff3 !important;
1917
  font-weight: 600 !important;
1918
+ outline: none !important;
1919
+ -webkit-tap-highlight-color: transparent !important;
1920
+ }
1921
+ button.secondary:active, button.secondary:focus,
1922
+ .gr-button-secondary:active {
1923
+ outline: none !important;
1924
+ -webkit-tap-highlight-color: transparent !important;
1925
  }
1926
  .block, .gr-group, .form, .panel {
1927
  border-color: var(--pruna-border) !important;
ui.py CHANGED
@@ -251,9 +251,7 @@ def render_home(benchmarks):
251
  )
252
 
253
  gr.Markdown("## Benchmark snapshots", elem_classes="home-section-title")
254
- title_cells = []
255
- blurb_cells = []
256
- top_cells = []
257
  for benchmark in benchmarks:
258
  data = benchmark["data"]
259
  score_column = benchmark.get("overall_column")
@@ -268,31 +266,21 @@ def render_home(benchmarks):
268
  f"<span class='home-score'>{_format_score(score)}</span></li>"
269
  for idx, (model, score) in enumerate(top, start=1)
270
  ) or "<li class='home-empty'>No scores yet.</li>"
271
- title_cells.append(
272
- "<td class='home-snap-cell'>"
273
  "<div class='home-snap-title'>"
274
  f"<span class='home-snap-emoji' aria-hidden='true'>{escape(benchmark.get('emoji', '📊'))}</span>"
275
  f"<span>{escape(benchmark['title'])}</span>"
276
- "</div></td>"
277
- )
278
- blurb_cells.append(
279
- "<td class='home-snap-cell'>"
280
  f"<p class='home-snap-blurb'>{escape(benchmark.get('card_description', ''))}</p>"
281
- "</td>"
282
- )
283
- top_cells.append(
284
- "<td class='home-snap-cell'>"
285
  "<div class='home-snap-top'>"
286
  f"<div class='home-top-label'>Top 3 by {escape(score_label)}</div>"
287
  f"<ol class='home-top-list'>{rows_html}</ol>"
288
- "</div></td>"
 
289
  )
290
  gr.HTML(
291
- "<table class='home-snapshots-table' role='presentation'>"
292
- f"<tr>{''.join(title_cells)}</tr>"
293
- f"<tr>{''.join(blurb_cells)}</tr>"
294
- f"<tr>{''.join(top_cells)}</tr>"
295
- "</table>",
296
  padding=False,
297
  elem_classes="home-snapshots-host",
298
  )
@@ -642,7 +630,7 @@ def render_benchmark_detail(benchmark):
642
  container=False,
643
  elem_classes="benchmark-view-menu",
644
  )
645
- with gr.Column(visible=True) as leaderboard_view:
646
  render_leaderboard(
647
  benchmark["data"],
648
  benchmark["columns"],
@@ -650,9 +638,9 @@ def render_benchmark_detail(benchmark):
650
  score_columns=benchmark.get("score_columns"),
651
  overall_column=benchmark.get("overall_column"),
652
  )
653
- with gr.Column(visible=False) as graphs_view:
654
  render_benchmark_graphs(benchmark)
655
- with gr.Column(visible=False) as compare_view:
656
  render_compare_samples(benchmark)
657
 
658
  def switch_view(choice):
@@ -694,7 +682,7 @@ def render_compare_samples(benchmark):
694
  </p>
695
  """
696
  )
697
- with gr.Row(elem_classes="compare-controls"):
698
  model_picker = gr.Dropdown(
699
  choices=models,
700
  value=default_models,
@@ -703,7 +691,7 @@ def render_compare_samples(benchmark):
703
  label="Models",
704
  container=False,
705
  scale=4,
706
- min_width=280,
707
  elem_classes="compare-models",
708
  )
709
  prompt_count = gr.Slider(
@@ -720,7 +708,8 @@ def render_compare_samples(benchmark):
720
  )
721
  shuffle_button = gr.Button(
722
  "Shuffle prompts",
723
- scale=1,
 
724
  min_width=140,
725
  elem_classes="compare-shuffle",
726
  )
@@ -731,7 +720,8 @@ def render_compare_samples(benchmark):
731
  default_models,
732
  DEFAULT_COMPARE_PROMPTS,
733
  seed=0,
734
- )
 
735
  )
736
  seed_state = gr.State(0)
737
 
@@ -854,41 +844,41 @@ def render_benchmarks(benchmarks):
854
  and **Compare samples**.
855
  """
856
  )
857
- card_rows = [benchmarks[i : i + 2] for i in range(0, len(benchmarks), 2)]
858
- for row in card_rows:
859
- with gr.Row(equal_height=True, elem_classes="benchmark-catalogue-row"):
860
- for benchmark in row:
861
- with gr.Column(
862
- scale=1,
863
- min_width=280,
864
- elem_classes="benchmark-card-col",
865
- ):
866
- gr.HTML(
867
- f"""
868
- <div class="benchmark-card-body">
869
- <div class="benchmark-card-title">
870
- {escape(benchmark.get("emoji", "📊"))}
871
- {escape(benchmark["title"])}
872
- </div>
873
- <p class="benchmark-card-blurb">
874
- {escape(benchmark.get("card_description", ""))}
875
- </p>
876
- </div>
877
- """
878
- )
879
- open_buttons.append(
880
- (
881
- benchmark["id"],
882
- gr.Button(
883
- "View benchmark →",
884
- variant="primary",
885
- elem_classes="benchmark-open-btn",
886
- ),
887
- )
888
  )
 
889
 
890
  for benchmark in benchmarks:
891
- with gr.Column(visible=False) as detail:
892
  back_button = gr.Button(
893
  "← All benchmarks",
894
  elem_classes="benchmark-back-btn",
@@ -1129,8 +1119,8 @@ def render_benchmark_graphs(benchmark):
1129
  "</span><br/>"
1130
  "<strong class='pareto-help-emphasis'>Hover a point to see which model it is.</strong>"
1131
  )
1132
- with gr.Row(equal_height=False):
1133
- with gr.Column(scale=1, min_width=320):
1134
  gr.Markdown("#### Price vs score")
1135
  if not price_figures:
1136
  gr.Markdown("_No price data available._")
@@ -1141,7 +1131,7 @@ def render_benchmark_graphs(benchmark):
1141
  show_label=False,
1142
  elem_classes="pareto-plot",
1143
  )
1144
- with gr.Column(scale=1, min_width=320):
1145
  gr.Markdown("#### Min generation time vs score")
1146
  if not time_figures:
1147
  gr.Markdown("_No min generation time data available._")
@@ -1155,11 +1145,11 @@ def render_benchmark_graphs(benchmark):
1155
 
1156
 
1157
  def render_about():
1158
- with gr.Row():
1159
- with gr.Column():
1160
- gr.Markdown(ABOUT_OVERVIEW_CONTENT)
1161
- with gr.Column():
1162
- gr.Markdown(ABOUT_DETAILS_CONTENT)
1163
 
1164
 
1165
  def render_footer():
 
251
  )
252
 
253
  gr.Markdown("## Benchmark snapshots", elem_classes="home-section-title")
254
+ cards = []
 
 
255
  for benchmark in benchmarks:
256
  data = benchmark["data"]
257
  score_column = benchmark.get("overall_column")
 
266
  f"<span class='home-score'>{_format_score(score)}</span></li>"
267
  for idx, (model, score) in enumerate(top, start=1)
268
  ) or "<li class='home-empty'>No scores yet.</li>"
269
+ cards.append(
270
+ "<article class='home-snap-card'>"
271
  "<div class='home-snap-title'>"
272
  f"<span class='home-snap-emoji' aria-hidden='true'>{escape(benchmark.get('emoji', '📊'))}</span>"
273
  f"<span>{escape(benchmark['title'])}</span>"
274
+ "</div>"
 
 
 
275
  f"<p class='home-snap-blurb'>{escape(benchmark.get('card_description', ''))}</p>"
 
 
 
 
276
  "<div class='home-snap-top'>"
277
  f"<div class='home-top-label'>Top 3 by {escape(score_label)}</div>"
278
  f"<ol class='home-top-list'>{rows_html}</ol>"
279
+ "</div>"
280
+ "</article>"
281
  )
282
  gr.HTML(
283
+ f"<div class='home-snapshots-grid'>{''.join(cards)}</div>",
 
 
 
 
284
  padding=False,
285
  elem_classes="home-snapshots-host",
286
  )
 
630
  container=False,
631
  elem_classes="benchmark-view-menu",
632
  )
633
+ with gr.Column(visible=True, min_width=0, elem_classes="benchmark-panel") as leaderboard_view:
634
  render_leaderboard(
635
  benchmark["data"],
636
  benchmark["columns"],
 
638
  score_columns=benchmark.get("score_columns"),
639
  overall_column=benchmark.get("overall_column"),
640
  )
641
+ with gr.Column(visible=False, min_width=0, elem_classes="benchmark-panel") as graphs_view:
642
  render_benchmark_graphs(benchmark)
643
+ with gr.Column(visible=False, min_width=0, elem_classes="benchmark-panel") as compare_view:
644
  render_compare_samples(benchmark)
645
 
646
  def switch_view(choice):
 
682
  </p>
683
  """
684
  )
685
+ with gr.Row(equal_height=False, elem_classes="compare-controls"):
686
  model_picker = gr.Dropdown(
687
  choices=models,
688
  value=default_models,
 
691
  label="Models",
692
  container=False,
693
  scale=4,
694
+ min_width=220,
695
  elem_classes="compare-models",
696
  )
697
  prompt_count = gr.Slider(
 
708
  )
709
  shuffle_button = gr.Button(
710
  "Shuffle prompts",
711
+ variant="primary",
712
+ scale=0,
713
  min_width=140,
714
  elem_classes="compare-shuffle",
715
  )
 
720
  default_models,
721
  DEFAULT_COMPARE_PROMPTS,
722
  seed=0,
723
+ ),
724
+ elem_classes="compare-gallery",
725
  )
726
  seed_state = gr.State(0)
727
 
 
844
  and **Compare samples**.
845
  """
846
  )
847
+ with gr.Row(equal_height=True, elem_classes="benchmark-catalogue-row"):
848
+ for benchmark in benchmarks:
849
+ with gr.Column(
850
+ scale=1,
851
+ min_width=280,
852
+ elem_classes="benchmark-card-col",
853
+ ):
854
+ gr.HTML(
855
+ f"""
856
+ <div class="benchmark-card-body">
857
+ <div class="benchmark-card-title">
858
+ <span class="benchmark-card-emoji" aria-hidden="true">{escape(benchmark.get("emoji", "📊"))}</span>
859
+ <span>{escape(benchmark["title"])}</span>
860
+ </div>
861
+ <p class="benchmark-card-blurb">
862
+ {escape(benchmark.get("card_description", ""))}
863
+ </p>
864
+ </div>
865
+ """,
866
+ padding=False,
867
+ )
868
+ open_buttons.append(
869
+ (
870
+ benchmark["id"],
871
+ gr.Button(
872
+ "View benchmark →",
873
+ variant="primary",
874
+ size="sm",
875
+ elem_classes="benchmark-open-btn",
876
+ ),
 
877
  )
878
+ )
879
 
880
  for benchmark in benchmarks:
881
+ with gr.Column(visible=False, min_width=0, elem_classes="benchmark-detail") as detail:
882
  back_button = gr.Button(
883
  "← All benchmarks",
884
  elem_classes="benchmark-back-btn",
 
1119
  "</span><br/>"
1120
  "<strong class='pareto-help-emphasis'>Hover a point to see which model it is.</strong>"
1121
  )
1122
+ with gr.Row(equal_height=False, elem_classes="pareto-layout"):
1123
+ with gr.Column(scale=1, min_width=320, elem_classes="pareto-col"):
1124
  gr.Markdown("#### Price vs score")
1125
  if not price_figures:
1126
  gr.Markdown("_No price data available._")
 
1131
  show_label=False,
1132
  elem_classes="pareto-plot",
1133
  )
1134
+ with gr.Column(scale=1, min_width=320, elem_classes="pareto-col"):
1135
  gr.Markdown("#### Min generation time vs score")
1136
  if not time_figures:
1137
  gr.Markdown("_No min generation time data available._")
 
1145
 
1146
 
1147
  def render_about():
1148
+ with gr.Row(elem_classes="about-layout", equal_height=False):
1149
+ with gr.Column(scale=1, min_width=340, elem_classes="about-col"):
1150
+ gr.Markdown(ABOUT_OVERVIEW_CONTENT, elem_classes="about-copy")
1151
+ with gr.Column(scale=1, min_width=340, elem_classes="about-col"):
1152
+ gr.Markdown(ABOUT_DETAILS_CONTENT, elem_classes="about-copy")
1153
 
1154
 
1155
  def render_footer():