Repository navigation
Expand file tree
/
Copy pathindex.html
More file actions
2053 lines (1942 loc) · 169 KB
/
Copy pathindex.html
File metadata and controls
2053 lines (1942 loc) · 169 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Periscope</title>
<link id="favicon" rel="icon" type="image/svg+xml" href="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2NCA2NCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMTc3ZDhjIiBzdHJva2Utd2lkdGg9IjYiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCI+PHN0eWxlPkBtZWRpYSAocHJlZmVycy1jb2xvci1zY2hlbWU6ZGFyayl7c3Zne3N0cm9rZTojNGZiNWM2fWNpcmNsZVtmaWxsXXtmaWxsOiM0ZmI1YzZ9fTwvc3R5bGU+PHBhdGggZD0iTTIyIDQ3VjIyYTYgNiAwIDAgMSA2LTZoNyIvPjxjaXJjbGUgY3g9IjQzIiBjeT0iMTYiIHI9IjciLz48Y2lyY2xlIGN4PSI0MyIgY3k9IjE2IiByPSIyLjUiIGZpbGw9IiMxNzdkOGMiIHN0cm9rZT0ibm9uZSIvPjxwYXRoIGQ9Ik02IDUyYzQtNSA4LTUgMTIgMHM4IDUgMTIgMCA4LTUgMTIgMCA4IDUgMTIgMCIvPjwvc3ZnPg==">
<script>
(function () {
try {
var pref = localStorage.getItem('theme');
var dark = pref === 'dark' || (!pref && window.matchMedia('(prefers-color-scheme: dark)').matches);
document.documentElement.setAttribute('data-theme', dark ? 'dark' : 'light');
document.documentElement.setAttribute('data-theme-pref', pref || 'system');
} catch (e) { document.documentElement.setAttribute('data-theme', 'dark'); }
})();
</script>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap" rel="stylesheet">
<style>
/* ------------------------------------------------------------------
Periscope design system. Hand-written, no framework.
Tokens follow the Cove / Minn Admin contract: data-theme on <html>
holds the effective mode, data-theme-pref the stored preference.
------------------------------------------------------------------ */
:root {
--font-sans: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
--font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
--r-lg: 10px;
--r-md: 6px;
--r-sm: 4px;
--r-pill: 999px;
--wrap: 1180px;
--topbar: 56px;
--ease: cubic-bezier(.2, .7, .2, 1);
}
html[data-theme="dark"] {
color-scheme: dark;
--bg: #0b1014;
--bg-sunk: #070b0e;
--panel: #10171d;
--panel-2: #151e26;
--hover: #1a242d;
--line: #223039;
--line-2: #33454f;
--text: #e6edf1;
--dim: #8e9da8;
--faint: #5b6c77;
--accent: #4fb5c6;
--accent-2: #7fd0dd;
--accent-fg: #06181c;
--ok: #4ec78d;
--warn: #e5b04e;
--bad: #e8706f;
--info: #6fa9ee;
--purple: #b592ea;
--shadow: 0 20px 60px rgba(0, 0, 0, .55), 0 2px 8px rgba(0, 0, 0, .4);
--shadow-sm: 0 6px 24px rgba(0, 0, 0, .45);
--scrim: rgba(4, 8, 11, .72);
--z-t: #7fd0dd; --z-cls: #8e9da8; --z-n: #e6edf1; --z-num: #e5b04e; --z-s: #b7d39a; --z-c: #5b6c77; --z-d: #b592ea;
}
html[data-theme="light"] {
color-scheme: light;
--bg: #f4f7f8;
--bg-sunk: #eaeff1;
--panel: #ffffff;
--panel-2: #f3f6f7;
--hover: #edf2f4;
--line: #d6dee3;
--line-2: #b6c3ca;
--text: #14212b;
--dim: #5e6f7a;
--faint: #97a5ad;
--accent: #177d8c;
--accent-2: #12616d;
--accent-fg: #ffffff;
--ok: #1f7a4c;
--warn: #8a6314;
--bad: #b14141;
--info: #2c63a6;
--purple: #6b4db0;
--shadow: 0 20px 60px rgba(20, 33, 43, .18), 0 2px 8px rgba(20, 33, 43, .08);
--shadow-sm: 0 6px 24px rgba(20, 33, 43, .12);
--scrim: rgba(20, 33, 43, .45);
--z-t: #12616d; --z-cls: #5e6f7a; --z-n: #14212b; --z-num: #8a6314; --z-s: #4f7d2a; --z-c: #97a5ad; --z-d: #6b4db0;
}
/* ---- reset ---- */
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; }
body {
margin: 0; min-height: 100vh; background: var(--bg); color: var(--text);
font-family: var(--font-sans); font-size: 14px; line-height: 1.5;
-webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, p { margin: 0; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, select { font: inherit; color: inherit; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
code, pre, kbd, .mono { font-family: var(--font-mono); font-size: .93em; }
::selection { background: color-mix(in srgb, var(--accent) 30%, transparent); }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
/* ---- click to copy: any [data-ctx] value copies on click, right-click for more ---- */
[data-ctx] { cursor: pointer; border-radius: 3px; }
[data-ctx]:hover { background: color-mix(in srgb, var(--accent) 12%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 12%, transparent); }
[data-ctx].copied { background: color-mix(in srgb, var(--ok) 22%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 22%, transparent); }
td[data-ctx] { border-radius: 0; }
td[data-ctx]:hover { background: var(--hover); box-shadow: none; text-decoration: underline dotted var(--faint); text-underline-offset: 3px; }
td[data-ctx].copied { box-shadow: none; }
.table tbody tr:hover td { transition: none; }
.copy-card { opacity: 0; transition: opacity .15s; }
.card:hover .copy-card, .copy-card:focus-visible { opacity: 1; }
@media (hover: none) { .copy-card { opacity: 1; } }
.card-right { display: inline-flex; align-items: center; gap: 6px; }
.sub-list { margin: 2px 0 6px 0; padding: 6px 10px; background: var(--bg-sunk); border: 1px solid var(--line); border-radius: var(--r-sm); display: flex; flex-direction: column; gap: 3px; }
.sub-list code { font-size: 11.5px; overflow-wrap: anywhere; }
.sub-list .more { font-size: 11px; color: var(--faint); }
.row.stack-row { flex-direction: column; align-items: stretch; gap: 0; }
.row > .row-main { display: flex; flex: 1; min-width: 0; align-items: center; justify-content: space-between; gap: 12px; }
.report-page { margin-top: 8px; font-size: 13.5px; max-width: 72ch; }
.report-page .pt { font-weight: 500; }
.report-page .pd { color: var(--dim); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.facts .v.mono[data-ctx] { display: inline-block; max-width: 100%; }
/* ---- icons ---- */
.ic { width: 1em; height: 1em; display: inline-block; vertical-align: -.15em; flex: none;
stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ic.fill { fill: currentColor; stroke: none; }
.ic-lg { font-size: 20px; } .ic-xl { font-size: 40px; } .ic-2x { font-size: 64px; }
/* ---- scrollbars ---- */
.scroll::-webkit-scrollbar { width: 8px; height: 8px; }
.scroll::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 4px; }
.scroll::-webkit-scrollbar-thumb:hover { background: var(--faint); }
.scroll { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
/* ---- text utilities ---- */
.dim { color: var(--dim); } .faint { color: var(--faint); }
.ok { color: var(--ok); } .warn { color: var(--warn); } .bad { color: var(--bad); } .info { color: var(--info); } .purple { color: var(--purple); } .accent { color: var(--accent); }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.break { overflow-wrap: anywhere; }
.eyebrow { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
.small { font-size: 12px; } .xs { font-size: 11px; }
.num { font-variant-numeric: tabular-nums; }
/* ---- top bar ---- */
.topbar {
position: sticky; top: 0; z-index: 40; height: var(--topbar);
background: color-mix(in srgb, var(--bg) 82%, transparent);
backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
border-bottom: 1px solid var(--line);
}
.topbar-inner { max-width: var(--wrap); margin: 0 auto; height: 100%; padding: 0 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; user-select: none; cursor: pointer; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand-mark { width: 28px; height: 28px; display: block; color: var(--text); fill: none; stroke: currentColor; stroke-width: 4.5; stroke-linecap: round; stroke-linejoin: round; }
.brand-name { font-weight: 600; font-size: 15px; letter-spacing: -.01em; }
.topbar-actions { display: flex; align-items: center; gap: 4px; }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: var(--r-pill); font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; border: 1px solid var(--line); color: var(--dim); background: var(--panel); white-space: nowrap; }
.pill-accent { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill .dot.live { box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 25%, transparent); animation: breathe 2.4s ease-in-out infinite; }
.icon-btn { width: 34px; height: 34px; display: inline-grid; place-items: center; border-radius: var(--r-md); color: var(--dim); transition: background .15s, color .15s; }
.icon-btn:hover { background: var(--hover); color: var(--text); text-decoration: none; }
.icon-btn .ic { font-size: 18px; }
.icon-btn.sm { width: 28px; height: 28px; } .icon-btn.sm .ic { font-size: 15px; }
.icon-btn:disabled { opacity: .35; cursor: default; }
.icon-btn.danger:hover { color: var(--bad); }
/* ---- layout ---- */
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 24px 20px 72px; }
.stack > * + * { margin-top: 16px; }
/* ---- hero / scan bar ---- */
.hero { max-width: 760px; margin: 0 auto; transition: margin .5s var(--ease), max-width .5s var(--ease); position: relative; }
.hero:has(.dropdown) { z-index: 30; }
.hero.is-idle { margin-top: clamp(24px, 12vh, 120px); }
.hero.is-idle .scanbar { height: 60px; }
.hero-copy { text-align: center; margin-bottom: 22px; }
.hero-copy h1 { font-size: clamp(26px, 4vw, 36px); font-weight: 600; letter-spacing: -.02em; line-height: 1.1; }
.hero-copy p { color: var(--dim); margin-top: 8px; font-size: 15px; }
.scanbar { position: relative; display: flex; align-items: center; height: 52px; padding: 0 6px 0 14px; gap: 8px; background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--r-lg); transition: border-color .15s, box-shadow .15s, height .4s var(--ease); }
.scanbar:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
.scanbar .lead { color: var(--faint); font-size: 20px; display: grid; place-items: center; }
.scanbar:focus-within .lead { color: var(--accent); }
.scan-input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; font-family: var(--font-mono); font-size: 16px; color: var(--text); }
.scan-input::placeholder { color: var(--faint); font-family: var(--font-sans); }
.btn { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: var(--r-md); font-weight: 500; font-size: 13.5px; border: 1px solid transparent; white-space: nowrap; transition: background .15s, color .15s, border-color .15s, opacity .15s; }
.btn:disabled { opacity: .5; cursor: default; }
.btn-primary { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.btn-primary:hover:not(:disabled) { background: var(--accent-2); border-color: var(--accent-2); }
.btn-ghost { background: transparent; color: var(--dim); border-color: var(--line); }
.btn-ghost:hover:not(:disabled) { background: var(--hover); color: var(--text); border-color: var(--line-2); text-decoration: none; }
.btn-soft { background: var(--panel-2); color: var(--text); border-color: var(--line); }
.btn-soft:hover:not(:disabled) { background: var(--hover); border-color: var(--line-2); }
.btn-sm { height: 28px; padding: 0 10px; font-size: 12.5px; gap: 5px; }
.btn-xs { height: 24px; padding: 0 8px; font-size: 11.5px; gap: 4px; }
.btn .ic { font-size: 15px; }
.link { color: var(--accent); font-weight: 500; display: inline-flex; align-items: center; gap: 5px; }
.link-dim { color: var(--dim); } .link-dim:hover { color: var(--accent); text-decoration: none; }
.link-dim.small { font-size: 12px; }
.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes breathe { 0%, 100% { opacity: 1 } 50% { opacity: .45 } }
@keyframes rise { from { opacity: 0; transform: translateY(8px) } to { opacity: 1; transform: none } }
@keyframes pop { from { opacity: 0; transform: scale(.97) } to { opacity: 1; transform: none } }
@keyframes slide-in { from { opacity: 0; transform: translateX(16px) } to { opacity: 1; transform: none } }
.rise { animation: rise .35s var(--ease) both; }
.pop { animation: pop .12s ease-out both; }
.dropdown { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--r-md); box-shadow: var(--shadow-sm); overflow: hidden; z-index: 50; max-height: 300px; overflow-y: auto; }
.dropdown-label { padding: 8px 12px 6px; font-size: 10.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); border-bottom: 1px solid var(--line); }
.dropdown ul { list-style: none; margin: 0; padding: 4px; }
.dropdown li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 10px; border-radius: var(--r-sm); cursor: pointer; }
.dropdown li:hover { background: var(--hover); }
.dropdown li .d { font-family: var(--font-mono); font-size: 13px; }
.dropdown li .t { font-size: 11px; color: var(--faint); font-family: var(--font-mono); }
.advanced { margin-top: 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.field { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 240px; }
.field label { font-size: 12px; color: var(--dim); white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; }
.input { height: 32px; padding: 0 10px; border-radius: var(--r-md); background: var(--panel); border: 1px solid var(--line); color: var(--text); font-family: var(--font-mono); font-size: 13px; outline: 0; width: 100%; transition: border-color .15s, box-shadow .15s; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent); }
.input::placeholder { color: var(--faint); font-family: var(--font-sans); }
.input.sans { font-family: var(--font-sans); }
.select { height: 30px; padding: 0 28px 0 10px; border-radius: var(--r-md); background: var(--panel-2); border: 1px solid var(--line); color: var(--text); font-size: 12.5px; outline: 0; appearance: none; -webkit-appearance: none;
background-image: linear-gradient(45deg, transparent 50%, var(--dim) 50%), linear-gradient(135deg, var(--dim) 50%, transparent 50%);
background-position: calc(100% - 14px) 13px, calc(100% - 9px) 13px; background-size: 5px 5px; background-repeat: no-repeat; }
.select:focus { border-color: var(--accent); }
/* progress */
.progress { margin-top: 14px; }
.progress-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 12px; color: var(--dim); margin-bottom: 6px; }
.progress-row .right { display: inline-flex; align-items: center; gap: 8px; font-variant-numeric: tabular-nums; }
.progress-detail { font-family: var(--font-mono); font-size: 11.5px; color: var(--faint); margin-bottom: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.progress-bar { height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; }
.progress-bar > i { display: block; height: 100%; background: var(--accent); border-radius: 2px; transition: width .3s var(--ease); }
/* alerts + banners */
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--panel); font-size: 13px; }
.alert .ic { font-size: 16px; margin-top: 2px; }
.alert-bad { border-color: color-mix(in srgb, var(--bad) 40%, transparent); background: color-mix(in srgb, var(--bad) 9%, var(--panel)); }
.alert-bad .ic, .alert-bad strong { color: var(--bad); }
.alert-warn { border-color: color-mix(in srgb, var(--warn) 40%, transparent); background: color-mix(in srgb, var(--warn) 9%, var(--panel)); }
.alert-warn .ic, .alert-warn strong { color: var(--warn); }
.alert-info { border-color: color-mix(in srgb, var(--info) 40%, transparent); background: color-mix(in srgb, var(--info) 9%, var(--panel)); }
.alert-info .ic { color: var(--info); }
.alert p { margin: 0; } .alert .sub { color: var(--dim); font-size: 12px; margin-top: 2px; }
.banner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 9px 14px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--panel); font-size: 13px; }
.banner .lbl { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; color: var(--dim); }
.banner.warn { border-color: color-mix(in srgb, var(--warn) 40%, transparent); background: color-mix(in srgb, var(--warn) 8%, var(--panel)); }
.banner.warn .lbl { color: var(--warn); }
.banner.bad { border-color: color-mix(in srgb, var(--bad) 40%, transparent); background: color-mix(in srgb, var(--bad) 8%, var(--panel)); }
.banner.bad .lbl { color: var(--bad); }
.banner .sep { color: var(--faint); }
/* empty states / install */
.state { max-width: 560px; margin: 56px auto 0; text-align: center; }
.state .ic-xl { color: var(--faint); }
.state .ic-xl.accent { color: var(--accent); }
.state h2 { font-size: 22px; font-weight: 600; letter-spacing: -.015em; margin-top: 14px; }
.state p { color: var(--dim); margin-top: 8px; }
.state .quiet { color: var(--faint); font-size: 13px; }
.state-idle { animation: breathe 3s ease-in-out infinite; }
.install { margin: 22px auto 0; display: flex; align-items: center; gap: 8px; text-align: left; padding: 6px 6px 6px 16px; background: var(--bg-sunk); border: 1px solid var(--line); border-radius: var(--r-md); }
.install code { flex: 1; overflow-x: auto; white-space: nowrap; font-size: 13.5px; color: var(--accent); padding: 8px 0; }
.install code .p { color: var(--faint); user-select: none; margin-right: 8px; }
/* ---- report header ---- */
.report-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px 20px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.report-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.report-title h1 { font-family: var(--font-mono); font-size: clamp(18px, 2.4vw, 24px); font-weight: 600; letter-spacing: -.01em; word-break: break-all; }
.report-title .of { color: var(--faint); font-size: 13px; }
.report-title .of code { color: var(--dim); }
.report-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.report-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 8px; border-radius: var(--r-sm); font-size: 12px; font-weight: 500; font-family: var(--font-mono); border: 1px solid var(--line); color: var(--dim); background: var(--panel); white-space: nowrap; }
.chip .ic { font-size: 13px; }
.chip-ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, transparent); background: color-mix(in srgb, var(--ok) 10%, transparent); }
.chip-warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, transparent); background: color-mix(in srgb, var(--warn) 10%, transparent); }
.chip-bad { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, transparent); background: color-mix(in srgb, var(--bad) 10%, transparent); }
.chip-info { color: var(--info); border-color: color-mix(in srgb, var(--info) 40%, transparent); background: color-mix(in srgb, var(--info) 10%, transparent); }
.chip-accent { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, transparent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.chip-purple { color: var(--purple); border-color: color-mix(in srgb, var(--purple) 40%, transparent); background: color-mix(in srgb, var(--purple) 10%, transparent); }
.chip-plain { font-family: var(--font-sans); }
.chip .k { color: var(--faint); font-weight: 400; }
.chip.sans { font-family: var(--font-sans); }
.tag { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 7px; border-radius: var(--r-sm); font-size: 11px; font-weight: 600; letter-spacing: .02em; background: var(--panel-2); color: var(--dim); border: 1px solid var(--line); white-space: nowrap; }
.tag.mono { font-family: var(--font-mono); font-weight: 500; }
.tag-ok { color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, transparent); border-color: transparent; }
.tag-warn { color: var(--warn); background: color-mix(in srgb, var(--warn) 14%, transparent); border-color: transparent; }
.tag-bad { color: var(--bad); background: color-mix(in srgb, var(--bad) 12%, transparent); border-color: transparent; }
.tag-info { color: var(--info); background: color-mix(in srgb, var(--info) 12%, transparent); border-color: transparent; }
.tag-accent { color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); border-color: transparent; }
.tag-purple { color: var(--purple); background: color-mix(in srgb, var(--purple) 12%, transparent); border-color: transparent; }
a.tag:hover { text-decoration: none; filter: brightness(1.1); }
/* redirect chain */
.chain { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.hop { position: relative; display: inline-flex; align-items: center; gap: 6px; cursor: help; }
.hop > code { font-size: 12.5px; }
.hop .tip { position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%); padding: 8px 10px; background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--r-md); box-shadow: var(--shadow-sm); white-space: nowrap; opacity: 0; visibility: hidden; transition: opacity .12s; z-index: 60; text-align: left; }
.hop:hover .tip { opacity: 1; visibility: visible; }
.hop .tip code { font-size: 11.5px; display: block; max-width: 360px; overflow: hidden; text-overflow: ellipsis; }
.hop .tip .sub { font-size: 11px; color: var(--dim); margin-top: 3px; display: flex; align-items: center; gap: 4px; }
.chain .arrow { color: var(--faint); font-size: 14px; }
/* generic tooltip wrapper */
.has-tip { position: relative; }
.has-tip .tip { position: absolute; right: 0; bottom: calc(100% + 8px); min-width: 190px; padding: 10px 12px; background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--r-md); box-shadow: var(--shadow-sm); opacity: 0; visibility: hidden; transition: opacity .12s; z-index: 60; text-align: left; font-family: var(--font-sans); font-weight: 400; }
.has-tip:hover .tip { opacity: 1; visibility: visible; }
.tip-row { display: flex; justify-content: space-between; gap: 16px; font-size: 12.5px; padding: 2px 0; }
.tip-row .v { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.tip-row.total { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 6px; font-weight: 600; }
/* ---- cards ---- */
.grid { display: grid; gap: 16px; }
.grid-cards { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-main { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: start; }
@media (max-width: 900px) { .grid-main { grid-template-columns: 1fr; } }
.col { display: grid; gap: 16px; align-content: start; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; min-width: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 16px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--panel-2) 60%, var(--panel)); min-height: 44px; }
.card-title { display: inline-flex; align-items: center; gap: 8px; font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
.card-title .ic { font-size: 14px; color: var(--faint); }
.card-sub { font-size: 12px; color: var(--faint); font-weight: 400; letter-spacing: 0; text-transform: none; margin-left: 4px; }
.card-body { padding: 16px; }
.card-body.tight { padding: 10px 16px; }
.card-body.flush { padding: 0; }
.card-foot { padding: 10px 16px; border-top: 1px solid var(--line); font-size: 12.5px; }
.card-foot.warn { background: color-mix(in srgb, var(--warn) 8%, transparent); color: var(--warn); }
.card-foot.bad { background: color-mix(in srgb, var(--bad) 8%, transparent); color: var(--bad); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 14px 20px; }
.fact .l { font-size: 11px; color: var(--faint); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; margin-bottom: 4px; }
.fact .v { font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fact .v.mono { font-size: 13px; }
.fact .v.big { font-size: 26px; font-weight: 600; letter-spacing: -.02em; line-height: 1.1; font-family: var(--font-mono); }
.rows { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 12.5px; }
.row + .row { border-top: 1px solid var(--line); }
.row .k { color: var(--dim); display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.row .v { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 12px; text-align: right; min-width: 0; }
.row .v .n { color: var(--faint); font-family: var(--font-sans); }
.mark-ok { color: var(--ok); } .mark-off { color: var(--line-2); }
.peek { color: var(--faint); display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: var(--r-sm); }
.peek:hover { color: var(--accent); background: var(--hover); }
.peek .ic { font-size: 14px; }
.kv { display: grid; grid-template-columns: minmax(110px, 1fr) 2fr; gap: 6px 14px; padding: 9px 16px; font-size: 13px; align-items: baseline; }
.kv + .kv { border-top: 1px solid var(--line); }
.kv:hover { background: var(--hover); }
.kv .k { color: var(--dim); font-size: 12.5px; }
.kv .v { font-family: var(--font-mono); font-size: 12.5px; overflow-wrap: anywhere; }
.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 10px 16px; }
.list-item + .list-item { border-top: 1px solid var(--line); }
.list-item:hover { background: var(--hover); }
.list-item .lead { width: 24px; display: grid; place-items: center; font-size: 16px; color: var(--faint); }
.list-item .main { flex: 1; min-width: 0; }
.list-item .main .t { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; font-weight: 500; }
.list-item .main .t code { font-size: 12px; }
.list-item .main .d { font-size: 12px; color: var(--dim); margin-top: 2px; }
.list-item .end { flex: none; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.section-l { font-size: 11px; color: var(--faint); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 6px; }
.stack-sm > * + * { margin-top: 12px; }
/* network coordinates */
.ip-block { background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px; }
.ip-block + .ip-block { margin-top: 12px; }
.ip-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.ip-head .ip { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-weight: 600; font-size: 13px; }
.ip-head .ip i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 22%, transparent); }
.ip-rows { display: grid; grid-template-columns: 90px 1fr; gap: 3px 10px; font-size: 12px; }
.ip-rows .k { color: var(--dim); } .ip-rows .v { font-family: var(--font-mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ip-ptr { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
/* tables */
.table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.table th { text-align: left; font-size: 10.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); padding: 9px 16px; background: var(--panel-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 8px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--hover); }
.table td.k { color: var(--dim); white-space: nowrap; }
.table td.mono { font-family: var(--font-mono); font-size: 12px; overflow-wrap: anywhere; }
.table td.type { font-family: var(--font-mono); font-weight: 600; color: var(--accent); white-space: nowrap; font-size: 11.5px; }
.table td.name { font-family: var(--font-mono); color: var(--dim); white-space: nowrap; font-size: 12px; }
.table-wrap { overflow-x: auto; }
/* zone file */
.zone { position: relative; background: var(--bg-sunk); }
.zone pre { margin: 0; padding: 14px 16px; font-size: 12.5px; line-height: 1.6; overflow-x: auto; color: var(--z-n); }
.zone .z-t { color: var(--z-t); font-weight: 600; } .zone .z-cls { color: var(--z-cls); } .zone .z-num { color: var(--z-num); } .zone .z-s { color: var(--z-s); } .zone .z-c { color: var(--z-c); font-style: italic; } .zone .z-d { color: var(--z-d); }
.zone-actions { display: inline-flex; gap: 4px; }
/* score */
.grade { font-family: var(--font-mono); font-weight: 700; font-size: 26px; line-height: 1; letter-spacing: -.02em; }
.score-tag { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
/* ---- modals ---- */
.modal-root { position: fixed; inset: 0; z-index: 80; display: flex; align-items: flex-start; justify-content: center; padding: 8vh 16px 16px; overflow-y: auto; }
.scrim { position: fixed; inset: 0; background: var(--scrim); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.modal { position: relative; width: 100%; max-width: 560px; background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--r-lg); box-shadow: var(--shadow); animation: pop .14s ease-out both; display: flex; flex-direction: column; max-height: 84vh; }
.modal.md { max-width: 640px; } .modal.lg { max-width: 900px; } .modal.sm { max-width: 420px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px 12px 18px; border-bottom: 1px solid var(--line); }
.modal-head h3 { font-size: 15px; font-weight: 600; letter-spacing: -.01em; display: inline-flex; align-items: center; gap: 8px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.modal-head .acts { display: inline-flex; gap: 2px; }
.modal-body { padding: 18px; overflow-y: auto; }
.modal-body.flush { padding: 0; }
.modal-foot { padding: 10px 18px; border-top: 1px solid var(--line); font-size: 13px; text-align: center; }
.tabs { display: flex; gap: 2px; padding: 10px 18px 0; }
.tab { height: 30px; padding: 0 12px; border-radius: var(--r-md) var(--r-md) 0 0; font-size: 12.5px; font-weight: 500; color: var(--dim); border: 1px solid transparent; border-bottom: 0; }
.tab:hover { color: var(--text); }
.tab.on { color: var(--accent); background: var(--bg-sunk); border-color: var(--line); }
.raw { background: var(--bg-sunk); border: 1px solid var(--line); border-radius: var(--r-md); margin: 0 18px 18px; max-height: 64vh; overflow: auto; }
.tabs + .raw { border-top-left-radius: 0; margin-top: -1px; }
.raw pre { margin: 0; padding: 14px 16px; font-size: 12.5px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.search { position: relative; }
.search .ic { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--faint); font-size: 15px; }
.search .input { padding-left: 32px; height: 34px; }
.filters { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.hlist { list-style: none; margin: 0; padding: 0; }
.hlist li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 18px; cursor: pointer; border-top: 1px solid var(--line); border-left: 3px solid transparent; }
.hlist li:hover { background: var(--hover); }
.hlist li.sel { background: var(--hover); border-left-color: var(--accent); }
.hlist li.cur { border-left-color: var(--accent); }
.hlist .d { font-family: var(--font-mono); font-size: 13px; font-weight: 500; }
.hlist .t { font-size: 11.5px; color: var(--dim); margin-top: 1px; }
.hlist .ic-chev { color: var(--faint); }
.hlist li .hover-only { opacity: 0; transition: opacity .12s; }
.hlist li:hover .hover-only, .hlist li.sel .hover-only { opacity: 1; }
.hlist-empty { padding: 40px 18px; text-align: center; color: var(--faint); }
.hlist-empty .ic { font-size: 36px; display: block; margin: 0 auto 8px; }
.kbd-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 13px; color: var(--dim); }
.kbd-row + .kbd-row { border-top: 1px solid var(--line); }
kbd { display: inline-grid; place-items: center; min-width: 24px; height: 22px; padding: 0 6px; font-size: 11.5px; border-radius: var(--r-sm); background: var(--panel-2); border: 1px solid var(--line-2); color: var(--text); box-shadow: inset 0 -1px 0 var(--line-2); }
.kbds { display: inline-flex; gap: 4px; }
.help-section { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.help-section:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.help-section h4 { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); margin-bottom: 10px; }
.cmd { display: block; margin-top: 4px; padding: 8px 10px; background: var(--bg-sunk); border: 1px solid var(--line); border-radius: var(--r-sm); font-size: 12px; overflow-x: auto; white-space: nowrap; }
.cmd-l { font-size: 12.5px; color: var(--dim); }
.cmd + .cmd-l { margin-top: 10px; }
.preview-card { border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; background: var(--panel-2); }
.preview-card.round { border-radius: 14px; }
.preview-img { aspect-ratio: 1.91 / 1; background: var(--bg-sunk); display: grid; place-items: center; color: var(--faint); overflow: hidden; }
.preview-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.preview-txt { padding: 12px 14px; }
.preview-txt .u { font-size: 11px; color: var(--faint); text-transform: uppercase; letter-spacing: .06em; }
.preview-txt h4 { font-size: 14px; font-weight: 600; margin-top: 3px; line-height: 1.3; }
.preview-txt p { font-size: 12.5px; color: var(--dim); margin-top: 3px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.favicons { display: flex; align-items: flex-end; justify-content: center; gap: 28px; padding: 8px 0 4px; }
.favicons > div { text-align: center; }
.favicons img { display: block; margin: 0 auto 6px; }
.favicons span { font-size: 11px; color: var(--faint); font-family: var(--font-mono); }
.plugin-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.plugin-list li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r-md); background: var(--panel-2); border: 1px solid var(--line); }
.plugin-list li .ic { color: var(--faint); font-size: 16px; }
.plugin-list .n { font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plugin-list .s { font-size: 11.5px; color: var(--faint); font-family: var(--font-mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* ---- context menu ---- */
.ctx { position: fixed; z-index: 90; min-width: 200px; max-width: 320px; padding: 4px; background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--r-md); box-shadow: var(--shadow-sm); animation: pop .1s ease-out both; }
.ctx button { display: flex; width: 100%; align-items: center; gap: 8px; padding: 7px 10px; border-radius: var(--r-sm); font-size: 13px; text-align: left; }
.ctx button:hover { background: var(--hover); }
.ctx button .ic { color: var(--dim); font-size: 15px; }
.ctx button code { font-size: 12px; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ctx .sep { height: 1px; background: var(--line); margin: 4px 6px; }
.ctx .ctx-l { padding: 6px 10px 4px; font-size: 10.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.ctx button.on { color: var(--accent); }
.ctx button.on .ic { color: var(--accent); }
.ctx button .tick { margin-left: auto; font-size: 14px; }
/* ---- toast ---- */
.toast { position: fixed; right: 20px; bottom: 20px; z-index: 100; display: flex; align-items: center; gap: 16px; padding: 10px 14px 10px 16px; background: var(--text); color: var(--bg); border-radius: var(--r-md); box-shadow: var(--shadow-sm); font-size: 13.5px; font-weight: 500; animation: slide-in .18s var(--ease) both; }
.toast button { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; opacity: .7; }
.toast button:hover { opacity: 1; }
/* ---- footer ---- */
.foot { margin-top: 40px; padding-top: 16px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--faint); }
/* ---- theme button ---- */
.theme-btn .ic { transition: transform .3s var(--ease), opacity .2s; }
@media (max-width: 640px) {
.wrap { padding: 16px 14px 56px; }
.topbar-inner { padding: 0 14px; }
.brand-name { display: none; }
.hero.is-idle .scanbar { height: 54px; }
.scan-input { font-size: 15px; }
.facts { grid-template-columns: 1fr 1fr; }
.kv { grid-template-columns: 1fr; gap: 2px; }
.modal-root { padding: 12px; }
.modal { max-height: 92vh; }
.toast { left: 14px; right: 14px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .001s !important; transition-duration: .001s !important; } }
</style>
</head>
<body>
<svg xmlns="http://www.w3.org/2000/svg" style="display:none" aria-hidden="true">
<symbol id="i-scope" viewBox="0 0 24 24"><circle cx="12" cy="12" r="8"/><circle cx="12" cy="12" r="3"/><path d="M12 1.5V4M12 20v2.5M1.5 12H4M20 12h2.5"/></symbol>
<symbol id="i-check-circle" viewBox="0 0 24 24"><circle cx="12" cy="12" r="9"/><path d="m8.5 12.2 2.4 2.4 4.6-5.2"/></symbol>
<symbol id="i-x-circle" viewBox="0 0 24 24"><circle cx="12" cy="12" r="9"/><path d="m9.2 9.2 5.6 5.6m0-5.6-5.6 5.6"/></symbol>
<symbol id="i-minus-circle" viewBox="0 0 24 24"><circle cx="12" cy="12" r="9"/><path d="M8.5 12h7"/></symbol>
<symbol id="i-x" viewBox="0 0 24 24"><path d="M6 6l12 12M18 6 6 18"/></symbol>
<symbol id="i-check" viewBox="0 0 24 24"><path d="m5 12.5 4.5 4.5L19 7.5"/></symbol>
<symbol id="i-eye" viewBox="0 0 24 24"><path d="M2.5 12S6 5.5 12 5.5 21.5 12 21.5 12 18 18.5 12 18.5 2.5 12 2.5 12Z"/><circle cx="12" cy="12" r="3"/></symbol>
<symbol id="i-eye-off" viewBox="0 0 24 24"><path d="M3.5 3.5l17 17"/><path d="M10.6 6a10 10 0 0 1 1.4-.1c6 0 9.5 6.1 9.5 6.1a17 17 0 0 1-2.6 3.3"/><path d="M6.4 6.8C3.9 8.7 2.5 12 2.5 12s3.5 6.5 9.5 6.5a9.7 9.7 0 0 0 4.4-1"/><path d="M9.9 9.9a3 3 0 0 0 4.2 4.2"/></symbol>
<symbol id="i-image" viewBox="0 0 24 24"><rect x="3" y="4" width="18" height="16" rx="2"/><circle cx="8.5" cy="9.5" r="1.5"/><path d="m21 15.5-4.5-4.5L7 20"/></symbol>
<symbol id="i-image-off" viewBox="0 0 24 24"><path d="M3 3l18 18"/><path d="M8 4h11a2 2 0 0 1 2 2v11"/><path d="M4 8v10a2 2 0 0 0 2 2h10"/><path d="m21 15.5-4.5-4.5-2 2"/><path d="m12 12-8 8"/></symbol>
<symbol id="i-history" viewBox="0 0 24 24"><path d="M3.5 12a8.5 8.5 0 1 0 2.6-6.1"/><path d="M3.5 3.5V8h4.5"/><path d="M12 7.5V12l3 2"/></symbol>
<symbol id="i-clock" viewBox="0 0 24 24"><circle cx="12" cy="12" r="9"/><path d="M12 7v5l3.2 2"/></symbol>
<symbol id="i-copy" viewBox="0 0 24 24"><rect x="9" y="9" width="11" height="11" rx="2"/><path d="M5 15V6a2 2 0 0 1 2-2h9"/></symbol>
<symbol id="i-refresh" viewBox="0 0 24 24"><path d="M20 12a8 8 0 1 1-2.4-5.7"/><path d="M20 3.5v5h-5"/></symbol>
<symbol id="i-chevron-right" viewBox="0 0 24 24"><path d="m9 6 6 6-6 6"/></symbol>
<symbol id="i-chevron-down" viewBox="0 0 24 24"><path d="m6 9 6 6 6-6"/></symbol>
<symbol id="i-chevron-up" viewBox="0 0 24 24"><path d="m6 15 6-6 6 6"/></symbol>
<symbol id="i-alert" viewBox="0 0 24 24"><path d="M12 3.5 2.5 20h19L12 3.5Z"/><path d="M12 10v4.5"/><path d="M12 17.5h.01"/></symbol>
<symbol id="i-alert-circle" viewBox="0 0 24 24"><circle cx="12" cy="12" r="9"/><path d="M12 7.5V13"/><path d="M12 16.5h.01"/></symbol>
<symbol id="i-shield" viewBox="0 0 24 24"><path d="M12 3 4.5 6v5.5c0 4.6 3.1 8.2 7.5 9.5 4.4-1.3 7.5-4.9 7.5-9.5V6L12 3Z"/></symbol>
<symbol id="i-shield-check" viewBox="0 0 24 24"><path d="M12 3 4.5 6v5.5c0 4.6 3.1 8.2 7.5 9.5 4.4-1.3 7.5-4.9 7.5-9.5V6L12 3Z"/><path d="m8.8 12 2.2 2.2 4.2-4.6"/></symbol>
<symbol id="i-shield-off" viewBox="0 0 24 24"><path d="M3.5 3.5l17 17"/><path d="M19.5 14.6c0-.9.5-2 .5-3.1V6L12 3 9.2 4.1"/><path d="M5.6 5.9 4.5 6v5.5c0 4.6 3.1 8.2 7.5 9.5 1.9-.6 3.5-1.6 4.8-2.9"/></symbol>
<symbol id="i-puzzle" viewBox="0 0 24 24"><path d="M10 4.5a2 2 0 1 1 4 0V6h3.5a1 1 0 0 1 1 1v3.5h-1.5a2 2 0 1 0 0 4H18.5V18a1 1 0 0 1-1 1H14v-1.5a2 2 0 1 0-4 0V19H6.5a1 1 0 0 1-1-1v-3.5H7a2 2 0 1 0 0-4H5.5V7a1 1 0 0 1 1-1H10V4.5Z"/></symbol>
<symbol id="i-mail" viewBox="0 0 24 24"><rect x="3" y="5" width="18" height="14" rx="2"/><path d="m3 7.5 9 6 9-6"/></symbol>
<symbol id="i-server" viewBox="0 0 24 24"><rect x="3" y="4" width="18" height="7" rx="1.5"/><rect x="3" y="13" width="18" height="7" rx="1.5"/><path d="M7 7.5h.01M7 16.5h.01"/></symbol>
<symbol id="i-globe" viewBox="0 0 24 24"><circle cx="12" cy="12" r="9"/><path d="M3 12h18"/><path d="M12 3c2.6 2.6 3.8 5.6 3.8 9s-1.2 6.4-3.8 9c-2.6-2.6-3.8-5.6-3.8-9S9.4 5.6 12 3Z"/></symbol>
<symbol id="i-globe-off" viewBox="0 0 24 24"><path d="M3.5 3.5l17 17"/><path d="M7.4 5.2A9 9 0 0 1 18.8 16.6"/><path d="M5.2 7.4A9 9 0 0 0 16.6 18.8"/><path d="M3 12h7M14 12h7"/></symbol>
<symbol id="i-arrow-right" viewBox="0 0 24 24"><path d="M4 12h16"/><path d="m14 6 6 6-6 6"/></symbol>
<symbol id="i-corner-right" viewBox="0 0 24 24"><path d="M4 19v-7a4 4 0 0 1 4-4h11"/><path d="m15 4 4 4-4 4"/></symbol>
<symbol id="i-subdir" viewBox="0 0 24 24"><path d="M5 4v7a3 3 0 0 0 3 3h11"/><path d="m15 10 4 4-4 4"/></symbol>
<symbol id="i-sun" viewBox="0 0 24 24"><circle cx="12" cy="12" r="4"/><path d="M12 2.5v2M12 19.5v2M5.3 5.3l1.4 1.4M17.3 17.3l1.4 1.4M2.5 12h2M19.5 12h2M5.3 18.7l1.4-1.4M17.3 6.7l1.4-1.4"/></symbol>
<symbol id="i-link" viewBox="0 0 24 24"><path d="M10 14a4 4 0 0 0 5.7 0l3-3a4 4 0 0 0-5.7-5.7l-1.2 1.2"/><path d="M14 10a4 4 0 0 0-5.7 0l-3 3a4 4 0 0 0 5.7 5.7l1.2-1.2"/></symbol>
<symbol id="i-monitor" viewBox="0 0 24 24"><rect x="3" y="4" width="18" height="12" rx="2"/><path d="M8 20h8M12 16v4"/></symbol>
<symbol id="i-moon" viewBox="0 0 24 24"><path d="M20 14.5A8.5 8.5 0 0 1 9.5 4a8.5 8.5 0 1 0 10.5 10.5Z"/></symbol>
<symbol id="i-trash" viewBox="0 0 24 24"><path d="M4 7h16"/><path d="M9.5 7V4.5h5V7"/><path d="m6 7 1 13h10l1-13"/><path d="M10 11v6M14 11v6"/></symbol>
<symbol id="i-tag" viewBox="0 0 24 24"><path d="M3 3h8l10 10-8 8L3 11V3Z"/><path d="M7.5 7.5h.01"/></symbol>
<symbol id="i-stop" viewBox="0 0 24 24"><circle cx="12" cy="12" r="9"/><rect x="9" y="9" width="6" height="6" rx="1"/></symbol>
<symbol id="i-lock" viewBox="0 0 24 24"><rect x="4" y="11" width="16" height="10" rx="2"/><path d="M8 11V7.5a4 4 0 0 1 8 0V11"/></symbol>
<symbol id="i-bulb" viewBox="0 0 24 24"><path d="M9.5 18h5"/><path d="M10.5 21h3"/><path d="M8.6 14.3a6 6 0 1 1 6.8 0c-.9.7-1.4 1.6-1.4 2.7H10c0-1.1-.5-2-1.4-2.7Z"/></symbol>
<symbol id="i-plug" viewBox="0 0 24 24"><path d="M9 3v4M15 3v4"/><path d="M6 7h12v3a6 6 0 0 1-12 0V7Z"/><path d="M12 16v5"/></symbol>
<symbol id="i-plug-off" viewBox="0 0 24 24"><path d="M3.5 3.5l17 17"/><path d="M9 3v4M15 3v4"/><path d="M6 7h12v3a6 6 0 0 1-1.2 3.6"/><path d="M6.6 7A6 6 0 0 0 15 15.2"/><path d="M12 16v5"/></symbol>
<symbol id="i-dots" viewBox="0 0 24 24"><circle cx="5.5" cy="12" r="1.6"/><circle cx="12" cy="12" r="1.6"/><circle cx="18.5" cy="12" r="1.6"/></symbol>
<symbol id="i-key" viewBox="0 0 24 24"><circle cx="8" cy="15.5" r="4"/><path d="m10.8 12.7 8.7-8.7"/><path d="m16 7.5 2.5 2.5"/></symbol>
<symbol id="i-key-off" viewBox="0 0 24 24"><path d="M3.5 3.5l17 17"/><circle cx="8" cy="15.5" r="4"/><path d="m10.8 12.7 3.2-3.2M17.1 6.4l2.4-2.4"/><path d="m16 7.5 2.5 2.5"/></symbol>
<symbol id="i-hash" viewBox="0 0 24 24"><path d="M5 9h14M5 15h14M10 4 8 20M16 4l-2 16"/></symbol>
<symbol id="i-download" viewBox="0 0 24 24"><path d="M12 4v11"/><path d="m7 10.5 5 5 5-5"/><path d="M4 20h16"/></symbol>
<symbol id="i-upload" viewBox="0 0 24 24"><path d="M12 15V4"/><path d="m7 8.5 5-5 5 5"/><path d="M4 20h16"/></symbol>
<symbol id="i-help" viewBox="0 0 24 24"><circle cx="12" cy="12" r="9"/><path d="M9.6 9.6a2.5 2.5 0 1 1 3.6 2.3c-.8.4-1.2 1-1.2 1.8"/><path d="M12 17h.01"/></symbol>
<symbol id="i-github" viewBox="0 0 24 24"><path d="M12 .5C5.65.5.5 5.65.5 12c0 5.08 3.29 9.39 7.86 10.91.58.1.79-.25.79-.56v-2.17c-3.2.7-3.87-1.36-3.87-1.36-.52-1.33-1.28-1.68-1.28-1.68-1.04-.71.08-.7.08-.7 1.15.08 1.76 1.18 1.76 1.18 1.02 1.76 2.69 1.25 3.34.96.1-.75.4-1.25.73-1.54-2.55-.29-5.24-1.28-5.24-5.69 0-1.26.45-2.29 1.18-3.09-.12-.29-.51-1.46.11-3.05 0 0 .97-.31 3.17 1.18a11 11 0 0 1 5.78 0c2.2-1.49 3.16-1.18 3.16-1.18.63 1.59.24 2.76.12 3.05.74.8 1.18 1.83 1.18 3.09 0 4.42-2.69 5.39-5.26 5.68.41.36.78 1.06.78 2.14v3.17c0 .31.21.67.8.56A11.51 11.51 0 0 0 23.5 12C23.5 5.65 18.35.5 12 .5Z"/></symbol>
<symbol id="i-export" viewBox="0 0 24 24"><path d="M14 4h6v6"/><path d="M20 4 10.5 13.5"/><path d="M19 14v5a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1h5"/></symbol>
<symbol id="i-file" viewBox="0 0 24 24"><path d="M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8l-5-5Z"/><path d="M14 3v5h5"/><path d="M9 13h6M9 17h6"/></symbol>
<symbol id="i-cookie" viewBox="0 0 24 24"><path d="M12 3a9 9 0 1 0 9 9 3 3 0 0 1-3-3 3 3 0 0 1-3-3 3 3 0 0 1-3-3Z"/><path d="M8.5 10.5h.01M10 15.5h.01M15 15h.01"/></symbol>
<symbol id="i-cog" viewBox="0 0 24 24"><circle cx="12" cy="12" r="3"/><path d="M12 2.5V5M12 19v2.5M2.5 12H5M19 12h2.5M5.3 5.3l1.8 1.8M16.9 16.9l1.8 1.8M5.3 18.7l1.8-1.8M16.9 7.1l1.8-1.8"/></symbol>
<symbol id="i-code" viewBox="0 0 24 24"><path d="m8 8-4 4 4 4"/><path d="m16 8 4 4-4 4"/><path d="m14 5-4 14"/></symbol>
<symbol id="i-idcard" viewBox="0 0 24 24"><rect x="3" y="5" width="18" height="14" rx="2"/><circle cx="8.5" cy="11" r="2"/><path d="M5.5 16c.5-1.5 1.7-2 3-2s2.5.5 3 2"/><path d="M14 10h4M14 14h4"/></symbol>
<symbol id="i-merge" viewBox="0 0 24 24"><circle cx="6" cy="5.5" r="2.5"/><circle cx="6" cy="18.5" r="2.5"/><circle cx="18" cy="12" r="2.5"/><path d="M6 8v8"/><path d="M15.5 12h-2a7.5 7.5 0 0 1-6.7-4"/></symbol>
<symbol id="i-layers" viewBox="0 0 24 24"><path d="m12 3 9 5-9 5-9-5 9-5Z"/><path d="m3 13 9 5 9-5"/></symbol>
<symbol id="i-letter-a" viewBox="0 0 24 24"><circle cx="12" cy="12" r="9"/><path d="m8.8 16.5 3.2-9 3.2 9"/><path d="M10 13.5h4"/></symbol>
<symbol id="i-search" viewBox="0 0 24 24"><circle cx="11" cy="11" r="6.5"/><path d="m20 20-4.3-4.3"/></symbol>
<symbol id="i-terminal" viewBox="0 0 24 24"><path d="m5 7 5 5-5 5"/><path d="M12 17h7"/></symbol>
<symbol id="i-database" viewBox="0 0 24 24"><ellipse cx="12" cy="6" rx="8" ry="3"/><path d="M4 6v12c0 1.7 3.6 3 8 3s8-1.3 8-3V6"/><path d="M4 12c0 1.7 3.6 3 8 3s8-1.3 8-3"/></symbol>
<symbol id="i-folder" viewBox="0 0 24 24"><path d="M3 7a2 2 0 0 1 2-2h4.5l2 2H19a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V7Z"/></symbol>
<symbol id="i-external" viewBox="0 0 24 24"><path d="M14 4h6v6"/><path d="M20 4 11 13"/><path d="M19 14v5a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1h5"/></symbol>
<symbol id="i-zap" viewBox="0 0 24 24"><path d="M13 2.5 4.5 13.5H12l-1 8 8.5-11H12l1-8Z"/></symbol>
<symbol id="i-box" viewBox="0 0 24 24"><path d="m12 2.5 8.5 4.5v10L12 21.5l-8.5-4.5v-10L12 2.5Z"/><path d="M3.5 7 12 11.5 20.5 7"/><path d="M12 11.5v10"/></symbol>
<symbol id="i-network" viewBox="0 0 24 24"><rect x="9" y="3" width="6" height="5" rx="1"/><rect x="3" y="16" width="6" height="5" rx="1"/><rect x="15" y="16" width="6" height="5" rx="1"/><path d="M12 8v4M6 16v-2a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v2"/></symbol>
</svg>
<div id="app" hidden>
<header class="topbar">
<div class="topbar-inner">
<a class="brand" href="#" data-act="reset" title="Periscope">
<svg class="brand-mark" viewBox="0 0 64 64" aria-hidden="true"><path d="M22 47V22a6 6 0 0 1 6-6h7"/><circle cx="43" cy="16" r="7"/><circle cx="43" cy="16" r="2.5" fill="currentColor" stroke="none"/><path d="M6 52c4-5 8-5 12 0s8 5 12 0 8-5 12 0 8 5 12 0"/></svg>
<span class="brand-name">Periscope</span>
<span id="brandPill"></span>
</a>
<nav class="topbar-actions" id="topActions"></nav>
</div>
</header>
<main class="wrap">
<section class="hero is-idle" id="hero" hidden>
<div class="hero-copy rise" id="heroCopy">
<h1>Peer into any domain.</h1>
<p>DNS, mail posture, TLS, headers and the stack behind a hostname, in one pass.</p>
</div>
<div style="position:relative">
<form class="scanbar" id="scanForm" autocomplete="off">
<span class="lead"><svg class="ic" aria-hidden="true"><use href="#i-scope"></use></svg></span>
<input id="scanInput" type="text" class="scan-input" placeholder="example.com" spellcheck="false" autocomplete="off" autocapitalize="off" autofocus>
<button type="submit" class="btn btn-primary" id="scanBtn"><svg class="ic" aria-hidden="true"><use href="#i-arrow-right"></use></svg><span>Scan</span></button>
</form>
<div id="dropdown"></div>
</div>
<div class="advanced">
<button class="link link-dim small" type="button" data-act="toggleAdvanced" id="advToggle"></button>
<div id="advanced" class="field pop" hidden>
<label for="dnsInput"><svg class="ic" aria-hidden="true"><use href="#i-server"></use></svg> DNS server</label>
<input id="dnsInput" type="text" class="input" placeholder="8.8.8.8 or ns1.oldprovider.com" spellcheck="false">
<button class="icon-btn sm" type="button" data-act="clearDns" id="dnsClear" title="Clear" hidden><svg class="ic" aria-hidden="true"><use href="#i-x"></use></svg></button>
</div>
</div>
<div id="progress"></div>
<div id="errors"></div>
</section>
<div id="states"></div>
<div id="results"></div>
</main>
<div id="ctx"></div>
<div id="themeMenu"></div>
<div id="modals"></div>
<div id="toast"></div>
<input type="file" id="importFile" accept=".json" hidden>
</div>
<script>
const KNOWN_PROVIDERS = {
'_spf.google.com': 'Google Workspace',
'googlemail.com': 'Google Workspace',
'_spf.salesforce.com': 'Salesforce',
'sendgrid.net': 'SendGrid',
'spf.protection.outlook.com': 'Microsoft 365',
'amazonses.com': 'Amazon SES',
'servers.mcsv.net': 'Mailchimp',
'mailchimp.com': 'Mailchimp',
'spf.mailjet.com': 'Mailjet',
'mail.zendesk.com': 'Zendesk',
'helpscoutemail.com': 'Help Scout',
'freshdesk.com': 'Freshdesk',
'hubspot.com': 'HubSpot',
'intercom.io': 'Intercom',
'aspmx.pardot.com': 'Pardot',
'mktomail.com': 'Marketo',
'spf.constantcontact.com': 'Constant Contact',
'postmarkapp.com': 'Postmark',
'mailgun.org': 'Mailgun',
'email.freshservice.com': 'Freshservice',
'spf.mandrillapp.com': 'Mandrill',
'zoho.com': 'Zoho',
'smtp.com': 'SMTP.com',
'bluehost.com': 'Bluehost',
'godaddy.com': 'GoDaddy',
'hostgator.com': 'HostGator',
'secureserver.net': 'GoDaddy',
'wix.com': 'Wix',
'squarespace.com': 'Squarespace',
'shopify.com': 'Shopify',
'emailsrvr.com': 'Rackspace',
'brevo.com': 'Brevo',
'sendinblue.com': 'Brevo',
'klaviyo.com': 'Klaviyo',
'cmail20.com': 'Campaign Monitor',
'createsend.com': 'Campaign Monitor'
};
const KNOWN_PLUGINS = {
'gravityforms': 'Gravity Forms',
'advanced-custom-fields': 'Advanced Custom Fields',
'advanced-custom-fields-pro': 'Advanced Custom Fields Pro',
'akismet': 'Akismet Anti-Spam',
'all-in-one-seo-pack': 'All in One SEO',
'all-in-one-wp-migration': 'All-in-One WP Migration',
'autoptimize': 'Autoptimize',
'bbpress': 'bbPress',
'beaver-builder-lite-version': 'Beaver Builder',
'better-wp-security': 'iThemes Security',
'broken-link-checker': 'Broken Link Checker',
'buddypress': 'BuddyPress',
'classic-editor': 'Classic Editor',
'contact-form-7': 'Contact Form 7',
'cookie-law-info': 'GDPR Cookie Consent',
'custom-post-type-ui': 'Custom Post Type UI',
'disable-comments': 'Disable Comments',
'duplicate-post': 'Yoast Duplicate Post',
'duplicator': 'Duplicator',
'easy-digital-downloads': 'Easy Digital Downloads',
'elementor': 'Elementor',
'elementor-pro': 'Elementor Pro',
'envira-gallery-lite': 'Envira Gallery',
'essential-addons-for-elementor-lite': 'Essential Addons for Elementor',
'ewww-image-optimizer': 'EWWW Image Optimizer',
'favicon-by-realfavicongenerator': 'Favicon by RealFaviconGenerator',
'flamingo': 'Flamingo',
'google-analytics-for-wordpress': 'MonsterInsights',
'google-sitemap-generator': 'Google XML Sitemaps',
'gtranslate': 'GTranslate',
'header-footer-elementor': 'Elementor Header & Footer Builder',
'hello-dolly': 'Hello Dolly',
'instagram-feed': 'Smash Balloon Instagram Feed',
'jetpack': 'Jetpack',
'limit-login-attempts-reloaded': 'Limit Login Attempts Reloaded',
'litespeed-cache': 'LiteSpeed Cache',
'mailchimp-for-wp': 'MC4WP: Mailchimp for WordPress',
'mailpoet': 'MailPoet',
'megamenu': 'Max Mega Menu',
'members': 'Members',
'ninja-forms': 'Ninja Forms',
'optinmonster': 'OptinMonster',
'really-simple-ssl': 'Really Simple SSL',
'redirection': 'Redirection',
'regenerate-thumbnails': 'Regenerate Thumbnails',
'restrict-content': 'Restrict Content',
'revslider': 'Slider Revolution',
'safe-svg': 'Safe SVG',
'sg-cachepress': 'SiteGround Optimizer',
'shortpixel-image-optimiser': 'ShortPixel Image Optimizer',
'simple-custom-css': 'Simple Custom CSS',
'siteguard': 'SiteGuard WP Plugin',
'slideshow-gallery': 'Slideshow Gallery',
'smart-slider-3': 'Smart Slider 3',
'smtp-mailer': 'SMTP Mailer',
'so-widgets-bundle': 'SiteOrigin Widgets Bundle',
'tablepress': 'TablePress',
'the-events-calendar': 'The Events Calendar',
'tinymce-advanced': 'Advanced Editor Tools',
'translatepress-multilingual': 'TranslatePress',
'updraftplus': 'UpdraftPlus',
'user-role-editor': 'User Role Editor',
'w3-total-cache': 'W3 Total Cache',
'webp-converter-for-media': 'WebP Converter for Media',
'widget-importer-exporter': 'Widget Importer & Exporter',
'woocommerce': 'WooCommerce',
'woocommerce-gateway-stripe': 'WooCommerce Stripe Gateway',
'woocommerce-payments': 'WooPayments',
'woocommerce-pdf-invoices-packing-slips': 'PDF Invoices & Packing Slips for WooCommerce',
'woolentor-addons': 'ShopLentor',
'wordpress-importer': 'WordPress Importer',
'wordpress-seo': 'Yoast SEO',
'wordfence': 'Wordfence Security',
'wpforms-lite': 'WPForms Lite',
'wpforms': 'WPForms',
'wp-fastest-cache': 'WP Fastest Cache',
'wp-mail-smtp': 'WP Mail SMTP',
'wp-migrate-db': 'WP Migrate DB',
'wp-optimize': 'WP-Optimize',
'wp-pagenavi': 'WP-PageNavi',
'wp-reset': 'WP Reset',
'wp-rocket': 'WP Rocket',
'wp-smushit': 'Smush',
'wp-statistics': 'WP Statistics',
'wp-super-cache': 'WP Super Cache',
'yith-woocommerce-wishlist': 'YITH WooCommerce Wishlist',
};
// ------------------------------------------------------------------
// Periscope frontend. Plain JS, no framework: a state object, a few
// template-literal renderers, and delegated events (data-act).
// ------------------------------------------------------------------
'use strict';
const VERSION = '1.6.0';
const EMBED = window.PERISCOPE_EMBED || null;
const BRIDGE = 'http://127.0.0.1:8989';
const INSTALL_CMD = 'curl -sL https://periscope.run/boot.sh | bash';
const $ = (sel, root) => (root || document).querySelector(sel);
const esc = s => String(s ?? '').replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"').replace(/'/g, ''');
const escText = s => String(s ?? '').replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>');
const ic = (n, cls) => `<svg class="ic${cls ? ' ' + cls : ''}" aria-hidden="true"><use href="#i-${n}"></use></svg>`;
const when = (cond, html) => cond ? (typeof html === 'function' ? html() : html) : '';
const fmtDate = ts => new Date(ts * 1000).toLocaleString();
const fmtDay = ts => new Date(ts * 1000).toLocaleDateString();
const plural = (n, word, pl) => `${n} ${n === 1 ? word : (pl || word + 's')}`;
const formatBytes = bytes => {
if (!bytes) return '0 B';
const k = 1024, sizes = ['B', 'KB', 'MB', 'GB', 'TB'];
const i = Math.min(sizes.length - 1, Math.floor(Math.log(bytes) / Math.log(k)));
return parseFloat((bytes / Math.pow(k, i)).toFixed(1)) + ' ' + sizes[i];
};
const decodeEntities = s => { if (!s || !/[&]/.test(s)) return s || ''; try { return new DOMParser().parseFromString(String(s), 'text/html').documentElement.textContent || ''; } catch (e) { return String(s); } };
const emptyResponse = () => ({ domain: '', errors: [], zone: '', timestamp: null, ip_lookup: {} });
const S = {
domain: '', dnsServer: '', showAdvanced: false,
loading: false, loadingText: 'Scanning…', loadingFromHistory: false, es: null,
progress: { step: 0, total: 7, percent: 0, message: '', detail: '' },
localMode: false, bridgeConnected: null, bridgeHasDb: false, serverVersion: null,
dbInfo: { path: '', size: 0, scanCount: 0 }, scansInfo: { path: '', size: 0 },
response: emptyResponse(),
theme: document.documentElement.getAttribute('data-theme') || 'dark',
themePref: document.documentElement.getAttribute('data-theme-pref') || 'system',
themeMenu: { show: false, x: 0, y: 0 },
historyOpen: false, historyItems: [], historyTotal: 0, historyLimit: 50, historySearch: '',
historyFilters: { existence: 'all', platform: 'all', scanCount: 'all', indexability: 'all' },
availablePlatforms: [], scanCountOptions: [], selectedHistoryIndex: -1,
versionsOpen: false, domainVersions: [], selectedIndex: -1,
acOpen: false, acItems: [], acTimer: null, searchTimer: null,
refreshing: false, showMissingMeta: false,
toast: { show: false, message: '', timer: null },
ctx: { show: false, x: 0, y: 0, value: '' },
dialog: { show: false, title: '', content: '', tabs: null, activeTab: null },
helpOpen: false, ogOpen: false, twOpen: false, favOpen: false, pluginsOpen: false,
pendingDeepLink: null,
reportMode: !!EMBED, embed: EMBED, imgFailed: { og: false, tw: false },
openRows: {},
};
const getUrl = params => (S.localMode ? BRIDGE + '/' : '') + '?' + params;
const normalizeDomain = input => {
if (!input) return '';
let d = String(input).trim().replace(/^https?:\/\//i, '');
d = d.replace(/[/?#].*$/, '').replace(/\.+$/, '').trim();
return d.toLowerCase();
};
const isIp = str => /^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/.test(str);
const isDomain = str => /^[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}\.?$/.test(str) && !isIp(str);
const getPluginName = slug => KNOWN_PLUGINS[String(slug).toLowerCase()] || null;
// ---- derived data (recomputed from S.response on demand) ----
const D = {
sortedDns() {
const r = S.response.dns_records;
if (!r) return [];
return [...r].sort((a, b) => a.type.localeCompare(b.type) || a.name.localeCompare(b.name) || a.value.localeCompare(b.value));
},
displayChain() {
const chain = S.response.redirect_chain;
if (!chain || chain.length < 2) return chain || [];
try {
const first = new URL(chain[0].url), second = new URL(chain[1].url);
if (first.protocol === 'http:' && second.protocol === 'https:' &&
first.hostname.replace(/^www\./, '') === second.hostname.replace(/^www\./, '')) return chain.slice(1);
} catch (e) { }
return chain;
},
isCrossDomain(chain) {
if (!chain || chain.length < 2) return false;
try {
const root = h => h.replace(/^www\./, '').split('.').slice(-2).join('.');
return root(new URL(chain[0].url).hostname) !== root(new URL(chain[chain.length - 1].url).hostname);
} catch (e) { return false; }
},
hopLabel(chain, hop, index) {
try {
const url = new URL(hop.url);
const m = hop.url.match(/^https?:\/\/[^\/]+(\/.*)?$/);
const path = m ? (m[1] || '/') : '/';
if (index > 0 && new URL(chain[index - 1].url).hostname === url.hostname) return path;
return url.hostname;
} catch (e) { return hop.url; }
},
spf() {
const recs = S.response.dns_records;
if (!recs) return null;
const strip = v => v.replace(/^["']|["']$/g, '').trim();
const rec = recs.find(r => r.type === 'TXT' && strip(r.value).toLowerCase().startsWith('v=spf1'));
if (!rec) return null;
const raw = strip(rec.value);
const parts = raw.split(/\s+/);
const mechanisms = [], errors = [], warnings = [];
let dnsLookups = 0, hasAll = false, allQualifier = '';
const qualifierDesc = { '+': 'Pass', '-': 'Fail', '~': 'SoftFail', '?': 'Neutral' };
for (const part of parts) {
if (part.toLowerCase() === 'v=spf1') { mechanisms.push({ type: 'version', raw: part, description: 'SPF version identifier' }); continue; }
let qualifier = '+', mechanism = part;
if (/^[+\-~?]/.test(part)) { qualifier = part[0]; mechanism = part.slice(1); }
const [mechType, ...valueParts] = mechanism.split(':');
const value = valueParts.join(':');
const type = mechType.toLowerCase();
let description = '', provider = null, isDnsLookup = false;
switch (type) {
case 'all':
hasAll = true; allQualifier = qualifier;
description = qualifier === '-' ? 'Reject all other senders' : qualifier === '~' ? 'Soft-fail all other senders' : qualifier === '?' ? 'Neutral on all other senders' : 'Allow all senders (not recommended)';
break;
case 'include':
isDnsLookup = true; dnsLookups++;
for (const [d, name] of Object.entries(KNOWN_PROVIDERS)) { if (value.includes(d)) { provider = name; break; } }
description = provider ? `Include ${provider} SPF` : `Include SPF from ${value}`;
break;
case 'ip4': description = `Allow IPv4: ${value}`; break;
case 'ip6': description = `Allow IPv6: ${value}`; break;
case 'a': isDnsLookup = true; dnsLookups++; description = value ? `Allow A record of ${value}` : 'Allow domain A record'; break;
case 'mx': isDnsLookup = true; dnsLookups++; description = value ? `Allow MX servers of ${value}` : 'Allow domain MX servers'; break;
case 'ptr': isDnsLookup = true; dnsLookups++; warnings.push('PTR mechanism is deprecated and slow'); description = 'Validate via reverse DNS (deprecated)'; break;
case 'exists': isDnsLookup = true; dnsLookups++; description = `Check if ${value} exists`; break;
case 'redirect': isDnsLookup = true; dnsLookups++; description = `Redirect to ${value} SPF policy`; break;
case 'exp': description = `Explanation domain: ${value}`; break;
default:
if (part.includes('=')) description = 'Modifier';
else { errors.push(`Unknown mechanism: ${part}`); description = 'Unknown'; }
}
mechanisms.push({ type, raw: part, qualifier, qualifierDesc: qualifierDesc[qualifier], value, description, provider, isDnsLookup });
}
if (!parts[0]?.toLowerCase().startsWith('v=spf1')) errors.push('SPF record must start with v=spf1');
if (!hasAll) warnings.push('Missing "all" mechanism: the record should end with -all, ~all or ?all');
else if (allQualifier === '+') errors.push('+all allows anyone to send email as your domain');
if (dnsLookups > 10) errors.push(`Too many DNS lookups (${dnsLookups}/10), SPF will fail`);
else if (dnsLookups > 8) warnings.push(`High DNS lookup count (${dnsLookups}/10), close to the limit`);
if (raw.length > 255) warnings.push(`Record length (${raw.length} chars) exceeds 255 and needs multiple strings`);
const seen = new Set();
for (const m of mechanisms) if (m.type === 'include' && m.value) { if (seen.has(m.value)) warnings.push(`Duplicate include: ${m.value}`); seen.add(m.value); }
return { raw, mechanisms, dnsLookups, errors, warnings, isValid: errors.length === 0, hasWarnings: warnings.length > 0 };
},
emailHealth() {
const recs = S.response.dns_records;
if (!recs) return null;
const mx = recs.filter(r => r.type === 'MX');
if (!mx.length) return null;
const strip = v => v.replace(/^["']|["']$/g, '').trim();
const r = {
mxCount: mx.length,
spf: { present: false, valid: false, strict: false, score: 0, details: [] },
dkim: { present: false, selectors: [], score: 0, details: [] },
dmarc: { present: false, valid: false, policy: null, score: 0, details: [] },
totalScore: 10, maxScore: 100, grade: 'F', recommendations: []
};
const spfRec = recs.find(x => x.type === 'TXT' && strip(x.value).toLowerCase().startsWith('v=spf1'));
if (spfRec) {
r.spf.present = true; r.spf.score += 10; r.spf.details.push('SPF record found');
const spf = D.spf();
if (spf && spf.isValid) { r.spf.valid = true; r.spf.score += 10; r.spf.details.push('Valid'); }
const v = strip(spfRec.value);
if (v.includes('-all')) { r.spf.strict = true; r.spf.score += 5; r.spf.details.push('Hard fail'); }
else if (v.includes('~all')) { r.spf.strict = true; r.spf.score += 5; r.spf.details.push('Soft fail'); }
else r.recommendations.push('Upgrade the SPF policy to -all or ~all for stricter enforcement');
} else r.recommendations.push('Add an SPF record to authorize email senders');
r.totalScore += r.spf.score;
const dkim = recs.filter(x => x.type === 'TXT' && x.name.includes('._domainkey'));
if (dkim.length) {
r.dkim.present = true;
r.dkim.selectors = dkim.map(x => { const m = x.name.match(/^([^.]+)\._domainkey/); return m ? m[1] : x.name.split('._domainkey')[0]; });
r.dkim.score = Math.min(30, 15 + (dkim.length - 1) * 5);
r.dkim.details.push(`${dkim.length} selector(s) found`);
} else r.recommendations.push('Add DKIM records to cryptographically sign outgoing email');
r.totalScore += r.dkim.score;
const dmarc = recs.find(x => x.type === 'TXT' && x.name.startsWith('_dmarc') && x.value.toLowerCase().includes('v=dmarc1'));
if (dmarc) {
r.dmarc.present = true; r.dmarc.score += 10; r.dmarc.details.push('DMARC found');
const v = dmarc.value.toLowerCase();
if (v.includes('v=dmarc1') && v.includes('p=')) { r.dmarc.valid = true; r.dmarc.score += 5; }
const pm = v.match(/p\s*=\s*(reject|quarantine|none)/);
if (pm) {
r.dmarc.policy = pm[1]; r.dmarc.details.push(`Policy: ${pm[1]}`);
if (pm[1] === 'reject') r.dmarc.score += 20;
else if (pm[1] === 'quarantine') { r.dmarc.score += 15; r.recommendations.push('Consider moving the DMARC policy from quarantine to reject'); }
else { r.dmarc.score += 5; r.recommendations.push('Upgrade the DMARC policy from none to quarantine or reject'); }
}
} else r.recommendations.push('Add a DMARC record to protect against spoofing');
r.totalScore += r.dmarc.score;
r.grade = r.totalScore >= 90 ? 'A' : r.totalScore >= 75 ? 'B' : r.totalScore >= 60 ? 'C' : r.totalScore >= 40 ? 'D' : 'F';
return r;
},
metaItems() {
const m = S.response.metadata || {};
const present = k => !!(m[k] && m[k].present);
const embedded = k => S.reportMode && S.embed && S.embed.rawFiles && S.embed.rawFiles[k];
const raw = (k, rawType, title) => ((m[k] && m[k].raw_stored && !S.reportMode) || embedded(rawType)) ? { act: 'preview', type: rawType, title } : null;
const count = (n, word) => n ? plural(n, word.replace(/s$/, ''), word) : '';
return [
{ key: 'robots_txt', label: 'robots.txt', present: present('robots_txt'), note: count(m.robots_txt?.disallow_count, 'rules'), preview: raw('robots_txt', 'robots_txt', 'robots.txt'),
detail: [...(m.robots_txt?.disallows || []).map(d => ({ k: 'Disallow', v: d })), ...(m.robots_txt?.sitemaps || []).map(s => ({ k: 'Sitemap', v: s }))], detailTotal: (m.robots_txt?.disallow_count || 0) + (m.robots_txt?.sitemaps || []).length },
{ key: 'sitemap', label: 'sitemap.xml', present: present('sitemap'), note: count(m.sitemap?.url_count, 'URLs'), preview: raw('sitemap', 'sitemap_xml', 'sitemap.xml'),
detail: (m.sitemap?.urls || []).map(u => ({ k: '', v: u })), detailTotal: m.sitemap?.url_count || 0 },
{ key: 'security_txt', label: 'security.txt', present: present('security_txt'), note: '', preview: raw('security_txt', 'security_txt', 'security.txt') },
{ key: 'ads_txt', label: 'ads.txt', present: present('ads_txt'), note: count(m.ads_txt?.seller_count, 'sellers'), preview: raw('ads_txt', 'ads_txt', 'ads.txt') },
{ key: 'app_ads_txt', label: 'app-ads.txt', present: present('app_ads_txt'), note: count(m.app_ads_txt?.seller_count, 'sellers'), preview: raw('app_ads_txt', 'app_ads_txt', 'app-ads.txt') },
{ key: 'app_site_association', label: 'apple-app-site-association', present: present('app_site_association'), note: count(m.app_site_association?.app_ids?.length, 'apps'), preview: raw('app_site_association', 'app_site_association', 'apple-app-site-association') },
{ key: 'assetlinks', label: 'assetlinks.json', present: present('assetlinks'), note: count(m.assetlinks?.packages?.length, 'apps'), preview: raw('assetlinks', 'assetlinks', 'assetlinks.json') },
{ key: 'manifest', label: 'manifest.json', present: present('manifest'), note: m.manifest?.display || '', preview: raw('manifest', 'manifest', 'manifest.json') },
{ key: 'webfinger', label: 'webfinger', present: present('webfinger'), note: 'Fediverse', preview: null },
{ key: 'change_password', label: 'change-password', present: present('change_password'), note: (m.change_password?.status >= 300 && m.change_password?.status < 400) ? 'redirects' : '', preview: null },
{ key: 'humans_txt', label: 'humans.txt', present: present('humans_txt'), note: '', preview: raw('humans_txt', 'humans_txt', 'humans.txt') },
{ key: 'browserconfig', label: 'browserconfig.xml', present: present('browserconfig'), note: '', preview: raw('browserconfig', 'browserconfig', 'browserconfig.xml') },
{ key: 'keybase_txt', label: 'keybase.txt', present: present('keybase_txt'), note: m.keybase_txt?.username || '', preview: raw('keybase_txt', 'keybase_txt', 'keybase.txt') },
{ key: 'open_graph', label: 'Open Graph', present: !!m.meta_tags?.open_graph, note: '', preview: m.meta_tags?.open_graph ? { act: 'og' } : null, icon: 'image' },
{ key: 'twitter', label: 'Twitter card', present: !!m.meta_tags?.twitter, note: '', preview: m.meta_tags?.twitter ? { act: 'tw' } : null, icon: 'image' },
{ key: 'favicon', label: 'favicon', present: present('favicon'), note: '', preview: (m.favicon?.raw_stored || (S.reportMode && S.embed?.images?.favicon)) ? { act: 'fav' } : null, icon: 'image' },
];
},
fileUrl(hash, ext) { return getUrl(`action=get_file&domain=${encodeURIComponent(S.domain)}&hash=${hash}&extension=${ext}`); },