-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
2009 lines (2008 loc) · 126 KB
/
index.html
File metadata and controls
2009 lines (2008 loc) · 126 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, maximum-scale=1.0, user-scalable=no, viewport-fit=cover">
<meta name="theme-color" content="#0a0c0f">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="description" content="VERITAS — Community Damage Certification Platform. CERTUS Engine, DCI scoring, offline‑first, STP integrity seals. UNDP compliant.">
<title>VERITAS — Damage Certification Platform</title>
<link href="https://fonts.googleapis.com/css2?family=Share+Tech+Mono&family=Barlow+Condensed:ital,wght@0,300;0,400;0,600;0,700;0,900;1,300&family=Crimson+Pro:ital,wght@0,300;0,400;0,600;1,300;1,400&family=JetBrains+Mono:wght@300;400;500;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css">
<script src="https://unpkg.com/leaflet@1.9.4/dist/leaflet.js"></script>
<script src="https://unpkg.com/@supabase/supabase-js@2"></script>
<script src="https://unpkg.com/shp-write@0.3.2/shpwrite.js"></script>
<style>
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
--bg:#08090b;
--bg-deep:#030405;
--surface:#0e1117;
--panel:#141920;
--border:#1e2730;
--amber:#f0a500;
--amber-d:#b07800;
--amber-l:#ffc947;
--gold:#D4AF37;
--text:#c4d4de;
--muted:#4e5f6a;
--dim:#2a3540;
--red:#ff4d4d;
--cyan:#00d4ff;
--edu:#4ade80;
--quantum:#ce93d8;
--mono:'Share Tech Mono',monospace;
--sans:'Barlow Condensed',sans-serif;
--serif:'Crimson Pro',Georgia,serif;
--jmono:'JetBrains Mono',monospace;
--ease:cubic-bezier(0.16,1,0.3,1);
--font-size-base: clamp(16px, 1vw + 8px, 20px);
--font-size-h1: clamp(48px, 8vw + 16px, 96px);
--font-size-h2: clamp(28px, 4vw + 8px, 44px);
--mouse-x: 50%;
--mouse-y: 50%;
}
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0;}
html{scroll-behavior:smooth;}
body{
background:var(--bg);
color:var(--text);
font-family:var(--sans);
font-size:var(--font-size-base);
line-height:1.5;
overflow-x:hidden;
cursor:none;
transition:background 0.5s ease;
}
body::before{
content:'';
position:fixed;
inset:0;
background-image:linear-gradient(rgba(240,165,0,0.025) 1px,transparent 1px),linear-gradient(90deg,rgba(240,165,0,0.025) 1px,transparent 1px);
background-size:48px 48px;
pointer-events:none;
z-index:0;
}
body::after{
content:'';
position:fixed;
inset:0;
background:repeating-linear-gradient(0deg,transparent,transparent 2px,rgba(0,0,0,0.08) 2px,rgba(0,0,0,0.08) 4px);
pointer-events:none;
z-index:0;
}
.custom-cursor {
width: 20px; height: 20px;
border: 2px solid var(--amber);
border-radius: 50%;
position: fixed;
pointer-events: none;
z-index: 9999;
mix-blend-mode: difference;
transition: transform 0.1s ease, background 0.2s ease;
transform: translate(-50%, -50%);
}
.custom-cursor.hover {
transform: translate(-50%, -50%) scale(1.5);
background: rgba(240,165,0,0.1);
border-color: var(--gold);
}
#hero-canvas {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 0;
opacity: 0.35;
pointer-events: none;
}
.wrapper {
max-width: 1200px;
margin: 0 auto;
padding: 0 24px;
position: relative;
z-index: 2;
}
nav {
display: flex;
justify-content: space-between;
align-items: center;
padding: 20px 0;
border-bottom: 1px solid var(--border);
flex-wrap: wrap;
gap: 16px;
}
.logo {
font-family: var(--mono);
font-size: 18px;
letter-spacing: 3px;
color: var(--amber);
text-decoration: none;
display: flex;
align-items: center;
gap: 10px;
}
.logo span { color: var(--muted); }
.nav-links {
display: flex;
gap: 32px;
list-style: none;
}
.nav-links a {
font-family: var(--mono);
font-size: 11px;
letter-spacing: 2px;
color: var(--text);
text-decoration: none;
text-transform: uppercase;
border-bottom: 1px solid transparent;
transition: color 0.2s, border-color 0.2s;
}
.nav-links a:hover {
color: var(--amber);
border-bottom-color: var(--amber);
}
.nav-hamburger {
display: none;
flex-direction: column;
justify-content: space-between;
width: 24px;
height: 18px;
cursor: pointer;
background: none;
border: none;
padding: 0;
z-index: 110;
}
.nav-hamburger span {
display: block;
width: 100%;
height: 2px;
background: var(--amber);
border-radius: 1px;
transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
.mobile-nav {
display: none;
position: fixed;
top: 56px;
left: 0;
right: 0;
z-index: 99;
background: rgba(8,9,11,0.98);
backdrop-filter: blur(16px);
border-bottom: 1px solid var(--border);
flex-direction: column;
padding: 8px 0;
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
font-family: var(--mono);
font-size: 12px;
letter-spacing: 2px;
color: var(--text);
text-decoration: none;
text-transform: uppercase;
padding: 14px 28px;
border-bottom: 1px solid var(--border);
transition: color 0.15s ease, background 0.15s ease;
display: flex;
align-items: center;
gap: 10px;
}
.mobile-nav a:last-child { border-bottom: none; }
.mobile-nav a:hover { color: var(--amber); background: rgba(240,165,0,0.04); }
.mobile-nav a::before { content: '—'; color: var(--amber); font-size: 10px; opacity: 0.6; }
.lang-selector {
display: flex;
gap: 6px;
margin-left: auto;
margin-right: 20px;
}
.lang-btn {
background: none;
border: 1px solid var(--border);
color: var(--muted);
font-family: var(--mono);
font-size: 9px;
padding: 4px 8px;
border-radius: 20px;
cursor: pointer;
transition: all 0.2s;
}
.lang-btn.active, .lang-btn:hover {
border-color: var(--amber);
color: var(--amber);
background: rgba(240,165,0,0.1);
}
.triple-time {
display: grid;
grid-template-columns: repeat(3,1fr);
gap: 1px;
background: var(--border);
border: 1px solid var(--border);
margin: 40px 0;
}
.time-cell {
background: var(--bg);
padding: 18px 20px;
transition: background 0.2s ease;
}
.time-cell:hover { background: var(--surface); }
.time-sys {
font-family: var(--mono);
font-size: 9px;
letter-spacing: 2px;
color: var(--amber-d);
text-transform: uppercase;
margin-bottom: 6px;
}
.time-val {
font-family: var(--mono);
font-size: 14px;
color: var(--amber);
letter-spacing: 1px;
line-height: 1.3;
min-height: 36px;
display: flex;
align-items: center;
}
.time-val.loading { color: var(--dim); font-size: 11px; }
.veritas-tabs {
display: flex;
border-bottom: 1px solid var(--border);
margin: 32px 0 24px;
}
.veritas-tab {
flex: 1;
padding: 12px 0;
font-family: var(--mono);
font-size: 11px;
letter-spacing: 2px;
text-transform: uppercase;
color: var(--muted);
background: none;
border: none;
border-bottom: 2px solid transparent;
cursor: pointer;
transition: all 0.2s;
}
.veritas-tab.active {
color: var(--amber);
border-bottom-color: var(--amber);
}
.veritas-view {
display: none;
}
.veritas-view.active {
display: block;
}
.step-progress { display: flex; align-items: center; margin-bottom: 28px; gap: 0; }
.step-node { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: 1; }
.step-circle {
width: 32px; height: 32px; border-radius: 50%;
display: flex; align-items: center; justify-content: center;
font-family: var(--mono); font-size: 11px; font-weight: 600;
border: 2px solid var(--border);
color: var(--muted);
background: var(--surface);
transition: all 0.3s var(--ease);
}
.step-circle.active { border-color: var(--amber); color: var(--amber); background: rgba(240,165,0,0.12); box-shadow: 0 0 16px rgba(240,165,0,0.25); }
.step-circle.done { border-color: var(--edu); color: var(--edu); background: rgba(74,222,128,0.1); }
.step-label { font-family: var(--mono); font-size: 8px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
.step-label.active { color: var(--amber); }
.step-line { flex: 1; height: 2px; background: var(--border); margin-bottom: 18px; }
.step-line.done { background: var(--edu); }
.step-panel { display: none; animation: stepIn 0.3s var(--ease); }
.step-panel.active { display: block; }
@keyframes stepIn { from{opacity:0;transform:translateX(10px)} to{opacity:1;transform:translateX(0)} }
.step-title { font-family: var(--sans); font-size: 28px; letter-spacing: 2px; color: var(--text); margin-bottom: 4px; }
.step-subtitle { font-family: var(--mono); font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); margin-bottom: 24px; }
.photo-zone { border: 2px dashed var(--border); border-radius: 4px; background: var(--surface); aspect-ratio: 4/3; display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; transition: all 0.2s; overflow: hidden; position: relative; }
.photo-zone:hover { border-color: var(--amber); background: rgba(240,165,0,0.05); }
.photo-zone.has-photo { border-style: solid; border-color: var(--amber); }
.photo-icon { font-size: 40px; margin-bottom: 12px; opacity: 0.4; }
.photo-hint { font-family: var(--mono); font-size: 10px; color: var(--muted); letter-spacing: 1px; }
#photoPreview { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: none; }
#photoPreview.show { display: block; }
.photo-retake { position: absolute; bottom: 10px; right: 10px; background: rgba(0,0,0,0.7); border: 1px solid var(--border); color: var(--text); font-family: var(--mono); font-size: 9px; padding: 4px 10px; cursor: pointer; letter-spacing: 1px; display: none; }
.photo-retake.show { display: block; }
#photoInput { display: none; }
.photo-ai-status { margin-top: 12px; padding: 10px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 4px; font-family: var(--mono); font-size: 10px; color: var(--muted); display: none; }
.photo-ai-status.show { display: flex; align-items: center; gap: 8px; }
.damage-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 12px;
margin-bottom: 24px;
}
.damage-btn {
padding: 16px 10px;
border: 2px solid var(--border);
background: var(--surface);
border-radius: 8px;
cursor: pointer;
text-align: center;
transition: all 0.15s;
}
.damage-btn:hover {
border-color: var(--amber);
background: rgba(240,165,0,0.05);
}
.damage-btn.selected {
border-color: var(--amber);
background: rgba(240,165,0,0.12);
}
.damage-label {
font-family: var(--sans);
font-size: 16px;
font-weight: 700;
letter-spacing: 1px;
margin-bottom: 6px;
}
.damage-desc {
font-size: 11px;
color: var(--muted);
}
.infra-grid {
display: grid;
grid-template-columns: repeat(3,1fr);
gap: 8px;
margin-bottom: 16px;
}
.infra-btn {
padding: 12px 8px;
border: 1px solid var(--border);
background: var(--surface);
border-radius: 4px;
cursor: pointer;
text-align: center;
transition: all 0.15s;
}
.infra-btn:hover {
border-color: var(--border);
background: var(--panel);
}
.infra-btn.selected {
border-color: var(--amber);
background: rgba(240,165,0,0.12);
}
.infra-icon { font-size: 22px; margin-bottom: 6px; }
.infra-label {
font-family: var(--mono);
font-size: 9px;
letter-spacing: 1px;
text-transform: uppercase;
color: var(--muted);
}
.form-group { margin-bottom: 20px; }
.form-label {
font-family: var(--mono);
font-size: 10px;
letter-spacing: 1px;
color: var(--amber);
margin-bottom: 8px;
display: block;
}
.form-input, .form-select, .form-textarea {
width: 100%;
padding: 10px 12px;
background: var(--bg);
border: 1px solid var(--border);
border-radius: 4px;
color: var(--text);
font-family: var(--sans);
font-size: 14px;
}
.radio-group, .checkbox-group {
display: flex;
flex-wrap: wrap;
gap: 12px;
margin-top: 6px;
}
.radio-group label, .checkbox-group label {
display: flex;
align-items: center;
gap: 6px;
font-size: 13px;
color: var(--text);
}
.location-options { display: flex; gap: 8px; margin-bottom: 16px; }
.loc-opt {
flex: 1; padding: 12px; border: 2px solid var(--border); background: var(--surface); border-radius: 4px; cursor: pointer; text-align: center; transition: all 0.15s;
}
.loc-opt:hover { border-color: var(--amber); }
.loc-opt.selected { border-color: var(--amber); background: rgba(240,165,0,0.12); }
.loc-opt-label { font-family: var(--mono); font-size: 10px; letter-spacing: 1px; text-transform: uppercase; color: var(--text); }
.loc-opt-desc { font-size: 11px; color: var(--muted); margin-top: 4px; }
.fuzzy-notice { padding: 8px 12px; background: var(--panel); border: 1px solid var(--border); border-radius: 4px; font-family: var(--mono); font-size: 9px; color: var(--muted); letter-spacing: 0.5px; margin-bottom: 12px; display: none; }
.fuzzy-notice.show { display: block; }
#locationMap { height: 180px; border: 1px solid var(--border); border-radius: 4px; margin-bottom: 12px; overflow: hidden; }
.gps-coords { font-family: var(--mono); font-size: 10px; color: var(--muted); letter-spacing: 0.5px; padding: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: 4px; margin-bottom: 12px; }
.text-location { margin-top: 12px; }
.submit-summary { background: var(--surface); border: 1px solid var(--border); border-radius: 4px; padding: 16px; margin-bottom: 20px; }
.summary-row { display: flex; align-items: center; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--dim); }
.summary-row:last-child { border-bottom: none; }
.summary-key { font-family: var(--mono); font-size: 10px; color: var(--muted); letter-spacing: 1px; text-transform: uppercase; }
.summary-val { font-family: var(--mono); font-size: 11px; color: var(--text); }
.anon-notice { display: flex; gap: 10px; padding: 12px; background: rgba(74,222,128,0.08); border: 1px solid var(--edu); border-radius: 4px; margin-bottom: 20px; font-size: 12px; color: var(--muted); }
.anon-icon { font-size: 16px; flex-shrink: 0; }
.btn { display: block; width: 100%; padding: 14px; font-family: var(--mono); font-size: 11px; letter-spacing: 2px; text-transform: uppercase; border: none; cursor: pointer; border-radius: 4px; transition: all 0.15s; }
.btn-primary { background: var(--amber); color: #000; font-weight: 600; }
.btn-primary:hover { background: var(--amber-d); }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-secondary { background: var(--surface); color: var(--text); border: 1px solid var(--border); margin-top: 10px; }
.btn-secondary:hover { border-color: var(--amber); color: var(--amber); }
.btn-sm { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; width: auto; }
.confirm-screen { text-align: center; padding: 32px 20px; display: none; }
.confirm-screen.show { display: block; }
.confirm-check { width: 72px; height: 72px; border-radius: 50%; background: rgba(74,222,128,0.1); border: 2px solid var(--edu); display: flex; align-items: center; justify-content: center; font-size: 32px; margin: 0 auto 20px; animation: popIn 0.4s var(--ease); }
@keyframes popIn { from{transform:scale(0.5);opacity:0;} to{transform:scale(1);opacity:1;} }
.dci-display { background: var(--surface); border: 1px solid var(--border); border-radius: 4px; padding: 20px; margin: 20px 0; }
.dci-label { font-family: var(--mono); font-size: 9px; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.dci-score-large { font-family: var(--sans); font-size: 64px; letter-spacing: 2px; line-height: 1; margin-bottom: 4px; }
.dci-score-large.high { color: var(--amber); }
.dci-score-large.watch { color: var(--amber); }
.dci-score-large.review { color: var(--red); }
.dci-tier-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; font-family: var(--mono); font-size: 10px; letter-spacing: 2px; text-transform: uppercase; border: 1px solid; margin-bottom: 12px; }
.dci-tier-badge.high { border-color: var(--amber); color: var(--amber); background: rgba(240,165,0,0.12); }
.dci-tier-badge.watch { border-color: var(--amber); color: var(--amber); background: rgba(240,165,0,0.12); }
.dci-tier-badge.review { border-color: var(--red); color: var(--red); background: rgba(255,77,77,0.12); }
.dci-explain { font-family: var(--mono); font-size: 9px; color: var(--muted); letter-spacing: 0.5px; line-height: 1.6; }
.engagement-message {
background: rgba(240,165,0,0.08);
border-left: 3px solid var(--amber);
padding: 12px;
margin-bottom: 20px;
font-family: var(--mono);
font-size: 11px;
text-align: left;
}
.access-gate { max-width: 400px; margin: 60px auto; padding: 32px 24px; background: var(--surface); border: 1px solid var(--border); border-radius: 4px; text-align: center; }
.access-gate-title { font-family: var(--sans); font-size: 32px; letter-spacing: 3px; color: var(--amber); margin-bottom: 8px; }
.access-gate-sub { font-family: var(--mono); font-size: 10px; color: var(--muted); letter-spacing: 1.5px; margin-bottom: 28px; }
.access-input { width: 100%; padding: 12px 14px; background: var(--bg); border: 1px solid var(--border); border-radius: 4px; color: var(--text); font-family: var(--mono); font-size: 16px; letter-spacing: 4px; text-align: center; text-transform: uppercase; margin-bottom: 16px; outline: none; }
.access-input:focus { border-color: var(--amber); }
.respond-dashboard { padding: 16px; display: none; }
.respond-dashboard.show { display: block; }
.confidence-dash { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin-bottom: 16px; }
.conf-card { padding: 14px 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 4px; text-align: center; }
.conf-card.high { border-color: var(--amber); background: rgba(240,165,0,0.08); }
.conf-card.watch { border-color: var(--amber); background: rgba(240,165,0,0.08); }
.conf-card.review { border-color: var(--red); background: rgba(255,77,77,0.08); }
.conf-count { font-family: var(--sans); font-size: 40px; line-height: 1; margin-bottom: 4px; }
.conf-card.high .conf-count { color: var(--amber); }
.conf-card.watch .conf-count { color: var(--amber); }
.conf-card.review .conf-count { color: var(--red); }
.conf-tier { font-family: var(--mono); font-size: 8px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); }
#respondMap { height: 320px; border: 1px solid var(--border); border-radius: 4px; margin-bottom: 16px; overflow: hidden; }
.section-label { font-family: var(--mono); font-size: 9px; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.section-label::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.conflict-item { padding: 10px 12px; background: var(--surface); border: 1px solid var(--red); border-left: 3px solid var(--red); border-radius: 4px; margin-bottom: 6px; font-family: var(--mono); font-size: 10px; color: var(--muted); line-height: 1.6; }
.timeline-wrap { padding: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 4px; margin-bottom: 16px; }
#timelineSlider { width: 100%; accent-color: var(--amber); margin-bottom: 6px; }
.timeline-time { font-family: var(--mono); font-size: 10px; color: var(--muted); text-align: right; }
.export-section { background: var(--surface); border: 1px solid var(--border); border-radius: 4px; padding: 16px; margin-bottom: 16px; }
.export-header-preview { font-family: var(--mono); font-size: 9px; color: var(--muted); background: var(--bg); border: 1px solid var(--border); border-radius: 4px; padding: 10px; margin-top: 12px; line-height: 1.8; overflow-x: auto; white-space: pre; }
.export-btns { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.export-btn { flex: 1; min-width: 100px; padding: 10px; background: var(--panel); border: 1px solid var(--border); color: var(--text); font-family: var(--mono); font-size: 9px; letter-spacing: 1.5px; text-transform: uppercase; cursor: pointer; border-radius: 4px; transition: all 0.15s; }
.export-btn:hover { border-color: var(--amber); color: var(--amber); }
.report-card { padding: 16px; background: var(--surface); border: 1px solid var(--amber); border-radius: 4px; margin-bottom: 16px; }
.report-card-title { font-family: var(--sans); font-size: 20px; letter-spacing: 3px; color: var(--amber); margin-bottom: 14px; }
.rc-bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.rc-bar-label { font-family: var(--mono); font-size: 9px; color: var(--muted); width: 80px; letter-spacing: 0.5px; }
.rc-bar-track { flex: 1; height: 6px; background: var(--dim); border-radius: 3px; overflow: hidden; }
.rc-bar-fill { height: 100%; border-radius: 3px; transition: width 0.8s var(--ease); }
.rc-bar-val { font-family: var(--mono); font-size: 9px; color: var(--muted); width: 30px; text-align: right; }
.law6-footer { padding: 12px 16px; background: rgba(255,77,77,0.05); border-top: 1px solid rgba(255,77,77,0.2); font-family: var(--mono); font-size: 9px; color: var(--muted); letter-spacing: 0.5px; line-height: 1.7; text-align: center; }
.law6-footer strong { color: var(--red); }
.offline-banner, .sync-queue { background: rgba(255,77,77,0.1); border-bottom: 1px solid var(--red); padding: 8px 20px; font-family: var(--mono); font-size: 10px; color: var(--red); letter-spacing: 1px; display: none; align-items: center; gap: 8px; margin-bottom: 16px; }
.sync-queue { background: rgba(240,165,0,0.12); border-color: var(--amber); color: var(--amber); }
.offline-banner.show, .sync-queue.show { display: flex; }
.spinner { width: 14px; height: 14px; border: 2px solid var(--border); border-top-color: var(--amber); border-radius: 50%; animation: spin 0.6s linear infinite; display: inline-block; }
@keyframes spin { to{transform:rotate(360deg)} }
.toast-container { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 1000; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast { padding: 10px 20px; background: var(--panel); border: 1px solid var(--border); border-radius: 100px; font-family: var(--mono); font-size: 10px; letter-spacing: 1px; color: var(--text); animation: toastIn 0.3s var(--ease); pointer-events: none; }
@keyframes toastIn { from{opacity:0;transform:translateY(10px)} to{opacity:1;transform:translateY(0)} }
.leaflet-container { background: #0a0c0f !important; font-family: var(--mono) !important; }
.dci-popup { font-family: var(--mono); font-size: 10px; line-height: 1.6; }
footer {
border-top: 1px solid var(--border);
padding: 40px 0;
display: flex;
justify-content: space-between;
flex-wrap: wrap;
gap: 20px;
font-family: var(--mono);
font-size: 10px;
color: var(--muted);
}
.footer-links {
display: flex;
gap: 24px;
list-style: none;
}
.footer-links a {
color: var(--muted);
text-decoration: none;
transition: color 0.2s;
}
.footer-links a:hover { color: var(--amber); }
@media (max-width: 800px) {
.nav-links { display: none; }
.nav-hamburger { display: flex; }
.wrapper { padding: 0 20px; }
.infra-grid { grid-template-columns: repeat(2,1fr); }
.confidence-dash { grid-template-columns: 1fr 1fr 1fr; }
.conf-count { font-size: 32px; }
.damage-grid { grid-template-columns: 1fr; }
}
</style>
</head>
<body>
<canvas id="hero-canvas"></canvas>
<div class="custom-cursor" id="custom-cursor"></div>
<div class="wrapper">
<nav>
<a href="/" class="logo">AION<span>system</span></a>
<ul class="nav-links">
<li><a href="/simulators/">Simulators</a></li>
<li><a href="/services/">Services</a></li>
<li><a href="/stack/">Stack</a></li>
<li><a href="/certify/">Certify</a></li>
<li><a href="https://aionsystem.github.io/VERITAS-PAGE">VERITAS</a></li>
</ul>
<div class="lang-selector" id="langSelector"></div>
<button class="nav-hamburger" id="nav-hamburger" aria-label="Menu">
<span></span><span></span><span></span>
</button>
</nav>
<div class="mobile-nav" id="mobile-nav">
<a href="/simulators/">Simulators</a>
<a href="/services/">Services</a>
<a href="/stack/">Stack</a>
<a href="/certify/">Certify</a>
<a href="https://aionsystem.github.io/VERITAS-PAGE">VERITAS</a>
</div>
<div class="offline-banner" id="offlineBanner"><span>📡</span> <span data-i18n="offline">Offline — reports saved locally and will sync when connected</span></div>
<div class="sync-queue" id="syncQueue"><span class="spinner"></span><span id="syncQueueText" data-i18n="syncing">Syncing queued reports...</span></div>
<div class="ecosystem-buttons" style="display: flex; gap: 16px; justify-content: center; margin: 16px 0 24px;">
<a href="https://aionsystem.github.io/VERITAS/CERTUS.AI" class="btn btn-secondary" style="display: inline-flex; align-items: center; gap: 8px; width: auto; background: var(--panel);">
<span>⚙️</span> CERTUS.AI – Resource Simulator
</a>
<a href="https://aionsystem.github.io/VERITAS/AION-CERTIFY" class="btn btn-secondary" style="display: inline-flex; align-items: center; gap: 8px; width: auto; background: var(--panel);">
<span>🔒</span> AION.CERTIFY – Integrity Seals
</a>
</div>
<div class="veritas-tabs">
<button class="veritas-tab active" id="navReport" onclick="switchView('report')" data-i18n="report_tab">📍 Report</button>
<button class="veritas-tab" id="navRespond" onclick="switchView('respond')" data-i18n="respond_tab">🗺 Respond</button>
</div>
<!-- REPORT VIEW -->
<div class="veritas-view active" id="viewReport">
<div class="confirm-screen" id="confirmScreen">
<div class="confirm-check">✓</div>
<div style="font-family:var(--sans);font-size:28px;letter-spacing:2px;color:var(--text);margin-bottom:6px;" data-i18n="report_received">REPORT RECEIVED</div>
<div style="font-family:var(--mono);font-size:10px;color:var(--muted);letter-spacing:1px;margin-bottom:24px;" data-i18n="certus_scored">CERTUS Engine has scored your submission</div>
<div class="dci-display">
<div class="dci-label" data-i18n="dci_label">Damage Confidence Index — CERTUS Engine v1.0</div>
<div class="dci-score-large" id="confirmDciScore">—</div>
<div id="confirmDciBadge" class="dci-tier-badge high mb-16">HIGH CONFIDENCE</div>
<div class="dci-explain" data-i18n="dci_explain">DCI measures how much to trust this report.<br>Scored on photo evidence · corroboration · freshness · consistency.</div>
</div>
<div id="engagementMessage" class="engagement-message"></div>
<button class="btn btn-primary" onclick="resetReport()" data-i18n="submit_another">Submit Another Report</button>
<button class="btn btn-secondary" onclick="switchView('respond')" data-i18n="view_map">View Responder Map</button>
</div>
<div id="reportForm">
<div class="step-progress">
<div class="step-node"><div class="step-circle active" id="sc1">1</div><div class="step-label active" id="sl1" data-i18n="step_photo">Photo</div></div>
<div class="step-line" id="sline1"></div>
<div class="step-node"><div class="step-circle" id="sc2">2</div><div class="step-label" id="sl2" data-i18n="step_damage">Damage</div></div>
<div class="step-line" id="sline2"></div>
<div class="step-node"><div class="step-circle" id="sc3">3</div><div class="step-label" id="sl3" data-i18n="step_details">Details</div></div>
<div class="step-line" id="sline3"></div>
<div class="step-node"><div class="step-circle" id="sc4">4</div><div class="step-label" id="sl4" data-i18n="step_location">Location</div></div>
<div class="step-line" id="sline4"></div>
<div class="step-node"><div class="step-circle" id="sc5">5</div><div class="step-label" id="sl5" data-i18n="step_review">Review</div></div>
</div>
<div class="step-panel active" id="step1">
<div class="step-title" data-i18n="photo_title">PHOTOGRAPH</div>
<div class="step-subtitle" data-i18n="photo_sub">Capture visible damage clearly</div>
<div class="photo-zone" id="photoZone" onclick="triggerPhotoCapture()">
<div class="photo-icon">📷</div>
<div class="photo-hint" data-i18n="photo_hint">TAP TO PHOTOGRAPH DAMAGE</div>
<img id="photoPreview" alt="Damage photo">
<button class="photo-retake" id="photoRetake" onclick="event.stopPropagation(); triggerPhotoCapture()" data-i18n="retake">RETAKE</button>
</div>
<input type="file" id="photoInput" accept="image/*" capture="environment" onchange="handlePhoto(this)">
<div class="photo-ai-status" id="photoAiStatus"><span class="spinner"></span><span id="aiStatusText" data-i18n="analyzing">CERTUS analyzing image...</span></div>
<button class="btn btn-primary mt-16" id="step1Next" onclick="goStep(2)" disabled data-i18n="next">NEXT</button>
</div>
<div class="step-panel" id="step2">
<div class="step-title" data-i18n="damage_title">DAMAGE LEVEL</div>
<div class="step-subtitle" data-i18n="damage_sub">Select the damage level (UNDP required)</div>
<div class="damage-grid">
<button class="damage-btn" onclick="selectDamage('minimal')" id="damage-minimal">
<div class="damage-label" data-i18n="damage_minimal">Minimal / No damage</div>
<div class="damage-desc" data-i18n="damage_minimal_desc">Little or no visible structural impact</div>
</button>
<button class="damage-btn" onclick="selectDamage('partial')" id="damage-partial">
<div class="damage-label" data-i18n="damage_partial">Partially damaged</div>
<div class="damage-desc" data-i18n="damage_partial_desc">Significant damage but still standing</div>
</button>
<button class="damage-btn" onclick="selectDamage('complete')" id="damage-complete">
<div class="damage-label" data-i18n="damage_complete">Completely damaged</div>
<div class="damage-desc" data-i18n="damage_complete_desc">Structure destroyed / total collapse</div>
</button>
</div>
<div class="step-title" style="margin-top: 24px;" data-i18n="infra_title">INFRASTRUCTURE TYPE</div>
<div class="infra-grid">
<button class="infra-btn" data-infra="Residential" onclick="selectInfra('Residential')"><div class="infra-icon">🏠</div><div class="infra-label">Residential</div></button>
<button class="infra-btn" data-infra="Road" onclick="selectInfra('Road')"><div class="infra-icon">🛣️</div><div class="infra-label">Road</div></button>
<button class="infra-btn" data-infra="Bridge" onclick="selectInfra('Bridge')"><div class="infra-icon">🌉</div><div class="infra-label">Bridge</div></button>
<button class="infra-btn" data-infra="Utility" onclick="selectInfra('Utility')"><div class="infra-icon">⚡</div><div class="infra-label">Utility</div></button>
<button class="infra-btn" data-infra="Medical" onclick="selectInfra('Medical')"><div class="infra-icon">🏥</div><div class="infra-label">Medical</div></button>
<button class="infra-btn" data-infra="School" onclick="selectInfra('School')"><div class="infra-icon">🏫</div><div class="infra-label">School</div></button>
<button class="infra-btn" data-infra="Commercial Infrastructure" onclick="selectInfra('Commercial Infrastructure')"><div class="infra-icon">🏪</div><div class="infra-label">Commercial</div></button>
<button class="infra-btn" data-infra="Government Building" onclick="selectInfra('Government Building')"><div class="infra-icon">🏛️</div><div class="infra-label">Government</div></button>
<button class="infra-btn" data-infra="Transport and Communication" onclick="selectInfra('Transport and Communication')"><div class="infra-icon">📡</div><div class="infra-label">Transport/Comm</div></button>
<button class="infra-btn" data-infra="Community Infrastructure" onclick="selectInfra('Community Infrastructure')"><div class="infra-icon">🏘️</div><div class="infra-label">Community</div></button>
<button class="infra-btn" data-infra="Public spaces/Recreation" onclick="selectInfra('Public spaces/Recreation')"><div class="infra-icon">⛲</div><div class="infra-label">Public Space</div></button>
<button class="infra-btn" data-infra="Other" onclick="selectInfra('Other')"><div class="infra-icon">📝</div><div class="infra-label">Other</div></button>
</div>
<div id="otherInfraContainer" style="display:none; margin-top:8px;"><input type="text" id="otherInfra" class="form-input" placeholder="Please specify"></div>
<div style="display:flex;gap:8px;margin-top:16px;"><button class="btn btn-secondary" style="flex:0 0 80px" onclick="goStep(1)" data-i18n="back">← BACK</button><button class="btn btn-primary" id="step2Next" onclick="goStep(3)" disabled data-i18n="next">NEXT</button></div>
</div>
<div class="step-panel" id="step3">
<div class="step-title" data-i18n="details_title">DETAILS</div>
<div class="step-subtitle" data-i18n="details_sub">Help responders understand the situation</div>
<div class="form-group"><label class="form-label" data-i18n="infra_name_label">Infrastructure name (optional)</label><input type="text" id="infraName" class="form-input" placeholder="e.g., Central Bridge, Al-Noor Hospital"></div>
<div class="form-group"><label class="form-label" data-i18n="crisis_type_label">Nature of crisis</label><div class="radio-group" id="crisisTypeGroup"><label><input type="radio" name="crisisType" value="Natural"> <span data-i18n="crisis_natural">Natural</span></label><label><input type="radio" name="crisisType" value="Technological"> <span data-i18n="crisis_tech">Technological</span></label><label><input type="radio" name="crisisType" value="Human-made"> <span data-i18n="crisis_human">Human‑made</span></label></div><div id="crisisSubtypeContainer" style="margin-top: 12px;"></div></div>
<div class="form-group"><label class="form-label" data-i18n="debris_label">Is there debris requiring clearing?</label><div class="radio-group"><label><input type="radio" name="debris" value="yes"> <span data-i18n="yes">Yes</span></label><label><input type="radio" name="debris" value="no"> <span data-i18n="no">No</span></label></div></div>
<div class="form-group">
<label class="form-label" data-i18n="electricity_label">Electricity infrastructure condition</label>
<div class="radio-group" id="electricityGroup">
<label><input type="radio" name="electricity" value="No damage observed"> No damage observed</label>
<label><input type="radio" name="electricity" value="Minor damage"> Minor damage (service disruptions but quickly repairable)</label>
<label><input type="radio" name="electricity" value="Moderate damage"> Moderate damage (partial outages requiring repairs)</label>
<label><input type="radio" name="electricity" value="Severe damage"> Severe damage (major infrastructure damaged, prolonged outages)</label>
<label><input type="radio" name="electricity" value="Completely destroyed"> Completely destroyed</label>
<label><input type="radio" name="electricity" value="Unknown/cannot be assessed"> Unknown/cannot be assessed</label>
</div>
</div>
<div class="form-group">
<label class="form-label" data-i18n="health_label">Overall health services functioning</label>
<div class="radio-group" id="healthGroup">
<label><input type="radio" name="health" value="Fully functional"> Fully functional</label>
<label><input type="radio" name="health" value="Partially functional"> Partially functional</label>
<label><input type="radio" name="health" value="Largely disrupted"> Largely disrupted</label>
<label><input type="radio" name="health" value="Not functioning at all"> Not functioning at all</label>
<label><input type="radio" name="health" value="Unknown"> Unknown</label>
</div>
</div>
<div class="form-group"><label class="form-label" data-i18n="needs_label">Most pressing needs (select all that apply)</label><div class="checkbox-group" id="needsGroup">
<label><input type="checkbox" value="Food assistance and safe drinking water"> Food assistance and safe drinking water</label>
<label><input type="checkbox" value="Cash or financial assistance"> Cash or financial assistance</label>
<label><input type="checkbox" value="Access to healthcare and essential medicines"> Access to healthcare and essential medicines</label>
<label><input type="checkbox" value="Shelter, housing repair, or temporary accommodation"> Shelter, housing repair, or temporary accommodation</label>
<label><input type="checkbox" value="Restoration of livelihoods or income sources"> Restoration of livelihoods or income sources</label>
<label><input type="checkbox" value="Water, sanitation, and hygiene (WASH)"> Water, sanitation, and hygiene (WASH)</label>
<label><input type="checkbox" value="Restoration of basic services and infrastructure"> Restoration of basic services and infrastructure</label>
<label><input type="checkbox" value="Protection services and psychosocial support"> Protection services and psychosocial support</label>
<label><input type="checkbox" value="Support from local authorities and community organizations"> Support from local authorities and community organizations</label>
<label><input type="checkbox" value="Other, please specify"> Other, please specify</label>
</div>
</div><!-- closes form-group for needs -->
<div style="display:flex;gap:8px;margin-top:16px;"><button class="btn btn-secondary" style="flex:0 0 80px" onclick="goStep(2)" data-i18n="back">← BACK</button><button class="btn btn-primary" id="step3Next" onclick="goStep(4)" data-i18n="next">NEXT</button></div>
</div><!-- closes step3 panel -->
<div class="step-panel" id="step4">
<div class="step-title" data-i18n="location_title">LOCATION</div>
<div class="step-subtitle" data-i18n="location_sub">Pin the damage location</div>
<div class="location-options"><div class="loc-opt selected" id="locPrecise" onclick="selectLocMode('precise')"><div class="loc-opt-label" data-i18n="precise">📍 Precise</div><div class="loc-opt-desc" data-i18n="precise_desc">Exact GPS pin</div></div><div class="loc-opt" id="locFuzzy" onclick="selectLocMode('fuzzy')"><div class="loc-opt-label" data-i18n="area">🔵 Area</div><div class="loc-opt-desc" data-i18n="area_desc">±100m radius</div></div></div>
<div class="fuzzy-notice" id="fuzzyNotice" style="display:none" data-i18n="fuzzy_notice">Area mode selected — your precise location is protected. Report is accurate to ±100 meters. Suitable for conflict-affected areas.</div>
<div id="locationMap"></div>
<div class="gps-coords" id="gpsCoords"><span style="color:var(--muted)" data-i18n="acquiring">Acquiring GPS coordinates...</span></div>
<div class="form-group text-location"><label class="form-label" data-i18n="text_location_label">Describe location (if GPS unavailable, e.g., "near the central market")</label><input type="text" id="textLocation" class="form-input" placeholder="Optional text description"></div>
<div style="display:flex;gap:8px;margin-top:16px;"><button class="btn btn-secondary" style="flex:0 0 80px" onclick="goStep(3)" data-i18n="back">← BACK</button><button class="btn btn-primary" id="step4Next" onclick="goStep(5)" disabled data-i18n="next">NEXT</button></div>
</div>
<div class="step-panel" id="step5">
<div class="step-title" data-i18n="review_title">REVIEW</div>
<div class="step-subtitle" data-i18n="review_sub">Confirm and submit your report</div>
<div class="submit-summary" id="submitSummary"></div>
<div class="anon-notice"><span class="anon-icon">🔒</span><span data-i18n="anon_notice">Your report is anonymous. No account required. EXIF metadata stripped. No IP stored. Keyed by random UUID only.</span></div>
<div style="display:flex;gap:8px;"><button class="btn btn-secondary" style="flex:0 0 80px" onclick="goStep(4)" data-i18n="back">← BACK</button><button class="btn btn-primary" id="submitBtn" onclick="submitReport()" data-i18n="submit">SUBMIT REPORT</button></div>
</div>
</div>
</div>
<!-- RESPOND VIEW -->
<div class="veritas-view" id="viewRespond">
<div id="accessGate" class="access-gate"><div class="access-gate-title" data-i18n="restricted">RESTRICTED</div><div class="access-gate-sub" data-i18n="access_sub">Responder Access Required</div><input class="access-input" id="accessInput" type="text" placeholder="ACCESS CODE" maxlength="8" onkeyup="checkAccess(event)"><button class="btn btn-primary" onclick="checkAccessBtn()" data-i18n="enter">ENTER</button><div style="font-family:var(--mono);font-size:9px;color:var(--muted);margin-top:16px;letter-spacing:0.5px;" data-i18n="access_note">Access code distributed to authorized UNDP response partners only.</div></div>
<div class="respond-dashboard" id="respondDashboard">
<div class="section-label" data-i18n="live_dash">Live Confidence Dashboard</div>
<div class="confidence-dash"><div class="conf-card high"><div class="conf-count" id="dashHigh">0</div><div class="conf-tier" data-i18n="high_conf">High<br>Confidence</div></div><div class="conf-card watch"><div class="conf-count" id="dashWatch">0</div><div class="conf-tier" data-i18n="watch">Watch<br>Monitor</div></div><div class="conf-card review"><div class="conf-count" id="dashReview">0</div><div class="conf-tier" data-i18n="review_req">Review<br>Required</div></div></div>
<div class="section-label" data-i18n="conf_map">Confidence Map</div><div id="respondMap"></div>
<div class="timeline-wrap"><div class="timeline-label" data-i18n="timeline">48-Hour Timeline Playback</div><input type="range" id="timelineSlider" min="0" max="100" value="100" oninput="updateTimeline(this.value)"><div class="timeline-time" id="timelineTime" data-i18n="live_all">Live — all reports</div></div>
<div class="section-label" data-i18n="conflict_flags">Conflict Flags</div><div id="conflictList"><div style="font-family:var(--mono);font-size:10px;color:var(--muted);padding:10px;text-align:center;" data-i18n="no_conflicts">No conflicts detected</div></div>
<div class="report-card"><div class="report-card-title" data-i18n="dci_report">DCI REPORT CARD</div><div class="section-label" data-i18n="conf_dist">Confidence Distribution</div>
<div class="rc-bar-row"><span class="rc-bar-label" data-i18n="high">High</span><div class="rc-bar-track"><div class="rc-bar-fill" id="rcHigh" style="width:0%;background:var(--amber)"></div></div><span class="rc-bar-val" id="rcHighPct">0%</span></div>
<div class="rc-bar-row"><span class="rc-bar-label" data-i18n="watch">Watch</span><div class="rc-bar-track"><div class="rc-bar-fill" id="rcWatch" style="width:0%;background:var(--amber)"></div></div><span class="rc-bar-val" id="rcWatchPct">0%</span></div>
<div class="rc-bar-row"><span class="rc-bar-label" data-i18n="review">Review</span><div class="rc-bar-track"><div class="rc-bar-fill" id="rcReview" style="width:0%;background:var(--red)"></div></div><span class="rc-bar-val" id="rcReviewPct">0%</span></div>
<div style="margin-top:12px;font-family:var(--mono);font-size:9px;color:var(--muted);letter-spacing:0.5px;" data-i18n="powered">Powered by CERTUS Engine v1.0 — DCI scored on photo evidence, corroboration, freshness, and consistency</div>
</div>
<div class="export-section"><div class="section-label" data-i18n="export">Export Dataset</div>
<div style="display: flex; align-items: center; gap: 12px; margin-bottom: 12px;"><span class="stp-badge" style="background: rgba(46,125,50,0.1); border: 1px solid #2E7D32; border-radius: 20px; padding: 4px 10px; font-family: var(--mono); font-size: 9px; color: #2E7D32;">🔒 STP INTEGRATED</span><span style="font-size: 11px; color: var(--muted);">Exports can be permanently sealed with triple‑time proof</span></div>
<div class="export-btns">
<button class="export-btn" onclick="exportData('json')">JSON + DCI</button>
<button class="export-btn" onclick="exportData('csv')">CSV</button>
<button class="export-btn" onclick="exportData('geojson')">GeoJSON</button>
<button class="export-btn" onclick="exportShapefile()">Shapefile</button>
<button class="export-btn" onclick="copyRestEndpoint()" style="border-color:var(--cyan);color:var(--cyan);">🔗 REST API</button>
<button class="export-btn" id="stpSealBtn" onclick="stampWithSTP()" style="border-color:var(--amber);">🔒 STP Seal</button>
</div>
<div class="export-header-preview" id="exportPreview">VERITAS INTEGRITY EXPORT\nPowered by CERTUS Engine v1.0\nReports: —\nGenerated: —\nSHA-256: computing...\nDecision-support only. Review Required reports require human field verification.</div>
<div id="stpSealDisplay" style="display:none; margin-top:16px; padding:12px; background:var(--surface); border:1px solid var(--amber); border-radius:4px; font-family:var(--mono); font-size:10px;"><div style="display:flex; justify-content:space-between; align-items:center;"><span style="color:var(--amber); font-weight:bold;">SOVEREIGN TRACE SEAL</span><button class="btn-sm" onclick="downloadSTPSeal()" style="background:var(--panel);">📥 Download STP File</button></div><div id="stpSealContent" style="margin-top:8px; color:var(--muted); line-height:1.6;"></div></div>
</div>
<div style="margin-bottom:16px;"><button class="btn btn-secondary btn-sm" onclick="exportCachedSnapshot()" data-i18n="cached_snapshot">📥 Download Cached Snapshot</button><div style="font-family:var(--mono);font-size:9px;color:var(--muted);margin-top:6px;letter-spacing:0.5px;" data-i18n="offline_note">Available offline — shows last synced state</div></div>
<div class="law6-footer"><strong data-i18n="decision_support">⚠ DECISION-SUPPORT INSTRUMENT ONLY</strong><br data-i18n="law6_line1">VERITAS DCI scores assist human judgment — they do not replace it.<br><strong data-i18n="review_required_human">Review Required</strong> reports must receive human field verification before informing any resource deployment decision.</div>
</div>
</div>
<div class="triple-time">
<div class="time-cell"><div class="time-sys">Gregorian</div><div class="time-val loading" id="tt-gregorian">· · ·</div></div>
<div class="time-cell"><div class="time-sys">13 Moon · Dreamspell</div><div class="time-val loading" id="tt-dreamspell">· · ·</div></div>
<div class="time-cell"><div class="time-sys">Hebrew Calendar</div><div class="time-val loading" id="tt-hebrew">· · ·</div></div>
</div>
<footer>
<div class="footer-id"><strong>AionSystem</strong> · Sheldon K. Salmon · AI Reliability Architect<br>Evans Mills, New York · March 2026<br>VERITAS v1.0 · CERTUS Engine · STP Integration</div>
<ul class="footer-links"><li><a href="/">Home</a></li><li><a href="/simulators/">Simulators</a></li><li><a href="/services/">Services</a></li><li><a href="/stack/">Stack</a></li><li><a href="/ksc/">KSC</a></li><li><a href="/certify/">Certify</a></li><li><a href="https://github.com/AionSystem/VERITAS" target="_blank">GitHub</a></li></ul>
</footer>
</div>
<div class="toast-container" id="toastContainer"></div>
<script>
// ==================== FULL VERITAS APPLICATION ====================
const CONFIG = {
SUPABASE_URL: '/api', // Vercel proxy — keys stay server-side
SUPABASE_ANON: 'proxy', // Placeholder — not sent to client
ACCESS_CODE: 'UNDP2026',
USE_SUPABASE: true,
MAP_CENTER: [0, 20],
MAP_ZOOM: 3,
FUZZY_RADIUS: 100,
DCI_THRESHOLDS: { HIGH: 0.70, WATCH: 0.40 },
DEDUP_RADIUS: 10,
DEDUP_WINDOW: 120,
};
const STATE = {
currentStep: 1,
currentView: 'report',
markerLayer: null,
photo: null,
photoAiScore: null,
photoAiConf: null,
undpTier: null,
internalTier: null,
infraType: null,
locMode: 'precise',
coords: null,
textLocation: null,
reports: [],
isOnline: navigator.onLine,
syncQueue: [],
respondAuth: false,
respondMap: null,
reportMap: null,
reportMarker: null,
additionalFields: { infraName: '', crisisType: '', crisisSubtype: '', debris: '', electricity: '', health: '', needs: [] }
};
const tierMap = { minimal: 'None', partial: 'Moderate', complete: 'Total Collapse' };
const crisisSubtypes = {
Natural: ['Earthquake', 'Flood', 'Tsunami', 'Hurricane', 'Wildfire'],
Technological: ['Explosion', 'Chemical incident'],
'Human-made': ['Conflict', 'Civil unrest']
};
const translations = {
en: {
offline: "Offline — reports saved locally and will sync when connected",
syncing: "Syncing queued reports...",
report_tab: "📍 Report",
respond_tab: "🗺 Respond",
report_received: "REPORT RECEIVED",
certus_scored: "CERTUS Engine has scored your submission",
dci_label: "Damage Confidence Index — CERTUS Engine v1.0",
dci_explain: "DCI measures how much to trust this report.\nScored on photo evidence · corroboration · freshness · consistency.",
submit_another: "Submit Another Report",
view_map: "View Responder Map",
step_photo: "Photo",
step_damage: "Damage",
step_details: "Details",
step_location: "Location",
step_review: "Review",
photo_title: "PHOTOGRAPH",
photo_sub: "Capture visible damage clearly",
photo_hint: "TAP TO PHOTOGRAPH DAMAGE",
retake: "RETAKE",
analyzing: "CERTUS analyzing image...",
next: "NEXT",
damage_title: "DAMAGE LEVEL",
damage_sub: "Select the damage level (UNDP required)",
damage_minimal: "Minimal / No damage",
damage_minimal_desc: "Little or no visible structural impact",
damage_partial: "Partially damaged",
damage_partial_desc: "Significant damage but still standing",
damage_complete: "Completely damaged",
damage_complete_desc: "Structure destroyed / total collapse",
infra_title: "INFRASTRUCTURE TYPE",
infra_residential: "Residential",
infra_road: "Road",
infra_bridge: "Bridge",
infra_utility: "Utility",
infra_medical: "Medical",
infra_school: "School",
details_title: "DETAILS",
details_sub: "Help responders understand the situation",
infra_name_label: "Infrastructure name (optional)",
crisis_type_label: "Nature of crisis",
crisis_natural: "Natural",
crisis_tech: "Technological",
crisis_human: "Human‑made",
debris_label: "Is there debris requiring clearing?",
yes: "Yes",
no: "No",
electricity_label: "Electricity infrastructure condition",
elec_fully: "Fully functioning",
elec_partial: "Partially functioning",
elec_limited: "Limited",
elec_none: "Non‑functioning",
health_label: "Overall health services functioning",
health_fully: "Fully functioning",
health_partial: "Partially functioning",
health_limited: "Limited",
health_none: "Non‑functioning",
unknown: "Unknown",
needs_label: "Most pressing needs (select all that apply)",
need_water: "Water",
need_food: "Food",
need_shelter: "Shelter",
need_medical: "Medical care",
need_electricity: "Electricity",
need_fuel: "Fuel",
need_comm: "Communication",
need_transport: "Transport",
need_security: "Security",
need_other: "Other",
location_title: "LOCATION",
location_sub: "Pin the damage location",
precise: "📍 Precise",
precise_desc: "Exact GPS pin",
area: "🔵 Area",
area_desc: "±100m radius",
fuzzy_notice: "Area mode selected — your precise location is protected. Report is accurate to ±100 meters. Suitable for conflict-affected areas.",
acquiring: "Acquiring GPS coordinates...",
text_location_label: "Describe location (if GPS unavailable, e.g., \"near the central market\")",
review_title: "REVIEW",
review_sub: "Confirm and submit your report",
anon_notice: "Your report is anonymous. No account required. EXIF metadata stripped. No IP stored. Keyed by random UUID only.",
back: "← BACK",
submit: "SUBMIT REPORT",
restricted: "RESTRICTED",
access_sub: "Responder Access Required",
enter: "ENTER",
access_note: "Access code distributed to authorized UNDP response partners only.",
live_dash: "Live Confidence Dashboard",
high_conf: "High<br>Confidence",
watch: "Watch<br>Monitor",
review_req: "Review<br>Required",
conf_map: "Confidence Map",
timeline: "48-Hour Timeline Playback",
live_all: "Live — all reports",
conflict_flags: "Conflict Flags",
no_conflicts: "No conflicts detected",
dci_report: "DCI REPORT CARD",
conf_dist: "Confidence Distribution",
high: "High",
review: "Review",
powered: "Powered by CERTUS Engine v1.0 — DCI scored on photo evidence, corroboration, freshness, and consistency",
export: "Export Dataset",
cached_snapshot: "📥 Download Cached Snapshot",
offline_note: "Available offline — shows last synced state",
decision_support: "⚠ DECISION-SUPPORT INSTRUMENT ONLY",
law6_line1: "VERITAS DCI scores assist human judgment — they do not replace it.",
review_required_human: "Review Required"
},
ar: {
offline: "غير متصل — يتم حفظ التقارير محلياً وسيتم المزامنة عند الاتصال",
syncing: "مزامنة التقارير المعلقة...",
report_tab: "📍 تقرير",
respond_tab: "🗺 استجابة",
report_received: "تم استلام التقرير",
certus_scored: "قام محرك CERTUS بتقييم إرسالك",
dci_label: "مؤشر الثقة في الضرر — محرك CERTUS الإصدار 1.0",
dci_explain: "يقيس DCI مدى الثقة في هذا التقرير.\nيتم تقييمه بناءً على الأدلة المصورة · التأكيد · الحداثة · الاتساق.",
submit_another: "إرسال تقرير آخر",
view_map: "عرض خريطة المستجيبين",
step_photo: "صورة",
step_damage: "الضرر",
step_details: "تفاصيل",
step_location: "الموقع",
step_review: "مراجعة",
photo_title: "تصوير",
photo_sub: "التقط صورة واضحة للضرر",
photo_hint: "انقر لتصوير الضرر",
retake: "إعادة التصوير",
analyzing: "CERTUS يقوم بتحليل الصورة...",
next: "التالي",
damage_title: "مستوى الضرر",
damage_sub: "اختر مستوى الضرر (مطلوب من قبل UNDP)",
damage_minimal: "أقل / بدون ضرر",
damage_minimal_desc: "تأثير هيكلي ضئيل أو معدوم",
damage_partial: "ضرر جزئي",
damage_partial_desc: "ضرر كبير لكن الهيكل لا يزال قائماً",
damage_complete: "ضرر كامل",
damage_complete_desc: "هيكل مدمر / انهيار كامل",
infra_title: "نوع البنية التحتية",
infra_residential: "سكني",
infra_road: "طريق",
infra_bridge: "جسر",
infra_utility: "مرافق عامة",
infra_medical: "طبي",
infra_school: "مدرسة",
details_title: "تفاصيل",
details_sub: "ساعد المستجيبين على فهم الوضع",
infra_name_label: "اسم البنية التحتية (اختياري)",
crisis_type_label: "طبيعة الأزمة",
crisis_natural: "طبيعية",
crisis_tech: "تكنولوجية",
crisis_human: "بشرية المنشأ",
debris_label: "هل هناك حطام يحتاج إلى إزالة؟",
yes: "نعم",
no: "لا",
electricity_label: "حالة البنية التحتية للكهرباء",
elec_fully: "تعمل بالكامل",
elec_partial: "تعمل جزئياً",
elec_limited: "محدودة",
elec_none: "لا تعمل",
health_label: "حالة الخدمات الصحية العامة",
health_fully: "تعمل بالكامل",
health_partial: "تعمل جزئياً",
health_limited: "محدودة",
health_none: "لا تعمل",
unknown: "غير معروف",
needs_label: "أكثر الاحتياجات إلحاحاً (اختر كل ما ينطبق)",
need_water: "مياه",
need_food: "غذاء",
need_shelter: "مأوى",
need_medical: "رعاية صحية",
need_electricity: "كهرباء",
need_fuel: "وقود",
need_comm: "اتصالات",
need_transport: "نقل",
need_security: "أمن",
need_other: "أخرى",
location_title: "الموقع",
location_sub: "حدد موقع الضرر",
precise: "📍 دقيق",
precise_desc: "نظام تحديد المواقع الدقيق",
area: "🔵 منطقة",
area_desc: "نصف قطر ±100 متر",
fuzzy_notice: "تم اختيار وضع المنطقة — موقعك الدقيق محمي. التقرير دقيق ضمن ±100 متر. مناسب للمناطق المتأثرة بالنزاعات.",
acquiring: "جاري الحصول على إحداثيات GPS...",
text_location_label: "صف الموقع (إذا كان GPS غير متوفر، مثلاً \"قرب السوق المركزي\")",
review_title: "مراجعة",
review_sub: "تأكيد وإرسال تقريرك",
anon_notice: "تقريرك مجهول. لا حاجة لحساب. تمت إزالة بيانات EXIF. لا يتم تخزين عنوان IP. يتم ترميزه بواسطة UUID عشوائي فقط.",
back: "← رجوع",
submit: "إرسال التقرير",