@le-space/build-journey 0.0.0-stage → 0.12.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1077 @@
1
+ <script>
2
+ // The build of a sealed image as an event of its own: a full-screen view
3
+ // with its stations, the small steps of the current one with their LEDs,
4
+ // the picture of what flows where, the evidence with links to check it,
5
+ // the time left and when it ends. It can shrink to a slim bar. While it
6
+ // runs the screen stays on (Wake Lock), leaving the page asks first, and
7
+ // the tab's title carries the progress. At the end: the finale; when it
8
+ // stopped: where, and the reason the app hands in. Everything shown is
9
+ // what the build reported (model.mjs withFacts); nothing is interpreted.
10
+ //
11
+ // Each app keeps its own words: `text(key, vars)` answers every text (the
12
+ // keys are listed in the README), so an app's catalogue stays the one
13
+ // place for them.
14
+ import { onDestroy } from 'svelte';
15
+ import {
16
+ BUILD_STATIONS,
17
+ HARDWARE,
18
+ LINKS,
19
+ PLACES,
20
+ evidence,
21
+ fetchPercent,
22
+ fetchRate,
23
+ flowNow,
24
+ journey,
25
+ minutes,
26
+ onPath,
27
+ pathOf,
28
+ reported,
29
+ short,
30
+ substeps
31
+ } from './model.mjs';
32
+
33
+ /**
34
+ * @type {{
35
+ * view: { station: string, since: number, done: boolean, failed: boolean, minimized?: boolean, facts?: import('./model.mjs').Facts, fetchPct?: number | null },
36
+ * text: (key: string, vars?: Record<string, string | number>) => string,
37
+ * stations?: import('./model.mjs').Station[],
38
+ * locale?: string,
39
+ * builder?: import('./model.mjs').BuilderPin,
40
+ * links?: import('./model.mjs').EvidenceLinks,
41
+ * hardware?: readonly { key: string, href: string }[] | null,
42
+ * places?: Record<string, readonly number[]>,
43
+ * lines?: readonly (readonly string[])[],
44
+ * reason?: string | null,
45
+ * hint?: string | null,
46
+ * uploadHosts?: number | null,
47
+ * simple?: boolean,
48
+ * finaleEvidence?: boolean,
49
+ * wakeLock?: boolean,
50
+ * miniAt?: 'top' | 'bottom',
51
+ * openHref?: string | null,
52
+ * testid?: string,
53
+ * cover?: import('svelte').Snippet,
54
+ * onminimize?: () => void,
55
+ * onexpand?: () => void,
56
+ * onclose?: () => void,
57
+ * oncertificate?: (() => void) | null
58
+ * }}
59
+ */
60
+ let {
61
+ view,
62
+ text,
63
+ stations: all = BUILD_STATIONS,
64
+ locale = undefined,
65
+ builder = null,
66
+ links = {},
67
+ hardware = HARDWARE,
68
+ places = PLACES,
69
+ lines = LINKS,
70
+ reason = null,
71
+ hint = null,
72
+ uploadHosts = null,
73
+ simple = false,
74
+ finaleEvidence = true,
75
+ wakeLock = true,
76
+ miniAt = 'bottom',
77
+ openHref = null,
78
+ testid = 'build-journey',
79
+ cover = undefined,
80
+ onminimize = () => {},
81
+ onexpand = () => {},
82
+ onclose = () => {},
83
+ oncertificate = null
84
+ } = $props();
85
+
86
+ let now = $state(Date.now());
87
+ const tick = setInterval(() => (now = Date.now()), 1000);
88
+ onDestroy(() => clearInterval(tick));
89
+
90
+ const facts = $derived(view.facts ?? {});
91
+ const fetchPct = $derived(view.fetchPct ?? null);
92
+ const j = $derived(
93
+ journey({ stations: all, station: view.station, since: view.since, now, facts, fetchPct, done: view.done })
94
+ );
95
+ const pct = $derived(Math.round(j.share * 100));
96
+ const running = $derived(!view.done && !view.failed);
97
+ const current = $derived(all[Math.min(j.index, all.length - 1)]?.key ?? view.station);
98
+ const shown = $derived(
99
+ all.map((s, i) => ({
100
+ key: s.key,
101
+ n: i + 1,
102
+ done: view.done || i < j.index,
103
+ active: !view.done && i === j.index
104
+ }))
105
+ );
106
+ const steps = $derived(substeps({ stations: all, station: current, facts, done: view.done }));
107
+ const flow = $derived(flowNow({ stations: all, station: current, facts, fetchPct }));
108
+ const fetched = $derived(current === 'fetch' ? (fetchPercent(facts) ?? fetchPct) : null);
109
+ const rate = $derived(fetchRate(facts, now));
110
+ const ends = $derived(new Date(j.ends).toLocaleTimeString(locale, { hour: '2-digit', minute: '2-digit' }));
111
+ const proofs = $derived(evidence(facts, builder, links));
112
+ const hasReport = $derived(reported(proofs).length > 0);
113
+ // An app without these words (an empty text) shows nothing in their place.
114
+ const noneText = $derived(running ? text('evidenceNone') : text('evidenceNoneStopped'));
115
+ const mib = (/** @type {number} */ b) => Math.round(b / 1048576);
116
+ const st = (/** @type {string} */ key, /** @type {string} */ part) => text(`stations.${key}.${part}`);
117
+
118
+ /** What a small step adds: connections confirmed, bytes and speed, the upload's host and try. @param {string} key */
119
+ const extra = (key) => {
120
+ if (key === 'lanes' && facts.attested) return text('attested', { count: facts.attested });
121
+ if (key === 'bytes' && facts.size) {
122
+ const amount = text('mib', { got: mib(facts.got ?? 0), size: mib(facts.size) });
123
+ return rate
124
+ ? `${amount} · ${text('rate', { rate: rate.toLocaleString(locale, { maximumFractionDigits: 1 }) })}`
125
+ : amount;
126
+ }
127
+ if (key === 'upload' && facts.host && current === 'store') {
128
+ const host = String(facts.host).replace(/^https?:\/\//, '').replace(/\/$/, '');
129
+ const tries = facts.attempt ?? 1;
130
+ return tries > 1
131
+ ? `${text('attempt', { n: tries, of: uploadHosts ?? tries })} · ${host}`
132
+ : host;
133
+ }
134
+ return '';
135
+ };
136
+ const retrying = $derived(current === 'store' && (facts.attempt ?? 1) > 1 && !facts.processed);
137
+
138
+ // The picture: where each place sits, and the path the data takes now.
139
+ const pathD = $derived(pathOf(flow.path, places));
140
+ const ids = $derived({ title: `${testid}-title` });
141
+
142
+ // The screen stays on while it runs, and comes back on after the tab was hidden.
143
+ /** @type {any} */
144
+ let lock = null;
145
+ async function wake() {
146
+ try {
147
+ lock = (await /** @type {any} */ (navigator).wakeLock?.request('screen')) ?? null;
148
+ } catch {
149
+ lock = null;
150
+ }
151
+ }
152
+ $effect(() => {
153
+ if (!running || !wakeLock) return;
154
+ wake();
155
+ const visible = () => document.visibilityState === 'visible' && wake();
156
+ document.addEventListener('visibilitychange', visible);
157
+ return () => {
158
+ document.removeEventListener('visibilitychange', visible);
159
+ lock?.release?.()?.catch?.(() => {});
160
+ lock = null;
161
+ };
162
+ });
163
+ // When the page was away, say for how long: a phone may stop a hidden tab.
164
+ let hiddenAt = 0;
165
+ let away = $state(0);
166
+ $effect(() => {
167
+ if (!running) return;
168
+ const seen = () => {
169
+ if (document.visibilityState === 'hidden') hiddenAt = Date.now();
170
+ else if (hiddenAt) {
171
+ const s = Math.round((Date.now() - hiddenAt) / 1000);
172
+ hiddenAt = 0;
173
+ if (s >= 5) away = s;
174
+ }
175
+ };
176
+ document.addEventListener('visibilitychange', seen);
177
+ return () => document.removeEventListener('visibilitychange', seen);
178
+ });
179
+ // Leaving the page would stop the build: the browser asks first.
180
+ $effect(() => {
181
+ if (!running) return;
182
+ const leave = text('leave');
183
+ const ask = (/** @type {BeforeUnloadEvent} */ e) => {
184
+ e.preventDefault();
185
+ e.returnValue = leave;
186
+ return leave;
187
+ };
188
+ window.addEventListener('beforeunload', ask);
189
+ return () => window.removeEventListener('beforeunload', ask);
190
+ });
191
+ // The tab's title carries the progress, and gets its own back afterwards.
192
+ const before = typeof document === 'undefined' ? '' : document.title;
193
+ $effect(() => {
194
+ document.title = running ? text('tab', { pct }) : before;
195
+ });
196
+ onDestroy(() => {
197
+ if (typeof document !== 'undefined') document.title = before;
198
+ });
199
+ </script>
200
+
201
+ {#snippet check(/** @type {number} */ size)}
202
+ <svg
203
+ width={size}
204
+ height={size}
205
+ viewBox="0 0 24 24"
206
+ fill="none"
207
+ stroke="currentColor"
208
+ stroke-width="2.5"
209
+ stroke-linecap="round"
210
+ stroke-linejoin="round"
211
+ aria-hidden="true"><path d="M5 12.5l4.5 4.5L19 7.5"></path></svg
212
+ >
213
+ {/snippet}
214
+
215
+ {#snippet value(/** @type {import('./model.mjs').Evidence} */ p)}
216
+ {#if p.href}<a href={p.href} target="_blank" rel="noopener noreferrer"><code>{short(p.value)}</code></a
217
+ >{:else}<code>{short(p.value)}</code>{/if}
218
+ {/snippet}
219
+
220
+ {#if view.minimized && running}
221
+ <div class="bj-mini" class:top={miniAt === 'top'} role="status" data-testid="{testid}-mini">
222
+ <span class="dot pulse" aria-hidden="true"></span>
223
+ <strong>{st(current, 'mini')}</strong>
224
+ <span class="bar"><span class="fill shimmer" style="width: {pct}%"></span></span>
225
+ <span>{pct} % · {text('left', { minutes: minutes(j.left) })}</span>
226
+ <button type="button" onclick={onexpand} data-testid="{testid}-expand">{text('expand')}</button>
227
+ </div>
228
+ {:else}
229
+ <div
230
+ class="bj-overlay"
231
+ role="dialog"
232
+ aria-modal="true"
233
+ aria-labelledby={ids.title}
234
+ data-testid={testid}
235
+ data-station={current}
236
+ data-state={view.done ? 'done' : view.failed ? 'stopped' : 'running'}
237
+ >
238
+ {#if cover}
239
+ {@render cover()}
240
+ {:else if view.done}
241
+ <div class="finale" data-testid="{testid}-done">
242
+ <div class="big pop" aria-hidden="true">
243
+ <span class="spark s1"></span><span class="spark s2"></span><span class="spark s3"></span><span
244
+ class="spark s4"
245
+ ></span>
246
+ <span class="spin ring"></span>
247
+ {@render check(52)}
248
+ </div>
249
+ <h2 id={ids.title}>{text('doneTitle')}</h2>
250
+ <p>{text('doneText')}</p>
251
+ {#if !simple && finaleEvidence && hasReport}
252
+ <ul class="proofs-inline" data-testid="{testid}-done-evidence">
253
+ {#each reported(proofs) as p (p.key)}
254
+ <li>
255
+ <span class="led on" aria-hidden="true"></span>
256
+ <span>{text(`evidence.${p.key}`)}{#if p.ok}{' · '}<em>{text('matches')}</em>{/if}</span>
257
+ {@render value(p)}
258
+ </li>
259
+ {/each}
260
+ </ul>
261
+ {/if}
262
+ <p class="row center">
263
+ {#if openHref}<a
264
+ class="cta"
265
+ href={openHref}
266
+ target="_blank"
267
+ rel="noopener noreferrer"
268
+ data-testid="{testid}-open">{text('open')}</a
269
+ >{/if}
270
+ {#if oncertificate}<button
271
+ type="button"
272
+ class="secondary"
273
+ onclick={oncertificate}
274
+ data-testid="{testid}-certificate">{text('showCertificate')}</button
275
+ >{/if}
276
+ <button
277
+ type="button"
278
+ class={openHref ? 'link' : 'cta'}
279
+ onclick={onclose}
280
+ data-testid="{testid}-close">{text('close')}</button
281
+ >
282
+ </p>
283
+ </div>
284
+ {:else}
285
+ <div class="journey">
286
+ <div class="top">
287
+ <div>
288
+ <p class="kicker">{text('kicker')}</p>
289
+ <h2 id={ids.title}>{text('title')}</h2>
290
+ </div>
291
+ {#if running}
292
+ <button type="button" class="ghost" onclick={onminimize} data-testid="{testid}-minimize"
293
+ >{text('minimize')}</button
294
+ >
295
+ {:else}
296
+ <button type="button" class="ghost" onclick={onclose} data-testid="{testid}-close"
297
+ >{text('close')}</button
298
+ >
299
+ {/if}
300
+ </div>
301
+ <ol class="stations" style="--n: {all.length}">
302
+ {#each shown as s (s.key)}
303
+ <li
304
+ class:done={s.done}
305
+ class:active={s.active}
306
+ aria-current={s.active ? 'step' : undefined}
307
+ data-testid="{testid}-station-{s.key}"
308
+ data-state={s.done ? 'done' : s.active ? (running ? 'active' : 'stopped') : 'next'}
309
+ >
310
+ <span class="circle" class:pulse={s.active && running} class:stop={s.active && !running}>
311
+ {#if s.done}{@render check(26)}{:else}{s.n}{/if}
312
+ {#if s.active && running}<span class="ring spin" aria-hidden="true"></span>{/if}
313
+ </span>
314
+ <span class="label">{st(s.key, 'label')}</span>
315
+ <span class="dur">{st(s.key, 'duration')}</span>
316
+ </li>
317
+ {/each}
318
+ </ol>
319
+ <div class="leds" aria-hidden="true">
320
+ {#each shown as s (s.key)}<span
321
+ class="led"
322
+ class:on={s.done}
323
+ class:blink={s.active && running}
324
+ class:off={s.active && !running}
325
+ ></span>{/each}
326
+ </div>
327
+ <div class="grid" class:single={simple}>
328
+ <div class="col">
329
+ <div class="now" aria-live="polite">
330
+ {#if view.failed}
331
+ <p class="step">{text('stoppedAt', { n: j.index + 1, station: st(current, 'label') })}</p>
332
+ <h3>{text('failedTitle')}</h3>
333
+ {#if reason}
334
+ <p class="reason" role="alert" data-testid="{testid}-reason">{reason}</p>
335
+ {/if}
336
+ <p>{text('failedText')}</p>
337
+ {:else}
338
+ <p class="step">{text('step', { n: j.index + 1, of: all.length })} · {st(current, 'duration')}</p>
339
+ <h3 data-testid="{testid}-stage">{st(current, 'title')}</h3>
340
+ <p>{st(current, 'text')}</p>
341
+ {#if !simple}
342
+ <ul class="subs" data-testid="{testid}-substeps">
343
+ {#each steps as s (s.key)}
344
+ <li class={s.state} data-state={s.state}>
345
+ <span
346
+ class="led"
347
+ class:on={s.state === 'done'}
348
+ class:blink={s.state === 'active'}
349
+ aria-hidden="true"
350
+ ></span>
351
+ <span
352
+ >{text(`sub.${s.key}`)}{#if extra(s.key)}<small class="extra">{extra(s.key)}</small
353
+ >{/if}</span
354
+ >
355
+ </li>
356
+ {/each}
357
+ </ul>
358
+ {/if}
359
+ {#if retrying}<p class="small" data-testid="{testid}-retry">{text('retryNote')}</p>{/if}
360
+ {#if fetched != null}
361
+ <span class="bar big-bar"><span class="fill gold shimmer" style="width: {fetched}%"></span></span>
362
+ <p class="small" data-testid="{testid}-fetched">{text('fetched', { pct: fetched })}</p>
363
+ {/if}
364
+ {/if}
365
+ </div>
366
+ {#if running}
367
+ <figure class="flow" data-testid="{testid}-flow" data-what={flow.what}>
368
+ <figcaption>
369
+ {text('flowTitle')}: <strong>{text(`flow.${flow.what}`)}</strong>{#if flow.share != null}<span
370
+ class="extra">{Math.round(flow.share * 100)} %</span
371
+ >{/if}
372
+ </figcaption>
373
+ <svg viewBox="0 0 720 250" role="img" aria-label="{text('flowTitle')}: {text(`flow.${flow.what}`)}">
374
+ {#each lines as [a, b] (a + b)}
375
+ {#if places[a] && places[b]}
376
+ <line
377
+ x1={places[a][0]}
378
+ y1={places[a][1]}
379
+ x2={places[b][0]}
380
+ y2={places[b][1]}
381
+ class:hot={onPath(flow.path, a, b)}
382
+ />
383
+ {/if}
384
+ {/each}
385
+ {#key pathD}
386
+ {#each [0, 0.6, 1.2] as delay (delay)}
387
+ <circle r="6" class="packet" opacity="0"
388
+ ><set attributeName="opacity" to="1" begin="{delay}s" /><animateMotion
389
+ dur="1.8s"
390
+ begin="{delay}s"
391
+ repeatCount="indefinite"
392
+ path={pathD}
393
+ /></circle
394
+ >
395
+ {/each}
396
+ {/key}
397
+ {#each Object.entries(places) as [p, [cx, cy]] (p)}
398
+ <g class="place" class:hot={flow.path.includes(p)}>
399
+ <rect x={cx - 86} y={cy - 18} width="172" height="36" rx="10" />
400
+ <circle cx={cx - 70} {cy} r="5" class="lamp" class:blink={flow.path.includes(p)} />
401
+ <text x={cx - 58} y={cy + 5}>{text(`places.${p}`)}</text>
402
+ </g>
403
+ {/each}
404
+ </svg>
405
+ {#if flow.share != null}<span class="bar"
406
+ ><span class="fill" style="width: {Math.round(flow.share * 100)}%"></span></span
407
+ >{/if}
408
+ </figure>
409
+ {/if}
410
+ </div>
411
+ {#if !simple}
412
+ <aside class="proofs" data-testid="{testid}-evidence">
413
+ <h4>{text('evidenceTitle')}</h4>
414
+ {#if proofs.length}
415
+ <ul>
416
+ {#each proofs as p (p.key)}
417
+ <li class="pop" data-key={p.key}>
418
+ <span class="led on" aria-hidden="true"></span>
419
+ <span class="what"
420
+ >{text(`evidence.${p.key}`)}{#if p.ok}{' · '}<em>{text('matches')}</em>{/if}</span
421
+ >
422
+ {@render value(p)}
423
+ </li>
424
+ {/each}
425
+ </ul>
426
+ {/if}
427
+ {#if !hasReport && noneText}
428
+ <p class="small">{noneText}</p>
429
+ {/if}
430
+ {#if hardware?.length}
431
+ <h4>{text('hardwareTitle')}</h4>
432
+ <ul>
433
+ {#each hardware as h (h.key)}<li>
434
+ <span class="led on" aria-hidden="true"></span><a
435
+ href={h.href}
436
+ target="_blank"
437
+ rel="noopener noreferrer">{text(`hardware.${h.key}`)}</a
438
+ >
439
+ </li>{/each}
440
+ </ul>
441
+ {/if}
442
+ </aside>
443
+ {/if}
444
+ </div>
445
+ {#if running}
446
+ <div class="total">
447
+ <p class="row between">
448
+ <strong data-testid="{testid}-share">{text('share', { pct })}</strong>
449
+ <span>{text('left', { minutes: minutes(j.left) })} · {text('endsAt', { time: ends })}</span>
450
+ </p>
451
+ <span class="bar"><span class="fill shimmer" style="width: {pct}%"></span></span>
452
+ {#if away && text('cameBack', { seconds: away })}
453
+ <p class="warn" role="status" data-testid="{testid}-away">{text('cameBack', { seconds: away })}</p>
454
+ {/if}
455
+ {#if hint}<p class="small" data-testid="{testid}-hint">{hint}</p>{/if}
456
+ <p class="small">{text('keepOpen')}</p>
457
+ </div>
458
+ {/if}
459
+ </div>
460
+ {/if}
461
+ </div>
462
+ {/if}
463
+
464
+ <style>
465
+ .bj-overlay {
466
+ position: fixed;
467
+ inset: 0;
468
+ z-index: 50;
469
+ overflow-y: auto;
470
+ background: #0f2a2e;
471
+ color: #f6f2ea;
472
+ display: flex;
473
+ justify-content: center;
474
+ align-items: flex-start;
475
+ padding: clamp(1rem, 4vw, 3rem) 1rem;
476
+ box-sizing: border-box;
477
+ text-align: left;
478
+ }
479
+ .journey,
480
+ .finale {
481
+ width: 100%;
482
+ max-width: 68rem;
483
+ display: flex;
484
+ flex-direction: column;
485
+ gap: 2rem;
486
+ }
487
+ .top {
488
+ display: flex;
489
+ flex-wrap: wrap;
490
+ justify-content: space-between;
491
+ align-items: flex-start;
492
+ gap: 1rem;
493
+ }
494
+ .kicker {
495
+ margin: 0;
496
+ font-size: 0.8rem;
497
+ letter-spacing: 0.08em;
498
+ text-transform: uppercase;
499
+ color: #5eead4;
500
+ }
501
+ h2,
502
+ h3 {
503
+ color: #f6f2ea;
504
+ }
505
+ h2 {
506
+ margin: 0.4rem 0 0;
507
+ font-size: clamp(1.8rem, 4vw, 2.6rem);
508
+ line-height: 1.1;
509
+ font-weight: 700;
510
+ }
511
+ h3 {
512
+ margin: 0;
513
+ font-size: clamp(1.4rem, 3vw, 1.9rem);
514
+ font-weight: 600;
515
+ }
516
+ button {
517
+ font: inherit;
518
+ min-height: 2.75rem;
519
+ }
520
+ .ghost {
521
+ padding: 0.6rem 1.1rem;
522
+ border-radius: 999px;
523
+ border: 1px solid rgba(246, 242, 234, 0.35);
524
+ background: transparent;
525
+ color: inherit;
526
+ cursor: pointer;
527
+ }
528
+ .stations {
529
+ list-style: none;
530
+ margin: 0;
531
+ padding: 0;
532
+ display: grid;
533
+ grid-template-columns: repeat(var(--n, 5), minmax(0, 1fr));
534
+ gap: 0.75rem;
535
+ }
536
+ @media (max-width: 720px) {
537
+ .stations {
538
+ grid-template-columns: repeat(3, minmax(0, 1fr));
539
+ row-gap: 1.25rem;
540
+ }
541
+ }
542
+ .stations li {
543
+ display: flex;
544
+ flex-direction: column;
545
+ align-items: center;
546
+ gap: 0.5rem;
547
+ text-align: center;
548
+ }
549
+ .circle {
550
+ position: relative;
551
+ width: 4rem;
552
+ height: 4rem;
553
+ border-radius: 50%;
554
+ border: 2px solid rgba(246, 242, 234, 0.25);
555
+ display: flex;
556
+ align-items: center;
557
+ justify-content: center;
558
+ font-weight: 700;
559
+ font-size: 1.2rem;
560
+ color: rgba(246, 242, 234, 0.65);
561
+ box-sizing: border-box;
562
+ }
563
+ .active .circle {
564
+ background: #f6f2ea;
565
+ color: #0f2a2e;
566
+ border-color: #f6f2ea;
567
+ }
568
+ .active .circle.stop {
569
+ background: transparent;
570
+ color: #fecaca;
571
+ border-color: #f87171;
572
+ }
573
+ .done .circle {
574
+ background: #0f766e;
575
+ border-color: #0f766e;
576
+ color: #f6f2ea;
577
+ animation: pop 0.7s cubic-bezier(0.2, 0.9, 0.3, 1.2) both;
578
+ }
579
+ .ring {
580
+ position: absolute;
581
+ inset: -7px;
582
+ border-radius: 50%;
583
+ border: 2px dashed #5eead4;
584
+ }
585
+ .label {
586
+ font-weight: 600;
587
+ }
588
+ .dur {
589
+ font-size: 0.8rem;
590
+ color: rgba(246, 242, 234, 0.7);
591
+ }
592
+ .leds {
593
+ display: flex;
594
+ gap: 0.5rem;
595
+ justify-content: center;
596
+ }
597
+ .now {
598
+ background: rgba(246, 242, 234, 0.06);
599
+ border: 1px solid rgba(246, 242, 234, 0.14);
600
+ border-radius: 20px;
601
+ padding: 1.5rem;
602
+ display: flex;
603
+ flex-direction: column;
604
+ gap: 0.75rem;
605
+ }
606
+ .now p {
607
+ margin: 0;
608
+ line-height: 1.55;
609
+ max-width: 48rem;
610
+ color: rgba(246, 242, 234, 0.9);
611
+ }
612
+ .now .step {
613
+ font-size: 0.8rem;
614
+ letter-spacing: 0.08em;
615
+ text-transform: uppercase;
616
+ color: #f5c76b;
617
+ }
618
+ .total {
619
+ display: flex;
620
+ flex-direction: column;
621
+ gap: 0.6rem;
622
+ }
623
+ .led {
624
+ display: inline-block;
625
+ flex: none;
626
+ width: 0.6rem;
627
+ height: 0.6rem;
628
+ border-radius: 50%;
629
+ background: rgba(246, 242, 234, 0.2);
630
+ box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25);
631
+ }
632
+ .led.on {
633
+ background: #34d399;
634
+ box-shadow: 0 0 8px #34d399;
635
+ }
636
+ .led.blink {
637
+ background: #f5c76b;
638
+ box-shadow: 0 0 10px #f5c76b;
639
+ animation: blink 0.9s steps(2, start) infinite;
640
+ }
641
+ .led.off {
642
+ background: #f87171;
643
+ box-shadow: 0 0 8px #f87171;
644
+ }
645
+ .grid {
646
+ display: grid;
647
+ grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
648
+ gap: 1.25rem;
649
+ align-items: start;
650
+ }
651
+ .grid.single {
652
+ grid-template-columns: 1fr;
653
+ }
654
+ @media (max-width: 860px) {
655
+ .grid {
656
+ grid-template-columns: 1fr;
657
+ }
658
+ }
659
+ .col {
660
+ display: flex;
661
+ flex-direction: column;
662
+ gap: 1.25rem;
663
+ min-width: 0;
664
+ }
665
+ .subs {
666
+ list-style: none;
667
+ margin: 0.25rem 0 0;
668
+ padding: 0;
669
+ display: grid;
670
+ gap: 0.45rem;
671
+ }
672
+ .subs li {
673
+ display: grid;
674
+ grid-template-columns: auto minmax(0, 1fr);
675
+ column-gap: 0.6rem;
676
+ align-items: baseline;
677
+ color: rgba(246, 242, 234, 0.9);
678
+ }
679
+ .subs li.next {
680
+ color: rgba(246, 242, 234, 0.5);
681
+ }
682
+ .subs small {
683
+ color: #f5c76b;
684
+ }
685
+ .extra::before {
686
+ content: ' · ';
687
+ color: rgba(246, 242, 234, 0.5);
688
+ }
689
+ .flow {
690
+ margin: 0;
691
+ background: rgba(246, 242, 234, 0.04);
692
+ border: 1px solid rgba(246, 242, 234, 0.12);
693
+ border-radius: 20px;
694
+ padding: 1rem 1.25rem;
695
+ display: flex;
696
+ flex-direction: column;
697
+ gap: 0.6rem;
698
+ }
699
+ .flow figcaption {
700
+ font-size: 0.9rem;
701
+ color: rgba(246, 242, 234, 0.85);
702
+ }
703
+ .flow svg {
704
+ width: 100%;
705
+ height: auto;
706
+ }
707
+ .flow line {
708
+ stroke: rgba(246, 242, 234, 0.15);
709
+ stroke-width: 2;
710
+ stroke-dasharray: 4 6;
711
+ }
712
+ .flow line.hot {
713
+ stroke: rgba(94, 234, 212, 0.55);
714
+ stroke-dasharray: none;
715
+ }
716
+ .flow .packet {
717
+ fill: #f5c76b;
718
+ filter: drop-shadow(0 0 4px #f5c76b);
719
+ }
720
+ .place rect {
721
+ fill: #133a3f;
722
+ stroke: rgba(246, 242, 234, 0.2);
723
+ }
724
+ .place.hot rect {
725
+ stroke: #5eead4;
726
+ }
727
+ .place text {
728
+ fill: #f6f2ea;
729
+ font-size: 13px;
730
+ font-weight: 600;
731
+ }
732
+ .lamp {
733
+ fill: rgba(246, 242, 234, 0.25);
734
+ }
735
+ .lamp.blink {
736
+ fill: #34d399;
737
+ animation: blink 0.9s steps(2, start) infinite;
738
+ }
739
+ .proofs {
740
+ background: rgba(246, 242, 234, 0.04);
741
+ border: 1px solid rgba(246, 242, 234, 0.12);
742
+ border-radius: 20px;
743
+ padding: 1.1rem 1.25rem;
744
+ min-width: 0;
745
+ display: flex;
746
+ flex-direction: column;
747
+ gap: 0.6rem;
748
+ }
749
+ .proofs h4 {
750
+ margin: 0;
751
+ font-size: 0.8rem;
752
+ letter-spacing: 0.08em;
753
+ text-transform: uppercase;
754
+ color: #5eead4;
755
+ }
756
+ .proofs ul + h4,
757
+ .proofs p + h4 {
758
+ margin-top: 0.6rem;
759
+ }
760
+ .proofs ul,
761
+ .proofs-inline {
762
+ list-style: none;
763
+ margin: 0;
764
+ padding: 0;
765
+ display: grid;
766
+ gap: 0.55rem;
767
+ }
768
+ .proofs li,
769
+ .proofs-inline li {
770
+ display: grid;
771
+ grid-template-columns: auto minmax(0, 1fr);
772
+ column-gap: 0.55rem;
773
+ align-items: baseline;
774
+ font-size: 0.85rem;
775
+ }
776
+ .proofs li > a,
777
+ .proofs li > code,
778
+ .proofs-inline li > a,
779
+ .proofs-inline li > code {
780
+ grid-column: 2;
781
+ }
782
+ .proofs .what {
783
+ color: rgba(246, 242, 234, 0.8);
784
+ }
785
+ em {
786
+ color: #34d399;
787
+ font-style: normal;
788
+ font-weight: 600;
789
+ }
790
+ a {
791
+ color: #5eead4;
792
+ }
793
+ code {
794
+ font-family: var(--mono, ui-monospace, SFMono-Regular, Menlo, monospace);
795
+ font-size: 0.8rem;
796
+ overflow-wrap: anywhere;
797
+ color: #5eead4;
798
+ }
799
+ .row {
800
+ display: flex;
801
+ flex-wrap: wrap;
802
+ align-items: center;
803
+ gap: 0.75rem;
804
+ margin: 0;
805
+ }
806
+ .between {
807
+ justify-content: space-between;
808
+ }
809
+ .center {
810
+ justify-content: center;
811
+ }
812
+ .reason {
813
+ padding: 0.75rem 1rem;
814
+ border-radius: 12px;
815
+ background: rgba(248, 113, 113, 0.14);
816
+ border: 1px solid rgba(248, 113, 113, 0.4);
817
+ color: #fecaca !important;
818
+ overflow-wrap: anywhere;
819
+ }
820
+ .warn {
821
+ margin: 0;
822
+ padding: 0.6rem 0.9rem;
823
+ border-radius: 12px;
824
+ background: rgba(245, 199, 107, 0.15);
825
+ color: #f5c76b;
826
+ font-size: 0.9rem;
827
+ }
828
+ .small {
829
+ margin: 0;
830
+ font-size: 0.85rem;
831
+ color: rgba(246, 242, 234, 0.72);
832
+ }
833
+ .bar {
834
+ display: block;
835
+ height: 10px;
836
+ border-radius: 999px;
837
+ background: rgba(246, 242, 234, 0.15);
838
+ overflow: hidden;
839
+ }
840
+ .big-bar {
841
+ height: 14px;
842
+ max-width: 48rem;
843
+ }
844
+ .fill {
845
+ display: block;
846
+ height: 100%;
847
+ border-radius: 999px;
848
+ background-color: #5eead4;
849
+ transition: width 1s ease;
850
+ }
851
+ .fill.gold {
852
+ background-color: #f5c76b;
853
+ }
854
+ .finale {
855
+ align-items: center;
856
+ text-align: center;
857
+ max-width: 44rem;
858
+ padding-top: 3rem;
859
+ }
860
+ .finale p {
861
+ margin: 0;
862
+ line-height: 1.55;
863
+ color: rgba(246, 242, 234, 0.9);
864
+ }
865
+ .proofs-inline {
866
+ text-align: left;
867
+ width: 100%;
868
+ }
869
+ .big {
870
+ position: relative;
871
+ width: 7rem;
872
+ height: 7rem;
873
+ border-radius: 50%;
874
+ background: #0f766e;
875
+ display: flex;
876
+ align-items: center;
877
+ justify-content: center;
878
+ color: #fff;
879
+ }
880
+ .big .ring {
881
+ inset: -10px;
882
+ border: 3px dashed #f5c76b;
883
+ }
884
+ .cta {
885
+ display: inline-flex;
886
+ align-items: center;
887
+ padding: 0.8rem 1.5rem;
888
+ min-height: 2.75rem;
889
+ box-sizing: border-box;
890
+ border-radius: 999px;
891
+ background: #f6f2ea;
892
+ color: #0f2a2e;
893
+ font-weight: 600;
894
+ border: none;
895
+ cursor: pointer;
896
+ text-decoration: none;
897
+ }
898
+ .secondary {
899
+ padding: 0.8rem 1.5rem;
900
+ border-radius: 999px;
901
+ border: 1px solid #f6f2ea;
902
+ background: transparent;
903
+ color: #f6f2ea;
904
+ font-weight: 600;
905
+ cursor: pointer;
906
+ }
907
+ .link {
908
+ background: none;
909
+ border: none;
910
+ color: rgba(246, 242, 234, 0.8);
911
+ text-decoration: underline;
912
+ cursor: pointer;
913
+ }
914
+ .bj-mini {
915
+ position: fixed;
916
+ left: 0;
917
+ right: 0;
918
+ bottom: 0;
919
+ z-index: 40;
920
+ display: flex;
921
+ flex-wrap: wrap;
922
+ align-items: center;
923
+ gap: 0.75rem 1rem;
924
+ padding: 0.7rem 1.25rem;
925
+ background: #0f3d3a;
926
+ color: #f6f2ea;
927
+ }
928
+ .bj-mini.top {
929
+ position: sticky;
930
+ top: 0;
931
+ bottom: auto;
932
+ }
933
+ .bj-mini .bar {
934
+ flex: 1 1 10rem;
935
+ height: 6px;
936
+ min-width: 6rem;
937
+ }
938
+ .bj-mini button {
939
+ padding: 0.4rem 0.9rem;
940
+ border-radius: 999px;
941
+ border: 1px solid #5eead4;
942
+ background: transparent;
943
+ color: inherit;
944
+ cursor: pointer;
945
+ }
946
+ .dot {
947
+ width: 0.75rem;
948
+ height: 0.75rem;
949
+ border-radius: 50%;
950
+ background: #5eead4;
951
+ }
952
+ .spark {
953
+ position: absolute;
954
+ width: 8px;
955
+ height: 8px;
956
+ border-radius: 2px;
957
+ bottom: 0;
958
+ animation: rise 2.4s ease-out infinite;
959
+ }
960
+ .s1 {
961
+ left: -2.5rem;
962
+ background: #5eead4;
963
+ }
964
+ .s2 {
965
+ left: 1rem;
966
+ background: #f5c76b;
967
+ animation-delay: 0.5s;
968
+ }
969
+ .s3 {
970
+ right: 1rem;
971
+ background: #5eead4;
972
+ animation-delay: 1s;
973
+ }
974
+ .s4 {
975
+ right: -2.5rem;
976
+ background: #f5c76b;
977
+ animation-delay: 1.5s;
978
+ }
979
+ .pulse {
980
+ animation: pulse 1.8s ease-out infinite;
981
+ }
982
+ .spin {
983
+ animation: spin 6s linear infinite;
984
+ }
985
+ .pop {
986
+ animation: pop 0.7s cubic-bezier(0.2, 0.9, 0.3, 1.2) both;
987
+ }
988
+ .shimmer {
989
+ background-image: linear-gradient(
990
+ 90deg,
991
+ rgba(255, 255, 255, 0) 0,
992
+ rgba(255, 255, 255, 0.45) 50%,
993
+ rgba(255, 255, 255, 0) 100%
994
+ );
995
+ background-size: 200px 100%;
996
+ background-repeat: no-repeat;
997
+ animation: shimmer 1.6s linear infinite;
998
+ }
999
+ @keyframes blink {
1000
+ to {
1001
+ opacity: 0.25;
1002
+ }
1003
+ }
1004
+ @keyframes pulse {
1005
+ 0% {
1006
+ box-shadow: 0 0 0 0 rgba(94, 234, 212, 0.5);
1007
+ }
1008
+ 70% {
1009
+ box-shadow: 0 0 0 18px rgba(94, 234, 212, 0);
1010
+ }
1011
+ 100% {
1012
+ box-shadow: 0 0 0 0 rgba(94, 234, 212, 0);
1013
+ }
1014
+ }
1015
+ @keyframes spin {
1016
+ to {
1017
+ transform: rotate(360deg);
1018
+ }
1019
+ }
1020
+ @keyframes pop {
1021
+ 0% {
1022
+ transform: scale(0.6);
1023
+ opacity: 0;
1024
+ }
1025
+ 60% {
1026
+ transform: scale(1.08);
1027
+ opacity: 1;
1028
+ }
1029
+ 100% {
1030
+ transform: scale(1);
1031
+ }
1032
+ }
1033
+ @keyframes shimmer {
1034
+ 0% {
1035
+ background-position: -200px 0;
1036
+ }
1037
+ 100% {
1038
+ background-position: 200px 0;
1039
+ }
1040
+ }
1041
+ @keyframes rise {
1042
+ 0% {
1043
+ transform: translateY(0);
1044
+ opacity: 1;
1045
+ }
1046
+ 100% {
1047
+ transform: translateY(-140px);
1048
+ opacity: 0;
1049
+ }
1050
+ }
1051
+ @media (prefers-reduced-motion: reduce) {
1052
+ .pulse,
1053
+ .spin,
1054
+ .pop,
1055
+ .shimmer,
1056
+ .done .circle,
1057
+ .led.blink,
1058
+ .lamp.blink {
1059
+ animation: none;
1060
+ }
1061
+ .packet,
1062
+ .spark {
1063
+ display: none;
1064
+ }
1065
+ .fill {
1066
+ transition: none;
1067
+ }
1068
+ }
1069
+ @media print {
1070
+ .bj-overlay {
1071
+ position: static;
1072
+ background: none;
1073
+ color: inherit;
1074
+ padding: 0;
1075
+ }
1076
+ }
1077
+ </style>