/* ===== The File Journey (journey.html, js/journey.js) =====
 * A fixed WebGL world under a fixed HUD; the page itself is only a tall scroll track whose progress
 * drives the camera along one road. The UI is purple glass that takes the world's colour of the
 * moment: js/journey.js sets --tone (the accent), --tone-rgb and --light-rgb (the light ahead) as
 * the atmosphere moves from the unknown to the verdict, so the words, the rail, the HUD and the
 * veil change with the world instead of sitting on top of it. Every piece of text keeps its own dark
 * backing (a scrim or glass) for contrast >= 4.5:1 whatever the world shows behind it. Text version
 * for no-WebGL / no-JS / screen readers, and as a visible "text version" mode opened by the skip link. */
@font-face {
  font-family: "Reem Kufi CS";
  src: url("fonts/reem-kufi.woff") format("woff");   /* Reem Kufi, SIL Open Font License (fonts/OFL-reemkufi.txt) */
  font-weight: 400 700; font-display: swap;
}
:root {
  --bg: #04030c; --ink: #f4efff; --muted: #b9b0d8; --acc: #c9a2ff; --cyan: #22e8ff; --mag: #ff4fd8;
  --tone: #c9a2ff; --tone-rgb: 201, 162, 255; --light-rgb: 114, 70, 224;
  --line: rgba(201, 162, 255, .18);
  --glass: rgba(12, 8, 30, .58); --glass-solid: rgba(9, 6, 22, .9);
  --mono: "Cascadia Mono", Consolas, ui-monospace, "SF Mono", monospace;
  --sans: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", sans-serif;
  --ar: "Segoe UI", "Noto Sans Arabic", Tahoma, sans-serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { background: var(--bg); scrollbar-width: thin; scrollbar-color: rgba(var(--tone-rgb), .4) transparent; }
body { margin: 0; color: var(--ink); background: var(--bg); font: 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
[dir="rtl"] body { font-family: var(--ar); }
a { color: inherit; }
button { font: inherit; color: inherit; }
.fj-skip { position: fixed; z-index: 100; top: -80px; inset-inline-start: 12px; padding: 10px 16px; border-radius: 12px; background: #120c2a; border: 1px solid var(--acc); color: var(--ink); font-weight: 650; transition: top .2s; }
.fj-skip:focus { top: 12px; outline: 2px solid var(--cyan); outline-offset: 2px; }

/* ---------- the world ---------- */
#fj-gl { position: fixed; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; }
.js #fj-gl { opacity: 0; transition: opacity .9s ease; }
.js.fj-glon #fj-gl { opacity: 1; }
/* held views (reduced motion, Essential): the previous view, fading out over the new one */
#fj-xfade { position: fixed; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; pointer-events: none; opacity: 0; visibility: hidden; }
#fj-xfade.on { visibility: visible; opacity: 1; }
#fj-xfade.go { visibility: visible; opacity: 0; transition: opacity .9s ease; }
/* the grade: a vignette, the light of the moment bleeding in from above, and fine grain */
.fj-veil { position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(120% 70% at 50% -10%, rgba(var(--light-rgb), .16), transparent 60%),
    radial-gradient(90% 60% at 50% 115%, rgba(var(--tone-rgb), .1), transparent 70%),
    radial-gradient(ellipse at center, transparent 52%, rgba(2, 1, 8, .72) 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
/* letterbox bars: the frame of a film, quietly there */
.fj-veil::before, .fj-veil::after { content: ""; position: absolute; left: 0; right: 0; height: 9vh; pointer-events: none; }
.fj-veil::before { top: 0; background: linear-gradient(180deg, rgba(4, 3, 12, .85), transparent); }
.fj-veil::after { bottom: 0; background: linear-gradient(0deg, rgba(4, 3, 12, .9), transparent); }
/* held views (reduced motion) are calmer: the world sits a step further back */
.fj-still .fj-veil { background-color: rgba(4, 3, 12, .3); }
.fj-fade { position: fixed; inset: 0; z-index: 2; pointer-events: none; background: #000; opacity: 0; transition: opacity .35s; }
.fj-fade.on { opacity: 1; transition: none; }
.fj-track { position: relative; z-index: 3; height: 1000vh; pointer-events: none; }

/* ---------- glass, shared ---------- */
.fj-btn, .fj-rail, .fj-chap, .fj-tele, .fj-lab, .fj-final .note {
  background: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, 0) 60%), var(--glass);
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 18px 50px -24px rgba(0, 0, 0, .9);
  backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%);
}

/* ---------- header ---------- */
.fj-top { position: fixed; z-index: 20; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 16px; padding: 16px clamp(14px, 3vw, 32px); }
.fj-brand { display: flex; align-items: center; gap: 10px; min-height: 44px; text-decoration: none; font-weight: 700; font-size: 16.5px; letter-spacing: .01em; }
.fj-brand svg { width: 24px; height: 24px; fill: none; stroke: var(--tone); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 10px rgba(var(--tone-rgb), .55)); }
.fj-title { margin: 0 auto; display: flex; flex-direction: column; align-items: center; line-height: 1.2; text-align: center; }
.fj-title b { font: 600 10.5px/1 var(--mono); letter-spacing: .44em; color: var(--tone); margin-inline-start: .44em; }
.fj-title span { font-size: 12.5px; color: var(--muted); margin-top: 5px; letter-spacing: .02em; }
[dir="rtl"] .fj-title b { font-family: "Reem Kufi CS", var(--ar); font-size: 14px; line-height: 1.2; letter-spacing: 0; margin: 0; }
.fj-tools { display: flex; align-items: center; gap: 8px; }
.fj-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; min-width: 40px; padding: 0 14px; border-radius: 999px; cursor: pointer; text-decoration: none; font-size: 14px;
  transition: border-color .3s, background-color .3s, transform .3s var(--ease); }
.fj-btn:hover { border-color: rgba(var(--tone-rgb), .55); transform: translateY(-1px); }
.fj-btn:focus-visible, .fj-rail button:focus-visible, .fj-final a:focus-visible, .fj-brand:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
.fj-back svg { display: none; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.sfx-btn { width: 40px; padding: 0; }
.sfx-btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.sfx-btn svg path:first-child { fill: currentColor; fill-opacity: .18; }
.sfx-btn .x { display: none; }
.sfx-btn.off { color: #c4bbdf; } .sfx-btn.off .w1, .sfx-btn.off .w2 { display: none; } .sfx-btn.off .x { display: inline; }

/* ---------- the route (stage rail) ---------- */
/* one line that fills continuously as the file travels (--p, set by js/journey.js), with a marker
 * per stage; only the current stage shows its subtitle */
.fj-rail { position: fixed; z-index: 15; top: 50%; inset-inline-start: clamp(10px, 2vw, 28px); transform: translateY(-50%); padding: 10px 16px 10px 10px; border-radius: 22px; }
[dir="rtl"] .fj-rail { padding: 10px 10px 10px 16px; }
.fj-rail ol { --p: 0; list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; position: relative; }
.fj-rail ol::before, .fj-rail ol::after { content: ""; position: absolute; inset-inline-start: 13.5px; top: 22px; bottom: 22px; width: 1px; border-radius: 1px; }
.fj-rail ol::before { background: rgba(201, 162, 255, .2); }
.fj-rail ol::after { width: 2px; inset-inline-start: 13px; transform-origin: top; transform: scaleY(var(--p));
  background: linear-gradient(180deg, var(--acc), var(--tone)); box-shadow: 0 0 12px rgba(var(--tone-rgb), .8); }
.fj-rail button { position: relative; display: flex; align-items: center; gap: 12px; min-height: 44px; min-width: 44px; padding: 4px 6px 4px 0; background: none; border: 0; border-radius: 14px; cursor: pointer; color: #bdb4da; text-align: start; }
[dir="rtl"] .fj-rail button { padding: 4px 0 4px 6px; }
.fj-rail .dot { position: relative; z-index: 1; width: 28px; height: 28px; flex: none; display: grid; place-items: center; border-radius: 50%; color: transparent; font: 600 10px/1 var(--mono); }
.fj-rail .dot::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--bg); border: 1.5px solid rgba(201, 162, 255, .55);
  transition: transform .5s var(--ease); }
.fj-rail .lbl { display: grid; grid-template-rows: auto 0fr; line-height: 1.3; transition: grid-template-rows .6s var(--ease), transform .6s var(--ease); }
.fj-rail .lbl b { font: 600 10.5px/1.3 var(--mono); letter-spacing: .2em; color: #bdb4da; }
.fj-rail .lbl small { overflow: hidden; font-size: 12.5px; color: var(--muted); opacity: 0; transition: opacity .5s ease; }
[dir="rtl"] .fj-rail .lbl b { font-family: var(--ar); font-size: 13px; letter-spacing: 0; font-weight: 650; }
.fj-rail li.done .dot::before { background: rgba(var(--tone-rgb), .9); border-color: transparent; transform: scale(.7); }
.fj-rail li.on .dot::before { background: var(--tone); border-color: #fff; transform: scale(1.35); box-shadow: 0 0 0 5px rgba(var(--tone-rgb), .18), 0 0 18px rgba(var(--tone-rgb), .9); }
.fj-rail li.on .lbl { grid-template-rows: auto 1fr; transform: translateX(3px); }
[dir="rtl"] .fj-rail li.on .lbl { transform: translateX(-3px); }
.fj-rail li.on .lbl small { opacity: 1; }
.fj-rail li.on .lbl b, .fj-rail button:hover .lbl b { color: var(--ink); }
.fj-rail li.on .lbl b { color: var(--tone); }

/* ---------- narrative text ---------- */
.fj-text { position: fixed; z-index: 10; inset: 0; pointer-events: none; perspective: 900px; }
/* no box: each line sits on a soft dark scrim that hugs it (readable over the brightest moment).
 * "on" (set by js/journey.js while the camera is in the line's window) brings it in, word by word,
 * from depth; "past" sends it on towards the camera, otherwise it sinks back into the world. */
.fj-l { --y: 0px; position: absolute; left: 50%; top: 50%; width: max-content; max-width: min(900px, 86vw); margin: 0; padding: .25em .6em .32em; text-align: center; transform-origin: 50% 50%;
  text-wrap: balance; text-shadow: 0 2px 18px rgba(4, 3, 12, .95), 0 1px 2px rgba(0, 0, 0, .9);
  opacity: 0; visibility: hidden; filter: blur(10px); transform: translate(-50%, calc(-50% + var(--y))) translateZ(-180px);
  transition: opacity .45s ease, transform .9s var(--ease), filter .5s ease, visibility 0s linear .9s; }
.fj-l::before { content: ""; position: absolute; z-index: -1; inset: -34% -10%; pointer-events: none; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(4, 3, 12, .86), rgba(4, 3, 12, .72) 55%, rgba(4, 3, 12, 0)); }
.fj-l.past { transform: translate(-50%, calc(-50% + var(--y))) translateZ(240px); filter: blur(12px); }
.fj-l.on { opacity: 1; visibility: visible; filter: none; transform: translate(-50%, calc(-50% + var(--y))); transition: opacity .45s ease, transform .9s var(--ease), filter .5s ease; }
.fj-l.big { font-size: clamp(32px, 5.2vw, 76px); font-weight: 700; line-height: 1.06; letter-spacing: -.032em; }
.fj-l.mid { font-size: clamp(20px, 2.5vw, 34px); font-weight: 600; line-height: 1.32; letter-spacing: -.012em; color: #ece6ff; }
.fj-l.small { font-size: clamp(15px, 1.3vw, 18px); font-weight: 500; line-height: 1.6; color: #e2dcf5; max-width: min(620px, 86vw); padding: .7em 1.1em; border-radius: 16px;
  background: var(--glass-solid); border: 1px solid var(--line); text-shadow: none; }
.fj-l.small::before { display: none; }
[dir="rtl"] .fj-l { letter-spacing: 0; line-height: 1.5; }
[dir="rtl"] .fj-l.big { font-family: "Reem Kufi CS", var(--ar); font-weight: 700; line-height: 1.35; letter-spacing: 0; word-spacing: .14em; }
[dir="rtl"] .fj-l.mid { letter-spacing: 0; }
.fj-l .w { --k: 0; display: inline-block; white-space: pre; opacity: 0; transform: translateY(.5em) rotateX(55deg);
  transition: opacity .5s ease calc(var(--k) * 38ms), transform .7s var(--ease) calc(var(--k) * 38ms); }
.fj-l.on .w { opacity: 1; transform: none; }
.fj-l em { font-style: normal; color: transparent; background: linear-gradient(100deg, #fff 0%, var(--tone) 45%, var(--acc) 75%, var(--mag) 130%); -webkit-background-clip: text; background-clip: text; text-shadow: none;
  filter: drop-shadow(0 0 18px rgba(var(--tone-rgb), .45)); }
/* a quiet kicker line under each big line, in the colour of the moment */
.fj-l.big::after { content: ""; display: block; width: 56px; height: 2px; margin: .28em auto 0; border-radius: 2px; background: linear-gradient(90deg, transparent, var(--tone), transparent);
  opacity: 0; transform: scaleX(.2); transition: opacity .6s ease .35s, transform 1s var(--ease) .35s; }
.fj-l.big.on::after { opacity: 1; transform: none; }
/* lower quality steps and held views: no blur, no depth; held views only fade */
.fj-q2 .fj-l { filter: none; transform: translate(-50%, calc(-50% + var(--y) + 14px)); }
.fj-q2 .fj-l.on { transform: translate(-50%, calc(-50% + var(--y))); }
.fj-q2 .fj-l .w { transform: none; }
.fj-q2 .fj-l em { filter: none; }
.fj-still .fj-l, .fj-still .fj-l.past, .fj-still .fj-l.on { filter: none; transform: translate(-50%, calc(-50% + var(--y))); transition: opacity .5s ease, visibility 0s linear .5s; }
.fj-still .fj-l.on { transition: opacity .5s ease; }
.fj-still .fj-l .w, .fj-still .fj-l.big::after { opacity: 1; transform: none; transition: none; }
@media (min-width: 1200px) { .fj-l { max-width: min(900px, calc(100vw - 600px)); } .fj-l.small { max-width: min(620px, calc(100vw - 600px)); } }
@media (min-width: 861px) and (max-width: 1199px) { .fj-l { max-width: min(900px, calc(100vw - 200px)); } }

/* verdict labels, placed over the three monoliths */
.fj-labels { position: fixed; z-index: 9; inset: 0; pointer-events: none; }
.fj-lab { position: absolute; left: 0; top: 0; display: grid; justify-items: center; gap: 5px; padding: 9px 14px 10px; border-radius: 14px; opacity: 0; transition: opacity .5s ease; text-align: center; white-space: nowrap;
  border-color: color-mix(in srgb, var(--c) 55%, transparent); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 0 30px -8px var(--c); background-color: rgba(9, 6, 22, .85); }
.fj-lab b { font: 600 clamp(12px, 1.25vw, 17px)/1 var(--mono); letter-spacing: .24em; margin-inline-start: .24em; color: var(--c); }
.fj-lab small { font-size: clamp(12px, 1vw, 13.5px); color: #e4def5; }
.fj-lab.on { opacity: 1; }
[dir="rtl"] .fj-lab b { font-family: "Reem Kufi CS", var(--ar); letter-spacing: 0; margin: 0; font-size: clamp(15px, 1.5vw, 20px); line-height: 1.2; }

/* ---------- the ending ---------- */
.fj-final { position: fixed; z-index: 12; inset: 0; display: grid; place-content: center; justify-items: center; text-align: center; gap: 10px; padding: 0 20px;
  opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .8s ease, visibility 0s linear .8s; }
.fj-final > * { --k: 0; opacity: 0; transform: translateY(22px); filter: blur(8px); transition: opacity .8s ease calc(var(--k) * 120ms), transform 1.1s var(--ease) calc(var(--k) * 120ms), filter .8s ease calc(var(--k) * 120ms); }
.fj-final.show > * { opacity: 1; transform: none; filter: none; }
.fj-final > .brand { transform: scale(1.08); letter-spacing: .3em; }
.fj-final.show > .brand { transform: none; letter-spacing: .16em; }
.fj-still .fj-final > *, .fj-q2 .fj-final > * { transform: none; filter: none; transition: opacity .5s ease; }
/* a scrim: the dawn stays a backdrop, never runs under the words or the buttons */
.fj-final::before { content: ""; position: absolute; z-index: -1; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 62% 58% at 50% 50%, rgba(4, 3, 12, .9), rgba(4, 3, 12, .78) 55%, rgba(4, 3, 12, .35) 85%, rgba(4, 3, 12, .1)); }
.fj-final.show { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity .8s ease; }
.fj-final .brand { margin: 0; font: 800 clamp(42px, 9vw, 128px)/1 var(--sans); letter-spacing: .16em; margin-inline-start: .16em; direction: ltr;
  background: linear-gradient(100deg, #fff 0%, #efe4ff 22%, var(--acc) 45%, var(--cyan) 68%, var(--mag) 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 44px rgba(201, 162, 255, .35)); transition: opacity .8s ease, transform 1.4s var(--ease), letter-spacing 1.6s var(--ease), filter .8s ease; }
.fj-final .tag { margin: 0; font: 600 clamp(13px, 1.5vw, 18px)/1.4 var(--mono); letter-spacing: .5em; margin-inline-start: .5em; color: var(--acc); }
[dir="rtl"] .fj-final .tag { font-family: "Reem Kufi CS", var(--ar); font-size: clamp(19px, 2.1vw, 26px); letter-spacing: 0; margin: 0; }
.fj-final .motto { margin: 22px 0 0; font-size: clamp(17px, 1.8vw, 24px); font-weight: 600; color: var(--ink); }
.fj-final .ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 26px; }
.fj-final .ctas a { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 13px 24px; border-radius: 999px; text-decoration: none; font-weight: 650;
  border: 1px solid rgba(201, 162, 255, .35); background: rgba(14, 10, 32, .9); transition: transform .35s var(--ease), border-color .3s, box-shadow .35s; }
.fj-final .ctas a.go { border: 0; color: #0b0618; background: linear-gradient(100deg, #f1e6ff, var(--acc) 45%, var(--cyan)); box-shadow: 0 12px 44px -10px rgba(201, 162, 255, .75); }
.fj-final .ctas a:hover { transform: translateY(-2px); border-color: rgba(201, 162, 255, .7); }
.fj-final .ctas a.go:hover { box-shadow: 0 16px 54px -10px rgba(34, 232, 255, .6); }
.fj-final .note { max-width: 580px; margin: 18px 0 0; padding: 11px 16px; border-radius: 14px; font-size: 13.5px; line-height: 1.6; color: #cfc7e8; }
.fj-end .fj-hint, .fj-end .fj-chap { opacity: 0; }

/* ---------- HUD: the chapter card and the telemetry ---------- */
.fj-hud { position: fixed; z-index: 14; left: clamp(14px, 3vw, 32px); right: clamp(14px, 3vw, 32px); bottom: max(16px, env(safe-area-inset-bottom)); pointer-events: none; }
.fj-hud-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 12px; }
.fj-chap { display: flex; align-items: center; gap: 14px; padding: 10px 18px 10px 12px; border-radius: 18px; transition: opacity .6s ease; }
[dir="rtl"] .fj-chap { padding: 10px 12px 10px 18px; }
.fj-code { font: 300 34px/1 var(--sans); letter-spacing: -.04em; color: var(--tone); text-shadow: 0 0 22px rgba(var(--tone-rgb), .55); min-width: 1.4em; font-variant-numeric: tabular-nums; direction: ltr; }
.fj-chap-t { display: grid; gap: 3px; line-height: 1.25; }
.fj-stage { font: 600 11.5px/1.2 var(--mono); letter-spacing: .26em; color: var(--ink); unicode-bidi: isolate; }
.fj-chap-t small { font-size: 13px; color: var(--muted); }
[dir="rtl"] .fj-stage { font-family: "Reem Kufi CS", var(--ar); font-size: 16px; letter-spacing: 0; }
.fj-tele { display: flex; align-items: center; gap: 18px; padding: 9px 16px; border-radius: 999px; font: 500 11px/1 var(--mono); letter-spacing: .16em; color: var(--muted); text-transform: uppercase; }
.fj-sig { display: inline-flex; align-items: center; gap: 8px; }
.fj-sig em { font-style: normal; }
.fj-sig b, .fj-depth b { color: var(--ink); font-weight: 600; unicode-bidi: isolate; }
.fj-sig b { color: var(--tone); }
/* (no colour transitions on what follows --tone: the grade changes it a few times a second, and each
 * transition would keep repainting the glass under it; the grade is gradual enough on its own) */
/* the pulse: a ring that grows and fades (transform and opacity only: the compositor runs it, no repaint of the glass under it) */
.fj-pulse { position: relative; width: 7px; height: 7px; border-radius: 50%; background: var(--tone); }
.fj-pulse::after { content: ""; position: absolute; inset: -1px; border-radius: 50%; border: 1.5px solid rgba(var(--tone-rgb), .7); animation: fj-pulse 2.4s ease-out infinite; }
@keyframes fj-pulse { 0% { transform: scale(1); opacity: .9; } 80%, 100% { transform: scale(3.4); opacity: 0; } }
[dir="rtl"] .fj-tele, [dir="rtl"] .fj-sig b { font-family: var(--ar); letter-spacing: 0; font-size: 12.5px; text-transform: none; }
.fj-depth { display: inline-flex; align-items: baseline; gap: 8px; } .fj-depth i { font-style: normal; unicode-bidi: isolate; } .fj-depth b { direction: ltr; font-family: var(--mono); letter-spacing: .12em; }
.fj-line { position: relative; height: 2px; border-radius: 2px; background: rgba(201, 162, 255, .16); direction: ltr; }
.fj-line .seg { position: absolute; top: -3px; width: 1px; height: 8px; background: rgba(201, 162, 255, .4); }
.fj-line i { position: absolute; left: 0; top: 0; bottom: 0; width: 100%; transform-origin: left; transform: scaleX(0); border-radius: 2px;
  background: linear-gradient(90deg, #7246e0, var(--acc) 40%, var(--tone)); box-shadow: 0 0 14px rgba(var(--tone-rgb), .8); }

.fj-hint { position: fixed; z-index: 13; left: 50%; bottom: 110px; transform: translateX(-50%); display: grid; justify-items: center; gap: 12px; pointer-events: none; transition: opacity .6s, transform .8s var(--ease); }
.fj-hint b { padding: 8px 14px; border-radius: 999px; background: var(--glass-solid); border: 1px solid var(--line); font: 600 10.5px/1 var(--mono); letter-spacing: .34em; color: var(--acc); text-transform: uppercase; white-space: nowrap; }
[dir="rtl"] .fj-hint b { letter-spacing: 0; font-family: var(--ar); font-size: 13px; text-transform: none; }
.fj-mouse { width: 24px; height: 38px; border: 1.5px solid rgba(244, 239, 255, .7); border-radius: 13px; position: relative; }
.fj-mouse i { position: absolute; left: 50%; top: 7px; width: 3px; height: 7px; margin-left: -1.5px; border-radius: 2px; background: var(--acc); animation: fj-wheel 1.6s var(--ease) 6; }
@keyframes fj-wheel { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(12px); opacity: 0; } 100% { opacity: 0; } }
.fj-hint.gone { opacity: 0; transform: translateX(-50%) translateY(10px); }
.fj-still .fj-mouse i, .fj-still .fj-pulse::after { animation: none; }

/* ---------- the text version (no WebGL, no JS, screen readers, and "text version" mode) ---------- */
.fj-static { display: none; pointer-events: auto; max-width: 760px; margin: 0 auto; padding: 120px 22px 80px; }
.fj-static-close { display: none; }
html:not(.js) .fj-static, .fj-nogl .fj-static { display: block; }
html:not(.js) .fj-track, .fj-nogl .fj-track { height: auto; }
html:not(.js) #fj-gl, html:not(.js) #fj-xfade, html:not(.js) .fj-hud, html:not(.js) .fj-hint, html:not(.js) .fj-rail,
.fj-nogl #fj-gl, .fj-nogl #fj-xfade, .fj-nogl .fj-hud, .fj-nogl .fj-hint, .fj-nogl .fj-rail, .fj-nogl .fj-text, .fj-nogl .fj-labels, .fj-nogl .fj-final { display: none; }
.fj-static h1 { font-size: clamp(34px, 6vw, 60px); line-height: 1.1; letter-spacing: -.02em; margin: 0 0 24px; outline: none; }
.fj-static h2 { margin: 48px 0 6px; font: 600 12px/1.3 var(--mono); letter-spacing: .3em; color: var(--acc); }
[dir="rtl"] .fj-static h2 { font-family: var(--ar); font-size: 15px; letter-spacing: 0; }
.fj-static h3 { margin: 0 0 14px; font-size: 24px; }
.fj-static p { font-size: 18px; color: #d9d2ee; }
.fj-static a { color: var(--cyan); }
.fj-static a:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 4px; }
/* screen readers read the text version; sighted visitors with WebGL get the film (or open the text version) */
.js:not(.fj-nogl):not(.fj-textmode) .fj-static { display: block; position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
/* "text version" mode: the skip link opens it for everyone, on its own dark page */
.fj-textmode, .fj-textmode body { overflow: hidden; }
.fj-textmode .fj-static { display: block; position: fixed; z-index: 60; inset: 0; max-width: none; margin: 0; overflow-y: auto; overscroll-behavior: contain;
  background: radial-gradient(80% 50% at 50% 0%, rgba(114, 70, 224, .18), transparent 70%), var(--bg);
  padding: 96px max(22px, calc((100vw - 760px) / 2)) 80px; }
.fj-textmode .fj-static-close { display: inline-flex; position: fixed; z-index: 61; top: 16px; inset-inline-end: clamp(14px, 3vw, 32px); height: 44px; }
.fj-textmode .fj-top, .fj-textmode .fj-rail, .fj-textmode .fj-hud, .fj-textmode .fj-hint, .fj-textmode .fj-text, .fj-textmode .fj-labels, .fj-textmode .fj-final, .fj-textmode .fj-skip { visibility: hidden; }

/* ---------- sizes ---------- */
@media (min-width: 861px) and (max-width: 1199px) {
  .fj-rail .lbl { display: none; }
  .fj-rail button, [dir="rtl"] .fj-rail button { padding: 4px 0; justify-content: center; }
  .fj-rail, [dir="rtl"] .fj-rail { padding: 8px 6px; }
  .fj-rail ol::before { inset-inline-start: calc(50% - .5px); }
  .fj-rail ol::after { inset-inline-start: calc(50% - 1px); }
}
@media (max-width: 860px) {
  .fj-top { padding: 10px 12px; gap: 8px; }
  .fj-title { display: none; }
  .fj-tools { margin-inline-start: auto; gap: 6px; }
  .fj-btn { height: 44px; min-width: 44px; }
  .sfx-btn { width: 44px; }
  .fj-back { padding: 0; width: 44px; }
  .fj-back span { display: none; }                                          /* compact: the icon; its name stays in aria-label */
  .fj-back svg { display: block; }
  /* the route lies down above the timeline, in the same direction as it */
  .fj-rail, [dir="rtl"] .fj-rail { top: auto; bottom: calc(max(12px, env(safe-area-inset-bottom)) + 74px); left: 10px; right: 10px; transform: none; padding: 0 6px; border-radius: 999px; }
  .fj-rail ol { grid-auto-flow: column; justify-content: space-between; direction: ltr; }
  .fj-rail ol::before, .fj-rail ol::after { left: 22px; right: 22px; inset-inline-start: auto; top: 50%; bottom: auto; width: auto; height: 1px; }
  .fj-rail ol::after { height: 2px; margin-top: -.5px; transform-origin: left; transform: scaleX(var(--p)); background: linear-gradient(90deg, var(--acc), var(--tone)); }
  .fj-rail .lbl { display: none; }
  .fj-rail button, [dir="rtl"] .fj-rail button { padding: 0; justify-content: center; width: 44px; height: 44px; }
  .fj-hud { bottom: max(12px, env(safe-area-inset-bottom)); }
  .fj-hud-row { margin-bottom: 9px; gap: 8px; }
  .fj-chap { padding: 7px 12px 7px 9px; gap: 10px; border-radius: 14px; min-width: 0; }
  [dir="rtl"] .fj-chap { padding: 7px 9px 7px 12px; }
  .fj-code { font-size: 24px; }
  .fj-chap-t small { display: none; }
  .fj-tele { padding: 8px 12px; gap: 10px; }
  .fj-depth, .fj-sig em { display: none; }                                   /* the state alone: no room for the rest */
  .fj-hint { bottom: 170px; }
  .fj-track { height: 820vh; }
  .fj-l { max-width: 90vw; }
  .fj-l.big { font-size: clamp(28px, 8vw, 42px); }
  .fj-lab { padding: 6px 8px 7px; white-space: normal; max-width: 31vw; }
  .fj-lab b { font-size: 11.5px; letter-spacing: .08em; margin-inline-start: .08em; }
  .fj-lab small { font-size: 11.5px; line-height: 1.25; }
  .fj-final .ctas a { padding: 12px 20px; }
}
@media (prefers-reduced-motion: reduce) { .fj-mouse i, .fj-pulse::after { animation: none; } .fj-skip { transition: none; } }
.reduce-motion .fj-mouse i, .reduce-motion .fj-pulse::after { animation: none; }
/* quality steps (js/journey.js lowers them on slow frames): no live blur over the canvas */
.fj-q2 .fj-rail, .fj-q2 .fj-btn, .fj-q2 .fj-chap, .fj-q2 .fj-tele, .fj-q2 .fj-lab, .fj-q2 .fj-final .note { backdrop-filter: none; -webkit-backdrop-filter: none; background-color: var(--glass-solid); }

/* ---------- your file: the way back to the example (or to your last scan), and its verdict pillar ---------- */
.fj-mine svg, .fj-playbtn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.fj-mine { border-color: rgba(34, 232, 255, .4); }
.fj-lab.you { padding-top: 7px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 0 44px -4px var(--c), 0 0 0 1.5px var(--c); }
.fj-lab .you-tag { font: 700 10px/1 var(--mono); letter-spacing: .22em; color: #04030c; background: var(--c); padding: 3px 8px; border-radius: 999px; }
[dir="rtl"] .fj-lab .you-tag { font-family: var(--ar); letter-spacing: 0; font-size: 11.5px; }
.fj-lab.dim.on { opacity: .45; }

/* ---------- autoplay: the play button, the controls while it plays, the subtitles ---------- */
.fj-playbtn { border-color: rgba(34, 232, 255, .45); }
.fj-playbtn .pa, .fj-playbtn.is-on .pl { display: none; }
.fj-playbtn.is-on .pa { display: inline; }
.fj-playbtn .pl { fill: currentColor; fill-opacity: .25; }
.fj-auto { position: fixed; z-index: 21; top: 72px; left: 50%; transform: translateX(-50%); display: flex; flex-wrap: nowrap; align-items: center; justify-content: center; gap: 6px; padding: 6px;
  max-width: calc(100% - 24px); border-radius: 18px; background: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, 0) 60%), var(--glass-solid); border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 18px 50px -24px rgba(0, 0, 0, .9); }
.fj-auto[hidden] { display: none; }
.fj-a-btn { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 12px; border-radius: 12px; border: 1px solid transparent; background: transparent; color: var(--ink); font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.fj-a-btn:hover:not(:disabled) { background: rgba(var(--tone-rgb), .14); }
.fj-a-btn:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.fj-a-btn:disabled { opacity: .6; cursor: default; }
.fj-a-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.fj-a-btn.pp .pl, .fj-a-btn.pp.is-paused .pa { display: none; }
.fj-a-btn.pp.is-paused .pl { display: inline; fill: currentColor; fill-opacity: .25; }
.fj-a-btn[aria-pressed="true"] { border-color: rgba(34, 232, 255, .45); background: rgba(34, 232, 255, .1); }
.fj-a-btn.cl .dot { fill: #ff4f7a; stroke: none; }
.fj-a-btn.cl.is-rec { border-color: rgba(255, 79, 122, .6); background: rgba(255, 79, 122, .12); }
.fj-a-btn.cl.is-rec .dot { animation: fj-rec 1s steps(2, jump-none) infinite; }
@keyframes fj-rec { 50% { opacity: .25; } }
.fj-a-msg { font-size: 12.5px; color: var(--cyan); padding-inline: 4px; }
.fj-a-msg:empty { display: none; }
.fj-a-keys { font: 500 10.5px/1.3 var(--mono); letter-spacing: .06em; color: var(--muted); padding-inline: 8px 4px; }
[dir="rtl"] .fj-a-keys { font-family: var(--ar); letter-spacing: 0; font-size: 12px; }
.fj-subt { position: fixed; z-index: 13; left: 50%; bottom: 104px; transform: translate(-50%, 8px); width: max-content; max-width: min(760px, calc(100% - 32px)); margin: 0; padding: 10px 18px;
  border-radius: 14px; background: rgba(4, 3, 12, .82); border: 1px solid rgba(var(--tone-rgb), .3); color: #f4efff; font-size: clamp(15px, 1.5vw, 18px); line-height: 1.55; text-align: center;
  opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .45s ease, transform .6s var(--ease), visibility 0s linear .45s; }
.fj-subt.on { opacity: 1; visibility: visible; transform: translate(-50%, 0); transition: opacity .45s ease, transform .6s var(--ease); }
.fj-subt:empty { display: none; }
.fj-auto-on .fj-hint { opacity: 0; }
@media (max-width: 860px) {
  .fj-playbtn span, .fj-mine span { display: none; }
  .fj-playbtn, .fj-mine { width: 44px; padding: 0; }
  .fj-auto { top: 64px; gap: 2px; }
  .fj-a-btn { padding: 0 9px; height: 40px; }
  .fj-a-btn span, .fj-a-keys { display: none; }
  .fj-subt { bottom: calc(max(12px, env(safe-area-inset-bottom)) + 128px); font-size: 14.5px; padding: 8px 14px; }
}
@media (prefers-reduced-motion: reduce) { .fj-subt, .fj-subt.on { transition: opacity .3s ease; transform: translate(-50%, 0); } .fj-a-btn.cl.is-rec .dot { animation: none; } }
.fj-q2 .fj-auto { backdrop-filter: none; }
.fj-textmode .fj-auto, .fj-textmode .fj-subt { visibility: hidden; }
@media (max-width: 480px) {
  .fj-top { gap: 6px; }
  .fj-brand span { display: none; }                                        /* the shield stays: room for the controls */
  .fj-tools { gap: 4px; }
}
