/* ============================================================
   WCVS — The Autonomic Bridge
   Design system + motion
   ============================================================ */

:root {
  --ink: #05060a;
  --ink2: #080a11;
  --ink3: #0c0f18;
  --bone: #f2efe9;
  --mute: rgba(242, 239, 233, 0.58);
  --faint: rgba(242, 239, 233, 0.34);
  --line: rgba(242, 239, 233, 0.1);
  --line2: rgba(242, 239, 233, 0.18);
  --ember: #ff4a2e;
  --ember2: #ff9166;
  --cyan: #3ff0d2;
  --cyan2: #8ffff0;
  --vio: #9b8cff;
  --copper: #c98f63;
  --maxw: 1280px;
  --sans: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --serif: "Instrument Serif", "Times New Roman", Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
  /* clip, not hidden: hidden on an ancestor breaks position: sticky in Safari */
  overflow-x: clip;
}

body {
  background: var(--ink);
  color: var(--bone);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  cursor: default;
}

body.has-cursor,
body.has-cursor a,
body.has-cursor button { cursor: none; }

::selection { background: rgba(63, 240, 210, 0.22); color: #fff; }

img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; }
ul, ol { list-style: none; }

:focus-visible {
  outline: 1px solid var(--cyan);
  outline-offset: 4px;
  border-radius: 2px;
}

.skip {
  position: fixed; top: -100px; left: 16px; z-index: 10001;
  background: var(--cyan); color: #04120f; padding: 10px 16px;
  font-family: var(--mono); font-size: 12px;
}
.skip:focus { top: 16px; }

/* ── ambient ───────────────────────────────────────────── */
#field {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: 0; pointer-events: none; opacity: 0.55;
}

.grain {
  position: fixed; inset: 0; z-index: 60; pointer-events: none;
  opacity: 0.05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

main, nav, footer, #progress, .marquee { position: relative; z-index: 1; }

/* ── type ──────────────────────────────────────────────── */
.kicker {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 22px;
}

.h2 {
  font-size: clamp(2.1rem, 5.4vw, 4.6rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
  font-weight: 500;
}

.serif { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -0.01em; }
.em {
  background: linear-gradient(100deg, #d7fff6 5%, var(--cyan) 45%, var(--vio) 95%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

.lede {
  font-size: clamp(1.02rem, 1.35vw, 1.22rem);
  line-height: 1.7;
  color: var(--mute);
  max-width: 62ch;
}
.lede strong { color: var(--bone); font-weight: 500; }
.narrow { max-width: 46ch; }

p { color: var(--mute); }
p strong { color: var(--bone); font-weight: 500; }
aside, .aside { color: rgba(242, 239, 233, 0.45); }

.micro {
  font-family: var(--mono);
  font-size: 10.5px;
  line-height: 1.7;
  letter-spacing: 0.04em;
  color: rgba(242, 239, 233, 0.32);
}

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 64px);
}

.section {
  position: relative;
  padding: clamp(90px, 13vh, 168px) 0;
}

.sec-head { margin-bottom: clamp(46px, 7vw, 88px); }
.sec-head.split {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: clamp(24px, 4vw, 64px);
  align-items: end;
}
.sec-head.split .kicker { grid-column: 1 / -1; margin-bottom: 6px; }
.sec-head.split .h2 { grid-column: 1; }
.sec-head.split .lede { grid-column: 2; padding-bottom: 8px; }

/* ── loader ────────────────────────────────────────────── */
#loader {
  position: fixed; inset: 0; z-index: 10000;
  background: var(--ink);
  display: grid; place-items: center;
  transition: transform 1.05s var(--ease), opacity 0.5s ease 0.5s;
}
#loader.done { transform: translateY(-101%); opacity: 0.9; }
#loader.gone { display: none; }
html:not(.js) #loader { display: none; }
/* if app.js is blocked or fails, never trap the page behind the loader */
@keyframes loaderFailsafe { to { visibility: hidden; pointer-events: none; } }
#loader { animation: loaderFailsafe 0.5s linear 3.8s forwards; }

.loader-inner { width: min(320px, 74vw); }
.loader-mark {
  font-size: 34px; font-weight: 700; letter-spacing: -0.04em;
  margin-bottom: 18px;
}
.loader-mark span { color: var(--cyan); }
.loader-line { height: 1px; background: var(--line); overflow: hidden; }
.loader-line i { display: block; height: 100%; width: 0%; background: var(--cyan); }
.loader-meta {
  display: flex; justify-content: space-between; margin-top: 10px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.2em;
  color: var(--faint);
}
.loader-sub {
  margin-top: 40px; font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.12em; color: rgba(242, 239, 233, 0.2);
}

/* ── nav ───────────────────────────────────────────────── */
#nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 90;
  display: flex; align-items: center; gap: clamp(16px, 3vw, 44px);
  padding: 22px clamp(20px, 4vw, 48px);
  transition: background 0.5s ease, backdrop-filter 0.5s ease, padding 0.5s var(--ease),
              border-color 0.5s ease;
  border-bottom: 1px solid transparent;
}
#nav.solid {
  background: rgba(5, 6, 10, 0.72);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  padding-top: 14px; padding-bottom: 14px;
  border-bottom-color: var(--line);
}

.brand { display: flex; align-items: center; gap: 5px; font-weight: 700; letter-spacing: -0.04em; font-size: 17px; }
.brand-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }

.nav-links { display: flex; gap: clamp(12px, 2vw, 30px); margin-left: auto; }
.nav-links a {
  position: relative;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em;
  color: var(--mute); padding: 4px 0;
  transition: color 0.35s ease;
  display: flex; align-items: baseline; gap: 6px;
}
.nav-links a i { font-style: normal; font-size: 8px; color: rgba(242, 239, 233, 0.24); transition: color 0.35s ease; }
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 1px;
  background: var(--cyan); transform: scaleX(0); transform-origin: left;
  transition: transform 0.4s var(--ease);
}
@media (hover: hover) {
  .nav-links a:hover { color: var(--bone); }
  .nav-links a:hover::after { transform: scaleX(1); }
  .nav-links a:hover i { color: var(--cyan); }
}

.nav-tag {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.18em;
  color: rgba(242, 239, 233, 0.42);
  border: 1px solid var(--line2); border-radius: 100px;
  padding: 6px 12px; white-space: nowrap;
}

#menuBtn {
  display: none; width: 44px; height: 44px; margin-left: auto;
  align-items: center; justify-content: center; flex-direction: column; gap: 6px;
}
#menuBtn span { display: block; width: 22px; height: 1px; background: var(--bone); transition: transform 0.4s var(--ease), opacity 0.3s ease; }
#menuBtn.open span:first-child { transform: translateY(3.5px) rotate(45deg); }
#menuBtn.open span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

#menu {
  position: fixed; inset: 0; z-index: 89;
  background: rgba(5, 6, 10, 0.97);
  -webkit-clip-path: circle(0% at calc(100% - 42px) 44px);
  clip-path: circle(0% at calc(100% - 42px) 44px);
  transition: -webkit-clip-path 0.85s var(--ease), clip-path 0.85s var(--ease);
  display: flex; align-items: center;
  pointer-events: none;
}
#menu.open {
  -webkit-clip-path: circle(150% at calc(100% - 42px) 44px);
  clip-path: circle(150% at calc(100% - 42px) 44px);
  pointer-events: auto;
}
.menu-inner { padding: 0 clamp(24px, 8vw, 90px); display: flex; flex-direction: column; gap: 2px; width: 100%; }
.menu-inner .kicker { margin-bottom: 18px; }
.menu-inner a {
  font-size: clamp(1.6rem, 7vw, 3rem); line-height: 1.18; letter-spacing: -0.03em;
  display: flex; align-items: baseline; gap: 16px;
  opacity: 0; transform: translateY(22px);
  transition: opacity 0.6s ease, transform 0.6s var(--ease), color 0.3s ease;
  border-bottom: 1px solid rgba(242, 239, 233, 0.06);
  padding: 6px 0;
}
#menu.open a { opacity: 1; transform: none; }
#menu.open a:nth-child(2) { transition-delay: 0.08s; }
#menu.open a:nth-child(3) { transition-delay: 0.13s; }
#menu.open a:nth-child(4) { transition-delay: 0.18s; }
#menu.open a:nth-child(5) { transition-delay: 0.23s; }
#menu.open a:nth-child(6) { transition-delay: 0.28s; }
#menu.open a:nth-child(7) { transition-delay: 0.33s; }
#menu.open a:nth-child(8) { transition-delay: 0.38s; }
#menu.open a:nth-child(9) { transition-delay: 0.43s; }
#menu.open a:nth-child(10) { transition-delay: 0.48s; }
.menu-inner a i { font-style: normal; font-family: var(--mono); font-size: 10px; color: var(--cyan); }
@media (hover: hover) {
  .menu-inner a:hover { color: var(--cyan); }
}

/* ── progress + cursor ─────────────────────────────────── */
#progress {
  position: fixed; right: 26px; top: 50%; transform: translateY(-50%);
  z-index: 80; display: flex; flex-direction: column; align-items: center; gap: 12px;
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.1em; color: var(--faint);
}
.progress-rail { width: 1px; height: 120px; background: var(--line); position: relative; }
.progress-rail i {
  position: absolute; top: 0; left: 0; width: 100%; height: 0%;
  background: linear-gradient(var(--cyan), var(--vio));
}

#cursor, #cursorRing {
  position: fixed; top: 0; left: 0; z-index: 9999;
  pointer-events: none; border-radius: 50%;
  opacity: 0; transition: opacity 0.3s ease;
  will-change: transform;
}
#cursor { width: 5px; height: 5px; background: var(--cyan); }
#cursorRing {
  width: 34px; height: 34px; border: 1px solid rgba(242, 239, 233, 0.45);
  transition: opacity 0.3s ease, width 0.35s var(--ease), height 0.35s var(--ease),
              border-color 0.35s ease, background 0.35s ease;
}
body.cursor-active #cursor, body.cursor-active #cursorRing { opacity: 1; }
#cursorRing.hot {
  width: 58px; height: 58px; border-color: rgba(63, 240, 210, 0.7);
  background: rgba(63, 240, 210, 0.06);
}

/* ── hero ──────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex; align-items: center;
  padding: 120px 0 70px;
  overflow: hidden;
}
.hero-glow {
  position: absolute; z-index: 0;
  width: 60vw; height: 60vw; max-width: 780px; max-height: 780px;
  right: -8vw; top: 4vh; border-radius: 50%;
  background: radial-gradient(circle, rgba(63, 240, 210, 0.13), rgba(155, 140, 255, 0.07) 42%, transparent 68%);
  filter: blur(30px);
  animation: breathe 12s ease-in-out infinite;
}
@keyframes breathe {
  0%, 100% { transform: scale(1) translateY(0); opacity: 0.85; }
  50% { transform: scale(1.12) translateY(-18px); opacity: 1; }
}

.hero-inner {
  position: relative; z-index: 2;
  width: 100%; max-width: var(--maxw); margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 64px);
  display: grid; grid-template-columns: 1.18fr 0.82fr;
  gap: clamp(20px, 4vw, 60px);
  align-items: center;
}

.hero-eyebrow {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em;
  text-transform: uppercase; color: rgba(242, 239, 233, 0.5);
  margin-bottom: clamp(22px, 4vh, 40px);
}
.hero-eyebrow .sep { color: rgba(242, 239, 233, 0.2); }
.pulse-dot {
  width: 5px; height: 5px; border-radius: 50%; background: var(--cyan);
  box-shadow: 0 0 0 0 rgba(63, 240, 210, 0.6);
  animation: ping 2.6s ease-out infinite;
}
@keyframes ping {
  0% { box-shadow: 0 0 0 0 rgba(63, 240, 210, 0.5); }
  70% { box-shadow: 0 0 0 9px rgba(63, 240, 210, 0); }
  100% { box-shadow: 0 0 0 0 rgba(63, 240, 210, 0); }
}

.hero-title {
  font-size: clamp(3.3rem, 10.4vw, 9.4rem);
  line-height: 0.84;
  letter-spacing: -0.055em;
  font-weight: 500;
  margin-bottom: clamp(24px, 4vh, 40px);
}
.htl { display: block; overflow: hidden; padding: 0 0 0.06em; }
.htw {
  display: inline-block;
  transform: translateY(115%);
  will-change: transform;
}
body.loaded .htw { animation: rise 1.15s var(--ease) forwards; }
body.loaded .htl:nth-child(1) .htw { animation-delay: 0.05s; }
body.loaded .htl:nth-child(2) .htw { animation-delay: 0.15s; }
body.loaded .htl:nth-child(3) .htw { animation-delay: 0.25s; }
@keyframes rise { to { transform: translateY(0); } }

.hero-title .serif { font-size: 1.02em; padding-right: 0.04em; }
.hero-dot { color: var(--cyan); }

.hero-lede {
  font-size: clamp(1rem, 1.45vw, 1.28rem);
  line-height: 1.6;
  color: rgba(242, 239, 233, 0.62);
  max-width: 34ch;
  margin-bottom: 30px;
}
.hero-lede em { font-style: normal; color: var(--bone); }

.hero-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: clamp(30px, 6vh, 56px); }
.hero-chips span {
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.16em;
  color: rgba(242, 239, 233, 0.45);
  border: 1px solid var(--line); border-radius: 100px;
  padding: 5px 11px;
}

.hero-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.scroll-cue { display: flex; align-items: center; gap: 12px; font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; color: rgba(242, 239, 233, 0.42); }
.cue-line { width: 46px; height: 1px; background: var(--line2); position: relative; overflow: hidden; }
.cue-line i { position: absolute; inset: 0; background: var(--cyan); transform: translateX(-100%); animation: sweep 2.4s var(--ease) infinite; }
@keyframes sweep { 0% { transform: translateX(-100%); } 55%, 100% { transform: translateX(100%); } }

.hero-spec { display: flex; gap: clamp(16px, 2.4vw, 34px); }
.hero-spec div { display: flex; flex-direction: column; }
.hero-spec b { font-size: 15px; font-weight: 500; letter-spacing: -0.02em; }
.hero-spec span { font-family: var(--mono); font-size: 9px; letter-spacing: 0.14em; color: var(--faint); text-transform: uppercase; }

/* hero schematic */
.hero-fig { position: relative; perspective: 1200px; }
.fig-frame {
  position: relative;
  border: 1px solid var(--line);
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(63, 240, 210, 0.07), transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,0.02), transparent);
  padding: 34px 22px 26px;
  transform-style: preserve-3d;
  transition: transform 0.6s var(--ease);
}
.fig-frame::before {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 44px 44px;
  opacity: 0.35; pointer-events: none;
}
.fig-corner { position: absolute; width: 9px; height: 9px; border: 1px solid rgba(63, 240, 210, 0.55); }
.fig-corner.tl { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.fig-corner.tr { top: -1px; right: -1px; border-left: 0; border-bottom: 0; }
.fig-corner.bl { bottom: -1px; left: -1px; border-right: 0; border-top: 0; }
.fig-corner.br { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }
.fig-label {
  position: absolute; font-family: var(--mono); font-size: 8.5px;
  letter-spacing: 0.16em; color: rgba(242, 239, 233, 0.34);
}
.fig-label.top { top: 12px; left: 16px; }
.fig-label.bottom { bottom: 10px; left: 16px; }

#rig { width: 100%; height: min(62vh, 560px); overflow: visible; }
.node { fill: var(--cyan); }
.node-halo { fill: none; stroke: rgba(63, 240, 210, 0.4); }
.rig-tick { stroke: rgba(242, 239, 233, 0.16); }
.rig-spine { stroke: rgba(242, 239, 233, 0.22); stroke-width: 1.2; }
.rig-strap {
  stroke: var(--copper); stroke-width: 5; fill: none;
  stroke-linecap: round; opacity: 0.72;
}
.rig-strap-core {
  stroke: rgba(255, 255, 255, 0.24); stroke-width: 1.1; fill: none;
  stroke-dasharray: 2 4;
}
.rig-peltier {
  fill: rgba(63, 240, 210, 0.14);
  stroke: rgba(63, 240, 210, 0.6); stroke-width: 1;
}
.rig-pad {
  fill: rgba(155, 140, 255, 0.09);
  stroke: rgba(155, 140, 255, 0.45); stroke-width: 1;
  stroke-dasharray: 3 3;
}
.rig-wing { fill: none; stroke: rgba(155, 140, 255, 0.55); stroke-width: 1.4; }
.rig-label { font-family: var(--mono); font-size: 8px; letter-spacing: 0.12em; fill: rgba(242, 239, 233, 0.3); }
.rig-node-group { animation: nodePulse 3s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes nodePulse {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

.hero-index {
  position: absolute; left: clamp(20px, 5vw, 64px); bottom: 26px;
  display: flex; align-items: center; gap: 14px;
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.18em; color: rgba(242, 239, 233, 0.26);
}
.hero-index-line { width: 40px; height: 1px; background: var(--line2); }

/* ── marquee ───────────────────────────────────────────── */
.marquee {
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  overflow: hidden; padding: 14px 0; background: rgba(8, 10, 17, 0.6);
}
.marquee-track {
  display: flex; align-items: center; gap: 26px; width: max-content;
  animation: marquee 42s linear infinite;
}
@media (hover: hover) {
  .marquee:hover .marquee-track { animation-play-state: paused; }
}
.marquee-track span {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.2em;
  text-transform: uppercase; color: rgba(242, 239, 233, 0.34);
  white-space: nowrap;
}
.marquee-track i { font-size: 7px; color: var(--cyan); font-style: normal; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ── reveal system ─────────────────────────────────────── */
.js [data-reveal] {
  opacity: 0;
  transform: translate3d(0, 30px, 0);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
  transition-delay: var(--d, 0s);
}
.js [data-reveal].in { opacity: 1; transform: none; }

/* ── crisis ────────────────────────────────────────────── */
.crisis-grid {
  display: grid; grid-template-columns: 1.02fr 0.98fr;
  gap: clamp(32px, 5vw, 72px); align-items: start;
}
.crisis-copy p + p { margin-top: 18px; }
.crisis-copy .aside {
  margin-top: 20px; padding-left: 18px;
  border-left: 1px solid rgba(255, 74, 46, 0.35);
  font-size: 0.92rem; line-height: 1.7;
}

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-top: 40px; background: var(--line); border: 1px solid var(--line); }
.stat { background: var(--ink); padding: 18px 16px 20px; position: relative; overflow: hidden; }
.stat-num { font-size: clamp(1.5rem, 2.6vw, 2.3rem); font-weight: 500; letter-spacing: -0.04em; line-height: 1; color: var(--bone); }
.stat-num::after { content: ""; }
.stat-cap { font-family: var(--mono); font-size: 9px; line-height: 1.6; letter-spacing: 0.08em; color: var(--faint); margin-top: 10px; text-transform: uppercase; }
.stat-bar { position: absolute; left: 0; bottom: 0; width: 100%; height: 2px; background: rgba(255, 74, 46, 0.15); }
.stat-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--ember), var(--ember2)); transition: width 1.6s var(--ease) 0.25s; }
.js .stat.in .stat-bar i { width: var(--w); }

/* storm */
.storm {
  position: relative; min-height: clamp(440px, 62vh, 620px);
  border: 1px solid var(--line);
  background: radial-gradient(120% 90% at 50% 100%, rgba(255, 74, 46, 0.09), transparent 62%), var(--ink2);
  overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 22px;
  transition: border-color 0.6s ease;
}
.storm.calm { border-color: rgba(63, 240, 210, 0.3); }
.storm canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.storm-grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 52px 52px; opacity: 0.25; pointer-events: none;
}
.storm-hud { position: relative; z-index: 2; display: flex; flex-direction: column; gap: 8px; }
.hud-row {
  display: flex; justify-content: space-between; align-items: baseline;
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.14em;
  color: rgba(242, 239, 233, 0.38);
  border-bottom: 1px solid rgba(242, 239, 233, 0.06);
  padding-bottom: 6px; max-width: 230px;
}
.hud-row b { font-weight: 400; color: var(--ember2); font-size: 11px; transition: color 0.5s ease; }
.storm.calm .hud-row b { color: var(--cyan); }

.storm-btn {
  position: relative; z-index: 2; align-self: center;
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--bone);
  border: 1px solid rgba(242, 239, 233, 0.22);
  border-radius: 100px; padding: 13px 26px;
  background: rgba(5, 6, 10, 0.5);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: border-color 0.4s ease, background 0.4s ease, transform 0.3s var(--ease);
  user-select: none; -webkit-user-select: none;
  touch-action: manipulation; /* keep vertical scrolling available while holding */
}
@media (hover: hover) {
  .storm-btn:hover { border-color: var(--cyan); background: rgba(63, 240, 210, 0.08); }
}
.storm-btn:active { transform: scale(0.97); }
.sb-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ember); transition: background 0.4s ease; }
.storm-btn.on .sb-dot { background: var(--cyan); box-shadow: 0 0 12px var(--cyan); }
.storm .micro { position: relative; z-index: 2; text-align: center; }

/* ── mechanism ─────────────────────────────────────────── */
.mech { position: relative; height: 340vh; }
.mech-stage {
  position: sticky; top: 0; height: 100vh; height: 100svh;
  display: flex; align-items: center;
  overflow: hidden;
}
.mech-grid {
  display: grid; grid-template-columns: 0.92fr 1.08fr;
  gap: clamp(24px, 4vw, 60px); align-items: center;
}
.mech-copy .h2 { margin-bottom: clamp(24px, 4vh, 40px); }

.mech-steps { display: grid; }
.mech-steps li {
  grid-area: 1 / 1;
  transform: translateY(14px);
  transition: opacity 0.55s ease, transform 0.7s var(--ease);
  pointer-events: none;
}
.js .mech-steps li { opacity: 0; }
html:not(.js) .mech-steps { display: block; }
html:not(.js) .mech-steps li { opacity: 1; transform: none; margin-bottom: 24px; }
.mech-steps li.on { opacity: 1; transform: none; pointer-events: auto; }
.ms-num { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.2em; color: var(--cyan); }
.mech-steps h3 { font-size: clamp(1.5rem, 2.8vw, 2.2rem); font-weight: 500; letter-spacing: -0.03em; line-height: 1.1; margin: 10px 0 12px; }
.mech-steps p { font-size: 0.96rem; line-height: 1.72; max-width: 44ch; }

.mech-caveat {
  margin-top: 28px; font-size: 0.82rem; line-height: 1.7;
  color: rgba(242, 239, 233, 0.4);
  padding-left: 14px; border-left: 1px solid rgba(155, 140, 255, 0.35);
  max-width: 46ch;
}
.mech-caveat em { color: rgba(242, 239, 233, 0.65); font-style: normal; }

.mech-fig { position: relative; }
#mechSvg { width: 100%; height: min(70vh, 640px); }
.trace { stroke-dasharray: var(--len, 600); stroke-dashoffset: var(--len, 600); transition: stroke-dashoffset 0.15s linear; opacity: 0.9; }
.svg-lab { font-family: var(--mono); font-size: 8.5px; letter-spacing: 0.14em; fill: rgba(242, 239, 233, 0.45); }
.svg-lab.mid { text-anchor: middle; }
.svg-lab.dim { fill: rgba(242, 239, 233, 0.25); }
#pulse { opacity: 0; filter: drop-shadow(0 0 8px rgba(63, 240, 210, 0.8)); }

.fig-readout {
  display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px;
  font-family: var(--mono); font-size: 8.5px; letter-spacing: 0.12em;
}
.fig-readout span {
  padding: 5px 9px; border: 1px solid var(--line); color: rgba(242, 239, 233, 0.24);
  transition: color 0.5s ease, border-color 0.5s ease, background 0.5s ease;
}
.fig-readout span.on { color: var(--cyan); border-color: rgba(63, 240, 210, 0.35); background: rgba(63, 240, 210, 0.05); }

/* ── evidence ──────────────────────────────────────────── */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.card {
  background: var(--ink);
  padding: 28px 26px 22px;
  display: flex; flex-direction: column;
  min-height: 250px;
  position: relative;
  transition: background 0.5s ease, transform 0.5s var(--ease), box-shadow 0.5s ease;
  will-change: transform;
}
.card::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(220px circle at var(--mx, 50%) var(--my, 0%), rgba(63, 240, 210, 0.09), transparent 65%);
  opacity: 0; transition: opacity 0.4s ease; pointer-events: none;
}
@media (hover: hover) {
  .card:hover::after { opacity: 1; }
  .card:hover { background: var(--ink3); }
}
.card-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 18px; }
.card-year { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; color: var(--cyan); }
.card-tag {
  font-family: var(--mono); font-size: 8.5px; letter-spacing: 0.12em; text-transform: uppercase;
  color: rgba(242, 239, 233, 0.4); border: 1px solid var(--line); padding: 3px 8px; white-space: nowrap;
}
.card h3 { font-size: 1.12rem; font-weight: 500; letter-spacing: -0.02em; line-height: 1.3; margin-bottom: 10px; }
.card p { font-size: 0.86rem; line-height: 1.68; color: rgba(242, 239, 233, 0.5); flex: 1; }
.card-foot {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--line);
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.1em; color: rgba(242, 239, 233, 0.3);
}
.card-foot .arrow { color: var(--cyan); transition: transform 0.4s var(--ease); }
@media (hover: hover) {
  .card:hover .arrow { transform: translate(3px, -3px); }
}
.card.accent { background: linear-gradient(180deg, rgba(63, 240, 210, 0.055), transparent 65%), var(--ink); }
.card.accent h3 { color: var(--cyan2); }
.card.warn { background: linear-gradient(180deg, rgba(255, 74, 46, 0.05), transparent 65%), var(--ink); }
.card.warn .card-year { color: var(--ember2); }

.open-q {
  margin-top: 22px; border: 1px dashed rgba(155, 140, 255, 0.28);
  padding: 26px 28px; display: flex; gap: 22px; align-items: flex-start;
  background: rgba(155, 140, 255, 0.03);
}
.oq-mark {
  font-family: var(--serif); font-size: 40px; line-height: 0.8; color: var(--vio);
  flex: 0 0 auto;
}
.open-q h4 { font-size: 0.98rem; font-weight: 500; letter-spacing: -0.01em; margin-bottom: 6px; }
.open-q p { font-size: 0.88rem; line-height: 1.7; max-width: 78ch; }

/* ── device (pinned) ───────────────────────────────────── */
.device { position: relative; z-index: 1; }
.pin-wrap { position: relative; }
.pin-stage {
  position: sticky; top: 0; height: 100vh; height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(12, 15, 24, 0.4), rgba(5, 6, 10, 0.9));
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.pin-head {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 24px;
  padding-top: clamp(70px, 10vh, 100px);
  margin-bottom: clamp(20px, 3vh, 40px);
  flex: 0 0 auto;
}
.pin-head .h2 { font-size: clamp(1.8rem, 4vw, 3.4rem); }
.pin-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.pin-meta > span { font-family: var(--mono); font-size: 9px; letter-spacing: 0.2em; color: var(--faint); }
.pin-dots { display: flex; gap: 6px; }
.pin-dots i { width: 22px; height: 2px; background: rgba(242, 239, 233, 0.15); transition: background 0.4s ease; }
.pin-dots i.on { background: var(--cyan); }

.device-track {
  display: flex; gap: clamp(14px, 2vw, 28px);
  padding: 0 clamp(20px, 5vw, 64px);
  width: max-content;
  will-change: transform;
}
.panel {
  width: min(520px, 76vw);
  min-height: clamp(400px, 58vh, 560px);
  border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.028), rgba(255, 255, 255, 0.005) 45%), var(--ink2);
  padding: clamp(24px, 3vw, 38px);
  display: flex; flex-direction: column;
  position: relative; overflow: hidden;
  flex: 0 0 auto;
}
.panel::before {
  content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 1px;
  background: linear-gradient(90deg, var(--cyan), transparent 60%); opacity: 0.35;
}
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 26px; }
.panel-num { font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em; color: var(--cyan); }
.panel-kind { font-family: var(--mono); font-size: 9px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--faint); }
.panel h3 { font-size: clamp(1.5rem, 2.4vw, 2.05rem); font-weight: 500; line-height: 1.05; letter-spacing: -0.03em; margin-bottom: 14px; }
.panel-lede { font-size: 0.88rem; line-height: 1.68; color: rgba(242, 239, 233, 0.52); margin-bottom: 22px; max-width: 42ch; }
.specs { display: flex; flex-direction: column; gap: 0; border-top: 1px solid var(--line); }
.specs > div {
  display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 14px;
  padding: 9px 0; border-bottom: 1px solid rgba(242, 239, 233, 0.055);
  font-size: 0.8rem;
}
.specs dt { font-family: var(--mono); font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(242, 239, 233, 0.32); padding-top: 2px; }
.specs dd { color: rgba(242, 239, 233, 0.78); line-height: 1.5; }
.panel-note {
  margin-top: auto; padding-top: 18px; font-size: 0.82rem; line-height: 1.68;
  color: rgba(242, 239, 233, 0.42);
  border-top: 1px solid var(--line);
}

.pin-progress {
  margin: clamp(16px, 3vh, 28px) auto 0; width: min(520px, 82vw); height: 1px;
  background: var(--line); flex: 0 0 auto;
}
.pin-progress i { display: block; height: 100%; width: 0%; background: linear-gradient(90deg, var(--cyan), var(--vio)); }

/* ── readout ───────────────────────────────────────────── */
.dash {
  border: 1px solid var(--line);
  background: radial-gradient(100% 120% at 50% 0%, rgba(63, 240, 210, 0.05), transparent 55%), var(--ink2);
  padding: clamp(18px, 2.4vw, 30px);
}
.dash-top {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  padding-bottom: 18px; margin-bottom: 22px; border-bottom: 1px solid var(--line);
}
.dash-id { display: flex; align-items: center; gap: 9px; font-family: var(--mono); font-size: 9px; letter-spacing: 0.16em; color: rgba(242, 239, 233, 0.45); }
.dash-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--cyan); }
.dash-clock { margin-left: auto; font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; color: var(--faint); }
.dash-clock span:first-child { color: var(--bone); }
.dash-btn {
  border: 1px solid rgba(63, 240, 210, 0.35); color: var(--cyan);
  font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.16em; text-transform: uppercase;
  padding: 9px 18px; border-radius: 100px;
  transition: background 0.35s ease, color 0.35s ease, border-color 0.35s ease;
}
@media (hover: hover) {
  .dash-btn:hover { background: rgba(63, 240, 210, 0.1); }
}
.dash-btn.running { background: rgba(63, 240, 210, 0.14); color: var(--bone); }

.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.metric { background: var(--ink2); padding: 18px 16px 14px; }
.m-head { display: flex; align-items: baseline; gap: 6px; font-family: var(--mono); font-size: 8.5px; letter-spacing: 0.13em; color: rgba(242, 239, 233, 0.38); }
.m-head span { flex: 1; }
.m-head b { font-size: 17px; font-weight: 400; letter-spacing: -0.02em; color: var(--bone); font-variant-numeric: tabular-nums; }
.m-head em { font-style: normal; font-size: 8px; color: rgba(242, 239, 233, 0.3); }
.metric svg { width: 100%; height: 96px; margin: 12px 0 10px; overflow: visible; }
.m-grid { stroke: rgba(242, 239, 233, 0.05); stroke-width: 1; fill: none; }
.m-line { fill: none; stroke: var(--cyan); stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; filter: drop-shadow(0 0 6px rgba(63, 240, 210, 0.35)); }
.m-foot { display: flex; justify-content: space-between; align-items: center; font-family: var(--mono); font-size: 8.5px; letter-spacing: 0.08em; color: rgba(242, 239, 233, 0.3); }
.m-foot i { font-style: normal; }
.m-foot .up { color: var(--cyan); }
.m-foot .down { color: var(--vio); }
.dash-note { margin-top: 16px; max-width: 90ch; }

/* ── protocol ──────────────────────────────────────────── */
.proto-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px, 5vw, 72px); align-items: start; }
.steps { border-top: 1px solid var(--line); }
.steps li {
  display: grid; grid-template-columns: 58px 1fr; gap: 16px;
  padding: 20px 0; border-bottom: 1px solid var(--line);
  transition: padding-left 0.5s var(--ease), background 0.5s ease;
}
@media (hover: hover) {
  .steps li:hover { padding-left: 8px; }
}
.step-num { font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; color: var(--cyan); padding-top: 4px; }
.steps h4 { font-size: 1.02rem; font-weight: 500; letter-spacing: -0.01em; margin-bottom: 3px; }
.steps p { font-size: 0.86rem; line-height: 1.65; }

.proto-cards { display: flex; flex-direction: column; gap: 16px; }
.proto-card {
  border: 1px solid var(--line); padding: 26px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.025), transparent 60%), var(--ink2);
}
.proto-card h3 { font-size: 1.18rem; font-weight: 500; letter-spacing: -0.02em; margin: 12px 0 10px; }
.proto-card p { font-size: 0.86rem; line-height: 1.7; }
.pill-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.pill-row span {
  font-family: var(--mono); font-size: 8.5px; letter-spacing: 0.1em;
  border: 1px solid var(--line2); color: rgba(242, 239, 233, 0.45);
  padding: 4px 9px; border-radius: 100px;
}

/* ── timeline ──────────────────────────────────────────── */
.timeline { position: relative; padding-left: 34px; }
.tl-line { position: absolute; left: 5px; top: 6px; bottom: 6px; width: 1px; background: var(--line); }
.tl-line i { position: absolute; top: 0; left: 0; width: 100%; height: 0%; background: linear-gradient(var(--cyan), var(--vio)); box-shadow: 0 0 12px rgba(63, 240, 210, 0.4); }
.tl-items { display: grid; gap: 2px; }
.tl-item { position: relative; padding: 18px 0 20px; border-bottom: 1px solid var(--line); }
.tl-item::before {
  content: ""; position: absolute; left: -34px; top: 26px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--ink); border: 1px solid rgba(242, 239, 233, 0.25);
  transition: background 0.5s ease, border-color 0.5s ease, box-shadow 0.5s ease;
}
.tl-item.in::before { background: var(--cyan); border-color: var(--cyan); box-shadow: 0 0 12px rgba(63, 240, 210, 0.6); }
.tl-m { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.16em; color: var(--cyan); }
.tl-item h4 { font-size: 1.06rem; font-weight: 500; letter-spacing: -0.015em; margin: 6px 0 4px; }
.tl-item p { font-size: 0.86rem; line-height: 1.65; max-width: 70ch; }

/* ── budget ────────────────────────────────────────────── */
.budget { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(28px, 5vw, 70px); align-items: start; }
.bt-label { font-family: var(--mono); font-size: 9px; letter-spacing: 0.2em; color: var(--faint); }
.bt-num { font-size: clamp(3rem, 7vw, 5.6rem); font-weight: 500; letter-spacing: -0.05em; line-height: 1; margin: 8px 0 18px; }
.bt-note { display: block; font-size: 0.86rem; line-height: 1.7; color: rgba(242, 239, 233, 0.45); max-width: 34ch; }
.budget-rows { display: flex; flex-direction: column; }
.brow {
  display: grid; grid-template-columns: 1fr auto; gap: 10px;
  padding: 13px 0 12px; position: relative;
}
.bname { font-size: 0.9rem; color: rgba(242, 239, 233, 0.75); }
.bval { font-family: var(--mono); font-size: 0.82rem; color: var(--faint); }
.bbar {
  grid-column: 1 / -1; display: block; height: 2px; width: 0;
  background: linear-gradient(90deg, var(--cyan), rgba(155, 140, 255, 0.7));
  transition: width 1.5s var(--ease);
  margin-top: 2px; opacity: 0.8;
}
.budget-rows.in .bbar { width: var(--w); }

/* ── limits ────────────────────────────────────────────── */
.limits-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.limit-col { background: var(--ink2); padding: clamp(24px, 3vw, 36px); }
.limit-col h3 { font-size: 1.05rem; font-weight: 500; display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.lc-mark { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; font-size: 10px; }
.lc-mark.ok { border: 1px solid rgba(63, 240, 210, 0.5); color: var(--cyan); }
.lc-mark.no { border: 1px solid rgba(255, 74, 46, 0.45); color: var(--ember2); }
.limit-col ul { display: flex; flex-direction: column; gap: 12px; }
.limit-col li { font-size: 0.87rem; line-height: 1.62; padding-left: 18px; position: relative; }
.limit-col li::before { content: ""; position: absolute; left: 0; top: 10px; width: 8px; height: 1px; background: rgba(242, 239, 233, 0.25); }
.limit-col.is li { color: rgba(242, 239, 233, 0.72); }
.limit-col.not li { color: rgba(242, 239, 233, 0.42); }
.limit-col.not li::before { background: rgba(255, 74, 46, 0.5); }

.ethics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-top: 0; }
.ethics > div { background: var(--ink2); padding: 22px; }
.ethics span { font-family: var(--mono); font-size: 9px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--cyan); }
.ethics p { font-size: 0.8rem; line-height: 1.65; margin-top: 8px; color: rgba(242, 239, 233, 0.44); }

/* ── refs ──────────────────────────────────────────────── */
.ref-list { border-top: 1px solid var(--line); counter-reset: r; }
.ref-list li {
  counter-increment: r;
  display: grid; grid-template-columns: 46px 1fr; gap: 10px;
  padding: 15px 0; border-bottom: 1px solid var(--line);
  font-size: 0.87rem; line-height: 1.62; color: rgba(242, 239, 233, 0.52);
  transition: color 0.4s ease, padding-left 0.5s var(--ease);
  text-wrap: pretty;
}
.ref-list li::before {
  content: counter(r, decimal-leading-zero);
  font-family: var(--mono); font-size: 9.5px; color: rgba(242, 239, 233, 0.24); padding-top: 3px;
  font-variant-numeric: tabular-nums;
}
.ref-list li em { font-style: normal; color: rgba(242, 239, 233, 0.8); }
@media (hover: hover) {
  .ref-list li:hover { color: rgba(242, 239, 233, 0.82); padding-left: 6px; }
  .ref-list li:hover::before { color: var(--cyan); }
}
.ref-list li > span { min-width: 0; }
.refs .micro { margin-top: 20px; }
.ref-list li em { font-style: italic; }

/* ── footer ────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--line);
  padding: clamp(50px, 8vh, 90px) 0 30px;
  background: linear-gradient(180deg, transparent, rgba(63, 240, 210, 0.025));
}
.foot-mark {
  font-size: clamp(4rem, 17vw, 13rem);
  line-height: 0.8; letter-spacing: -0.06em; font-weight: 500;
  background: linear-gradient(180deg, rgba(242, 239, 233, 0.14), rgba(242, 239, 233, 0.02));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: clamp(30px, 6vh, 60px);
  user-select: none;
}
.foot-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; padding-bottom: 34px; border-bottom: 1px solid var(--line); }
.foot-lab { font-family: var(--mono); font-size: 9px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--cyan); }
.foot-grid p { font-size: 0.86rem; line-height: 1.65; margin-top: 8px; color: rgba(242, 239, 233, 0.48); }
.foot-status i { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--cyan); margin-right: 8px; vertical-align: middle; }
.foot-bottom {
  display: flex; justify-content: space-between; gap: 16px; padding-top: 22px;
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.14em;
  color: rgba(242, 239, 233, 0.28);
}
@media (hover: hover) {
  .foot-bottom a:hover { color: var(--cyan); }
}

/* ── responsive ────────────────────────────────────────── */
@media (max-width: 1180px) {
  #progress { display: none; }
  .nav-links { gap: 14px; }
  .nav-links a i { display: none; }
}

@media (max-width: 1020px) {
  .nav-links, .nav-tag { display: none; }
  #menuBtn { display: flex; }
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero-fig { order: -1; max-width: 380px; margin: 0 auto; width: 100%; }
  #rig { height: 260px; }
  .hero-title { font-size: clamp(3rem, 13vw, 6rem); }
  .crisis-grid, .mech-grid, .proto-grid, .budget { grid-template-columns: 1fr; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .ethics { grid-template-columns: repeat(2, 1fr); }
  .sec-head.split { grid-template-columns: 1fr; align-items: start; }
  .sec-head.split .h2, .sec-head.split .lede { grid-column: 1; }
  .mechanism, .mech { height: auto; }
  .mech-stage { position: static; height: auto; display: block; padding: 90px 0; }
  .mech-steps { display: block; }
  .mech-steps li { grid-area: auto; opacity: 1; transform: none; margin-bottom: 26px; }
  .mech-fig { margin-top: 10px; }
  #mechSvg { height: auto; max-height: 520px; }
  .fig-readout { display: none; }
  .pin-wrap { height: auto !important; }
  .pin-stage { position: static; height: auto; padding-bottom: 60px; overflow: visible; }
  .device-track {
    width: 100%; overflow-x: auto; scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    transform: none !important; padding-bottom: 14px; scrollbar-width: none;
  }
  .device-track::-webkit-scrollbar { display: none; }
  .panel { scroll-snap-align: center; min-height: 0; width: min(440px, 82vw); }
  .pin-progress { display: none; }
  .pin-head { padding-top: 0; }
}

@media (max-width: 720px) {
  /* soap-opera blur is expensive on phone GPUs */
  .hero-glow { filter: blur(16px); }
  .grain { opacity: 0.035; }
  .cards, .metrics { grid-template-columns: 1fr; }
  .limits-grid, .ethics, .foot-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; }
  .stat { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; }
  .stat-cap br { display: none; }
  .hero-index { display: none; }
  .hero { padding-top: 104px; }
  .hero-spec { gap: 18px; }
  .marquee-track span { font-size: 9px; }
  .open-q { flex-direction: column; gap: 12px; padding: 22px; }
  .timeline { padding-left: 26px; }
  .tl-item::before { left: -26px; }
  .ref-list li { grid-template-columns: 34px 1fr; font-size: 0.82rem; }
  .foot-bottom { flex-direction: column; gap: 8px; }
  .dash-top { gap: 10px; }
  .dash-clock { margin-left: 0; }
  .dash-btn { margin-left: auto; }
}

@media (max-width: 460px) {
  .hero-title { font-size: 2.9rem; }
  .hero-chips span { font-size: 8px; }
  .hero-foot { flex-direction: column; align-items: flex-start; gap: 26px; }
  .fig-frame { padding: 26px 14px 20px; }
  #rig { height: 210px; }
  .card { min-height: 0; }
}

/* ── safe areas (notched phones, iOS landscape) ────────── */
@supports (padding: env(safe-area-inset-top)) {
  #nav {
    padding-top: max(22px, env(safe-area-inset-top));
    padding-left: max(clamp(20px, 4vw, 48px), env(safe-area-inset-left));
    padding-right: max(clamp(20px, 4vw, 48px), env(safe-area-inset-right));
  }
  #nav.solid { padding-top: max(14px, env(safe-area-inset-top)); }
  .wrap {
    padding-left: max(clamp(20px, 5vw, 64px), env(safe-area-inset-left));
    padding-right: max(clamp(20px, 5vw, 64px), env(safe-area-inset-right));
  }
  .hero-index {
    left: max(clamp(20px, 5vw, 64px), env(safe-area-inset-left));
    bottom: max(26px, env(safe-area-inset-bottom));
  }
  #progress { right: max(26px, env(safe-area-inset-right)); }
  .menu-inner {
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .foot-bottom { padding-bottom: env(safe-area-inset-bottom); }
}

/* ── reduced motion ────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .js [data-reveal] { opacity: 1; transform: none; }
  .htw { transform: none; }
  .mech { height: auto; }
  .mech-stage { position: static; height: auto; display: block; padding: 90px 0; }
  .mech-steps { display: block; }
  .mech-steps li { grid-area: auto; opacity: 1; transform: none; margin-bottom: 26px; }
  .pin-wrap { height: auto !important; }
  .pin-stage { position: static; height: auto; overflow: visible; }
  .device-track { width: 100%; overflow-x: auto; transform: none !important; }
  .trace { stroke-dashoffset: 0 !important; }
  #cursor, #cursorRing { display: none; }
  body, body * { cursor: auto !important; }
}
