@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("assets/fonts/archivo-latin.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/plex-mono-400.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("assets/fonts/plex-mono-500.woff2") format("woff2");
}

:root {
  --bg: #03060b;
  --ink: #e8eef5;
  --muted: #b0bdcc;
  --faint: #8598ab;
  --dim: #53677a;
  --cyan: #78d0f3;
  --cyan-soft: rgba(120, 208, 243, .15);
  --gold: #dfbc80;
  --line: rgba(150, 185, 214, .14);
  --line-strong: rgba(150, 185, 214, .27);
  --sans: "Archivo", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  --header-h: 58px;
  --side: clamp(24px, 4.8vw, 72px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--bg); color: var(--ink); }
html { scroll-behavior: auto; }
body {
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
button:focus-visible, a:focus-visible { outline: 1px solid var(--cyan); outline-offset: 5px; }

#bg-canvas, #net-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100svh;
  display: block;
  pointer-events: none;
}
#bg-canvas { z-index: 0; opacity: .64; }
#net-canvas { z-index: 2; }
.veil {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 72% 48%, transparent 0%, rgba(3,6,11,.04) 45%, rgba(3,6,11,.66) 100%),
    linear-gradient(90deg, rgba(3,6,11,.82) 0%, rgba(3,6,11,.38) 35%, transparent 62%),
    linear-gradient(0deg, rgba(3,6,11,.67) 0%, transparent 26%);
}
.topbar {
  position: fixed;
  z-index: 50;
  inset: 0 0 auto 0;
  height: var(--header-h);
  display: flex;
  align-items: center;
  padding: 0 var(--side);
  border-bottom: 1px solid var(--line);
  background: rgba(3,6,11,.54);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -.02em;
}
.brand-icon {
  width: 24px;
  height: 24px;
  border-radius: 5px;
  filter: drop-shadow(0 0 10px rgba(109,255,184,.16));
}
.brand-mark {
  position: relative;
  width: 22px;
  height: 22px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
}
.brand-mark::before, .brand-mark::after {
  content: "";
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 7px rgba(120,208,243,.8);
}
.brand-mark::before { left: 5px; top: 5px; }
.brand-mark::after { right: 3px; bottom: 4px; width: 2px; height: 2px; }
.topnav { display: flex; align-items: center; gap: 25px; margin-left: auto; }
.header-actions { display: flex; align-items: center; gap: 9px; margin-left: 22px; }
.top-github {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--ink);
  font-size: 11px;
  background: rgba(232,238,245,.025);
  white-space: nowrap;
}
.top-github span {
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 12px;
  transition: transform .2s ease;
}
.top-github:hover { background: rgba(232,238,245,.08); }
.top-github:hover span { transform: translate(2px, -2px); }
.lang-toggle {
  height: 30px;
  min-width: 38px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
  color: var(--faint);
  font-family: var(--sans);
  font-size: 10px;
  cursor: pointer;
}
.lang-toggle:hover { color: var(--ink); border-color: var(--line-strong); }
.nav-link {
  position: relative;
  border: 0;
  background: transparent;
  color: var(--faint);
  font-size: 12px;
  padding: 6px 0;
  cursor: pointer;
  transition: color .2s ease;
}
.nav-link:hover, .nav-link.active { color: var(--ink); }
.nav-link.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2px;
  height: 1px;
  background: var(--cyan);
  box-shadow: 0 0 7px rgba(120,208,243,.5);
}
.top-download {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 24px;
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--ink);
  font-size: 11px;
  background: rgba(232,238,245,.025);
}
.top-download::after { content: "↘"; color: var(--cyan); font-family: var(--mono); }
.top-download:hover { background: rgba(232,238,245,.08); }

.story { position: relative; z-index: 10; }
.page {
  position: absolute;
  inset: 0;
  height: 100svh;
  min-height: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.page.active {
  opacity: 1;
  visibility: visible;
  pointer-events: none;
}
.page-inner {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: calc(var(--header-h) + 32px) var(--side) 70px;
  display: flex;
  align-items: center;
}
.page-copy {
  position: relative;
  z-index: 5;
  width: min(500px, 34.5vw);
  max-width: 500px;
  pointer-events: auto;
}
.page-hero .page-copy { width: min(500px, 34.5vw); }
.page-copy .eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 27px;
  color: var(--faint);
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .035em;
  line-height: 1.5;
}
.page-copy .eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--cyan);
  box-shadow: 0 0 8px rgba(120,208,243,.35);
}
h1, h2 {
  font-weight: 590;
  letter-spacing: -.045em;
  font-feature-settings: "palt";
  text-wrap: balance;
}
h1 {
  font-size: clamp(52px, 6.1vw, 88px);
  line-height: 1;
}
h2 {
  font-size: clamp(38px, 4.2vw, 60px);
  line-height: 1.06;
}
html[lang="zh-CN"] h1 { font-size: clamp(48px, 5.6vw, 76px); letter-spacing: -.025em; line-height: 1.04; }
html[lang="zh-CN"] h2, html[lang="zh-CN"] .page-start h2 { font-size: clamp(36px, 4vw, 56px); letter-spacing: -.02em; line-height: 1.1; }
html[lang="en-US"] h1 { font-size: clamp(42px, 4.7vw, 62px); letter-spacing: -.055em; line-height: 1.02; }
html[lang="en-US"] h2, html[lang="en-US"] .page-start h2 { font-size: clamp(32px, 3.5vw, 48px); letter-spacing: -.045em; line-height: 1.08; }
html[lang="en-US"] .lead { line-height: 1.75; }
.page-subtitle {
  margin-top: 7px;
  color: #a8b8c8;
  font-family: var(--sans);
  font-size: clamp(24px, 2.7vw, 34px);
  font-weight: 430;
  line-height: 1.22;
  letter-spacing: -.012em;
  text-wrap: balance;
}
.page-hero .page-subtitle {
  font-size: clamp(30px, 3.7vw, 46px);
  line-height: 1.18;
}
html[lang="en-US"] .page-subtitle { font-size: clamp(22px, 2.4vw, 30px); letter-spacing: -.02em; }
html[lang="en-US"] .page-hero .page-subtitle { font-size: clamp(28px, 3.2vw, 36px); }
.page-subtitle + .lead { margin-top: 20px; }
.title-line {
  display: block;
  will-change: filter, opacity, clip-path;
}
.title-scan {
  position: absolute;
  z-index: 6;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(120,208,243,.9) 18%, rgba(120,208,243,.9) 82%, transparent);
  box-shadow: 0 0 9px rgba(120,208,243,.6);
  opacity: 0;
  pointer-events: none;
}
.lead {
  max-width: 530px;
  margin-top: 26px;
  color: #94a6b8;
  font-size: 16.5px;
  line-height: 1.8;
}
.lead strong { color: var(--ink); font-weight: 520; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 22px; margin-top: 33px; }
.btn-main {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 17px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #071019;
  font-size: 12px;
  font-weight: 620;
  cursor: pointer;
}
.btn-main::after { content: "↘"; font-family: var(--mono); font-weight: 400; }
.btn-main:hover { background: #fff; border-color: #fff; }
.btn-quiet {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 10px 0;
  font-size: 12px;
  cursor: pointer;
}
.btn-quiet::after { content: ""; width: 34px; height: 1px; background: var(--faint); transition: width .2s ease; }
.btn-quiet:hover { color: var(--ink); }
.btn-quiet:hover::after { width: 48px; background: var(--cyan); }
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 9px 19px;
  margin-top: 30px;
  color: var(--faint);
  font-family: var(--sans);
  font-size: 10.5px;
  letter-spacing: .02em;
}
.hero-meta span { display: inline-flex; align-items: center; gap: 7px; }
.hero-meta span::before { content: ""; width: 3px; height: 3px; border-radius: 50%; background: var(--cyan); }
.scroll-cue {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 49px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .08em;
}
.scroll-cue::after { content: ""; width: 1px; height: 32px; background: linear-gradient(var(--faint), transparent); opacity: .6; }

/* domain selector */
.domain-controls { margin-top: 33px; width: min(455px, 100%); }
.control-label {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 9px;
  color: var(--faint);
  font-family: var(--sans);
  font-size: 10.5px;
  letter-spacing: .025em;
}
.control-label b { color: var(--cyan); font-weight: 500; }
.domain-switch { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line-strong); }
.domain-button {
  min-height: 41px;
  border: 0;
  border-right: 1px solid var(--line);
  background: rgba(3,8,14,.54);
  color: var(--faint);
  font-family: var(--sans);
  font-size: 11px;
  cursor: pointer;
}
.domain-button:last-child { border-right: 0; }
.domain-button:hover { color: var(--ink); background: rgba(120,208,243,.055); }
.domain-button[aria-pressed="true"] { background: var(--ink); color: #071019; }
.domain-readout {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding-top: 10px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 9px;
  line-height: 1.6;
}
.domain-readout b { color: var(--muted); font-weight: 400; }
.memory-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 9px;
  white-space: nowrap;
}
.memory-chip::before { content: "◆"; font-size: 7px; }

/* task */
.task-panel { width: min(460px, 100%); margin-top: 31px; border-top: 1px solid var(--line-strong); }
.task-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  color: var(--faint);
  font-family: var(--mono);
  font-size: 9px;
}
.task-panel-head b { color: var(--gold); font-weight: 400; }
.task-step {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  gap: 10px;
  align-items: center;
  min-height: 43px;
  border-bottom: 1px solid var(--line);
  color: var(--faint);
  font-size: 11px;
}
.task-step .mark { font-family: var(--mono); font-size: 9px; }
.task-step .state { font-family: var(--mono); font-size: 9px; text-align: right; }
.task-step.done { color: var(--muted); }
.task-step.done .mark { color: var(--gold); }
.task-step.running { color: var(--ink); }
.task-step.running .state { color: var(--gold); }
.task-button-row { display: flex; align-items: center; gap: 15px; margin-top: 16px; }
.task-button-row button {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 37px;
  padding: 0 13px;
  border: 1px solid rgba(223,188,128,.4);
  background: rgba(223,188,128,.055);
  color: var(--ink);
  font-size: 10px;
  cursor: pointer;
}
.task-button-row button::after { content: "→"; color: var(--gold); }
.task-button-row button:disabled { opacity: .45; cursor: wait; }
.task-button-row span { color: var(--dim); font-family: var(--mono); font-size: 8px; }
.task-log { min-height: 17px; margin-top: 10px; color: var(--faint); font-family: var(--mono); font-size: 8px; line-height: 1.7; }

/* security */
.tier-scale { display: grid; grid-template-columns: repeat(3, 1fr); width: min(470px, 100%); margin-top: 31px; border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line); }
.tier { min-height: 80px; padding: 12px 13px 12px 0; border-right: 1px solid var(--line); }
.tier:not(:first-child) { padding-left: 13px; }
.tier:last-child { border-right: 0; }
.tier .name { color: var(--cyan); font-family: var(--mono); font-size: 9px; }
.tier .cn { display: block; margin-top: 7px; color: var(--muted); font-size: 11px; }
.tier p { margin-top: 5px; color: var(--faint); font-size: 9px; line-height: 1.6; }
.boundary-note { display: flex; gap: 12px; margin-top: 16px; color: var(--muted); font-size: 10px; line-height: 1.7; }
.boundary-note::before { content: "!"; color: var(--gold); font-family: var(--mono); }
.text-link { color: var(--muted); border-bottom: 1px solid var(--line-strong); }

/* start */
.surface-links { display: grid; grid-template-columns: repeat(2, 1fr); width: 100%; margin-top: 34px; border-top: 1px solid var(--line); }
.surface-links a { min-height: 64px; padding: 12px 12px 12px 0; border-right: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.surface-links a:nth-child(2n) { border-right: 0; padding-left: 12px; }
.surface-links a:nth-child(3), .surface-links a:nth-child(4) { border-top: 1px solid var(--line); }
.surface-links a:nth-child(3) { padding-left: 0; }
.surface-links a span { display: block; margin-top: 7px; color: var(--faint); font-family: var(--mono); font-size: 8px; }
.surface-links a:hover { color: var(--ink); }
.future-note { width: min(560px, 100%); margin-top: 20px; color: var(--faint); font-size: 10px; line-height: 1.8; }
.footer-line { display: flex; flex-wrap: wrap; gap: 10px 21px; margin-top: 40px; color: var(--dim); font-family: var(--mono); font-size: 8px; }
.footer-line a { color: var(--faint); }

/* console shell */
.console-shell {
  position: fixed;
  z-index: 20;
  top: calc(var(--header-h) + 34px);
  left: calc(var(--side) + (100vw - 2 * var(--side)) * .382 + 22px);
  right: var(--side);
  height: calc(100svh - var(--header-h) - 104px);
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(150,185,214,.28);
  background: rgba(3,8,14,.28);
  box-shadow: 0 30px 90px rgba(0,0,0,.28);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.console-shell.visible { opacity: 1; visibility: visible; pointer-events: auto; }
.console-shell::before {
  content: "";
  position: absolute;
  inset: -1px;
  border: 1px solid rgba(120,208,243,.07);
  pointer-events: none;
}
.console-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 39px;
  padding: 0 13px;
  border-bottom: 1px solid var(--line);
  color: var(--faint);
  font-family: var(--mono);
  font-size: 8px;
}
.console-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.console-bar strong { color: var(--ink); font-family: var(--sans); font-size: 11px; font-weight: 550; }
.console-bar .local { color: var(--faint); }
.console-bar .live { margin-left: auto; color: var(--cyan); }
.console-tabs { display: flex; border-bottom: 1px solid var(--line); }
.console-tab {
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  padding: 9px 12px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 8px;
  cursor: pointer;
}
.console-tab[aria-pressed="true"] { color: var(--cyan); background: rgba(120,208,243,.045); }
.console-body { position: relative; flex: 1; pointer-events: none; }
.console-legend { position: absolute; left: 13px; right: 13px; bottom: 11px; display: flex; justify-content: space-between; gap: 18px; color: var(--faint); font-family: var(--mono); font-size: 7px; line-height: 1.6; }
.console-legend span:last-child { text-align: right; }
.page-product .page-copy { width: min(500px, 34.5vw); }
.page-start .page-copy { width: min(500px, 34.5vw); }

/* status + hints */
.page-index {
  position: fixed;
  z-index: 30;
  left: var(--side);
  bottom: 19px;
  color: var(--faint);
  font-family: var(--sans);
  font-size: 9.5px;
  letter-spacing: .025em;
}
.page-hint {
  position: fixed;
  z-index: 30;
  right: var(--side);
  bottom: 19px;
  color: var(--dim);
  font-family: var(--sans);
  font-size: 9.5px;
  letter-spacing: .025em;
}
.page-hint.hidden { opacity: 0; }

@media (max-width: 1100px) {
  .topnav { gap: 17px; }
  h1 { font-size: clamp(48px, 6vw, 82px); }
  h2 { font-size: clamp(36px, 4.2vw, 56px); }
}

@media (max-height: 780px) and (min-width: 781px) {
  :root { --header-h: 54px; }
  .page-inner { padding-top: calc(var(--header-h) + 20px); padding-bottom: 52px; }
  h1 { font-size: clamp(48px, 5.5vw, 74px); }
  h2 { font-size: clamp(34px, 3.7vw, 50px); }
  .lead { margin-top: 17px; font-size: 15px; line-height: 1.7; }
  .actions { margin-top: 21px; }
  .hero-meta { margin-top: 18px; }
  .scroll-cue { margin-top: 25px; }
  .domain-controls, .task-panel, .tier-scale { margin-top: 19px; }
  .task-step { min-height: 37px; }
  .console-shell { top: calc(var(--header-h) + 20px); height: calc(100svh - var(--header-h) - 70px); }
}

@media (max-width: 780px) {
  :root { --header-h: 54px; --side: 20px; }
  html, body { overflow-y: auto; overflow-x: hidden; }
  body { height: auto; }
  .topbar { padding: 0 20px; }
  .topnav { display: none; }
  .header-actions { margin-left: auto; gap: 7px; }
  .top-github { min-height: 30px; padding: 0 8px; font-size: 10px; }
  .lang-toggle { height: 30px; min-width: 36px; padding: 0 6px; font-size: 9.5px; }
  .page {
    position: relative;
    inset: auto;
    height: auto;
    min-height: 100svh;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    border-top: 1px solid var(--line);
    scroll-snap-align: start;
  }
  .page:first-child { border-top: 0; }
  .page-inner {
    min-height: 100svh;
    height: auto;
    padding: calc(var(--header-h) + 30px) 20px 86px;
    align-items: flex-end;
  }
  .page-copy, .page-hero .page-copy, .page-product .page-copy, .page-start .page-copy { width: 100%; max-width: 560px; margin: 0 auto; }
  h1 { font-size: clamp(45px, 12vw, 72px); }
  h2, .page-start h2 { font-size: clamp(36px, 9.4vw, 55px); }
  .page-subtitle { font-size: clamp(24px, 7vw, 32px); }
  .page-hero .page-subtitle { font-size: clamp(28px, 8.2vw, 38px); }
  .lead { margin-top: 18px; font-size: 14px; line-height: 1.75; }
  .eyebrow { margin-bottom: 18px; }
  .actions { margin-top: 22px; gap: 16px; }
  .scroll-cue { margin-top: 29px; }
  .hero-meta { margin-top: 20px; }
  .domain-controls, .task-panel, .tier-scale { margin-top: 22px; }
  .domain-button { min-height: 39px; font-size: 8px; }
  .domain-readout { font-size: 8px; }
  .task-step { min-height: 39px; font-size: 10px; }
  .task-button-row { flex-wrap: wrap; }
  .tier-scale { grid-template-columns: 1fr; }
  .tier, .tier:not(:first-child) { min-height: 0; padding: 10px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .tier:last-child { border-bottom: 0; }
  .tier .cn { display: inline; margin-left: 8px; }
  .tier p { display: inline; margin-left: 8px; }
  .surface-links { grid-template-columns: 1fr 1fr; margin-top: 28px; }
  .surface-links a:nth-child(2) { border-right: 0; }
  .surface-links a:nth-child(3) { border-top: 1px solid var(--line); padding-left: 0; }
  .surface-links a:nth-child(4) { border-top: 1px solid var(--line); }
  .future-note { margin-top: 18px; font-size: 9px; }
  .footer-line { margin-top: 28px; line-height: 1.8; }
  .console-shell {
    top: calc(var(--header-h) + 14px);
    left: 20px;
    right: 20px;
    width: auto;
    height: 31svh;
    background: rgba(3,8,14,.38);
  }
  .console-bar { height: 32px; font-size: 7px; }
  .console-bar .local { display: none; }
  .console-tabs { border-bottom: 1px solid var(--line); }
  .console-tab { padding: 7px 9px; font-size: 7px; }
  .console-legend { display: none; }
  .page-index { display: none; }
  .page-hint { display: none; }
  .veil {
    background:
      linear-gradient(0deg, rgba(3,6,11,.98) 0%, rgba(3,6,11,.86) 33%, rgba(3,6,11,.24) 64%, transparent 100%),
      radial-gradient(circle at 58% 28%, transparent, rgba(3,6,11,.4) 72%);
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
