:root {
  color-scheme: dark;
  --bg: #07070b;
  --text: #f7f6fb;
  --muted: #aaa7b7;
  --dim: #706d7d;
  --violet: #8c79ff;
  --violet-bright: #b2a7ff;
  --cyan: #36ddf1;
  --green: #31dc82;
  --orange: #ff9e43;
  --glass: rgba(22, 22, 31, 0.55);
  --glass-strong: rgba(26, 25, 38, 0.78);
  --border: rgba(255, 255, 255, 0.13);
  --border-soft: rgba(255, 255, 255, 0.075);
  --presence: 0;
  --shift: 40px;
  --bg-x: 0px;
  --bg-y: 0px;
  --bg-scale: 1.04;
  --bg-rotate: 0deg;
  --star-y: 0px;
  --hue: 0deg;
}

* { box-sizing: border-box; }

html {
  min-width: 320px;
  overflow-x: clip;
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: clip;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
img { display: block; max-width: 100%; height: auto; image-rendering: auto; }
a { color: inherit; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
code { font-family: "SFMono-Regular", Consolas, monospace; }

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 10px;
  left: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  background: #fff;
  color: #111;
  transform: translateY(-160%);
  transition: transform 0.2s;
}

.skip-link:focus { transform: none; }

.cosmos {
  position: fixed;
  z-index: 0;
  inset: -12vh -12vw;
  overflow: hidden;
  background: #07070b;
  pointer-events: none;
}

main { position: relative; z-index: 1; }

.cosmos-art {
  position: absolute;
  inset: -8%;
  background-image: url("assets/space-clock-lossless.webp");
  background-position: center;
  background-size: contain;
  background-repeat: no-repeat;
  filter: hue-rotate(var(--hue)) saturate(1.08) brightness(0.92) contrast(1.18);
  transform: translate3d(var(--bg-x), var(--bg-y), 0) scale(var(--bg-scale)) rotate(var(--bg-rotate));
  transform-origin: 58% 52%;
  will-change: transform, filter;
}

.cosmos-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(5, 5, 9, 0.38), transparent 48%, rgba(5, 5, 9, 0.02));
  mix-blend-mode: multiply;
}

.cosmos-stars {
  position: absolute;
  inset: -20%;
  opacity: 0.42;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.8) 0 0.8px, transparent 1px),
    radial-gradient(circle, rgba(119, 208, 255, 0.7) 0 0.7px, transparent 1px);
  background-position: 0 0, 37px 61px;
  background-size: 113px 113px, 173px 173px;
  transform: translate3d(0, var(--star-y), 0);
  will-change: transform;
  mask-image: linear-gradient(90deg, #000, rgba(0, 0, 0, 0.5) 60%, transparent);
}

.cosmos-stars-near {
  opacity: 0.18;
  background-size: 257px 257px, 311px 311px;
  filter: drop-shadow(0 0 4px rgba(150, 132, 255, 0.8));
  transform: translate3d(0, calc(var(--star-y) * -0.55), 0) scale(1.2);
}

.clock-sweep {
  position: absolute;
  right: -9vmin;
  top: 50%;
  width: 72vmin;
  aspect-ratio: 1;
  border-radius: 50%;
  background: conic-gradient(from 215deg, transparent 0 71%, rgba(100, 220, 255, 0.2), rgba(145, 113, 255, 0.7), transparent 78%);
  filter: drop-shadow(0 0 18px rgba(120, 90, 255, 0.2));
  mask: radial-gradient(circle, transparent 0 61%, #000 61.3% 61.8%, transparent 62.1%);
  transform: translateY(-50%) rotate(var(--sweep-rotate, 0deg));
  will-change: transform;
}

.signal-line {
  position: absolute;
  left: 18%;
  top: 55%;
  width: 80vw;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(151, 122, 255, 0.6), rgba(54, 221, 241, 0.12), transparent);
  box-shadow: 0 0 12px rgba(140, 121, 255, 0.25);
  transform-origin: left;
  opacity: 0.45;
}

.signal-one { transform: rotate(var(--line-one, -9deg)); }
.signal-two { top: 67%; opacity: 0.2; transform: rotate(var(--line-two, 6deg)); }

.cosmos-aurora {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at var(--aurora-x, 68%) var(--aurora-y, 58%), rgba(99, 78, 255, 0.075), transparent 26%),
    radial-gradient(circle at 47% 90%, rgba(54, 221, 241, 0.025), transparent 24%);
  mix-blend-mode: screen;
}

.cosmos-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 28%, rgba(2, 2, 5, 0.3) 70%, rgba(2, 2, 5, 0.82) 100%);
}

.site-header {
  position: fixed;
  z-index: 100;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 78px;
  padding: 0 max(28px, env(safe-area-inset-left));
  background: linear-gradient(180deg, rgba(7, 7, 11, 0.62), transparent);
  pointer-events: none;
}

.brand, .system-badge { pointer-events: auto; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-size: 15px;
  font-weight: 720;
  letter-spacing: -0.025em;
}

.brand img { width: 32px; height: 32px; border-radius: 8px; box-shadow: 0 8px 26px rgba(73, 88, 255, 0.3); }

.system-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(232, 230, 241, 0.65);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.system-badge i { width: 5px; height: 5px; border-radius: 50%; background: var(--green); box-shadow: 0 0 12px var(--green); }

.progress-rail {
  position: fixed;
  z-index: 90;
  top: 50%;
  right: 28px;
  display: grid;
  width: 34px;
  justify-items: center;
  gap: 12px;
  transform: translateY(-50%);
}

.progress-label {
  position: absolute;
  right: 26px;
  top: -2px;
  width: max-content;
  color: rgba(225, 222, 235, 0.56);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 8px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transform: rotate(-90deg) translateX(-100%);
  transform-origin: top right;
}

.progress-track {
  position: relative;
  width: 1px;
  height: min(33vh, 260px);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.13);
}

.progress-track i {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: var(--page-progress, 0%);
  background: linear-gradient(var(--violet-bright), var(--cyan));
  box-shadow: 0 0 12px var(--violet);
}

.progress-number { color: rgba(225, 222, 235, 0.38); font-family: "SFMono-Regular", Consolas, monospace; font-size: 8px; writing-mode: vertical-rl; }
.progress-number b { color: #c9c2ff; font-weight: 700; }

.chapter { position: relative; min-height: 150svh; --presence: 0; --shift: 42px; }
.opening { min-height: 190svh; }
.chapter-editor, .chapter-safety { min-height: 175svh; }
.chapter-faq { min-height: 165svh; }
.finale { min-height: 175svh; }

.chapter-sticky {
  position: sticky;
  top: 0;
  display: grid;
  width: min(calc(100% - 96px), 1160px);
  min-height: 100svh;
  margin-inline: auto;
  align-items: center;
  padding: 90px 0 54px;
  opacity: var(--presence);
  transform: translate3d(0, var(--shift), 0);
  will-change: opacity, transform;
}

.opening .chapter-sticky { opacity: 1; transform: none; }

.chapter-index {
  display: inline-flex;
  align-items: center;
  margin-bottom: 22px;
  color: #aaa1f7;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.chapter-copy { position: relative; z-index: 3; max-width: 510px; }
.chapter-copy h2 {
  margin-bottom: 24px;
  font-size: clamp(50px, 6vw, 78px);
  font-weight: 710;
  letter-spacing: -0.04em;
  line-height: 0.97;
}

.chapter-copy h2 em {
  background: linear-gradient(110deg, #f4f2ff, #a69aff 50%, #62e2ef);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-style: normal;
}

.chapter-copy > p { margin-bottom: 0; color: var(--muted); font-size: 17px; line-height: 1.7; }
.chapter-copy-center { max-width: 920px; margin-inline: auto; text-align: center; }
.chapter-copy-center .chapter-index { justify-content: center; }
.chapter-copy-center > p { max-width: 630px; margin-inline: auto; }

.opening-stage { place-items: center; align-content: center; text-align: center; }

.opening-overline {
  position: absolute;
  top: 17vh;
  margin: 0;
  color: rgba(220, 217, 231, 0.45);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 9px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  opacity: var(--opening-overline, 1);
}

.icon-orbit {
  position: relative;
  display: grid;
  width: min(44vw, 410px);
  aspect-ratio: 1;
  place-items: center;
  transform: scale(var(--icon-scale, 1));
  will-change: transform;
}

.icon-orbit img {
  position: relative;
  z-index: 4;
  width: clamp(118px, 14vw, 180px);
  border-radius: 26%;
  box-shadow: 0 28px 80px rgba(43, 65, 255, 0.35), 0 0 75px rgba(129, 96, 255, 0.25);
  transform: rotate(var(--icon-rotate, 0deg));
  will-change: transform;
}

.icon-halo { position: absolute; width: 46%; aspect-ratio: 1; border-radius: 50%; background: rgba(107, 84, 255, 0.13); filter: blur(32px); animation: halo-pulse 4s ease-in-out infinite; }
.orbit { position: absolute; border: 1px solid rgba(149, 129, 255, 0.22); border-radius: 50%; box-shadow: inset 0 0 16px rgba(109, 94, 255, 0.05); }
.orbit::after { content: ""; position: absolute; top: 50%; left: -3px; width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 15px var(--cyan); }
.orbit-one { inset: 17%; animation: orbit-spin 13s linear infinite; }
.orbit-two { inset: 7%; border-color: rgba(67, 219, 239, 0.13); animation: orbit-spin 20s linear infinite reverse; }
.orbit-three { inset: -5%; border-style: dashed; opacity: 0.55; animation: orbit-spin 32s linear infinite; }

.opening-copy {
  margin-top: -42px;
  opacity: var(--opening-copy, 0);
  transform: translateY(var(--opening-copy-y, 30px));
  will-change: opacity, transform;
}

.opening-copy h1 { margin-bottom: 4px; font-size: clamp(52px, 7vw, 84px); font-weight: 730; letter-spacing: -0.045em; line-height: 1; }
.opening-copy p { margin: 0; color: #b9b4c6; font-size: clamp(15px, 2vw, 20px); }

.scroll-cue {
  position: absolute;
  bottom: 8vh;
  display: grid;
  justify-items: center;
  gap: 11px;
  color: rgba(235, 232, 243, 0.76);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: var(--scroll-cue, 1);
}

.scroll-cue i { position: relative; width: 1px; height: 42px; overflow: hidden; background: rgba(255, 255, 255, 0.14); }
.scroll-cue i::after { content: ""; position: absolute; top: -60%; left: 0; width: 1px; height: 60%; background: linear-gradient(transparent, var(--cyan)); animation: scroll-line 1.8s ease-in-out infinite; }

.split-stage { grid-template-columns: 0.72fr 1.28fr; gap: 72px; }
.reverse-stage { grid-template-columns: 1.18fr 0.82fr; }
.micro-facts { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 32px; }
.micro-facts span { padding: 8px 11px; border: 1px solid var(--border-soft); border-radius: 999px; background: rgba(20, 20, 29, 0.45); color: var(--dim); font-size: 9px; backdrop-filter: blur(16px); }
.micro-facts b { color: #d0cadf; font-weight: 700; }

.chapter-reveal .chapter-sticky { width: min(calc(100% - 72px), 1320px); }
.floating-app {
  position: relative;
  z-index: 2;
  width: 100%;
  aspect-ratio: 794 / 495;
  align-self: center;
  margin: 0;
  overflow: hidden;
  border: 0;
  border-radius: 22px;
  background: transparent;
  box-shadow: 0 34px 100px rgba(0, 0, 0, 0.4), 0 0 78px rgba(96, 75, 231, 0.18);
  transform: none;
}
.floating-app img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: contain;
}
.app-glow { position: absolute; z-index: -1; inset: 12%; border-radius: 40%; background: rgba(105, 83, 255, 0.12); filter: blur(52px); }

.editor-stage { grid-template-rows: auto auto; align-content: center; gap: 56px; }
.editor-universe { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 22px; width: min(100%, 1120px); margin-inline: auto; }
.editor-screenshot { margin: 0; overflow: hidden; border-radius: 22px; background: transparent; box-shadow: 0 28px 90px rgba(0, 0, 0, 0.34), 0 0 58px rgba(102, 83, 255, 0.12); }
.editor-screenshot img { display: block; width: 100%; height: auto; }
.mode-portal { display: grid; width: 46px; height: 46px; place-items: center; border: 1px solid rgba(116, 205, 255, 0.24); border-radius: 50%; background: rgba(28, 31, 45, 0.64); color: #c4bcff; box-shadow: 0 0 30px rgba(101, 88, 255, 0.2); backdrop-filter: blur(16px); }

.job-showcase { position: relative; width: min(92%, 570px); margin: 0 auto; }
.job-showcase img { position: relative; z-index: 2; width: 100%; height: auto; }
.job-showcase-glow { position: absolute; z-index: 1; inset: 8% 4%; border-radius: 35%; background: rgba(91, 72, 220, 0.11); filter: blur(48px); }
.neon-list { display: grid; gap: 13px; margin: 34px 0 0; padding: 0; list-style: none; }
.neon-list li { display: flex; align-items: center; gap: 12px; color: #cbc7d4; font-size: 12px; }
.neon-list span { display: grid; width: 31px; height: 31px; place-items: center; border: 1px solid rgba(140, 121, 255, 0.25); border-radius: 9px; background: rgba(140, 121, 255, 0.08); color: #9e94dd; font: 8px "SFMono-Regular", Consolas, monospace; }

.safety-stage { grid-template-rows: auto auto; align-content: center; gap: 36px; }
.conflict-system { position: relative; display: grid; width: min(94%, 900px); min-height: 360px; grid-template-columns: minmax(0, 1fr) 96px minmax(0, 1fr); align-items: center; gap: 28px; margin-inline: auto; }
.conflict-orbit { position: absolute; inset: 3% 14%; border: 1px dashed rgba(135, 112, 255, 0.17); border-radius: 50%; box-shadow: 0 0 90px rgba(75, 55, 205, 0.09); animation: orbit-spin 34s linear infinite; }
.state-card { position: relative; z-index: 2; display: grid; gap: 11px; padding: 27px; border: 1px solid var(--border); border-radius: 20px; background: linear-gradient(145deg, rgba(43, 41, 59, 0.8), rgba(18, 18, 25, 0.68)); box-shadow: 0 26px 80px rgba(0, 0, 0, 0.3), inset 0 1px rgba(255, 255, 255, 0.07); backdrop-filter: blur(24px) saturate(145%); }
.state-card small { color: #8f89a1; font: 8px "SFMono-Regular", Consolas, monospace; letter-spacing: 0.1em; }
.state-card strong { font-size: 20px; letter-spacing: -0.035em; }
.state-card code { overflow: hidden; color: #aaa3c5; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.state-loaded { transform: rotate(-1.5deg); }
.state-live { border-color: rgba(255, 158, 67, 0.38); background: linear-gradient(145deg, rgba(69, 46, 42, 0.76), rgba(23, 19, 25, 0.7)); transform: rotate(1.5deg); }
.state-live small { color: #d79b72; }
.comparison-gate { position: relative; z-index: 3; display: grid; width: 76px; height: 76px; place-items: center; justify-self: center; border: 1px solid rgba(255, 158, 67, 0.28); border-radius: 50%; background: rgba(30, 25, 31, 0.78); box-shadow: 0 0 44px rgba(255, 118, 67, 0.13); backdrop-filter: blur(18px); }
.comparison-gate b { color: #ffc18c; font: 500 27px "SFMono-Regular", Consolas, monospace; }
.comparison-gate span { position: absolute; top: calc(100% + 11px); color: #817a89; font: 7px "SFMono-Regular", Consolas, monospace; letter-spacing: 0.12em; text-transform: uppercase; }
.save-blocked { position: absolute; z-index: 4; left: 50%; bottom: 0; display: grid; grid-template-columns: auto auto; align-items: center; gap: 1px 9px; padding: 10px 15px; border: 1px solid rgba(255, 158, 67, 0.3); border-radius: 999px; background: rgba(30, 23, 27, 0.82); box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28); transform: translateX(-50%); backdrop-filter: blur(18px); }
.save-blocked i { grid-row: 1 / 3; width: 7px; height: 7px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 14px var(--orange); }
.save-blocked span { color: #f4d0b4; font-size: 10px; font-weight: 650; white-space: nowrap; }
.save-blocked small { color: #8f7f80; font: 7px "SFMono-Regular", Consolas, monospace; letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap; }

.system-stage { grid-template-columns: 1fr; grid-template-rows: auto auto; align-content: center; gap: 44px; }
.system-copy { display: grid; max-width: none; grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.75fr); align-items: end; gap: 8px 72px; }
.system-copy .chapter-index { grid-column: 1 / -1; }
.system-copy h2 { max-width: 760px; margin-bottom: 0; font-size: clamp(48px, 5.4vw, 76px); }
.system-copy > p { max-width: 520px; margin-bottom: 5px; font-size: 15px; }
.system-map { position: relative; display: grid; width: min(100%, 1040px); min-height: 245px; grid-template-columns: minmax(150px, 1fr) minmax(120px, 1.45fr) minmax(150px, 1fr) minmax(120px, 1.45fr) minmax(150px, 1fr); align-items: center; justify-self: center; }
.system-node { position: relative; z-index: 3; display: grid; justify-items: center; gap: 11px; }
.system-node span { color: #aaa5b6; font: 10px "SFMono-Regular", Consolas, monospace; letter-spacing: 0.06em; }
.node-app img { width: clamp(100px, 9vw, 128px); border-radius: 28%; box-shadow: 0 26px 74px rgba(66, 77, 255, 0.38), 0 0 55px rgba(122, 89, 255, 0.18); }
.node-file b, .node-cron b { display: grid; width: clamp(96px, 8.5vw, 120px); height: clamp(96px, 8.5vw, 120px); place-items: center; border: 1px solid rgba(153, 137, 255, 0.28); border-radius: 30px; background: linear-gradient(145deg, rgba(46, 43, 66, 0.82), rgba(20, 20, 29, 0.68)); color: #d4cfff; font: 650 clamp(20px, 2vw, 28px) "SFMono-Regular", Consolas, monospace; box-shadow: 0 24px 68px rgba(0, 0, 0, 0.3), inset 0 1px rgba(255, 255, 255, 0.08); backdrop-filter: blur(20px); }
.node-cron b { color: #9ef2fa; font-size: clamp(32px, 3.2vw, 44px); }
.node-app { grid-column: 1; }
.path-one { grid-column: 2; }
.node-file { grid-column: 3; }
.path-two { grid-column: 4; }
.node-cron { grid-column: 5; }
.system-path { position: relative; height: 2px; overflow: hidden; background: rgba(255, 255, 255, 0.14); box-shadow: 0 0 18px rgba(54, 221, 241, 0.08); }
.system-path i { position: absolute; inset: 0; background: linear-gradient(90deg, transparent, var(--violet), var(--cyan), transparent); transform: translateX(-100%); animation: path-signal 2.5s ease-in-out infinite; }
.path-two i { animation-delay: 0.65s; }
.system-packet { position: absolute; z-index: 4; width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 22px var(--cyan); }
.packet-one { left: 26%; top: 50%; animation: packet-float 4s ease-in-out infinite; }
.packet-two { right: 26%; top: 50%; animation: packet-float 4s 1s ease-in-out infinite; }

.faq-stage { grid-template-columns: 0.72fr 1.28fr; gap: 80px; }
.faq-list { border-top: 1px solid var(--border); }
.faq-list details { border-bottom: 1px solid var(--border); }
.faq-list summary { position: relative; padding: 23px 42px 23px 0; color: #e9e6ef; list-style: none; font-size: 14px; font-weight: 630; cursor: pointer; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary span, .faq-list summary span::after { position: absolute; top: 50%; right: 3px; width: 13px; height: 1px; background: #787481; transition: transform 0.2s; }
.faq-list summary span::after { content: ""; top: 0; right: 0; transform: rotate(90deg); }
.faq-list details[open] summary span::after { transform: none; }
.faq-list details p { margin: -3px 42px 23px 0; color: var(--muted); font-size: 13px; line-height: 1.7; }

.finale-stage { place-items: center; align-content: center; text-align: center; }
.finale-stage > * { position: relative; z-index: 3; }
.final-orbit { position: absolute; z-index: 0; width: min(74vw, 760px); aspect-ratio: 1; border: 1px solid rgba(142, 121, 255, 0.12); border-radius: 50%; box-shadow: 0 0 130px rgba(80, 57, 225, 0.12), inset 0 0 100px rgba(54, 221, 241, 0.03); animation: orbit-spin 38s linear infinite; }
.final-orbit i { position: absolute; border: 1px dashed rgba(84, 212, 239, 0.12); border-radius: 50%; }
.final-orbit i:first-child { inset: 14%; }
.final-orbit i:nth-child(2) { inset: 28%; }
.final-orbit i:last-child { top: 50%; left: -4px; width: 8px; height: 8px; border: 0; background: var(--cyan); box-shadow: 0 0 20px var(--cyan); }
.final-icon { width: clamp(92px, 10vw, 126px); margin-bottom: 27px; border-radius: 26%; box-shadow: 0 28px 80px rgba(53, 68, 255, 0.35), 0 0 70px rgba(125, 87, 255, 0.22); }
.finale-stage h2 { margin: 0 0 22px; font-size: clamp(58px, 8vw, 104px); font-weight: 720; letter-spacing: -0.045em; line-height: 0.9; }
.finale-stage h2 em { background: linear-gradient(110deg, #f4f2ff, #a69aff 50%, #62e2ef); -webkit-background-clip: text; background-clip: text; color: transparent; font-style: normal; }
.finale-stage > p { max-width: 700px; margin-bottom: 0; color: #aaa6b4; font-size: 16px; }
.final-card { display: grid; width: min(100%, 580px); grid-template-columns: 1fr auto; align-items: center; gap: 18px 24px; margin-top: 38px; padding: 21px 22px; border: 1px solid rgba(140, 121, 255, 0.38); border-radius: 20px; background: linear-gradient(135deg, rgba(66, 54, 126, 0.55), rgba(20, 20, 29, 0.7)); box-shadow: 0 30px 90px rgba(0, 0, 0, 0.35), inset 0 1px rgba(255, 255, 255, 0.08); text-align: left; backdrop-filter: blur(28px) saturate(150%); }
.final-card div { display: grid; gap: 3px; }
.final-card small { color: #a79fdb; font: 8px "SFMono-Regular", Consolas, monospace; letter-spacing: 0.1em; }
.final-card strong { font-size: 27px; letter-spacing: -0.04em; }
.final-card > span { grid-column: 1 / -1; color: #777383; font-size: 9px; }
.button { display: inline-flex; min-height: 50px; align-items: center; justify-content: center; padding: 0 22px; border: 1px solid transparent; border-radius: 14px; font-size: 13px; font-weight: 680; text-decoration: none; }
.button-primary { border-color: #988cff; background: linear-gradient(180deg, #9588ff, #6757ee); color: #fff; box-shadow: 0 13px 34px rgba(82, 61, 230, 0.35), inset 0 1px rgba(255, 255, 255, 0.24); }
.button-secondary { border-color: rgba(205, 199, 255, 0.28); background: rgba(255, 255, 255, 0.055); color: #eeebff; }
.final-actions { display: flex !important; gap: 10px !important; }
.button:disabled { cursor: not-allowed; opacity: 0.68; }
.finale-stage .final-note { margin-top: 17px; color: #686573; font: 8px "SFMono-Regular", Consolas, monospace; letter-spacing: 0.08em; text-transform: uppercase; }

.site-footer { position: relative; z-index: 10; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 28px; min-height: 94px; padding: 24px max(28px, env(safe-area-inset-left)); border-top: 1px solid var(--border-soft); background: rgba(7, 7, 11, 0.7); color: #777481; backdrop-filter: blur(24px); }
.site-footer > span { font-size: 11px; }
.site-footer nav { display: flex; justify-self: end; gap: 20px; }
.site-footer nav a { color: #8d8997; text-decoration: none; font-size: 11px; }
.site-footer nav a:hover { color: var(--text); }

[data-parallax] {
  translate: 0 var(--parallax-y, 0px);
  will-change: translate;
}
:focus-visible { outline: 2px solid var(--violet-bright); outline-offset: 4px; }

@keyframes orbit-spin { to { transform: rotate(360deg); } }
@keyframes halo-pulse { 50% { opacity: 0.58; transform: scale(1.15); } }
@keyframes scroll-line { 0% { transform: translateY(-20%); } 100% { transform: translateY(280%); } }
@keyframes dot-pulse { 50% { opacity: 0.35; transform: scale(0.75); } }
@keyframes path-signal { 0%, 15% { transform: translateX(-100%); } 70%, 100% { transform: translateX(100%); } }
@keyframes packet-float { 50% { transform: translateY(-13px); opacity: 0.45; } }

@media (max-width: 940px) {
  .chapter-sticky { width: min(calc(100% - 64px), 800px); }
  .split-stage, .reverse-stage, .system-stage, .faq-stage { grid-template-columns: 1fr; align-content: center; gap: 44px; }
  .chapter-copy { max-width: 670px; }
  .chapter-copy h2 { font-size: clamp(47px, 9vw, 72px); }
  .chapter-reveal .chapter-sticky { width: min(calc(100% - 64px), 800px); }
  .floating-app { max-width: 800px; }
  .editor-universe { grid-template-columns: 1fr 1fr; }
  .mode-portal { display: none; }
  .job-showcase { width: min(100%, 520px); }
  .system-copy { grid-template-columns: 1fr; gap: 14px; }
  .system-copy .chapter-index { grid-column: auto; }
  .system-copy > p { max-width: 670px; }
  .system-map { min-height: 260px; }
  .faq-stage .chapter-copy { max-width: 520px; }
}

@media (max-width: 700px) {
  .site-header { height: 66px; padding-inline: 16px; }
  .system-badge { font-size: 8px; }
  .progress-rail { right: 10px; }
  .progress-label { display: none; }
  .progress-track { height: 24vh; }
  .chapter { min-height: 170svh; }
  .opening { min-height: 190svh; }
  .chapter-sticky { width: min(calc(100% - 38px), 620px); padding: 78px 0 40px; }
  .chapter:not(.opening):not(.finale) {
    min-height: auto;
    padding: 90px 0;
  }
  .chapter:not(.opening):not(.finale) .chapter-sticky {
    position: relative;
    min-height: auto;
    padding: 0;
    opacity: var(--presence);
    transform: translate3d(0, var(--shift), 0);
  }
  .chapter-copy h2 { font-size: clamp(42px, 13vw, 59px); }
  .chapter-copy > p { font-size: 14px; }
  .chapter-index { margin-bottom: 17px; font-size: 8px; }
  .opening-overline { top: 15vh; }
  .icon-orbit { width: min(86vw, 390px); }
  .opening-copy { margin-top: -24px; }
  .scroll-cue { bottom: 6vh; font-size: 10px; }
  .split-stage, .reverse-stage { gap: 38px; }
  .floating-app { border-radius: 15px; transform: none; }
  .micro-facts { margin-top: 22px; }
  .editor-stage { gap: 32px; }
  .editor-universe { grid-template-columns: 1fr; gap: 14px; }
  .editor-screenshot { width: min(100%, 522px); margin-inline: auto; border-radius: 18px; }
  .job-showcase { width: min(100%, 460px); }
  .conflict-system { width: 100%; min-height: 500px; grid-template-columns: 1fr; gap: 18px; }
  .conflict-orbit { inset: 7% 12%; }
  .state-card { width: min(100%, 460px); justify-self: center; padding: 21px; transform: none; }
  .comparison-gate { width: 60px; height: 60px; }
  .save-blocked { bottom: -18px; }
  .system-map { grid-template-columns: 1fr; gap: 18px; }
  .system-node, .node-app, .path-one, .node-file, .path-two, .node-cron { grid-column: 1; }
  .system-path { width: 1px; height: 28px; justify-self: center; }
  .system-path i { background: linear-gradient(transparent, var(--violet), var(--cyan), transparent); animation-name: path-signal-mobile; }
  .system-packet { display: none; }
  .system-node { gap: 6px; }
  .node-app img, .node-file b, .node-cron b { width: 78px; height: 78px; border-radius: 21px; }
  .faq-stage { gap: 30px; }
  .faq-list summary { padding: 18px 35px 18px 0; font-size: 13px; }
  .faq-list details p { margin-right: 26px; font-size: 12px; }
  .final-orbit { width: 100vw; }
  .finale-stage h2 { font-size: clamp(42px, 12.5vw, 70px); }
  .finale-stage > p { font-size: 13px; }
  .final-card { grid-template-columns: 1fr; width: 100%; padding: 20px; text-align: center; }
  .final-actions { display: grid !important; }
  .final-card .button { width: 100%; }
  .site-footer { grid-template-columns: 1fr auto; }
  .site-footer > span { display: none; }
  .site-footer nav { gap: 13px; }
  .site-footer nav a { font-size: 9px; }
  .cosmos-art { background-position: 66% 50%; background-size: cover; }
  .cosmos-stars { mask-image: none; opacity: 0.35; }
}

@keyframes path-signal-mobile { 0%, 15% { transform: translateY(-100%); } 70%, 100% { transform: translateY(100%); } }

@media (max-height: 700px) and (min-width: 701px) {
  .chapter-copy h2 { font-size: clamp(42px, 5vw, 62px); }
  .editor-stage { gap: 24px; }
  .conflict-system { min-height: 460px; }
  .opening-overline { top: 12vh; }
  .scroll-cue { bottom: 3vh; }
}

@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; }
  .cosmos-art, .cosmos-stars { transform: none !important; }
  [data-parallax] { translate: none !important; }
  .chapter-sticky { opacity: 1 !important; transform: none !important; }
  .opening-copy { opacity: 1 !important; transform: none !important; }
  .scroll-cue { opacity: 1 !important; }
}
