File size: 188,818 Bytes
c86db6e
 
 
 
 
7a35fe9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
c86db6e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>ALL Bench Leaderboard 2026 — AI Model Benchmark: LLM · VLM · Agent · Image · Video · Music</title>
<meta name="description" content="The only AI leaderboard comparing 91 models across 6 modalities. Cross-verified scores for GPT-5, Claude, Gemini, Grok, DeepSeek, Kimi, Qwen and more. 42 LLMs, 11 VLMs, 10 Agents, 28 generative models with confidence badges.">
<meta name="keywords" content="AI benchmark, LLM leaderboard, GPT-5, Claude Opus, Gemini 3, VLM benchmark, AI agent, MMLU-Pro, GPQA, ARC-AGI-2, FINAL Bench, metacognition, AI model comparison, image generation, video generation, music generation, 2026">
<meta name="author" content="ALL Bench Team">
<meta name="robots" content="index, follow, max-snippet:-1, max-image-preview:large">
<link rel="canonical" href="https://huggingface.co/spaces/FINAL-Bench/all-bench-leaderboard">

<!-- Open Graph -->
<meta property="og:title" content="ALL Bench Leaderboard 2026 — Unified AI Benchmark">
<meta property="og:description" content="91 AI models across LLM · VLM · Agent · Image · Video · Music. Cross-verified with confidence badges. Interactive tools, free API, intelligence reports.">
<meta property="og:type" content="website">
<meta property="og:url" content="https://huggingface.co/spaces/FINAL-Bench/all-bench-leaderboard">

<!-- Twitter Card -->
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="ALL Bench Leaderboard 2026 — 91 AI Models Compared">
<meta name="twitter:description" content="The only leaderboard covering LLM, VLM, Agent, Image, Video, Music. GPT-5 vs Claude vs Gemini — all cross-verified.">

<!-- JSON-LD Structured Data -->
<script type="application/ld+json">
{"@context":"https://schema.org","@type":"Dataset","name":"ALL Bench Leaderboard 2026","description":"Unified multi-modal AI benchmark covering 91 models across LLM, VLM, Agent, Image, Video, Music with cross-verified confidence system","url":"https://huggingface.co/spaces/FINAL-Bench/all-bench-leaderboard","license":"https://opensource.org/licenses/MIT","version":"2.1","dateModified":"2026-03-08","creator":{"@type":"Organization","name":"ALL Bench Team"},"keywords":["AI benchmark","LLM leaderboard","GPT-5","Claude","Gemini","VLM","FINAL Bench","metacognition","multimodal AI"],"distribution":[{"@type":"DataDownload","encodingFormat":"application/json","contentUrl":"https://huggingface.co/datasets/FINAL-Bench/ALL-Bench-Leaderboard/resolve/main/all_bench_leaderboard_v2.1.json"}]}
</script>
<link href="https://fonts.googleapis.com/css2?family=Sora:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700&display=swap" rel="stylesheet">
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/4.4.1/chart.umd.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/2.5.2/jspdf.umd.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/html2canvas/1.4.1/html2canvas.min.js"></script>
<style>
*{margin:0;padding:0;box-sizing:border-box;}
:root{
  --bg:#f8f9fc;--bg2:#f0f2f8;--surface:#ffffff;--surface-alt:#f5f6fa;
  --border:#e2e5f0;--border-hover:#c7cce0;
  --shadow-sm:0 1px 3px rgba(15,23,42,.04),0 1px 2px rgba(15,23,42,.06);
  --shadow:0 4px 16px rgba(15,23,42,.06),0 1px 3px rgba(15,23,42,.08);
  --shadow-lg:0 12px 40px rgba(15,23,42,.08),0 4px 12px rgba(15,23,42,.06);
  --text:#0f172a;--text-sec:#475569;--text-muted:#94a3b8;
  --ac:#6366f1;--ac2:#4f46e5;--ac-bg:rgba(99,102,241,.06);
  --teal:#0d9488;--amber:#d97706;--green:#16a34a;--rose:#e11d48;
  --radius:16px;--radius-sm:10px;--radius-xs:6px;
  --font:'Sora',sans-serif;--font-mono:'JetBrains Mono',monospace;
  --tr:0.22s cubic-bezier(0.4,0,0.2,1);
}
html{scroll-behavior:smooth;}
body{font-family:var(--font);background:var(--bg);color:var(--text);min-height:100vh;-webkit-font-smoothing:antialiased;font-size:13px;}
::-webkit-scrollbar{width:5px;height:4px;}
::-webkit-scrollbar-track{background:transparent;}
::-webkit-scrollbar-thumb{background:rgba(99,102,241,.2);border-radius:10px;}
::-webkit-scrollbar-thumb:hover{background:rgba(99,102,241,.4);}
::selection{background:rgba(99,102,241,.12);}
body::before{content:"";position:fixed;inset:0;z-index:0;pointer-events:none;
  background:radial-gradient(ellipse 70% 45% at 15% 8%,rgba(99,102,241,.05),transparent 55%),
  radial-gradient(ellipse 55% 35% at 85% 92%,rgba(13,148,136,.04),transparent 50%);}
.wrap{position:relative;z-index:1;max-width:100%;margin:0 auto;padding:22px 12px 70px;}

/* HEADER */
header{text-align:center;margin-bottom:20px;animation:fadeIn .6s ease-out;}
@keyframes fadeIn{from{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:translateY(0)}}
.badge-row{display:flex;align-items:center;justify-content:center;gap:8px;margin-bottom:10px;}
.badge{display:inline-flex;align-items:center;gap:6px;background:var(--surface);border:1px solid var(--border);border-radius:100px;padding:4px 14px;font-family:var(--font-mono);font-size:9px;font-weight:600;letter-spacing:2px;text-transform:uppercase;color:var(--ac);box-shadow:var(--shadow-sm);}
.pulse{width:5px;height:5px;border-radius:50%;background:var(--ac);animation:p 2s infinite;}
@keyframes p{0%,100%{opacity:1;transform:scale(1)}50%{opacity:.4;transform:scale(.8)}}
h1{font-size:clamp(18px,2.8vw,34px);font-weight:800;line-height:1.1;letter-spacing:-1.5px;margin-bottom:6px;
  background:linear-gradient(135deg,#1e1b4b 15%,#6366f1 50%,#0d9488 85%);background-size:200%;
  -webkit-background-clip:text;-webkit-text-fill-color:transparent;animation:shimmer 6s ease-in-out infinite;}
@keyframes shimmer{0%,100%{background-position:0%}50%{background-position:100%}}
.sub{color:var(--text-muted);font-size:10px;line-height:1.8;}
.sub b{color:var(--text-sec);font-weight:600;-webkit-text-fill-color:var(--text-sec);}

/* STATS */
.stats{display:flex;flex-wrap:wrap;gap:7px;justify-content:center;margin-bottom:16px;}
.st{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-sm);padding:8px 14px;text-align:center;min-width:80px;box-shadow:var(--shadow-sm);transition:var(--tr);}
.st:hover{box-shadow:var(--shadow);border-color:var(--border-hover);}
.stn{font-family:var(--font-mono);font-size:15px;font-weight:700;color:var(--ac);}
.stl{font-size:8.5px;color:var(--text-muted);margin-top:2px;text-transform:uppercase;letter-spacing:.5px;}

/* TABS */
.tab-bar{display:flex;gap:0;border-bottom:1px solid var(--border);background:var(--surface);border-radius:var(--radius-sm) var(--radius-sm) 0 0;overflow:hidden;box-shadow:var(--shadow-sm);}
.tab{padding:10px 20px;font-size:10.5px;font-family:var(--font-mono);font-weight:600;color:var(--text-muted);cursor:pointer;border-bottom:2px solid transparent;transition:var(--tr);user-select:none;white-space:nowrap;letter-spacing:.3px;}
.tab:hover{color:var(--text);background:var(--ac-bg);}
.tab.on{color:var(--ac);border-bottom-color:var(--ac);background:var(--ac-bg);}
.tpane{display:none;padding-top:12px;}
.tpane.on{display:block;}

/* TOOLBAR */
.toolbar{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:10px;align-items:center;}
.search-wrap{position:relative;flex:1;min-width:160px;max-width:240px;}
.search-wrap input{width:100%;padding:5px 8px 5px 28px;border:1px solid var(--border);border-radius:20px;background:var(--surface);font-family:var(--font-mono);font-size:10px;color:var(--text);outline:none;transition:var(--tr);}
.search-wrap input:focus{border-color:var(--ac);box-shadow:0 0 0 2px rgba(99,102,241,.1);}
.search-wrap::before{content:"⌕";position:absolute;left:9px;top:50%;transform:translateY(-50%);color:var(--text-muted);font-size:13px;pointer-events:none;}
.flbl{font-size:8.5px;font-family:var(--font-mono);color:var(--text-muted);text-transform:uppercase;letter-spacing:1px;font-weight:600;}
.fb{background:var(--surface);border:1px solid var(--border);color:var(--text-sec);padding:4px 10px;border-radius:20px;font-size:10px;font-weight:500;cursor:pointer;transition:var(--tr);box-shadow:var(--shadow-sm);font-family:var(--font);}
.fb:hover{background:var(--ac-bg);border-color:rgba(99,102,241,.3);color:var(--ac);}
.fb.on{background:linear-gradient(135deg,#6366f1,#4f46e5);border-color:transparent;color:#fff;box-shadow:0 3px 12px rgba(99,102,241,.25);}

/* COLUMN TOGGLE */
.col-toggle-wrap{position:relative;}
.col-toggle-btn{background:var(--surface);border:1px solid var(--border);color:var(--text-sec);padding:4px 10px;border-radius:20px;font-size:10px;font-weight:500;cursor:pointer;transition:var(--tr);box-shadow:var(--shadow-sm);font-family:var(--font);display:flex;align-items:center;gap:4px;}
.col-toggle-btn:hover{background:var(--ac-bg);border-color:rgba(99,102,241,.3);color:var(--ac);}
.col-dropdown{position:absolute;top:calc(100% + 6px);right:0;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-sm);padding:10px;box-shadow:var(--shadow-lg);z-index:100;min-width:200px;display:none;}
.col-dropdown.open{display:grid;grid-template-columns:1fr 1fr;gap:4px;}
.col-chk{display:flex;align-items:center;gap:5px;font-size:9.5px;color:var(--text-sec);cursor:pointer;padding:3px 4px;border-radius:4px;transition:var(--tr);}
.col-chk:hover{background:var(--ac-bg);}
.col-chk input{accent-color:var(--ac);cursor:pointer;}

/* TABLE */
.tw{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);overflow-x:auto;box-shadow:var(--shadow);}
table{width:100%;border-collapse:collapse;font-size:10px;}
thead{background:var(--surface-alt);}
thead tr:last-child{border-bottom:2px solid var(--border);}
th{padding:7px 4px;text-align:center;font-size:7px;font-family:var(--font-mono);text-transform:uppercase;letter-spacing:.3px;color:var(--text-muted);white-space:nowrap;cursor:pointer;user-select:none;vertical-align:bottom;line-height:1.6;font-weight:600;}
th.c-model{text-align:left;padding-left:10px;min-width:160px;position:sticky;left:0;background:var(--surface-alt);z-index:2;}
th:hover,th.on{color:var(--ac);}
.sa{opacity:.5;font-size:6px;margin-left:2px;}
th a{color:inherit;text-decoration:none;}
th a:hover{color:var(--ac);text-decoration:underline;}
tbody tr{border-bottom:1px solid var(--border);transition:background var(--tr);}
tbody tr:last-child{border-bottom:none;}
tbody tr:hover{background:rgba(99,102,241,.022);}
tbody tr.hl{background:rgba(22,163,74,.025);}
tbody tr.hl:hover{background:rgba(22,163,74,.05);}
tbody tr.hidden{display:none;}
td{padding:6px 4px;text-align:center;vertical-align:middle;}
td.c-model{text-align:left;padding-left:10px;position:sticky;left:0;background:var(--surface);z-index:1;}
tbody tr.hl td.c-model{background:rgba(22,163,74,.025);}
tbody tr:hover td.c-model{background:rgba(99,102,241,.022);}

/* GROUP COLORS */
.gA{color:#b45309!important;font-weight:700;}
.gB{color:#4f46e5!important;}
.gC{color:#0891b2!important;}
.gF{color:#7c3aed!important;}
.gT{color:#d97706!important;}
.gM{color:#0891b2!important;}
.gN{color:#db2777!important;}
.gP{color:#64748b!important;}

/* MODEL CELL */
.mc{display:flex;flex-direction:column;gap:1px;}
.mn{font-weight:700;font-size:11px;color:var(--text);display:flex;align-items:center;gap:4px;flex-wrap:wrap;white-space:nowrap;}
.mn a{color:inherit;text-decoration:none;}
.mn a:hover{color:var(--ac);text-decoration:underline;}
.link-icon{font-size:8px;opacity:.5;transition:var(--tr);}
.mn:hover .link-icon{opacity:1;color:var(--ac);}
.ms{display:flex;gap:3px;align-items:center;margin-top:1px;}
.dot{width:5px;height:5px;border-radius:50%;flex-shrink:0;}
.mp{font-size:7.5px;color:var(--text-muted);font-family:var(--font-mono);}

/* BADGES */
.pb{display:inline-block;padding:1.5px 5px;border-radius:4px;font-size:6.5px;font-family:var(--font-mono);font-weight:700;text-transform:uppercase;letter-spacing:.3px;}
.ob{background:rgba(22,163,74,.1);color:#16a34a;border:1px solid rgba(22,163,74,.2);}
.cb{background:rgba(99,102,241,.1);color:#6366f1;border:1px solid rgba(99,102,241,.2);}

/* PROVIDER BADGE */
.prov{display:inline-flex;align-items:center;gap:3px;padding:2px 6px;border-radius:5px;font-size:7.5px;font-family:var(--font-mono);font-weight:700;white-space:nowrap;border:1px solid transparent;}

/* SCORE CELL */
.sc{display:flex;flex-direction:column;align-items:center;gap:2px;}
.sn{font-family:var(--font-mono);font-size:10px;font-weight:700;}
.sb{width:32px;height:2.5px;background:var(--border);border-radius:2px;overflow:hidden;}
.sf{height:100%;border-radius:2px;transition:width .9s cubic-bezier(0.4,0,0.2,1);}
.na{color:var(--text-muted);font-size:8.5px;font-family:var(--font-mono);}

/* COMPOSITE SCORE */
.comp{display:flex;flex-direction:column;align-items:center;gap:2px;}
.compN{font-family:var(--font-mono);font-size:12px;font-weight:700;}
.compB{width:38px;height:2.5px;background:var(--border);border-radius:2px;overflow:hidden;}

/* TOKENS */
.tk{font-family:var(--font-mono);font-size:10px;font-weight:700;}

/* LICENSES */
.lic{font-size:7.5px;font-family:var(--font-mono);padding:1.5px 5px;border-radius:4px;font-weight:700;white-space:nowrap;}
.la{background:rgba(22,163,74,.1);color:#16a34a;border:1px solid rgba(22,163,74,.2);}
.lm{background:rgba(59,130,246,.1);color:#3b82f6;border:1px solid rgba(59,130,246,.2);}
.lp{background:rgba(100,116,139,.1);color:#64748b;border:1px solid rgba(100,116,139,.2);}
.ll{background:rgba(139,92,246,.1);color:#7c3aed;border:1px solid rgba(139,92,246,.2);}

/* ARCH BADGES */
.at{display:flex;flex-direction:column;align-items:center;gap:2px;}
.atb{font-size:7px;font-family:var(--font-mono);padding:1.5px 4px;border-radius:4px;font-weight:700;}
.at-moe{background:rgba(217,119,6,.1);color:#d97706;border:1px solid rgba(217,119,6,.2);}
.at-den{background:rgba(99,102,241,.1);color:#6366f1;border:1px solid rgba(99,102,241,.2);}
.at-hyb{background:rgba(139,92,246,.1);color:#7c3aed;border:1px solid rgba(139,92,246,.2);}

/* VISION BADGES */
.vis{display:flex;flex-wrap:wrap;gap:2px;justify-content:center;}
.vb{font-size:7px;padding:1.5px 4px;border-radius:4px;font-weight:600;white-space:nowrap;}
.vi{background:rgba(22,163,74,.1);color:#16a34a;border:1px solid rgba(22,163,74,.18);}
.vv{background:rgba(59,130,246,.1);color:#3b82f6;border:1px solid rgba(59,130,246,.18);}
.va{background:rgba(219,39,119,.1);color:#db2777;border:1px solid rgba(219,39,119,.18);}
.vt{background:rgba(100,116,139,.1);color:#64748b;border:1px solid rgba(100,116,139,.18);}

/* PRICE */
.pr{display:flex;flex-direction:column;align-items:center;gap:1px;}
.pri{font-family:var(--font-mono);font-size:10px;font-weight:700;}
.pro{font-family:var(--font-mono);font-size:8px;color:var(--text-muted);}

/* ARC AGI */
.arc-col{background:rgba(14,165,233,.025);}
td.arc-col{background:rgba(14,165,233,.02);}
.meta-col{background:rgba(99,102,241,.02);}

/* VERTICAL RANKING CHART */
.vrank-section{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:16px 20px 12px;margin-bottom:14px;box-shadow:var(--shadow-sm);}
.vrank-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:4px;}
.vrank-title{font-size:11px;font-family:var(--font-mono);font-weight:700;color:var(--ac);text-transform:uppercase;letter-spacing:.8px;}
.vrank-desc{font-size:9px;color:var(--text-muted);}
.vrank-legend{display:flex;flex-wrap:wrap;gap:10px;margin-top:10px;padding-top:10px;border-top:1px solid var(--border);}
.vrl{display:flex;align-items:center;gap:4px;font-size:8.5px;font-family:var(--font-mono);color:var(--text-sec);}
.vrl-dot{width:9px;height:9px;border-radius:3px;flex-shrink:0;}
.vrank-chart-wrap{position:relative;overflow-x:auto;padding-bottom:4px;}

/* LEGEND */
.leg{margin-top:12px;display:flex;flex-wrap:wrap;gap:10px;align-items:center;}
.lt{font-size:8.5px;font-family:var(--font-mono);color:var(--text-muted);text-transform:uppercase;letter-spacing:.8px;font-weight:600;}
.li{display:flex;align-items:center;gap:3px;font-size:9.5px;color:var(--text-sec);}
.ld{width:7px;height:7px;border-radius:50%;}

/* CHARTS EXPANDED */
.charts-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-bottom:18px;}
.chart-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:18px;box-shadow:var(--shadow-sm);}
.chart-card.full{grid-column:1/-1;}
.chart-card.third{grid-column:span 1;}
.charts-grid-3{display:grid;grid-template-columns:1fr 1fr 1fr;gap:14px;margin-bottom:18px;}
.chart-card h3{font-size:10.5px;font-family:var(--font-mono);font-weight:700;color:var(--ac);margin-bottom:4px;text-transform:uppercase;letter-spacing:.7px;}
.chart-card p{font-size:9.5px;color:var(--text-muted);margin-bottom:12px;}
.chart-card canvas{max-width:100%;}
.chart-insight{margin-top:10px;padding:8px 10px;background:var(--ac-bg);border-radius:6px;font-size:8.5px;color:var(--text-sec);line-height:1.7;border-left:2px solid var(--ac);}
.chart-insight b{color:var(--ac);}

/* INFO TAB */
.info-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:9px;}
.fni{background:var(--surface-alt);border:1px solid var(--border);border-radius:var(--radius-sm);padding:11px 13px;transition:var(--tr);}
.fni:hover{border-color:var(--border-hover);box-shadow:var(--shadow-sm);}
.fni b{color:var(--text);font-size:9px;display:block;margin-bottom:3px;font-weight:700;}
.fni p{font-size:8.5px;color:var(--text-sec);line-height:1.75;}
.fni a{color:var(--ac);text-decoration:none;}
.fni a:hover{text-decoration:underline;}

.upd{text-align:center;margin-top:14px;font-size:8.5px;font-family:var(--font-mono);color:var(--text-muted);}
@media(max-width:900px){.charts-grid{grid-template-columns:1fr;}}
/* DARK MODE */
body.dark{--bg:#0f172a;--bg2:#1e293b;--surface:#1e293b;--surface-alt:#334155;
  --border:#334155;--border-hover:#475569;--text:#e2e8f0;--text-sec:#94a3b8;--text-muted:#64748b;
  --shadow-sm:0 1px 3px rgba(0,0,0,.3);--shadow:0 4px 16px rgba(0,0,0,.3);--shadow-lg:0 12px 40px rgba(0,0,0,.4);}
body.dark .tw{background:var(--surface);}
body.dark th.c-model,body.dark td.c-model{background:var(--surface)!important;}
body.dark thead{background:var(--surface-alt);}
body.dark tbody tr:hover td.c-model{background:var(--surface-alt)!important;}
body.dark .vrank-section,body.dark .chart-card{background:var(--surface);}
body.dark select{background:var(--surface);color:var(--text);border-color:var(--border);}
/* MOBILE */
@media(max-width:768px){
  .wrap{padding:10px 6px 40px;}
  h1{font-size:18px!important;letter-spacing:-0.5px;}
  .tab-bar{overflow-x:auto;-webkit-overflow-scrolling:touch;flex-wrap:nowrap;}
  .tab{padding:7px 10px;font-size:9px;white-space:nowrap;flex-shrink:0;}
  .toolbar{flex-direction:column;gap:4px;}
  .search-wrap{max-width:100%;min-width:100%;}
  table{font-size:9px;}
  th,td{padding:4px 2px;}
  th.c-model,td.c-model{min-width:110px!important;position:static!important;}
  .mn{font-size:9px!important;}
  .charts-grid,.charts-grid-3{grid-template-columns:1fr!important;}
  .info-grid{grid-template-columns:1fr!important;}
  .badge-row{flex-direction:column;gap:4px;}
  .vrank-chart-wrap{overflow-x:auto;}
  #advSearch{font-size:9px!important;}
}
</style>
</head>
<body>
<div class="wrap">
<header>
  <div class="badge-row">
    <div class="badge"><div class="pulse"></div>LIVE · 2026.03.08 · v2.1</div>
    <button onclick="document.body.classList.toggle('dark');this.textContent=document.body.classList.contains('dark')?'☀ Light':'🌙 Dark'" style="background:var(--surface);border:1px solid var(--border);border-radius:20px;padding:3px 10px;font-size:9px;font-family:var(--font-mono);color:var(--text-sec);cursor:pointer;font-weight:600">🌙 Dark</button>
    <div style="display:flex;gap:6px">
      <div class="st" style="padding:4px 10px;min-width:auto"><div class="stn" style="font-size:12px">70</div><div class="stl">Models</div></div>
      <div class="st" style="padding:4px 10px;min-width:auto"><div class="stn" style="font-size:12px">9</div><div class="stl">Tabs</div></div>
      <div class="st" style="padding:4px 10px;min-width:auto"><div class="stn" style="font-size:12px;color:#16a34a">24</div><div class="stl">Open</div></div>
    </div>
  </div>
  <h1>ALL Bench Leaderboard 2026</h1>
  <p class="sub" style="margin-bottom:6px">
    <b>The only leaderboard covering LLM · VLM · Agent · Image · Video · Music in one place.</b> 42 LLMs + 11 VLMs + 28 generative models. All scores cross-verified.
  </p>
  <div style="display:flex;gap:6px;flex-wrap:wrap;justify-content:center;font-family:var(--font-mono);font-size:8.5px;color:var(--text-muted);margin-bottom:4px">
    <span style="color:#e11d48">🔥 v2.1 — Confidence System + Intelligence Report</span> ·
    <span style="color:#0d9488">🌙 Dark mode · 📱 Mobile ready</span> ·
    <span style="color:#7c3aed">🇰🇷 K-EXAONE data from official Technical Report</span>
  </div>
  <div style="display:flex;gap:6px;justify-content:center;margin-bottom:2px">
    <a href="https://huggingface.co/datasets/FINAL-Bench/ALL-Bench-Leaderboard" target="_blank" style="display:inline-flex;align-items:center;gap:4px;background:linear-gradient(135deg,#ff9d00,#ffcd00);color:#1a1a2e;font-family:var(--font-mono);font-size:8px;font-weight:800;padding:3px 10px;border-radius:14px;text-decoration:none;letter-spacing:0.3px;box-shadow:0 1px 3px rgba(255,157,0,.3);transition:all .2s" onmouseover="this.style.transform='translateY(-1px)';this.style.boxShadow='0 3px 8px rgba(255,157,0,.4)'" onmouseout="this.style.transform='';this.style.boxShadow='0 1px 3px rgba(255,157,0,.3)'">🤗 HuggingFace Dataset</a>
    <a href="https://github.com/final-bench/ALL-Bench-Leaderboard" target="_blank" style="display:inline-flex;align-items:center;gap:4px;background:linear-gradient(135deg,#24292e,#40444b);color:#fff;font-family:var(--font-mono);font-size:8px;font-weight:800;padding:3px 10px;border-radius:14px;text-decoration:none;letter-spacing:0.3px;box-shadow:0 1px 3px rgba(0,0,0,.2);transition:all .2s" onmouseover="this.style.transform='translateY(-1px)';this.style.boxShadow='0 3px 8px rgba(0,0,0,.3)'" onmouseout="this.style.transform='';this.style.boxShadow='0 1px 3px rgba(0,0,0,.2)'">⚡ GitHub Repo</a>
    <a href="https://huggingface.co/datasets/FINAL-Bench/Metacognitive" target="_blank" style="display:inline-flex;align-items:center;gap:4px;background:linear-gradient(135deg,#7c3aed,#6366f1);color:#fff;font-family:var(--font-mono);font-size:8px;font-weight:800;padding:3px 10px;border-radius:14px;text-decoration:none;letter-spacing:0.3px;box-shadow:0 1px 3px rgba(99,102,241,.3);transition:all .2s" onmouseover="this.style.transform='translateY(-1px)';this.style.boxShadow='0 3px 8px rgba(99,102,241,.4)'" onmouseout="this.style.transform='';this.style.boxShadow='0 1px 3px rgba(99,102,241,.3)'">🧬 FINAL Bench Dataset</a>
    <a href="https://huggingface.co/spaces/FINAL-Bench/Leaderboard" target="_blank" style="display:inline-flex;align-items:center;gap:4px;background:linear-gradient(135deg,#0d9488,#059669);color:#fff;font-family:var(--font-mono);font-size:8px;font-weight:800;padding:3px 10px;border-radius:14px;text-decoration:none;letter-spacing:0.3px;box-shadow:0 1px 3px rgba(13,148,136,.3);transition:all .2s" onmouseover="this.style.transform='translateY(-1px)';this.style.boxShadow='0 3px 8px rgba(13,148,136,.4)'" onmouseout="this.style.transform='';this.style.boxShadow='0 1px 3px rgba(13,148,136,.3)'">🏆 FINAL Bench Leaderboard</a>
  </div>
</header>

<!-- ========== GLOBAL ADVANCED SEARCH (compact) ========== -->
<div style="margin-bottom:8px;display:flex;gap:6px;align-items:center;flex-wrap:wrap;">
  <div style="position:relative;flex:1;min-width:240px;">
    <input type="text" id="advSearch" placeholder="🔍 Search: 'GPQA > 90' · 'open price < 1' · 'Anthropic' · 'video' ..." 
      oninput="advancedSearch(this.value)"
      style="width:100%;padding:7px 10px;border:1.5px solid var(--border);border-radius:10px;background:var(--surface);font-family:var(--font-mono);font-size:10px;color:var(--text);outline:none;transition:var(--tr);"
      onfocus="this.style.borderColor='var(--ac)';this.style.boxShadow='0 0 0 3px rgba(99,102,241,.1)';document.getElementById('searchHelp').style.display='flex'"
      onblur="setTimeout(()=>{this.style.borderColor='var(--border)';this.style.boxShadow='none';document.getElementById('searchHelp').style.display='none'},200)">
  </div>
  <div id="searchResultCount" style="font-family:var(--font-mono);font-size:10px;color:var(--text-muted)"></div>
  <button onclick="document.getElementById('advSearch').value='';advancedSearch('');" style="background:none;border:1px solid var(--border);border-radius:6px;padding:3px 8px;font-size:8px;font-family:var(--font-mono);color:var(--text-muted);cursor:pointer;"></button>
</div>
<div id="searchHelp" style="display:none;flex-wrap:wrap;gap:4px;margin-bottom:8px;">
  <span style="background:var(--ac-bg);padding:2px 6px;border-radius:3px;font-size:8px;font-family:var(--font-mono);color:var(--ac);cursor:pointer" onclick="advQ('GPQA > 90')">GPQA > 90</span>
  <span style="background:var(--ac-bg);padding:2px 6px;border-radius:3px;font-size:8px;font-family:var(--font-mono);color:var(--ac);cursor:pointer" onclick="advQ('open price < 1')">open price < 1</span>
  <span style="background:var(--ac-bg);padding:2px 6px;border-radius:3px;font-size:8px;font-family:var(--font-mono);color:var(--ac);cursor:pointer" onclick="advQ('score > 70')">score > 70</span>
  <span style="background:var(--ac-bg);padding:2px 6px;border-radius:3px;font-size:8px;font-family:var(--font-mono);color:var(--ac);cursor:pointer" onclick="advQ('AIME > 95 open')">AIME > 95 open</span>
  <span style="background:var(--ac-bg);padding:2px 6px;border-radius:3px;font-size:8px;font-family:var(--font-mono);color:var(--ac);cursor:pointer" onclick="advQ('free')">free</span>
  <span style="background:var(--ac-bg);padding:2px 6px;border-radius:3px;font-size:8px;font-family:var(--font-mono);color:var(--ac);cursor:pointer" onclick="advQ('ARC > 50')">ARC > 50</span>
  <span style="background:var(--ac-bg);padding:2px 6px;border-radius:3px;font-size:8px;font-family:var(--font-mono);color:var(--ac);cursor:pointer" onclick="advQ('video')">video</span>
  <span style="background:var(--ac-bg);padding:2px 6px;border-radius:3px;font-size:8px;font-family:var(--font-mono);color:var(--ac);cursor:pointer" onclick="advQ('image')">image</span>
  <span style="background:var(--ac-bg);padding:2px 6px;border-radius:3px;font-size:8px;font-family:var(--font-mono);color:var(--ac);cursor:pointer" onclick="advQ('music')">music</span>
</div>

<!-- TABS -->
<div class="tab-bar">
  <div class="tab on" onclick="showTab('tbl',this)">📊 Leaderboard</div>
  <div class="tab" onclick="showTab('vision',this)">👁 VLM</div>
  <div class="tab" onclick="showTab('agent',this)">🤖 Agent</div>
  <div class="tab" onclick="showTab('imggen',this)">🖼 Image</div>
  <div class="tab" onclick="showTab('vidgen',this)">🎬 Video</div>
  <div class="tab" onclick="showTab('musicgen',this)">🎵 Music</div>
  <div class="tab" onclick="showTab('three',this)" style="font-weight:700">🔍 Tools</div>
  <div class="tab" onclick="showTab('report',this)" style="font-weight:700">📄 Report</div>
  <div class="tab" onclick="showTab('charts',this)">📈 Charts</div>
  <div class="tab" onclick="showTab('info',this)">📎 Info</div>
</div>

<!-- ========== TAB: TABLE ========== -->
<div id="tbl" class="tpane on">
<!-- ========== VERTICAL RANKING BAR CHART (above table) ========== -->
<div class="vrank-section">
  <div class="vrank-header">
    <div>
      <div class="vrank-title">🏆 ALL Bench Composite Score Ranking</div>
      <div class="vrank-desc">√Coverage Score = Avg × √(N/10) · 10 benchmarks (v1.5: LCB replaces SWE-V) · ✓Full(7+) ◐Partial(4-6) ○Limited(&lt;4) · Colored by provider</div>
    </div>
  </div>
  <div class="vrank-chart-wrap">
    <canvas id="cVertRank" style="min-width:900px;height:200px;"></canvas>
  </div>
  <div class="vrank-legend" id="vrankLegend"></div>
</div>

<div class="toolbar" style="margin-top:12px">
  <div class="search-wrap">
    <input type="text" id="searchBox" placeholder="Search models..." oninput="doSearch(this.value)">
  </div>
  <span class="flbl">Filter:</span>
  <button class="fb on" onclick="flt('all',this)">All 42</button>
  <button class="fb" onclick="flt('open',this)">🔓 Open</button>
  <button class="fb" onclick="flt('closed',this)">🔒 Closed</button>
  <button class="fb" onclick="flt('qwen',this)">🟠 Qwen3.5</button>
  <button class="fb" onclick="flt('gptoss',this)">⬛ GPT-OSS</button>
  <button class="fb" onclick="flt('reasoning',this)">🧠 Reasoning</button>
  <button class="fb" onclick="flt('moe',this)">⚡ MoE</button>
  <button class="fb" onclick="flt('vision',this)">👁 Vision</button>
  <button class="fb" onclick="flt('value',this)">💚 Value</button>
  <button class="fb" onclick="flt('flagship',this)">👑 Flagship</button>
  <button class="fb" onclick="flt('korean',this)" style="background:linear-gradient(135deg,#c9002b,#003478);color:#fff;border-color:#c9002b;font-weight:700">🇰🇷 Sovereign AI</button>
  <div class="col-toggle-wrap" style="margin-left:auto">
    <button class="col-toggle-btn" onclick="toggleColMenu()" id="colBtn">⚙ Columns ▾</button>
    <div class="col-dropdown" id="colMenu"></div>
  </div>
</div>
<div style="padding:4px 12px;font-size:8px;color:var(--text-muted);font-family:var(--font-mono);display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin-bottom:2px">
  <span>Data Confidence:</span>
  <span style="color:#16a34a;font-weight:700">✓✓</span><span>Cross-verified (2+ sources)</span>
  <span style="color:#d97706;font-weight:700"></span><span>Single source</span>
  <span style="color:#e11d48;font-weight:700">~</span><span>Self-reported</span>
  <span style="margin-left:auto;opacity:.7">Hover score badges for source details · Verified: 2026-03-08</span>
</div>
<div class="tw">
<table id="T">
<thead>
<tr>
  <th class="c-model" onclick="srt(0)">Model<span class="sa"></span></th>
  <th class="gP" style="min-width:72px">Provider</th>
  <th onclick="srt(2)" class="gA" title="√Coverage Score = Avg(confirmed) × √(N/10). Coverage badge: ✓Full(7+) ◐Partial(4-6) ○Limited(<4). 10 benchmarks: MMLU-Pro·GPQA·AIME·HLE·ARC-AGI-2·Metacog·SWE-Pro·BFCL·IFEval·LCB" style="min-width:58px">🏆 Score<span class="sa"></span></th>
  <th onclick="srt(3)" class="gT" style="min-width:48px">📅 Release<span class="sa"></span></th>
  <th onclick="srt(4)" class="gB" data-col="4" title="MMLU-Pro: 57K questions, highest sample size &amp; reliability" style="min-width:52px"><a href="https://huggingface.co/datasets/TIGER-Lab/MMLU-Pro" target="_blank">📚 MMLU-Pro</a><span class="sa"></span></th>
  <th onclick="srt(5)" class="gB" data-col="5" title="GPQA Diamond: PhD-level expert questions, highest discrimination" style="min-width:52px"><a href="https://huggingface.co/datasets/Idavidrein/gpqa" target="_blank">🧠 GPQA◆</a><span class="sa"></span></th>
  <th onclick="srt(6)" class="gB" data-col="6" title="AIME 2025: Math olympiad, minimal contamination" style="min-width:50px"><a href="https://artofproblemsolving.com/wiki/index.php/2025_AIME" target="_blank">📐 AIME25</a><span class="sa"></span></th>
  <th onclick="srt(7)" class="gB" data-col="7" title="HLE: Humanity's Last Exam — hardest existing benchmark, 2500 expert-sourced questions" style="min-width:48px"><a href="https://huggingface.co/datasets/centerforaisafety/hle" target="_blank">🔭 HLE</a><span class="sa"></span></th>
  <th onclick="srt(8)" class="arc-col" style="color:#0ea5e9!important;min-width:56px" data-col="8" title="ARC-AGI-2: Abstract reasoning, novel visual puzzles — most contamination-proof"><a href="https://arcprize.org/arc-agi-2" target="_blank" style="color:#0ea5e9">🧩 ARC-AGI-2★</a><span class="sa"></span></th>
  <th onclick="srt(9)" class="gF meta-col" data-col="9" title="FINAL-Bench Metacognitive: 100 tasks, measures self-correction &amp; error recovery (ER)" style="min-width:54px"><a href="https://huggingface.co/datasets/FINAL-Bench/Metacognitive" target="_blank" style="color:#7c3aed">🧬 Metacog★</a><span class="sa"></span></th>
  <th onclick="srt(10)" class="gB" data-col="10" title="SWE-Pro: Scale AI SEAL, 1865 real repos, contamination-free" style="min-width:52px"><a href="https://scale.com/leaderboard/coding" target="_blank">🏗 SWE-Pro</a><span class="sa"></span></th>
  <th onclick="srt(11)" class="gB" data-col="11" title="BFCL v4: Tool use &amp; agent capability" style="min-width:48px"><a href="https://gorilla.cs.berkeley.edu/leaderboard.html" target="_blank">🔧 BFCL</a><span class="sa"></span></th>
  <th onclick="srt(12)" class="gB" data-col="12" title="IFEval: Instruction following" style="min-width:48px"><a href="https://huggingface.co/datasets/google/IFEval" target="_blank">📋 IFEval</a><span class="sa"></span></th>
  <th onclick="srt(13)" class="gB" data-col="13" title="LiveCodeBench: Competitive programming" style="min-width:44px"><a href="https://livecodebench.github.io/leaderboard.html" target="_blank">🖥 LCB</a><span class="sa"></span></th>
  <th onclick="srt(35)" class="gB" data-col="35" title="Terminal-Bench 2.0: Agentic terminal tasks — tbench.ai official (best agent+model combo)" style="min-width:50px"><a href="https://www.tbench.ai/leaderboard/terminal-bench/2.0" target="_blank">🖥 TB2.0★</a><span class="sa"></span></th>
  <th onclick="srt(36)" class="gB" data-col="36" title="SciCode: Scientific coding — 338 sub-problems from 80 real research tasks (AA independent)" style="min-width:48px"><a href="https://scicode-bench.github.io/" target="_blank">🔬 SciCode★</a><span class="sa"></span></th>
  <th onclick="srt(14)" class="gB" style="opacity:.75" data-col="14" title="SWE-Verified: ⚠ Contamination risk, 59.4% tasks found defective by OpenAI audit" style="min-width:48px"><a href="https://www.swebench.com" target="_blank">💻 SWE-V⚠</a><span class="sa"></span></th>
  <th onclick="srt(15)" class="gM" data-col="15" title="MMMLU: 50+ languages multilingual MMLU" style="min-width:52px"><a href="https://huggingface.co/datasets/openai/MMMLU" target="_blank">🌍 MMMLU</a><span class="sa"></span></th>
  <th onclick="srt(16)" class="gT" data-col="16" style="min-width:44px">📥 CtxIn<span class="sa"></span></th>
  <th onclick="srt(17)" class="gT" data-col="17" style="min-width:44px">📤 CtxOut<span class="sa"></span></th>
  <th onclick="srt(18)" class="gT" data-col="18" style="min-width:44px">⚡ tok/s<span class="sa"></span></th>
  <th onclick="srt(19)" class="gN" data-col="19" title="TTFT — lower is faster" style="min-width:44px">⏱ TTFT<span class="sa"></span></th>
  <th class="gN" data-col="20" style="min-width:80px">👁 Vision</th>
  <th class="gN" data-col="21" style="min-width:80px">⚙ Arch</th>
  <th onclick="srt(22)" class="gP" data-col="22" style="min-width:48px">🏆 ELO<span class="sa"></span></th>
  <th class="gP" data-col="23" style="min-width:52px">📄 License</th>
  <th onclick="srt(24)" class="gP" data-col="24" style="min-width:50px">💰 $/M in<span class="sa"></span></th>
</tr>
</thead>
<tbody id="TB"></tbody>
</table>
</div>
<div class="leg">
  <span class="lt">Grade:</span>
  <div class="li"><div class="ld" style="background:#6366f1"></div>S≥90%</div>
  <div class="li"><div class="ld" style="background:#0d9488"></div>A≥75%</div>
  <div class="li"><div class="ld" style="background:#d97706"></div>B≥60%</div>
  <div class="li"><div class="ld" style="background:#e11d48"></div>C&lt;60%</div>
  <span style="color:#db2777;font-size:9px;margin-left:8px">★ = New in v1.0</span>
  <span style="color:#16a34a;font-size:9px;margin-left:6px">💚 Green row = Open-source value pick</span>
  <span style="font-family:var(--font-mono);font-size:8px;color:#0ea5e9;margin-left:6px">🧩 ARC-AGI-2 = arcprize.org official</span>
  <span style="font-family:var(--font-mono);font-size:8px;color:#7c3aed;margin-left:6px">🧬 Metacog = FINAL-Bench official (8 of 9 tested models in bench)</span>
  <span style="font-family:var(--font-mono);font-size:8px;color:#0ea5e9;margin-left:6px">🖥 TB2.0 = tbench.ai official · 🔬 SciCode = AA independent</span>
  <span style="font-family:var(--font-mono);font-size:8px;color:#e11d48;margin-left:6px">⚙ Score = Avg × √(N/10): <span style="color:#16a34a"></span>Full(7+) <span style="color:#d97706"></span>Partial(4-6) <span style="color:#e11d48"></span>Limited(&lt;4) · v1.5: LCB replaces SWE-V</span>
</div>
</div>

<!-- ========== TAB: VISION LANGUAGE ========== -->
<div id="vision" class="tpane">
<div style="margin-bottom:14px;">
  <div style="display:flex;align-items:center;gap:8px;margin-bottom:8px;">
    <span style="background:linear-gradient(135deg,#7c3aed,#6366f1);color:#fff;font-size:8px;font-family:var(--font-mono);font-weight:800;padding:3px 8px;border-radius:20px;letter-spacing:1px;">👁 VISION LANGUAGE v2.1</span>
    <span style="font-family:var(--font-mono);font-size:9px;color:var(--text-muted);">Flagship + Open-Source SOTA · 15 Models × 10 Key Benchmarks + Detailed Comparison</span>
  </div>
  <p style="font-size:9.5px;color:var(--text-sec);line-height:1.7;">
    <b>NEW v2.1:</b> Flagship VLM comparison across 10 multimodal models. Sources: Vals.ai, Google DeepMind, OpenAI official, Anthropic, InternVL3 paper, Qwen official.
    <b>Confidence:</b> <span style="color:#16a34a;font-weight:700">✓✓</span> Cross-verified · <span style="color:#d97706;font-weight:700"></span> Single source · <span style="color:#e11d48;font-weight:700">~</span> Self-reported
  </p>
</div>

<!-- FLAGSHIP VLM COMPARISON -->
<div style="margin-bottom:6px"><span style="font-size:10px;font-weight:800;color:var(--text)">🏆 Flagship VLM Comparison</span> <span style="font-size:8px;color:var(--text-muted);font-family:var(--font-mono)">· Cross-provider multimodal intelligence ranking</span></div>
<div class="tw" style="margin-bottom:14px;">
<table>
<thead>
<tr>
<th style="min-width:140px;text-align:left;font-size:7.5px">Model</th>
<th style="min-width:48px;font-size:7px">MMMU</th>
<th style="min-width:48px;font-size:7px">MMMU-Pro</th>
<th style="min-width:48px;font-size:7px">MathVista</th>
<th style="min-width:48px;font-size:7px">AI2D</th>
<th style="min-width:48px;font-size:7px">OCRBench</th>
<th style="min-width:48px;font-size:7px">MMStar</th>
<th style="min-width:48px;font-size:7px">Hallusion</th>
<th style="min-width:48px;font-size:7px">MMBenchEN</th>
<th style="min-width:48px;font-size:7px">RealWorldQA</th>
<th style="min-width:48px;font-size:7px">VideoMME</th>
</tr>
</thead>
<tbody id="VTF"></tbody>
</table>
</div>

<!-- LIGHTWEIGHT MODEL COMPARISON (ORIGINAL) -->
<div style="margin-bottom:6px"><span style="font-size:10px;font-weight:800;color:var(--text)">⚡ Lightweight / Edge Model Detail</span> <span style="font-size:8px;color:var(--text-muted);font-family:var(--font-mono)">· Qwen official 34 benchmarks · 5 models</span></div>

<div class="tw" style="margin-bottom:14px;">
<table id="VT">
<thead>
<tr><th colspan="2" style="background:linear-gradient(135deg,#7c3aed11,#6366f111);color:#7c3aed;text-align:left;padding-left:10px;font-size:9px;letter-spacing:1px">STEM & PUZZLE</th>
<th style="min-width:50px;font-size:7.5px">MMMU</th><th style="min-width:50px;font-size:7.5px">MMMU-Pro</th><th style="min-width:50px;font-size:7.5px">MathVision</th><th style="min-width:50px;font-size:7.5px">MathVista</th><th style="min-width:50px;font-size:7.5px">We-Math</th><th style="min-width:50px;font-size:7.5px">DynaMath</th><th style="min-width:50px;font-size:7.5px">ZEROBench</th><th style="min-width:50px;font-size:7.5px">ZERO_sub</th><th style="min-width:50px;font-size:7.5px">VlmsBlind</th><th style="min-width:50px;font-size:7.5px">BabyVis</th></tr>
</thead>
<tbody id="VTB1"></tbody>
</table>
</div>

<div class="tw" style="margin-bottom:14px;">
<table>
<thead>
<tr><th colspan="2" style="background:linear-gradient(135deg,#0d948811,#6366f111);color:#0d9488;text-align:left;padding-left:10px;font-size:9px;letter-spacing:1px">GENERAL VQA & DOCUMENT</th>
<th style="min-width:50px;font-size:7.5px">RealWorldQA</th><th style="min-width:50px;font-size:7.5px">MMStar</th><th style="min-width:50px;font-size:7.5px">MMBenchEN</th><th style="min-width:50px;font-size:7.5px">SimpleVQA</th><th style="min-width:50px;font-size:7.5px">Hallusion</th><th style="min-width:50px;font-size:7.5px">OmniDoc</th><th style="min-width:50px;font-size:7.5px">CharXiv</th><th style="min-width:50px;font-size:7.5px">MMLongDoc</th><th style="min-width:50px;font-size:7.5px">CC-OCR</th><th style="min-width:50px;font-size:7.5px">AI2D</th><th style="min-width:50px;font-size:7.5px">OCRBench</th></tr>
</thead>
<tbody id="VTB2"></tbody>
</table>
</div>

<div class="tw" style="margin-bottom:14px;">
<table>
<thead>
<tr><th colspan="2" style="background:linear-gradient(135deg,#d9770611,#6366f111);color:#d97706;text-align:left;padding-left:10px;font-size:9px;letter-spacing:1px">SPATIAL · VIDEO · AGENT · MEDICAL</th>
<th style="min-width:46px;font-size:7px">ERQA</th><th style="min-width:46px;font-size:7px">CountB</th><th style="min-width:46px;font-size:7px">EmbSpatial</th><th style="min-width:46px;font-size:7px">RefSpatial</th><th style="min-width:46px;font-size:7px">LingoQA</th><th style="min-width:46px;font-size:7px">VidMME+</th><th style="min-width:46px;font-size:7px">VidMME</th><th style="min-width:46px;font-size:7px">VidMMMU</th><th style="min-width:46px;font-size:7px">MLVU</th><th style="min-width:46px;font-size:7px">MMVU</th><th style="min-width:46px;font-size:7px">ScreenSP</th><th style="min-width:46px;font-size:7px">OSWorld</th><th style="min-width:46px;font-size:7px">Android</th><th style="min-width:46px;font-size:7px">TIR-B</th><th style="min-width:46px;font-size:7px">SLAKE</th><th style="min-width:46px;font-size:7px">PMC-VQA</th><th style="min-width:46px;font-size:7px">MedXpert</th></tr>
</thead>
<tbody id="VTB3"></tbody>
</table>
</div>

<div class="leg">
  <span class="lt">Flagship VLM:</span>
  <div class="li"><div class="ld" style="background:#4285f4"></div>Gemini 3.1 Pro</div>
  <div class="li"><div class="ld" style="background:#34a853"></div>Gemini 3 Flash</div>
  <div class="li"><div class="ld" style="background:#10a37f"></div>GPT-5.2</div>
  <div class="li"><div class="ld" style="background:#d97706"></div>Claude Opus 4.6</div>
  <div class="li"><div class="ld" style="background:#ef4444"></div>Grok 4 Heavy</div>
  <div class="li"><div class="ld" style="background:#3b82f6"></div>InternVL3.5-241B</div>
  <div class="li"><div class="ld" style="background:#6366f1"></div>InternVL3-78B</div>
  <div class="li"><div class="ld" style="background:#f97316"></div>Qwen2.5-VL-72B</div>
  <div class="li"><div class="ld" style="background:#8b5cf6"></div>Kimi-VL-A3B</div>
  <div class="li"><div class="ld" style="background:#ec4899"></div>GPT-5 (original)</div>
  <br>
  <span class="lt">Edge Models:</span>
  <div class="li"><div class="ld" style="background:#10a37f"></div>GPT-5-Nano</div>
  <div class="li"><div class="ld" style="background:#4285f4"></div>Gemini-2.5-FL-Lite</div>
  <div class="li"><div class="ld" style="background:#f97316"></div>Qwen3-VL-30B-A3B</div>
  <div class="li"><div class="ld" style="background:#ea580c"></div>Qwen3.5-9B</div>
  <div class="li"><div class="ld" style="background:#c2410c"></div>Qwen3.5-4B</div>
  <span style="font-family:var(--font-mono);font-size:8px;color:var(--text-muted);margin-left:8px">Source: Qwen official benchmarks · BabyVision & TIR-Bench show "with CI / without CI"</span>
</div>
</div>

<!-- ========== TAB: AGENT BENCH ========== -->
<div id="agent" class="tpane">
<div style="margin-bottom:14px;">
  <div style="display:flex;align-items:center;gap:8px;margin-bottom:8px;">
    <span style="background:linear-gradient(135deg,#0d9488,#059669);color:#fff;font-size:8px;font-family:var(--font-mono);font-weight:800;padding:3px 8px;border-radius:20px;letter-spacing:1px;">🤖 AGENT BENCH v2.1</span>
    <span style="font-family:var(--font-mono);font-size:9px;color:var(--text-muted);">Agentic Capability Comparison — Desktop, Web, Terminal, Tool Use</span>
  </div>
  <p style="font-size:9.5px;color:var(--text-sec);line-height:1.7;">
    Sources: Anthropic, OpenAI, Google DeepMind official announcements + Onyx AI, Vellum, NxCode, DataCamp independent reviews.<br>
    <b>⚠ Note:</b> Agent scores vary significantly by scaffolding (agent framework). Values shown are best reported across implementations. "—" = not published / not applicable.
  </p>
</div>

<div class="tw" style="margin-bottom:14px;">
<table>
<thead>
<tr>
<th class="c-model" style="text-align:left;padding-left:10px;min-width:140px">Model</th>
<th style="min-width:56px;font-size:7.5px;color:#0d9488" title="OSWorld-Verified: Autonomous desktop GUI navigation — clicking, typing, multi-step workflows">🖥 OSWorld</th>
<th style="min-width:56px;font-size:7.5px;color:#6366f1" title="τ²-bench Telecom: Multi-turn tool calling in telecom domain">🔧 τ²-bench</th>
<th style="min-width:56px;font-size:7.5px;color:#d97706" title="BrowseComp: Autonomous web research — finding specific info across the web">🌐 BrowseComp</th>
<th style="min-width:56px;font-size:7.5px;color:#7c3aed" title="Terminal-Bench 2.0: tbench.ai agentic terminal tasks">🖥 TB 2.0</th>
<th style="min-width:56px;font-size:7.5px;color:#e11d48" title="GDPval-AA Elo: Real-world professional knowledge work across 44 occupations">📋 GDPval</th>
<th style="min-width:56px;font-size:7.5px;color:#0081fb" title="SWE-Bench Pro: Scale AI SEAL standardized scaffolding">🏗 SWE-Pro</th>
<th style="min-width:56px;font-size:7.5px;color:#f97316" title="BFCL v4: Berkeley Function-Calling Leaderboard">🔧 BFCL v4</th>
<th style="min-width:56px;font-size:7.5px;color:#14b8a6" title="AndroidWorld: Mobile automation benchmark">📱 Android</th>
</tr>
</thead>
<tbody id="ATB"></tbody>
</table>
</div>

<div class="leg">
  <span class="lt">Agent Benchmarks:</span>
  <span style="font-family:var(--font-mono);font-size:8px;color:var(--text-muted)">OSWorld = desktop GUI · τ²-bench = multi-turn tools · BrowseComp = web research · TB2.0 = terminal · GDPval = professional work · SWE-Pro = SEAL coding · BFCL = function calling</span>
</div>
</div>

<!-- ========== TAB: IMAGE GEN ========== -->
<div id="imggen" class="tpane">
<div style="margin-bottom:14px;">
  <div style="display:flex;align-items:center;gap:8px;margin-bottom:8px;">
    <span style="background:linear-gradient(135deg,#e11d48,#f43f5e);color:#fff;font-size:8px;font-family:var(--font-mono);font-weight:800;padding:3px 8px;border-radius:20px;letter-spacing:1px;">🖼 IMAGE GENERATION v2.1</span>
    <span style="font-family:var(--font-mono);font-size:9px;color:var(--text-muted);">10 Models — Qualitative & Arena Ranking Comparison</span>
  </div>
  <p style="font-size:9.5px;color:var(--text-sec);line-height:1.7;">
    Image generation lacks standardized numeric benchmarks like LLMs. Rankings combine LM Arena Elo, expert reviews (Cliprise, Vellum, Awesome Agents), and community consensus.<br>
    Dimensions: <b>Photorealism</b> · <b>Artistic Quality</b> · <b>Text Rendering</b> · <b>Prompt Adherence</b> · <b>Speed</b> · <b>Cost</b>. Ratings: ⬛S (top tier) · 🟦A (strong) · 🟧B (capable) · ⬜C (limited).
  </p>
</div>

<div class="tw" style="margin-bottom:14px;">
<table>
<thead>
<tr>
<th class="c-model" style="text-align:left;padding-left:10px;min-width:150px">Model</th>
<th style="min-width:60px;font-size:7.5px">Provider</th>
<th style="min-width:50px;font-size:7.5px">Release</th>
<th style="min-width:50px;font-size:7.5px" title="LM Arena ranking or equivalent">🏆 Arena</th>
<th style="min-width:52px;font-size:7.5px">📷 Photo</th>
<th style="min-width:52px;font-size:7.5px">🎨 Art</th>
<th style="min-width:52px;font-size:7.5px">📝 Text</th>
<th style="min-width:52px;font-size:7.5px">🎯 Prompt</th>
<th style="min-width:52px;font-size:7.5px">⚡ Speed</th>
<th style="min-width:52px;font-size:7.5px">💰 Cost</th>
<th style="min-width:60px;font-size:7.5px">License</th>
</tr>
</thead>
<tbody id="ITB"></tbody>
</table>
</div>

<div class="leg">
  <span class="lt">Ratings:</span>
  <span style="font-family:var(--font-mono);font-size:9px;color:#6366f1">⬛S = Top tier</span>
  <span style="font-family:var(--font-mono);font-size:9px;color:#0d9488">🟦A = Strong</span>
  <span style="font-family:var(--font-mono);font-size:9px;color:#d97706">🟧B = Capable</span>
  <span style="font-family:var(--font-mono);font-size:9px;color:#94a3b8">⬜C = Limited</span>
  <span style="font-family:var(--font-mono);font-size:8px;color:var(--text-muted);margin-left:8px">Sources: LM Arena, Cliprise, Vellum, Awesome Agents, community consensus (Feb 2026)</span>
</div>
</div>

<!-- ========== TAB: VIDEO GEN ========== -->
<div id="vidgen" class="tpane">
<div style="margin-bottom:14px;">
  <div style="display:flex;align-items:center;gap:8px;margin-bottom:8px;">
    <span style="background:linear-gradient(135deg,#f43f5e,#ec4899);color:#fff;font-size:8px;font-family:var(--font-mono);font-weight:800;padding:3px 8px;border-radius:20px;letter-spacing:1px;">🎬 VIDEO GENERATION v2.1</span>
    <span style="font-family:var(--font-mono);font-size:9px;color:var(--text-muted);">10 Models — Quality · Motion · Audio · Duration · Resolution · Cost</span>
  </div>
  <p style="font-size:9.5px;color:var(--text-sec);line-height:1.7;">
    Sources: LaoZhang AI, Pinggy, RizzGen, CrePal, TeamDay, Awesome Agents (Feb 2026). All models rated on S/A/B/C scale.<br>
    <b>2026 breakthroughs:</b> Native audio generation (Veo 3.1, Sora 2, Kling 3.0) · Multi-shot sequences (Kling 3.0) · 4K output (LTX-2) · Open-source parity (Wan 2.6)
  </p>
</div>
<div class="tw" style="margin-bottom:14px;">
<table>
<thead>
<tr>
<th class="c-model" style="text-align:left;padding-left:10px;min-width:140px">Model</th>
<th style="min-width:56px;font-size:7.5px">Provider</th>
<th style="min-width:44px;font-size:7.5px">Release</th>
<th style="min-width:50px;font-size:7.5px">📷 Quality</th>
<th style="min-width:50px;font-size:7.5px">🎬 Motion</th>
<th style="min-width:50px;font-size:7.5px">🔊 Audio</th>
<th style="min-width:50px;font-size:7.5px">🎯 Prompt</th>
<th style="min-width:50px;font-size:7.5px">⏱ Max Dur</th>
<th style="min-width:50px;font-size:7.5px">📐 Max Res</th>
<th style="min-width:50px;font-size:7.5px">💰 Cost</th>
<th style="min-width:56px;font-size:7.5px">License</th>
</tr>
</thead>
<tbody id="VIDTB"></tbody>
</table>
</div>
<div class="leg">
  <span class="lt">Key:</span>
  <span style="font-family:var(--font-mono);font-size:8px;color:var(--text-muted)">Quality = visual fidelity · Motion = physics/consistency · Audio = native sound gen · Prompt = adherence to description · Duration = max single generation · Open = open-source weights available</span>
</div>
</div>

<!-- ========== TAB: MUSIC GEN ========== -->
<div id="musicgen" class="tpane">
<div style="margin-bottom:14px;">
  <div style="display:flex;align-items:center;gap:8px;margin-bottom:8px;">
    <span style="background:linear-gradient(135deg,#8b5cf6,#6366f1);color:#fff;font-size:8px;font-family:var(--font-mono);font-weight:800;padding:3px 8px;border-radius:20px;letter-spacing:1px;">🎵 MUSIC / AUDIO GEN v2.1</span>
    <span style="font-family:var(--font-mono);font-size:9px;color:var(--text-muted);">8 Models — Vocal · Instrumental · Lyrics · Duration · Style Range</span>
  </div>
  <p style="font-size:9.5px;color:var(--text-sec);line-height:1.7;">
    <b>⚠ No standardized benchmarks exist for music generation.</b> Rankings based on expert reviews, community consensus, and platform capabilities.<br>
    Dimensions: <b>Vocal Quality</b> · <b>Instrumental</b> · <b>Lyrics Understanding</b> · <b>Max Duration</b> · <b>Style Range</b> · <b>Commercial Rights</b>
  </p>
</div>
<div class="tw" style="margin-bottom:14px;">
<table>
<thead>
<tr>
<th class="c-model" style="text-align:left;padding-left:10px;min-width:140px">Model</th>
<th style="min-width:56px;font-size:7.5px">Provider</th>
<th style="min-width:44px;font-size:7.5px">Release</th>
<th style="min-width:50px;font-size:7.5px">🎤 Vocal</th>
<th style="min-width:50px;font-size:7.5px">🎸 Instru</th>
<th style="min-width:50px;font-size:7.5px">📝 Lyrics</th>
<th style="min-width:50px;font-size:7.5px">🎨 Styles</th>
<th style="min-width:50px;font-size:7.5px">⏱ Max Dur</th>
<th style="min-width:50px;font-size:7.5px">💰 Cost</th>
<th style="min-width:56px;font-size:7.5px">License</th>
</tr>
</thead>
<tbody id="MUSTB"></tbody>
</table>
</div>
<div class="leg">
  <span class="lt">Note:</span>
  <span style="font-family:var(--font-mono);font-size:8px;color:var(--text-muted)">Music AI is the least benchmarked domain. Ratings reflect community consensus + expert reviews. Commercial rights vary — check each provider's terms before publishing.</span>
</div>
</div>

<!-- ========== TAB: INTERACTIVE TOOLS ========== -->
<div id="three" class="tpane">
<div style="margin-bottom:10px;">
  <div style="display:flex;align-items:center;gap:8px;margin-bottom:8px;">
    <span style="background:linear-gradient(135deg,#6366f1,#0d9488);color:#fff;font-size:8px;font-family:var(--font-mono);font-weight:800;padding:3px 8px;border-radius:20px;letter-spacing:1px;">🔍 INTERACTIVE TOOLS v2.1</span>
    <span style="font-family:var(--font-mono);font-size:9px;color:var(--text-muted);">Find · Compare · Verify · Visualize — 67 models across all modalities</span>
  </div>
</div>
<div style="display:flex;gap:0;border-bottom:1px solid var(--border);margin-bottom:12px;">
  <div class="tab on" onclick="show3DSub('finder',this)" style="font-size:9.5px;padding:8px 14px">🔍 Model Finder</div>
  <div class="tab" onclick="show3DSub('h2h',this)" style="font-size:9.5px;padding:8px 14px">⚔ Head-to-Head</div>
  <div class="tab" onclick="show3DSub('coverage',this)" style="font-size:9.5px;padding:8px 14px">📊 Trust Map</div>
  <div class="tab" onclick="show3DSub('barrace',this)" style="font-size:9.5px;padding:8px 14px">🏁 Bar Race</div>
</div>

<!-- SUB: MODEL FINDER — "What's the best model for MY budget?" -->
<div id="sub_finder" class="sub3d" style="display:block">
  <div style="font-size:10px;color:var(--text-sec);margin-bottom:10px;line-height:1.7">
    <b style="color:var(--ac)">Find your optimal model:</b> Filter by price, capability, and type. Each dot = one model. X = Price · Y = Composite Score. Hover for details. The best value models are in the <b style="color:#16a34a">top-left zone</b> (high score, low cost).
  </div>
  <div style="display:flex;gap:6px;flex-wrap:wrap;margin-bottom:10px;align-items:center;">
    <span style="font-size:8.5px;font-family:var(--font-mono);color:var(--text-muted);font-weight:600">FILTER:</span>
    <button class="fb on" onclick="finderFilter('all',this)">All LLMs</button>
    <button class="fb" onclick="finderFilter('open',this)">🔓 Open Only</button>
    <button class="fb" onclick="finderFilter('closed',this)">🔒 Closed Only</button>
    <button class="fb" onclick="finderFilter('cheap',this)">💚 Under $1/M</button>
    <button class="fb" onclick="finderFilter('free',this)">🆓 Free</button>
  </div>
  <div style="background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);overflow:hidden;position:relative;height:440px" id="finderBox">
    <canvas id="finderCanvas" style="width:100%;height:100%;display:block"></canvas>
    <div id="finderTip" style="display:none;position:absolute;background:rgba(15,23,42,.95);color:#e2e8f0;border:1px solid var(--ac);border-radius:8px;padding:10px 14px;font-family:var(--font-mono);font-size:9px;pointer-events:none;z-index:10;line-height:1.8;max-width:240px;backdrop-filter:blur(8px)"></div>
  </div>
</div>

<!-- SUB: HEAD-TO-HEAD — "A vs B, which is better?" -->
<div id="sub_h2h" class="sub3d" style="display:none">
  <div style="font-size:10px;color:var(--text-sec);margin-bottom:10px;line-height:1.7">
    <b style="color:var(--ac)">Head-to-Head:</b> Select two models and instantly see who wins on each benchmark. Green = winner. The wider the bar, the bigger the gap.
  </div>
  <div style="display:flex;gap:10px;margin-bottom:12px;flex-wrap:wrap;align-items:center;">
    <select id="h2hA" onchange="drawH2H()" style="padding:5px 10px;border:1px solid var(--border);border-radius:8px;font-family:var(--font-mono);font-size:10px;background:var(--surface);color:var(--text);min-width:160px"></select>
    <span style="font-family:var(--font-mono);font-size:14px;font-weight:800;color:var(--ac)">VS</span>
    <select id="h2hB" onchange="drawH2H()" style="padding:5px 10px;border:1px solid var(--border);border-radius:8px;font-family:var(--font-mono);font-size:10px;background:var(--surface);color:var(--text);min-width:160px"></select>
  </div>
  <div style="background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);overflow:hidden;height:440px" id="h2hBox">
    <canvas id="h2hCanvas" style="width:100%;height:100%;display:block"></canvas>
  </div>
</div>

<!-- SUB: TRUST MAP — "Which models have the most verified data?" -->
<div id="sub_coverage" class="sub3d" style="display:none">
  <div style="font-size:10px;color:var(--text-sec);margin-bottom:10px;line-height:1.7">
    <b style="color:var(--ac)">Benchmark Coverage Trust Map:</b> Each cell = one model × one benchmark. <span style="color:#6366f1">■ Confirmed</span> = score verified from 2+ sources. <span style="color:#d97706">■ Self-reported</span> = provider only. <span style="color:#e2e8f0">□ Missing</span> = no data. <b>More coverage = more trustworthy ranking.</b>
  </div>
  <div style="background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);overflow:auto;max-height:480px" id="covBox">
    <canvas id="covCanvas" style="display:block"></canvas>
  </div>
</div>

<!-- SUB: BAR RACE — kept and improved -->
<div id="sub_barrace" class="sub3d" style="display:none">
  <div style="font-size:10px;color:var(--text-sec);margin-bottom:8px;line-height:1.7">
    <b style="color:var(--ac)">AI Evolution Timeline:</b> Watch frontier models evolve from Jan 2025 → Mar 2026. Bar length = composite score. Press ▶ to animate 18 months of AI progress.
  </div>
  <div style="background:#0f172a;border-radius:var(--radius);overflow:hidden;height:480px;border:1px solid var(--border);position:relative" id="barraceBox">
    <canvas id="barraceCanvas" style="width:100%;height:100%;display:block"></canvas>
    <button onclick="startBarRace()" style="position:absolute;top:12px;right:12px;background:linear-gradient(135deg,#6366f1,#4f46e5);color:#fff;border:none;border-radius:20px;padding:6px 16px;font-family:var(--font-mono);font-size:10px;font-weight:700;cursor:pointer;z-index:5">▶ Play</button>
    <div id="brYear" style="position:absolute;top:12px;left:12px;font-family:var(--font-mono);font-size:22px;font-weight:800;color:#6366f1;z-index:5">2025.01</div>
  </div>
</div>
</div>

<!-- ========== TAB: REPORT ========== -->
<div id="report" class="tpane">
<div id="reportContent" style="max-width:800px;margin:0 auto;">
  <div style="display:flex;justify-content:space-between;align-items:center;margin-bottom:14px;flex-wrap:wrap;gap:8px">
    <div>
      <span style="background:linear-gradient(135deg,#6366f1,#0d9488);color:#fff;font-size:8px;font-family:var(--font-mono);font-weight:800;padding:3px 8px;border-radius:20px;letter-spacing:1px;">📄 INTELLIGENCE REPORT</span>
      <span style="font-family:var(--font-mono);font-size:9px;color:var(--text-muted);margin-left:6px" id="rptDate"></span>
    </div>
    <div style="display:flex;gap:6px">
      <button onclick="downloadPDF()" style="background:linear-gradient(135deg,#e11d48,#f43f5e);color:#fff;border:none;border-radius:8px;padding:6px 14px;font-family:var(--font-mono);font-size:9px;font-weight:700;cursor:pointer">📥 PDF</button>
      <button onclick="downloadDOCX()" style="background:linear-gradient(135deg,#6366f1,#4f46e5);color:#fff;border:none;border-radius:8px;padding:6px 14px;font-family:var(--font-mono);font-size:9px;font-weight:700;cursor:pointer">📥 DOCX</button>
    </div>
  </div>

  <!-- EXECUTIVE SUMMARY -->
  <div style="background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:20px;margin-bottom:14px;box-shadow:var(--shadow)">
    <h2 style="font-size:14px;font-weight:800;color:var(--text);margin-bottom:12px;letter-spacing:-0.5px">🏆 Executive Summary</h2>
    <div id="rptSummary" style="font-size:11px;color:var(--text-sec);line-height:2"></div>
  </div>

  <!-- CATEGORY WINNERS -->
  <div style="background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:20px;margin-bottom:14px;box-shadow:var(--shadow)">
    <h2 style="font-size:14px;font-weight:800;color:var(--text);margin-bottom:12px;letter-spacing:-0.5px">🥇 Category Winners</h2>
    <div id="rptWinners" style="display:grid;grid-template-columns:1fr 1fr;gap:8px"></div>
  </div>

  <!-- TOP 10 RANKING TABLE -->
  <div style="background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:20px;margin-bottom:14px;box-shadow:var(--shadow)">
    <h2 style="font-size:14px;font-weight:800;color:var(--text);margin-bottom:12px;letter-spacing:-0.5px">📊 Top 10 LLM Ranking</h2>
    <table style="width:100%;font-size:10px;border-collapse:collapse" id="rptTable">
      <thead><tr style="border-bottom:2px solid var(--border)">
        <th style="text-align:left;padding:6px 4px;font-family:var(--font-mono);font-size:8px;color:var(--text-muted)">#</th>
        <th style="text-align:left;padding:6px 4px;font-family:var(--font-mono);font-size:8px;color:var(--text-muted)">Model</th>
        <th style="text-align:center;padding:6px 4px;font-family:var(--font-mono);font-size:8px;color:var(--text-muted)">Score</th>
        <th style="text-align:center;padding:6px 4px;font-family:var(--font-mono);font-size:8px;color:var(--text-muted)">Coverage</th>
        <th style="text-align:center;padding:6px 4px;font-family:var(--font-mono);font-size:8px;color:var(--text-muted)">Type</th>
        <th style="text-align:right;padding:6px 4px;font-family:var(--font-mono);font-size:8px;color:var(--text-muted)">Price</th>
      </tr></thead>
      <tbody id="rptTbody"></tbody>
    </table>
  </div>

  <!-- KEY INSIGHTS -->
  <div style="background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:20px;margin-bottom:14px;box-shadow:var(--shadow)">
    <h2 style="font-size:14px;font-weight:800;color:var(--text);margin-bottom:12px;letter-spacing:-0.5px">💡 Key Insights</h2>
    <div id="rptInsights" style="font-size:10.5px;color:var(--text-sec);line-height:2"></div>
  </div>

  <!-- CONFIDENCE LEGEND -->
  <div style="background:var(--surface-alt);border:1px solid var(--border);border-radius:var(--radius-sm);padding:14px;margin-bottom:14px;font-size:9px;color:var(--text-sec);line-height:1.8">
    <b style="color:var(--text)">Data Confidence:</b>
    <span style="color:#16a34a;font-weight:700">✓✓</span> Cross-verified (2+ independent sources) ·
    <span style="color:#d97706;font-weight:700"></span> Single source (provider official) ·
    <span style="color:#e11d48;font-weight:700">~</span> Self-reported / unverified ·
    <span style="color:#94a3b8"></span> No data available<br>
    <b>Last verified:</b> <span id="rptVerified"></span> · <b>Methodology:</b> 5-Axis Intelligence Framework (Knowledge · Expert Reasoning · Abstract · Metacognition · Execution)
  </div>
</div>
</div>

<!-- ========== TAB: CHARTS ========== -->
<div id="charts" class="tpane">

<!-- ROW 1: ARC-AGI-2 + Metacog Delta -->
<div class="charts-grid" style="margin-top:14px">

  <div class="chart-card">
    <h3>🧩 ARC-AGI-2 — Abstract Reasoning Frontier</h3>
    <p>Official arcprize.org · Vertical bars by score · Contamination-proof visual reasoning benchmark</p>
    <canvas id="cArc" height="220"></canvas>
    <div class="chart-insight"><b>Key:</b> Gemini 3.1 Pro leads at <b>77.1%</b> (verified arcprize.org). Claude Opus 4.6 68.8% · GPT-5.2 52.9% · Kimi K2.5 12.1%. Each model shows distinct reasoning profile — ARC-AGI-2 is the most contamination-proof benchmark.</div>
  </div>

  <div class="chart-card">
    <h3>🧬 Metacog: Baseline → Self-Correction Gain (Δ)</h3>
    <p>FINAL-Bench official · Baseline FINAL Score vs MetaCog condition · Error Recovery drives 94.8% of gains</p>
    <canvas id="cMetaDelta" height="220"></canvas>
    <div class="chart-insight"><b>Key:</b> Claude Opus 4.6 has lowest baseline (rank 9) but <b>largest Δ gain (+20.13)</b> — strongest self-correction. Kimi K2.5 highest baseline but smallest gain. Declarative–Procedural gap persists across all models.</div>
  </div>

</div>

<!-- ROW 2: Radar + Benchmark Category Breakdown -->
<div class="charts-grid">

  <div class="chart-card">
    <h3>🕸 Capability Radar — TOP 6 Multi-Axis Profile</h3>
    <p>MMLU-Pro · GPQA · AIME · HLE · ARC-AGI-2 · MMMLU · Each axis normalized to 100</p>
    <canvas id="cRadar" height="260"></canvas>
    <div class="chart-insight"><b>Key:</b> No single model dominates all axes. Gemini leads MMMLU+HLE, GPT-5.2 leads MMLU-Pro, Kimi K2.5 exceptional on MMLU-Pro 92.0. Different strengths suggest routing strategies.</div>
  </div>

  <div class="chart-card">
    <h3>📊 Capability Domains — Reasoning vs Coding vs Language</h3>
    <p>Grouped bars: Reasoning avg (GPQA+AIME+HLE) · Coding avg (SWE-Pro+LCB) · Language avg (MMLU-Pro+MMMLU+IFEval)</p>
    <canvas id="cDomain" height="260"></canvas>
    <div class="chart-insight"><b>Key:</b> Claude Opus 4.6 leads Coding domain. Gemini 3.1 Pro leads Language. GPT-5.2 most balanced across all three domains — ideal for general-purpose deployment.</div>
  </div>

</div>

<!-- ROW 3: Perf vs Cost + Provider Comparison -->
<div class="charts-grid">

  <div class="chart-card">
    <h3>💰 Performance vs Cost — Value Frontier Map</h3>
    <p>X = Input price log scale ($/M tokens) · Y = Composite Score · Top-left quadrant = elite value zone</p>
    <canvas id="cScatter" height="260"></canvas>
    <div class="chart-insight"><b>Value leaders:</b> DeepSeek V3.2 ($0.14/M, score ~74) and GLM-5 ($0.35/M) offer exceptional open-weight value. GPT-OSS-120B is truly free with competitive performance.</div>
  </div>

  <div class="chart-card">
    <h3>🏭 Provider Strength — Average Score by Company</h3>
    <p>Average composite score across all models per provider · Shows lab-level consistency</p>
    <canvas id="cProvider" height="260"></canvas>
    <div class="chart-insight"><b>Key:</b> OpenAI strongest average (combining closed+OSS models). Alibaba's Qwen3.5 family shows remarkable breadth. DeepSeek punches above weight with MIT-licensed models.</div>
  </div>

</div>

<!-- ROW 4: Timeline + Open vs Closed -->
<div class="charts-grid">

  <div class="chart-card">
    <h3>📅 Intelligence Timeline — Score vs Release Date</h3>
    <p>Bubble size = context window (log scale) · Color = provider · Rapid capability gains 2025→2026</p>
    <canvas id="cTimeline" height="260"></canvas>
    <div class="chart-insight"><b>Key:</b> ~15-point score jump from Jan 2025 to Feb 2026. Feb 2026 releases (GPT-5.2, Gemini 3.1 Pro) establish new ceiling. Context window growth independent of intelligence score.</div>
  </div>

  <div class="chart-card">
    <h3>⚖ Open vs Closed — Distribution Comparison</h3>
    <p>Score distribution: Open-weight (18 models) vs Closed-API (6 models) · Box plot style with individual points</p>
    <canvas id="cOpenClosed" height="260"></canvas>
    <div class="chart-insight"><b>Key:</b> Open-weight models now overlap significantly with closed-API. Top open models (Kimi K2.5, Qwen3.5-397B) match or exceed many closed offerings — open-source gap is closing.</div>
  </div>

</div>

<!-- ROW 5: Benchmark Coverage + Heatmap -->
<div class="charts-grid">

  <div class="chart-card">
    <h3>📐 Benchmark Score Variance — Consistency Analysis</h3>
    <p>For each benchmark: show min/max/mean across all models · Reveals benchmark difficulty &amp; discrimination power</p>
    <canvas id="cVariance" height="220"></canvas>
    <div class="chart-insight"><b>Key:</b> HLE shows widest variance (7.0–44.9) = best discrimination. ARC-AGI-2 also highly discriminating (12.1–88.1). AIME25 scores cluster high — many models saturating it.</div>
  </div>

  <div class="chart-card full">
    <h3>🌡 Full Benchmark Heatmap — 39 Models × 11 Benchmarks</h3>
    <p>Color intensity = score · White/light = unreported · Indigo = high · Reveals capability patterns across the entire landscape</p>
    <canvas id="cHeat" style="width:100%;display:block;"></canvas>
  </div>

</div>

</div>

<!-- ========== TAB: INFO ========== -->
<div id="info" class="tpane">
<div class="info-grid" style="margin-top:12px">
  <div class="fni"><b>🧩 ARC-AGI-2 ★NEW — Abstract Reasoning</b><p>Tests novel visual pattern completion — cannot be solved by memorization. <a href="https://arcprize.org/arc-agi-2" target="_blank">arcprize.org</a>. Gemini 3.1 Pro 77.1% (verified) · Claude Opus 4.6 68.8% · GPT-5.4 73.3% · GPT-5.2 52.9% · Kimi K2.5 12.1%. Most contamination-proof benchmark available.</p></div>
  <div class="fni" style="border-left:4px solid #c9002b;background:linear-gradient(135deg,#c9002b08,#00347808)"><b>🇰🇷 Korean Sovereign AI — National Foundation Model Project</b><p>
  Ministry of Science and ICT "National AI Foundation Model Project" as of 2026.02 — 4 elite teams: <b>LG AI Research (K-EXAONE)</b> · <b>SK Telecom (A.X K1)</b> · <b>Upstage (Solar Open 100B)</b> · <b>Motif Technologies</b>. Plus <b>KT (Mi:dm 2.0)</b> as independent Korea-centric AI.<br>
  • 1st evaluation (2026.01.15): 5 teams → 3 teams (Naver Cloud & NC AI eliminated)<br>
  • Wildcard round (2026.02.20): Motif Technologies added → 4-team structure<br>
  • K-EXAONE: 1st place in evaluation · 72-point avg across 13 benchmarks · AA open-weight top 10 · 236B MoE<br>
  • Solar Open 100B: AIME 84.3% · 19.7T tokens · 100B MoE · arXiv 2601.07022<br>
  • A.X K1: Korea's first 500B parameter model · Apache 2.0 open-source<br>
  • Goal: Achieve 95%+ of global AI model performance · Final 2 teams selected by 2027 · KRW 530B budget
  </p></div>
  <div class="fni"><b>🧬 Metacognitive ★NEW — FINAL-Bench</b><p>Official: <a href="https://huggingface.co/datasets/FINAL-Bench/Metacognitive" target="_blank">HF FINAL-Bench/Metacognitive</a>. 100 tasks, 9 SOTA models tested. Baseline FINAL Score: Kimi K2.5 68.71 · GPT-5.2 62.76 · GLM-5 62.50 · MiniMax-M2.5 60.54 · GPT-OSS-120B 60.42 · DeepSeek-V3.2 60.04 · GLM-4.7P 59.54 · Gemini 59.5 · Opus 4.6 56.04. ER (error recovery) accounts for 94.8% of self-correction gains. 8 of 9 tested models now in ALL Bench.</p></div>
  <div class="fni"><b>📊 Composite Score — √Coverage Weighted (v1.5)</b><p><b>5-Axis Intelligence Framework:</b><br><b>Knowledge</b> (MMLU-Pro) — 57K questions, highest statistical reliability<br><b>Expert Reasoning</b> (GPQA + AIME + HLE) — PhD-level science + math olympiad + frontier-hard<br><b>Abstract Reasoning</b> (ARC-AGI-2) — contamination-proof visual pattern recognition<br><b>Metacognition</b> (FINAL Bench) — self-correction &amp; error recovery<br><b>Execution</b> (SWE-Pro + BFCL + IFEval + LCB) — real coding + tool use + instruction following + competitive programming<br><br>
  <b>Formula:</b> <code>Score = Avg(confirmed) × √(N/10)</code><br>
  • N = confirmed benchmarks out of 10 · √ softens penalty: 10/10=×1.00 · 7/10=×0.84 · 4/10=×0.63<br><b style="color:#16a34a">✓ Full</b> (7+) · <b style="color:#d97706">◐ Partial</b> (4-6) · <b style="color:#e11d48">○ Limited</b> (&lt;4)<br><b>v1.5 change:</b> SWE-Verified removed from composite (59.4% tasks defective per OpenAI audit). Replaced with LiveCodeBench — continuously updated, contamination-resistant.</p></div>
  <div class="fni"><b>📚 MMLU-Pro</b><p><a href="https://huggingface.co/datasets/TIGER-Lab/MMLU-Pro" target="_blank">HF: TIGER-Lab/MMLU-Pro</a>. 57,000 expert-level questions across disciplines. Largest sample size → highest statistical reliability. Much harder than original MMLU. Gold standard general knowledge benchmark.</p></div>
  <div class="fni"><b>🧠 GPQA Diamond ⭐</b><p><a href="https://huggingface.co/datasets/Idavidrein/gpqa" target="_blank">HF: Idavidrein/gpqa</a>. 198 PhD-level questions in biology, chemistry, physics. Human expert average ~65%. Highest discrimination power among frontier models.</p></div>
  <div class="fni"><b>📐 AIME 2025</b><p><a href="https://artofproblemsolving.com/wiki/index.php/2025_AIME" target="_blank">AoPS: 2025 AIME</a>. American Invitational Mathematics Examination. 2025 problem set minimizes contamination. Tests mathematical reasoning and creative problem solving.</p></div>
  <div class="fni"><b>🔭 HLE — Humanity's Last Exam</b><p><a href="https://huggingface.co/datasets/centerforaisafety/hle" target="_blank">HF: centerforaisafety/hle</a>. 2,500 expert-submitted questions. Intended to be the final closed-ended academic benchmark. Kimi K2.5 44.9% · Gemini 3.1 Pro 44.7% lead.</p></div>
  <div class="fni"><b>🏗 SWE-Pro ⭐ Recommended</b><p><a href="https://scale.com/leaderboard/coding" target="_blank">scale.com/leaderboard/coding</a>. Scale AI SEAL, 1865 real repos. Contamination-free. ~35pt lower than SWE-Verified — honest measure of real coding. OpenAI recommends over Verified.</p></div>
  <div class="fni"><b>💻 SWE-Verified ⚠ Caution</b><p><a href="https://www.swebench.com" target="_blank">swebench.com</a>. 59.4% of tasks found defective in OpenAI audit. Memorization/contamination risk. Reference only. Prefer SWE-Pro for accurate assessment.</p></div>
  <div class="fni"><b>🔧 BFCL v4</b><p><a href="https://gorilla.cs.berkeley.edu/leaderboard.html" target="_blank">gorilla.cs.berkeley.edu</a>. Berkeley Function-Calling Leaderboard. Measures tool use and agent capability. Qwen3.5-122B world #1.</p></div>
  <div class="fni"><b>📋 IFEval</b><p><a href="https://huggingface.co/datasets/google/IFEval" target="_blank">HF: google/IFEval</a>. Instruction following evaluation. Verifiable output constraints. Tests precision compliance.</p></div>
  <div class="fni"><b>🖥 LiveCodeBench</b><p><a href="https://livecodebench.github.io/leaderboard.html" target="_blank">livecodebench.github.io</a>. Competitive programming from LeetCode, AtCoder, Codeforces. Continuously updated to prevent contamination.</p></div>
  <div class="fni" style="border-left:4px solid #0ea5e9;background:linear-gradient(135deg,#0ea5e908,#6366f108)"><b>🖥 Terminal-Bench 2.0 ★NEW — Agentic Terminal Tasks</b><p>
  <a href="https://www.tbench.ai/leaderboard/terminal-bench/2.0" target="_blank">tbench.ai</a>. Stanford + Laude Institute. ~80 tasks: compile code, train models, configure servers, play games, debug systems.<br>
  • Best agent+model combo scores: Gemini 3.1 Pro 78.4% · GPT-5.3 Codex 77.3% · Claude Opus 4.6 74.7% · Gemini 3 Flash 64.3%<br>
  • Tests real-world terminal capability — distinct from SWE-bench (file editing) · Agent framework matters: same model varies 10-20pts by scaffold<br><b>Source:</b> tbench.ai official leaderboard (best model score across all agents)
  </p></div>
  <div class="fni" style="border-left:4px solid #7c3aed;background:linear-gradient(135deg,#7c3aed08,#6366f108)"><b>🔬 SciCode ★NEW — Scientific Research Coding</b><p>
  <a href="https://scicode-bench.github.io/" target="_blank">scicode-bench.github.io</a>. 338 sub-problems from 80 real research tasks across 16 scientific disciplines (Chemistry, Physics, Biology, Math).<br>
  • AA independent: Gemini 3.1 Pro 58.9% · Gemini 3 Pro 56.1% · GPT-5.2 Codex 54.6%<br>
  • Only 3 model scores publicly available from AA — most models show "—" (data insufficient)<br><b>Why included:</b> Fills the "science coding" gap — existing benchmarks (SWE-Pro, LCB) test SE/competitive only
  </p></div>
  <div class="fni"><b>🌍 MMMLU — Multilingual</b><p><a href="https://huggingface.co/datasets/openai/MMMLU" target="_blank">HF: openai/MMMLU</a>. MMLU in 57 languages. Gemini 3.1 Pro ~88% leads. Qwen3.5 officially supports 201 languages.</p></div>
  <div class="fni"><b>⚙ Architecture</b><p>MoE = sparse activation (efficient), Dense = full params (quality), Hybrid = DeltaNet+MoE. Parentheses = active/total params. Active params determine inference cost. Qwen3.5-35B: 3B active → 194 tok/s.</p></div>
  <div class="fni"><b>⏱ TTFT Latency</b><p>Time To First Token (seconds). Lower is faster. Mistral Large 3 0.3s · GPT-5.2 0.6s fastest. Reasoning models (DeepSeek R1 8s) are slower due to chain-of-thought. &lt;2s recommended for real-time apps.</p></div>
  <div class="fni" style="border-left:4px solid #10a37f;background:linear-gradient(135deg,#10a37f06,#6366f106)"><b>🔥 GPT-5.4 — OpenAI's Most Capable Model (2026.03.05)</b><p>
  <a href="https://openai.com/index/introducing-gpt-5-4/" target="_blank">OpenAI: Introducing GPT-5.4</a>. Dense reasoning model, Proprietary, released March 5, 2026.<br><b style="color:#10a37f">HLE 52.1% — ALL Bench #1</b> (dethroning Kimi K2.5 44.9%) · GPT-5.4 Pro reaches 58.7%<br>
  • ARC-AGI-2: 73.3% (+20pt from GPT-5.2) · Pro: 83.3% (approaching Gemini 3.1 Pro 88.1%)<br>
  • SWE-Pro: 57.7% · GPQA: 92.8% · OSWorld 75.0% (surpasses human 72.4%) — first Computer Use SOTA<br>
  • 1M context window · Tool Search (47% token reduction) · Native computer use via Playwright + screenshots<br>
  • $2.50/M input, $15/M output · Replaces GPT-5.2 Thinking in ChatGPT
  </p></div>
  <div class="fni" style="border-left:4px solid #ff6b35;background:linear-gradient(135deg,#ff6b3506,#6366f106)"><b>🆕 MiniMax-M2.5 — Agent & Coding Frontier</b><p>
  <a href="https://huggingface.co/MiniMaxAI/MiniMax-M2.5" target="_blank">HF: MiniMaxAI/MiniMax-M2.5</a>. MiniMax (China AI Tiger). 230B MoE (10B active), MIT license, 2026.02.<br><b style="color:#ff6b35">SWE-Verified 80.2% — ALL Bench #1</b> for real-world software engineering<br>
  • GPQA 84.8 · MMLU-Pro 82.0 · AIME 86.3 · IFEval 87.5 · LCB 82.6 · HLE 19.1<br>
  • 1M context window · Forge RL framework · 200K+ real-world training environments<br>
  • Emergent architectural thinking: plans project hierarchies before coding
  </p></div>
  <div class="fni" style="border-left:4px solid #7c3aed;background:linear-gradient(135deg,#7c3aed06,#6366f106)"><b>🆕 Step-3.5-Flash — Efficiency Frontier MoE</b><p>
  <a href="https://huggingface.co/stepfun-ai/Step-3.5-Flash" target="_blank">HF: stepfun-ai/Step-3.5-Flash</a>. StepFun (China AI Tiger). 196B MoE (11B active), Apache 2.0, 2026.02.<br><b style="color:#7c3aed">AIME 97.3% — near-perfect math reasoning with only 11B active params</b><br>
  • LCB 86.4 · SWE-V 74.4 · Terminal-Bench 51.0 · 256K context · 300 tok/s peak<br>
  • MIS-PO (Metropolis Independence Sampling) novel RL method · 3:1 SWA ratio<br>
  • Runs locally on Mac Studio M4 Max / NVIDIA DGX Spark · arXiv: 2602.10604
  </p></div>
  <div class="fni" style="border-left:4px solid #f43f5e;background:linear-gradient(135deg,#f43f5e06,#6366f106)"><b>🆕 Nanbeige4.1-3B — 3B Small Model Giant Killer</b><p>
  <a href="https://huggingface.co/Nanbeige/Nanbeige4.1-3B" target="_blank">HF: Nanbeige/Nanbeige4.1-3B</a>. Nanbeige LLM Lab (by Kanzhun/BOSS Zhipin). Built on Nanbeige4-3B-Base, optimized via SFT+RL. Apache 2.0.<br><b style="color:#f43f5e">3B params outperforms Qwen3-32B across the board</b>: GPQA 83.8 (vs 68.4) · LCB 76.9 (vs 55.7) · Arena-Hard-v2 73.2 (vs 56.0)<br>
  • First small general model with Deep Search: 500+ rounds tool invocation · GAIA 69.9 · xBench 75<br>
  • AIME 2026-I 87.4% · BFCL-V4 56.5 · HLE 12.6 · Multi-Challenge 52.2<br><b>Reasoning + Alignment + Agentic</b> achieved simultaneously — new benchmark for small model ecosystem
  </p></div>
  <div class="fni" style="border-left:4px solid #e60012;background:linear-gradient(135deg,#e6001208,#6366f106)"><b>🆕 Mi:dm 2.0 Base — KT Korea-Centric AI</b><p>
  <a href="https://huggingface.co/K-intelligence/Midm-2.0-Base-Instruct" target="_blank">HF: K-intelligence/Midm-2.0-Base-Instruct</a>. KT (Korea Telecom). 11.5B Dense (Llama + Depth-up Scaling), MIT license, 2025.07.<br><b style="color:#e60012">Korea-centric AI: deeply internalizes Korean social values &amp; commonsense</b><br>
  • Korean Society &amp; Culture avg 78.4% · KMMLU 57.3 · Ko-IFEval 82.0 · Ko-MTBench 89.7<br>
  • Outperforms Exaone-3.5-7.8B &amp; Qwen3-14B on Korean evaluation suites<br>
  • Function calling support via vLLM · 2.3B Mini variant available for on-device
  </p></div>
  <div class="fni" style="border-left:4px solid #7c3aed;background:linear-gradient(135deg,#7c3aed06,#6366f106)"><b>🆕 Qwen3-Next-80B-A3B — Hybrid Attention Revolution</b><p>
  <a href="https://huggingface.co/Qwen/Qwen3-Next-80B-A3B-Thinking" target="_blank">HF: Qwen/Qwen3-Next-80B-A3B-Thinking</a>. First model in Qwen3-Next series.<br><b>Hybrid Attention</b>: Gated DeltaNet + Gated Attention replaces standard attention → efficient ultra-long context<br><b>Ultra-Sparse MoE</b>: 80B total, <b style="color:#f97316">only 3B activated</b> (512 experts, 10 active) → 10x inference throughput<br>
  • MMLU-Pro 82.7 · GPQA 77.2 · LCB 68.7 · IFEval 88.9 · MMMLU 81.3 · Multi-Token Prediction (MTP)<br>
  • Surpasses Qwen3-30B-A3B-Thinking-2507 &amp; Gemini-2.5-Flash-Thinking · NCML License
  </p></div>
  <div class="fni" style="border-left:4px solid #7c3aed;background:linear-gradient(135deg,#7c3aed06,#4285f406)"><b>👁 Vision Language Tab ★NEW — 34 VL Benchmarks</b><p>
  New tab comparing 5 multimodal models across 34 vision-language benchmarks from Qwen official results.<br><b>STEM & Puzzle</b>: MMMU, MMMU-Pro, MathVision, MathVista, We-Math, DynaMath, ZEROBench, VlmsAreBlind, BabyVision<br><b>General VQA & Doc</b>: RealWorldQA, MMStar, MMBench, SimpleVQA, HallusionBench, OmniDocBench, CharXiv, CC-OCR, AI2D, OCRBench<br><b>Spatial/Video/Agent</b>: ERQA, CountBench, EmbSpatial, LingoQA, VideoMME, MLVU, ScreenSpot Pro, OSWorld, AndroidWorld<br><b>Medical</b>: SLAKE, PMC-VQA, MedXpertQA-MM — Qwen3.5-9B leads in nearly all categories
  </p></div>
  <div class="fni"><b>💰 Pricing</b><p>Input cost in $/million tokens. 0 = free open-weights. GPT-5-Nano $0.05/M (cheapest frontier). Qwen3.5-35B $0.10/M = Gemini 2.5 FL-Lite $0.10/M. DeepSeek V3.2 $0.14/M. GPT-5.2 $1.75/M · Claude Opus 4.6 $5/M.</p></div>
  <div class="fni" style="border-left:4px solid #e11d48"><b>📋 Changelog v2.1</b><p>
  <b>v2.1</b> ✓✓/✓/~ Confidence badges on all benchmark scores with source tooltips. 📄 Intelligence Report tab with Executive Summary, Category Winners, Top 10, Key Insights. PDF/DOCX download. Last verified date tracking (2026-03-08). Source data for 42 models across 12 benchmark columns.<br>
  <b>v2.0</b> All blanks filled: Kimi LCB 85, K-EXAONE MMLU-P 81.8/GPQA 75.4/AIME 85.3, Sonnet 4.6 GPQA 89.9/ARC 60.4, GPT-5.2 LCB 80. Korean AI data from K-EXAONE Technical Report. 42 LLMs cross-verified.<br>
  <b>v1.9</b> +3 LLMs (GPT-5.1, Gemini 3 Pro, Sonnet 4.5). Dark mode. Mobile responsive.<br>
  <b>v1.8</b> Tools tab (Model Finder · Head-to-Head · Trust Map · Bar Race). Header streamlined.<br>
  <b>v1.7</b> Video (10) + Music (8). <b>v1.6</b> Agent + Image. <b>v1.5</b> Critical fixes + VLM tab.<br>
  </p></div>
  <div class="fni" style="border-left:4px solid #0d9488"><b>✓ Sources & Verification</b><p>
  LLM scores cross-verified against 2+ independent sources: Artificial Analysis Intelligence Index · arcprize.org (ARC-AGI-2 official) · Scale AI SEAL (SWE-Pro) · tbench.ai (Terminal-Bench) · FINAL-Bench/Metacognitive (HF official) · Chatbot Arena · OpenAI/Anthropic/Google official model cards · Vellum · DataCamp · NxCode · digitalapplied. Unverified scores shown as "—" or removed.
  </p></div>
</div>
<p class="upd">ALL Bench Leaderboard v2.1 · 70 AI Models · 📡 <a href="#" onclick="parent.document.querySelector('[data-testid=API-tab-button]')?.click()" style="color:var(--ac);text-decoration:none">API Available</a> · Updated 2026.03.08</p>
</div>

</div><!-- /wrap -->

<script>
// DATA STRUCTURE:
// [0:name, 1:provider, 2:provColor, 3:type, 4:group, 5:dotColor, 6:released,
//  7:mmluP, 8:gpqa, 9:aime, 10:hle, 11:arcagi2, 12:metacog, 13:swePro, 14:bfcl, 15:ifeval, 16:lcb, 17:sweV, 18:mmmlu,
//  19:maxIn, 20:maxOut, 21:tokPerSec, 22:ttft, 23:vis[], 24:archType, 25:archDetail,
//  26:elo, 27:license, 28:priceIn, 29:priceOut,
//  30:valScore, 31:valLabel, 32:csScore, 33:csLabel,
//  34:modelUrl, 35:termBench, 36:sciCode]
const D=[
["GPT-5.2","OpenAI","#10a37f","closed","flagship","#10a37f","2026.02",
 80.0,93.2,100,35.4,52.9,62.76,null,null,90.5,80.0,80.0,82,
 400,128,null,0.6,["Image"],"Dense","Reasoning",1510,"Prop",1.75,14.0,
 3,"Top performance",4,"All-around leader · high cost",
 "https://openai.com/gpt-5",64.9,54.6],

["GPT-5.3 Codex","OpenAI","#10a37f","closed","flagship","#047857","2026.02",
 82.9,91.5,95.0,36.0,null,null,57.0,null,null,null,null,83,
 400,128,null,null,["Image"],"Dense","Reasoning(Coding)",1500,"Prop",7.50,30.0,
 4,"AA overall #2 (54) · coding frontier",4,"Terminal-Bench 77.3% · SWE 78.2% · coding SOTA",
 "https://openai.com/codex",77.3,null],

["Claude Opus 4.6","Anthropic","#d97706","closed","flagship","#d97706","2025.10",
 78.5,91.3,100,40.0,68.8,56.04,45.0,null,93.1,76.0,80.8,80,
 200,32,null,3.5,["Image","Video"],"Dense","Reasoning(Adaptive)",1498,"Prop",5.0,25.0,
 3,"Coding & agents #1",5,"Agent SOTA · community fav",
 "https://anthropic.com/claude",74.7,null],

["Gemini 3.1 Pro","Google","#4285f4","closed","flagship","#4285f4","2026.01",
 83.0,94.3,97,44.4,77.1,59.5,43.3,null,91.0,null,80.6,88,
 2000,64,null,4.2,["Image","Video","Audio"],"Dense","Reasoning(DeepThink)",1501,"Prop",2.0,12.0,
 4,"GPQA · HLE · Vision #1",4,"Multimodal SOTA · HLE leader",
 "https://gemini.google.com",78.4,58.9],

["Grok 4 Heavy","xAI","#1d9bf0","closed","flagship","#1d9bf0","2025.11",
 85.0,87.5,95,28.0,null,null,25.0,null,88.0,null,72.0,76,
 256,32,null,6.0,["Image"],"Dense","Reasoning",1460,"Prop",3.0,15.0,
 3,"X real-time search",4,"Math & reasoning specialist",
 "https://x.ai/grok",27.2,null],

["Claude Sonnet 4.6","Anthropic","#d97706","closed","flagship","#f59e0b","2026.02",
 null,89.9,83.0,null,60.4,null,null,null,89.5,null,79.6,null,
 200,64,null,2.0,["Image","Video"],"Dense","Reasoning",1482,"Prop",3.0,15.0,
 4,"GPQA 89.9 · ARC 60.4 · SWE 79.6",4,"Best value frontier · 1M ctx beta",
 "https://anthropic.com/claude",53.0,null],

["GPT-OSS-120B","OpenAI","#059669","open","gptoss","#059669","2025.12",
 90.0,80.9,97.9,12.0,null,60.42,16.2,null,null,null,null,72,
 128,32,null,null,["Text"],"MoE","Reasoning(5.1B/116.8B)",1380,"Apache2",0,0,
 5,"80GB single-GPU local",4,"MMLU open-source #1 · o4-mini class",
 "https://huggingface.co/openai",null,null],

["GPT-OSS-20B","OpenAI","#059669","open","gptoss","#34d399","2025.12",
 85.3,71.5,98.7,7.0,null,null,null,null,null,null,null,68,
 128,32,null,null,["Text"],"MoE","Reasoning(3.6B/20.9B)",1340,"Apache2",0,0,
 5,"16GB edge · AIME best",4,"Tiny AIME 98.7% champion",
 "https://huggingface.co/openai",null,null],

["Qwen3.5-397B","Alibaba","#f97316","open","qwen","#f97316","2026.01",
 87.8,88.4,91.3,32.0,null,null,38.0,null,92.6,null,76.4,85,
 262,32,45,5.0,["Image","Video"],"MoE+Hybrid","Reasoning(17B/397B)",1445,"Apache2",null,null,
 4,"Open-source flagship",5,"IFBench world #1 · 201 langs",
 "https://huggingface.co/Qwen",null,null],

["Qwen3.5-122B","Alibaba","#f97316","open","qwen","#fb923c","2026.01",
 null,87.6,85.0,24.0,null,null,28.0,72.2,93.4,null,72.2,82,
 262,32,null,6.0,["Image","Video"],"MoE+Hybrid","Reasoning(10B/122B)",1420,"Apache2",0.40,1.20,
 5,"BFCL world #1",5,"BFCL +30% vs GPT-5 mini",
 "https://huggingface.co/Qwen",null,null],

["Qwen3.5-27B","Alibaba","#f97316","open","qwen","#fdba74","2026.01",
 86.1,85.5,null,18.0,null,null,20.0,null,null,null,72.4,80,
 262,32,null,5.5,["Image","Video"],"Dense","Reasoning(27B)",1395,"Apache2",null,null,
 5,"Dense coding specialist",4,"SWE 72.4% · GPT-5 mini class",
 "https://huggingface.co/Qwen",null,null],

["Qwen3.5-35B","Alibaba","#f97316","open","qwen","#fed7aa","2026.01",
 null,83.0,null,15.0,null,null,18.0,null,null,null,68.0,78,
 262,32,194,4.0,["Image","Video"],"MoE+Hybrid","Reasoning(3B/35B)",1380,"Apache2",0.10,0.40,
 5,"3B active · 194 tok/s",5,"Beats old 235B · local #1",
 "https://huggingface.co/Qwen",null,null],

["Qwen3.5-Flash","Alibaba","#f97316","closed","qwen","#ea580c","2026.01",
 null,null,null,null,null,null,null,null,null,null,null,75,
 1000,32,null,3.0,["Image","Video"],"MoE+Hybrid","Non-Reasoning",null,"Prop",0.10,0.40,
 5,"Ultra-low cost · 1M ctx",4,"Cheaper than DeepSeek+multimodal",
 "https://huggingface.co/Qwen",null,null],

["Qwen3.5-9B","Alibaba","#f97316","open","qwen","#c2410c","2026.01",
 82.5,81.7,null,10.0,null,null,null,66.1,91.5,65.6,null,81.2,
 262,32,null,3.5,["Image","Video"],"Dense","Reasoning(9B)",1300,"Apache2",null,null,
 5,"9B beats 120B",5,"MMLU-P 82.5 · BFCL 66.1 · IFEval 91.5",
 "https://huggingface.co/Qwen",null,null],

["Qwen3.5-4B","Alibaba","#f97316","open","qwen","#9a3412","2026.01",
 79.1,76.2,null,null,null,null,null,50.3,89.8,55.8,null,76.1,
 262,32,null,2.0,["Image","Video"],"Dense","Reasoning(4B)",null,"Apache2",null,null,
 5,"First 4B multimodal",4,"MMLU-P 79.1 · BFCL 50.3 · IFEval 89.8",
 "https://huggingface.co/Qwen",null,null],

["DeepSeek V3.2","DeepSeek","#6366f1","open","value","#6366f1","2025.12",
 null,79.9,89.3,22.0,null,60.04,15.6,null,87.5,null,66.0,78,
 128,8,null,7.0,["Text"],"MoE","Non-Reasoning(37B/671B)",1430,"MIT",0.14,0.28,
 5,"MIT · value legend",5,"Reddit fav · unbeatable price",
 "https://huggingface.co/deepseek-ai/DeepSeek-V3",39.6,null],

["DeepSeek R1","DeepSeek","#6366f1","open","value","#818cf8","2025.01",
 85.0,82.0,87.5,14.0,null,null,18.0,null,83.3,null,49.2,74,
 128,8,null,8.0,["Text"],"MoE","Reasoning(37B/671B)",1440,"MIT",0.55,2.19,
 5,"Reasoning specialist",5,"Math/reasoning legend",
 "https://huggingface.co/deepseek-ai/DeepSeek-R1",null,null],

["Kimi K2.5","Moonshot","#8b5cf6","open","flagship","#8b5cf6","2025.11",
 92.0,87.6,96.1,44.9,12.1,68.71,27.7,null,94.0,85.0,76.8,81,
 200,32,null,5.0,["Image","Video"],"MoE","Reasoning(1T)",1447,"MIT",0.55,2.50,
 5,"HLE · MMLU elite",4,"HLE 44.9% #1 class · agent",
 "https://huggingface.co/moonshotai",43.2,null],

["GLM-5","Zhipu AI","#14b8a6","open","value","#0d9488","2026.02",
 87.0,86.0,92.7,30.5,null,62.50,77.8,null,null,52.0,null,76,
 200,16,null,null,["Text"],"MoE","Reasoning(40B/745B)",1451,"MIT",0.35,0.39,
 5,"AA open-source #1 (50) · ELO 1451 top",5,"SWE 77.8% · Huawei Ascend only · 2026.02.11",
 "https://huggingface.co/zai-org/GLM-5",52.4,null],

["Llama 4 Scout","Meta","#0081fb","open","flagship","#0081fb","2025.04",
 null,73.0,85.0,12.0,null,null,5.2,null,85.0,null,55.0,70,
 10000,16,null,2.0,["Image","Video"],"MoE","Non-Reasoning(17B/400B)",1340,"Meta",0.11,0.34,
 4,"10M ctx revolution",3,"Local fav · 10M context",
 "https://huggingface.co/meta-llama",null,null],

["Mistral Large 3","Mistral","#ff7043","open","flagship","#ff7043","2025.11",
 null,78.0,82.0,11.0,null,null,12.0,null,86.0,null,60.0,72,
 256,16,null,0.3,["Image"],"MoE","Non-Reasoning(675B)",1320,"Apache2",2.0,6.0,
 3,"TTFT 0.3s fastest",3,"GDPR · EU preference",
 "https://huggingface.co/mistralai",null,null],

["Gemini 3 Flash","Google","#4285f4","closed","flagship","#34a853","2025.12",
 88.6,90.4,95.0,33.7,34.0,null,71.2,null,88.2,null,72.5,83,
 1000,64,218,1.2,["Image","Video","Audio"],"Dense","Non-Reasoning+Thinking",1490,"Prop",0.50,3.00,
 5,"Flash beats last-gen Pro · 218 tok/s",5,"GPQA 90.4% Flash level · HF trending #1",
 "https://deepmind.google/technologies/gemini/flash/",64.3,null],

["Llama 4 Maverick","Meta","#0081fb","open","flagship","#1877f2","2025.10",
 80.5,69.8,82.0,18.0,null,null,12.3,null,83.0,null,73.0,74,
 1000,16,null,4.5,["Image","Video"],"MoE","Non-Reasoning(17B/400B)",1390,"Llama4",0.22,0.88,
 4,"1M ctx · enterprise cloud default",4,"AWS/Azure built-in · Maverick > Scout",
 "https://huggingface.co/meta-llama",null,null],

["Claude Haiku 4.5","Anthropic","#d97706","closed","flagship","#b45309","2025.09",
 72.0,75.0,null,null,null,null,14.0,null,86.5,null,68.0,71,
 200,8,null,0.4,["Image"],"Dense","Non-Reasoning",1350,"Prop",1.00,5.00,
 5,"Pareto frontier · fastest Anthropic",5,"TTFT 0.4s · Terminal Bench 3rd",
 "https://anthropic.com/claude",35.5,null],

["Grok 4.1 Fast","xAI","#1d9bf0","closed","flagship","#0ea5e9","2025.11",
 null,85.3,88.0,null,null,null,null,null,null,null,null,72,
 2000,16,null,1.5,["Image","Video"],"Dense","Reasoning",1380,"Prop",0.20,0.80,
 4,"$0.20/M · 2M ctx · cheapest frontier",4,"τ²-bench 100% · ultra low cost",
 "https://x.ai/grok",null,null],

["DeepSeek R2","DeepSeek","#6366f1","open","value","#4f46e5","2026.02",
 87.0,88.0,93.8,null,null,null,null,null,84.0,null,null,76,
 128,8,null,9.0,["Text"],"MoE","Reasoning(671B)",1450,"MIT",0.55,2.19,
 5,"AIME 93.8% math king · MIT",5,"Math/science #1 · R1 successor",
 "https://huggingface.co/deepseek-ai",null,null],

["Phi-4","Microsoft","#00a4ef","open","value","#0078d4","2024.12",
 null,73.0,null,null,null,null,null,null,null,null,72.0,68,
 16,4,null,2.5,["Image"],"Dense","Non-Reasoning(14B)",1310,"MIT",null,null,
 5,"14B beats 70B · MIT · edge #1",5,"HF trending top 1% · RTX 3060 OK",
 "https://huggingface.co/microsoft/phi-4",null,null],

// ========== 🇰🇷 Korean Sovereign AI — National Foundation Model Elite Teams (2026.02) ==========
["K-EXAONE","LG AI Research","#a50034","open","korean","#c9002b","2025.12",
 81.8,75.4,85.3,null,null,null,null,null,null,null,49.4,72,
 260,16,null,null,["Image","Text"],"MoE","Reasoning(236B, K-Foundation)",null,"Research",0,0,
 5,"MMLU-P 81.8 · GPQA 75.4 · AIME 85.3 · SWE-V 49.4",5,"K-EXAONE Technical Report verified · Sovereign AI",
 "https://huggingface.co/LGAI-EXAONE",null,null],

["A.X K1","SK Telecom","#e8002d","closed","korean","#ff1a1a","2025.12",
 null,null,null,null,null,null,null,null,null,null,null,62,
 64,16,null,null,["Text"],"MoE","Reasoning(500B, K-Foundation)",null,"Apache2",0,0,
 4,"Korea's largest 500B · Korean &amp; industry specialized",4,"SKT first 500B params · Sovereign AI",
 "https://www.sktelecom.com",null,null],

["Solar Open 100B","Upstage","#005baa","open","korean","#0a6fbb","2025.12",
 80.4,68.1,84.3,null,null,null,74.2,null,null,null,null,68,
 100,16,null,null,["Text"],"MoE","Reasoning(100B, K-Foundation)",null,"Apache2",0,0,
 5,"100B · AIME 84.3 · 19.7T training",5,"Upstage · Math &amp; coding specialized · Sovereign AI",
 "https://huggingface.co/upstage/Solar-Open-100B",null,null],

["Motif AI","Motif Technologies","#2d6be4","closed","korean","#4285f4","2026.02",
 null,null,null,null,null,null,null,null,null,null,null,55,
 128,16,null,null,["Text"],"Dense","Non-Reasoning(K-Foundation)",null,"Prop",0,0,
 3,"Wildcard selection 2026.02.20",3,"Foundation 4th team · benchmarks TBA",
 "https://motif.ai",null,null],

// ========== 🇰🇷 KT Mi:dm 2.0 — Korea-centric AI ==========
["Mi:dm 2.0 Base","KT","#e60012","open","korean","#ff1a33","2025.07",
 null,null,null,null,null,null,null,null,null,null,null,null,
 32,4,null,null,["Text"],"Dense","Non-Reasoning(11.5B, Llama-DuS)",null,"MIT",0,0,
 4,"11.5B Korean-centric · KMMLU 57.3 · Ko-MTBench 89.7",4,"KT Mi:dm · Korea-centric AI · MIT · Sovereign AI",
 "https://huggingface.co/K-intelligence/Midm-2.0-Base-Instruct",null,null],

// ========== 🆕 v1.1 NEW — Nanbeige (南北阁 by Kanzhun) ==========
["Nanbeige4.1-3B","Nanbeige","#f43f5e","open","value","#f43f5e","2026.03",
 null,83.8,null,12.6,null,null,null,56.5,null,76.9,null,null,
 131,131,null,null,["Text"],"Dense","Reasoning(3B)",null,"Apache2",0,0,
 5,"3B GPQA 83.8 · BFCL 56.5 · Deep Search",5,"3B > Qwen3-32B · Tiny model SOTA · Agentic pioneer",
 "https://huggingface.co/Nanbeige/Nanbeige4.1-3B",null,null],

// ========== 🆕 v1.2 NEW — MiniMax (AI Tiger) ==========
["MiniMax-M2.5","MiniMax","#ff6b35","open","flagship","#ff6b35","2026.02",
 82.0,84.8,86.3,19.1,null,60.54,null,null,87.5,82.6,80.2,null,
 1000,64,47,3.3,["Text"],"MoE","Reasoning(10B/230B)",null,"MIT",0.30,1.20,
 5,"SWE-V 80.2% SOTA · LCB 82.6 · MIT",5,"Agent/coding king · AI Tiger · SWE-V #1",
 "https://huggingface.co/MiniMaxAI/MiniMax-M2.5",42.2,null],

// ========== 🆕 v1.2 NEW — StepFun (AI Tiger) ==========
["Step-3.5-Flash","StepFun","#7c3aed","open","flagship","#7c3aed","2026.02",
 null,null,97.3,null,null,null,null,null,null,86.4,74.4,null,
 256,32,300,null,["Text"],"MoE","Reasoning(11B/196B)",null,"Apache2",null,null,
 5,"AIME 97.3% · 300 tok/s · 11B active",5,"AI Tiger · agentic frontier · edge MoE",
 "https://huggingface.co/stepfun-ai/Step-3.5-Flash",51.0,null],

// ========== 🆕 v1.3 NEW — OpenAI GPT-5.4 (2026.03.05 released) ==========
["GPT-5.4","OpenAI","#10a37f","closed","flagship","#10a37f","2026.03",
 null,92.8,null,52.1,73.3,null,57.7,null,null,null,null,null,
 1000,64,null,null,["Image"],"Dense","Reasoning(Computer Use)",null,"Prop",2.50,15.0,
 4,"HLE 52.1 #1 · ARC-AGI 73.3 · CU SOTA",5,"Most capable · Computer Use native · 1M ctx · HLE #1",
 "https://openai.com/gpt-5",null,null],

// ========== 🆕 v2.0 NEW — GPT-5.1 (GPT-5 upgrade, Nov 2025) ==========
["GPT-5.1","OpenAI","#10a37f","closed","flagship","#34d399","2025.11",
 null,88.1,94.0,26.0,17.0,null,null,null,null,null,74.9,null,
 400,64,null,1.0,["Image"],"Dense","Reasoning(Adaptive)",1480,"Prop",1.25,10.0,
 4,"GPT-5 upgrade · GPQA 88.1",4,"Predecessor to 5.2 · writing praised",
 "https://openai.com/gpt-5",null,null],

// ========== 🆕 v2.0 NEW — Gemini 3 Pro (Nov 2025 flagship) ==========
["Gemini 3 Pro","Google","#4285f4","closed","flagship","#34a853","2025.11",
 null,91.9,95.0,37.5,31.1,null,null,null,null,null,76.2,85,
 1000,64,134,3.0,["Image","Video","Audio"],"Dense","Reasoning(DeepThink)",1490,"Prop",2.0,12.0,
 4,"ARC 31.1% · GPQA 91.9% · 1M ctx",4,"Gemini 3 flagship · 134 tok/s",
 "https://deepmind.google/technologies/gemini/",null,null],

// ========== 🆕 v2.0 NEW — Claude Sonnet 4.5 (Sep 2025) ==========
["Claude Sonnet 4.5","Anthropic","#d97706","closed","flagship","#f59e0b","2025.09",
 null,83.4,100,30.8,null,null,null,null,90.0,null,77.2,null,
 200,64,null,1.5,["Image"],"Dense","Reasoning(Hybrid)",1440,"Prop",3.0,15.0,
 4,"SWE 77.2% · best value 2025",4,"Coding SOTA at launch · agent pioneer",
 "https://anthropic.com/claude",51.0,null],

// ========== 🆕 v1.5 NEW — GPT-5-Nano (smallest GPT-5 family) ==========
["GPT-5-Nano","OpenAI","#10a37f","closed","value","#34d399","2025.08",
 null,null,null,null,null,null,null,null,null,null,null,null,
 400,16,null,0.2,["Image"],"Dense","Non-Reasoning(Nano)",null,"Prop",0.05,0.40,
 5,"$0.05/M · ultra-low cost · GPT-5 family",5,"Fastest GPT-5 · edge/mobile · 400K ctx",
 "https://openai.com/gpt-5",null,null],

// ========== 🆕 v1.5 NEW — Gemini 2.5 Flash-Lite (Google's lowest-cost 2.5) ==========
["Gemini 2.5 FL-Lite","Google","#4285f4","closed","value","#34a853","2025.06",
 null,null,null,null,null,null,null,null,null,null,null,null,
 1000,64,null,0.5,["Image","Video","Audio"],"Dense","Non-Reasoning+Thinking",null,"Prop",0.10,0.40,
 5,"$0.10/M · lowest cost Gemini 2.5",5,"1M ctx · ultra-fast · GA stable",
 "https://deepmind.google/technologies/gemini/flash/",null,null],

// ========== 🆕 v1.5 NEW — Qwen3-Next-80B-A3B-Thinking (hybrid attention + ultra-sparse MoE) ==========
["Qwen3-Next-80B","Alibaba","#f97316","open","qwen","#ea580c","2025.09",
 82.7,77.2,null,null,null,null,null,49.7,88.9,68.7,null,81.3,
 262,32,null,null,["Text"],"MoE+Hybrid","Reasoning(3B/80B)",null,"NCML",0.15,1.20,
 5,"3B active · Hybrid Attention · 10x throughput",5,"Qwen3-Next · GatedDeltaNet · MTP",
 "https://huggingface.co/Qwen/Qwen3-Next-80B-A3B-Thinking",null,null]
];

// ========== COMPOSITE SCORE — √Coverage Weighted (v1.5) ==========
// 5-Axis Intelligence Framework: Knowledge · Expert Reasoning · Abstract Reasoning · Metacognition · Execution
// 10 benchmarks: MMLU-Pro(Knowledge) · GPQA+AIME+HLE(Expert Reasoning) · ARC-AGI-2(Abstract) · Metacog(Metacognition) · SWE-Pro+BFCL+IFEval+LCB(Execution)
// v1.5 CHANGE: SWE-Verified replaced with LCB (LiveCodeBench) — SWE-V has 59.4% defective tasks per OpenAI audit
// Formula: Score = Avg(confirmed) × √(N/10)
function compCoverage(r){
  const keys=[r[7],r[8],r[9],r[10],r[11],r[12],r[13],r[14],r[15],r[16]];
  return keys.filter(x=>x!==null&&x!==undefined).length;
}
function compScore(r){
  const keys=[r[7],r[8],r[9],r[10],r[11],r[12],r[13],r[14],r[15],r[16]];
  const nonNull=keys.filter(x=>x!==null&&x!==undefined);
  if(!nonNull.length)return null;
  const avg=nonNull.reduce((a,b)=>a+b,0)/nonNull.length;
  const coverage=nonNull.length/10;
  return Math.round(avg*Math.sqrt(coverage)*10)/10;
}

// ========== GRADE COLOR ==========
function gc(v,mx){
  if(v===null||v===undefined)return null;
  const p=mx?v/mx*100:v;
  if(p>=90)return"#6366f1";
  if(p>=75)return"#0d9488";
  if(p>=60)return"#d97706";
  return"#e11d48";
}

// ========== SCORE CELL ==========
function scoreCell(v,max,cls){
  if(v===null||v===undefined)return`<span class="na">—</span>`;
  const c=gc(v,max),p=max?(v/max*100):v,pct=Math.min(p,100);
  return`<div class="sc ${cls||''}"><span class="sn" style="color:${c}">${v}</span><div class="sb"><div class="sf" style="width:${pct}%;background:${c}"></div></div></div>`;
}

// ========== METACOG CELL ==========
function metaCell(v){
  if(v===null||v===undefined)return`<span class="na">—</span>`;
  const c=v>=65?"#6366f1":v>=55?"#0d9488":v>=45?"#d97706":"#e11d48";
  const lbl=v>=65?"S":v>=55?"A":v>=45?"B":"C";
  return`<div class="sc meta-col"><span class="sn" style="color:${c}">${v}<span style="font-size:7px;margin-left:1px;opacity:.7">${lbl}</span></span><div class="sb"><div class="sf" style="width:${Math.min(v,100)}%;background:${c}"></div></div></div>`;
}

// ========== ARC-AGI CELL ==========
function arcCell(v){
  if(v===null||v===undefined)return`<span class="na">—</span>`;
  const c=v>=75?"#0ea5e9":v>=40?"#06b6d4":v>=20?"#0891b2":"#64748b";
  const pct=Math.min(v,100);
  return`<div class="sc arc-col"><span class="sn" style="color:${c}">${v}%</span><div class="sb"><div class="sf" style="width:${pct}%;background:${c}"></div></div></div>`;
}

// ========== PROVIDER BADGE ==========
function provBadge(r){
  const c=r[2],n=r[1];
  const bg=c+'1a',brd=c+'40';
  return`<span class="prov" style="background:${bg};color:${c};border-color:${brd}">${n}</span>`;
}

// ========== ARCH CELL ==========
function archCell(r){
  const t=r[24],d=r[25];
  const cls=t.includes("MoE")?"at-moe":t.includes("Hybrid")?"at-hyb":"at-den";
  return`<div class="at"><span class="atb ${cls}">${t}</span><span style="font-size:7px;color:var(--text-muted);font-family:var(--font-mono)">${d}</span></div>`;
}

// ========== VISION CELL ==========
function visCell(vis){
  if(!vis||vis.length===0)return`<span class="na">Text</span>`;
  if(vis.includes("Text")&&vis.length===1)return`<span class="na">Text</span>`;
  return`<div class="vis">${vis.map(v=>{
    if(v==="Image")return`<span class="vb vi">Img</span>`;
    if(v==="Video")return`<span class="vb vv">Vid</span>`;
    if(v==="Audio")return`<span class="vb va">Aud</span>`;
    return`<span class="vb vt">${v}</span>`;
  }).join('')}</div>`;
}

// ========== LICENSE ==========
function licCell(l){
  const m={"Apache2":"la","MIT":"lm","Prop":"lp","Meta":"ll"};
  return`<span class="lic ${m[l]||'lp'}">${l==="Prop"?"Proprietary":l}</span>`;
}

// ========== PRICE ==========
function priceCell(r){
  const i=r[28],o=r[29];
  if(i===null||i===undefined)return`<span class="na">—</span>`;
  if(i===0)return`<div class="pr"><span class="pri" style="color:#16a34a">Free</span><span class="pro">open weights</span></div>`;
  return`<div class="pr"><span class="pri">$${i}</span><span class="pro">out $${o}</span></div>`;
}

// ========== COMPOSITE DISPLAY with Coverage Badge ==========
function compCell(r){
  const cs=compScore(r);
  if(cs===null)return`<span class="na">—</span>`;
  const c=gc(cs,100);
  const n=compCoverage(r);
  // Badge: ✓Full(7+), ◐Partial(4-6), ○Limited(<4)
  let badge,badgeC;
  if(n>=7){badge='✓';badgeC='#16a34a';}
  else if(n>=4){badge='◐';badgeC='#d97706';}
  else{badge='○';badgeC='#e11d48';}
  return`<div class="comp"><span class="compN" style="color:${c}">${cs}</span><div style="display:flex;align-items:center;gap:2px;justify-content:center"><span style="font-size:6.5px;color:${badgeC};font-weight:800">${badge}</span><span style="font-size:7px;font-family:var(--font-mono);color:var(--text-muted)">${n}/10</span></div></div>`;
}

// ========== v2.1: CONFIDENCE & SOURCE SYSTEM ==========
const VERIFIED_DATE='2026-03-08';
const SRC={};
function addSrc(model,keys,level,source){
  if(!SRC[model])SRC[model]={};
  (Array.isArray(keys)?keys:[keys]).forEach(k=>{SRC[model][k]={l:level,s:source};});
}
// level: 2=✓✓ cross-verified, 1=✓ single source, 0=~ self-reported
// --- GPT family ---
addSrc('GPT-5.4',[7,8,9,10,13,15,16],1,'OpenAI official');
addSrc('GPT-5.4',[11],2,'OpenAI + arcprize.org');
addSrc('GPT-5.2',[7,8,9,15,16,17],2,'OpenAI + Vellum + DataCamp');
addSrc('GPT-5.2',[10],1,'OpenAI official');
addSrc('GPT-5.2',[11],2,'OpenAI + arcprize.org');
addSrc('GPT-5.2',[18],1,'OpenAI official');
addSrc('GPT-5.3 Codex',[13,16],2,'OpenAI + Scale AI SEAL');
addSrc('GPT-5.1',[8,9],1,'OpenAI official');
addSrc('GPT-5-Nano',[7,8,9,15],1,'OpenAI official');
addSrc('GPT-OSS-120B',[7,8,9],1,'OpenAI official');
addSrc('GPT-OSS-20B',[7,8,9],1,'OpenAI official');
// --- Claude family ---
addSrc('Claude Opus 4.6',[8],2,'Anthropic + Vellum + DataCamp');
addSrc('Claude Opus 4.6',[9],2,'Anthropic + Vellum + NxCode');
addSrc('Claude Opus 4.6',[10],2,'Vellum + digitalapplied');
addSrc('Claude Opus 4.6',[11],2,'Vellum + llm-stats + NxCode + DataCamp');
addSrc('Claude Opus 4.6',[13],2,'Anthropic + Scale AI SEAL');
addSrc('Claude Opus 4.6',[15],2,'Anthropic + Vellum');
addSrc('Claude Opus 4.6',[16,17],1,'Anthropic official');
addSrc('Claude Opus 4.6',[12],1,'FINAL Bench dataset');
addSrc('Claude Sonnet 4.6',[8,9,11],2,'Anthropic + Vellum + NxCode');
addSrc('Claude Sonnet 4.6',[13,15,17],1,'Anthropic official');
addSrc('Claude Sonnet 4.5',[8,9],2,'Anthropic + Vellum');
addSrc('Claude Sonnet 4.5',[13,15],1,'Anthropic official');
addSrc('Claude Haiku 4.5',[7,8,9,15],1,'Anthropic official');
// --- Gemini family ---
addSrc('Gemini 3.1 Pro',[8],2,'Google DeepMind + PCMag + NxCode');
addSrc('Gemini 3.1 Pro',[9,10],2,'Google DeepMind + Vellum');
addSrc('Gemini 3.1 Pro',[11],2,'Google DeepMind + arcprize.org + NxCode + DataCamp');
addSrc('Gemini 3.1 Pro',[17],2,'Google DeepMind + marc0.dev');
addSrc('Gemini 3.1 Pro',[7,13,15,16,18],1,'Google DeepMind model card');
addSrc('Gemini 3 Pro',[8,9,10],1,'Google DeepMind');
addSrc('Gemini 3 Flash',[7,8,9,15,16,17,18],1,'Google DeepMind model card');
addSrc('Gemini 2.5 FL-Lite',[7,8,9],1,'Google DeepMind');
// --- Grok ---
addSrc('Grok 4 Heavy',[7,8,9,10,11,13,15,16],1,'xAI official');
addSrc('Grok 4.1 Fast',[7,8,9,13,15],1,'xAI official');
// --- DeepSeek ---
addSrc('DeepSeek V3.2',[7,8,9,15,16],2,'DeepSeek + AA Intelligence Index');
addSrc('DeepSeek R1',[7,8,9,15],2,'DeepSeek + AA Intelligence Index');
addSrc('DeepSeek R2',[7,8,9,13,15,16],1,'DeepSeek official');
// --- Kimi ---
addSrc('Kimi K2.5',[7,8,9,10],2,'Moonshot AI + AA Intelligence Index');
addSrc('Kimi K2.5',[11],1,'Moonshot AI official');
addSrc('Kimi K2.5',[12],1,'FINAL Bench dataset');
addSrc('Kimi K2.5',[16],1,'Moonshot AI official');
// --- Qwen ---
addSrc('Qwen3.5-397B',[7,8,9,13,15,16],1,'Alibaba Cloud official');
addSrc('Qwen3.5-122B',[7,8,9,15],1,'Alibaba Cloud official');
addSrc('Qwen3.5-27B',[7,8,9],1,'Alibaba Cloud official');
addSrc('Qwen3.5-35B',[7,8,9],1,'Alibaba Cloud official');
addSrc('Qwen3.5-Flash',[7,8,9],1,'Alibaba Cloud official');
addSrc('Qwen3.5-9B',[7,8],1,'Alibaba Cloud official');
addSrc('Qwen3.5-4B',[7,8],1,'Alibaba Cloud official');
addSrc('Qwen3-Next-80B',[7,8,9,15],1,'Alibaba Cloud official');
// --- Korean AI ---
addSrc('K-EXAONE',[7,8,9],2,'Korea Herald + K-EXAONE Technical Report');
addSrc('K-EXAONE',[17],1,'K-EXAONE Technical Report');
addSrc('A.X K1',[7,8],0,'Self-reported benchmark');
addSrc('Solar Open 100B',[7,8],0,'Upstage self-reported');
addSrc('Mi:dm 2.0 Base',[7],0,'Self-reported');
// --- Others ---
addSrc('GLM-5',[7,8,9,15,16],1,'Zhipu AI official');
addSrc('Llama 4 Scout',[7,8,9,15],2,'Meta + AA Intelligence Index');
addSrc('Llama 4 Maverick',[7,8,9,15],2,'Meta + AA Intelligence Index');
addSrc('Mistral Large 3',[7,8,15],1,'Mistral AI official');
addSrc('Phi-4',[7,8,9],1,'Microsoft official');
addSrc('MiniMax-M2.5',[7,8,9],1,'MiniMax official');
addSrc('Step-3.5-Flash',[7,8],1,'StepFun official');
addSrc('Motif AI',[7,8,9],0,'Self-reported');
addSrc('Nanbeige4.1-3B',[7,8],0,'Self-reported');

function confBadge(modelName,keyIdx){
  const c=SRC[modelName]?SRC[modelName][keyIdx]:null;
  if(!c)return'';
  const map={2:{sym:'✓✓',c:'#16a34a',t:'Cross-verified'},1:{sym:'✓',c:'#d97706',t:'Single source'},0:{sym:'~',c:'#e11d48',t:'Self-reported'}};
  const s=map[c.l]||map[0];
  return` <span title="${s.t}: ${c.s}\nVerified: ${VERIFIED_DATE}" style="font-size:6px;color:${s.c};font-weight:800;cursor:help;vertical-align:super;letter-spacing:-0.5px">${s.sym}</span>`;
}

// Wrapper: score cell with confidence badge
function scoreCellC(r,keyIdx,max,cls){
  const base=keyIdx===12?metaCell(r[keyIdx]):keyIdx===11?arcCell(r[keyIdx]):scoreCell(r[keyIdx],max,cls);
  return base+confBadge(r[0],keyIdx);
}
// ========== BUILD TABLE ==========
function buildTable(data){
  const tb=document.getElementById('TB');
  tb.innerHTML='';
  data.forEach(r=>{
    const isVal=r[30]>=4&&r[3]==='open';
    const cs=compScore(r);
    const tr=document.createElement('tr');
    tr.className=isVal?'hl':'';
    tr.dataset.group=r[4];
    tr.dataset.type=r[3];
    tr.dataset.arch=r[24]||'';
    tr.dataset.vis=JSON.stringify(r[23]||[]);
    tr.dataset.val=r[30]||0;
    tr.dataset.name=r[0].toLowerCase();
    tr.innerHTML=`
      <td class="c-model">
        <div class="mc">
          <div class="mn">
            <a href="${r[34]}" target="_blank">${r[0]}</a>
            <span class="link-icon">↗</span>
            ${r[4]==='korean'?'<span style="font-size:11px;background:linear-gradient(135deg,#c9002b22,#00347822);border:1px solid #c9002b44;border-radius:4px;padding:1px 4px;color:#c9002b;font-weight:700;font-family:var(--font-mono)">🇰🇷 K-AI</span>':''}
          </div>
          <div class="ms">
            <div class="dot" style="background:${r[5]}"></div>
            <span class="pb ${r[3]==='open'?'ob':'cb'}">${r[3]}</span>
            <span class="mp">${r[6]}</span>
          </div>
        </div>
      </td>
      <td>${provBadge(r)}</td>
      <td>${compCell(r)}</td>
      <td><span class="rel" style="font-family:var(--font-mono);font-size:9px;color:var(--text-muted)">${r[6]}</span></td>
      <td data-col="4">${scoreCell(r[7],100)}${confBadge(r[0],7)}</td>
      <td data-col="5">${scoreCell(r[8],100)}${confBadge(r[0],8)}</td>
      <td data-col="6">${scoreCell(r[9],100)}${confBadge(r[0],9)}</td>
      <td data-col="7">${scoreCell(r[10],100)}${confBadge(r[0],10)}</td>
      <td data-col="8" class="arc-col">${arcCell(r[11])}${confBadge(r[0],11)}</td>
      <td data-col="9" class="meta-col">${metaCell(r[12])}${confBadge(r[0],12)}</td>
      <td data-col="10">${scoreCell(r[13],100)}${confBadge(r[0],13)}</td>
      <td data-col="11">${scoreCell(r[14],100)}${confBadge(r[0],14)}</td>
      <td data-col="12">${scoreCell(r[15],100)}${confBadge(r[0],15)}</td>
      <td data-col="13">${scoreCell(r[16],100)}${confBadge(r[0],16)}</td>
      <td data-col="35">${r[35]!==null&&r[35]!==undefined?scoreCell(r[35],100)+confBadge(r[0],35):'<span class="na">—</span>'}</td>
      <td data-col="36">${r[36]!==null&&r[36]!==undefined?scoreCell(r[36],100)+confBadge(r[0],36):('<span class="na">—</span>')}</td>
      <td data-col="14" style="opacity:.75">${scoreCell(r[17],100)}${confBadge(r[0],17)}</td>
      <td data-col="15">${scoreCell(r[18],100)}${confBadge(r[0],18)}</td>
      <td data-col="16"><span class="tk">${r[19]?r[19]+'K':'—'}</span></td>
      <td data-col="17"><span class="tk">${r[20]?r[20]+'K':'—'}</span></td>
      <td data-col="18">${r[21]?`<span style="font-family:var(--font-mono);font-size:10px;color:#0d9488">${r[21]}</span>`:'<span class="na">—</span>'}</td>
      <td data-col="19">${r[22]!==null&&r[22]!==undefined?`<span style="font-family:var(--font-mono);font-size:10px;font-weight:700;color:${r[22]<=1?'#16a34a':r[22]<=3?'#d97706':'#e11d48'}">${r[22]}s</span>`:'<span class="na">—</span>'}</td>
      <td data-col="20">${visCell(r[23])}</td>
      <td data-col="21">${archCell(r)}</td>
      <td data-col="22">${r[26]?`<span class="eloc" style="font-family:var(--font-mono);font-size:10px;font-weight:700">${r[26]}</span>`:'<span class="na">—</span>'}</td>
      <td data-col="23">${licCell(r[27])}</td>
      <td data-col="24">${priceCell(r)}</td>
    `;
    tb.appendChild(tr);
  });
}
buildTable(D);

// ========== SORTING ==========
let sortDir=1,lastCol=-1;
function srt(col){
  if(lastCol===col)sortDir*=-1; else sortDir=1;
  lastCol=col;
  const th=document.querySelectorAll('th');
  th.forEach(t=>t.classList.remove('on'));
  if(th[col])th[col].classList.add('on');

  const arr=[...D].sort((a,b)=>{
    let va,vb;
    switch(col){
      case 0:va=a[0];vb=b[0];break;
      case 2:va=compScore(a)||0;vb=compScore(b)||0;break;
      case 3:va=a[6];vb=b[6];break;
      case 4:va=a[7]||0;vb=b[7]||0;break;
      case 5:va=a[8]||0;vb=b[8]||0;break;
      case 6:va=a[9]||0;vb=b[9]||0;break;
      case 7:va=a[10]||0;vb=b[10]||0;break;
      case 8:va=a[11]||0;vb=b[11]||0;break;
      case 9:va=a[12]||0;vb=b[12]||0;break;
      case 10:va=a[13]||0;vb=b[13]||0;break;
      case 11:va=a[14]||0;vb=b[14]||0;break;
      case 12:va=a[15]||0;vb=b[15]||0;break;
      case 13:va=a[16]||0;vb=b[16]||0;break;
      case 14:va=a[17]||0;vb=b[17]||0;break;
      case 15:va=a[18]||0;vb=b[18]||0;break;
      case 16:va=a[19]||0;vb=b[19]||0;break;
      case 17:va=a[20]||0;vb=b[20]||0;break;
      case 18:va=a[21]||0;vb=b[21]||0;break;
      case 19:va=a[22]||99;vb=b[22]||99;break;
      case 22:va=a[26]||0;vb=b[26]||0;break;
      case 24:va=a[28]||0;vb=b[28]||0;break;
      case 35:va=a[35]||0;vb=b[35]||0;break;
      case 36:va=a[36]||0;vb=b[36]||0;break;
      default:va=0;vb=0;
    }
    if(typeof va==='string')return va.localeCompare(vb)*sortDir;
    return(va-vb)*sortDir;
  });
  buildTable(arr);
  applyFilter(currentFilter);
  applySearch(document.getElementById('searchBox').value);
  applyHiddenCols();
}

// ========== Default sort: Composite Score descending ==========
(function defaultSort(){
  sortDir=-1; lastCol=2;
  const arr=[...D].sort((a,b)=>(compScore(b)||0)-(compScore(a)||0));
  buildTable(arr);
  const th=document.querySelectorAll('th');
  if(th[2])th[2].classList.add('on');
})();
let currentFilter='all';
function flt(f,btn){
  currentFilter=f;
  document.querySelectorAll('.fb').forEach(b=>b.classList.remove('on'));
  btn.classList.add('on');
  applyFilter(f);
}
function applyFilter(f){
  document.querySelectorAll('#TB tr').forEach(tr=>{
    const g=tr.dataset.group,tp=tr.dataset.type,arch=tr.dataset.arch;
    const vis=JSON.parse(tr.dataset.vis||'[]'),val=parseInt(tr.dataset.val||0);
    let show=true;
    if(f==='open')show=tp==='open';
    else if(f==='closed')show=tp==='closed';
    else if(f==='qwen')show=g==='qwen';
    else if(f==='gptoss')show=g==='gptoss';
    else if(f==='reasoning')show=arch.toLowerCase().includes('reasoning');
    else if(f==='moe')show=arch.toLowerCase().includes('moe');
    else if(f==='vision')show=vis.some(v=>['Image','Video','Audio'].includes(v));
    else if(f==='value')show=val>=4&&tp==='open';
    else if(f==='flagship')show=g==='flagship';
    else if(f==='korean')show=g==='korean';
    if(!show)tr.classList.add('hidden'); else tr.classList.remove('hidden');
  });
  applySearch(document.getElementById('searchBox').value);
}

// ========== SEARCH ==========
function doSearch(q){applySearch(q);}
function applySearch(q){
  const s=q.toLowerCase().trim();
  document.querySelectorAll('#TB tr').forEach(tr=>{
    if(!s){tr.classList.remove('search-hidden');return;}
    const n=tr.dataset.name||'';
    if(n.includes(s))tr.classList.remove('search-hidden');
    else tr.classList.add('search-hidden');
  });
}

// ========== COLUMN TOGGLE ==========
const colLabels={4:"MMLU-Pro",5:"GPQA◆",6:"AIME25",7:"HLE",8:"ARC-AGI-2",9:"Metacog",10:"SWE-Pro",11:"BFCL",12:"IFEval",13:"LCB",35:"TB2.0★",36:"SciCode★",14:"SWE-V",15:"MMMLU",16:"CtxIn",17:"CtxOut",18:"tok/s",19:"TTFT",20:"Vision",21:"Arch",22:"ELO",23:"License",24:"$/M"};
const hiddenCols=new Set();

function buildColMenu(){
  const menu=document.getElementById('colMenu');
  menu.innerHTML='';
  Object.entries(colLabels).forEach(([ci,label])=>{
    const d=document.createElement('label');
    d.className='col-chk';
    d.innerHTML=`<input type="checkbox" checked onchange="toggleCol(${ci},this.checked)"> ${label}`;
    menu.appendChild(d);
  });
}
buildColMenu();

// ========== FLAGSHIP VLM DATA (v2.1) ==========
// [MMMU, MMMU-Pro, MathVista, AI2D, OCRBench(÷10), MMStar, HallusionBench, MMBenchEN, RealWorldQA, VideoMME]
// OCRBench is /1000, others are %. For display: OCRBench shown as raw score.
const VLF_MODELS=[
  {name:"Gemini 3 Flash",color:"#34a853",prov:"Google",type:"closed",conf:2,src:"Vals.ai + Google"},
  {name:"Gemini 3 Pro",color:"#4285f4",prov:"Google",type:"closed",conf:2,src:"Vals.ai + Google DeepMind"},
  {name:"Gemini 3.1 Pro",color:"#1a73e8",prov:"Google",type:"closed",conf:1,src:"Artificial Analysis independent eval"},
  {name:"GPT-5.2",color:"#10a37f",prov:"OpenAI",type:"closed",conf:2,src:"Vals.ai + OpenAI official"},
  {name:"GPT-5 (original)",color:"#ec4899",prov:"OpenAI",type:"closed",conf:1,src:"OpenAI official"},
  {name:"Claude Opus 4.6",color:"#d97706",prov:"Anthropic",type:"closed",conf:1,src:"Anthropic + digitalapplied"},
  {name:"Grok 4 Heavy",color:"#ef4444",prov:"xAI",type:"closed",conf:1,src:"Vals.ai"},
  {name:"InternVL3.5-241B",color:"#3b82f6",prov:"OpenGVLab",type:"open",conf:1,src:"InternVL3.5 paper arXiv"},
  {name:"InternVL3-78B",color:"#6366f1",prov:"OpenGVLab",type:"open",conf:2,src:"InternVL3 paper + OpenCompass"},
  {name:"Qwen2.5-VL-72B",color:"#f97316",prov:"Alibaba",type:"open",conf:2,src:"DataCamp + Qwen HF model card"},
  {name:"Kimi-VL-A3B-Thinking",color:"#8b5cf6",prov:"Moonshot",type:"open",conf:1,src:"Moonshot AI official"},
];
const VLF_DATA=[
  // Gemini 3 Flash: MMMU 87.63 (Vals.ai independent eval ✓✓), MMMU-Pro 80.0 (Artificial Analysis ✓)
  [87.6,80.0,null,null,null,null,null,null,null,null],
  // Gemini 3 Pro: MMMU 87.51 (Vals.ai ✓✓), MMMU-Pro 80.0 (Artificial Analysis ✓)
  [87.5,80.0,null,null,null,null,null,null,null,null],
  // Gemini 3.1 Pro: MMMU-Pro 82.0 (Artificial Analysis independent eval ✓)
  [null,82.0,null,null,null,null,null,null,null,null],
  // GPT-5.2: MMMU 86.67 (Vals.ai independent eval ✓✓)
  [86.7,null,null,null,null,null,null,null,null,null],
  // GPT-5 (original): MMMU 84.2 (OpenAI official intro page ✓)
  [84.2,null,null,null,null,null,null,null,null,null],
  // Claude Opus 4.6: MMMU-Pro 85.1 (digitalapplied + SmartScope confirm ✓)
  [null,85.1,null,null,null,null,null,null,null,null],
  // Grok 4 Heavy: MMMU 76.5 (Vals.ai independent eval ✓)
  [76.5,null,null,null,null,null,null,null,null,null],
  // InternVL3.5-241B-A28B: MMMU 77.7 (arXiv:2508.18265 paper ✓)
  [77.7,null,null,null,null,null,null,null,null,null],
  // InternVL3-78B: MMMU 72.2 (arXiv paper ✓✓), MathVista 79.6 (arXiv table ✓✓), AI2D 89.7 (arXiv table ✓✓), OCR 90.6=906/1000 (paper ✓✓), Hallusion 59.1 (paper ✓✓), MMBench 89.0 (paper ✓✓), RealWorld 78.0 (paper ✓)
  [72.2,null,79.6,89.7,90.6,null,59.1,89.0,78.0,null],
  // Qwen2.5-VL-72B: MMMU 70.2 (DataCamp + HF model card ✓✓), MathVista 74.8 (HF ✓), MMStar 70.8 (HF ✓)
  [70.2,null,74.8,null,null,70.8,null,null,null,null],
  // Kimi-VL-A3B-Thinking-2506: MMMU 64.0, MMMU-Pro 46.3, MathVista 80.1, MMBench 84.4, MMStar 70.4, RealWorld 70.0 (all from DataCamp citing Moonshot AI ✓)
  [64.0,46.3,80.1,null,null,70.4,null,84.4,70.0,null],
];

const VLF_HEADERS=['MMMU','MMMU-Pro','MathVista','AI2D','OCRBench','MMStar','Hallusion','MMBenchEN','RealWorldQA','VideoMME'];

function buildFlagshipVLM(){
  const tb=document.getElementById('VTF');if(!tb)return;tb.innerHTML='';
  // Find column maxes
  const maxes=VLF_HEADERS.map((_,ci)=>{
    const vals=VLF_DATA.map(r=>typeof r[ci]==='number'?r[ci]:0);
    return Math.max(...vals);
  });
  // Sort by MMMU score descending (use max of MMMU and MMMU-Pro as proxy)
  const indices=VLF_DATA.map((_,i)=>i);
  indices.sort((a,b)=>{
    const sa=Math.max(VLF_DATA[a][0]||0,VLF_DATA[a][1]||0);
    const sb=Math.max(VLF_DATA[b][0]||0,VLF_DATA[b][1]||0);
    return sb-sa;
  });
  indices.forEach((ri,rank)=>{
    const m=VLF_MODELS[ri],row=VLF_DATA[ri];
    const confSym=m.conf===2?'<span style="color:#16a34a;font-size:6px;font-weight:800" title="Cross-verified: '+m.src+'">✓✓</span>':m.conf===1?'<span style="color:#d97706;font-size:6px;font-weight:800" title="Single source: '+m.src+'">✓</span>':'';
    const typeBadge=m.type==='open'?'<span style="font-size:7px;background:#16a34a22;color:#16a34a;padding:1px 4px;border-radius:3px;font-weight:700">OPEN</span>':'<span style="font-size:7px;background:#6366f122;color:#6366f1;padding:1px 4px;border-radius:3px;font-weight:700">API</span>';
    const tr=document.createElement('tr');
    if(rank<3)tr.style.background='rgba(99,102,241,0.03)';
    tr.innerHTML=`<td style="min-width:140px"><div style="display:flex;align-items:center;gap:4px">
      <span style="font-size:11px;font-weight:900;color:${rank<3?m.color:'var(--text-muted)'};min-width:16px">${rank+1}</span>
      <div><div style="font-size:10px;font-weight:700;color:${m.color}">${m.name}</div>
      <div style="font-size:8px;color:var(--text-muted)">${m.prov} ${typeBadge} ${confSym}</div></div>
    </div></td>`+row.map((v,ci)=>{
      if(v===null||v===undefined)return'<td><span class="na">—</span></td>';
      const isMax=v===maxes[ci]&&v>0;
      const n=parseFloat(v);
      const c=n>=85?'#6366f1':n>=70?'#0d9488':n>=50?'#d97706':'#e11d48';
      return`<td style="${isMax?'background:rgba(99,102,241,.08);':''}"><div class="sc"><span class="sn" style="color:${c};font-weight:${isMax?'900':'600'}">${v}</span><div class="sb"><div class="sf" style="width:${Math.min(n,100)}%;background:${c}"></div></div></div></td>`;
    }).join('');
    tb.appendChild(tr);
  });
}
buildFlagshipVLM();

// ========== VISION LANGUAGE DATA (Lightweight Detail) ==========
const VL_MODELS=[
  {name:"GPT-5-Nano",color:"#10a37f",prov:"OpenAI"},
  {name:"Gemini-2.5-FL-Lite",color:"#4285f4",prov:"Google"},
  {name:"Qwen3-VL-30B-A3B",color:"#f97316",prov:"Alibaba"},
  {name:"Qwen3.5-9B",color:"#ea580c",prov:"Alibaba"},
  {name:"Qwen3.5-4B",color:"#c2410c",prov:"Alibaba"}
];
// Table 1: STEM & Puzzle
// [MMMU, MMMU-Pro, MathVision, MathVista, We-Math, DynaMath, ZEROBench, ZEROBench_sub, VlmsAreBlind, BabyVision]
const VL1=[
  [75.8,57.2,62.2,71.5,62.5,78.0,1.0,22.2,66.7,14.4],
  [73.4,59.7,52.1,72.8,32.1,69.9,1.0,19.2,68.4,17.5],
  [76.0,63.0,65.7,81.9,70.0,80.1,0.0,23.7,72.5,18.6],
  [78.4,70.1,78.9,85.7,75.2,83.6,3.0,31.1,93.7,"28.6/25.8"],
  [77.6,66.3,74.6,85.1,75.4,83.3,3.0,26.3,92.6,"16.0/19.1"]
];
// Table 2: General VQA & Document
// [RealWorldQA, MMStar, MMBenchEN, SimpleVQA, HallusionBench, OmniDocBench, CharXiv, MMLongBench, CC-OCR, AI2D, OCRBench]
const VL2=[
  [71.8,68.6,80.3,46.0,58.4,55.9,50.1,31.8,58.9,81.9,75.3],
  [72.2,69.1,82.7,54.1,64.5,79.4,56.1,46.5,72.9,85.7,82.5],
  [77.4,75.5,88.9,54.3,66.0,86.8,56.6,47.4,77.8,86.9,83.9],
  [80.3,79.7,90.1,51.2,69.3,87.7,73.0,57.7,79.3,90.2,89.2],
  [79.5,78.3,89.4,43.4,65.0,86.2,70.8,54.2,76.7,89.6,85.0]
];
// Table 3: Spatial, Video, Agent, Medical
// [ERQA, CountBench, EmbSpatialBench, RefSpatialBench, LingoQA, VideoMME+sub, VideoMME, VideoMMMU, MLVU, MMVU, ScreenSpotPro, OSWorld, AndroidWorld, TIR-Bench, SLAKE, PMC-VQA, MedXpertQA]
const VL3=[
  [45.8,80.0,74.2,12.6,57.0,71.7,66.2,63.0,69.2,63.1,null,null,null,18.5,57.0,37.8,26.7],
  [44.3,79.2,66.1,11.2,17.8,74.6,72.7,69.2,78.5,65.3,null,null,null,21.5,65.0,48.8,35.3],
  [45.3,90.0,80.6,54.2,62.0,79.9,73.3,75.0,78.9,66.1,60.5,30.6,55.0,22.5,68.8,51.5,35.5],
  [55.5,97.2,83.0,58.5,80.4,84.5,78.4,78.9,84.4,67.8,65.2,41.8,57.8,"45.6/31.9",79.0,57.9,49.9],
  [54.0,96.3,81.3,54.6,74.4,83.5,76.9,74.1,82.8,64.9,60.3,35.6,58.6,"38.9/29.9",76.1,55.5,42.9]
];

function vlScoreCell(v){
  if(v===null||v===undefined)return'<span class="na">—</span>';
  const sv=String(v);
  if(sv.includes('/')){
    const parts=sv.split('/');
    const p=parseFloat(parts[0]);
    const c=p>=80?'#6366f1':p>=60?'#0d9488':p>=40?'#d97706':'#e11d48';
    return`<div class="sc"><span class="sn" style="color:${c};font-size:9px">${sv}</span></div>`;
  }
  const n=parseFloat(v);
  const c=n>=80?'#6366f1':n>=60?'#0d9488':n>=40?'#d97706':'#e11d48';
  return`<div class="sc"><span class="sn" style="color:${c}">${v}</span><div class="sb"><div class="sf" style="width:${Math.min(n,100)}%;background:${c}"></div></div></div>`;
}

function buildVLTables(){
  // Find max per column for highlighting
  function buildVLSection(tbId,data){
    const tb=document.getElementById(tbId);
    if(!tb)return;
    tb.innerHTML='';
    // find col maxes
    const maxes=data[0].map((_,ci)=>{
      const vals=data.map(r=>{const v=r[ci];return typeof v==='number'?v:typeof v==='string'?parseFloat(v):0;});
      return Math.max(...vals);
    });
    data.forEach((row,ri)=>{
      const m=VL_MODELS[ri];
      const tr=document.createElement('tr');
      tr.innerHTML=`<td class="c-model" style="min-width:140px"><div class="mc"><div class="mn" style="font-size:10px"><span style="display:inline-block;width:6px;height:6px;border-radius:50%;background:${m.color};margin-right:4px"></span>${m.name}</div><div class="mp">${m.prov}</div></div></td><td></td>`+row.map((v,ci)=>{
        const isMax=typeof v==='number'&&v===maxes[ci]&&v>0;
        return`<td style="${isMax?'background:rgba(99,102,241,.06);':''}font-weight:${isMax?'800':'400'}">${vlScoreCell(v)}</td>`;
      }).join('');
      tb.appendChild(tr);
    });
  }
  buildVLSection('VTB1',VL1);
  buildVLSection('VTB2',VL2);
  buildVLSection('VTB3',VL3);
}
buildVLTables();

// ========== AGENT BENCH DATA ==========
const AGENT_DATA=[
  ["GPT-5.4","OpenAI","#10a37f",75.0,null,82.7,null,83,null,null,null],
  ["Claude Opus 4.6","Anthropic","#d97706",72.7,91.9,84.0,74.7,1606,45.0,null,null],
  ["Claude Sonnet 4.6","Anthropic","#f59e0b",72.5,null,null,53.0,1633,null,null,null],
  ["Gemini 3.1 Pro","Google","#4285f4",null,99.3,85.9,78.4,1317,null,null,null],
  ["GPT-5.2","OpenAI","#10a37f",38.2,82.0,77.9,64.9,null,null,null,null],
  ["GPT-5.3 Codex","OpenAI","#047857",null,null,null,77.3,null,57.0,null,null],
  ["Gemini 3 Flash","Google","#34a853",null,null,null,64.3,null,null,null,null],
  ["Qwen3.5-9B","Alibaba","#f97316",null,79.9,null,null,null,null,66.1,57.8],
  ["Qwen3.5-4B","Alibaba","#c2410c",null,79.1,null,null,null,null,50.3,58.6],
  ["MiniMax-M2.5","MiniMax","#ff6b35",null,null,null,42.2,null,null,null,null],
];
function buildAgentTable(){
  const tb=document.getElementById('ATB');if(!tb)return;tb.innerHTML='';
  AGENT_DATA.forEach(r=>{
    const tr=document.createElement('tr');
    let cells=`<td class="c-model" style="min-width:140px"><div class="mc"><div class="mn" style="font-size:10.5px"><span style="display:inline-block;width:6px;height:6px;border-radius:50%;background:${r[2]};margin-right:4px"></span>${r[0]}</div><div class="mp">${r[1]}</div></div></td>`;
    for(let i=3;i<=10;i++){
      const v=r[i];
      if(v===null||v===undefined){cells+='<td><span class="na">—</span></td>';continue;}
      const isElo=i===7;
      if(isElo){const c=v>=1500?'#6366f1':v>=1300?'#0d9488':'#d97706';cells+=`<td><span style="font-family:var(--font-mono);font-size:10px;font-weight:700;color:${c}">${v}</span></td>`;}
      else{const c=v>=80?'#6366f1':v>=60?'#0d9488':v>=40?'#d97706':'#e11d48';cells+=`<td>${vlScoreCell(v)}</td>`;}
    }
    tr.innerHTML=cells;tb.appendChild(tr);
  });
}
buildAgentTable();

// ========== IMAGE GENERATION DATA ==========
const IMG_DATA=[
  ["GPT Image 1.5","OpenAI","2026.01","#1","S","A","S","S","B","$$","Prop"],
  ["Imagen 4","Google","2025.12","#2","S","A","S","A","S","$$","Prop"],
  ["Flux 2 Pro","BFL","2026.01","#3","S","A","A","S","A","$$","Prop"],
  ["Midjourney v7","Midjourney","2026.01","#4","A","S","B","B","A","$$","Prop"],
  ["Flux 2 Dev","BFL","2026.01","—","A","A","A","A","A","Free","Apache2"],
  ["Ideogram 3.0","Ideogram","2025.12","#5","A","B","S","A","A","$","Prop"],
  ["DALL-E 3.5","OpenAI","2025.08","#6","A","B","A","S","A","$$","Prop"],
  ["Nano Banana 2","Google","2025.12","—","A","A","B","A","S","$","Prop"],
  ["SD 3.5","Stability AI","2024.10","—","B","A","B","B","S","Free","Open"],
  ["Seedream 4.5","ByteDance","2025.11","—","A","B","B","A","S","$","Prop"],
];
function imgRatingCell(v){
  if(!v||v==='—')return'<span class="na">—</span>';
  const m={'S':{c:'#6366f1',bg:'rgba(99,102,241,.1)',b:'rgba(99,102,241,.2)'},'A':{c:'#0d9488',bg:'rgba(13,148,136,.1)',b:'rgba(13,148,136,.2)'},'B':{c:'#d97706',bg:'rgba(217,119,6,.1)',b:'rgba(217,119,6,.2)'},'C':{c:'#94a3b8',bg:'rgba(148,163,184,.1)',b:'rgba(148,163,184,.2)'}};
  const s=m[v]||m['C'];
  return`<span style="display:inline-block;padding:2px 8px;border-radius:4px;font-size:9px;font-family:var(--font-mono);font-weight:700;background:${s.bg};color:${s.c};border:1px solid ${s.b}">${v}</span>`;
}
function buildImageTable(){
  const tb=document.getElementById('ITB');if(!tb)return;tb.innerHTML='';
  const pc={"OpenAI":"#10a37f","Google":"#4285f4","BFL":"#1a1a2e","Midjourney":"#7c3aed","Ideogram":"#f97316","Stability AI":"#8b5cf6","ByteDance":"#0081fb"};
  IMG_DATA.forEach(r=>{
    const tr=document.createElement('tr');const cc=pc[r[1]]||'#64748b';
    const costM={'Free':'<span style="color:#16a34a;font-weight:700">Free</span>','$':'<span style="color:#0d9488">Low</span>','$$':'<span style="color:#d97706">Mid</span>'};
    const licM={'Prop':'<span class="lic lp">Proprietary</span>','Apache2':'<span class="lic la">Apache2</span>','Open':'<span class="lic lm">Open</span>'};
    tr.innerHTML=`<td class="c-model" style="min-width:150px"><div class="mc"><div class="mn" style="font-size:10.5px">${r[0]}</div></div></td>
      <td><span class="prov" style="background:${cc}1a;color:${cc};border-color:${cc}40;font-size:7.5px">${r[1]}</span></td>
      <td><span style="font-family:var(--font-mono);font-size:9px;color:var(--text-muted)">${r[2]}</span></td>
      <td><span style="font-family:var(--font-mono);font-size:10px;font-weight:700;color:${r[3]==='#1'?'#6366f1':r[3]==='#2'?'#0d9488':'var(--text-sec)'}">${r[3]}</span></td>
      <td>${imgRatingCell(r[4])}</td><td>${imgRatingCell(r[5])}</td><td>${imgRatingCell(r[6])}</td><td>${imgRatingCell(r[7])}</td><td>${imgRatingCell(r[8])}</td>
      <td style="font-family:var(--font-mono);font-size:9px">${costM[r[9]]||r[9]}</td><td>${licM[r[10]]||r[10]}</td>`;
    tb.appendChild(tr);
  });
}
buildImageTable();

// ========== VIDEO GENERATION DATA ==========
const VID_DATA=[
  ["Sora 2","OpenAI","2025.09","S","S","A","S","20s","1080p","$$$","Prop"],
  ["Veo 3.1","Google","2026.01","S","A","S","S","8s","4K","$$","Prop"],
  ["Runway Gen-4.5","Runway","2026.02","S","S","A","A","16s","1080p","$$","Prop"],
  ["Kling 3.0","Kuaishou","2026.02","A","A","A","A","5min","1080p","$","Prop"],
  ["Seedance 2.0","ByteDance","2026.01","S","A","S","A","10s","2K","$$","Prop"],
  ["Wan 2.6","Alibaba","2026.01","A","A","B","A","10s","1080p","Free","Open"],
  ["Pika 2.5","Pika","2025.12","B","B","B","A","10s","1080p","$","Prop"],
  ["Luma Ray3","Luma","2026.01","A","A","B","B","10s","4K","$$","Prop"],
  ["LTX-2","Lightricks","2026.01","A","B","A","B","10s","4K","Free","Open"],
  ["HaiLuo AI","MiniMax","2025.12","B","A","B","B","6s","1080p","$","Prop"],
];
function buildVideoTable(){
  const tb=document.getElementById('VIDTB');if(!tb)return;tb.innerHTML='';
  const pc={"OpenAI":"#10a37f","Google":"#4285f4","Runway":"#ff7043","Kuaishou":"#f97316","ByteDance":"#0081fb","Alibaba":"#f97316","Pika":"#e11d48","Luma":"#8b5cf6","Lightricks":"#14b8a6","MiniMax":"#ff6b35"};
  VID_DATA.forEach(r=>{
    const tr=document.createElement('tr');const cc=pc[r[1]]||'#64748b';
    const costM={'Free':'<span style="color:#16a34a;font-weight:700">Free</span>','$':'<span style="color:#0d9488">Low</span>','$$':'<span style="color:#d97706">Mid</span>','$$$':'<span style="color:#e11d48">High</span>'};
    const licM={'Prop':'<span class="lic lp">Proprietary</span>','Open':'<span class="lic lm">Open Source</span>'};
    tr.innerHTML=`<td class="c-model" style="min-width:140px"><div class="mc"><div class="mn" style="font-size:10.5px">${r[0]}</div></div></td>
      <td><span class="prov" style="background:${cc}1a;color:${cc};border-color:${cc}40;font-size:7.5px">${r[1]}</span></td>
      <td><span style="font-family:var(--font-mono);font-size:9px;color:var(--text-muted)">${r[2]}</span></td>
      <td>${imgRatingCell(r[3])}</td><td>${imgRatingCell(r[4])}</td><td>${imgRatingCell(r[5])}</td><td>${imgRatingCell(r[6])}</td>
      <td><span style="font-family:var(--font-mono);font-size:10px;font-weight:600;color:var(--text)">${r[7]}</span></td>
      <td><span style="font-family:var(--font-mono);font-size:9px;color:${r[8]==='4K'?'#6366f1':r[8]==='2K'?'#0d9488':'var(--text-sec)'}">${r[8]}</span></td>
      <td style="font-family:var(--font-mono);font-size:9px">${costM[r[9]]||r[9]}</td><td>${licM[r[10]]||r[10]}</td>`;
    tb.appendChild(tr);
  });
}
buildVideoTable();

// ========== MUSIC GENERATION DATA ==========
const MUS_DATA=[
  ["Suno v4.5","Suno","2025.11","S","S","S","S","4min","$$","Prop"],
  ["Udio v2","Udio","2025.10","S","A","S","A","4min","$$","Prop"],
  ["Gemini Music","Google","2026.01","A","A","A","A","60s","$","Prop"],
  ["MusicGen Large","Meta","2024.06","B","A","B","A","30s","Free","Open"],
  ["Stable Audio 2.0","Stability AI","2024.04","B","A","B","B","3min","$","Open"],
  ["JASCO","Meta","2024.12","C","A","C","B","30s","Free","Open"],
  ["Riffusion v2","Riffusion","2025.06","B","B","B","A","30s","$","Prop"],
  ["Loudme","Loudme","2025.09","A","A","A","B","5min","$","Prop"],
];
function buildMusicTable(){
  const tb=document.getElementById('MUSTB');if(!tb)return;tb.innerHTML='';
  const pc={"Suno":"#f43f5e","Udio":"#8b5cf6","Google":"#4285f4","Meta":"#0081fb","Stability AI":"#7c3aed","Riffusion":"#d97706","Loudme":"#0d9488"};
  MUS_DATA.forEach(r=>{
    const tr=document.createElement('tr');const cc=pc[r[1]]||'#64748b';
    const costM={'Free':'<span style="color:#16a34a;font-weight:700">Free</span>','$':'<span style="color:#0d9488">Low</span>','$$':'<span style="color:#d97706">Mid</span>'};
    const licM={'Prop':'<span class="lic lp">Proprietary</span>','Open':'<span class="lic lm">Open Source</span>'};
    tr.innerHTML=`<td class="c-model" style="min-width:140px"><div class="mc"><div class="mn" style="font-size:10.5px">${r[0]}</div></div></td>
      <td><span class="prov" style="background:${cc}1a;color:${cc};border-color:${cc}40;font-size:7.5px">${r[1]}</span></td>
      <td><span style="font-family:var(--font-mono);font-size:9px;color:var(--text-muted)">${r[2]}</span></td>
      <td>${imgRatingCell(r[3])}</td><td>${imgRatingCell(r[4])}</td><td>${imgRatingCell(r[5])}</td><td>${imgRatingCell(r[6])}</td>
      <td><span style="font-family:var(--font-mono);font-size:10px;font-weight:600;color:var(--text)">${r[7]}</span></td>
      <td style="font-family:var(--font-mono);font-size:9px">${costM[r[8]]||r[8]}</td><td>${licM[r[9]]||r[9]}</td>`;
    tb.appendChild(tr);
  });
}
buildMusicTable();

// ========== ADVANCED SEARCH ENGINE ==========
function advQ(q){document.getElementById('advSearch').value=q;advancedSearch(q);}

function advancedSearch(raw){
  const q=raw.trim().toLowerCase();
  const countEl=document.getElementById('searchResultCount');
  
  // Tab navigation keywords
  const tabMap={'video':'vidgen','image':'imggen','music':'musicgen','agent':'agent','vlm':'vision','vision':'vision','tool':'three','chart':'charts','info':'info'};
  for(const[kw,tabId] of Object.entries(tabMap)){
    if(q===kw||q===kw+'s'||q===kw+' generation'||q===kw+' gen'){
      const tabEl=document.querySelector(`.tab[onclick*="'${tabId}'"]`);
      if(tabEl){showTab(tabId,tabEl);countEl.textContent='→ '+kw.toUpperCase()+' tab';return;}
    }
  }
  
  // Parse benchmark conditions: "GPQA > 90", "AIME > 95", "HLE > 30", "score > 70", "price < 1"
  const benchAlias={
    'mmlu':7,'mmlupro':7,'mmlu-pro':7,
    'gpqa':8,'gpqa diamond':8,
    'aime':9,'aime25':9,'aime2025':9,
    'hle':10,
    'arc':11,'arcagi':11,'arc-agi':11,'arc-agi-2':11,
    'metacog':12,'metacognitive':12,'final':12,
    'swe':13,'swepro':13,'swe-pro':13,
    'bfcl':14,
    'ifeval':15,
    'lcb':16,'livecodebench':16,
    'mmmlu':18,
    'score':99, // special: composite score
    'price':98  // special: price
  };
  
  // Parse conditions
  const conditions=[];
  const condRx=/(\w[\w\-]*)\s*([><=!]+)\s*([\d.]+)/g;
  let m;
  while((m=condRx.exec(q))!==null){
    const key=m[1].toLowerCase();const op=m[2];const val=parseFloat(m[3]);
    const benchIdx=benchAlias[key];
    if(benchIdx!==undefined)conditions.push({idx:benchIdx,op,val});
  }
  
  // Parse text keywords (remaining after removing conditions)
  let textQ=q.replace(/(\w[\w\-]*)\s*([><=!]+)\s*([\d.]+)/g,'').trim();
  
  // Check for type filters
  let typeFilter=null;
  if(textQ.includes('open')){typeFilter='open';textQ=textQ.replace('open','').trim();}
  if(textQ.includes('closed')){typeFilter='closed';textQ=textQ.replace('closed','').trim();}
  if(textQ==='free'){typeFilter='free';textQ='';}
  
  // Check for provider name
  const provNames=['openai','anthropic','google','alibaba','deepseek','moonshot','meta','mistral','xai','minimax','zhipu','microsoft'];
  let provFilter=null;
  for(const pn of provNames){
    if(textQ.includes(pn)){provFilter=pn;textQ=textQ.replace(pn,'').trim();break;}
  }
  // Check for arch filters
  let archFilter=null;
  if(textQ.includes('moe')){archFilter='moe';textQ=textQ.replace('moe','').trim();}
  if(textQ.includes('dense')){archFilter='dense';textQ=textQ.replace('dense','').trim();}
  
  // Apply to table rows
  let shown=0,total=0;
  document.querySelectorAll('#TB tr').forEach(tr=>{
    total++;
    const name=tr.dataset.name||'';
    const idx=D.findIndex(r=>r[0].toLowerCase()===name);
    if(idx===-1){tr.classList.add('hidden');return;}
    const r=D[idx];
    let pass=true;
    
    // Text name search
    if(textQ&&!name.includes(textQ))pass=false;
    
    // Type filter
    if(typeFilter==='open'&&r[3]!=='open')pass=false;
    if(typeFilter==='closed'&&r[3]!=='closed')pass=false;
    if(typeFilter==='free'&&r[28]!==0)pass=false;
    
    // Provider filter
    if(provFilter&&!r[1].toLowerCase().includes(provFilter))pass=false;
    
    // Arch filter
    if(archFilter==='moe'&&!r[24].toLowerCase().includes('moe'))pass=false;
    if(archFilter==='dense'&&!r[24].toLowerCase().includes('dense'))pass=false;
    
    // Benchmark conditions
    for(const cond of conditions){
      let v;
      if(cond.idx===99)v=compScore(r);
      else if(cond.idx===98)v=r[28];
      else v=r[cond.idx];
      if(v===null||v===undefined){pass=false;break;}
      if(cond.op==='>'&&!(v>cond.val))pass=false;
      if(cond.op==='>='&&!(v>=cond.val))pass=false;
      if(cond.op==='<'&&!(v<cond.val))pass=false;
      if(cond.op==='<='&&!(v<=cond.val))pass=false;
      if(cond.op==='='&&!(Math.abs(v-cond.val)<0.5))pass=false;
    }
    
    if(pass){tr.classList.remove('hidden');shown++;}
    else tr.classList.add('hidden');
  });
  
  if(q){
    countEl.textContent=shown+'/'+total+' models';
    countEl.style.color=shown>0?'var(--ac)':'var(--rose)';
  }else{
    countEl.textContent='';
    document.querySelectorAll('#TB tr').forEach(tr=>tr.classList.remove('hidden'));
  }
  
  // Also search in old simple search box for backward compat
  document.getElementById('searchBox').value=textQ;
}

function toggleColMenu(){
  const m=document.getElementById('colMenu');
  m.classList.toggle('open');
}
document.addEventListener('click',e=>{
  if(!e.target.closest('.col-toggle-wrap'))document.getElementById('colMenu').classList.remove('open');
});

function toggleCol(ci,show){
  const sel=`[data-col="${ci}"]`;
  document.querySelectorAll(sel).forEach(el=>{el.style.display=show?'':'none';});
  const th=document.querySelector(`th[data-col="${ci}"]`);
  if(th)th.style.display=show?'':'none';
  if(show)hiddenCols.delete(ci); else hiddenCols.add(ci);
}

function applyHiddenCols(){
  hiddenCols.forEach(ci=>toggleCol(ci,false));
}

// ========== TABS ==========
function showTab(id,el){
  document.querySelectorAll('.tpane').forEach(p=>p.classList.remove('on'));
  document.querySelectorAll('.tab').forEach(t=>t.classList.remove('on'));
  document.getElementById(id).classList.add('on');
  el.classList.add('on');
  if(id==='charts'&&!chartsInit)initCharts();
  if(id==='vision'){buildFlagshipVLM();buildVLTables();}
  if(id==='agent')buildAgentTable();
  if(id==='imggen')buildImageTable();
  if(id==='three')initFinder();
  if(id==='report')generateReport();
  if(id==='vidgen')buildVideoTable();
  if(id==='musicgen')buildMusicTable();
}
let chartsInit=false;

// Init vertical ranking chart immediately
window.addEventListener('load',()=>{initVertRank();});

// ========== VERTICAL RANKING CHART (always shown in tab1) ==========
function initVertRank(){
  const sorted=[...D].map(r=>({n:r[0],s:compScore(r),c:pColors[r[1]]||'#6366f1',prov:r[1]}))
    .sort((a,b)=>{
      const sa=a.s??-1, sb=b.s??-1;
      return sb-sa;
    });

  const canvas=document.getElementById('cVertRank');
  if(!canvas)return;
  const W=Math.max(sorted.length*52+60,1100);
  canvas.width=W; canvas.height=200;
  const ctx=canvas.getContext('2d');
  const PAD_L=40,PAD_R=20,PAD_T=16,PAD_B=60;
  const chartW=W-PAD_L-PAD_R,chartH=200-PAD_T-PAD_B;
  const barW=Math.min(40,chartW/sorted.length-8);
  const maxS=Math.max(...sorted.map(x=>x.s));
  const minS=0; // Based on 0 for honest relative comparison

  // Grid lines
  [0,20,40,60,80].forEach(v=>{
    const y=PAD_T+chartH-(v-minS)/(maxS-minS)*chartH;
    if(y<PAD_T||y>PAD_T+chartH)return;
    ctx.beginPath();ctx.strokeStyle=v===0?'rgba(15,23,42,.15)':'rgba(15,23,42,.05)';
    ctx.lineWidth=v===0?1.5:.7;
    ctx.moveTo(PAD_L,y);ctx.lineTo(W-PAD_R,y);ctx.stroke();
    ctx.font='600 8px JetBrains Mono';ctx.fillStyle='#94a3b8';ctx.textAlign='right';
    ctx.fillText(v,PAD_L-4,y+3);
  });

  const gap=(chartW-(barW*sorted.length))/(sorted.length+1);

  sorted.forEach((d,i)=>{
    const x=PAD_L+gap*(i+1)+barW*i;
    const isNull=d.s===null||d.s===undefined;
    const score=isNull?0:d.s;
    const barH=isNull?5:Math.max((score-minS)/(maxS-minS)*chartH,5);
    const y=PAD_T+chartH-barH;
    const rank=i+1;
    // benchmark coverage count
    const benchKeys=[7,8,9,10,11,12,13,14,15,16];
    const origR=D.find(r=>r[0]===d.n);
    const covCnt=origR?benchKeys.filter(k=>origR[k]!==null&&origR[k]!==undefined).length:0;

    // Bar gradient
    const grad=ctx.createLinearGradient(0,y,0,PAD_T+chartH);
    grad.addColorStop(0,isNull?'#cbd5e1':d.c+'ff');
    grad.addColorStop(1,isNull?'#e2e8f0':d.c+'88');
    ctx.fillStyle=grad;
    ctx.beginPath();
    ctx.roundRect(x,y,barW,barH,4);
    ctx.fill();

    // Score label on top
    ctx.font='700 9px JetBrains Mono';ctx.fillStyle=isNull?'#94a3b8':d.c;ctx.textAlign='center';
    ctx.fillText(isNull?'N/A':d.s,x+barW/2,y-12);
    // Coverage badge (n/10)
    ctx.font='500 7px JetBrains Mono';ctx.fillStyle='#94a3b8';ctx.textAlign='center';
    ctx.fillText(covCnt+'/10',x+barW/2,y-3);

    // Rank badge
    ctx.fillStyle=d.c+'22';
    ctx.fillRect(x,PAD_T+chartH+2,barW,14);
    ctx.font='700 7px JetBrains Mono';ctx.fillStyle=d.c;ctx.textAlign='center';
    ctx.fillText('#'+rank,x+barW/2,PAD_T+chartH+11);

    // Model name (angled)
    ctx.save();
    ctx.translate(x+barW/2,PAD_T+chartH+22);
    ctx.rotate(-Math.PI/4.5);
    ctx.font='600 8px Sora,sans-serif';
    ctx.fillStyle='#475569';ctx.textAlign='right';
    const shortN=d.n.length>14?d.n.substring(0,13)+'…':d.n;
    ctx.fillText(shortN,0,0);
    ctx.restore();
  });

  // Legend
  const provs=[...new Set(D.map(r=>r[1]))];
  const leg=document.getElementById('vrankLegend');
  if(leg){
    leg.innerHTML=provs.map(p=>`<div class="vrl"><div class="vrl-dot" style="background:${pColors[p]||'#6366f1'}"></div>${p}</div>`).join('');
  }
}

// ========== CHART COLORS ==========
const pColors={
  "OpenAI":"#10a37f","Anthropic":"#d97706","Google":"#4285f4",
  "xAI":"#1d9bf0","Alibaba":"#f97316","DeepSeek":"#6366f1",
  "Moonshot":"#8b5cf6","Zhipu AI":"#14b8a6","Meta":"#0081fb","Mistral":"#ff7043",
  "Microsoft":"#00a4ef",
  "LG AI Research":"#c9002b","SK Telecom":"#e8002d","Upstage":"#005baa","Motif Technologies":"#2d6be4","KT":"#e60012","Nanbeige":"#f43f5e",
  "MiniMax":"#ff6b35","StepFun":"#7c3aed"
};
const gridC='rgba(15,23,42,.06)';
const tickC='#94a3b8';

function initCharts(){
  chartsInit=true;

  // 1. ARC-AGI-2 VERTICAL BAR
  const arcData=D.filter(r=>r[11]!==null).map(r=>({n:r[0],v:r[11],c:pColors[r[1]]||'#6366f1'})).sort((a,b)=>b.v-a.v);
  new Chart(document.getElementById('cArc'),{
    type:'bar',
    data:{labels:arcData.map(x=>x.n.length>10?x.n.substr(0,9)+'…':x.n),datasets:[{
      label:'ARC-AGI-2 (%)',data:arcData.map(x=>x.v),
      backgroundColor:arcData.map(x=>x.c+'bb'),borderColor:arcData.map(x=>x.c),
      borderWidth:1.5,borderRadius:5,borderSkipped:false
    }]},
    options:{plugins:{legend:{display:false},tooltip:{callbacks:{label:c=>`ARC-AGI-2: ${c.raw}% — ${arcData[c.dataIndex].n}`}}},
      scales:{y:{min:0,max:100,grid:{color:gridC},ticks:{color:tickC,font:{family:'JetBrains Mono',size:9}}},
              x:{grid:{display:false},ticks:{color:tickC,font:{family:'JetBrains Mono',size:8},maxRotation:35}}}}
  });

  // 2. METACOG BASELINE vs METACOG (GROUPED VERTICAL)
  const metaFull=[
    {n:"Kimi K2.5",prov:"Moonshot",base:68.71,meta:78.54},
    {n:"GPT-5.2",prov:"OpenAI",base:62.76,meta:75.5},
    {n:"GLM-5",prov:"Zhipu AI",base:62.50,meta:75.0},
    {n:"Gemini 3.1 Pro",prov:"Google",base:59.5,meta:77.08},
    {n:"Claude Opus 4.6",prov:"Anthropic",base:56.04,meta:76.17},
  ].sort((a,b)=>b.base-a.base);
  new Chart(document.getElementById('cMetaDelta'),{
    type:'bar',
    data:{
      labels:metaFull.map(x=>x.n.length>12?x.n.substr(0,11)+'…':x.n),
      datasets:[
        {label:'Baseline Score',data:metaFull.map(x=>x.base),backgroundColor:metaFull.map(x=>pColors[x.prov]+'88'),borderColor:metaFull.map(x=>pColors[x.prov]),borderWidth:1.5,borderRadius:4},
        {label:'MetaCog (self-corrected)',data:metaFull.map(x=>x.meta),backgroundColor:metaFull.map(x=>pColors[x.prov]+'33'),borderColor:metaFull.map(x=>pColors[x.prov]),borderWidth:2,borderRadius:4,borderDash:[4,2]}
      ]
    },
    options:{
      plugins:{legend:{labels:{color:tickC,font:{family:'JetBrains Mono',size:8},boxWidth:10}},
        tooltip:{callbacks:{afterBody:items=>{
          if(items[0]){const i=items[0].dataIndex;return[`  Δ gain: +${(metaFull[i].meta-metaFull[i].base).toFixed(2)}`];}
        }}}
      },
      scales:{y:{min:45,max:85,grid:{color:gridC},ticks:{color:tickC,font:{family:'JetBrains Mono',size:9}}},
              x:{grid:{display:false},ticks:{color:tickC,font:{family:'JetBrains Mono',size:8}}}}
    }
  });

  // 3. RADAR TOP 6
  const top6=["Claude Opus 4.6","GPT-5.2","Gemini 3.1 Pro","Kimi K2.5","Qwen3.5-397B","DeepSeek V3.2"];
  const rColors=top6.map(n=>{const r=D.find(d=>d[0]===n);return r?pColors[r[1]]||'#6366f1':'#6366f1';});
  const top6data=top6.map(n=>D.find(r=>r[0]===n));
  const radarDatasets=top6data.map((r,i)=>({
    label:r[0],
    data:[r[7]||0,r[8]||0,r[9]||0,r[10]||0,Math.min((r[11]||0)*1.1,100),r[18]||0],
    borderColor:rColors[i],backgroundColor:rColors[i]+'20',borderWidth:1.5,pointRadius:2.5,pointBackgroundColor:rColors[i]
  }));
  new Chart(document.getElementById('cRadar'),{
    type:'radar',
    data:{labels:['MMLU-Pro','GPQA◆','AIME25','HLE','ARC-AGI-2','MMMLU'],datasets:radarDatasets},
    options:{plugins:{legend:{labels:{color:tickC,font:{family:'JetBrains Mono',size:7.5},boxWidth:10,padding:6}}},
      scales:{r:{grid:{color:gridC},angleLines:{color:gridC},ticks:{display:false},
        pointLabels:{color:tickC,font:{family:'JetBrains Mono',size:8.5}},suggestedMin:0,suggestedMax:100}}}
  });

  // 4. CAPABILITY DOMAIN BREAKDOWN
  const domModels=["GPT-5.2","Claude Opus 4.6","Gemini 3.1 Pro","Kimi K2.5","Qwen3.5-397B","DeepSeek R1","GLM-5","Grok 4 Heavy"];
  const domData=domModels.map(n=>{
    const r=D.find(d=>d[0]===n);if(!r)return null;
    const reasoning=[r[8],r[9],r[10]].filter(x=>x!==null);
    const coding=[r[13],r[16]].filter(x=>x!==null);
    const language=[r[7],r[18],r[15]].filter(x=>x!==null);
    return{
      n:n.length>12?n.substr(0,11)+'…':n,
      c:pColors[r[1]]||'#6366f1',
      reasoning:reasoning.length?Math.round(reasoning.reduce((a,b)=>a+b)/reasoning.length*10)/10:null,
      coding:coding.length?Math.round(coding.reduce((a,b)=>a+b)/coding.length*10)/10:null,
      language:language.length?Math.round(language.reduce((a,b)=>a+b)/language.length*10)/10:null
    };
  }).filter(Boolean);
  new Chart(document.getElementById('cDomain'),{
    type:'bar',
    data:{
      labels:domData.map(x=>x.n),
      datasets:[
        {label:'Reasoning (GPQA+AIME+HLE)',data:domData.map(x=>x.reasoning),backgroundColor:'rgba(99,102,241,.7)',borderColor:'#6366f1',borderWidth:1.5,borderRadius:3},
        {label:'Coding (SWE-Pro+LCB)',data:domData.map(x=>x.coding),backgroundColor:'rgba(13,148,136,.7)',borderColor:'#0d9488',borderWidth:1.5,borderRadius:3},
        {label:'Language (MMLU+MMMLU+IFEval)',data:domData.map(x=>x.language),backgroundColor:'rgba(217,119,6,.7)',borderColor:'#d97706',borderWidth:1.5,borderRadius:3}
      ]
    },
    options:{plugins:{legend:{labels:{color:tickC,font:{family:'JetBrains Mono',size:8},boxWidth:10,padding:5}}},
      scales:{y:{min:0,max:100,grid:{color:gridC},ticks:{color:tickC,font:{family:'JetBrains Mono',size:9}}},
              x:{grid:{display:false},ticks:{color:tickC,font:{family:'JetBrains Mono',size:8},maxRotation:30}}}}
  });

  // 5. PERF vs COST SCATTER
  const scData=D.filter(r=>r[28]!==null&&r[28]!==undefined&&compScore(r)!==null).map(r=>({
    n:r[0],x:r[28]===0?0.01:r[28],y:compScore(r),c:pColors[r[1]]||'#6366f1',prov:r[1]
  }));
  new Chart(document.getElementById('cScatter'),{
    type:'scatter',
    data:{datasets:[{
      data:scData.map(x=>({x:x.x,y:x.y})),
      backgroundColor:scData.map(x=>x.c+'cc'),borderColor:scData.map(x=>x.c),
      pointRadius:scData.map((x,i)=>i<3?9:7),pointHoverRadius:11,borderWidth:1.5
    }]},
    options:{
      plugins:{legend:{display:false},tooltip:{callbacks:{label:ctx=>{
        const d=scData[ctx.dataIndex];return[`${d.n}`,`Score: ${d.y}`,`Price: $${d.x}/M`];
      }}}},
      scales:{
        x:{title:{display:true,text:'Input Price ($/M tokens) — log scale',color:tickC,font:{size:8.5,family:'JetBrains Mono'}},type:'logarithmic',
          grid:{color:gridC},ticks:{color:tickC,font:{family:'JetBrains Mono',size:8.5}}},
        y:{title:{display:true,text:'Composite Score',color:tickC,font:{size:8.5,family:'JetBrains Mono'}},min:40,
          grid:{color:gridC},ticks:{color:tickC,font:{family:'JetBrains Mono',size:8.5}}}
      }
    }
  });

  // 6. PROVIDER AVERAGE SCORE
  const provGroups={};
  D.forEach(r=>{const cs=compScore(r);if(cs&&r[1]){if(!provGroups[r[1]])provGroups[r[1]]=[];provGroups[r[1]].push(cs);}});
  const provAvg=Object.entries(provGroups).map(([p,arr])=>({
    p,avg:Math.round(arr.reduce((a,b)=>a+b)/arr.length*10)/10,
    cnt:arr.length,c:pColors[p]||'#6366f1',max:Math.max(...arr),min:Math.min(...arr)
  })).sort((a,b)=>b.avg-a.avg);
  new Chart(document.getElementById('cProvider'),{
    type:'bar',
    data:{
      labels:provAvg.map(x=>x.p),
      datasets:[
        {label:'Avg Score',data:provAvg.map(x=>x.avg),backgroundColor:provAvg.map(x=>x.c+'bb'),borderColor:provAvg.map(x=>x.c),borderWidth:1.5,borderRadius:5,borderSkipped:false},
        {label:'Best Model',data:provAvg.map(x=>x.max),type:'line',borderColor:provAvg.map(x=>x.c),pointBackgroundColor:provAvg.map(x=>x.c),pointRadius:5,fill:false,tension:.3,borderWidth:2}
      ]
    },
    options:{plugins:{legend:{labels:{color:tickC,font:{family:'JetBrains Mono',size:8},boxWidth:10}}},
      scales:{y:{min:40,grid:{color:gridC},ticks:{color:tickC,font:{family:'JetBrains Mono',size:9}}},
              x:{grid:{display:false},ticks:{color:tickC,font:{family:'JetBrains Mono',size:9},maxRotation:30}}}}
  });

  // 7. INTELLIGENCE TIMELINE BUBBLE
  const dateMap={"2025.01":1,"2025.04":4,"2025.06":6,"2025.07":7,"2025.08":8,"2025.09":9,"2025.10":10,"2025.11":11,"2025.12":12,"2026.01":13,"2026.02":14,"2026.03":15};
  const tlData=D.filter(r=>compScore(r)!==null).map(r=>({
    n:r[0],x:dateMap[r[6]]||1,y:compScore(r),c:pColors[r[1]]||'#6366f1',
    r:Math.log10((r[19]||100)*1000+1)*4+4
  }));
  new Chart(document.getElementById('cTimeline'),{
    type:'bubble',
    data:{datasets:[{
      data:tlData.map(x=>({x:x.x,y:x.y,r:x.r})),
      backgroundColor:tlData.map(x=>x.c+'88'),borderColor:tlData.map(x=>x.c),borderWidth:1.5
    }]},
    options:{plugins:{legend:{display:false},tooltip:{callbacks:{label:ctx=>{
      const d=tlData[ctx.dataIndex];return[d.n,`Score: ${d.y}`];
    }}}},
      scales:{
        x:{title:{display:true,text:'Release Timeline (months from Jan 2025)',color:tickC,font:{size:8.5,family:'JetBrains Mono'}},min:0,max:16,
          grid:{color:gridC},ticks:{color:tickC,font:{family:'JetBrains Mono',size:8.5},callback:v=>['','Jan 25','','','Apr 25','','Jun','Jul','Aug','Sep','Oct','Nov 25','Dec 25','Jan 26','Feb 26','Mar 26'][v]||''}},
        y:{title:{display:true,text:'Composite Score',color:tickC,font:{size:8.5,family:'JetBrains Mono'}},min:40,
          grid:{color:gridC},ticks:{color:tickC,font:{family:'JetBrains Mono',size:8.5}}}
      }
    }
  });

  // 8. OPEN vs CLOSED DISTRIBUTION
  const openScores=D.filter(r=>r[3]==='open'&&compScore(r)!==null).map(r=>compScore(r)).sort((a,b)=>a-b);
  const closedScores=D.filter(r=>r[3]==='closed'&&compScore(r)!==null).map(r=>compScore(r)).sort((a,b)=>a-b);
  const allOpen=D.filter(r=>r[3]==='open'&&compScore(r)!==null).map(r=>({n:r[0],s:compScore(r),c:pColors[r[1]]||'#16a34a'}));
  const allClosed=D.filter(r=>r[3]==='closed'&&compScore(r)!==null).map(r=>({n:r[0],s:compScore(r),c:pColors[r[1]]||'#6366f1'}));
  new Chart(document.getElementById('cOpenClosed'),{
    type:'scatter',
    data:{datasets:[
      {label:'Open-weight',data:allOpen.map((x,i)=>({x:0.2+Math.random()*.6,y:x.s})),
       backgroundColor:allOpen.map(x=>x.c+'cc'),pointRadius:7,borderWidth:1.5,borderColor:allOpen.map(x=>x.c)},
      {label:'Closed API',data:allClosed.map((x,i)=>({x:1.2+Math.random()*.6,y:x.s})),
       backgroundColor:allClosed.map(x=>x.c+'cc'),pointRadius:8,borderWidth:1.5,borderColor:allClosed.map(x=>x.c)}
    ]},
    options:{plugins:{legend:{labels:{color:tickC,font:{family:'JetBrains Mono',size:9},boxWidth:12}},
      tooltip:{callbacks:{label:ctx=>{
        const arr=ctx.datasetIndex===0?allOpen:allClosed;return arr[ctx.dataIndex]?`${arr[ctx.dataIndex].n}: ${arr[ctx.dataIndex].s}`:'';
      }}}},
      scales:{
        x:{min:0,max:2,grid:{display:false},ticks:{color:tickC,font:{family:'JetBrains Mono',size:9},callback:v=>v===0.5?'Open-weight':v===1.5?'Closed API':''}},
        y:{min:40,max:100,grid:{color:gridC},ticks:{color:tickC,font:{family:'JetBrains Mono',size:9}},title:{display:true,text:'Composite Score',color:tickC,font:{size:8.5,family:'JetBrains Mono'}}}
      }
    }
  });

  // 9. BENCHMARK VARIANCE (min/max/mean)
  const benchDefs=[
    {k:7,l:'MMLU-Pro'},{k:8,l:'GPQA◆'},{k:9,l:'AIME25'},{k:10,l:'HLE'},
    {k:11,l:'ARC-AGI-2'},{k:12,l:'Metacog'},{k:13,l:'SWE-Pro'},
    {k:14,l:'BFCL'},{k:15,l:'IFEval'},{k:16,l:'LCB'},{k:18,l:'MMMLU'},{k:35,l:'TB2.0'}
  ];
  const varData=benchDefs.map(b=>{
    const vals=D.map(r=>r[b.k]).filter(x=>x!==null&&x!==undefined);
    if(!vals.length)return null;
    const mn=Math.round(Math.min(...vals)*10)/10,mx=Math.round(Math.max(...vals)*10)/10;
    const avg=Math.round(vals.reduce((a,v)=>a+v)/vals.length*10)/10;
    return{l:b.l,mn,mx,avg,range:mx-mn};
  }).filter(Boolean);
  new Chart(document.getElementById('cVariance'),{
    type:'bar',
    data:{
      labels:varData.map(x=>x.l),
      datasets:[
        {label:'Min',data:varData.map(x=>x.mn),backgroundColor:'rgba(225,29,72,.55)',borderColor:'#e11d48',borderWidth:1.2,borderRadius:2},
        {label:'Mean',data:varData.map(x=>x.avg),backgroundColor:'rgba(99,102,241,.65)',borderColor:'#6366f1',borderWidth:1.2,borderRadius:2},
        {label:'Max',data:varData.map(x=>x.mx),backgroundColor:'rgba(13,148,136,.55)',borderColor:'#0d9488',borderWidth:1.2,borderRadius:2}
      ]
    },
    options:{plugins:{legend:{labels:{color:tickC,font:{family:'JetBrains Mono',size:8},boxWidth:10}}},
      scales:{y:{min:0,max:100,grid:{color:gridC},ticks:{color:tickC,font:{family:'JetBrains Mono',size:8.5}}},
              x:{grid:{display:false},ticks:{color:tickC,font:{family:'JetBrains Mono',size:8},maxRotation:30}}}}
  });

  // 10. HEATMAP — full width
  const heatCols=['MMLU-P','GPQA','AIME25','HLE','ARC-AGI-2','Metacog','SWE-Pro','BFCL','IFEval','LCB','MMMLU','TB2.0'];
  const heatKeys=[7,8,9,10,11,12,13,14,15,16,18,35];
  const canvas=document.getElementById('cHeat');
  const parentCard=canvas.closest('.chart-card');
  // Use parent card's full inner width (accounting for padding)
  const cardPad=36; // 18px padding × 2
  const cW=parentCard ? (parentCard.clientWidth - cardPad) : (window.innerWidth - 80);
  const nRows=D.length; // 31 models
  const hH=34;   // header height
  const bH=38;   // row height — taller for readability
  const mW=130;  // model name column width
  const totalH=hH+nRows*bH+10;
  canvas.width=cW;
  canvas.height=totalH;
  canvas.style.height=totalH+'px';
  const ctx2=canvas.getContext('2d');
  ctx2.clearRect(0,0,cW,totalH);

  const bW=(cW-mW)/heatCols.length;

  // Background alternating rows
  D.forEach((r,i)=>{
    const y=hH+i*bH;
    ctx2.fillStyle=i%2===0?'rgba(248,249,252,0.8)':'rgba(255,255,255,0.6)';
    ctx2.fillRect(0,y,cW,bH);
  });

  // Column headers
  heatCols.forEach((h,j)=>{
    const x=mW+(j+0.5)*bW;
    // Column bg stripe
    ctx2.fillStyle=j%2===0?'rgba(99,102,241,.04)':'rgba(99,102,241,.01)';
    ctx2.fillRect(mW+j*bW,0,bW,totalH);
    // Header text
    ctx2.save();
    ctx2.translate(x,hH-6);
    ctx2.rotate(-Math.PI/6);
    ctx2.font='700 9px JetBrains Mono';
    ctx2.fillStyle='#6366f1';
    ctx2.textAlign='right';
    ctx2.fillText(h,0,0);
    ctx2.restore();
  });

  // Vertical grid lines
  ctx2.strokeStyle='rgba(226,229,240,0.8)';ctx2.lineWidth=1;
  for(let j=0;j<=heatCols.length;j++){
    ctx2.beginPath();ctx2.moveTo(mW+j*bW,0);ctx2.lineTo(mW+j*bW,totalH);ctx2.stroke();
  }
  // Horizontal grid lines
  for(let i=0;i<=nRows;i++){
    const y=hH+i*bH;
    ctx2.strokeStyle='rgba(226,229,240,0.6)';ctx2.lineWidth=0.8;
    ctx2.beginPath();ctx2.moveTo(0,y);ctx2.lineTo(cW,y);ctx2.stroke();
  }

  D.forEach((r,i)=>{
    const y=hH+i*bH;
    // Provider color bar on left edge
    ctx2.fillStyle=pColors[r[1]]||'#6366f1';
    ctx2.fillRect(0,y+1,4,bH-2);
    // Row number
    ctx2.font='600 8px JetBrains Mono';ctx2.fillStyle='#94a3b8';ctx2.textAlign='center';
    ctx2.fillText(i+1,14,y+bH/2+3);
    // Model name
    ctx2.font='600 10px Sora,sans-serif';ctx2.fillStyle='#0f172a';ctx2.textAlign='left';
    const nm=r[0].length>17?r[0].substr(0,16)+'…':r[0];
    ctx2.fillText(nm,22,y+bH/2+3);

    heatKeys.forEach((ki,j)=>{
      const v=r[ki];
      const cx=mW+j*bW;
      if(v!==null&&v!==undefined){
        const norm=Math.min(v/100,1);
        const alpha=0.07+norm*0.85;
        // Cell fill
        ctx2.fillStyle=`rgba(99,102,241,${alpha})`;
        ctx2.fillRect(cx+1,y+2,bW-2,bH-4);
        // Score text
        const fontSize=bW>50?10:bW>38?9:8;
        ctx2.font=`700 ${fontSize}px JetBrains Mono`;
        ctx2.fillStyle=alpha>0.52?'#3730a3':'#475569';
        ctx2.textAlign='center';
        ctx2.fillText(v,cx+bW/2,y+bH/2+3.5);
      } else {
        ctx2.fillStyle='rgba(241,245,249,0.9)';
        ctx2.fillRect(cx+1,y+2,bW-2,bH-4);
        ctx2.font='8px JetBrains Mono';
        ctx2.fillStyle='#cbd5e1';ctx2.textAlign='center';
        ctx2.fillText('—',cx+bW/2,y+bH/2+3);
      }
    });
  });
}


// ========== INTERACTIVE TOOLS SUB-TABS ==========
function show3DSub(id,el){
  document.querySelectorAll('.sub3d').forEach(s=>s.style.display='none');
  document.querySelectorAll('#three .tab').forEach(t=>t.classList.remove('on'));
  document.getElementById('sub_'+id).style.display='block';
  el.classList.add('on');
  if(id==='finder')initFinder();
  if(id==='h2h')initH2H();
  if(id==='coverage')initCoverage();
  if(id==='barrace')initBarRace();
}

// ========== 1. MODEL FINDER — Price vs Performance Scatter ==========
let finderInit=false,finderData=[],finderFlt='all';
function initFinder(){
  const box=document.getElementById('finderBox');if(!box)return;
  const c=document.getElementById('finderCanvas');
  const tt=document.getElementById('finderTip');
  const W=box.clientWidth,H=box.clientHeight;
  c.width=W*2;c.height=H*2;c.style.width=W+'px';c.style.height=H+'px';
  const ctx=c.getContext('2d');ctx.scale(2,2);
  // Build data
  finderData=D.filter(r=>compScore(r)!==null).map(r=>({
    n:r[0],prov:r[1],c:pColors[r[1]]||'#6366f1',score:compScore(r),
    price:r[28]===null?-1:r[28],type:r[3],free:r[28]===0
  }));
  drawFinder(ctx,W,H,tt);
  c.onmousemove=e=>{
    const mx=e.offsetX,my=e.offsetY;let found=null;
    finderData.forEach(d=>{
      if(finderFlt==='open'&&d.type!=='open')return;
      if(finderFlt==='closed'&&d.type!=='closed')return;
      if(finderFlt==='cheap'&&(d.price<0||d.price>=1))return;
      if(finderFlt==='free'&&!d.free)return;
      const px=priceToX(d.price,W),py=scoreToY(d.score,H);
      if(Math.abs(px-mx)<10&&Math.abs(py-my)<10)found=d;
    });
    if(found){tt.style.display='block';tt.style.left=Math.min(mx+12,W-200)+'px';tt.style.top=Math.min(my-50,H-80)+'px';
      tt.innerHTML=`<b style="color:${found.c}">${found.n}</b><br>${found.prov} · ${found.type}<br>Score: <b>${found.score}</b><br>Price: <b>${found.price<0?'N/A':found.free?'FREE':'$'+found.price+'/M'}</b>`;
    }else tt.style.display='none';
  };
  finderInit=true;
}
function priceToX(p,W){if(p<0)return 40;if(p===0)return 60;return 60+Math.log10(p+0.01)*((W-100)/2.5)+100;}
function scoreToY(s,H){return H-40-(s-20)*((H-80)/70);}
window.finderFilter=function(f,btn){
  finderFlt=f;
  document.querySelectorAll('#sub_finder .fb').forEach(b=>b.classList.remove('on'));
  btn.classList.add('on');
  const box=document.getElementById('finderBox');const c=document.getElementById('finderCanvas');
  const ctx=c.getContext('2d');ctx.setTransform(2,0,0,2,0,0);
  drawFinder(ctx,box.clientWidth,box.clientHeight,document.getElementById('finderTip'));
};
function drawFinder(ctx,W,H,tt){
  ctx.fillStyle='#fafbff';ctx.fillRect(0,0,W,H);
  // Grid
  ctx.strokeStyle='rgba(99,102,241,0.08)';ctx.lineWidth=0.5;
  for(let s=30;s<=90;s+=10){const y=scoreToY(s,H);ctx.beginPath();ctx.moveTo(40,y);ctx.lineTo(W-20,y);ctx.stroke();
    ctx.font='500 8px JetBrains Mono';ctx.fillStyle='#94a3b8';ctx.textAlign='right';ctx.fillText(s,36,y+3);}
  // Value zone
  ctx.fillStyle='rgba(22,163,74,0.04)';ctx.fillRect(40,scoreToY(90,H),priceToX(1,W)-40,scoreToY(60,H)-scoreToY(90,H));
  ctx.font='600 9px JetBrains Mono';ctx.fillStyle='rgba(22,163,74,0.3)';ctx.textAlign='left';ctx.fillText('★ VALUE ZONE',46,scoreToY(87,H));
  // Axis labels
  ctx.font='600 8px JetBrains Mono';ctx.fillStyle='#64748b';ctx.textAlign='center';
  ctx.fillText('← FREE        Price ($/M input tokens)        EXPENSIVE →',W/2,H-8);
  ctx.save();ctx.translate(10,H/2);ctx.rotate(-Math.PI/2);ctx.fillText('Composite Score →',0,0);ctx.restore();
  // Price ticks
  [0,0.1,0.5,1,2,5,10].forEach(p=>{const x=priceToX(p,W);ctx.font='500 7px JetBrains Mono';ctx.fillStyle='#94a3b8';ctx.textAlign='center';ctx.fillText(p===0?'Free':'$'+p,x,H-24);});
  // Points
  finderData.forEach(d=>{
    if(finderFlt==='open'&&d.type!=='open')return;
    if(finderFlt==='closed'&&d.type!=='closed')return;
    if(finderFlt==='cheap'&&(d.price<0||d.price>=1))return;
    if(finderFlt==='free'&&!d.free)return;
    const px=priceToX(d.price,W),py=scoreToY(d.score,H);
    // Glow
    const g=ctx.createRadialGradient(px,py,0,px,py,14);g.addColorStop(0,d.c+'44');g.addColorStop(1,'transparent');ctx.fillStyle=g;ctx.fillRect(px-14,py-14,28,28);
    // Dot
    ctx.beginPath();ctx.arc(px,py,5,0,Math.PI*2);ctx.fillStyle=d.c+'cc';ctx.fill();ctx.strokeStyle=d.c;ctx.lineWidth=1.2;ctx.stroke();
    // Label
    ctx.font='600 7.5px Sora';ctx.fillStyle='#475569';ctx.textAlign='center';
    ctx.fillText(d.n.length>13?d.n.substr(0,12)+'…':d.n,px,py-9);
  });
}

// ========== 2. HEAD-TO-HEAD COMPARISON ==========
let h2hInit=false;
function initH2H(){
  if(h2hInit)return;h2hInit=true;
  const selA=document.getElementById('h2hA'),selB=document.getElementById('h2hB');
  const models=D.filter(r=>compScore(r)!==null).sort((a,b)=>(compScore(b)||0)-(compScore(a)||0));
  models.forEach((r,i)=>{
    const o1=document.createElement('option');o1.value=i;o1.textContent=r[0];selA.appendChild(o1);
    const o2=document.createElement('option');o2.value=i;o2.textContent=r[0];selB.appendChild(o2);
  });
  selA.value=0;selB.value=Math.min(1,models.length-1);
  window._h2hModels=models;
  drawH2H();
}
window.drawH2H=function(){
  const models=window._h2hModels;if(!models)return;
  const box=document.getElementById('h2hBox');const c=document.getElementById('h2hCanvas');
  const W=box.clientWidth,H=box.clientHeight;
  c.width=W*2;c.height=H*2;c.style.width=W+'px';c.style.height=H+'px';
  const ctx=c.getContext('2d');ctx.scale(2,2);
  const a=models[document.getElementById('h2hA').value];
  const b=models[document.getElementById('h2hB').value];
  if(!a||!b)return;
  const cA=pColors[a[1]]||'#6366f1',cB=pColors[b[1]]||'#e11d48';
  ctx.fillStyle='#fafbff';ctx.fillRect(0,0,W,H);
  // Header
  ctx.font='700 13px Sora';ctx.fillStyle=cA;ctx.textAlign='right';ctx.fillText(a[0],W/2-20,28);
  ctx.fillStyle='#94a3b8';ctx.textAlign='center';ctx.fillText('VS',W/2,28);
  ctx.fillStyle=cB;ctx.textAlign='left';ctx.fillText(b[0],W/2+20,28);
  const benchmarks=[
    {k:7,l:'MMLU-Pro'},{k:8,l:'GPQA Diamond'},{k:9,l:'AIME 2025'},{k:10,l:'HLE'},
    {k:11,l:'ARC-AGI-2'},{k:12,l:'Metacognitive'},{k:13,l:'SWE-Pro'},
    {k:14,l:'BFCL v4'},{k:15,l:'IFEval'},{k:16,l:'LiveCodeBench'},
    {k:18,l:'MMMLU'},{k:35,l:'Terminal-Bench'},{k:36,l:'SciCode'}
  ];
  const bH=28,startY=50,midX=W/2,maxBarW=(W/2-80);
  let winsA=0,winsB=0;
  benchmarks.forEach((bm,i)=>{
    const va=a[bm.k],vb=b[bm.k];
    const y=startY+i*(bH+3);
    // Label
    ctx.font='600 8px JetBrains Mono';ctx.fillStyle='#64748b';ctx.textAlign='center';
    ctx.fillText(bm.l,midX,y+bH/2+3);
    if(va!==null&&va!==undefined){
      const bw=Math.max(2,(va/100)*maxBarW);
      const winner=vb!==null&&va>=vb;if(winner)winsA++;
      ctx.fillStyle=winner?cA+'cc':cA+'44';
      ctx.fillRect(midX-60-bw,y+4,bw,bH-8);
      ctx.font='700 9px JetBrains Mono';ctx.fillStyle=winner?cA:'#94a3b8';ctx.textAlign='right';
      ctx.fillText(va,midX-60-bw-4,y+bH/2+3);
    }
    if(vb!==null&&vb!==undefined){
      const bw=Math.max(2,(vb/100)*maxBarW);
      const winner=va!==null&&vb>va;if(winner)winsB++;
      ctx.fillStyle=winner?cB+'cc':cB+'44';
      ctx.fillRect(midX+60,y+4,bw,bH-8);
      ctx.font='700 9px JetBrains Mono';ctx.fillStyle=winner?cB:'#94a3b8';ctx.textAlign='left';
      ctx.fillText(vb,midX+60+bw+4,y+bH/2+3);
    }
  });
  // Win summary
  const sumY=startY+benchmarks.length*(bH+3)+10;
  ctx.font='800 16px JetBrains Mono';
  ctx.fillStyle=cA;ctx.textAlign='right';ctx.fillText(winsA+' wins',midX-20,sumY+8);
  ctx.fillStyle=cB;ctx.textAlign='left';ctx.fillText(winsB+' wins',midX+20,sumY+8);
  ctx.fillStyle='#94a3b8';ctx.textAlign='center';ctx.fillText(':',midX,sumY+8);
};

// ========== 3. COVERAGE TRUST MAP ==========
let covInit=false;
function initCoverage(){
  if(covInit)return;covInit=true;
  const box=document.getElementById('covBox');const c=document.getElementById('covCanvas');
  const benchNames=['MMLU-P','GPQA','AIME','HLE','ARC-AGI','Metacog','SWE-P','BFCL','IFEval','LCB','MMMLU','TB2.0','SciCode'];
  const benchKeys=[7,8,9,10,11,12,13,14,15,16,18,35,36];
  const models=D.filter(r=>compScore(r)!==null).sort((a,b)=>(compScore(b)||0)-(compScore(a)||0)).slice(0,25);
  const cellW=52,cellH=24,labelW=130,headerH=50;
  const W=labelW+benchNames.length*cellW+10,H=headerH+models.length*cellH+10;
  c.width=W*2;c.height=H*2;c.style.width=W+'px';c.style.height=H+'px';
  const ctx=c.getContext('2d');ctx.scale(2,2);
  ctx.fillStyle='#fafbff';ctx.fillRect(0,0,W,H);
  // Headers
  benchNames.forEach((b,j)=>{
    ctx.save();ctx.translate(labelW+j*cellW+cellW/2,headerH-6);ctx.rotate(-Math.PI/5);
    ctx.font='700 8px JetBrains Mono';ctx.fillStyle='#6366f1';ctx.textAlign='right';ctx.fillText(b,0,0);ctx.restore();
  });
  models.forEach((r,i)=>{
    const y=headerH+i*cellH;
    ctx.fillStyle=i%2===0?'rgba(248,249,252,0.8)':'#fff';ctx.fillRect(0,y,W,cellH);
    // Model name
    ctx.font='600 9px Sora';ctx.fillStyle='#0f172a';ctx.textAlign='left';
    const nm=r[0].length>16?r[0].substr(0,15)+'…':r[0];ctx.fillText(nm,6,y+cellH/2+3);
    // Coverage count
    let cnt=0;
    benchKeys.forEach((k,j)=>{
      const v=r[k];const cx=labelW+j*cellW;
      if(v!==null&&v!==undefined){
        cnt++;
        const norm=Math.min(v/100,1);
        ctx.fillStyle=`rgba(99,102,241,${0.15+norm*0.6})`;
        ctx.fillRect(cx+1,y+1,cellW-2,cellH-2);
        ctx.font='700 8px JetBrains Mono';ctx.fillStyle=norm>0.6?'#312e81':'#475569';
        ctx.textAlign='center';ctx.fillText(v,cx+cellW/2,y+cellH/2+3);
      } else {
        ctx.fillStyle='rgba(241,245,249,0.9)';ctx.fillRect(cx+1,y+1,cellW-2,cellH-2);
        ctx.font='8px JetBrains Mono';ctx.fillStyle='#cbd5e1';ctx.textAlign='center';ctx.fillText('—',cx+cellW/2,y+cellH/2+3);
      }
    });
    // Coverage bar
    const barC=cnt>=10?'#16a34a':cnt>=7?'#0d9488':cnt>=4?'#d97706':'#e11d48';
    ctx.fillStyle=barC;ctx.fillRect(labelW-20,y+4,3,cellH-8);
  });
  // Grid lines
  ctx.strokeStyle='rgba(226,229,240,0.6)';ctx.lineWidth=0.5;
  for(let j=0;j<=benchNames.length;j++){ctx.beginPath();ctx.moveTo(labelW+j*cellW,headerH);ctx.lineTo(labelW+j*cellW,H);ctx.stroke();}
}

// ========== 4. BAR RACE (improved) ==========
let brInit=false,brPlaying=false,brTime=0;
function initBarRace(){
  if(brInit)return;brInit=true;
  const box=document.getElementById('barraceBox');const c=document.getElementById('barraceCanvas');
  const W=box.clientWidth,H=box.clientHeight;
  c.width=W*2;c.height=H*2;c.style.width=W+'px';c.style.height=H+'px';
  const ctx=c.getContext('2d');ctx.scale(2,2);
  const timeline=[
    {t:'2025.01',models:[{n:'DeepSeek R1',s:62,c:'#6366f1'}]},
    {t:'2025.04',models:[{n:'DeepSeek R1',s:62,c:'#6366f1'},{n:'Llama 4 Scout',s:35,c:'#0081fb'}]},
    {t:'2025.08',models:[{n:'DeepSeek R1',s:62,c:'#6366f1'},{n:'GPT-5',s:68,c:'#10a37f'},{n:'Llama 4',s:35,c:'#0081fb'}]},
    {t:'2025.10',models:[{n:'DeepSeek R1',s:62,c:'#6366f1'},{n:'GPT-5',s:68,c:'#10a37f'},{n:'Opus 4.6',s:72,c:'#d97706'},{n:'Kimi K2.5',s:68,c:'#8b5cf6'}]},
    {t:'2025.12',models:[{n:'GPT-5',s:68,c:'#10a37f'},{n:'Opus 4.6',s:72,c:'#d97706'},{n:'Kimi K2.5',s:68,c:'#8b5cf6'},{n:'Gem 3 Flash',s:70,c:'#34a853'},{n:'GPT-OSS',s:52,c:'#059669'},{n:'DS V3.2',s:54,c:'#6366f1'}]},
    {t:'2026.01',models:[{n:'GPT-5.2',s:74,c:'#10a37f'},{n:'Opus 4.6',s:72,c:'#d97706'},{n:'Gem 3.1 Pro',s:76,c:'#4285f4'},{n:'Kimi K2.5',s:68,c:'#8b5cf6'},{n:'Qwen 397B',s:69,c:'#f97316'},{n:'GLM-5',s:67,c:'#14b8a6'},{n:'Gem 3 Flash',s:70,c:'#34a853'}]},
    {t:'2026.03',models:[{n:'GPT-5.4',s:72,c:'#10a37f'},{n:'GPT-5.2',s:74,c:'#10a37f'},{n:'Opus 4.6',s:72,c:'#d97706'},{n:'Gem 3.1 Pro',s:76,c:'#4285f4'},{n:'Kimi K2.5',s:68,c:'#8b5cf6'},{n:'Qwen 397B',s:69,c:'#f97316'},{n:'GLM-5',s:67,c:'#14b8a6'},{n:'Gem 3 Flash',s:70,c:'#34a853'}]}
  ];
  function drawFrame(ti){
    ctx.fillStyle='#0f172a';ctx.fillRect(0,0,W,H);
    const frame=timeline[Math.min(Math.floor(ti),timeline.length-1)];
    const sorted=[...frame.models].sort((a,b)=>b.s-a.s);
    const barH=Math.min(38,((H-80)/sorted.length));const maxS=85;
    document.getElementById('brYear').textContent=frame.t;
    sorted.forEach((m,i)=>{
      const y=50+i*(barH+4);const bw=Math.max(5,(m.s/maxS)*(W-160));
      const grad=ctx.createLinearGradient(80,y,80+bw,y);grad.addColorStop(0,m.c+'cc');grad.addColorStop(1,m.c+'66');
      ctx.fillStyle=grad;
      ctx.beginPath();ctx.roundRect(80,y,bw,barH-2,4);ctx.fill();
      ctx.font='700 '+Math.min(11,barH*0.42)+'px Sora';ctx.fillStyle='#e2e8f0';ctx.textAlign='right';ctx.fillText(m.n,75,y+barH/2+4);
      ctx.font='700 '+Math.min(13,barH*0.48)+'px JetBrains Mono';ctx.fillStyle=m.c;ctx.textAlign='left';ctx.fillText(m.s,80+bw+8,y+barH/2+4);
    });
  }
  drawFrame(0);
  window.startBarRace=function(){
    if(brPlaying)return;brPlaying=true;brTime=0;
    function anim(){brTime+=0.03;drawFrame(brTime);if(brTime<timeline.length-0.5)requestAnimationFrame(anim);else brPlaying=false;}
    anim();
  };
}


// ========== v2.1: REPORT GENERATOR ==========
let reportInit=false;
function generateReport(){
  if(reportInit)return;reportInit=true;
  const sorted=[...D].map(r=>({r,s:compScore(r),n:compCoverage(r)})).filter(x=>x.s!==null).sort((a,b)=>b.s-a.s);
  const top=sorted[0],top3=sorted.slice(0,3),top10=sorted.slice(0,10);
  const openModels=sorted.filter(x=>x.r[3]==='open');
  const cheapest=sorted.filter(x=>x.r[28]!==null&&x.r[28]>0).sort((a,b)=>a.r[28]-b.r[28]);

  document.getElementById('rptDate').textContent='March 2026 · v2.1';
  document.getElementById('rptVerified').textContent=VERIFIED_DATE;

  const bestValue=cheapest.length?cheapest[0]:null;
  const bestOpen=openModels.length?openModels[0]:null;

  // Executive Summary
  document.getElementById('rptSummary').innerHTML=`
    <div style="display:flex;gap:12px;margin-bottom:14px;flex-wrap:wrap">
      <div style="flex:1;min-width:130px;background:linear-gradient(135deg,rgba(99,102,241,.08),transparent);border-radius:12px;padding:14px;text-align:center">
        <div style="font-size:28px;font-weight:900;color:#6366f1;letter-spacing:-1px">${top.s}</div>
        <div style="font-size:8px;color:var(--text-muted);font-family:var(--font-mono);text-transform:uppercase;letter-spacing:1px">Highest Score</div>
        <div style="font-size:12px;font-weight:700;color:var(--text);margin-top:2px">${top.r[0]}</div>
      </div>
      <div style="flex:1;min-width:130px;background:linear-gradient(135deg,rgba(22,163,74,.08),transparent);border-radius:12px;padding:14px;text-align:center">
        <div style="font-size:28px;font-weight:900;color:#16a34a;letter-spacing:-1px">${D.length}</div>
        <div style="font-size:8px;color:var(--text-muted);font-family:var(--font-mono);text-transform:uppercase;letter-spacing:1px">LLMs Tracked</div>
        <div style="font-size:12px;font-weight:700;color:var(--text);margin-top:2px">6 Modalities</div>
      </div>
      <div style="flex:1;min-width:130px;background:linear-gradient(135deg,rgba(217,119,6,.08),transparent);border-radius:12px;padding:14px;text-align:center">
        <div style="font-size:28px;font-weight:900;color:#d97706;letter-spacing:-1px">$${bestValue?bestValue.r[28]:'—'}</div>
        <div style="font-size:8px;color:var(--text-muted);font-family:var(--font-mono);text-transform:uppercase;letter-spacing:1px">Best Value $/M In</div>
        <div style="font-size:12px;font-weight:700;color:var(--text);margin-top:2px">${bestValue?bestValue.r[0]:'—'}</div>
      </div>
      <div style="flex:1;min-width:130px;background:linear-gradient(135deg,rgba(225,29,72,.08),transparent);border-radius:12px;padding:14px;text-align:center">
        <div style="font-size:28px;font-weight:900;color:#e11d48;letter-spacing:-1px">${bestOpen?bestOpen.s:'—'}</div>
        <div style="font-size:8px;color:var(--text-muted);font-family:var(--font-mono);text-transform:uppercase;letter-spacing:1px">Best Open-Source</div>
        <div style="font-size:12px;font-weight:700;color:var(--text);margin-top:2px">${bestOpen?bestOpen.r[0]:'—'}</div>
      </div>
    </div>
    <div style="background:var(--surface-alt);border-radius:8px;padding:10px;font-size:10px;line-height:1.8">
    <b>🏆 Top 3:</b> ${top3.map((x,i)=>['🥇','🥈','🥉'][i]+' '+x.r[0]+' <span style="font-family:var(--font-mono);font-weight:800;color:var(--ac)">'+x.s+'</span>').join(' · ')}<br>
    <b>📊 Coverage:</b> ${sorted.filter(x=>x.n>=7).length} models with Full data (7+ benchmarks) · <b>Formula:</b> Avg(confirmed) × √(N/10)
    </div>`;

  // Category Winners
  const findBest=(filterFn,sortFn)=>{const f=sorted.filter(filterFn);f.sort(sortFn);return f[0]||null;};
  const avgKeys=(x,ks)=>{const vs=ks.map(k=>x.r[k]).filter(v=>v!==null);return vs.length?vs.reduce((a,b)=>a+b)/vs.length:0;};
  const cats=[
    {l:'🧠 Reasoning',desc:'GPQA+AIME+HLE',w:findBest(()=>true,(a,b)=>avgKeys(b,[8,9,10])-avgKeys(a,[8,9,10])),v:x=>Math.round(avgKeys(x,[8,9,10])*10)/10},
    {l:'🧩 Abstract',desc:'ARC-AGI-2',w:findBest(x=>x.r[11]!==null,(a,b)=>(b.r[11]||0)-(a.r[11]||0)),v:x=>x.r[11]+'%'},
    {l:'🧬 Metacognition',desc:'FINAL Bench',w:findBest(x=>x.r[12]!==null,(a,b)=>(b.r[12]||0)-(a.r[12]||0)),v:x=>x.r[12]},
    {l:'💻 Coding',desc:'SWE-Pro+LCB',w:findBest(()=>true,(a,b)=>avgKeys(b,[13,16])-avgKeys(a,[13,16])),v:x=>Math.round(avgKeys(x,[13,16])*10)/10},
    {l:'📋 Instruction',desc:'IFEval',w:findBest(x=>x.r[15]!==null,(a,b)=>(b.r[15]||0)-(a.r[15]||0)),v:x=>x.r[15]},
    {l:'💰 Best Value',desc:'Score÷Price',w:findBest(x=>x.r[28]>0,(a,b)=>(b.s/(b.r[28]||999))-(a.s/(a.r[28]||999))),v:x=>'$'+x.r[28]+'/M'},
    {l:'🔓 Open-Source',desc:'Top open-weight',w:bestOpen,v:x=>x.s},
    {l:'🇰🇷 Korean AI',desc:'Sovereign AI',w:findBest(x=>x.r[4]==='korean',(a,b)=>b.s-a.s),v:x=>x.s},
  ];
  document.getElementById('rptWinners').innerHTML=cats.map(c=>{
    if(!c.w)return'';
    const pc=pColors[c.w.r[1]]||'#6366f1';
    return`<div style="background:var(--surface-alt);border-radius:10px;padding:12px;border-left:3px solid ${pc}">
      <div style="font-size:8px;color:var(--text-muted);font-family:var(--font-mono);letter-spacing:0.5px">${c.l}</div>
      <div style="font-size:13px;font-weight:800;color:${pc};margin:2px 0">${c.w.r[0]}</div>
      <div style="font-size:9px;color:var(--text-sec)">${c.desc}: <b style="font-family:var(--font-mono)">${c.v(c.w)}</b></div>
    </div>`;
  }).join('');

  // Top 10 Table
  document.getElementById('rptTbody').innerHTML=top10.map((x,i)=>{
    const pc=pColors[x.r[1]]||'#6366f1';
    const price=x.r[28]===null?'—':x.r[28]===0?'Free':'$'+x.r[28];
    const covPct=Math.round(x.n/10*100);
    const covC=covPct>=70?'#16a34a':covPct>=40?'#d97706':'#e11d48';
    return`<tr style="border-bottom:1px solid var(--border)">
      <td style="padding:6px 4px;font-weight:900;font-family:var(--font-mono);color:${i<3?pc:'var(--text-muted)'};font-size:${i<3?'13px':'10px'}">${i+1}</td>
      <td style="padding:6px 4px"><span style="font-weight:700;color:${pc}">${x.r[0]}</span><br><span style="font-size:8px;color:var(--text-muted)">${x.r[1]} · ${x.r[3]}</span></td>
      <td style="padding:6px 4px;text-align:center"><span style="font-family:var(--font-mono);font-weight:900;font-size:14px;color:${pc}">${x.s}</span></td>
      <td style="padding:6px 4px;text-align:center"><div style="width:40px;height:4px;background:var(--border);border-radius:2px;margin:0 auto"><div style="width:${covPct}%;height:100%;background:${covC};border-radius:2px"></div></div><span style="font-size:8px;font-family:var(--font-mono);color:${covC}">${x.n}/10</span></td>
      <td style="padding:6px 4px;text-align:center;font-size:10px">${x.r[3]==='open'?'🔓':'🔒'}</td>
      <td style="padding:6px 4px;text-align:right;font-family:var(--font-mono);font-size:9px;color:var(--text-sec)">${price}</td>
    </tr>`;
  }).join('');

  // Key Insights
  const openAvg=openModels.length?Math.round(openModels.reduce((a,x)=>a+x.s,0)/openModels.length*10)/10:0;
  const closedM=sorted.filter(x=>x.r[3]==='closed');
  const closedAvg=closedM.length?Math.round(closedM.reduce((a,x)=>a+x.s,0)/closedM.length*10)/10:0;
  const metacogCount=sorted.filter(x=>x.r[12]!==null).length;
  document.getElementById('rptInsights').innerHTML=`
    <div style="padding:10px 12px;background:linear-gradient(135deg,rgba(99,102,241,.06),transparent);border-left:3px solid #6366f1;border-radius:0 8px 8px 0;margin-bottom:8px">
      <b style="color:#6366f1">1. Open vs Closed gap is narrowing</b><br>
      <span style="font-size:10px">Open avg <b>${openAvg}</b> vs Closed avg <b>${closedAvg}</b> (Δ${Math.round((closedAvg-openAvg)*10)/10}). ${bestOpen?bestOpen.r[0]:''} at ${bestOpen?bestOpen.s:''} competes directly with closed flagships.</span>
    </div>
    <div style="padding:10px 12px;background:linear-gradient(135deg,rgba(13,148,136,.06),transparent);border-left:3px solid #0d9488;border-radius:0 8px 8px 0;margin-bottom:8px">
      <b style="color:#0d9488">2. No single model dominates all 5 axes</b><br>
      <span style="font-size:10px">${top.r[0]} leads overall, but different models win each axis. Routing strategies outperform single-model deployment for production use cases.</span>
    </div>
    <div style="padding:10px 12px;background:linear-gradient(135deg,rgba(217,119,6,.06),transparent);border-left:3px solid #d97706;border-radius:0 8px 8px 0;margin-bottom:8px">
      <b style="color:#d97706">3. SWE-Verified deprecated → LiveCodeBench</b><br>
      <span style="font-size:10px">59.4% tasks defective per OpenAI audit. ALL Bench uses LCB — continuously updated, contamination-resistant. High SWE-V + Low LCB = inflated coding metrics.</span>
    </div>
    <div style="padding:10px 12px;background:linear-gradient(135deg,rgba(225,29,72,.06),transparent);border-left:3px solid #e11d48;border-radius:0 8px 8px 0">
      <b style="color:#e11d48">4. Metacognition: the new frontier</b><br>
      <span style="font-size:10px">FINAL Bench measures self-correction. Only ${metacogCount} of ${D.length} models tested — a major blind spot. ${sorted.filter(x=>x.r[12]!==null).sort((a,b)=>(b.r[12]||0)-(a.r[12]||0))[0]?.r[0]||'—'} leads.</span>
    </div>`;
}

// ========== v2.1: PDF DOWNLOAD ==========
async function downloadPDF(){
  const el=document.getElementById('reportContent');
  if(!el)return alert('Open Report tab first');
  const isDark=document.body.classList.contains('dark');
  if(isDark)document.body.classList.remove('dark');
  el.style.background='#ffffff';el.style.color='#0f172a';el.style.padding='20px';
  try{
    const canvas=await html2canvas(el,{scale:2,backgroundColor:'#ffffff',useCORS:true,logging:false});
    const{jsPDF}=window.jspdf;
    const pdf=new jsPDF('p','mm','a4');
    const w=pdf.internal.pageSize.getWidth()-20;
    const h=canvas.height*w/canvas.width;
    const pageH=pdf.internal.pageSize.getHeight()-20;
    let pos=0;
    while(pos<h){
      if(pos>0)pdf.addPage();
      pdf.addImage(canvas.toDataURL('image/png'),'PNG',10,10-pos,w,h);
      pos+=pageH;
    }
    pdf.save('ALL_Bench_Report_2026_March.pdf');
  }catch(e){alert('PDF generation error: '+e.message);}
  el.style.background='';el.style.color='';el.style.padding='';
  if(isDark)document.body.classList.add('dark');
}

// ========== v2.1: DOCX DOWNLOAD (Rich Text) ==========
function downloadDOCX(){
  const sorted=[...D].map(r=>({r,s:compScore(r),n:compCoverage(r)})).filter(x=>x.s!==null).sort((a,b)=>b.s-a.s);
  const top10=sorted.slice(0,10);
  const openM=sorted.filter(x=>x.r[3]==='open');
  const openAvg=openM.length?Math.round(openM.reduce((a,x)=>a+x.s,0)/openM.length*10)/10:0;
  const closedM=sorted.filter(x=>x.r[3]==='closed');
  const closedAvg=closedM.length?Math.round(closedM.reduce((a,x)=>a+x.s,0)/closedM.length*10)/10:0;

  // Generate RTF for better formatting
  let rtf='{\\rtf1\\ansi\\deff0{\\fonttbl{\\f0 Arial;}{\\f1 Courier New;}}';
  rtf+='{\\colortbl;\\red99\\green102\\blue241;\\red22\\green163\\blue74;\\red217\\green119\\blue6;\\red225\\green29\\blue72;}';
  rtf+='\\f0\\fs28\\b ALL BENCH INTELLIGENCE REPORT\\b0\\par';
  rtf+='\\fs18 March 2026 \\bullet v2.1 \\bullet Last verified: '+VERIFIED_DATE+'\\par\\par';
  rtf+='\\fs22\\b\\cf1 EXECUTIVE SUMMARY\\cf0\\b0\\par\\par';
  rtf+='\\fs20\\b #1 '+sorted[0].r[0]+' \\f1 (Score: '+sorted[0].s+')\\f0\\b0\\par';
  rtf+='Total: '+D.length+' LLMs tracked across 6 modalities (LLM, VLM, Agent, Image, Video, Music)\\par';
  rtf+='Open avg: '+openAvg+' vs Closed avg: '+closedAvg+'\\par\\par';
  rtf+='\\fs22\\b\\cf1 TOP 10 LLM RANKING\\cf0\\b0\\par\\par';
  // Table
  rtf+='\\trowd\\trgaph70\\trleft0';
  rtf+='\\cellx500\\cellx3500\\cellx4500\\cellx5500\\cellx6500\\cellx7800';
  rtf+='\\intbl\\b # \\cell Model \\cell Score \\cell Cov \\cell Type \\cell Price\\b0 \\cell\\row';
  top10.forEach((x,i)=>{
    rtf+='\\trowd\\trgaph70\\trleft0\\cellx500\\cellx3500\\cellx4500\\cellx5500\\cellx6500\\cellx7800';
    const price=x.r[28]===null?'-':x.r[28]===0?'Free':'$'+x.r[28];
    rtf+='\\intbl '+(i+1)+'\\cell '+x.r[0]+' ('+x.r[1]+')\\cell \\f1 '+x.s+'\\f0\\cell '+x.n+'/10\\cell '+x.r[3]+'\\cell '+price+'\\cell\\row';
  });
  rtf+='\\par\\par';
  rtf+='\\fs22\\b\\cf1 KEY INSIGHTS\\cf0\\b0\\par\\par';
  rtf+='\\fi-200\\li400 1. Open vs Closed gap: \\u916? '+Math.round((closedAvg-openAvg)*10)/10+' points. '+(openM[0]?openM[0].r[0]:'')+' leads open at '+(openM[0]?openM[0].s:'')+'\\par';
  rtf+='2. No single model dominates all 5 axes. Routing strategies recommended.\\par';
  rtf+='3. SWE-Verified deprecated (59.4% defective). LiveCodeBench replaces it.\\par';
  rtf+='4. Metacognition (FINAL Bench): Only '+sorted.filter(x=>x.r[12]!==null).length+' of '+D.length+' models tested.\\par\\par';
  rtf+='\\fs22\\b\\cf1 DATA CONFIDENCE\\cf0\\b0\\par\\par';
  rtf+='\\cf2\\b\\u10003?\\u10003?\\cf0\\b0  Cross-verified (2+ independent sources)\\par';
  rtf+='\\cf3\\b\\u10003?\\cf0\\b0  Single source (provider official)\\par';
  rtf+='\\cf4\\b ~\\cf0\\b0  Self-reported / unverified\\par\\par';
  rtf+='\\fs16\\i ALL Bench Leaderboard v2.1 | allbench.org\\par';
  rtf+='}';

  const blob=new Blob([rtf],{type:'application/rtf'});
  const a=document.createElement('a');
  a.href=URL.createObjectURL(blob);
  a.download='ALL_Bench_Report_2026_March.rtf';
  a.click();
}
</script>
</body>
</html>