:root {
  --bg: #0a0b14;
  --bg-2: #11131f;
  --ink: #eef0ff;
  --mute: #8a8fb0;
  --line: rgba(238, 240, 255, .12);
  --acc: #c6ff3d;
  --acc-2: #7b5cff;
  --acc-3: #ff5ca8;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --sans: "Space Grotesk", system-ui, sans-serif;
  --gut: clamp(16px, 4vw, 56px);
  --ease: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body.loading { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
mark { background: none; color: var(--acc); }
.ico { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.label { font: 500 12px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink); }
.dim { color: var(--mute); }
::selection { background: var(--acc); color: var(--bg); }

/* ---------- Loader ---------- */
.loader {
  position: fixed; inset: 0; z-index: 100; background: var(--bg);
  display: flex; flex-direction: column; justify-content: space-between;
  padding: var(--gut); overflow: hidden; transition: clip-path 1s var(--ease);
  clip-path: inset(0 0 0 0);
}
.loader.done { clip-path: inset(0 0 100% 0); }
.loader-glow {
  position: absolute; left: 50%; top: 55%; width: 60vmax; height: 60vmax; translate: -50% -50%;
  background: radial-gradient(circle, rgba(123, 92, 255, .35), transparent 60%);
  filter: blur(20px); animation: pulse 2.4s ease-in-out infinite; pointer-events: none;
}
.loader-top { position: relative; display: flex; justify-content: space-between; font: 500 12px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--mute); }
.loader-top span:first-child::after { content: "_"; animation: blink 1s steps(1) infinite; }
.loader-bar { position: relative; height: 2px; background: var(--line); margin-top: auto; margin-bottom: 18px; }
.loader-bar i { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--acc); box-shadow: 0 0 16px var(--acc); }
.loader-count { position: relative; font: 800 clamp(72px, 20vw, 240px)/.85 var(--mono); letter-spacing: -.04em; }
.loader-count b { font-weight: 800; }
@keyframes pulse { 50% { opacity: .55; scale: .9; } }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- Cursor ---------- */
.cursor { position: fixed; inset: 0; pointer-events: none; z-index: 90; }
.cursor i { position: absolute; left: 0; top: 0; border-radius: 50%; will-change: transform; }
.cur-dot { width: 6px; height: 6px; margin: -3px; background: var(--acc); }
.cur-ring { width: 36px; height: 36px; margin: -18px; border: 1px solid rgba(238, 240, 255, .5); transition: width .3s var(--ease), height .3s var(--ease), margin .3s var(--ease), background .3s, border-color .3s; }
.cursor.hover .cur-ring { width: 64px; height: 64px; margin: -32px; background: rgba(198, 255, 61, .1); border-color: var(--acc); }
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }
@media (hover: hover) and (pointer: fine) { body.has-cursor, body.has-cursor a, body.has-cursor button { cursor: none; } }

/* ---------- Top bar ---------- */
.top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: max(14px, env(safe-area-inset-top)) var(--gut) 14px;
  transition: background .4s, backdrop-filter .4s, transform .5s var(--ease);
}
.brand { display: flex; align-items: center; gap: 14px; }
.logo { position: relative; font: 800 19px/.8 var(--mono); letter-spacing: -.04em; color: var(--ink); transition: color .3s; }
.logo i { position: absolute; right: -9px; bottom: 1px; width: 6px; height: 6px; background: var(--acc); }
.brand:hover .logo { color: var(--acc); }
.who { display: grid; font: 500 11px/1.35 var(--mono); }
.who b { font-weight: 800; }
.who span { color: var(--mute); }
.nav { transition: opacity .4s; }
body:not(.past-story) .nav { opacity: 0; pointer-events: none; }
.nav { display: flex; gap: 6px; }
.nav a { font: 500 12px var(--mono); text-transform: uppercase; letter-spacing: .06em; padding: 8px 14px; border-radius: 99px; transition: background .3s, color .3s; }
.nav a:hover, .nav a.on { background: var(--ink); color: var(--bg); }
.snd { display: flex; align-items: center; gap: 10px; padding: 9px 14px; border: 1px solid var(--line); border-radius: 99px; font: 500 12px var(--mono); text-transform: uppercase; letter-spacing: .06em; transition: border-color .3s; }
.snd:hover { border-color: var(--acc); }
.snd-bars { display: flex; align-items: flex-end; gap: 2px; height: 12px; }
.snd-bars i { width: 2px; height: 3px; background: var(--ink); border-radius: 1px; transition: height .3s; }
.snd[aria-pressed="true"] .snd-bars i { background: var(--acc); animation: eq 1s ease-in-out infinite; }
.snd[aria-pressed="true"] .snd-bars i:nth-child(2) { animation-delay: -.3s; }
.snd[aria-pressed="true"] .snd-bars i:nth-child(3) { animation-delay: -.6s; }
.snd[aria-pressed="true"] .snd-bars i:nth-child(4) { animation-delay: -.15s; }
@keyframes eq { 0%, 100% { height: 3px; } 50% { height: 12px; } }

/* ---------- Story (story.js) ---------- */
html.locked, html.locked body { overflow: hidden; }
html.hand #scene { cursor: grab; }
html.grab, html.grab * { cursor: grabbing !important; }
#scene { position: fixed; left: 0; top: 0; width: 100%; height: 100vh; height: 100lvh; display: block; z-index: 0; touch-action: pan-y; }
.track { height: 860vh; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* headlines on the wall */
.wall { position: fixed; left: 50%; top: 0; z-index: 2; width: max-content; max-width: 94vw; text-align: center; pointer-events: none; visibility: hidden; color: #eef1ff; text-shadow: 0 2px 30px rgba(0, 0, 0, .35); }
.wall .ws, .wall .wb { display: block; overflow: hidden; padding: 0 .1em; }
.wall .wl { display: block; transform: translateY(calc((1 - var(--in, 0)) * 110% - var(--out, 0) * 110%)); will-change: transform; }
.wall .ws .wl { font: 500 clamp(15px, 2vw, 27px)/1.35 Manrope, sans-serif; letter-spacing: .03em; text-transform: uppercase; }
.wall .wb .wl { font: 400 clamp(46px, 6.8vw, 104px)/1.02 Anton, Impact, sans-serif; text-transform: uppercase; }

/* the OS on the modern monitor — every size below is in design pixels of the 1600×914 box */
.os { position: fixed; left: 0; top: 0; width: 1600px; height: 914px; transform-origin: 0 0; z-index: 1; opacity: 0; visibility: hidden; pointer-events: none; overflow: hidden; border-radius: 6px; font-family: "Segoe UI", Manrope, sans-serif; color: #fff; }
.os.on { visibility: visible; }
.os.live { pointer-events: auto; }
.os button { cursor: pointer; font-family: inherit; border: 0; }
.os-inner { position: absolute; inset: 0; transition: transform .55s cubic-bezier(.2, 1.6, .4, 1), filter .4s; }

/* skins: the new OS spreads out from the update window in a widening circle, a light ring rides its edge */
@property --r { syntax: "<length>"; inherits: false; initial-value: 0px; }
.skin { position: absolute; inset: 0; visibility: hidden; }
.skin.cur, .skin.prev { visibility: visible; }
.skin.prev { z-index: 0; animation: skin-dim 1.5s ease forwards; }
.skin.cur { z-index: 1; }
.skin.cur.enter { transform-origin: 50% 45%; -webkit-mask: radial-gradient(circle at 50% 45%, #000 calc(var(--r) - 70px), transparent var(--r)); mask: radial-gradient(circle at 50% 45%, #000 calc(var(--r) - 70px), transparent var(--r)); animation: skin-in 1.5s cubic-bezier(.6, 0, .35, 1) forwards; }
@keyframes skin-in { from { --r: 0px; transform: scale(1.06); } to { --r: 1100px; transform: scale(1); } }
@keyframes skin-dim { to { filter: brightness(.5) saturate(.7); } }
.os-wave { position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: 0; mix-blend-mode: screen; background: radial-gradient(circle at 50% 45%, transparent calc(var(--r) - 140px), rgba(120, 190, 255, .25) calc(var(--r) - 70px), rgba(235, 246, 255, .85) calc(var(--r) - 12px), rgba(255, 255, 255, .95) calc(var(--r) - 4px), transparent var(--r)); }
.os-wave.go { animation: skin-in 1.5s cubic-bezier(.6, 0, .35, 1) forwards, wave-fade 1.5s ease forwards; }
@keyframes wave-fade { 0% { opacity: 0; } 8%, 75% { opacity: 1; } 100% { opacity: 0; } }
.bg, .bg svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.bg95 { background: #078585; }
.bg7 { background: radial-gradient(ellipse 90% 80% at 75% 80%, #2fa2ff, transparent 60%), linear-gradient(160deg, #0f5fd6, #0a3fa8 55%, #082d7d); }
.bg11 { background: #08142a; }

.icons { position: absolute; left: 28px; top: 24px; display: grid; gap: 26px; }
.icons span { width: 140px; display: grid; justify-items: center; gap: 6px; font-size: 22px; line-height: 1.15; text-align: center; }
.icons svg { width: 72px; height: 72px; }
.icons em { font-style: normal; }
.icons95 span { font-family: Tahoma, Verdana, sans-serif; text-shadow: 1px 1px 0 #000; }
.icons7 span { text-shadow: 0 1px 3px #000a, 0 0 10px #0006; }
.icons11 span { text-shadow: 0 1px 4px #0008; }

.tbar { position: absolute; left: 0; right: 0; bottom: 0; height: 72px; display: flex; align-items: center; }
.mini-logo { font: 800 13px/.85 var(--mono); text-align: left; color: inherit; }
.mini-logo.dark { color: #1b2430; }
.tbar95 { gap: 10px; padding: 0 8px; background: #c3c3c3; box-shadow: inset 0 3px #fff; color: #000; font: 26px Tahoma, Verdana, sans-serif; }
.start95, .task95, .clk95 { height: 54px; display: flex; align-items: center; gap: 10px; padding: 0 18px; }
.start95 { font-weight: 700; box-shadow: inset -3px -3px #000, inset 3px 3px #fff, inset -5px -5px #808080; }
.start95 i { font-style: normal; }
.task95 { min-width: 240px; justify-content: center; box-shadow: inset 3px 3px #808080, inset -3px -3px #fff; }
.lbl95 { padding: 0 12px; font-size: 21px; color: #333; }
.clk95 { margin-left: auto; box-shadow: inset 3px 3px #808080, inset -3px -3px #fff; }
.tbar7 { gap: 14px; padding: 0 10px; background: linear-gradient(rgba(54, 89, 138, .85), rgba(19, 40, 74, .9)); box-shadow: inset 0 1px rgba(156, 200, 255, .6), inset 0 2px rgba(0, 0, 0, .4); font-size: 24px; }
.orb7 { width: 62px; height: 62px; margin-top: -8px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: radial-gradient(circle at 50% 30%, #c5e8ff, #3a8bdc 45%, #0f3c80 75%); box-shadow: 0 0 16px rgba(108, 192, 255, .65), inset 0 -6px 10px #082a5a; }
.task7 { height: 56px; display: flex; align-items: center; gap: 12px; padding: 0 22px; border-radius: 6px; background: linear-gradient(rgba(255, 255, 255, .23), rgba(255, 255, 255, .07)); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .33); }
.task7 svg { width: 36px; height: 36px; }
.task7 i { font-style: normal; }
.clk7 { margin-left: auto; height: 56px; display: flex; align-items: center; padding: 0 22px; border-left: 1px solid rgba(255, 255, 255, .2); }
.tbar11 { justify-content: center; background: rgba(233, 238, 246, .9); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); box-shadow: 0 -1px rgba(255, 255, 255, .55); }
.tb11 { display: flex; gap: 14px; }
.tb11 i { width: 56px; height: 56px; border-radius: 10px; display: grid; place-items: center; }
.tb11 i svg { width: 34px; height: 34px; }
.tb11 .act { background: rgba(255, 255, 255, .7); box-shadow: inset 0 -3px 0 -1px #1e78ff; }
.tray11 { position: absolute; right: 22px; display: flex; gap: 14px; align-items: center; color: #1b2430; font-size: 24px; }
.tray11 svg { width: 28px; height: 28px; }
.tray11 b { font-weight: 400; margin-left: 10px; }

/* the update window: one structure, its skin morphs from OS 95 to OS 7 */
.upd { position: absolute; left: 50%; top: 45%; z-index: 2; width: 1300px; transform: translate(-50%, -50%) scale(.6); opacity: 0; visibility: hidden; transition: opacity .5s, visibility .5s; }
.os.dlg-upd .upd { opacity: 1; visibility: visible; }
.upd, .upd * { transition-property: background, color, border-radius, box-shadow, opacity, height, padding, margin; transition-duration: 1s; transition-timing-function: cubic-bezier(.55, 0, .2, 1); }
.upd header { height: 66px; display: flex; align-items: center; justify-content: space-between; padding: 0 10px 0 22px; }
.upd header b { font-size: 34px; }
.upd .x { width: 56px; height: 44px; display: grid; place-items: center; font-size: 28px; font-weight: 700; }
.updbody { display: grid; grid-template-columns: 220px 1fr; gap: 50px; align-items: center; padding: 52px 64px 26px; }
.updicon { position: relative; width: 220px; height: 220px; }
.updicon svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.updt { font-size: 76px; font-weight: 700; letter-spacing: -.01em; line-height: 1.05; }
.upds { margin: 12px 0 34px; font-size: 48px; }
.upds b { font-weight: inherit; }
.prog { position: relative; height: 72px; }
.seg { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(24, 1fr); gap: 5px; padding: 8px; }
.seg i.on { background: var(--seg, #000080); }
.updbtn { display: block; width: calc(100% - 96px); height: 112px; margin: 18px 48px 42px; padding: 8px; font-size: 46px; letter-spacing: .03em; user-select: none; -webkit-user-select: none; touch-action: none; }
.updbtn span { display: flex; height: 100%; align-items: center; justify-content: center; }
.os[data-screen="95"] .upd { padding: 6px; border-radius: 0; background: #c3c3c3; color: #000; font-family: Tahoma, Verdana, sans-serif; box-shadow: inset -3px -3px #000, inset 3px 3px #dfdfdf, inset -6px -6px #808080, inset 6px 6px #fff, 0 20px 50px rgba(0, 0, 0, .33); }
.os[data-screen="95"] .upd header { background: linear-gradient(90deg, #000a80, #1084d0); color: #fff; }
.os[data-screen="95"] .upd .x { background: #c3c3c3; color: #000; box-shadow: inset -3px -3px #000, inset 3px 3px #fff, inset -5px -5px #808080; }
.os[data-screen="95"] .v7 { opacity: 0; }
.os[data-screen="95"] .seg { background: #fff; box-shadow: inset 3px 3px #808080, inset -3px -3px #dfdfdf; }
.os[data-screen="95"] .updbtn { background: #c3c3c3; color: #000; font-weight: 700; box-shadow: inset -3px -3px #000, inset 3px 3px #fff, inset -6px -6px #808080, inset 6px 6px #dfdfdf; }
.os[data-screen="95"] .updbtn span { outline: 3px dotted #000; outline-offset: -10px; }
.os[data-screen="95"] .updbtn.down { box-shadow: inset 3px 3px #000, inset -3px -3px #fff, inset 6px 6px #808080; }
.os[data-screen="7"] .upd { padding: 8px; border-radius: 12px; color: #000; background: linear-gradient(rgba(169, 210, 245, .92), rgba(106, 163, 223, .92)); box-shadow: 0 0 0 1px #2d5f99, inset 0 1px rgba(255, 255, 255, .8), 0 24px 60px rgba(0, 0, 0, .45); }
.os[data-screen="7"] .upd header { color: #10243c; text-shadow: 0 0 10px #fff, 0 0 18px #fff; }
.os[data-screen="7"] .upd .x { border-radius: 6px; color: #fff; background: linear-gradient(#e8a08f, #c7432b 50%, #b02a10); box-shadow: 0 0 0 1px #5a1407, inset 0 1px #ffd4c8; }
.os[data-screen="7"] .updbody, .os[data-screen="7"] .updbtn { background: #f2f5f9; }
.os[data-screen="7"] .updbody { border-radius: 4px 4px 0 0; box-shadow: inset 0 0 0 1px #8fb3d9; }
.os[data-screen="7"] .v95 { opacity: 0; }
.os[data-screen="7"] .seg { --seg: linear-gradient(#5be45b, #12a512 55%, #0c8f0c); border-radius: 4px; background: linear-gradient(#f4f4f4, #dcdcdc); box-shadow: inset 0 0 0 2px #b9b9b9; }
.os[data-screen="7"] .updbtn { width: 100%; height: 150px; margin: 0; padding: 18px 48px 44px; border-radius: 0 0 4px 4px; box-shadow: inset 0 0 0 1px #8fb3d9; }
.os[data-screen="7"] .updbtn span { border-radius: 6px; background: linear-gradient(#eaf6ff, #bfe1fb 48%, #a7d4f6 52%, #d6ecfc); box-shadow: 0 0 0 2px #3c7fb1, inset 0 1px #fff; color: #000; }
.os[data-screen="7"] .updbtn.down span { background: linear-gradient(#cfe8fb, #8fc6ef 48%, #7ab8e8 52%, #b8dbf6); }

/* modern dialogs: frosted navy glass, gradient type, a button that charges up before it can be clicked */
.dlg { position: absolute; left: 50%; top: 46%; z-index: 2; opacity: 0; visibility: hidden; transform: translate(-50%, -50%) scale(.8); transition: opacity .35s, transform .45s cubic-bezier(.2, .9, .25, 1.2), visibility .35s; }
.dlg.on { opacity: 1; visibility: visible; transform: translate(-50%, -50%) scale(.84); }
.md { width: 1388px; padding: 0 72px 72px; border-radius: 20px 20px 60px 60px; text-align: center; background: rgba(5, 23, 39, .7); backdrop-filter: blur(40px) saturate(1.2); -webkit-backdrop-filter: blur(40px) saturate(1.2); box-shadow: 0 40px 100px rgba(0, 0, 0, .45), inset 0 0 0 1px rgba(208, 232, 255, .08); --tx: radial-gradient(76% 95% at 0% 100%, #fff 0%, #d0e8ff 100%); }
.md.red { background: rgba(48, 6, 18, .72); box-shadow: 0 40px 100px rgba(42, 0, 8, .66), inset 0 0 0 1px rgba(255, 120, 140, .18); --tx: radial-gradient(76% 95% at 0% 100%, #fff 0%, #ffd6dc 100%); }
.md.green { background: rgba(4, 40, 30, .72); box-shadow: 0 40px 100px rgba(0, 20, 13, .66), inset 0 0 0 1px rgba(120, 255, 190, .16); --tx: radial-gradient(76% 95% at 0% 100%, #fff 0%, #d2ffe6 100%); }
.md :is(.md-bar span, .md-small, .md-big, .md-btn b) { background: var(--tx); -webkit-background-clip: text; background-clip: text; color: transparent; }
.md-bar { height: 68px; margin: 0 -72px 64px; padding: 0 34px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid rgba(208, 232, 255, .3); }
.md.red .md-bar { border-bottom-color: rgba(255, 150, 165, .3); }
.md.green .md-bar { border-bottom-color: rgba(150, 255, 200, .3); }
.md-bar span { margin-right: auto; font: 400 16px var(--mono); opacity: .7; }
.md-bar i { width: 20px; height: 20px; border-radius: 50%; background: var(--tx); opacity: .7; }
.md-small { margin-bottom: 32px; font: 400 28px/1.18 Manrope, sans-serif; opacity: .7; }
.md-big { font: 400 176px/.9 Anton, Impact, sans-serif; text-transform: uppercase; }
#dlg-error .md-big { font-size: 150px; }
#dlg-success .md-big { font-size: 118px; }
.md-btn { position: relative; width: 100%; height: 116px; margin-top: 64px; display: flex; align-items: center; justify-content: center; gap: 40px; border-radius: 16px; overflow: hidden; font: 400 28px Manrope, sans-serif !important; letter-spacing: .12em; text-transform: uppercase; color: #e6f2ff; background-color: #0a8cff; background-image: radial-gradient(ellipse 28% 120% at 58% 50%, rgba(170, 200, 255, .75), transparent 70%), linear-gradient(90deg, #4aa8ff 0%, #3d5cff 30%, #4b63ff 45%, #90b0ff 62%, #3f6dff 82%, #3157ff 100%); background-blend-mode: screen, normal; box-shadow: 0 18px 50px rgba(10, 100, 255, .35); transition: transform .14s, filter .2s, box-shadow .2s; }
.md-btn b { font-weight: 400; opacity: .95; }
.md-btn .ico { width: 30px; height: 30px; opacity: .85; }
.md-btn:hover { filter: brightness(1.08) saturate(1.1); box-shadow: 0 22px 60px rgba(10, 100, 255, .5); }
.md-btn:active { transform: translateY(4px) scale(.995); filter: brightness(.92); }
.md-btn.pressed::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 3px #cfe6ff; animation: btn-ring .3s ease-out forwards; }
@keyframes btn-ring { from { opacity: 1; } to { opacity: 0; } }
.md-btn.arming::before { content: ""; position: absolute; inset: 0; z-index: 1; background: rgba(5, 23, 39, .55); transform-origin: right center; animation: charge .75s cubic-bezier(.6, 0, .2, 1) forwards; }
@keyframes charge { from { transform: scaleX(1); } to { transform: scaleX(0); } }
.red .md-btn { background-color: #d7264a; background-image: radial-gradient(ellipse 28% 120% at 58% 50%, rgba(255, 190, 200, .6), transparent 70%), linear-gradient(90deg, #ff5f7a 0%, #d0234a 35%, #e0365a 55%, #ff8a9c 66%, #c81f45 85%, #a8183a 100%); box-shadow: 0 18px 50px rgba(220, 30, 70, .35); }
.green .md-btn { background-color: #12b876; background-image: radial-gradient(ellipse 28% 120% at 58% 50%, rgba(200, 255, 225, .6), transparent 70%), linear-gradient(90deg, #4fe3a0 0%, #13a96c 35%, #1bbd7c 55%, #8ff0c0 66%, #0f9d63 85%, #0a8452 100%); box-shadow: 0 18px 50px rgba(20, 190, 120, .35); }
#dlg-error.on .md-big { animation: glitch 1.4s steps(1) infinite; }
@keyframes glitch { 0%, 100% { transform: none; } 8% { transform: translateX(-6px); } 9% { transform: translateX(5px) skewX(-6deg); } 10% { transform: none; } 61% { transform: translateY(3px); } 62% { transform: none; } }
.os-red { position: absolute; inset: 0; z-index: 3; pointer-events: none; opacity: 0; background: radial-gradient(ellipse at center, rgba(255, 40, 70, .35), rgba(140, 0, 20, .85)); mix-blend-mode: multiply; }
.os.alarm .os-red { animation: alarm 3.2s ease-in-out infinite; }
@keyframes alarm { 0%, 100% { opacity: .15; } 45% { opacity: .55; } 60% { opacity: .45; } }
.os.glitch .skin.cur { animation: shake .5s steps(2) 2; filter: hue-rotate(40deg) saturate(1.4); }
@keyframes shake { 0% { transform: translate(6px, -3px); } 50% { transform: translate(-6px, 4px); } }
.os-scan { position: absolute; inset: 0; z-index: 4; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .07) 0 2px, transparent 2px 4px); }
.os-toast { position: absolute; right: 24px; bottom: 92px; z-index: 5; max-width: 560px; padding: 18px 24px; border-radius: 12px; background: rgba(5, 23, 39, .82); color: #fff; font: 22px/1.35 Manrope, sans-serif; opacity: 0; transform: translateY(20px); transition: opacity .4s, transform .4s; }
.os-toast.on { opacity: 1; transform: none; }
@media (orientation: portrait) {
  .upd { width: 1100px; } .updbody { grid-template-columns: 1fr; padding: 40px; } .updicon { display: none; }
  .md { width: 1060px; padding: 0 56px 56px; } .md-bar { margin: 0 -56px 48px; } .md-big { font-size: 132px; } #dlg-error .md-big { font-size: 112px; } #dlg-success .md-big { font-size: 92px; }
}
@media (hover: none) {           /* phones: frosted glass on this big transformed layer is too expensive */
  .md { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(8, 28, 52, .94); }
  .md.red { background: rgba(60, 8, 22, .94); } .md.green { background: rgba(6, 46, 34, .94); }
}

/* hint + skip pills */
.hint, .skip { position: fixed; bottom: max(18px, env(safe-area-inset-bottom)); z-index: 20; display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 99px; background: rgba(26, 22, 56, .82); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); font: 500 12px var(--mono); color: #dfe2ff; white-space: nowrap; transition: opacity .4s, background .3s, color .3s; }
.hint { left: 50%; transform: translateX(-50%); pointer-events: none; }
.skip { right: var(--gut); }
.skip:hover { background: var(--acc); color: var(--bg); }
body.waiting .hint { background: var(--acc); color: var(--bg); animation: nudge 1.4s ease-in-out infinite; }
body.loading .hint, body.past-story .hint, body.at-end:not(.waiting) .hint, body.loading .skip, body.past-story .skip { opacity: 0; pointer-events: none; }
@keyframes nudge { 50% { transform: translateX(-50%) translateY(-4px); } }

/* ---------- Sections ---------- */
.content { position: relative; z-index: 5; background: var(--bg); }
.sec { padding: clamp(80px, 14vh, 160px) var(--gut); }
.sec-head { display: flex; justify-content: space-between; gap: 16px; padding-bottom: 18px; border-bottom: 1px solid var(--line); margin-bottom: clamp(32px, 6vh, 64px); flex-wrap: wrap; }
.mega { font: 700 clamp(40px, 7.4vw, 120px)/.95 var(--sans); letter-spacing: -.045em; }
.big { font: 700 clamp(34px, 5.4vw, 80px)/1 var(--sans); letter-spacing: -.04em; margin-bottom: 36px; }

/* split words */
.split .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
.split .w > span { display: inline-block; transform: translateY(105%); transition: transform 1s var(--ease); transition-delay: calc(var(--i) * 40ms); }
.split.in .w > span { transform: none; }

/* reveal */
.rv { opacity: 0; transform: translateY(40px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--d, 0s); }
.rv.in { opacity: 1; transform: none; }

@keyframes spin { to { rotate: 360deg; } }

/* Numbers */
.nums { position: relative; height: 320vh; }
.nums-stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; display: flex; flex-direction: column; justify-content: center; gap: 6vh; }
.nums-head { padding: 0 var(--gut); }
.nums-title { font: 700 clamp(34px, 5.4vw, 80px)/1 var(--sans); letter-spacing: -.04em; margin-top: 12px; }
.nums-track { display: flex; gap: 14px; padding: 0 var(--gut); width: max-content; will-change: transform; }
.num { position: relative; width: clamp(260px, 26vw, 380px); aspect-ratio: 1/1.1; border: 1px solid var(--line); border-radius: 22px; padding: 24px; display: flex; flex-direction: column; justify-content: space-between; background: var(--bg-2); overflow: hidden; }
.num:nth-child(3n+1) { background: linear-gradient(160deg, #1b1f35, var(--bg-2)); }
.num:nth-child(4n+2) b { color: var(--acc); }
.num:nth-child(4n) { background: var(--acc); color: var(--bg); }
.num:nth-child(4n) .num-i, .num:nth-child(4n) .num-l { color: rgba(10, 11, 20, .7); }
.num b { font: 800 clamp(64px, 8vw, 120px)/.9 var(--mono); letter-spacing: -.05em; }
.num-i, .num-l { font: 500 12px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--mute); }
.num-l { font-size: 14px; color: var(--ink); }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
}
@media (max-width: 760px) {
  .nav { display: none; }
  .snd-t { display: none; }
  .snd { padding: 10px 12px; }
  .hint { left: var(--gut); transform: none; }
  body.waiting .hint { animation: none; }
  .who span { display: none; }
  /* numbers become a plain grid on phones */
  .nums { height: auto; padding: 80px 0; }
  .nums-stage { position: static; height: auto; gap: 32px; }
  .nums-track { width: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; transform: none !important; }
  .num { width: auto; aspect-ratio: auto; min-height: 168px; padding: 16px; border-radius: 16px; }
  .num b { font-size: clamp(44px, 13vw, 64px); }
  .num-l { font-size: 12px; }
}
@keyframes orbit-s { from { transform: rotate(0) translateX(15px); } to { transform: rotate(360deg) translateX(15px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}
