-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
938 lines (893 loc) · 63.3 KB
/
index.html
File metadata and controls
938 lines (893 loc) · 63.3 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
<!doctype html>
<!--
Quantum Vault
Copyright (C) 2025 CyberKiska
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
-->
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="Content-Security-Policy"
content="default-src 'self'; connect-src 'none'; script-src 'self'; style-src 'self'; img-src 'self' data:; object-src 'none'; base-uri 'none'; frame-ancestors 'none'; form-action 'self'">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Quantum Vault</title>
<link rel="stylesheet" href="%BASE_PATH%style.css">
</head>
<body>
<div class="app-shell">
<!-- Sidebar -->
<aside class="sidebar">
<div>
<div class="header-group">
<h1>Quantum Vault</h1>
<p class="subtitle">PQC encryption & sharding</p>
<span class="version-badge">v2.1.1</span>
</div>
<div class="mode-switch-container">
<span class="mode-label">Lite</span>
<label class="toggle-switch" data-testid="mode-toggle-control">
<input type="checkbox" id="modeToggle" data-testid="mode-toggle">
<span class="slider"></span>
</label>
<span class="mode-label">Pro</span>
</div>
<p class="muted-copy mode-switch-hint">Lite encrypts and splits in one step. Pro follows the archive workflow: create, review artifacts, maintain evidence, evolve, restore.</p>
<!-- Lite Mode Nav -->
<nav class="nav-menu" role="tablist" aria-label="Lite workflow tabs" id="liteNav">
<button id="liteTabProtect" class="nav-item active" role="tab" aria-selected="true" aria-controls="liteViewProtect" tabindex="0" type="button"><span class="icon">🛡️</span> Create Archive</button>
<button id="liteTabRestore" class="nav-item" role="tab" aria-selected="false" aria-controls="liteViewRestore" tabindex="-1" type="button"><span class="icon">♻️</span> Restore</button>
</nav>
<!-- Pro Mode Nav -->
<nav class="nav-groups initially-hidden" role="tablist" aria-label="Pro workflow tabs" id="proNav">
<div class="nav-group" role="presentation">
<p class="nav-group-label">Archive Workflow</p>
<div class="nav-menu" role="presentation">
<button id="proTabDistribution" class="nav-item active" role="tab" aria-selected="true" aria-controls="proViewIdentity proViewEncryption proViewDistribution" tabindex="0" type="button" data-testid="tab-create"><span class="icon">🧩</span> Create</button>
<button id="proTabReview" class="nav-item" role="tab" aria-selected="false" aria-controls="proViewReview" tabindex="-1" type="button" data-testid="tab-review"><span class="icon">🔎</span> Review Artifacts</button>
<button id="proTabAttach" class="nav-item" role="tab" aria-selected="false" aria-controls="proViewAttach" tabindex="-1" type="button" data-testid="tab-attach"><span class="icon">🪢</span> Maintain</button>
<button id="proTabReshare" class="nav-item" role="tab" aria-selected="false" aria-controls="proViewReshare" tabindex="-1" type="button" data-testid="tab-reshare"><span class="icon">🔁</span> Evolve</button>
<button id="proTabRestore" class="nav-item" role="tab" aria-selected="false" aria-controls="proViewRestore" tabindex="-1" type="button" data-testid="tab-restore"><span class="icon">♻️</span> Restore</button>
</div>
</div>
</nav>
</div>
<div class="security-context">
<div class="context-row">
<span>System Status</span>
<span class="context-val status-line">
<span id="sys-status-dot" class="status-indicator no-key-loaded" aria-label="System status: No key loaded"></span>
<span id="sys-status-text">No key loaded</span>
</span>
</div>
<div class="context-row">
<span>Public Key</span>
<span id="ctx-pub-fp" class="context-val">Not Loaded</span>
</div>
<div class="context-row">
<span>Private Key</span>
<span id="ctx-sec-fp" class="context-val">Not Loaded</span>
</div>
<button id="sidebar-selftest" class="sidebar-selftest" type="button">Run Self-test</button>
<div class="sidebar-note">
Browser memory only; wipe is best effort.<br />
No network calls.<br />
<a href="https://github.com/CyberKiska/quantum-vault" target="_blank" rel="noopener noreferrer">Source code</a>
</div>
</div>
</aside>
<!-- Main Content -->
<main class="main-content">
<div id="toast-container" class="toast-container" data-testid="toast-container"></div>
<!-- LITE MODE -->
<section id="liteMode" class="mode-section active">
<!-- Lite View: Protect -->
<div id="liteViewProtect" class="tab-panel module-panel workflow-panel active" role="tabpanel" aria-labelledby="liteTabProtect">
<header class="section-header">
<h2>Create Archive</h2>
<p class="muted-copy section-step-hint">Select files once, and Quantum Vault will encrypt them and export successor shards plus archive JSON.</p>
</header>
<div class="visual-pipeline-container">
<div class="pipeline-step step-file">
<span class="icon">📄</span>
<span class="label">File</span>
</div>
<div class="pipeline-arrow">→</div>
<div class="pipeline-step step-lock">
<span class="icon">🔒</span>
<span class="label">Encrypt</span>
</div>
<div class="pipeline-arrow">→</div>
<div class="pipeline-step step-split">
<span class="icon">🧩</span>
<span class="label">Split</span>
</div>
</div>
<div class="panel-grid">
<div class="workflow-surface full-width">
<div class="dropzone-area" id="liteDropzone">
<h3>Select files to protect</h3>
<p id="liteFilesHelp" class="muted-copy">Drag files here or use the file picker to select plaintext inputs for local encryption.</p>
<label for="liteFilesInput" class="visually-hidden">Select files to protect</label>
<input type="file" id="liteFilesInput" multiple aria-describedby="liteFilesHelp">
<div id="liteFilesList" class="files-list initially-hidden"></div>
</div>
<div class="config-area">
<div class="key-status-row">
<div id="keyStatus" class="status-badge">
<span class="status-icon">🔑</span>
<span class="status-text">Generating keys...</span>
</div>
<button id="liteDownloadKeysBtn" class="button secondary small initially-hidden" type="button" aria-describedby="liteCustodyGuidanceSummary">
📥 Backup Keys
</button>
</div>
<div class="config-controls">
<div class="form-group">
<label for="liteN">Total shards (n) <span class="info" title="Total number of shard files to create">ℹ</span></label>
<input type="number" id="liteN" value="5" min="5" max="25">
</div>
<div class="form-group">
<label for="liteThreshold">Approximate recovery threshold (%) <span class="info" title="Approximate percentage of shards needed for recovery">ℹ</span></label>
<input type="number" id="liteThreshold" value="60" min="50" max="90" step="5">
</div>
</div>
<div class="threshold-display">
<span id="thresholdText" class="value-display">Requested 60% -> Achievable 80% (>=4/5 shards)</span>
<span id="thresholdDelta" class="threshold-delta"></span>
<small id="thresholdHint" class="info-text">Discrete by RS/SSS constraints.</small>
</div>
<div class="form-group mt-2">
<label for="liteAuthPolicy">Archive authenticity policy</label>
<select id="liteAuthPolicy">
<option value="integrity-only" selected>Integrity only (inauthentic)</option>
<option value="any-signature">Any signature required</option>
<option value="strong-pq-signature">Strong PQ signature required</option>
</select>
<small class="muted-copy">Choose whether restore should require detached archive approval.</small>
<div id="liteAuthPolicyConsequence" class="policy-consequence-panel warning" data-testid="lite-policy-consequence" aria-live="polite"></div>
<details class="technical-context technical-details mt-2">
<summary>Technical context</summary>
<div class="detail-copy">
<small class="muted-copy">Lite creates successor lifecycle archives by default and exports successor <code>.qcont</code> shards, a signable <code>.archive-state.json</code>, and a mutable <code>.lifecycle-bundle.json</code>.</small>
<small id="liteAuthPolicyHelp" class="muted-copy">Without an external archive-approval signature over the archive-state descriptor, restore verifies integrity only and does not claim archive approval.</small>
<small class="muted-copy">Same-state resharing stays in Pro as an optional maintenance tool and does not replace archive approval while the archive state stays unchanged.</small>
</div>
</details>
</div>
</div>
<div class="action-row button-group lite-primary-action">
<button id="liteCreateShardsBtn" class="button primary" disabled type="button">🛡️ Encrypt & Create Successor Shards</button>
</div>
<div id="liteCustodyGuidance" class="qv-decision-card qv-decision-card--informational lite-custody-panel policy-consequence-panel informational initially-hidden" data-testid="lite-custody-guidance" aria-live="polite">
<h4 class="qv-decision-card__title">Custody and archive exports</h4>
<p id="liteCustodyGuidanceSummary" class="muted-copy lite-custody-lede">
Recovery depends on independent shard custody and exported JSON descriptors, not on keeping browser keys around.
</p>
<ul class="lite-custody-list">
<li>Store <code>QVqcont-7</code> shards across separate locations or custodians.</li>
<li>Retain the archive-state descriptor and lifecycle bundle JSON; Review, Pro Attach, and Restore depend on them.</li>
<li>Archive approval happens outside the browser: sign archive-state bytes, then use Pro Attach for signatures and evidence.</li>
<li><strong>Backup Keys</strong> is optional convenience; skip it when custody policy forbids retaining ML-KEM keys.</li>
</ul>
</div>
<div id="liteExportChecklist" class="lite-export-checklist initially-hidden" data-testid="lite-export-checklist" aria-live="polite">
<h4 class="lite-export-checklist-title">Last create export checklist</h4>
<p class="muted-copy lite-export-checklist-lede">The browser started downloads for the primary artifacts. Confirm each file is stored where your policy requires.</p>
<ul id="liteExportChecklistItems" class="lite-export-checklist-items"></ul>
</div>
</div>
</div>
</div>
<!-- Lite View: Restore -->
<div id="liteViewRestore" class="tab-panel module-panel workflow-panel" role="tabpanel" aria-labelledby="liteTabRestore">
<header class="section-header">
<h2>Restore</h2>
<p class="muted-copy section-step-hint">The restore decision updates as you load shards and evidence; details and selection follow below.</p>
</header>
<div class="visual-pipeline-container">
<div class="pipeline-step step-split">
<span class="icon">🧩</span>
<span class="label">Shards</span>
</div>
<div class="pipeline-arrow">→</div>
<div class="pipeline-step step-combine">
<span class="icon">✨</span>
<span class="label">Combine</span>
</div>
<div class="pipeline-arrow">→</div>
<div class="pipeline-step step-file">
<span class="icon">📄</span>
<span class="label">File</span>
</div>
</div>
<div class="panel-grid">
<div class="workflow-surface full-width">
<div class="dropzone-area" id="liteShardsDropzone">
<h3>Select Shards to Restore</h3>
<p id="liteShardsHelp" class="muted-copy">Load successor <code>.qcont</code> shards and any detached signatures, signer keys, or timestamp proofs you want checked.</p>
<label for="liteShardsInput" class="visually-hidden">Select shard and verification files</label>
<input type="file" id="liteShardsInput" accept=".qcont,.json,.qsig,.sig,.pqpk,.ots" multiple aria-describedby="liteShardsHelp">
</div>
<div id="shardsStatus" class="shards-status initially-hidden" aria-live="polite">
<span id="shardsStatusText">0 shards selected</span>
</div>
<div id="liteRestorePreflightDecision" class="qv-decision-card initially-hidden" data-testid="lite-restore-preflight"></div>
<details id="liteRestoreArchiveReviewRoot" class="qv-disclosure archive-review-hub technical-details">
<summary>Review loaded archive details</summary>
<div class="archive-review-hub__body">
<section class="archive-review-hub__section">
<h4 class="archive-review-hub__heading">Artifacts</h4>
<div id="liteRestoreArtifactIntake" class="artifact-intake-panel initially-hidden" data-testid="lite-restore-artifact-intake"></div>
</section>
<section class="archive-review-hub__section">
<h4 class="archive-review-hub__heading">Lifecycle</h4>
<div id="liteRestoreArchiveInspector" class="archive-inspector-host initially-hidden" data-testid="lite-restore-archive-inspector"></div>
<div id="liteRestoreSuccessorSelection" class="verification-section successor-selection initially-hidden">
<small id="liteRestoreSuccessorSelectionSummary" class="muted-copy"></small>
<small id="liteRestoreSuccessorSelectionHelp" class="muted-copy"></small>
<div id="liteRestoreStateSelectionGroup" class="form-group initially-hidden">
<label for="liteRestoreStateSelection">Archive and state selection</label>
<select id="liteRestoreStateSelection"></select>
</div>
<div id="liteRestoreCohortSelectionGroup" class="form-group initially-hidden">
<label for="liteRestoreCohortSelection">Same-state cohort selection</label>
<select id="liteRestoreCohortSelection"></select>
</div>
<div id="liteRestoreBundleSelectionGroup" class="form-group initially-hidden">
<label for="liteRestoreBundleSelection">Lifecycle bundle selection</label>
<select id="liteRestoreBundleSelection"></select>
</div>
</div>
</section>
<section class="archive-review-hub__section archive-review-hub__section--muted">
<h4 class="archive-review-hub__heading">Evidence</h4>
<p class="muted-copy archive-review-hub__lede">Detached signatures, signer pins, and OTS proofs are listed under Artifacts. Verification counts appear in Lite restore output after you run restore.</p>
</section>
<section class="archive-review-hub__section">
<h4 class="archive-review-hub__heading">Technical</h4>
<details class="technical-context technical-details">
<summary>Technical context</summary>
<div class="detail-copy">
<small class="muted-copy">Load successor <code>.qcont</code> shards plus any optional <code>.archive-state.json</code>, <code>.lifecycle-bundle.json</code>, detached signatures, <code>.pqpk</code> signer pins, and <code>.ots</code> proofs in the main selector above.</small>
<small class="muted-copy">A supplied <code>.pqpk</code> file counts as a pinned PQ signer key. Restore remains policy-gated and releases recovered outputs only after the selected archive policy is satisfied.</small>
</div>
</details>
<details class="verification-section">
<summary>Signer pins (optional)</summary>
<div class="form-group verification-fields">
<label for="liteRestoreExpectedEdSigner">Expected Ed25519 signer (optional)</label>
<input type="text" id="liteRestoreExpectedEdSigner" placeholder="G...">
</div>
</details>
</section>
</div>
</details>
<div class="action-row button-group">
<button id="liteRestoreBtn" class="button primary" disabled type="button">♻️ Restore Selected Archive</button>
</div>
<div id="liteRestoreInlineError" class="inline-error-panel initially-hidden" data-testid="lite-restore-inline-error"></div>
<div id="liteRestoreResult" class="restore-result-panel initially-hidden"></div>
</div>
</div>
</div>
</section>
<!-- PRO MODE -->
<section id="proMode" class="mode-section" style="display: none;">
<div id="proWorkflowStatusStrip" class="workflow-status-strip" data-testid="pro-workflow-status">
<div class="workflow-status-item">
<span class="workflow-status-label">Workflow</span>
<span id="proWorkflowStatusActive" class="workflow-status-value" data-testid="pro-workflow-active">Create</span>
</div>
<div class="workflow-status-item">
<span class="workflow-status-label">Archive state</span>
<span id="proWorkflowStatusArchive" class="workflow-status-value" data-testid="pro-workflow-archive">No archive selected</span>
</div>
<div class="workflow-status-item">
<span class="workflow-status-label">Policy</span>
<span id="proWorkflowStatusPolicy" class="workflow-status-value" data-testid="pro-workflow-policy">strong-pq-signature</span>
</div>
<div class="workflow-status-item">
<span class="workflow-status-label">Threshold</span>
<span id="proWorkflowStatusThreshold" class="workflow-status-value" data-testid="pro-workflow-threshold">not configured</span>
</div>
<div class="workflow-status-item">
<span class="workflow-status-label">Evidence</span>
<span id="proWorkflowStatusEvidence" class="workflow-status-value" data-testid="pro-workflow-evidence">not loaded</span>
</div>
</div>
<!-- Pro View: Identity -->
<div id="proViewIdentity" class="tab-panel module-panel workflow-panel module-keys active create-workflow-stage" role="tabpanel" aria-labelledby="proTabDistribution">
<header class="section-header">
<h2>Create Archive</h2>
<p class="muted-copy section-step-hint">Generate or load keys, encrypt data, then split the encrypted container into successor shards and archive JSON.</p>
</header>
<div class="panel-grid">
<div class="workflow-card">
<h3>Key Generation</h3>
<p class="muted-copy">Generate a new keypair in memory. Overwrites existing session.</p>
<div class="action-row button-group">
<button id="genKeyBtn" class="button primary" type="button">Generate Keypair</button>
<button id="advancedEntropyBtn" class="button secondary" type="button" data-testid="advanced-entropy-btn">Collect supplemental entropy (optional)</button>
</div>
<div id="entropyStatus" class="entropy-status initially-hidden" data-testid="entropy-status" aria-live="polite">
<span id="entropyText" data-testid="entropy-text">Collecting entropy...</span>
<div class="progress-bar-bg"><div id="entropyBar" class="progress-bar-fill"></div></div>
<small id="entropyHeuristicNote" class="muted-copy entropy-heuristic-note initially-hidden" data-testid="entropy-heuristic-note">
Heuristic collection progress only. This is not a measured cryptographic guarantee. The browser CSPRNG remains the baseline for key generation.
</small>
<small class="muted-copy">Privacy-preserving, local-only capture of mouse/keyboard timing and window changes. Optional supplemental mixing — not required for secure keys.</small>
</div>
</div>
<div class="workflow-card">
<h3>Active Session</h3>
<div class="form-group">
<label for="privKeyInput">Private Key (.qkey) <span class="info" title="ML-KEM secret key (3168 bytes), required for decryption and shard splitting.">ℹ</span></label>
<input type="file" id="privKeyInput" accept=".qkey" aria-describedby="privKeyInputHelp">
<small id="privKeyInputHelp" class="muted-copy">Select an ML-KEM private <code>.qkey</code> only for local decryption or split operations.</small>
</div>
<div class="form-group">
<label for="pubKeyInput">Public Key (.qkey) <span class="info" title="ML-KEM public key (1568 bytes), required for encryption.">ℹ</span></label>
<input type="file" id="pubKeyInput" accept=".qkey" aria-describedby="pubKeyInputHelp">
<small id="pubKeyInputHelp" class="muted-copy">Select an ML-KEM public <code>.qkey</code> for encryption targets.</small>
</div>
</div>
</div>
</div>
<!-- Pro View: Encryption -->
<div id="proViewEncryption" class="tab-panel module-panel workflow-panel module-sign create-workflow-stage" role="tabpanel" aria-labelledby="proTabDistribution">
<header class="section-header">
<h2>Encryption</h2>
<p class="muted-copy section-step-hint">Encrypt to <code>.qenc</code> with a loaded public key, or decrypt locally with a loaded private key.</p>
</header>
<div class="panel-grid">
<div class="workflow-surface full-width">
<h3>File Operations</h3>
<div class="form-group">
<label for="dataFileInput">Input Files</label>
<input type="file" id="dataFileInput" multiple aria-describedby="dataFileInputHelp">
<small id="dataFileInputHelp" class="muted-copy">Select plaintext files to encrypt, or an encrypted container to decrypt when a private key is loaded.</small>
<div id="proFilesList" class="files-list initially-hidden"></div>
</div>
<div id="proEncStrategyGroup" class="strategy-group initially-hidden">
<span class="strategy-title">Container strategy</span>
<label class="radio-inline">
<input type="radio" id="proEncStrategyPack" name="proEncStrategy" value="pack" checked>
Pack files into one container
</label>
<label class="radio-inline">
<input type="radio" id="proEncStrategyPerFile" name="proEncStrategy" value="per-file">
One container per file
</label>
</div>
<div id="proEncryptionWarning" class="operation-warning">
<small>Load keys in Key Management: public key for encryption and private key for decryption.</small>
</div>
<div class="action-row button-group">
<button id="encBtn" class="button primary" type="button">Encrypt (.qenc)</button>
<button id="decBtn" class="button secondary" type="button">Decrypt</button>
</div>
</div>
</div>
</div>
<!-- Pro View: Distribution -->
<div id="proViewDistribution" class="tab-panel module-panel workflow-panel module-verify create-workflow-stage" role="tabpanel" aria-labelledby="proTabDistribution">
<header class="section-header">
<h2>Split Into Successor Shards</h2>
<p class="muted-copy section-step-hint">Load a <code>.qenc</code> and matching private key to export successor shards and archive JSON.</p>
</header>
<div class="panel-grid">
<div class="workflow-surface full-width">
<h3>Split Configuration</h3>
<p class="muted-copy operation-hint">Load the encrypted container and matching private key, then choose shard geometry and restore policy.</p>
<div class="operation-input-panel input-group">
<div class="split-grid">
<div class="form-group">
<label for="qencForQcontInput">Encrypted container (.qenc)</label>
<input type="file" id="qencForQcontInput" accept=".qenc" aria-describedby="qencForQcontHelp">
<small id="qencForQcontHelp" class="muted-copy">Select the encrypted container that will be converted into successor shards.</small>
</div>
<div class="form-group">
<label for="privKeyForQcontInput">Private Key (.qkey)</label>
<input type="file" id="privKeyForQcontInput" accept=".qkey" aria-describedby="privKeyForQcontHelp">
<small id="privKeyForQcontHelp" class="muted-copy">Select the 3168 B private <code>.qkey</code> needed to unwrap the encrypted container locally.</small>
</div>
</div>
</div>
<div class="shard-geometry-panel">
<h4 class="shard-geometry-heading">Shard geometry (n, k)</h4>
<div class="rs-controls">
<div class="form-group">
<label for="rsN">Total shards (n)</label>
<input type="number" id="rsN" value="5" min="5">
</div>
<div class="form-group">
<label for="rsK">Data shards (k)</label>
<input type="number" id="rsK" value="3" min="2">
</div>
</div>
<div class="rs-info-box">
<small id="rsText" class="mono-box rs-summary">Params info...</small>
<div id="rsConstraints" class="rs-constraints">
<div id="rsRuleN" class="constraint-item">n >= 5</div>
<div id="rsRuleRange" class="constraint-item">2 <= k < n</div>
<div id="rsRuleEven" class="constraint-item">(n - k) must be even</div>
</div>
</div>
<div id="rsViz" class="rs-viz-bar">
<div class="rs-bar">
<span class="rs-seg data" id="rsSegData"><span class="seg-label" id="rsDataLabel"></span></span>
<span class="rs-seg parity" id="rsSegParity"><span class="seg-label" id="rsParityLabel"></span></span>
<span class="rs-marker" id="rsMarker"></span>
<span class="rs-marker-label" id="rsMarkerLabel"></span>
</div>
<div class="rs-ticks" id="rsTicks"></div>
<div class="rs-legend">
<span class="swatch data"></span> Data k
<span class="swatch parity"></span> Parity m
<span class="swatch marker"></span> Threshold t
</div>
<details class="tip mt-2">
<summary>Configuration Tips</summary>
<div class="muted-copy mt-1">
More availability = reduce k or t;<br />
More confidentiality = increase m.<br />
If someone controls t shards they can decrypt; with fewer than t shards they cannot.<br />
m — in the context of RS is the number of redundant parity shards.<br />
t — in the context of SSS, this is the threshold: the minimum number of Shamir shards required to recover the secret.<br />
</div>
</details>
</div>
</div>
<div class="form-group mt-2">
<label for="proAuthPolicy">Archive authenticity policy</label>
<select id="proAuthPolicy">
<option value="integrity-only">Integrity only (inauthentic)</option>
<option value="any-signature">Any signature required</option>
<option value="strong-pq-signature" selected>Strong PQ signature required</option>
</select>
<small class="muted-copy">Choose whether restore should require detached archive approval.</small>
<div id="proAuthPolicyConsequence" class="policy-consequence-panel strict" data-testid="pro-policy-consequence" aria-live="polite"></div>
<details class="technical-context technical-details mt-2">
<summary>Technical context</summary>
<div class="detail-copy">
<small class="muted-copy">Split exports successor <code>QVqcont-7</code> shards plus <code>.archive-state.json</code>, <code>.cohort-binding.json</code>, and <code>.lifecycle-bundle.json</code>.</small>
<small id="proAuthPolicyHelp" class="muted-copy">Without an external detached archive-approval signature over the archive-state descriptor, restore will block before the file is decrypted.</small>
<small class="muted-copy">Archive approval stays detached from shard creation: sign the exported <code>.archive-state.json</code> later, then use Attach to merge detached evidence into the lifecycle bundle without changing archive-state bytes.</small>
</div>
</details>
</div>
<div id="proSplitReadiness" class="operation-readiness split-readiness" data-testid="split-readiness" aria-live="polite"></div>
<div class="action-row button-group">
<button id="buildQcontBtn" class="button primary" disabled type="button">Build Successor Shards</button>
</div>
<div id="proSplitInlineError" class="inline-error-panel initially-hidden" data-testid="split-inline-error"></div>
</div>
</div>
</div>
<div id="proViewReview" class="tab-panel module-panel workflow-panel module-verify" role="tabpanel" aria-labelledby="proTabReview">
<header class="section-header">
<h2>Review Artifacts</h2>
<p class="muted-copy section-step-hint">Classify and inspect selected archive artifacts before maintenance or restore. Restore eligibility is evaluated only in Restore.</p>
</header>
<div class="panel-grid">
<div class="workflow-surface full-width">
<h3>Artifact Intake</h3>
<div class="operation-input-panel input-group">
<div class="form-group">
<label for="proReviewInput">Review inputs</label>
<input type="file" id="proReviewInput" accept=".qcont,.json,.qsig,.sig,.pqpk,.ots" multiple data-testid="review-input" aria-describedby="reviewInputHint">
</div>
<p id="reviewInputHint" class="muted-copy operation-hint">Load successor shards, archive-state descriptors, lifecycle bundles, detached signatures, signer pins, and timestamp evidence to inspect classification. This does not verify restore eligibility.</p>
</div>
<div id="proReviewStatus" class="shards-status initially-hidden" data-testid="review-status" aria-live="polite">
<span id="proReviewStatusText" data-testid="review-status-text">0 review files selected</span>
</div>
<details id="reviewArchiveReviewRoot" class="qv-disclosure archive-review-hub technical-details">
<summary>Review loaded archive details</summary>
<div class="archive-review-hub__body">
<section class="archive-review-hub__section">
<h4 class="archive-review-hub__heading">Artifacts</h4>
<div id="reviewArtifactIntake" class="artifact-intake-panel initially-hidden" data-testid="review-artifact-intake"></div>
</section>
<section class="archive-review-hub__section">
<h4 class="archive-review-hub__heading">Lifecycle</h4>
<div id="reviewArchiveInspector" class="archive-inspector-host initially-hidden" data-testid="review-archive-inspector"></div>
</section>
<section class="archive-review-hub__section archive-review-hub__section--muted">
<h4 class="archive-review-hub__heading">Evidence</h4>
<div class="qv-callout qv-callout--info operation-warning warning-callout">
<p class="qv-callout__body"><small>Review is an inspector. Restore remains the policy gate for plaintext release, and Attach remains the evidence merge workflow.</small></p>
</div>
</section>
</div>
</details>
</div>
</div>
</div>
<div id="proViewAttach" class="tab-panel module-panel workflow-panel module-verify" role="tabpanel" aria-labelledby="proTabAttach">
<header class="section-header">
<h2>Maintain Evidence</h2>
<p class="muted-copy section-step-hint">Merge archive approval, maintenance, source evidence, signer pins, or OTS artifacts without changing archive-state bytes or archive-policy semantics.</p>
</header>
<div class="panel-grid">
<div class="workflow-surface full-width">
<h3>Merge Lifecycle Evidence</h3>
<div class="operation-input-panel input-group">
<div class="form-group">
<label for="attachEvidenceChannel">Evidence channel</label>
<select id="attachEvidenceChannel" data-testid="attach-channel">
<option value="archive-approval" selected>Archive approval</option>
<option value="maintenance">Maintenance signature</option>
<option value="source-evidence">Source evidence</option>
</select>
</div>
<p id="attachChannelHelp" class="muted-copy operation-hint" data-testid="attach-channel-help">Archive approval attaches detached signatures over the canonical archive-state descriptor. Maintenance and source-evidence remain separate evidence channels and never satisfy archive policy on their own.</p>
<div class="form-group">
<label for="qcontAttachInput">Attach inputs</label>
<input type="file" id="qcontAttachInput" accept=".qcont,.json,.qsig,.sig,.pqpk,.ots" multiple data-testid="attach-input" aria-describedby="attachInputHint">
</div>
<p id="attachInputHint" class="muted-copy operation-hint">Load one archive cohort plus any detached signatures, signer pins, timestamps, and channel-specific JSON artifacts you want to merge. Signing remains external.</p>
</div>
<details id="sourceEvidenceBuilderSection" class="verification-section initially-hidden">
<summary>Source-evidence builder for external signing</summary>
<div class="form-group verification-fields">
<div class="split-grid">
<div class="form-group">
<label for="sourceEvidenceRelationType">Relation type</label>
<select id="sourceEvidenceRelationType" data-testid="source-evidence-relation-type">
<option value="reviewed-source" selected>reviewed-source</option>
<option value="precursor-object">precursor-object</option>
</select>
</div>
<div class="form-group">
<label for="sourceEvidenceObjectType">Source object type</label>
<input type="text" id="sourceEvidenceObjectType" value="archive-state-descriptor" placeholder="archive-state-descriptor" data-testid="source-evidence-object-type">
</div>
</div>
<div class="form-group">
<label>Source digests</label>
<div class="qv-callout qv-callout--info source-evidence-digests-callout" role="note">
<p class="qv-callout__title">What you are binding</p>
<p class="qv-callout__body muted-copy">
Each digest is a cryptographic fingerprint of the <strong>exact byte contents</strong> of the source object you name in <strong>Source object type</strong> (for example the canonical <code>*.archive-state.json</code> file, not a display name or filesystem path).
Use <strong>Apply one file to all rows</strong> when the same file should be hashed once per row algorithm (typical for one canonical artifact, multiple digest algorithms). You still choose relation type and source object type deliberately. Optional media type is never inferred from filenames.
</p>
</div>
<div id="sourceEvidenceDigestRows" class="verification-fields" data-testid="source-evidence-digests"></div>
<div class="action-row button-group source-evidence-digest-actions">
<button id="addSourceEvidenceDigestBtn" class="button secondary small" type="button" data-testid="source-evidence-add-digest">Add Digest</button>
<button id="sourceEvidenceApplyFileToDigestsBtn" class="button secondary small" type="button" data-testid="source-evidence-apply-file-all">Apply one file to all rows</button>
<input type="file" id="sourceEvidenceApplyFileInput" class="visually-hidden" tabindex="-1" aria-label="File whose bytes populate every digest row" data-testid="source-evidence-apply-file-input">
</div>
</div>
<div class="form-group">
<label for="sourceEvidenceExternalRefs">External source-signature refs (optional)</label>
<textarea id="sourceEvidenceExternalRefs" rows="2" placeholder="One ref per line, for example: sig:external-review-1" data-testid="source-evidence-external-refs"></textarea>
</div>
<div class="form-group">
<label class="checkbox-row" for="sourceEvidenceMediaTypeOptIn">
<input type="checkbox" id="sourceEvidenceMediaTypeOptIn" data-testid="source-evidence-media-opt-in">
<span>Include optional media type</span>
</label>
<small id="sourceEvidencePrivacyWarning" class="muted-copy">Optional descriptive fields are not privacy-preserving. Keep them empty unless you intend to disclose that metadata.</small>
</div>
<div id="sourceEvidenceMediaTypeGroup" class="form-group initially-hidden">
<label for="sourceEvidenceMediaType">Media type</label>
<input type="text" id="sourceEvidenceMediaType" placeholder="application/json" data-testid="source-evidence-media-type">
</div>
<div id="sourceEvidenceExportPreview" class="mono-box source-evidence-export-preview initially-hidden" data-testid="source-evidence-export-preview" aria-live="polite"></div>
<div id="sourceEvidenceExportError" class="inline-error-panel initially-hidden" data-testid="source-evidence-export-error" role="alert"></div>
<div class="action-row button-group">
<button id="exportSourceEvidenceBtn" class="button secondary" type="button" data-testid="source-evidence-export">Export Canonical Source-Evidence JSON</button>
</div>
<small id="sourceEvidenceExportHint" class="muted-copy">Export the canonical JSON here, sign it with an external tool, then re-import that <code>.json</code> plus the detached signature through this Attach surface.</small>
</div>
</details>
<div class="operation-readiness">
<div id="attachPlanDecision" class="initially-hidden" data-testid="attach-plan-decision" aria-live="polite"></div>
<div id="attachStatus" class="shards-status initially-hidden" data-testid="attach-status" aria-live="polite">
<span id="attachStatusText" data-testid="attach-status-text">0 attach files selected</span>
<small id="attachStatusHint" class="muted-copy"></small>
</div>
<div id="attachPartialRewriteAckPanel" class="qv-callout qv-callout--warning operation-warning warning-callout partial-rewrite-ack initially-hidden" data-testid="attach-partial-ack-panel">
<label class="checkbox-row" for="attachPartialRewriteAck">
<input type="checkbox" id="attachPartialRewriteAck" data-testid="attach-partial-ack">
<span>I understand only the selected shard files will be rewritten.</span>
</label>
<small class="muted-copy">The updated lifecycle bundle will still be exported. Any unselected shards from the same cohort may continue carrying older embedded lifecycle-bundle bytes.</small>
</div>
<details id="attachArchiveReviewRoot" class="qv-disclosure archive-review-hub technical-details">
<summary>Review loaded attach evidence</summary>
<div class="archive-review-hub__body">
<section class="archive-review-hub__section">
<h4 class="archive-review-hub__heading">Artifacts</h4>
<div id="attachArtifactIntake" class="artifact-intake-panel initially-hidden" data-testid="attach-artifact-intake"></div>
</section>
<section class="archive-review-hub__section">
<h4 class="archive-review-hub__heading">Lifecycle</h4>
<div id="attachArchiveInspector" class="archive-inspector-host initially-hidden" data-testid="attach-archive-inspector"></div>
</section>
<section class="archive-review-hub__section archive-review-hub__section--muted">
<h4 class="archive-review-hub__heading">Evidence</h4>
<p class="muted-copy archive-review-hub__lede">The Attach plan card states the operational target, policy role, and shard scope. Full binding references and digest lines are under Technical. A verification matrix appears in Attach result after a successful merge.</p>
</section>
<section class="archive-review-hub__section">
<h4 class="archive-review-hub__heading">Technical</h4>
<pre id="attachTargetBindingPreview" class="mono-box attach-target-binding-preview initially-hidden" data-testid="attach-target-binding-preview" aria-live="polite"></pre>
<details class="technical-context technical-details">
<summary>Technical context</summary>
<div class="detail-copy">
<small class="muted-copy">Successor attach can update only the lifecycle bundle or also re-embed that bundle into the selected shard files, depending on what you load.</small>
<small class="muted-copy">Load successor <code>.qcont</code> shards, optional <code>.archive-state.json</code> or <code>.lifecycle-bundle.json</code> files, detached signatures, <code>.pqpk</code> signer pins, <code>.ots</code> proofs, and when needed a canonical <code>.transition-record.json</code> or <code>.source-evidence.json</code> artifact. Attach never changes the signable archive-state bytes.</small>
<small class="muted-copy">All signing remains external to this browser UI. This UI does not generate signing keys and it does not collapse maintenance or source-evidence into archive approval.</small>
</div>
</details>
<details class="verification-section">
<summary>Signer pin (optional)</summary>
<div class="form-group verification-fields">
<label for="attachExpectedEdSigner">Expected Ed25519 signer (optional)</label>
<input type="text" id="attachExpectedEdSigner" placeholder="G...">
</div>
</details>
</section>
</div>
</details>
</div>
<div class="action-row button-group">
<button id="attachQcontBtn" class="button primary" type="button" disabled data-testid="attach-button">Attach Selected Evidence</button>
<button id="exportSignableArtifactBtn" class="button secondary" type="button" disabled>Export Archive-State Descriptor</button>
<button id="exportAttachedArtifactsBtn" class="button secondary" type="button" disabled>Export Attached Bundle Files</button>
</div>
<div id="attachInlineError" class="inline-error-panel initially-hidden" data-testid="attach-inline-error"></div>
<div id="attachResult" class="restore-result-panel initially-hidden" data-testid="attach-result"></div>
</div>
</div>
</div>
<div id="proViewReshare" class="tab-panel module-panel workflow-panel module-verify" role="tabpanel" aria-labelledby="proTabReshare">
<header class="section-header">
<h2>Evolve Successor Cohort</h2>
<p class="muted-copy section-step-hint">Rotate a successor cohort while preserving the archive-state approval target.</p>
</header>
<div class="panel-grid">
<div class="workflow-surface full-width">
<h3>Emit a New Successor Cohort</h3>
<div class="operation-input-panel input-group">
<div class="form-group">
<label for="qcontReshareInput">Reshare inputs</label>
<input type="file" id="qcontReshareInput" accept=".qcont,.json" multiple data-testid="reshare-input" aria-describedby="reshareInputHint">
</div>
<p id="reshareInputHint" class="muted-copy operation-hint">Load one successor cohort and any explicit lifecycle bundle you want to use for disambiguation, then emit a new cohort.</p>
</div>
<div id="resharePlanDecision" class="initially-hidden" data-testid="reshare-plan-decision" aria-live="polite"></div>
<div id="proReshareStatus" class="shards-status initially-hidden" aria-live="polite">
<span id="proReshareStatusText">0 shards selected</span>
</div>
<details id="reshareArchiveReviewRoot" class="qv-disclosure archive-review-hub technical-details">
<summary>Review loaded reshare evidence</summary>
<div class="archive-review-hub__body">
<section class="archive-review-hub__section">
<h4 class="archive-review-hub__heading">Artifacts</h4>
<div id="reshareArtifactIntake" class="artifact-intake-panel initially-hidden" data-testid="reshare-artifact-intake"></div>
</section>
<section class="archive-review-hub__section">
<h4 class="archive-review-hub__heading">Lifecycle</h4>
<div id="reshareArchiveInspector" class="archive-inspector-host initially-hidden" data-testid="reshare-archive-inspector"></div>
<div id="reshareSuccessorSelection" class="verification-section successor-selection initially-hidden">
<small id="reshareSuccessorSelectionSummary" class="muted-copy"></small>
<small id="reshareSuccessorSelectionHelp" class="muted-copy"></small>
<div id="reshareStateSelectionGroup" class="form-group initially-hidden">
<label for="reshareStateSelection">Archive and state selection</label>
<select id="reshareStateSelection"></select>
</div>
<div id="reshareCohortSelectionGroup" class="form-group initially-hidden">
<label for="reshareCohortSelection">Predecessor cohort selection</label>
<select id="reshareCohortSelection"></select>
</div>
<div id="reshareBundleSelectionGroup" class="form-group initially-hidden">
<label for="reshareBundleSelection">Lifecycle bundle selection</label>
<select id="reshareBundleSelection"></select>
</div>
</div>
</section>
<section class="archive-review-hub__section archive-review-hub__section--muted">
<h4 class="archive-review-hub__heading">Evidence</h4>
<p class="muted-copy archive-review-hub__lede">The Reshare plan card summarizes counts by channel. Verification details appear after you emit a cohort.</p>
</section>
<section class="archive-review-hub__section">
<h4 class="archive-review-hub__heading">Technical</h4>
<details class="technical-context technical-details">
<summary>Technical context</summary>
<div class="detail-copy">
<small class="muted-copy">Same-state resharing is maintenance, not archive re-approval. It keeps the archive-state approval target unchanged and emits a new cohort plus a transition record.</small>
<small class="muted-copy">This tool emits maintenance artifacts only. It does not create legacy material and it does not run full archive-policy evaluation like Restore.</small>
<small class="muted-copy">An uploaded <code>.lifecycle-bundle.json</code> can explicitly choose one embedded lifecycle-bundle digest when needed.</small>
</div>
</details>
<details class="verification-section">
<summary>Operator context (optional)</summary>
<div class="form-group verification-fields">
<label for="reshareExpectedEdSigner">Expected Ed25519 signer (optional)</label>
<input type="text" id="reshareExpectedEdSigner" placeholder="G...">
</div>
</details>
</section>
</div>
</details>
<div class="shard-geometry-panel">
<h4 class="shard-geometry-heading">Shard geometry (successor cohort)</h4>
<p class="muted-copy field-hint">Same RS/SSS rules as Split. These values define the new cohort you are emitting.</p>
<div class="rs-controls">
<div class="form-group">
<label for="reshareN">Total shards (n)</label>
<input type="number" id="reshareN" value="5" min="5">
</div>
<div class="form-group">
<label for="reshareK">Data shards (k)</label>
<input type="number" id="reshareK" value="3" min="2">
</div>
</div>
<div class="rs-info-box">
<small id="reshareRsText" class="mono-box rs-summary">Params info...</small>
<div id="reshareRsConstraints" class="rs-constraints">
<div id="reshareRuleN" class="constraint-item">n >= 5</div>
<div id="reshareRuleRange" class="constraint-item">2 <= k < n</div>
<div id="reshareRuleEven" class="constraint-item">(n - k) must be even</div>
</div>
</div>
<div id="reshareRsViz" class="rs-viz-bar">
<div class="rs-bar">
<span class="rs-seg data" id="reshareSegData"><span class="seg-label" id="reshareDataLabel"></span></span>
<span class="rs-seg parity" id="reshareSegParity"><span class="seg-label" id="reshareParityLabel"></span></span>
<span class="rs-marker" id="reshareMarker"></span>
<span class="rs-marker-label" id="reshareMarkerLabel"></span>
</div>
<div class="rs-ticks" id="reshareRsTicks"></div>
<div class="rs-legend">
<span class="swatch data"></span> Data k
<span class="swatch parity"></span> Parity m
<span class="swatch marker"></span> Threshold t
</div>
</div>
</div>
<div class="verification-section">
<h4 class="shard-geometry-heading transition-meta-heading">Transition metadata</h4>
<p class="muted-copy field-hint">Record the maintenance context that will be written into the emitted transition record.</p>
<div class="form-group verification-fields">
<div class="split-grid">
<div class="form-group">
<label for="reshareReasonCode">Transition reason</label>
<input type="text" id="reshareReasonCode" value="cohort-rotation">
</div>
<div class="form-group">
<label for="reshareOperatorRole">Operator role</label>
<input type="text" id="reshareOperatorRole" value="operator">
</div>
</div>
<div class="form-group">
<label for="reshareNotes">Transition notes</label>
<textarea id="reshareNotes" rows="3" placeholder="Optional maintenance note for the transition record"></textarea>
</div>
</div>
</div>
<div class="action-row button-group">
<button id="reshareQcontBtn" class="button primary" disabled type="button" data-testid="reshare-button">Emit Successor Cohort</button>
</div>
<div id="reshareExportActions" class="action-row button-group initially-hidden">
<button id="exportReshareTransitionRecordBtn" class="button secondary" type="button" data-testid="reshare-export-transition-record">Export Transition Record</button>
<button id="exportReshareLifecycleBundleBtn" class="button secondary" type="button">Export Lifecycle Bundle</button>
</div>
<div id="proReshareResult" class="restore-result-panel initially-hidden" data-testid="reshare-result"></div>
</div>
</div>
</div>
<!-- Pro View: Restore -->
<div id="proViewRestore" class="tab-panel module-panel workflow-panel module-verify" role="tabpanel" aria-labelledby="proTabRestore">
<header class="section-header">
<h2>Restore</h2>
<p class="muted-copy section-step-hint">Step 4: read the restore decision first, then load shards and evidence; recover when policy is satisfied.</p>
</header>
<div class="panel-grid">
<div class="workflow-surface full-width">
<h3>Restore Archive</h3>
<div class="operation-input-panel input-group">
<div class="form-group">
<label for="qcontShardsInput">Restore inputs</label>
<input type="file" id="qcontShardsInput" accept=".qcont,.json,.qsig,.sig,.pqpk,.ots" multiple data-testid="restore-input" aria-describedby="restoreInputHint">
</div>
<p id="restoreInputHint" class="muted-copy operation-hint">Load shards and any detached verification artifacts you want checked before recovery.</p>
</div>
<div id="proShardsStatus" class="shards-status initially-hidden" data-testid="restore-status" aria-live="polite">
<span id="proShardsStatusText" data-testid="restore-status-text">0 shards selected</span>
</div>
<div id="restorePreflightDecision" class="qv-decision-card initially-hidden" data-testid="restore-preflight"></div>
<details id="restoreArchiveReviewRoot" class="qv-disclosure archive-review-hub technical-details">
<summary>Review loaded archive details</summary>
<div class="archive-review-hub__body">
<section class="archive-review-hub__section">
<h4 class="archive-review-hub__heading">Artifacts</h4>
<div id="restoreArtifactIntake" class="artifact-intake-panel initially-hidden" data-testid="restore-artifact-intake"></div>
</section>
<section class="archive-review-hub__section">
<h4 class="archive-review-hub__heading">Lifecycle</h4>
<div id="restoreArchiveInspector" class="archive-inspector-host initially-hidden" data-testid="restore-archive-inspector"></div>
<div id="restoreSuccessorSelection" class="verification-section successor-selection initially-hidden" data-testid="restore-selection">
<small id="restoreSuccessorSelectionSummary" class="muted-copy" data-testid="restore-selection-summary"></small>
<small id="restoreSuccessorSelectionHelp" class="muted-copy" data-testid="restore-selection-help"></small>
<div id="restoreStateSelectionGroup" class="form-group initially-hidden" data-testid="restore-state-selection-group">
<label for="restoreStateSelection">Archive and state selection</label>
<select id="restoreStateSelection" data-testid="restore-state-selection"></select>
</div>
<div id="restoreCohortSelectionGroup" class="form-group initially-hidden" data-testid="restore-cohort-selection-group">
<label for="restoreCohortSelection">Same-state cohort selection</label>
<select id="restoreCohortSelection" data-testid="restore-cohort-selection"></select>
</div>
<div id="restoreBundleSelectionGroup" class="form-group initially-hidden" data-testid="restore-bundle-selection-group">
<label for="restoreBundleSelection">Lifecycle bundle selection</label>
<select id="restoreBundleSelection" data-testid="restore-bundle-selection"></select>
</div>
</div>
</section>
<section class="archive-review-hub__section archive-review-hub__section--muted">
<h4 class="archive-review-hub__heading">Evidence</h4>
<p class="muted-copy archive-review-hub__lede">Detached signatures, signer pins, and OTS proofs are classified under Artifacts. The verification matrix appears in Restore result after Evaluate Restore.</p>
</section>
<section class="archive-review-hub__section">
<h4 class="archive-review-hub__heading">Technical</h4>
<details class="technical-context technical-details">
<summary>Technical context</summary>
<div class="detail-copy">
<small class="muted-copy">Successor restore is the regular-user path. Load successor <code>.qcont</code> shards plus any optional <code>.archive-state.json</code>, <code>.lifecycle-bundle.json</code>, detached signatures, <code>.pqpk</code> signer pins, and <code>.ots</code> proofs in the main selector above.</small>
<small class="muted-copy">A supplied <code>.pqpk</code> file counts as a pinned PQ signer key. Restore remains policy-gated and detached archive approval stays separate from maintenance, source-evidence, and OTS reporting.</small>
</div>
</details>
<details class="verification-section">
<summary>Signer pins (optional)</summary>
<div class="form-group verification-fields">
<label for="restoreExpectedEdSigner">Expected Ed25519 signer (optional)</label>
<input type="text" id="restoreExpectedEdSigner" placeholder="G..." data-testid="restore-expected-ed-signer">
</div>
</details>
</section>
</div>
</details>
<div class="action-row button-group">
<button id="restoreQcontBtn" class="button primary" disabled type="button" data-testid="restore-button">Evaluate Restore</button>
<button id="releaseRestoredFilesBtn" class="button secondary initially-hidden" disabled type="button" data-testid="release-button">Release Recovered Files</button>
</div>
<div id="proRestoreInlineError" class="inline-error-panel initially-hidden" data-testid="restore-inline-error"></div>
<div id="proRestoreResult" class="restore-result-panel initially-hidden" data-testid="restore-result"></div>
</div>
</div>
</div>
</section>
<footer class="app-footer" style="margin-top: 2rem;">
<div class="log-container" id="logContainer">
<div class="log-header">
<h3>Operations Log</h3>
<button id="logToggleBtn" class="button secondary small" type="button">Show Log</button>
</div>
<pre id="log" class="log-box" data-testid="operations-log"></pre>
</div>
</footer>
</main>
</div>
<!-- SRI is applied to the shipped executable scripts. The app does not ship an
import map, and source maps remain non-executable debug artifacts. This time
keeps stylesheet integrity out of the HTML and relies on BUILD.manifest.json
as the operator-visible integrity source for non-script assets. -->
<script src="%BASE_PATH%third-party/erasure.js"
integrity="%ERASURE_JS_SRI%"></script>
<script type="module"
src="%BASE_PATH%assets/main.js"
integrity="%MAIN_JS_SRI%"></script>
</body>
</html>