:root {
  color-scheme: dark;
  --bg: #08080b;
  --bg-soft: #101015;
  --panel: #17161d;
  --line: rgba(255, 255, 255, 0.12);
  --text: #f5f2ea;
  --muted: #aaa49a;
  --dim: #77716a;
  --amber: #f0b86c;
  --green: #79d79b;
  --violet: #b7a7ff;
  --rose: #ff8ca1;
  --max: 1120px;
  --read: 680px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background:
    radial-gradient(circle at 50% 0%, rgba(240, 184, 108, 0.12), transparent 32rem),
    linear-gradient(180deg, #08080b 0%, #0d0c10 42%, #08080b 100%);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.65;
  overflow-x: hidden;
}

html,
body {
  max-width: 100%;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: linear-gradient(to bottom, black, transparent 70%);
  content: "";
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  opacity: 0.12;
  background-image:
    linear-gradient(115deg, rgba(255,255,255,0.08), transparent 22%),
    repeating-radial-gradient(circle at 17% 31%, rgba(255,255,255,0.09) 0 1px, transparent 1px 4px);
  mix-blend-mode: overlay;
}

.progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  height: 2px;
  background: rgba(255, 255, 255, 0.05);
}

.progress span {
  display: block;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--amber), var(--green), var(--violet));
}

.site-header {
  position: fixed;
  top: 0;
  left: 50%;
  z-index: 25;
  display: flex;
  width: min(calc(100% - 32px), var(--max));
  height: 64px;
  align-items: center;
  justify-content: space-between;
  transform: translateX(-50%);
  color: rgba(245, 242, 234, 0.84);
}

.site-header::before {
  position: absolute;
  inset: 8px -8px;
  z-index: -1;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(8, 8, 11, 0.66);
  box-shadow: 0 18px 70px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(18px);
  content: "";
}

.brand,
.site-nav,
.site-nav a,
.nav-pill,
.nav-more {
  display: flex;
  align-items: center;
}

.brand {
  flex: 0 0 auto;
  gap: 10px;
  font-size: 15px;
  font-weight: 650;
}

.brand-logo {
  display: block;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  overflow: visible;
}

.logo-shell {
  fill: rgba(245, 242, 234, 0.96);
  stroke: rgba(255, 255, 255, 0.35);
  stroke-width: 1.2;
}

.logo-grid,
.logo-cut {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.logo-grid {
  stroke: rgba(8, 8, 11, 0.42);
  stroke-width: 1.25;
}

.logo-cut {
  stroke: #08080b;
  stroke-width: 2.2;
}

.brand-mark {
  position: relative;
  display: inline-block;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: linear-gradient(135deg, #f5f2ea, #77716a);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.38);
}

.brand-mark::after {
  position: absolute;
  right: 5px;
  bottom: 5px;
  width: 9px;
  height: 9px;
  border-right: 2px solid #08080b;
  border-bottom: 2px solid #08080b;
  content: "";
}

.site-nav {
  flex: 1 1 auto;
  min-width: 0;
  gap: 6px;
  margin-right: 10px;
  font-size: 12px;
  overflow: hidden;
}

.site-nav a {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 7px;
  color: rgba(245, 242, 234, 0.7);
  white-space: nowrap;
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 160ms ease, background 160ms ease;
}

.site-nav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
}

.site-nav .nav-pill {
  margin-left: 4px;
  background: rgba(245, 242, 234, 0.92);
  color: #08080b;
  font-weight: 650;
}

.nav-more {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0 11px;
  border-radius: 999px;
  background: rgba(245, 242, 234, 0.92);
  color: #08080b;
  font-size: 12px;
  font-weight: 720;
  white-space: nowrap;
  text-decoration: none;
}

.menu-button {
  display: none;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.menu-button span {
  display: block;
  width: 18px;
  height: 1px;
  background: currentColor;
}

.menu-button span + span {
  margin-top: 5px;
}

.hero {
  display: grid;
  width: min(calc(100% - 40px), var(--max));
  min-height: 92vh;
  margin: 0 auto;
  padding: 136px 0 72px;
  grid-template-columns: minmax(0, 0.86fr) minmax(340px, 1fr);
  align-items: center;
  gap: clamp(36px, 7vw, 96px);
}

.hero-copy {
  max-width: 560px;
}

.eyebrow,
.chapter-kicker span,
.forces span {
  margin: 0 0 16px;
  color: var(--amber);
  font-size: 12px;
  font-weight: 680;
  line-height: 1.2;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 26px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(52px, 8vw, 108px);
  font-weight: 400;
  line-height: 0.92;
}

.hero-copy p:not(.eyebrow) {
  max-width: 490px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: clamp(17px, 1.6vw, 20px);
}

.hero-visual {
  display: grid;
  min-height: 560px;
  place-items: center;
}

.retro-scene {
  position: relative;
  width: min(100%, 560px);
  aspect-ratio: 1 / 1.08;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background:
    radial-gradient(circle at 55% 32%, rgba(121, 215, 155, 0.16), transparent 14rem),
    radial-gradient(circle at 24% 78%, rgba(255, 140, 161, 0.14), transparent 12rem),
    linear-gradient(180deg, #151219, #08080b 78%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03), 0 40px 120px rgba(0, 0, 0, 0.55);
}

.reference-hero-frame {
  position: relative;
  width: min(100%, 680px);
  aspect-ratio: 1500 / 750;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background:
    radial-gradient(circle at 70% 48%, rgba(240, 184, 108, 0.16), transparent 16rem),
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01));
  box-shadow: 0 34px 110px rgba(0, 0, 0, 0.48);
}

.reference-hero-frame::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 42px 42px;
  mix-blend-mode: screen;
  opacity: 0.4;
  content: "";
}

.reference-card {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.reference-stage {
  position: sticky;
  top: 104px;
  display: grid;
  width: min(100%, 430px);
  aspect-ratio: 1 / 1.14;
  margin-left: auto;
  place-items: center;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  isolation: isolate;
  user-select: none;
  -webkit-user-select: none;
}

.reference-stage::before,
.reference-stage::after {
  position: absolute;
  pointer-events: none;
  content: "";
}

.reference-stage::before {
  content: none;
}

.reference-stage::after {
  left: 9%;
  right: 9%;
  bottom: 8%;
  z-index: -1;
  height: 18%;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(0, 0, 0, 0.55), transparent 70%);
  filter: blur(12px);
}

.reference-device {
  position: relative;
  z-index: 1;
  display: block;
  width: min(88%, 360px);
  height: auto;
  filter: drop-shadow(0 28px 42px rgba(0, 0, 0, 0.46));
  animation: floatReference 6s ease-in-out infinite;
}

.reference-present::before {
  background:
    linear-gradient(rgba(76, 62, 160, 0.28) 1px, transparent 1px),
    linear-gradient(90deg, rgba(76, 62, 160, 0.26) 1px, transparent 1px),
    radial-gradient(circle at 50% 44%, rgba(255, 140, 161, 0.18), transparent 58%),
    linear-gradient(180deg, rgba(8, 9, 13, 0), rgba(9, 9, 16, 0.72));
  background-size: 24px 24px, 24px 24px, auto, auto;
}

.reference-future::before {
  background:
    linear-gradient(rgba(76, 62, 160, 0.28) 1px, transparent 1px),
    linear-gradient(90deg, rgba(76, 62, 160, 0.26) 1px, transparent 1px),
    radial-gradient(circle at 50% 44%, rgba(183, 167, 255, 0.18), transparent 58%),
    linear-gradient(180deg, rgba(8, 9, 13, 0), rgba(9, 9, 16, 0.72));
  background-size: 24px 24px, 24px 24px, auto, auto;
}

.reference-present .reference-device {
  animation-delay: -1.2s;
}

.reference-future .reference-device {
  animation-delay: -2.4s;
}

.device-scene {
  isolation: isolate;
}

.device-scene::before,
.device-scene::after {
  position: absolute;
  inset: 10%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(121, 215, 155, 0.18), transparent 64%);
  filter: blur(16px);
  content: "";
}

.device-scene::after {
  inset: auto 8% 7%;
  height: 22%;
  background: radial-gradient(ellipse, rgba(0, 0, 0, 0.55), transparent 68%);
  filter: blur(12px);
}

.device-shell {
  position: absolute;
  left: 50%;
  bottom: 2%;
  z-index: 1;
  width: 94%;
  max-width: 560px;
  transform: translateX(-50%) rotate(-2deg);
  transform-origin: center 66%;
  animation: floatDevice 6s ease-in-out infinite;
}

.device-shell img {
  position: relative;
  z-index: 3;
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
  user-select: none;
}

.device-screen {
  position: absolute;
  left: 24.2%;
  top: 14.8%;
  z-index: 4;
  width: 47.2%;
  height: 35.8%;
  overflow: hidden;
  border-radius: 9% / 13%;
  background: #0a180d;
  color: var(--green);
  box-shadow:
    inset 0 0 34px rgba(0, 0, 0, 0.84),
    0 0 28px rgba(121, 215, 155, 0.18);
  opacity: 0.92;
}

.device-screen::before {
  position: absolute;
  inset: 0;
  z-index: 3;
  background:
    radial-gradient(circle at 32% 20%, rgba(255, 255, 255, 0.16), transparent 25%),
    repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.055) 0 1px, transparent 1px 5px);
  mix-blend-mode: screen;
  pointer-events: none;
  content: "";
}

.device-screen::after {
  position: absolute;
  inset: -20%;
  z-index: 2;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transform: translateX(-70%);
  animation: screenGlint 5.6s ease-in-out infinite;
  content: "";
}

.device-screen .scanline {
  z-index: 5;
}

.device-screen .screen-text {
  left: 13%;
  bottom: 22%;
  z-index: 4;
  font-size: clamp(14px, 2.1vw, 22px);
}

.device-screen .cursor {
  left: 43%;
  bottom: 24%;
  z-index: 4;
  width: clamp(7px, 1.1vw, 11px);
  height: clamp(14px, 2vw, 22px);
}

.screen-boot {
  background:
    radial-gradient(circle at 40% 58%, rgba(121, 215, 155, 0.28), transparent 54%),
    repeating-linear-gradient(90deg, rgba(121, 215, 155, 0.06) 0 1px, transparent 1px 12px),
    #0b160d;
}

.chapter-visual {
  --grid-line-a: rgba(78, 62, 168, 0.42);
  --grid-line-b: rgba(78, 62, 168, 0.38);
  --corner-tl: rgba(240, 184, 108, 0.18);
  --corner-tr: rgba(255, 118, 181, 0.16);
  --corner-bl: rgba(42, 174, 155, 0.12);
  --corner-br: rgba(116, 75, 206, 0.18);
  align-self: center;
  position: relative;
  isolation: isolate;
  padding: clamp(36px, 6vw, 68px) 0;
  user-select: none;
  -webkit-user-select: none;
}

.chapter-visual.grid-past {
  --grid-line-a: rgba(70, 64, 160, 0.45);
  --grid-line-b: rgba(70, 64, 160, 0.4);
  --corner-tl: rgba(240, 184, 108, 0.22);
  --corner-tr: rgba(255, 118, 181, 0.2);
  --corner-bl: rgba(55, 180, 144, 0.12);
  --corner-br: rgba(115, 67, 194, 0.18);
}

.chapter-visual.grid-contract {
  --grid-line-a: rgba(92, 78, 185, 0.46);
  --grid-line-b: rgba(92, 78, 185, 0.4);
  --corner-tl: rgba(255, 151, 84, 0.22);
  --corner-tr: rgba(255, 90, 158, 0.22);
  --corner-bl: rgba(115, 58, 211, 0.16);
  --corner-br: rgba(255, 197, 89, 0.12);
}

.chapter-visual.grid-crypto {
  --grid-line-a: rgba(57, 126, 176, 0.44);
  --grid-line-b: rgba(62, 92, 178, 0.42);
  --corner-tl: rgba(57, 214, 190, 0.18);
  --corner-tr: rgba(90, 126, 255, 0.2);
  --corner-bl: rgba(143, 104, 255, 0.16);
  --corner-br: rgba(55, 210, 151, 0.14);
}

.chapter-visual.grid-defense {
  --grid-line-a: rgba(174, 70, 116, 0.43);
  --grid-line-b: rgba(132, 68, 176, 0.4);
  --corner-tl: rgba(255, 109, 139, 0.22);
  --corner-tr: rgba(255, 184, 91, 0.15);
  --corner-bl: rgba(94, 71, 206, 0.18);
  --corner-br: rgba(232, 74, 169, 0.2);
}

.chapter-visual.grid-architecture {
  --grid-line-a: rgba(72, 143, 151, 0.42);
  --grid-line-b: rgba(82, 94, 178, 0.38);
  --corner-tl: rgba(106, 223, 182, 0.18);
  --corner-tr: rgba(183, 167, 255, 0.2);
  --corner-bl: rgba(240, 184, 108, 0.12);
  --corner-br: rgba(80, 180, 218, 0.18);
}

.chapter-visual::before {
  position: absolute;
  inset: 0 -18px;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(circle at 0 0, rgba(8, 8, 11, 0.94), transparent 26%),
    radial-gradient(circle at 100% 0, rgba(8, 8, 11, 0.88), transparent 28%),
    radial-gradient(circle at 0 100%, rgba(8, 8, 11, 0.86), transparent 30%),
    radial-gradient(circle at 100% 100%, rgba(8, 8, 11, 0.92), transparent 30%),
    linear-gradient(var(--grid-line-a) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line-b) 1px, transparent 1px),
    radial-gradient(circle at 12% 18%, var(--corner-tl), transparent 24rem),
    radial-gradient(circle at 88% 18%, var(--corner-tr), transparent 24rem),
    radial-gradient(circle at 12% 86%, var(--corner-bl), transparent 22rem),
    radial-gradient(circle at 88% 86%, var(--corner-br), transparent 22rem),
    linear-gradient(180deg, rgba(8, 8, 11, 0), rgba(8, 8, 11, 0.5) 82%, rgba(8, 8, 11, 0));
  background-size: auto, auto, auto, auto, 24px 24px, 24px 24px, auto, auto, auto, auto, auto;
  mask-image:
    linear-gradient(to right, transparent 0, black 10%, black 90%, transparent 100%),
    linear-gradient(to bottom, transparent 0, black 6%, black 88%, transparent 100%);
  mask-composite: intersect;
  content: "";
}

.chapter-visual::after {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 8%;
  z-index: -1;
  height: 28%;
  pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.58), transparent 68%);
  filter: blur(18px);
  content: "";
}

.chapter-visual .device-scene {
  position: sticky;
  top: 104px;
  width: min(100%, 430px);
  aspect-ratio: 1 / 1.08;
  margin-left: auto;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 32%, rgba(240, 184, 108, 0.12), transparent 13rem),
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012));
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.36);
}

.chapter-visual .device-shell {
  width: 102%;
  bottom: 3%;
}

.device-past::before {
  background: radial-gradient(circle, rgba(240, 184, 108, 0.2), transparent 65%);
}

.device-orbit,
.device-orbit::before,
.device-orbit::after {
  position: absolute;
  inset: 16%;
  border: 1px solid rgba(240, 184, 108, 0.16);
  border-radius: 50%;
  content: "";
  animation: orbitSpin 18s linear infinite;
}

.device-orbit::before {
  inset: 15%;
  animation-duration: 12s;
  animation-direction: reverse;
}

.device-orbit::after {
  inset: 30%;
  border-color: rgba(121, 215, 155, 0.16);
  animation-duration: 9s;
}

.screen-dial {
  background:
    radial-gradient(circle at 50% 50%, rgba(240, 184, 108, 0.18), transparent 32%),
    #09140d;
}

.screen-dial .dial-point {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 14px rgba(240, 184, 108, 0.7);
  animation: dialFloat 2.4s ease-in-out infinite;
}

.screen-dial .dial-point:nth-child(1) {
  left: 22%;
  top: 34%;
}

.screen-dial .dial-point:nth-child(2) {
  left: 48%;
  top: 56%;
  animation-delay: 220ms;
}

.screen-dial .dial-point:nth-child(3) {
  right: 20%;
  top: 28%;
  animation-delay: 440ms;
}

.dial-copy {
  position: absolute;
  left: 12%;
  bottom: 14%;
  z-index: 4;
  color: var(--green);
  font-family: "Courier New", monospace;
  font-size: clamp(9px, 1.4vw, 13px);
  letter-spacing: 0;
  text-shadow: 0 0 10px rgba(121, 215, 155, 0.7);
}

.device-present::before {
  background: radial-gradient(circle, rgba(255, 140, 161, 0.18), transparent 65%);
}

.screen-noise {
  background:
    repeating-linear-gradient(90deg, rgba(255, 140, 161, 0.08) 0 1px, transparent 1px 9px),
    repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 7px),
    #16090e;
  animation: noiseSlide 1.1s steps(3, end) infinite;
}

.screen-noise span {
  position: absolute;
  z-index: 4;
  display: inline-flex;
  min-width: 54px;
  min-height: 20px;
  align-items: center;
  justify-content: center;
  padding: 0 7px;
  border: 1px solid rgba(255, 140, 161, 0.35);
  border-radius: 4px;
  background: rgba(255, 140, 161, 0.1);
  color: #ffbac5;
  font-family: "Courier New", monospace;
  font-size: clamp(8px, 1.2vw, 12px);
  line-height: 1;
  text-shadow: 0 0 10px rgba(255, 140, 161, 0.55);
  animation: ticketDrift 4.2s ease-in-out infinite;
}

.screen-noise span:nth-child(1) {
  left: 8%;
  top: 12%;
}

.screen-noise span:nth-child(2) {
  right: 10%;
  top: 25%;
  animation-delay: 500ms;
}

.screen-noise span:nth-child(3) {
  left: 18%;
  top: 48%;
  animation-delay: 900ms;
}

.screen-noise span:nth-child(4) {
  right: 16%;
  bottom: 15%;
  animation-delay: 1.3s;
}

.screen-noise span:nth-child(5) {
  left: 9%;
  bottom: 10%;
  animation-delay: 1.7s;
}

.device-future::before {
  background: radial-gradient(circle, rgba(183, 167, 255, 0.2), transparent 64%);
}

.screen-future {
  background:
    linear-gradient(rgba(183, 167, 255, 0.13) 1px, transparent 1px),
    linear-gradient(90deg, rgba(121, 215, 155, 0.12) 1px, transparent 1px),
    radial-gradient(circle at 50% 50%, rgba(183, 167, 255, 0.22), transparent 40%),
    #080e16;
  background-size: 22px 22px, 22px 22px, auto, auto;
}

.future-core {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 4;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(183, 167, 255, 0.72);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow:
    0 0 26px rgba(183, 167, 255, 0.42),
    inset 0 0 20px rgba(121, 215, 155, 0.18);
  animation: futurePulse 2.8s ease-in-out infinite;
}

.screen-future i {
  --angle: 0deg;
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  width: 74%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(121, 215, 155, 0.7), transparent);
  transform: translate(-50%, -50%) rotate(var(--angle));
  transform-origin: center;
  animation: futureSpin 9s linear infinite;
}

.screen-future i:nth-child(3) {
  --angle: 45deg;
  animation-delay: -2s;
}

.screen-future i:nth-child(4) {
  --angle: 90deg;
  animation-delay: -4s;
}

.screen-future i:nth-child(5) {
  --angle: 135deg;
  animation-delay: -6s;
}

.stars,
.stars::before,
.stars::after {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.58) 0 1px, transparent 1px),
    radial-gradient(circle, rgba(240, 184, 108, 0.48) 0 1px, transparent 1px);
  background-position: 12px 24px, 72px 96px;
  background-size: 96px 96px, 132px 132px;
  content: "";
}

.stars::before {
  opacity: 0.45;
  transform: translateY(10px) scale(0.88);
}

.stars::after {
  opacity: 0.24;
  transform: translateX(24px) scale(1.12);
}

.computer {
  position: absolute;
  left: 50%;
  bottom: 46px;
  width: min(78%, 390px);
  transform: translateX(-50%) rotate(-3deg);
}

.monitor {
  position: relative;
  height: 282px;
  padding: 28px;
  border-radius: 16px 16px 24px 24px;
  background: linear-gradient(145deg, #d9c8aa, #9b8668 68%, #6f604d);
  box-shadow:
    inset -15px -22px 40px rgba(61, 42, 23, 0.28),
    inset 10px 14px 30px rgba(255, 255, 255, 0.28),
    0 28px 48px rgba(0, 0, 0, 0.48);
}

.screen {
  position: relative;
  height: 178px;
  overflow: hidden;
  border: 10px solid #2b2928;
  border-radius: 12px;
  background:
    radial-gradient(circle at 50% 50%, rgba(121, 215, 155, 0.22), transparent 70%),
    #11180f;
  box-shadow: inset 0 0 32px rgba(0, 0, 0, 0.86);
}

.scanline {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0 1px, transparent 1px 5px);
  animation: scan 4s linear infinite;
}

.screen-text {
  position: absolute;
  left: 28px;
  bottom: 26px;
  color: var(--green);
  font-family: "Courier New", monospace;
  font-size: 24px;
  text-shadow: 0 0 16px rgba(121, 215, 155, 0.6);
}

.cursor {
  position: absolute;
  left: 118px;
  bottom: 31px;
  width: 12px;
  height: 22px;
  background: var(--green);
  animation: blink 1s steps(2, start) infinite;
  box-shadow: 0 0 16px rgba(121, 215, 155, 0.7);
}

.sticker {
  position: absolute;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #17110d;
  font-size: 12px;
  font-weight: 800;
}

.sticker-one {
  right: 36px;
  bottom: 38px;
  width: 42px;
  height: 42px;
  background: var(--rose);
}

.sticker-two {
  right: 84px;
  bottom: 32px;
  width: 32px;
  height: 32px;
  background: var(--amber);
  transform: rotate(12deg);
}

.base {
  display: flex;
  height: 58px;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding-right: 38px;
  border-radius: 0 0 18px 18px;
  background: linear-gradient(145deg, #b89c73, #6d5c48);
  transform: translateY(-4px);
}

.base span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #2d281f;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.keyboard {
  display: grid;
  width: 88%;
  height: 72px;
  margin: -8px auto 0;
  padding: 16px 18px;
  grid-template-columns: repeat(8, 1fr);
  gap: 8px;
  border-radius: 12px 12px 20px 20px;
  background: linear-gradient(145deg, #c7b086, #80694e);
  transform: perspective(260px) rotateX(18deg);
}

.keyboard i {
  border-radius: 3px;
  background: rgba(42, 36, 28, 0.78);
}

.story-intro {
  width: min(calc(100% - 40px), var(--read));
  margin: 0 auto;
  padding: 70px 0 36px;
  color: var(--muted);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(24px, 4vw, 38px);
  line-height: 1.28;
}

.story-intro p {
  margin-bottom: 28px;
}

.chapter,
.roles {
  width: min(calc(100% - 40px), var(--max));
  margin: 0 auto;
  padding: clamp(80px, 13vw, 150px) 0;
}

.chapter {
  display: grid;
  grid-template-columns: 150px minmax(0, 520px) minmax(280px, 430px);
  align-items: start;
  gap: clamp(28px, 5vw, 64px);
}

.chapter-kicker {
  position: sticky;
  top: 106px;
  height: fit-content;
  color: var(--dim);
}

.chapter-kicker p {
  margin: 0;
  font-size: 14px;
}

.chapter-body h2,
.roles-heading h2 {
  margin-bottom: 28px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(38px, 6vw, 72px);
  font-weight: 400;
  line-height: 1.02;
}

.chapter-body p {
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 18px;
}

.chapter-body,
.forces,
.forces section,
.code-panel {
  min-width: 0;
  max-width: 100%;
}

.audio-widget {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 104px;
  align-items: center;
  gap: 16px;
  margin: 36px 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.icon-button {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 50%;
  background: #f5f2ea;
  color: #08080b;
  cursor: pointer;
}

.play-icon {
  width: 0;
  height: 0;
  margin-left: 3px;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 12px solid currentColor;
}

.audio-widget strong,
.audio-widget span {
  display: block;
}

.audio-widget strong {
  font-size: 14px;
}

.audio-widget div > span {
  color: var(--dim);
  font-size: 13px;
  line-height: 1.4;
}

.wave {
  display: flex;
  height: 34px;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
}

.wave span {
  width: 5px;
  height: 14px;
  border-radius: 99px;
  background: var(--green);
  opacity: 0.5;
  transform-origin: center;
}

.audio-widget.is-playing .wave span {
  animation: pulse 460ms ease-in-out infinite alternate;
}

.audio-widget.is-playing .wave span:nth-child(2) {
  animation-delay: 80ms;
}

.audio-widget.is-playing .wave span:nth-child(3) {
  animation-delay: 150ms;
}

.audio-widget.is-playing .wave span:nth-child(4) {
  animation-delay: 220ms;
}

.audio-widget.is-playing .wave span:nth-child(5) {
  animation-delay: 300ms;
}

.forces {
  display: grid;
  gap: 14px;
  margin: 38px 0 22px;
}

.forces section,
.role-group a {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.forces section {
  padding: 22px;
}

.forces span {
  display: block;
  margin-bottom: 10px;
  color: var(--rose);
}

.forces h3 {
  margin-bottom: 8px;
  font-size: 20px;
  line-height: 1.2;
}

.forces p {
  margin: 0;
  font-size: 15px;
  overflow-wrap: anywhere;
}

.forces.bullet-list {
  gap: 20px;
  margin: 34px 0 24px;
}

.forces.bullet-list section {
  position: relative;
  padding: 0 0 0 30px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.forces.bullet-list section::before {
  position: absolute;
  left: 3px;
  top: 0.68em;
  width: 7px;
  height: 7px;
  border: 2px solid rgba(245, 242, 234, 0.78);
  border-radius: 50%;
  background: transparent;
  box-shadow: 0 0 12px rgba(245, 242, 234, 0.18);
  content: "";
}

.forces.bullet-list h3 {
  margin: 0 0 4px;
  color: rgba(245, 242, 234, 0.92);
  font-size: 18px;
  line-height: 1.35;
}

.forces.bullet-list h3 span {
  display: inline;
  margin: 0;
  color: rgba(245, 242, 234, 0.72);
  font-size: 0.92em;
  text-transform: none;
}

.forces.bullet-list p {
  margin: 0;
  color: rgba(210, 207, 201, 0.78);
  font-size: 15px;
  line-height: 1.68;
}

.code-panel {
  margin-top: 28px;
  overflow: hidden;
  border: 1px solid rgba(148, 255, 208, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(7, 18, 21, 0.92), rgba(6, 8, 13, 0.96)),
    #07090d;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.code-panel-title {
  padding: 13px 16px;
  border-bottom: 1px solid rgba(148, 255, 208, 0.12);
  color: rgba(148, 255, 208, 0.86);
  font-size: 13px;
  font-weight: 680;
}

.code-panel pre {
  margin: 0;
  padding: 18px;
  max-width: 100%;
  overflow-x: auto;
  color: rgba(230, 247, 245, 0.86);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.65;
}

.quote-panel {
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  margin-top: 34px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.quote-panel::before {
  width: 34px;
  height: 34px;
  margin-top: 0.08em;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(121, 215, 155, 0.28), rgba(158, 216, 255, 0.16)),
    rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 0 0 1px rgba(245, 242, 234, 0.1), 0 12px 28px rgba(0, 0, 0, 0.22);
  content: "";
}

.quote-panel::after {
  position: absolute;
  content: "";
}

.quote-crypto::before {
  background:
    linear-gradient(135deg, rgba(121, 215, 155, 0.3), rgba(158, 216, 255, 0.16)),
    rgba(255, 255, 255, 0.06);
}

.quote-crypto::after {
  left: 9px;
  top: 9px;
  width: 16px;
  height: 16px;
  border: 2px solid #f5f2ea;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, #f5f2ea 0 2px, transparent 2.5px),
    linear-gradient(#f5f2ea, #f5f2ea) 50% 0 / 2px 100% no-repeat,
    linear-gradient(90deg, #f5f2ea, #f5f2ea) 0 50% / 100% 2px no-repeat;
}

.quote-defense::before {
  background:
    linear-gradient(135deg, rgba(255, 198, 109, 0.28), rgba(255, 140, 161, 0.17)),
    rgba(255, 255, 255, 0.06);
}

.quote-defense::after {
  left: 10px;
  top: 8px;
  width: 15px;
  height: 18px;
  background:
    linear-gradient(#08080b, #08080b) 50% 39% / 2px 7px no-repeat,
    radial-gradient(circle at 50% 76%, #08080b 0 1.3px, transparent 1.7px),
    #f5f2ea;
  clip-path: polygon(50% 0, 88% 16%, 82% 66%, 50% 100%, 18% 66%, 12% 16%);
}

.quote-law::before {
  background:
    linear-gradient(135deg, rgba(183, 167, 255, 0.3), rgba(121, 215, 155, 0.16)),
    rgba(255, 255, 255, 0.06);
}

.quote-law::after {
  left: 0;
  top: 0;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: #f5f2ea;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  content: "§";
}

.quote-panel p {
  margin: 0;
  color: rgba(245, 242, 234, 0.86);
  font-family: inherit;
  font-size: clamp(16px, 2.2vw, 21px);
  font-weight: 650;
  line-height: 1.55;
}

.roles {
  display: grid;
  grid-template-columns: minmax(220px, 0.75fr) minmax(0, 1.35fr);
  gap: clamp(30px, 8vw, 96px);
}

.web3-lab {
  width: min(calc(100% - 40px), var(--max));
  margin: 0 auto;
  padding: clamp(80px, 12vw, 140px) 0;
}

.web3-lab-heading {
  max-width: 720px;
  margin-bottom: 34px;
}

.web3-lab-heading h2 {
  margin-bottom: 20px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(38px, 6vw, 72px);
  font-weight: 400;
  line-height: 1.02;
}

.web3-lab-heading p:not(.eyebrow) {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
}

.native-lab {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background:
    radial-gradient(circle at 12% 0%, rgba(121, 215, 155, 0.12), transparent 20rem),
    radial-gradient(circle at 100% 80%, rgba(255, 140, 161, 0.1), transparent 22rem),
    #070809;
  box-shadow: 0 34px 120px rgba(0, 0, 0, 0.48);
}

.lab-tabs,
.lab-dialog-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  scrollbar-width: none;
}

.lab-tabs::-webkit-scrollbar,
.lab-dialog-tabs::-webkit-scrollbar {
  display: none;
}

.lab-tabs button,
.lab-dialog-tabs button {
  min-height: 34px;
  flex: 0 0 auto;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--dim);
  font-size: 13px;
  font-weight: 720;
  cursor: pointer;
}

.lab-tabs button.is-active,
.lab-dialog-tabs button.is-active {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.lab-summary {
  display: block;
  padding: clamp(18px, 4vw, 34px);
}

.lab-copy {
  min-width: 0;
  max-width: 760px;
}

.lab-badge {
  display: inline-flex;
  margin: 0 0 16px;
  padding: 5px 10px;
  border: 1px solid rgba(121, 215, 155, 0.18);
  border-radius: 999px;
  color: var(--green);
  background: rgba(121, 215, 155, 0.07);
  font-size: 12px;
  font-weight: 680;
}

.lab-copy h3 {
  margin-bottom: 12px;
  color: var(--text);
  font-size: clamp(24px, 4vw, 38px);
  line-height: 1.08;
}

.lab-copy p,
.lab-points {
  color: var(--muted);
  font-size: 16px;
}

.lab-points {
  display: grid;
  gap: 10px;
  margin: 20px 0 24px;
  padding: 0;
  list-style: none;
}

.lab-points li {
  position: relative;
  padding-left: 24px;
}

.lab-points li::before {
  position: absolute;
  left: 2px;
  top: 0.72em;
  width: 6px;
  height: 6px;
  border: 2px solid rgba(245, 242, 234, 0.72);
  border-radius: 50%;
  content: "";
}

.lab-open,
.lab-close {
  min-height: 42px;
  flex: 0 0 auto;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: #f2f0eb;
  color: #08080b;
  font-size: 14px;
  font-weight: 760;
  white-space: nowrap;
  cursor: pointer;
}

.lab-animation {
  position: relative;
  min-width: 0;
  overflow: hidden;
  align-self: stretch;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background:
    linear-gradient(rgba(121, 215, 155, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(121, 215, 155, 0.04) 1px, transparent 1px),
    radial-gradient(circle at 18% 16%, rgba(121, 215, 155, 0.14), transparent 14rem),
    radial-gradient(circle at 100% 88%, rgba(255, 140, 161, 0.12), transparent 16rem),
    rgba(8, 10, 12, 0.88);
  background-size: 28px 28px, 28px 28px, auto, auto, auto;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.lab-animation::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(5, 6, 8, 0.7), transparent 18%, transparent 82%, rgba(5, 6, 8, 0.72)),
    linear-gradient(180deg, rgba(5, 6, 8, 0.72), transparent 20%, transparent 78%, rgba(5, 6, 8, 0.78));
  content: "";
}

.lab-animation::after {
  position: absolute;
  inset: -30% -60%;
  pointer-events: none;
  background: linear-gradient(110deg, transparent 36%, rgba(121, 215, 155, 0.12), transparent 52%);
  animation: labSweep 4.8s linear infinite;
  content: "";
}

.lab-modal[data-running="false"] .lab-animation::after,
.lab-modal:not([data-running]) .lab-animation::after {
  opacity: 0;
  animation-play-state: paused;
}

.animation-top,
.flow-map,
.drain-meter,
.animation-steps {
  position: relative;
  z-index: 1;
}

.animation-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 18px 12px;
}

.animation-top span {
  flex: 0 0 auto;
  padding: 5px 9px;
  border: 1px solid rgba(255, 140, 161, 0.22);
  border-radius: 999px;
  color: var(--rose);
  background: rgba(255, 140, 161, 0.08);
  font-size: 12px;
  font-weight: 760;
}

.animation-top strong {
  color: rgba(245, 242, 234, 0.88);
  font-size: 13px;
  line-height: 1.45;
  text-align: right;
}

.flow-map {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px minmax(0, 1fr) 34px minmax(0, 1fr);
  align-items: center;
  gap: 0;
  padding: 14px 18px 10px;
}

.flow-node {
  min-width: 0;
  min-height: 102px;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(12, 12, 15, 0.72);
  transform: translateY(0) scale(1);
  transition: border-color 260ms ease, box-shadow 260ms ease, transform 260ms ease, background 260ms ease;
}

.flow-node span {
  width: max-content;
  padding: 2px 6px;
  border-radius: 999px;
  color: rgba(245, 242, 234, 0.55);
  background: rgba(255, 255, 255, 0.07);
  font-size: 10px;
  font-weight: 780;
}

.flow-node strong {
  color: var(--text);
  font-size: 14px;
  line-height: 1.2;
}

.flow-node em {
  min-width: 0;
  color: var(--dim);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 10px;
  font-style: normal;
  overflow-wrap: anywhere;
}

.flow-node.is-active {
  border-color: rgba(121, 215, 155, 0.42);
  background: rgba(18, 32, 27, 0.84);
  box-shadow: 0 0 0 1px rgba(121, 215, 155, 0.12), 0 0 30px rgba(121, 215, 155, 0.12);
  transform: translateY(-2px) scale(1.025);
}

.flow-node.is-active span {
  color: #07100c;
  background: var(--green);
}

.flow-node.is-done {
  border-color: rgba(121, 215, 155, 0.2);
}

.flow-line {
  position: relative;
  height: 2px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.12);
}

.flow-line i {
  position: absolute;
  inset: 0 auto 0 -80%;
  width: 80%;
  background: linear-gradient(90deg, transparent, var(--green), transparent);
  animation: flowPulse 1.45s ease-in-out infinite;
}

.lab-modal[data-running="false"] .flow-line i,
.lab-modal:not([data-running]) .flow-line i {
  opacity: 0;
  animation-play-state: paused;
}

.drain-meter {
  display: grid;
  gap: 10px;
  padding: 10px 18px 16px;
}

.drain-meter > div:first-child {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.drain-meter span {
  color: var(--dim);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.drain-meter strong {
  color: var(--rose);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 18px;
}

.meter-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.meter-track span {
  display: block;
  width: 25%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), #ffd166 56%, var(--rose));
  transition: width 520ms cubic-bezier(0.22, 1, 0.36, 1);
}

.animation-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0 18px 18px;
  list-style: none;
}

.animation-steps li {
  min-width: 0;
  display: grid;
  gap: 5px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.22);
  opacity: 0.48;
  transition: opacity 220ms ease, border-color 220ms ease, background 220ms ease;
}

.animation-steps li > span {
  width: 8px;
  height: 8px;
  border: 1px solid rgba(245, 242, 234, 0.48);
  border-radius: 50%;
}

.animation-steps strong {
  color: var(--text);
  font-size: 12px;
  line-height: 1.2;
}

.animation-steps em {
  color: var(--dim);
  font-size: 11px;
  font-style: normal;
  line-height: 1.25;
}

.animation-steps li.is-active,
.animation-steps li.is-done {
  opacity: 1;
}

.animation-steps li.is-active {
  border-color: rgba(121, 215, 155, 0.32);
  background: rgba(121, 215, 155, 0.08);
}

.animation-steps li.is-active > span {
  border-color: var(--green);
  background: var(--green);
  box-shadow: 0 0 18px rgba(121, 215, 155, 0.45);
}

.animation-steps li.is-done > span {
  border-color: rgba(121, 215, 155, 0.72);
  background: rgba(121, 215, 155, 0.46);
}

@keyframes flowPulse {
  0% {
    transform: translateX(0);
    opacity: 0;
  }
  20%,
  78% {
    opacity: 1;
  }
  100% {
    transform: translateX(240%);
    opacity: 0;
  }
}

@keyframes labSweep {
  0% {
    transform: translateX(-22%);
  }
  100% {
    transform: translateX(22%);
  }
}

@keyframes flowPulseDown {
  0% {
    transform: translateY(0);
    opacity: 0;
  }
  20%,
  78% {
    opacity: 1;
  }
  100% {
    transform: translateY(240%);
    opacity: 0;
  }
}

.wallet-preview {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(12, 12, 15, 0.78);
}

.wallet-top,
.wallet-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.wallet-top strong,
.wallet-row strong {
  color: var(--text);
}

.wallet-top span,
.wallet-row span {
  display: block;
  color: var(--dim);
  font-size: 12px;
}

.wallet-top em {
  flex: 0 0 auto;
  padding: 4px 8px;
  border: 1px solid rgba(255, 140, 161, 0.22);
  border-radius: 999px;
  color: var(--rose);
  background: rgba(255, 140, 161, 0.08);
  font-size: 12px;
  font-style: normal;
  font-weight: 720;
}

.wallet-row strong {
  min-width: 0;
  color: var(--rose);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  overflow-wrap: anywhere;
  text-align: right;
}

.wallet-code {
  display: grid;
  gap: 6px;
  padding: 16px;
  color: rgba(230, 247, 245, 0.84);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.5;
}

.lab-modal {
  position: fixed;
  inset: 0;
  z-index: 220;
  display: none;
  padding: 20px;
}

.lab-modal.is-open {
  display: grid;
  place-items: center;
}

.lab-modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(12px);
}

.lab-dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 820px);
  max-height: min(86vh, 760px);
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background:
    radial-gradient(circle at 12% 0%, rgba(121, 215, 155, 0.1), transparent 20rem),
    #090a0d;
  box-shadow: 0 40px 130px rgba(0, 0, 0, 0.64);
}

.lab-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.lab-dialog-head h3 {
  color: var(--text);
  font-size: clamp(24px, 5vw, 42px);
  line-height: 1.08;
}

.lab-dialog > .lab-animation {
  margin: 22px 22px 18px;
}

.lab-dialog-tabs {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.lab-panel {
  display: none;
  padding: 22px;
}

.lab-panel.is-active {
  display: block;
}

.wallet-preview-large {
  max-width: 640px;
}

.attack-steps {
  display: grid;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.attack-steps li {
  position: relative;
  padding-left: 32px;
}

.attack-steps li::before {
  position: absolute;
  left: 3px;
  top: 0.66em;
  width: 8px;
  height: 8px;
  border: 2px solid var(--rose);
  border-radius: 50%;
  content: "";
}

.attack-steps strong {
  display: block;
  color: var(--text);
  font-size: 17px;
}

.attack-steps span,
.defense-note {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}

.defense-note {
  border-left: 2px solid var(--green);
  padding-left: 18px;
}

.roles-heading {
  position: sticky;
  top: 106px;
  height: fit-content;
}

.role-groups {
  display: grid;
  gap: 28px;
}

.role-group h3 {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 680;
  text-transform: uppercase;
}

.role-group a {
  display: grid;
  min-height: 66px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  margin-bottom: 8px;
  padding: 0 18px;
  color: rgba(245, 242, 234, 0.86);
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.role-group a:hover {
  border-color: rgba(240, 184, 108, 0.42);
  background: rgba(240, 184, 108, 0.08);
  transform: translateY(-1px);
}

.role-group small {
  color: var(--dim);
  font-size: 13px;
  text-align: right;
}

.footer {
  display: grid;
  width: min(calc(100% - 40px), var(--max));
  margin: 0 auto;
  padding: 68px 0 86px;
  grid-template-columns: minmax(230px, 0.9fr) minmax(0, 1.5fr);
  gap: 44px;
  border-top: 1px solid var(--line);
  color: var(--dim);
}

.footer-brand {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.footer-brand p {
  max-width: 300px;
  margin: 0;
  font-size: 14px;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.footer h2 {
  margin: 0 0 12px;
  color: var(--text);
  font-size: 13px;
}

.footer a {
  display: block;
  width: fit-content;
  padding: 4px 0;
  font-size: 14px;
}

.footer a:hover {
  color: var(--text);
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 700ms ease, transform 700ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

@keyframes scan {
  to {
    transform: translateY(20px);
  }
}

@keyframes pulse {
  to {
    height: 30px;
    opacity: 1;
  }
}

@keyframes floatReference {
  0%,
  100% {
    transform: translateY(0) rotate(-1deg);
  }

  50% {
    transform: translateY(-10px) rotate(1deg);
  }
}

@keyframes floatDevice {
  0%,
  100% {
    transform: translateX(-50%) translateY(0) rotate(-2deg);
  }

  50% {
    transform: translateX(-50%) translateY(-10px) rotate(-1deg);
  }
}

@keyframes screenGlint {
  0%,
  38%,
  100% {
    transform: translateX(-75%);
    opacity: 0;
  }

  52% {
    transform: translateX(70%);
    opacity: 1;
  }
}

@keyframes orbitSpin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes dialFloat {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }

  50% {
    transform: translateY(-14px) scale(1.35);
  }
}

@keyframes noiseSlide {
  50% {
    background-position: 9px 0, 0 7px, 0 0;
  }
}

@keyframes ticketDrift {
  0%,
  100% {
    transform: translate(0, 0);
  }

  50% {
    transform: translate(8px, -7px);
  }
}

@keyframes futurePulse {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(0.84);
    opacity: 0.76;
  }

  50% {
    transform: translate(-50%, -50%) scale(1.18);
    opacity: 1;
  }
}

@keyframes futureSpin {
  to {
    transform: translate(-50%, -50%) rotate(calc(var(--angle) + 360deg));
  }
}

@media (max-width: 860px) {
  .site-header {
    width: min(calc(100% - 24px), var(--max));
  }

  .menu-button {
    display: grid;
  }

  .site-nav {
    position: absolute;
    top: 62px;
    left: 0;
    right: 0;
    display: none;
    flex: none;
    min-width: 0;
    overflow: visible;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(12, 12, 16, 0.96);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(18px);
  }

  .site-header[data-open="true"] .site-nav {
    display: grid;
  }

  .site-nav a {
    justify-content: flex-start;
    min-height: 44px;
    padding: 0 12px;
    white-space: nowrap;
    font-size: 14px;
  }

  .site-nav .nav-pill {
    margin: 6px 0 0;
    justify-content: center;
  }

  .hero {
    min-height: auto;
    padding-top: 116px;
    grid-template-columns: 1fr;
    gap: 44px;
  }

  .hero-copy {
    max-width: none;
  }

  .hero-visual {
    min-height: auto;
  }

  .retro-scene {
    max-width: 520px;
  }

  .chapter,
  .roles {
    grid-template-columns: 1fr;
  }

  .chapter-kicker,
  .roles-heading {
    position: static;
  }

  .chapter {
    gap: 20px;
  }

  .chapter-kicker {
    order: 1;
  }

  .chapter-visual {
    order: 2;
  }

  .chapter-body {
    order: 3;
  }

  .chapter-visual {
    width: 100%;
    padding: 40px 0 58px;
  }

  .chapter-visual .device-scene {
    position: relative;
    top: auto;
    width: min(100%, 520px);
    margin: 12px auto 0;
  }

  .reference-stage {
    position: relative;
    top: auto;
    width: min(100%, 520px);
    margin: 12px auto 0;
  }

  .reference-device {
    width: min(82%, 380px);
  }

  .footer {
    grid-template-columns: 1fr;
  }

  .lab-summary {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .hero,
  .story-intro,
  .chapter,
  .roles,
  .footer {
    width: min(calc(100% - 28px), var(--max));
  }

  .hero {
    padding-bottom: 44px;
  }

  h1 {
    font-size: clamp(48px, 16vw, 72px);
  }

  .hero-copy p:not(.eyebrow),
  .chapter-body p {
    font-size: 16px;
  }

  .retro-scene {
    border-radius: 7px;
  }

  .computer {
    width: 84%;
    bottom: 28px;
  }

  .monitor {
    height: 222px;
    padding: 20px;
  }

  .screen {
    height: 138px;
    border-width: 8px;
  }

  .screen-text {
    left: 20px;
    bottom: 20px;
    font-size: 18px;
  }

  .cursor {
    left: 88px;
    bottom: 24px;
    width: 10px;
    height: 17px;
  }

  .base {
    height: 46px;
  }

  .keyboard {
    height: 58px;
    gap: 5px;
    padding: 13px;
  }

  .story-intro {
    padding-top: 36px;
    font-size: 25px;
  }

  .chapter,
  .roles {
    padding: 72px 0;
  }

  .chapter-visual .device-scene {
    width: min(100%, 360px);
  }

  .chapter-visual .device-shell {
    width: 108%;
  }

  .reference-hero-frame {
    width: 100%;
  }

  .reference-stage {
    width: min(100%, 360px);
  }

  .reference-device {
    width: min(84%, 300px);
  }

  .audio-widget {
    grid-template-columns: 46px minmax(0, 1fr);
  }

  .wave {
    display: none;
  }

  .role-group a {
    min-height: 76px;
    grid-template-columns: 1fr;
    align-content: center;
    gap: 3px;
    padding: 13px 16px;
  }

  .role-group small {
    text-align: left;
  }

  .footer-links {
    grid-template-columns: 1fr;
  }

  .web3-lab {
    width: min(calc(100% - 28px), var(--max));
    padding: 72px 0;
  }

  .web3-lab-heading p:not(.eyebrow) {
    font-size: 16px;
  }

  .lab-summary {
    padding: 18px;
  }

  .animation-top {
    align-items: flex-start;
    flex-direction: column;
  }

  .animation-top strong {
    text-align: left;
  }

  .flow-map {
    grid-template-columns: 1fr;
    gap: 8px;
    padding-top: 8px;
  }

  .flow-node {
    min-height: 74px;
  }

  .flow-line {
    width: 2px;
    height: 22px;
    margin: 0 auto;
  }

  .flow-line i {
    inset: -80% 0 auto;
    width: 100%;
    height: 80%;
    background: linear-gradient(180deg, transparent, var(--green), transparent);
    animation-name: flowPulseDown;
  }

  .animation-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .wallet-top,
  .wallet-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .wallet-row strong {
    text-align: left;
  }

  .lab-modal {
    padding: 10px;
    align-items: end;
  }

  .lab-dialog {
    width: 100%;
    max-height: 88vh;
  }

  .lab-dialog-head,
  .lab-panel {
    padding: 18px;
  }

  .lab-dialog > .lab-animation {
    margin: 18px;
  }
}

/* RTL support for Arabic */
[dir="rtl"] {
  direction: rtl;
  text-align: right;
}

[dir="rtl"] .quote-panel {
  grid-template-columns: minmax(0, 1fr) 34px;
}

[dir="rtl"] .quote-panel::before {
  order: 2;
}

[dir="rtl"] .forces.bullet-list section {
  padding: 0 30px 0 0;
}

[dir="rtl"] .forces.bullet-list section::before {
  left: auto;
  right: 3px;
}

[dir="rtl"] .lab-points li {
  padding-left: 0;
  padding-right: 24px;
}

[dir="rtl"] .lab-points li::before {
  left: auto;
  right: 2px;
}

[dir="rtl"] .attack-steps li {
  padding-left: 0;
  padding-right: 32px;
}

[dir="rtl"] .attack-steps li::before {
  left: auto;
  right: 3px;
}

[dir="rtl"] .defense-note {
  border-left: none;
  border-right: 2px solid var(--green);
  padding-left: 0;
  padding-right: 18px;
}

[dir="rtl"] .role-group a {
  text-align: right;
}

[dir="rtl"] .role-group small {
  text-align: right;
}

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

/* Readme page accuracy pass */
.site-header {
  left: 0;
  width: 100%;
  height: 64px;
  padding: 0 24px;
  transform: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.045);
  background: rgba(7, 8, 10, 0.92);
  backdrop-filter: blur(18px);
}

.site-header::before {
  content: none;
}

.brand {
  order: 1;
  gap: 10px;
  color: #f7f7f4;
  font-size: 21px;
  font-weight: 690;
}

.brand-logo {
  width: 30px;
  height: 30px;
  filter: drop-shadow(0 8px 18px rgba(121, 215, 155, 0.16));
}

.brand-mark {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background:
    repeating-linear-gradient(45deg, #f5f4ef 0 2px, transparent 2px 5px),
    #f5f4ef;
  box-shadow: none;
}

.brand-mark::after {
  content: none;
}

.site-nav {
  order: 2;
  margin-left: auto;
  flex: 1 1 auto;
  min-width: 0;
  gap: 8px;
  margin-right: 10px;
  font-size: 13px;
  overflow: hidden;
}

.site-nav a {
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: rgba(245, 242, 234, 0.72);
  font-weight: 650;
  white-space: nowrap;
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  backdrop-filter: blur(10px);
}

.site-nav a:hover {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.075);
  color: var(--text);
}

.site-nav .nav-pill {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: rgba(245, 242, 234, 0.72);
  font-weight: 650;
}

.menu-button {
  order: 3;
  display: grid;
  margin-left: 18px;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #f2f0eb;
}

.menu-button span {
  width: 14px;
}

.nav-more {
  order: 4;
  flex: 0 0 auto;
  min-height: 34px;
  margin-left: 12px;
  padding: 0 13px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(245, 242, 234, 0.94);
  color: #08080b;
  font-size: 12px;
  font-weight: 760;
  text-decoration: none;
  white-space: nowrap;
}

.nav-more:hover {
  background: #fffdfa;
}

.readme-hero {
  position: relative;
  display: block;
  width: 100%;
  min-height: auto;
  margin: 0;
  padding: 64px 0 72px;
  overflow: visible;
}

.readme-hero::before {
  position: absolute;
  inset: 64px 0 auto;
  height: min(78vh, 700px);
  background:
    linear-gradient(rgba(76, 62, 160, 0.34) 1px, transparent 1px),
    linear-gradient(90deg, rgba(76, 62, 160, 0.32) 1px, transparent 1px),
    radial-gradient(circle at 50% 40%, rgba(72, 47, 154, 0.46), transparent 42%),
    linear-gradient(180deg, #08090c, #090911 64%, rgba(8, 8, 11, 0));
  background-size: 24px 24px, 24px 24px, auto, auto;
  content: "";
}

.readme-hero::after {
  position: absolute;
  left: 0;
  right: 0;
  top: 64px;
  z-index: 0;
  height: min(78vh, 700px);
  pointer-events: none;
  background:
    linear-gradient(rgba(76, 62, 160, 0.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(76, 62, 160, 0.18) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: linear-gradient(to bottom, black 0 76%, transparent 100%);
  content: "";
}

.readme-hero-art {
  position: relative;
  z-index: 1;
  display: grid;
  width: min(100% - 36px, 820px);
  margin: 0 auto;
  justify-items: center;
  padding-top: clamp(44px, 8vw, 82px);
  user-select: none;
  -webkit-user-select: none;
}

.readme-hero h1 {
  position: relative;
  z-index: 2;
  max-width: min(100%, 820px);
  margin: 0 0 10px;
  color: #f4f0eb;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(36px, 5.4vw, 76px);
  font-weight: 400;
  line-height: 1.08;
  text-align: center;
  letter-spacing: 0;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.hero-device {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 34px 54px rgba(0, 0, 0, 0.56));
}

.monitor-visual {
  position: relative;
  z-index: 1;
  display: block;
  width: min(88%, 360px);
  filter: drop-shadow(0 28px 42px rgba(0, 0, 0, 0.46));
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.monitor-visual picture {
  display: block;
  width: 100%;
  pointer-events: none;
}

.hero-monitor {
  width: min(75vw, 520px);
  margin-top: 0;
  filter: drop-shadow(0 34px 54px rgba(0, 0, 0, 0.56));
}

.monitor-visual img {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
}

.screen-overlay {
  position: absolute;
  left: 20.6%;
  top: 15.4%;
  z-index: 3;
  width: 58.3%;
  height: 33.1%;
  overflow: hidden;
  border-radius: 12px;
  background:
    linear-gradient(rgba(87, 185, 210, 0.23) 1px, transparent 1px),
    linear-gradient(90deg, rgba(87, 185, 210, 0.18) 1px, transparent 1px),
    #cfeefa;
  background-size: 7px 7px, 7px 7px, auto;
  color: #123468;
  box-shadow:
    inset 0 0 24px rgba(255, 255, 255, 0.42),
    inset 0 0 34px rgba(49, 115, 150, 0.18);
  clip-path: inset(0 round 12px);
  pointer-events: none;
  user-select: none;
}

.screen-overlay::before {
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  background:
    radial-gradient(circle at 35% 15%, rgba(255, 255, 255, 0.36), transparent 22%),
    repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.19) 0 1px, transparent 1px 4px);
  mix-blend-mode: soft-light;
  content: "";
}

.screen-overlay::after {
  position: absolute;
  inset: -12%;
  z-index: 5;
  pointer-events: none;
  background: linear-gradient(110deg, transparent 20%, rgba(255, 255, 255, 0.2), transparent 56%);
  transform: translateX(-72%);
  animation: screenSweep 5.2s ease-in-out infinite;
  content: "";
}

.terminal-prompt {
  position: absolute;
  left: 11%;
  top: 19%;
  z-index: 2;
  color: #27d886;
  font-family: "Courier New", monospace;
  font-size: clamp(18px, 5.2vw, 38px);
  font-weight: 700;
  text-shadow: 0 0 10px rgba(39, 216, 134, 0.8);
}

.terminal-prompt::after {
  display: inline-block;
  width: 0.62em;
  height: 0.96em;
  margin-left: 0.18em;
  background: currentColor;
  vertical-align: -0.12em;
  box-shadow: 0 0 10px rgba(39, 216, 134, 0.74);
  animation: blink 900ms steps(2, start) infinite;
  content: "";
}

.screen-terminal {
  left: 18.3%;
  top: 13.2%;
  width: 63.6%;
  height: 37.3%;
  border-radius: 9px;
  clip-path: inset(0 round 9px);
  background:
    radial-gradient(circle at 44% 44%, rgba(82, 118, 137, 0.16), transparent 58%),
    #182027;
  background-size: auto, auto;
  color: #22e08e;
  box-shadow:
    inset 0 0 0 2px rgba(0, 0, 0, 0.72),
    inset 0 0 10px rgba(0, 0, 0, 0.86),
    inset 0 0 20px rgba(0, 0, 0, 0.72),
    inset 0 0 46px rgba(15, 30, 41, 0.92),
    inset 0 0 0 1px rgba(110, 197, 220, 0.03);
  animation: terminalPhosphor 1.8s steps(2, end) infinite;
}

.screen-terminal::before {
  inset: 4px 5px;
  z-index: 4;
  border-radius: 5px;
  background:
    repeating-linear-gradient(90deg, rgba(137, 214, 232, 0.18) 0 1px, transparent 1px 6px),
    repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.045) 0 1px, transparent 1px 5px),
    radial-gradient(circle at 32% 18%, rgba(255, 255, 255, 0.035), transparent 20%);
  mix-blend-mode: screen;
  opacity: 0.72;
}

.screen-terminal::after {
  inset: 0;
  z-index: 8;
  background:
    linear-gradient(90deg, #05080b 0 5px, rgba(0, 0, 0, 0.82) 5px 9px, transparent 15%, transparent 85%, rgba(0, 0, 0, 0.82) calc(100% - 9px), #05080b calc(100% - 5px) 100%),
    linear-gradient(180deg, #05080b 0 5px, rgba(0, 0, 0, 0.78) 5px 10px, transparent 16%, transparent 84%, rgba(0, 0, 0, 0.82) calc(100% - 10px), #05080b calc(100% - 5px) 100%),
    radial-gradient(ellipse at center, transparent 50%, rgba(0, 0, 0, 0.7) 100%),
    linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.05), transparent);
  transform: none;
  animation: terminalRoll 3.2s linear infinite;
  opacity: 0.9;
}

.screen-terminal .terminal-prompt {
  left: 8.5%;
  top: 18%;
  z-index: 10;
  color: #21e18e;
  font-size: clamp(15px, 3.7vw, 25px);
  text-shadow:
    0 0 5px rgba(33, 225, 142, 0.9),
    0 0 14px rgba(33, 225, 142, 0.42);
}

.screen-terminal .terminal-prompt::after {
  width: 0.7em;
  height: 0.14em;
  margin-left: 0.08em;
  vertical-align: -0.26em;
  box-shadow: 0 0 8px rgba(33, 225, 142, 0.82);
}

.screen-hello span {
  position: absolute;
  left: 21%;
  top: 34%;
  z-index: 2;
  width: 0;
  max-width: 66%;
  overflow: hidden;
  color: #18366f;
  font-family: "Brush Script MT", "Segoe Script", cursive;
  font-size: clamp(36px, 7vw, 66px);
  line-height: 1;
  white-space: nowrap;
  text-shadow: 0 0 1px rgba(24, 54, 111, 0.72);
  animation: writeHello 4.8s steps(5, end) infinite;
}

.screen-chaos span {
  position: absolute;
  z-index: 2;
  display: grid;
  min-width: 42px;
  min-height: 24px;
  place-items: center;
  padding: 2px 7px;
  border: 1px solid rgba(20, 52, 104, 0.28);
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.2);
  color: #123468;
  font-family: "Courier New", monospace;
  font-size: clamp(12px, 2.2vw, 18px);
  font-weight: 700;
  animation: chaosMove 2.4s ease-in-out infinite;
}

.screen-chaos span:nth-child(1) {
  left: 12%;
  top: 18%;
}

.screen-chaos span:nth-child(2) {
  right: 12%;
  top: 25%;
  animation-delay: -0.5s;
}

.screen-chaos span:nth-child(3) {
  left: 24%;
  bottom: 19%;
  animation-delay: -1s;
}

.screen-chaos span:nth-child(4) {
  right: 20%;
  bottom: 15%;
  animation-delay: -1.4s;
}

.screen-orb span {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: 42%;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    linear-gradient(45deg, rgba(18, 52, 104, 0.62) 25%, transparent 25% 50%, rgba(18, 52, 104, 0.62) 50% 75%, transparent 75%),
    rgba(63, 117, 173, 0.12);
  background-size: 9px 9px;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 18px rgba(18, 52, 104, 0.24);
  animation: orbScan 4.4s ease-in-out infinite;
}

.readme-hero .story-intro {
  position: relative;
  z-index: 1;
  width: min(100% - 48px, 720px);
  margin: 30px auto 0;
  padding: 0;
  color: rgba(236, 235, 232, 0.86);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-size: clamp(18px, 3.4vw, 24px);
  font-weight: 560;
  line-height: 1.58;
}

.readme-hero .story-intro p {
  margin-bottom: 14px;
}

@media (min-width: 861px) {
  .readme-hero-art {
    padding-top: 64px;
  }

  .readme-hero h1 {
    margin-bottom: 12px;
  }
}

.reference-stage .monitor-visual {
  width: min(88%, 360px);
}

.reference-device,
.reference-present .reference-device,
.reference-future .reference-device {
  width: 100%;
  animation: none;
  transform: none;
  filter: none;
}

@keyframes screenSweep {
  0%,
  42%,
  100% {
    transform: translateX(-78%);
    opacity: 0;
  }

  58% {
    transform: translateX(78%);
    opacity: 1;
  }
}

@keyframes terminalPhosphor {
  0%,
  100% {
    background-position: 0 0, 0 0, 0 0, 0 0;
    filter: brightness(0.98);
  }

  50% {
    background-position: 1px 0, 0 1px, 0 0, 0 0;
    filter: brightness(1.08);
  }
}

@keyframes terminalRoll {
  to {
    background-position: 0 0, 0 22px;
  }
}

@keyframes writeHello {
  0%,
  18% {
    width: 0;
  }

  52%,
  82% {
    width: 66%;
  }

  100% {
    width: 0;
  }
}

@keyframes chaosMove {
  0%,
  100% {
    transform: translate(0, 0);
    opacity: 0.86;
  }

  45% {
    transform: translate(8px, -7px);
    opacity: 1;
  }

  70% {
    transform: translate(-5px, 6px);
  }
}

@keyframes orbScan {
  0%,
  100% {
    transform: translate(-50%, -50%) rotate(0deg) scale(0.86);
    opacity: 0.72;
  }

  50% {
    transform: translate(-50%, -50%) rotate(180deg) scale(1.12);
    opacity: 1;
  }
}

@media (max-width: 560px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .site-header {
    padding: 0 14px;
    justify-content: space-between;
    gap: 8px;
  }

  .brand {
    display: flex;
    flex: 0 0 auto;
    gap: 0;
  }

  .brand-name {
    display: none;
  }

  .brand-logo {
    width: 26px;
    height: 26px;
  }

  .brand-mark {
    width: 22px;
    height: 22px;
  }

  .site-nav {
    position: static;
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
    justify-content: center;
    gap: 10px;
    margin-left: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
  }

  .site-nav a {
    min-height: 34px;
    padding: 0 12px;
    justify-content: center;
    font-size: 11.5px;
    white-space: nowrap;
  }

  .site-nav .nav-pill {
    margin: 0;
    padding: 0 10px;
  }

  .menu-button {
    display: none;
  }

  .nav-more {
    flex: 0 0 auto;
    min-height: 34px;
    margin-left: 0;
    padding: 0 12px;
    font-size: 11.5px;
  }

  .readme-hero {
    left: auto !important;
    right: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-bottom: 42px;
  }

  .readme-hero::before {
    left: 0;
    right: 0;
    width: auto;
    min-width: 100%;
    height: 640px;
    background-size: 24px 24px, 24px 24px, auto, auto;
  }

  .readme-hero::after {
    left: 0;
    right: 0;
    width: auto;
    min-width: 100%;
    height: 640px;
  }

  .readme-hero-art {
    width: 100%;
    max-width: 100%;
    padding-inline: 16px;
    padding-top: 58px;
  }

  .readme-hero h1 {
    margin-bottom: 10px;
    max-width: calc(100vw - 32px);
    font-size: clamp(38px, 11.8vw, 52px);
  }

  .hero-device {
    width: 100%;
  }

  .hero-monitor {
    width: min(88vw, 360px);
  }

  .reference-stage .monitor-visual {
    width: min(84%, 300px);
  }

  .chapter-visual {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    padding: 42px max(12px, env(safe-area-inset-right)) 66px max(12px, env(safe-area-inset-left));
    overflow: visible;
  }

  .chapter-visual::before {
    inset: 0;
    background:
      radial-gradient(circle at 0 0, rgba(8, 8, 11, 0.94), transparent 27%),
      radial-gradient(circle at 100% 0, rgba(8, 8, 11, 0.88), transparent 28%),
      radial-gradient(circle at 0 100%, rgba(8, 8, 11, 0.86), transparent 30%),
      radial-gradient(circle at 100% 100%, rgba(8, 8, 11, 0.92), transparent 30%),
      linear-gradient(var(--grid-line-a) 1px, transparent 1px),
      linear-gradient(90deg, var(--grid-line-b) 1px, transparent 1px),
      radial-gradient(circle at 10% 18%, var(--corner-tl), transparent 18rem),
      radial-gradient(circle at 90% 18%, var(--corner-tr), transparent 18rem),
      radial-gradient(circle at 10% 86%, var(--corner-bl), transparent 17rem),
      radial-gradient(circle at 90% 86%, var(--corner-br), transparent 17rem),
      linear-gradient(180deg, rgba(8, 8, 11, 0), rgba(8, 8, 11, 0.46) 80%, rgba(8, 8, 11, 0));
    background-size: auto, auto, auto, auto, 24px 24px, 24px 24px, auto, auto, auto, auto, auto;
    mask-image:
      linear-gradient(to right, transparent 0, black 8%, black 92%, transparent 100%),
      linear-gradient(to bottom, transparent 0, black 5%, black 88%, transparent 100%);
    mask-composite: intersect;
  }

  .chapter-visual::after {
    left: 12%;
    right: 12%;
    bottom: 12%;
  }

  .readme-hero .story-intro {
    box-sizing: border-box;
    width: 100% !important;
    max-width: 100% !important;
    margin: 24px 0 0 !important;
    padding-left: max(16px, env(safe-area-inset-left)) !important;
    padding-right: max(16px, env(safe-area-inset-right)) !important;
    font-size: 17px;
    line-height: 1.7;
  }

  .readme-hero .story-intro p {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .chapter,
  .roles {
    width: calc(100% - 24px) !important;
    max-width: calc(100vw - 24px) !important;
    padding-top: 64px;
    padding-bottom: 64px;
    overflow-x: visible;
  }

  .chapter-body,
  .chapter-body > *,
  .forces,
  .forces section,
  .code-panel,
  .code-panel pre,
  .code-panel code {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .forces {
    margin-top: 28px;
  }

  .forces section {
    padding: 18px 16px;
    overflow: hidden;
  }

  .forces.bullet-list section {
    padding: 0 0 0 28px;
    overflow: visible;
  }

  .forces p {
    font-size: 14px;
    line-height: 1.65;
  }

  .forces span,
  .forces h3,
  .forces p,
  .code-panel-title {
    overflow-wrap: anywhere;
    word-break: break-word;
    hyphens: auto;
  }

  .code-panel pre {
    padding: 16px;
    overflow-x: hidden;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
}
