:root {
  color-scheme: dark;
  --ink: #050608;
  --panel: #090c0f;
  --panel-2: #0d1115;
  --paper: #ebfff8;
  --muted: #789087;
  --acid: #6affc9;
  --cyan: #32e6ff;
  --danger: #ff3864;
  --violet: #a978ff;
  --orange: #ff9b35;
  --line: rgba(132,255,216,.18);
  --line-hard: rgba(132,255,216,.42);
  --route: var(--acid);
  --capability: 22%;
  --safeguard: 22%;
  --safeguard-max: 52%;
  --fracture: 0;
  --header: 54px;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--ink); scroll-behavior: smooth; }
body { min-width: 320px; margin: 0; color: var(--paper); background: var(--ink); font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; overflow-x: hidden; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { border-radius: 0; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid var(--route); outline-offset: 3px; }
.skip-link { position: fixed; z-index: 1000; left: 1rem; top: -5rem; padding: .7rem 1rem; color: var(--ink); background: var(--acid); }
.skip-link:focus { top: 1rem; }
.noise, .scanlines { position: fixed; inset: 0; z-index: 90; pointer-events: none; }
.noise { opacity: .055; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.83' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E"); }
.scanlines { opacity: .09; background: repeating-linear-gradient(0deg, transparent 0 3px, #000 4px); }
.cursor-light { position: fixed; z-index: 0; width: 32rem; height: 32rem; margin: -16rem; border-radius: 50%; pointer-events: none; background: radial-gradient(circle, color-mix(in srgb, var(--route) 7%, transparent), transparent 67%); transform: translate(var(--mouse-x, 50vw), var(--mouse-y, 50vh)); }

.system-bar { position: fixed; z-index: 80; top: 0; left: 0; right: 0; height: var(--header); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem; padding: 0 clamp(.85rem, 2vw, 1.6rem); border-bottom: 1px solid var(--line); background: rgba(5,6,8,.89); backdrop-filter: blur(18px); }
.wordmark { border: 0; padding: 0; justify-self: start; color: var(--paper); background: transparent; cursor: pointer; letter-spacing: .2em; font-size: .78rem; text-decoration: none; }
.system-state { display: flex; align-items: center; gap: .55rem; color: var(--muted); font-size: .67rem; letter-spacing: .12em; }
.live-dot { width: .48rem; height: .48rem; border-radius: 50%; background: var(--route); box-shadow: 0 0 13px var(--route); animation: pulse 1.7s infinite; }
.system-bar nav { justify-self: end; display: flex; align-items: center; gap: .9rem; }
.text-button { padding: .3rem 0; border: 0; border-bottom: 1px solid transparent; color: var(--muted); background: transparent; text-decoration: none; cursor: pointer; font-size: .67rem; letter-spacing: .08em; }
.text-button:hover { color: var(--route); border-color: var(--route); }

main { position: relative; z-index: 1; padding-top: var(--header); }
.screen { position: relative; min-height: calc(100svh - var(--header)); }
.screen[hidden] { display: none !important; }
.kicker { margin: 0 0 1rem; color: var(--route); font-size: .72rem; letter-spacing: .19em; }

.entrance { display: grid; place-items: center; isolation: isolate; overflow: hidden; }
.entrance::before { content: ""; position: absolute; inset: 0; z-index: -2; background: radial-gradient(circle at 70% 30%, rgba(50,230,255,.11), transparent 28rem), radial-gradient(circle at 25% 78%, rgba(255,56,100,.08), transparent 22rem), #050608; }
.entrance-grid { position: absolute; z-index: -1; inset: 48% -20% -40%; transform: perspective(620px) rotateX(62deg); transform-origin: top; background-image: linear-gradient(rgba(106,255,201,.18) 1px, transparent 1px), linear-gradient(90deg, rgba(106,255,201,.18) 1px, transparent 1px); background-size: 70px 44px; mask-image: linear-gradient(to bottom, rgba(0,0,0,.9), transparent 75%); animation: grid-travel 8s linear infinite; }
.entrance-copy { width: min(1180px, calc(100% - 2rem)); padding: 2.5rem 0 4rem; }
.glitch-title { position: relative; max-width: 1100px; margin: 0; color: var(--paper); font-size: clamp(3.2rem, 7.2vw, 6.9rem); line-height: .8; letter-spacing: -.075em; text-transform: uppercase; }
.glitch-layer { position: relative; display: block; width: max-content; max-width: 100%; }
.glitch-layer::before, .glitch-layer::after { content: attr(data-text); position: absolute; inset: 0; pointer-events: none; }
.glitch-layer::before { color: var(--cyan); clip-path: inset(0 0 58% 0); transform: translate(-5px,-2px); opacity: .58; animation: glitch-top 4.4s steps(2,end) infinite; }
.glitch-layer::after { color: var(--danger); clip-path: inset(57% 0 0 0); transform: translate(6px,2px); opacity: .5; animation: glitch-bottom 3.9s steps(2,end) infinite; }
.glitch-title .agi-dominant { font-size: 2em; line-height: .63; letter-spacing: -.11em; }
.entrance-copy .primary-action { margin-top: 2.3rem; }
.primary-action { position: relative; width: min(310px, 100%); min-height: 60px; display: inline-flex; align-items: center; justify-content: space-between; padding: 0 1rem 0 1.25rem; border: 1px solid var(--route); color: var(--ink); background: var(--route); cursor: pointer; overflow: hidden; font-size: .78rem; font-weight: 900; letter-spacing: .14em; }
.primary-action::after { content: ""; position: absolute; inset: 0; background: var(--paper); transform: translateX(-104%); transition: transform .28s; }
.primary-action:hover::after { transform: none; }
.primary-action span, .primary-action i { position: relative; z-index: 1; font-style: normal; }
.primary-action i { font-size: 1.45rem; }
.primary-action.compact { width: 230px; min-height: 52px; }
.primary-action:disabled { border-color: var(--line-hard); color: var(--muted); background: rgba(255,255,255,.035); cursor: not-allowed; }
.primary-action:disabled::after { display: none; }
.date-stamp { position: absolute; left: 1rem; top: 1.3rem; max-width: 220px; padding-left: .75rem; border-left: 2px solid var(--acid); color: var(--muted); font-size: .67rem; line-height: 1.45; letter-spacing: .1em; }
.date-stamp strong, .date-stamp span { display: block; }
.date-stamp strong { margin-bottom: .2rem; color: var(--paper); font-size: .9rem; font-weight: 400; }
.signal-orbit { position: absolute; right: 7vw; bottom: 8vh; width: 140px; aspect-ratio: 1; display: grid; place-items: center; }
.signal-orbit i { position: absolute; inset: 0; border: 1px solid rgba(106,255,201,.3); border-radius: 50%; animation: orbit 8s linear infinite; }
.signal-orbit i:nth-child(2) { inset: 18px; border-color: rgba(50,230,255,.42); animation-direction: reverse; animation-duration: 5s; }
.signal-orbit i:nth-child(3) { inset: 39px; border-color: rgba(255,56,100,.48); animation-duration: 3s; }
.signal-orbit i::after { content: ""; position: absolute; top: -3px; left: 48%; width: 6px; height: 6px; background: currentColor; box-shadow: 0 0 12px currentColor; }
.signal-orbit b { color: var(--acid); font-size: 1.4rem; font-weight: 400; }

.prologue { display: grid; grid-template-columns: 90px minmax(0, 880px) 1fr; gap: clamp(1.2rem, 5vw, 6rem); align-items: center; padding: clamp(2rem, 5vw, 5rem); overflow: hidden; }
.prologue::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(169,120,255,.055), transparent 35%), radial-gradient(circle at 85% 40%, rgba(50,230,255,.08), transparent 25rem); }
.prologue-side { height: min(590px, 70vh); display: grid; grid-template-rows: auto auto 1fr auto; justify-items: center; color: var(--muted); font-size: .66rem; letter-spacing: .13em; }
.prologue-side span { writing-mode: vertical-rl; }
.prologue-side b { color: var(--paper); font-weight: 400; }
.prologue-side i { width: 1px; margin: .6rem 0; background: linear-gradient(var(--acid), var(--violet)); }
.scene-index { color: var(--muted); font-size: .68rem; letter-spacing: .14em; }
.prologue-year { margin: clamp(2rem, 7vh, 5rem) 0 1rem; color: var(--route); font-size: clamp(1.1rem, 2vw, 1.5rem); letter-spacing: .08em; }
.prologue-copy h2 { margin: 0 0 1.2rem; font-family: Arial, Helvetica, sans-serif; font-size: clamp(2.35rem, 6vw, 5.4rem); line-height: .92; letter-spacing: -.04em; }
.prologue-copy h2.glitch-copy { position: relative; width: fit-content; color: var(--paper); }
.prologue-copy h2.glitch-copy::before, .prologue-copy h2.glitch-copy::after { content: attr(data-text); position: absolute; inset: 0; pointer-events: none; }
.prologue-copy h2.glitch-copy::before { color: var(--cyan); clip-path: inset(0 0 52% 0); opacity: .64; animation: prologue-glitch-a 2.8s steps(2,end) infinite; }
.prologue-copy h2.glitch-copy::after { color: var(--danger); clip-path: inset(49% 0 0 0); opacity: .62; animation: prologue-glitch-b 2.2s steps(2,end) infinite; }
.prologue-copy p { max-width: 730px; margin: 0; color: #aec2bc; font-family: Arial, Helvetica, sans-serif; font-size: clamp(1.02rem, 1.7vw, 1.26rem); line-height: 1.68; }
.prologue-copy .transmission-signal { margin-top: 1.7rem; padding-left: .8rem; border-left: 2px solid var(--danger); color: var(--danger); font-family: ui-monospace, monospace; font-size: .7rem; letter-spacing: .1em; }
.prologue-actions { display: flex; align-items: center; gap: 1rem; margin-top: 2.8rem; }
.ghost-action { min-height: 46px; padding: .65rem .9rem; border: 1px solid var(--line-hard); color: var(--muted); background: transparent; cursor: pointer; font-size: .69rem; letter-spacing: .08em; }
.ghost-action:hover { color: var(--route); border-color: var(--route); }
.transmission-bars { align-self: stretch; display: flex; align-items: center; gap: 7px; opacity: .58; }
.transmission-bars i { width: 2px; height: var(--h); background: var(--route); box-shadow: 0 0 8px var(--route); animation: bar-jump var(--d) steps(2,end) infinite alternate; }

.breach { display: grid; grid-template-columns: minmax(0, 1fr) minmax(330px, .7fr); align-items: center; gap: 2rem; padding: clamp(2rem, 7vw, 7rem); background: radial-gradient(circle at 76% 47%, rgba(255,56,100,.13), transparent 23rem), linear-gradient(155deg, #050608 55%, #09050a); overflow: hidden; }
.breach::after { content: "01001101 01001001 01001110 01000100 00100000 01001111 01010010 00100000 01001101 01000001 01000011 01001000 01001001 01001110 01000101"; position: absolute; left: 2rem; bottom: 1rem; width: 120%; color: rgba(255,255,255,.035); font-size: clamp(1.2rem, 4vw, 4rem); white-space: nowrap; }
.breach-copy h2 { max-width: 850px; margin: 0 0 1.2rem; font-family: Arial, Helvetica, sans-serif; font-size: clamp(3rem, 7.6vw, 7.8rem); line-height: .84; letter-spacing: -.065em; }
.singularity-test { width: min(680px, 100%); padding: clamp(1.2rem, 3vw, 2.2rem); border: 1px solid var(--line-hard); background: linear-gradient(145deg, rgba(50,230,255,.045), rgba(255,56,100,.035)); box-shadow: inset 0 0 65px rgba(0,0,0,.55), 0 0 50px rgba(50,230,255,.04); }
.singularity-test p { margin: .25rem 0; color: var(--cyan); font-size: clamp(.9rem, 1.4vw, 1.15rem); letter-spacing: .12em; animation: test-flicker 1.1s steps(2,end) infinite; }
.singularity-test p:nth-of-type(2) { animation-delay: .17s; }
.singularity-test p:nth-of-type(3) { animation-delay: .33s; }
.singularity-test strong { display: block; margin-top: 1.45rem; color: var(--danger); font-size: clamp(1rem, 2vw, 1.5rem); font-weight: 400; letter-spacing: .12em; text-shadow: 0 0 18px rgba(255,56,100,.5); }
.singularity-test i { display: block; width: 100%; height: 2px; margin-top: 1.6rem; background: var(--danger); box-shadow: 0 0 14px var(--danger); animation: terminal-scan 2.4s steps(12,end) infinite; }
.breach-button { position: relative; width: min(440px, 76vw); aspect-ratio: 1; display: grid; place-items: center; justify-self: center; border: 0; color: var(--paper); background: transparent; cursor: pointer; }
.breach-ring { position: absolute; inset: 0; border: 1px solid var(--danger); border-radius: 50%; box-shadow: inset 0 0 40px rgba(255,56,100,.05), 0 0 40px rgba(255,56,100,.04); }
.breach-ring::before, .breach-ring::after { content: ""; position: absolute; background: var(--danger); box-shadow: 0 0 12px var(--danger); }
.breach-ring::before { left: 50%; top: -4px; width: 8px; height: 8px; }
.breach-ring::after { left: -4px; top: 50%; width: 8px; height: 8px; }
.breach-ring.one { animation: orbit 8s linear infinite; }
.breach-ring.two { inset: 14%; border-color: var(--cyan); transform: rotate(30deg); animation: orbit 5s linear infinite reverse; }
.breach-ring.three { inset: 32%; border-style: dashed; border-color: var(--acid); animation: orbit 2.6s steps(12,end) infinite; }
.breach-button b { font-size: 5rem; font-weight: 400; animation: breach-pulse 1.5s steps(2,end) infinite; }
.breach-button em { position: absolute; bottom: 21%; color: var(--danger); font-size: .72rem; font-style: normal; letter-spacing: .2em; }
.breach-button:hover .one { box-shadow: inset 0 0 100px rgba(255,56,100,.18), 0 0 80px rgba(255,56,100,.2); }

.routes { display: flex; flex-direction: column; padding: clamp(2rem, 4.5vw, 4.7rem) clamp(1rem, 3vw, 3rem) 1.2rem; }
.routes-heading { display: grid; grid-template-columns: 1.25fr .75fr; gap: 2rem; align-items: end; margin-bottom: clamp(2rem, 5vw, 4rem); }
.routes-heading h2 { margin: 0; font-family: Arial, Helvetica, sans-serif; font-size: clamp(3rem, 7vw, 7rem); line-height: .8; letter-spacing: -.065em; }
.routes-heading > p { max-width: 510px; justify-self: end; margin: 0; color: var(--danger); font-size: .76rem; line-height: 1.7; letter-spacing: .12em; }
.route-grid { flex: 1; display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.route-card { position: relative; min-height: min(510px, 55vh); display: flex; flex-direction: column; gap: 1rem; padding: 1rem; border: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--paper); background: linear-gradient(155deg, rgba(255,255,255,.022), transparent 55%); text-align: left; cursor: pointer; overflow: hidden; }
.route-card::before { content: ""; position: absolute; inset: 0; opacity: 0; background: radial-gradient(circle at 50% 80%, color-mix(in srgb, var(--card) 16%, transparent), transparent 60%); transition: opacity .35s; }
.route-card::after { content: attr(data-number); position: absolute; right: -.1em; bottom: -.15em; color: color-mix(in srgb, var(--card) 7%, transparent); font-size: clamp(6rem, 11vw, 12rem); font-weight: 900; line-height: .7; }
.route-card:hover::before, .route-card:focus-visible::before { opacity: 1; }
.route-card:hover, .route-card:focus-visible { z-index: 2; border-color: var(--card); outline: 1px solid var(--card); }
.route-card > * { position: relative; z-index: 1; }
.route-card .route-number { display: flex; justify-content: space-between; color: var(--card); font-size: .66rem; letter-spacing: .1em; }
.route-card .route-icon { margin: clamp(1rem, 5vh, 3.5rem) 0 0; color: var(--card); font-size: clamp(2.3rem, 4vw, 4.5rem); font-weight: 400; text-shadow: 0 0 30px var(--card); }
.route-card h3 { margin: 0; font-size: clamp(.95rem, 1.45vw, 1.25rem); line-height: 1.15; letter-spacing: -.02em; }
.route-card p { margin: 0; color: var(--card); font-size: .72rem; line-height: 1.5; letter-spacing: .06em; }
.route-card .route-question { margin-top: auto; padding-top: 1rem; border-top: 1px solid color-mix(in srgb, var(--card) 26%, transparent); color: color-mix(in srgb, var(--card) 70%, white); font-family: ui-monospace, monospace; font-size: .68rem; line-height: 1.45; }
.route-card .open-route { color: var(--card); font-size: .68rem; letter-spacing: .1em; }
.route-footer { display: flex; justify-content: space-between; gap: 1rem; padding-top: 1rem; color: var(--muted); font-size: .67rem; letter-spacing: .08em; }
.route-footer a { color: var(--acid); text-decoration: none; }

.route-player { --route: var(--accent, var(--acid)); padding: 0; }
.route-chrome { min-height: 65px; display: grid; grid-template-columns: 1fr auto 1fr; gap: 1rem; align-items: center; padding: .6rem 1rem; border-bottom: 1px solid var(--line); }
.route-identity { text-align: center; }
.route-identity span { display: block; margin-bottom: .25rem; color: var(--route); font-size: .62rem; letter-spacing: .14em; }
.route-identity strong { font-size: .78rem; letter-spacing: .08em; }
.route-tools { justify-self: end; display: flex; align-items: center; gap: .8rem; }
.route-status { color: var(--route); font-size: .65rem; letter-spacing: .12em; }
.route-tools button { min-height: 32px; padding: .35rem .55rem; border: 1px solid var(--line-hard); color: var(--muted); background: transparent; cursor: pointer; font-size: .59rem; letter-spacing: .1em; }
.route-tools button:hover { color: var(--ink); border-color: var(--route); background: var(--route); }
.route-layout { min-height: calc(100svh - var(--header) - 65px); display: grid; grid-template-columns: 170px minmax(0, 1fr) minmax(260px, 21vw); }
.timeline-rail { position: relative; padding: clamp(2rem, 5vw, 4rem) 1rem; border-right: 1px solid var(--line); background: rgba(255,255,255,.012); }
.rail-line { position: absolute; left: 42px; top: 5rem; bottom: 5rem; width: 1px; background: var(--line-hard); }
.rail-line i { display: block; width: 2px; height: var(--rail, 0%); background: var(--route); box-shadow: 0 0 12px var(--route); transition: height .45s; }
#timelineNodes { position: relative; z-index: 1; height: 100%; display: flex; flex-direction: column; justify-content: space-between; }
.time-node { display: grid; grid-template-columns: 54px 1fr; gap: .4rem; align-items: center; width: 100%; padding: 0; border: 0; color: var(--muted); background: transparent; text-align: left; cursor: pointer; }
.time-node b { width: 19px; height: 19px; margin-left: 23px; display: grid; place-items: center; border: 1px solid var(--line-hard); border-radius: 50%; color: transparent; background: var(--ink); transition: .2s; }
.time-node span { display: block; }
.time-node span:first-of-type { color: inherit; font-size: .8rem; }
.time-node span:last-of-type { margin-top: .2rem; font-size: .58rem; line-height: 1.3; }
.time-node.active, .time-node.done { color: var(--paper); }
.time-node.active b, .time-node.done b { border-color: var(--route); color: var(--route); box-shadow: 0 0 12px color-mix(in srgb, var(--route) 45%, transparent); }
.time-node.active b { background: var(--route); color: var(--ink); }
.time-node.locked { cursor: not-allowed; opacity: .36; }

.story-panel { max-width: 980px; width: 100%; justify-self: center; padding: clamp(2rem, 4.2vw, 4.5rem); }
.story-meta { display: flex; justify-content: space-between; align-items: center; padding-bottom: .8rem; border-bottom: 1px solid var(--line); color: var(--muted); font-size: .67rem; letter-spacing: .12em; }
.evidence-button { padding: .35rem 0; border: 0; border-bottom: 1px solid var(--route); color: var(--route); background: transparent; cursor: pointer; font-size: .67rem; }
.story-year { margin: clamp(2rem, 5vh, 4rem) 0 .5rem; color: var(--route); font-size: clamp(1.2rem, 2vw, 1.55rem); }
.story-panel > h2 { max-width: 850px; margin: 0; font-family: Arial, Helvetica, sans-serif; font-size: clamp(2.6rem, 6vw, 6.2rem); line-height: .85; letter-spacing: -.06em; }
.story-scene { max-width: 780px; margin: 1.5rem 0 2.8rem; color: #b3c6c0; font-family: Arial, Helvetica, sans-serif; font-size: clamp(1rem, 1.4vw, 1.15rem); line-height: 1.65; }
.life-window h3, .decision-heading h3 { margin: 0; color: var(--muted); font-size: .68rem; font-weight: 400; letter-spacing: .14em; }
.life-cards { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: .7rem; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.life-card { min-height: 130px; padding: .85rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: linear-gradient(145deg, rgba(255,255,255,.02), transparent); }
.life-card b { display: block; margin-bottom: .65rem; color: var(--route); font-size: .63rem; letter-spacing: .1em; }
.life-card p { margin: 0; color: #9db1aa; font-family: Arial, Helvetica, sans-serif; font-size: .8rem; line-height: 1.48; }
.decision { margin-top: 2.7rem; }
.decision-heading { display: flex; justify-content: space-between; align-items: end; gap: 1rem; }
.decision-heading span { color: var(--route); font-size: .61rem; }
.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; margin-top: .8rem; }
.choice-card { min-height: 112px; padding: .9rem; border: 1px solid var(--line); color: var(--paper); background: rgba(255,255,255,.014); text-align: left; cursor: pointer; }
.choice-card:hover, .choice-card.selected { border-color: var(--route); box-shadow: inset 0 0 35px color-mix(in srgb, var(--route) 7%, transparent); }
.choice-card.selected { outline: 1px solid var(--route); }
.choice-card b { display: block; margin-bottom: .45rem; color: var(--route); font-size: .72rem; letter-spacing: .06em; }
.choice-card p { margin: 0; color: #8fa49d; font-family: Arial, Helvetica, sans-serif; font-size: .79rem; line-height: 1.4; }
.choice-card small { display: block; margin-top: .7rem; color: var(--muted); font-size: .6rem; }
.advance { width: 100%; margin-top: .8rem; }

.story-panel.arcade-mode { position: relative; align-self: start; max-width: 920px; margin: clamp(1rem, 2.5vh, 2.2rem) auto; padding: clamp(1.2rem, 3.2vw, 2.7rem); border: 1px solid color-mix(in srgb, var(--route) 55%, transparent); background: repeating-linear-gradient(0deg, transparent 0 3px, rgba(255,255,255,.018) 4px), linear-gradient(90deg, transparent 49.8%, color-mix(in srgb, var(--route) 5%, transparent) 50%, transparent 50.2%), radial-gradient(circle at 85% 10%, color-mix(in srgb, var(--route) 12%, transparent), transparent 25rem), #07090c; box-shadow: inset 0 0 90px rgba(0,0,0,.58), 0 0 70px color-mix(in srgb, var(--route) 7%, transparent); overflow: hidden; }
.story-panel.arcade-mode::before { content: "SYS//LIVE"; position: absolute; right: 1rem; bottom: .75rem; color: color-mix(in srgb, var(--route) 28%, transparent); font-size: .6rem; letter-spacing: .16em; }
.story-panel.arcade-mode::after { content: attr(data-symbol); position: absolute; z-index: 0; right: -.03em; top: .28em; color: color-mix(in srgb, var(--route) 5%, transparent); font-size: clamp(10rem, 23vw, 24rem); line-height: .7; pointer-events: none; }
.story-panel.arcade-mode > * { position: relative; z-index: 1; }
.arcade-mode .story-meta { justify-content: flex-start; gap: 1rem; color: var(--route); }
.arcade-mode .story-meta::after { content: "● DETECTION LOCKED"; order: 2; margin-left: auto; color: var(--danger); animation: warning .8s steps(2,end) infinite; }
.arcade-mode .story-meta .evidence-button { order: 3; margin-left: 1rem; }
.arcade-mode .story-panel, .arcade-mode .life-window { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }
.event-chain { display: flex; gap: .4rem; margin-top: .8rem; padding-bottom: .4rem; overflow-x: auto; scrollbar-color: var(--route) transparent; }
.chain-node { flex: 0 0 158px; min-height: 72px; padding: .55rem; border: 1px solid var(--line); color: var(--muted); background: rgba(0,0,0,.3); }
.chain-node span { display: block; color: var(--route); font-size: .55rem; letter-spacing: .1em; }
.chain-node b { display: block; margin-top: .3rem; color: #8ca099; font-size: .58rem; font-weight: 400; line-height: 1.3; }
.chain-node em { display: block; margin-top: .45rem; color: #65766f; font-size: .5rem; font-style: normal; line-height: 1.25; }
.chain-node.resolved { opacity: .62; }
.chain-node.active { border-color: var(--route); box-shadow: inset 0 0 20px color-mix(in srgb, var(--route) 7%, transparent), 0 0 12px color-mix(in srgb, var(--route) 10%, transparent); }
.chain-node.active b { color: var(--paper); }
.chain-node.active em { color: var(--danger); }
.story-panel.arcade-mode > h2 { max-width: 760px; margin: clamp(1.6rem, 4vh, 3.1rem) 0 clamp(1.3rem, 3vh, 2.3rem); color: var(--route); font-family: inherit; font-size: clamp(2.35rem, 5vw, 5.3rem); line-height: .9; letter-spacing: -.055em; text-shadow: 0 0 24px color-mix(in srgb, var(--route) 30%, transparent); }
.event-telemetry { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(150px, .65fr); gap: .7rem; }
.arcade-mode .life-window > h3 { display: block; margin: 0 0 .55rem; color: var(--muted); font-size: .59rem; }
.arcade-mode .life-cards { display: block; margin-top: 0; padding: clamp(.8rem, 2vw, 1.5rem); border: 1px solid var(--line-hard); background: rgba(0,0,0,.25); }
.diagnostic-row { display: grid; grid-template-columns: auto minmax(1rem, 1fr) auto; align-items: end; gap: .45rem; padding: .4rem 0; color: var(--muted); font-size: clamp(.72rem, 1.1vw, .9rem); letter-spacing: .05em; }
.diagnostic-row i { min-width: 1rem; height: .5rem; border-bottom: 2px dotted color-mix(in srgb, var(--route) 45%, transparent); }
.diagnostic-row b { color: var(--paper); font-size: inherit; font-weight: 400; text-shadow: 0 0 12px color-mix(in srgb, var(--route) 38%, transparent); }
.diagnostic-row:last-child b { color: var(--danger); animation: warning 1s steps(2,end) infinite; }
.signal-scope { position: relative; min-height: 178px; display: flex; align-items: center; gap: 4px; padding: 1.7rem .75rem .7rem; overflow: hidden; border: 1px solid var(--line); background: linear-gradient(rgba(0,0,0,.18), rgba(0,0,0,.55)), repeating-linear-gradient(0deg, transparent 0 19px, color-mix(in srgb, var(--route) 8%, transparent) 20px), repeating-linear-gradient(90deg, transparent 0 19px, color-mix(in srgb, var(--route) 8%, transparent) 20px); }
.signal-scope::before { content: "SIGNAL TRACE"; position: absolute; top: .55rem; left: .7rem; color: var(--muted); font-size: .52rem; letter-spacing: .12em; }
.signal-scope i { flex: 1; height: var(--scope); background: linear-gradient(var(--route), var(--danger)); box-shadow: 0 0 8px color-mix(in srgb, var(--route) 40%, transparent); animation: scope-jump .7s steps(2,end) var(--delay) infinite alternate; }
.arcade-mode .decision { margin-top: clamp(1.8rem, 4vh, 3rem); }
.arcade-mode .decision-heading h3 { color: var(--paper); font-size: clamp(.82rem, 1.3vw, 1rem); }
.arcade-mode .choice-grid { gap: .9rem; margin-top: 1.1rem; }
.arcade-mode .choice-card { min-height: 92px; display: grid; align-content: center; padding: 1rem 1.2rem; border-color: color-mix(in srgb, var(--route) 48%, transparent); background: rgba(255,255,255,.018); }
.arcade-mode .choice-card b { margin: 0; color: var(--paper); font-size: clamp(.82rem, 1.2vw, 1rem); font-weight: 400; }
.arcade-mode .choice-card small { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .35rem .8rem; width: 100%; margin-top: .8rem; color: var(--muted); font-size: .55rem; letter-spacing: .06em; }
.arcade-mode .choice-card:hover, .arcade-mode .choice-card.selected { color: var(--ink); background: var(--route); box-shadow: 0 0 25px color-mix(in srgb, var(--route) 22%, transparent); }
.arcade-mode .choice-card:hover b, .arcade-mode .choice-card.selected b, .arcade-mode .choice-card:hover small, .arcade-mode .choice-card.selected small { color: var(--ink); }
.arcade-mode .advance { margin-top: .9rem; }

.pressure-console { position: sticky; top: calc(var(--header) + 65px); align-self: start; min-height: calc(100svh - var(--header) - 65px); max-height: calc(100svh - var(--header) - 65px); display: flex; flex-direction: column; justify-content: center; gap: clamp(1.5rem, 4vh, 3.5rem); padding: clamp(1.1rem, 1.8vw, 1.65rem); border-left: 1px solid var(--line); background: linear-gradient(180deg, #0b0f12, #060709); overflow-y: auto; scrollbar-color: var(--route) #080a0c; }
.gauge-kicker { margin: 0 0 -.9rem; color: var(--muted); font-size: .59rem; letter-spacing: .14em; }
.gauge-mode { color: var(--route); font-size: .72rem; font-weight: 400; letter-spacing: .12em; }
.axis-block { padding: 0; }
.pressure-head { display: flex; justify-content: space-between; align-items: start; color: var(--route); font-size: .68rem; letter-spacing: .1em; }
.pressure-head b { color: var(--paper); font-size: clamp(2.25rem, 4vw, 3.8rem); line-height: .78; font-weight: 400; letter-spacing: -.08em; }
.pressure-visual { position: relative; height: 28px; margin: 1.35rem 0 .7rem; overflow: hidden; border: 1px solid var(--line-hard); background: repeating-linear-gradient(90deg, transparent 0 9%, rgba(255,255,255,.055) 9% 10%); }
.pressure-visual i { display: block; width: var(--capability); height: 100%; background: linear-gradient(90deg, var(--route), var(--danger)); box-shadow: 0 0 15px var(--danger); transition: width .18s; }
.pressure-visual.safeguard-visual i { width: var(--safeguard); background: linear-gradient(90deg, #1a7887, var(--acid)); box-shadow: 0 0 14px var(--acid); }
.gauge-delta { display: block; min-height: 1rem; color: var(--muted); font-size: .59rem; font-style: normal; letter-spacing: .08em; }
.response-ledger { padding: 1rem; border: 1px solid color-mix(in srgb, var(--route) 45%, transparent); color: var(--paper); background: color-mix(in srgb, var(--route) 5%, transparent); font-size: .65rem; line-height: 1.5; letter-spacing: .06em; }
.route-player.is-danger .pressure-console { background: radial-gradient(circle at 50% 15%, rgba(255,56,100,.2), transparent 16rem), #080609; }
.route-player.is-danger .route-status { color: var(--danger); animation: warning .8s steps(2,end) infinite; }
.route-player.is-danger .story-panel > h2 { text-shadow: calc(var(--fracture) * -8px) 0 rgba(50,230,255,.45), calc(var(--fracture) * 8px) 0 rgba(255,56,100,.5); }

.ending { display: grid; align-content: center; padding: clamp(2rem, 8vw, 8rem); overflow: hidden; }
.ending::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(circle at 80% 45%, color-mix(in srgb, var(--route) 13%, transparent), transparent 30rem); }
.ending-code { position: absolute; right: 4vw; top: 10vh; color: color-mix(in srgb, var(--route) 9%, transparent); font-size: clamp(9rem, 28vw, 28rem); font-weight: 900; line-height: .7; }
.ending h2 { position: relative; max-width: 1050px; margin: 0; font-family: Arial, Helvetica, sans-serif; font-size: clamp(4rem, 10vw, 10rem); line-height: .77; letter-spacing: -.07em; }
.ending-copy { position: relative; max-width: 750px; margin: 2rem 0; color: #aec1bb; font-family: Arial, Helvetica, sans-serif; font-size: clamp(1rem, 1.7vw, 1.2rem); line-height: 1.65; }
.ending-record { position: relative; max-width: 900px; display: flex; flex-wrap: wrap; gap: .45rem; margin: 1rem 0 2.5rem; }
.ending-record span { padding: .45rem .55rem; border: 1px solid var(--line); color: var(--muted); font-size: .62rem; }
.ending-record b { color: var(--route); font-weight: 400; }
.ending-actions { position: relative; display: flex; gap: .8rem; }

.evidence-drawer, .about-drawer { width: min(740px, 100%); max-width: none; height: 100%; max-height: none; margin: 0 0 0 auto; padding: 0; border: 0; color: var(--paper); background: #090c0f; box-shadow: -30px 0 90px rgba(0,0,0,.75); }
.evidence-drawer::backdrop, .about-drawer::backdrop { background: rgba(0,0,0,.74); backdrop-filter: blur(5px); }
.drawer-inner { min-height: 100%; padding: clamp(1.3rem, 5vw, 3.5rem); border-left: 1px solid var(--line-hard); }
.drawer-close { float: right; min-height: 38px; padding: .45rem .65rem; border: 1px solid var(--line); color: var(--muted); background: transparent; cursor: pointer; font-size: .65rem; }
.drawer-close:hover { color: var(--danger); border-color: var(--danger); }
.drawer-code { margin: 0 0 .8rem; color: var(--route); font-size: .68rem; letter-spacing: .12em; }
.drawer-inner > h2 { clear: both; margin: 0; padding-top: 1rem; font-family: Arial, Helvetica, sans-serif; font-size: clamp(2.4rem, 6vw, 5.5rem); line-height: .86; letter-spacing: -.05em; }
.drawer-statement { margin: 1.4rem 0 2.7rem; color: #b2c5bf; font-family: Arial, Helvetica, sans-serif; font-size: 1.02rem; line-height: 1.65; }
.evidence-status { margin-top: .7rem; padding: 1rem; border: 1px solid var(--line); border-left: 3px solid var(--acid); }
.evidence-status.speculative { border-left-color: var(--violet); }
.evidence-status span { color: var(--acid); font-size: .64rem; letter-spacing: .1em; }
.evidence-status.speculative span { color: var(--violet); }
.evidence-status p { margin: .65rem 0 0; color: #9db1aa; font-family: Arial, Helvetica, sans-serif; font-size: .9rem; line-height: 1.55; }
.drawer-inner section { margin-top: 2.4rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }
.drawer-inner section > h3 { margin: 0 0 1rem; color: var(--cyan); font-size: .67rem; letter-spacing: .12em; }
.source-list { display: grid; gap: .55rem; }
.source-item { display: grid; grid-template-columns: auto 1fr auto; gap: .8rem; align-items: start; padding: .8rem; border: 1px solid var(--line); color: inherit; text-decoration: none; }
.source-item:hover { border-color: var(--route); }
.source-id { color: var(--route); font-size: .65rem; }
.source-copy b { display: block; margin-bottom: .25rem; font-size: .73rem; }
.source-copy span { color: var(--muted); font-family: Arial, Helvetica, sans-serif; font-size: .75rem; line-height: 1.4; }
.source-arrow { color: var(--route); }
.report-download { display: inline-block; margin-top: 2rem; padding-bottom: .3rem; border-bottom: 1px solid var(--route); color: var(--route); text-decoration: none; font-size: .68rem; }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; padding: 0 !important; border: 1px solid var(--line) !important; background: var(--line); }
.about-grid div { padding: 1rem; background: var(--panel); }
.about-grid b { color: var(--acid); font-size: .67rem; }
.about-grid p { color: var(--muted); font-family: Arial, Helvetica, sans-serif; font-size: .82rem; line-height: 1.5; }
.authorship { margin-top: 3rem; color: var(--paper); letter-spacing: .28em; }

.game-over { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 1rem; overflow-y: auto; background: #050003; }
.game-over[hidden] { display: none; }
.failure-noise { position: absolute; inset: 0; background: repeating-linear-gradient(0deg, transparent 0 2px, rgba(255,0,60,.12) 3px), radial-gradient(circle, rgba(255,0,60,.14), transparent 65%); animation: crash 1.4s steps(3,end) infinite; }
.game-over-inner { position: relative; width: min(790px, 100%); padding: clamp(1.4rem, 4vw, 3rem); border: 1px solid var(--danger); background: rgba(13,0,4,.94); box-shadow: 0 0 140px rgba(255,0,60,.35); }
.game-over-inner > p:first-of-type { color: var(--danger); font-size: .67rem; letter-spacing: .15em; }
.game-over h1 { position: relative; margin: 1rem 0 .5rem; color: white; font-size: clamp(4.7rem, 15vw, 10rem); line-height: .72; letter-spacing: -.085em; }
.game-over h1::before, .game-over h1::after { content: attr(data-text); position: absolute; inset: 0; pointer-events: none; }
.game-over h1::before { color: var(--cyan); clip-path: inset(0 0 58% 0); transform: translate(-6px,-2px); opacity: .7; }
.game-over h1::after { color: var(--danger); clip-path: inset(52% 0 0); transform: translate(7px,2px); opacity: .8; }
.game-over strong { color: var(--danger); letter-spacing: .1em; }
.game-over ol { margin: 2rem 0; padding-left: 1.4rem; color: #c7b3b9; font-family: Arial, Helvetica, sans-serif; line-height: 1.7; }
.game-note { color: #957781; font-family: Arial, Helvetica, sans-serif; font-size: .78rem; line-height: 1.5; }
.game-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.game-actions button { min-height: 50px; border: 1px solid var(--danger); color: white; background: var(--danger); cursor: pointer; font-size: .68rem; font-weight: 800; letter-spacing: .08em; }
.game-actions button:last-child { color: var(--danger); background: transparent; }

@keyframes pulse { 50% { opacity: .28; transform: scale(.68); } }
@keyframes warning { 50% { opacity: .36; } }
@keyframes orbit { to { transform: rotate(360deg); } }
@keyframes breach-pulse { 50% { opacity: .45; transform: scale(.85); } }
@keyframes grid-travel { to { background-position: 0 44px, 70px 0; } }
@keyframes glitch-top { 0%,89%,100% { transform: translate(-5px,-2px); } 90% { transform: translate(12px,2px); } 93% { transform: translate(-13px,-4px); } }
@keyframes glitch-bottom { 0%,83%,100% { transform: translate(6px,2px); } 84% { transform: translate(-12px,1px); } 88% { transform: translate(14px,4px); } }
@keyframes prologue-glitch-a { 0%,78%,100% { transform: translate(-3px,-1px); } 80% { transform: translate(11px,2px); } 84% { transform: translate(-8px,-3px); } }
@keyframes prologue-glitch-b { 0%,70%,100% { transform: translate(4px,1px); } 73% { transform: translate(-10px,2px); } 76% { transform: translate(13px,-1px); } }
@keyframes test-flicker { 0%,82%,100% { opacity: 1; transform: none; } 84% { opacity: .2; transform: translateX(4px); } 87% { opacity: .8; transform: translateX(-2px); } }
@keyframes terminal-scan { 0% { transform: scaleX(.12); transform-origin: left; } 48% { transform: scaleX(1); transform-origin: left; } 49% { transform-origin: right; } 100% { transform: scaleX(.12); transform-origin: right; } }
@keyframes bar-jump { to { transform: scaleY(.35); opacity: .25; } }
@keyframes scope-jump { to { transform: scaleY(.28); opacity: .3; } }
@keyframes crash { 0%,87%,100% { transform: none; } 90% { transform: translate(6px,-2px); } 94% { transform: translate(-8px,3px); } }

@media (max-width: 1160px) {
  .route-grid { grid-template-columns: repeat(2, 1fr); }
  .route-card { min-height: 350px; }
  .route-card:last-child { grid-column: span 2; }
}

@media (max-width: 960px) {
  .route-layout { grid-template-columns: 150px minmax(0,1fr); }
  .pressure-console { position: relative; top: auto; grid-column: 1 / -1; min-height: 0; max-height: none; display: grid; grid-template-columns: 1fr 1fr; justify-content: initial; gap: 1.3rem 2rem; border-top: 1px solid var(--line); border-left: 0; }
  .gauge-kicker { grid-column: 1; margin: 0; }
  .gauge-mode { grid-column: 2; text-align: right; }
  .response-ledger { grid-column: 1 / -1; }
  .pressure-visual { height: 22px; }
}

@media (max-width: 760px) {
  :root { --header: 92px; }
  .system-bar { grid-template-columns: 1fr auto; grid-template-rows: 44px 38px; gap: 0 .6rem; }
  .system-state { justify-self: end; }
  .system-bar nav { grid-column: 1 / -1; justify-self: stretch; justify-content: space-between; border-top: 1px solid var(--line); }
  .entrance-copy { padding-bottom: 9rem; }
  .glitch-title { font-size: clamp(2.45rem, 10.7vw, 4.8rem); }
  .signal-orbit { width: 90px; right: 1rem; bottom: 4rem; }
  .date-stamp { top: .9rem; max-width: 180px; font-size: .58rem; }
  .prologue { grid-template-columns: 1fr; align-items: start; padding: 2rem 1rem; }
  .prologue-side { display: none; }
  .transmission-bars { position: absolute; right: 1rem; top: 2rem; width: 26%; height: 80px; }
  .prologue-actions { justify-content: space-between; }
  .breach { grid-template-columns: 1fr; align-content: center; padding: 2rem 1rem; }
  .breach-copy h2 { font-size: clamp(3rem, 14vw, 6rem); }
  .breach-button { width: min(270px, 72vw); }
  .routes { padding: 2rem 1rem 1rem; }
  .routes-heading { grid-template-columns: 1fr; gap: 1.5rem; }
  .routes-heading > p { justify-self: start; }
  .route-grid { grid-template-columns: 1fr; }
  .route-card, .route-card:last-child { grid-column: auto; min-height: 315px; }
  .route-footer { flex-direction: column; }
  .route-chrome { grid-template-columns: auto 1fr; }
  .route-identity { text-align: right; }
  .route-tools { grid-column: 1 / -1; justify-self: stretch; justify-content: space-between; padding-top: .55rem; border-top: 1px solid var(--line); }
  .route-layout { grid-template-columns: 1fr; }
  .timeline-rail { padding: 1rem; border-right: 0; border-bottom: 1px solid var(--line); overflow-x: auto; }
  .rail-line { left: 2rem; right: 2rem; top: 31px; bottom: auto; width: auto; height: 1px; }
  .rail-line i { width: var(--rail, 0%); height: 2px; }
  #timelineNodes { min-width: 710px; flex-direction: row; }
  .time-node { grid-template-columns: auto; grid-template-rows: 26px auto; width: 132px; text-align: center; justify-items: center; }
  .time-node b { grid-row: 1; margin: 0; }
  .time-node div { grid-row: 2; }
  .story-panel { padding: 2rem 1rem; }
  .story-panel.arcade-mode { margin: 1rem; padding: 1rem; }
  .arcade-mode .story-meta::after { display: none; }
  .event-telemetry { grid-template-columns: 1fr; }
  .signal-scope { min-height: 110px; }
  .chain-node { flex-basis: 140px; }
  .life-cards { grid-template-columns: 1fr; }
  .life-card { min-height: 0; }
  .choice-grid { grid-template-columns: 1fr; }
  .decision-heading { align-items: start; flex-direction: column; }
  .pressure-console { grid-template-columns: 1fr; }
  .gauge-kicker, .gauge-mode, .response-ledger { grid-column: 1; text-align: left; }
  .ending { padding: 2.5rem 1rem; }
  .ending-actions { flex-direction: column; }
  .ending-actions > * { width: 100%; }
  .game-actions { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
}

@media (max-width: 390px) {
  .system-bar { padding-inline: .65rem; }
  .text-button { font-size: .59rem; }
  .glitch-title { font-size: 2.3rem; }
  .entrance-copy { width: calc(100% - 1.25rem); }
  .story-meta { align-items: flex-start; gap: .8rem; }
}

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