:root {
  --ink: #090909;
  --paper: #eeeae4;
  --blue: #58a9df;
  --blue-dark: #2679b4;
  --red: #ff5046;
  --cream: #fff0d1;
  --yellow: #ffc84d;
  --panel: rgba(245, 242, 236, .92);
  --shadow: 8px 8px 0 var(--ink);
}

* { box-sizing: border-box; }
html, body { width: 100%; min-height: 100%; margin: 0; }
html { background: var(--paper); }
body {
  color: var(--ink);
  background: var(--paper);
  font-family: "Arial Black", Impact, system-ui, sans-serif;
  overflow: hidden;
  cursor: default;
}
button, a { font: inherit; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }

.boot {
  position: fixed; inset: 0; z-index: 9999; display: grid; place-content: center; justify-items: center;
  background: var(--blue); transition: transform .75s cubic-bezier(.8,0,.2,1);
}
.boot.is-gone { transform: translateY(-105%); }
.boot-dino {
  width: 106px; height: 106px; display: grid; place-items: center; border: 7px solid var(--ink);
  border-radius: 58% 43% 52% 48%; background: var(--cream); box-shadow: 9px 9px 0 var(--red);
  font-size: 64px; transform: rotate(-6deg); animation: bootBob .6s steps(2) infinite;
}
.boot p { margin: 32px 0 12px; font-size: 12px; letter-spacing: .18em; }
.boot-track { width: min(360px, 70vw); height: 15px; border: 4px solid var(--ink); border-radius: 20px; padding: 2px; background: var(--paper); }
.boot-track span { display: block; width: 0; height: 100%; background: var(--red); animation: load 1.35s ease-out forwards; }
@keyframes load { to { width: 100%; } }
@keyframes bootBob { 50% { transform: rotate(5deg) translateY(-4px); } }

.paper-noise { position: fixed; inset: 0; z-index: -1; opacity: .34; pointer-events: none; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.14'/%3E%3C/svg%3E"); }
.world-wallpaper { position: fixed; inset: 66px 0 0; z-index: -2; background: url('assets/doodle-world.png') center / cover no-repeat; opacity: .34; transform: scale(1.08); transition: transform 1s cubic-bezier(.2,.8,.2,1), opacity .5s; }
.cursor-dot { position: fixed; z-index: 2000; width: 18px; height: 18px; border: 3px solid var(--ink); border-radius: 50%; background: var(--red); pointer-events: none; opacity: 0; transform: translate(-50%, -50%); transition: width .15s, height .15s, background .15s; }
body.has-pointer .cursor-dot { opacity: 1; }
body.link-hover .cursor-dot { width: 30px; height: 30px; background: var(--yellow); }

.topbar { height: 66px; position: fixed; inset: 0 0 auto; z-index: 100; display: flex; align-items: stretch; border-bottom: 5px solid var(--ink); background: rgba(238,234,228,.94); backdrop-filter: blur(8px); }
.brand { min-width: 222px; border: 0; border-right: 4px solid var(--ink); background: var(--blue); display: flex; align-items: center; gap: 10px; padding: 8px 16px; text-align: left; cursor: pointer; }
.brand-mark { width: 40px; height: 40px; display: grid; place-items: center; background: var(--cream); border: 4px solid var(--ink); border-radius: 50% 44% 55% 45%; box-shadow: 3px 3px 0 var(--red); font-size: 23px; transform: rotate(-5deg); }
.brand b { display: block; font-size: 13px; letter-spacing: .04em; }
.brand small { display: block; margin-top: 3px; font: 700 9px/1 system-ui, sans-serif; letter-spacing: .14em; }
.signal-pill { align-self: center; min-width: 225px; margin: 0 14px; border: 3px solid var(--ink); border-radius: 99px; padding: 8px 13px; display: flex; gap: 8px; align-items: center; background: var(--cream); font-size: 9px; letter-spacing: .08em; }
.signal-pill i { width: 9px; height: 9px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 3px rgba(255,80,70,.25); animation: blink 1.4s steps(2) infinite; }
@keyframes blink { 50% { opacity: .25; } }
nav { display: flex; align-items: stretch; margin-left: auto; }
.nav-key { border: 0; border-left: 3px solid var(--ink); background: transparent; padding: 0 17px; cursor: pointer; font-size: 10px; letter-spacing: .07em; transition: background .15s, transform .15s; }
.nav-key kbd { display: block; margin-bottom: 3px; font: 700 8px/1 system-ui, sans-serif; opacity: .55; }
.nav-key:hover, .nav-key.is-active { background: var(--yellow); }
.nav-key:active { transform: translateY(3px); }
.header-actions { display: flex; }
.icon-btn, .buy-mini { display: grid; place-items: center; border-left: 4px solid var(--ink); }
.icon-btn { width: 58px; background: var(--paper); font-size: 18px; }
.buy-mini { min-width: 130px; padding: 0 16px; background: var(--red); font-size: 11px; }
.icon-btn:hover, .buy-mini:hover { background: var(--ink); color: white; }

main { position: fixed; inset: 66px 0 0; }
.screen { position: absolute; inset: 0; overflow: auto; opacity: 0; visibility: hidden; transform: translateX(7vw) scale(.98); transition: opacity .45s, transform .65s cubic-bezier(.2,.75,.25,1), visibility 0s .65s; }
.screen.is-active { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.screen.is-leaving { transform: translateX(-7vw) scale(.98); }
.eyebrow { font-size: 10px; letter-spacing: .19em; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 900; }
.eyebrow span { color: var(--red); }
em { color: var(--blue-dark); font-style: normal; -webkit-text-stroke: 1px var(--ink); text-shadow: 3px 3px 0 var(--cream); }

.home { display: grid; grid-template-columns: minmax(390px, .9fr) minmax(500px, 1.1fr); align-items: center; padding: clamp(28px, 4vw, 70px) clamp(25px, 6vw, 110px) 58px; gap: 5vw; }
.hero-copy { position: relative; z-index: 2; max-width: 650px; }
.hero-copy h1 { margin: 18px 0; font-size: clamp(56px, 7.2vw, 120px); line-height: .81; letter-spacing: -.065em; transform: rotate(-1deg); }
.hero-lede { max-width: 620px; font: 700 clamp(15px, 1.4vw, 21px)/1.45 system-ui, sans-serif; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 28px 0 18px; }
.chunky { min-height: 58px; padding: 0 20px; border: 4px solid var(--ink); box-shadow: 6px 6px 0 var(--ink); cursor: pointer; font-size: 11px; letter-spacing: .07em; transition: transform .15s, box-shadow .15s; }
.chunky span { margin-left: 20px; font-size: 20px; }
.chunky.primary { background: var(--red); }
.chunky.secondary { background: var(--cream); }
.chunky:hover { transform: translate(3px, 3px) rotate(-1deg); box-shadow: 3px 3px 0 var(--ink); }
.contract { display: inline-flex; align-items: center; gap: 12px; border: 3px solid var(--ink); background: var(--paper); padding: 7px; cursor: pointer; }
.contract span { padding: 7px 8px; background: var(--ink); color: white; font-size: 9px; }
.contract code { font-weight: 900; }
.contract b { background: var(--blue); padding: 7px 9px; font-size: 9px; }

.hero-machine { position: relative; justify-self: center; width: min(520px, 42vw); transform: rotate(1.4deg); }
.tape-label { position: absolute; z-index: 3; top: -28px; left: 10%; padding: 10px 18px; border: 3px solid var(--ink); background: var(--yellow); font: 900 10px/1 ui-monospace, monospace; transform: rotate(-4deg); }
.hero-shadow { position: absolute; left: 9%; right: 5%; bottom: 56px; height: 12%; border: 5px solid var(--ink); background: var(--blue); transform: rotate(-4deg); }
.portrait-shell { position: relative; z-index: 2; aspect-ratio: 1/1; border: 7px solid var(--ink); border-radius: 47% 53% 45% 55% / 52% 44% 56% 48%; background: var(--paper); overflow: hidden; box-shadow: 11px 11px 0 var(--ink); transition: transform .25s; }
.portrait-shell:hover { transform: rotate(-2deg) scale(1.015); }
.portrait-shell img { width: 100%; height: 100%; object-fit: cover; display: block; mix-blend-mode: multiply; }
.scanline { position: absolute; inset: 0; background: linear-gradient(transparent 48%, rgba(0,0,0,.13) 50%, transparent 52%); background-size: 100% 12px; opacity: .3; pointer-events: none; }
.spike-burst { position: absolute; inset: -20%; opacity: 0; background: repeating-conic-gradient(from 0deg, transparent 0 18deg, var(--yellow) 19deg 23deg, transparent 24deg 38deg); transition: opacity .2s; animation: spin 8s linear infinite; }
.portrait-shell.is-asked .spike-burst { opacity: .8; }
@keyframes spin { to { transform: rotate(1turn); } }
.wearable { position: absolute; z-index: 4; opacity: 0; pointer-events: none; transform: scale(.7); transition: opacity .25s, transform .35s cubic-bezier(.2,1.6,.4,1); }
.portrait-shell.wear-hat .wearable-hat, .portrait-shell.wear-headphones .wearable-headphones, .portrait-shell.wear-earring .wearable-earring { opacity: 1; transform: scale(1); }
.wearable-hat { top: 2%; left: 33%; width: 45%; height: 20%; border: 6px solid var(--ink); border-radius: 50% 50% 18% 18%; background: var(--red); transform-origin: center bottom; }
.wearable-hat i { position: absolute; left: -5%; right: -5%; bottom: -15%; height: 38%; border: 5px solid var(--ink); border-radius: 16px; background: var(--red); }
.wearable-headphones { top: 20%; left: 5%; width: 84%; height: 38%; border: 8px solid var(--ink); border-bottom: 0; border-radius: 50% 50% 0 0; }
.wearable-headphones:before, .wearable-headphones:after { content:""; position: absolute; top: 55%; width: 15%; height: 44%; border: 6px solid var(--ink); background: var(--cream); border-radius: 45%; }
.wearable-headphones:before { left: -7%; } .wearable-headphones:after { right: -7%; }
.wearable-earring { top: 45%; right: 10%; font-size: clamp(48px, 5vw, 82px); color: var(--yellow); -webkit-text-stroke: 4px var(--ink); transform-origin: top; animation: swing 1.5s ease-in-out infinite alternate; }
@keyframes swing { to { rotate: 9deg; } }
.wearables { position: relative; z-index: 3; margin: 20px auto 0; display: flex; justify-content: center; align-items: center; gap: 6px; }
.wearables span { font: 900 8px/1 ui-monospace, monospace; margin-right: 5px; }
.wearables button { border: 3px solid var(--ink); background: var(--cream); padding: 8px 10px; font-size: 8px; cursor: pointer; }
.wearables button[aria-pressed="true"] { background: var(--blue); transform: translateY(-3px); }
.sticker { position: absolute; z-index: 6; right: -20px; top: 15%; width: 90px; aspect-ratio: 1; border: 5px solid var(--ink); border-radius: 50%; background: var(--red); cursor: pointer; font-size: 11px; transform: rotate(11deg); }
.sticker:hover { animation: wobble .35s infinite alternate; }
@keyframes wobble { to { transform: rotate(-8deg) scale(1.08); } }
.quip { position: absolute; z-index: 6; right: -40px; bottom: 90px; width: 180px; padding: 12px; border: 4px solid var(--ink); background: white; font: 800 11px/1.3 system-ui, sans-serif; opacity: 0; transform: translateY(10px) rotate(2deg); transition: .25s; }
.quip.is-shown { opacity: 1; transform: translateY(0) rotate(-2deg); }
.bottom-ticker { position: fixed; left: 0; right: 0; bottom: 0; height: 34px; border-top: 4px solid var(--ink); background: var(--yellow); overflow: hidden; white-space: nowrap; display: flex; align-items: center; z-index: 20; }
.bottom-ticker div { min-width: max-content; font-size: 10px; letter-spacing: .14em; animation: ticker 18s linear infinite; }
@keyframes ticker { to { transform: translateX(-50%); } }

.story { display: grid; grid-template-columns: minmax(320px, .75fr) minmax(520px, 1.25fr); padding: clamp(28px, 4vw, 64px) clamp(25px, 6vw, 100px); gap: 5vw; align-items: center; }
.case-index { position: relative; display: grid; align-content: center; gap: 24px; }
.vertical-note { position: absolute; left: -48px; top: 50%; writing-mode: vertical-rl; rotate: 180deg; font: 900 8px/1 ui-monospace, monospace; letter-spacing: .2em; }
.case-index h2, .lab-heading h2, .trail-head h2 { margin: 12px 0 14px; font-size: clamp(44px, 5.5vw, 88px); line-height: .86; letter-spacing: -.05em; }
.index-hint, .lab-heading > p:last-child, .trail-head > p:last-child { max-width: 500px; font: 700 14px/1.5 system-ui, sans-serif; }
.tape-list { display: grid; gap: 8px; max-width: 540px; }
.tape { width: 100%; border: 4px solid var(--ink); background: var(--cream); min-height: 66px; display: grid; grid-template-columns: 46px 1fr auto; align-items: center; text-align: left; padding: 0 14px 0 0; cursor: pointer; transition: transform .15s, background .15s; }
.tape > b { height: 100%; display: grid; place-items: center; border-right: 3px solid var(--ink); background: var(--paper); }
.tape span { padding-left: 14px; font-size: 12px; }
.tape small { display: block; margin-top: 4px; font: 700 10px/1 system-ui, sans-serif; opacity: .6; }
.tape i { font: 900 9px/1 ui-monospace, monospace; }
.tape:hover { transform: translateX(7px); }
.tape.is-active { background: var(--blue); box-shadow: 6px 6px 0 var(--ink); transform: translateX(9px) rotate(-.5deg); }
.story-card { position: relative; min-height: 610px; display: grid; grid-template-columns: .78fr 1.22fr; align-items: center; gap: 32px; border: 6px solid var(--ink); background: var(--panel); box-shadow: 12px 12px 0 var(--ink); padding: clamp(28px, 4vw, 58px); overflow: hidden; }
.story-card.is-changing { animation: cardFlip .4s ease; }
@keyframes cardFlip { 50% { transform: rotateY(8deg) translateX(10px); opacity: .35; } }
.story-number { position: absolute; top: -40px; right: 15px; font-size: 150px; line-height: 1; color: transparent; -webkit-text-stroke: 4px rgba(0,0,0,.12); }
.story-visual { position: relative; aspect-ratio: 1; display: grid; place-items: center; border: 6px solid var(--ink); border-radius: 50% 45% 55% 48%; background: var(--blue); transform: rotate(-4deg); overflow: hidden; }
.story-visual > span { position: relative; z-index: 2; font-size: clamp(80px, 10vw, 145px); color: var(--cream); -webkit-text-stroke: 5px var(--ink); filter: drop-shadow(8px 8px 0 var(--red)); }
.visual-ring { position: absolute; border: 3px solid rgba(0,0,0,.35); border-radius: 50%; animation: pulseRing 2s ease-in-out infinite; }
.visual-ring.one { width: 65%; height: 65%; }.visual-ring.two { width: 90%; height: 90%; animation-delay: .6s; }
@keyframes pulseRing { 50% { transform: scale(.86); opacity: .2; } }
.stamp { display: inline-block; border: 3px solid var(--red); color: var(--red); padding: 7px 9px; font: 900 9px/1 ui-monospace, monospace; transform: rotate(-2deg); }
.story-text h3 { margin: 22px 0 15px; font-size: clamp(27px, 3vw, 48px); line-height: .96; }
.story-text > p:not(.stamp) { font: 650 14px/1.58 system-ui, sans-serif; }
blockquote { margin: 24px 0; border-left: 7px solid var(--blue); padding: 7px 0 7px 16px; font-size: 15px; line-height: 1.35; }
.ink-key { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; font: 900 7px/1 ui-monospace, monospace; }
.ink-key span, .ink-key i, .ink-key b { width: 12px; height: 12px; border: 2px solid var(--ink); }
.ink-key span { background: var(--ink); }.ink-key i { background: var(--blue); }.ink-key b { background: var(--red); }
.page-turns { position: absolute; bottom: 18px; right: 20px; display: flex; align-items: center; gap: 10px; }
.page-turns button, .trail-controls button { width: 36px; height: 36px; border: 3px solid var(--ink); background: var(--yellow); cursor: pointer; }
.page-turns span { font: 900 9px/1 ui-monospace, monospace; }

.lab { display: grid; grid-template-columns: .62fr 1fr .62fr; gap: 3vw; align-items: center; padding: clamp(26px, 4vw, 64px) clamp(22px, 5vw, 90px); }
.lab-heading { align-self: center; }
.lab-console { position: relative; border: 6px solid var(--ink); background: var(--blue); padding: 42px 26px 28px; box-shadow: 12px 12px 0 var(--ink); transform: rotate(-.7deg); }
.console-top { position: absolute; inset: 0 0 auto; height: 34px; display: flex; align-items: center; justify-content: space-between; border-bottom: 4px solid var(--ink); background: var(--cream); padding: 0 12px; font: 900 8px/1 ui-monospace, monospace; }
.console-top i { width: 10px; height: 10px; background: var(--red); border: 2px solid var(--ink); border-radius: 50%; }
.lab-portrait { position: relative; aspect-ratio: 1; border: 5px solid var(--ink); background: var(--paper); overflow: hidden; }
.lab-portrait img { width: 100%; height: 100%; object-fit: cover; display: block; mix-blend-mode: multiply; transition: filter .4s, transform .4s; }
.lab-console[data-mood="cozy"] .lab-portrait img { filter: sepia(.28) saturate(.9); transform: scale(1.03) rotate(-2deg); }
.lab-console[data-mood="static"] .lab-portrait img { filter: contrast(1.55) saturate(1.5); animation: staticJolt .2s steps(2) infinite; }
.lab-console[data-mood="midnight"] { background: #182a4b; color: white; }
.lab-console[data-mood="midnight"] .lab-portrait img { filter: hue-rotate(35deg) brightness(.72) contrast(1.2); }
@keyframes staticJolt { 50% { transform: translate(3px,-2px); } }
.equalizer { position: absolute; left: 14px; bottom: 12px; height: 50px; display: flex; align-items: end; gap: 4px; }
.equalizer i { width: 7px; height: 30%; background: var(--red); border: 2px solid var(--ink); animation: bars .8s ease-in-out infinite alternate; }
.equalizer i:nth-child(2n) { animation-delay: -.3s; height: 75%; }.equalizer i:nth-child(3n) { animation-delay: -.6s; height: 45%; }
@keyframes bars { to { height: 100%; } }
.speech { position: absolute; top: 10px; right: 10px; max-width: 170px; padding: 10px; border: 4px solid var(--ink); background: white; color: var(--ink); font: 900 11px/1.2 system-ui, sans-serif; transform: rotate(2deg); }
.knob-bank { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 18px; gap: 8px; }
.mood-knob { border: 3px solid var(--ink); background: var(--paper); padding: 8px 2px; cursor: pointer; }
.mood-knob i { display: block; width: 28px; height: 28px; border: 3px solid var(--ink); border-radius: 50%; background: var(--cream); margin: 0 auto 6px; position: relative; }
.mood-knob i:after { content:""; position: absolute; width: 3px; height: 11px; left: 10px; top: 2px; background: var(--ink); transform-origin: 50% 11px; }
.mood-knob:nth-child(2) i:after { transform: rotate(45deg); }.mood-knob:nth-child(3) i:after { transform: rotate(100deg); }.mood-knob:nth-child(4) i:after { transform: rotate(145deg); }
.mood-knob span { font-size: 7px; }
.mood-knob.is-active { background: var(--yellow); }
.big-red { position: absolute; right: -38px; bottom: -34px; width: 90px; aspect-ratio: 1; border: 6px solid var(--ink); border-radius: 50%; background: var(--red); box-shadow: 0 8px 0 #a51d18; cursor: pointer; font-size: 16px; line-height: .85; transform: rotate(8deg); }
.big-red span { display: block; font-size: 7px; margin-bottom: 4px; }
.big-red:active { translate: 0 7px; box-shadow: none; }
.shake { animation: roomShake .35s steps(2) 3; }
@keyframes roomShake { 25% { transform: translate(9px,-4px) rotate(1deg); } 75% { transform: translate(-8px,5px) rotate(-1deg); } }
.spike-game { border: 5px solid var(--ink); background: var(--cream); padding: 13px; box-shadow: 8px 8px 0 var(--ink); transform: rotate(1deg); }
.game-head { display: flex; justify-content: space-between; font: 900 8px/1 ui-monospace, monospace; margin: 2px 3px 10px; }
.game-head i { font-style: normal; color: var(--red); font-size: 14px; }
.game-field { position: relative; height: 310px; border: 4px solid var(--ink); overflow: hidden; background: var(--paper); background-image: radial-gradient(var(--blue) 2px, transparent 2px); background-size: 23px 23px; }
.game-instructions { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; padding: 20px; background: rgba(238,234,228,.8); }
.game-instructions strong { font-size: 21px; }.game-instructions small { max-width: 190px; margin-top: 8px; font: 700 11px/1.3 system-ui, sans-serif; }
.game-start { width: 100%; margin-top: 10px; border: 4px solid var(--ink); background: var(--red); padding: 12px; cursor: pointer; font-size: 9px; letter-spacing: .1em; }
.falling-spike { position: absolute; top: -50px; width: 44px; height: 44px; border: 0; background: var(--red); clip-path: polygon(50% 0, 100% 100%, 0 100%); filter: drop-shadow(4px 4px 0 var(--ink)); cursor: crosshair; animation: fall linear forwards; }
@keyframes fall { to { top: 110%; rotate: 210deg; } }

.trail { display: grid; grid-template-columns: .62fr 1.18fr .68fr; gap: 2vw; align-items: center; padding: clamp(30px, 4vw, 64px) clamp(22px, 4vw, 76px); }
.trail-head { position: relative; z-index: 3; }
.orbit-wrap { position: relative; aspect-ratio: 1; min-width: 500px; touch-action: none; user-select: none; }
.orbit-lines { position: absolute; inset: 4%; border: 4px dashed rgba(0,0,0,.55); border-radius: 50% 46% 53% 48%; animation: spin 30s linear infinite; }
.orbit-lines i { position: absolute; inset: 12%; border: 3px solid rgba(38,121,180,.55); border-radius: 48% 52% 45% 55%; }
.orbit-lines i:nth-child(2) { inset: 25%; border-color: rgba(255,80,70,.5); }.orbit-lines i:nth-child(3) { inset: 38%; border-style: dashed; border-color: var(--ink); }
.orbit-core { position: absolute; z-index: 4; inset: 32%; border: 6px solid var(--ink); border-radius: 50%; background: var(--cream); overflow: hidden; box-shadow: 7px 7px 0 var(--red); pointer-events: none; }
.orbit-core img { width: 100%; height: 100%; object-fit: cover; mix-blend-mode: multiply; }
.orbit-core b { position: absolute; bottom: 0; left: 0; right: 0; padding: 7px; text-align: center; border-top: 4px solid var(--ink); background: var(--yellow); font-size: 9px; }
.orbit-node { position: absolute; z-index: 5; width: 118px; min-height: 75px; border: 4px solid var(--ink); background: var(--paper); box-shadow: 5px 5px 0 var(--ink); cursor: grab; text-align: left; padding: 8px; transition: left .5s cubic-bezier(.2,.8,.2,1), top .5s cubic-bezier(.2,.8,.2,1), transform .2s, background .2s; }
.orbit-node span { display: inline-grid; place-items: center; width: 25px; height: 25px; border: 2px solid var(--ink); border-radius: 50%; background: var(--blue); font-size: 8px; }
.orbit-node b { display: block; margin-top: 8px; font-size: 9px; line-height: 1; }
.orbit-node small { display: block; margin-top: 5px; font: 900 7px/1 ui-monospace, monospace; color: var(--red); }
.orbit-node.is-active { background: var(--yellow); transform: scale(1.1) rotate(-3deg); }
.trail-card { align-self: center; border: 5px solid var(--ink); background: var(--panel); box-shadow: 8px 8px 0 var(--ink); padding: 24px; transform: rotate(1deg); }
.trail-card > div:first-child { display: flex; align-items: center; gap: 10px; }
.trail-card > div:first-child span { display: grid; place-items: center; width: 42px; height: 42px; border: 3px solid var(--ink); border-radius: 50%; background: var(--blue); }
.trail-card small { font: 900 7px/1.2 ui-monospace, monospace; }
.trail-card h3 { font-size: 25px; line-height: .95; margin: 22px 0 12px; }
.trail-card p { font: 700 12px/1.5 system-ui, sans-serif; }
.trail-controls { margin-top: 24px; display: flex; justify-content: space-between; align-items: center; font: 900 7px/1 ui-monospace, monospace; }
.final-callout { position: absolute; z-index: 8; right: 3vw; bottom: 28px; background: var(--red); border: 5px solid var(--ink); box-shadow: 7px 7px 0 var(--ink); padding: 17px 20px; transform: rotate(-1.2deg); }
.final-callout > span { font: 900 7px/1 ui-monospace, monospace; }
.final-callout h3 { margin: 7px 0 12px; font-size: 22px; line-height: .9; }
.final-callout div { display: flex; gap: 7px; }.final-callout a { border: 3px solid var(--ink); background: var(--cream); padding: 8px; font-size: 7px; }

.page-dots { position: fixed; z-index: 90; left: 13px; top: 50%; transform: translateY(-50%); display: grid; gap: 9px; }
.page-dots button { width: 12px; height: 12px; border: 3px solid var(--ink); background: var(--paper); padding: 0; cursor: pointer; transform: rotate(45deg); }
.page-dots button.is-active { background: var(--red); scale: 1.35; }
.keyboard-tip { position: fixed; z-index: 89; left: 18px; bottom: 42px; writing-mode: vertical-rl; rotate: 180deg; font: 900 7px/1 ui-monospace, monospace; letter-spacing: .1em; }
.keyboard-tip span { color: var(--red); }

@media (max-width: 1180px) {
  .signal-pill { display: none; }
  .home { grid-template-columns: .9fr 1fr; padding-left: 55px; padding-right: 48px; }
  .hero-machine { width: min(480px, 44vw); }
  .lab { grid-template-columns: .56fr 1fr; padding-left: 58px; }
  .spike-game { grid-column: 1 / -1; position: absolute; right: 30px; bottom: 22px; width: 250px; transform: scale(.82) rotate(1deg); transform-origin: right bottom; }
  .trail { grid-template-columns: .72fr 1.2fr; padding-left: 58px; }
  .trail-card { position: absolute; left: 70px; bottom: 40px; width: 300px; }
  .final-callout { right: 20px; }
}

@media (max-width: 820px) {
  body { overflow: auto; }
  .cursor-dot, .keyboard-tip, .page-dots, .nav-key kbd { display: none; }
  .topbar { height: 62px; backdrop-filter: none; }
  .brand { min-width: 154px; padding: 7px 9px; }
  .brand-mark { width: 36px; height: 36px; }
  .brand b { font-size: 10px; }.brand small { font-size: 7px; }
  nav { order: 3; position: fixed; bottom: 0; left: 0; right: 0; height: 52px; background: var(--paper); border-top: 4px solid var(--ink); z-index: 120; }
  .nav-key { flex: 1; padding: 0 6px; border: 0; border-left: 2px solid var(--ink); }
  .header-actions { margin-left: auto; }.icon-btn { width: 45px; }.buy-mini { min-width: 94px; padding: 0 8px; font-size: 8px; }
  main { position: fixed; inset: 62px 0 52px; }
  .screen { padding: 38px 23px 70px; display: block; }
  .home, .story, .lab, .trail { overflow-y: auto; }
  .hero-copy h1 { font-size: clamp(51px, 16vw, 84px); }
  .hero-lede { font-size: 14px; }
  .hero-machine { width: min(92vw, 500px); margin: 80px auto 0; }
  .bottom-ticker { bottom: 52px; }
  .story-card { margin-top: 50px; grid-template-columns: 1fr; min-height: 0; padding-bottom: 70px; }
  .story-visual { width: min(280px, 78vw); margin: auto; }
  .vertical-note { display: none; }
  .lab-console { width: min(520px, 94vw); margin: 45px auto; }
  .spike-game { position: relative; inset: auto; width: 100%; transform: none; margin-top: 55px; }
  .game-field { height: 280px; }
  .trail-head { margin-bottom: 36px; }
  .orbit-wrap { min-width: 0; width: 100%; margin: 0 auto 35px; }
  .orbit-node { width: 88px; min-height: 66px; padding: 6px; }
  .orbit-node b { font-size: 7px; }
  .trail-card { position: relative; inset: auto; width: 100%; margin: 20px 0 180px; }
  .final-callout { position: relative; right: auto; bottom: auto; margin: 30px 0; }
}

@media (max-width: 480px) {
  .brand span:last-child { display: none; }
  .brand { min-width: 58px; }
  .hero-actions { display: grid; }
  .chunky { width: 100%; }
  .contract { width: 100%; justify-content: space-between; }
  .wearables { flex-wrap: wrap; }
  .wearables span { width: 100%; text-align: center; }
  .sticker { right: -4px; width: 76px; }.quip { right: 0; }
  .story-card { padding: 25px 18px 65px; border-width: 5px; }
  .knob-bank { grid-template-columns: repeat(2, 1fr); }
  .big-red { right: -8px; }
  .orbit-wrap { scale: .94; }
  .orbit-node { width: 77px; }
}

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