:root {
  --bg: #05070a;
  --bg-2: #080c0e;
  --panel: rgba(6, 12, 11, 0.78);
  --line: #16352c;
  --line-2: #245544;
  --ph: #3dffb0;
  --ph-2: #7dffcf;
  --ph-dim: #1a6b4e;
  --ph-dkr: #0c2e22;
  --amber: #e0b84a;
  --red: #ff5a5a;
  --text: #c5d4cc;
  --muted: #6a7c74;
  --font: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --zh: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --nav: 56px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: hidden; }
html, body { background: var(--bg); color: var(--text); width: 100%; max-width: 100%; }
body {
  font-family: var(--font);
  font-size: 13px;
  line-height: 1.55;
  min-height: 100vh;
  overflow-x: hidden;
}
img, video { max-width: 100%; display: block; }
button, a { font-family: inherit; }
::selection { background: var(--ph); color: #04110c; }
:focus-visible { outline: 1px solid var(--ph); outline-offset: 3px; }
.skip {
  position: absolute; left: -999px; top: 8px;
}
.skip:focus { left: 8px; z-index: 80; background: var(--bg); padding: 6px 10px; }

/* overlays */
#rain {
  position: fixed; inset: 0; z-index: 0;
  pointer-events: none; opacity: 0.28;
}
.scan, .grain, .vignette {
  position: fixed; inset: 0; pointer-events: none;
}
.scan {
  z-index: 40;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0 2px,
    rgba(0, 0, 0, 0.18) 2px 3px
  );
  mix-blend-mode: multiply;
  animation: scan-drift 9s linear infinite;
}
.grain {
  z-index: 41;
  opacity: 0.09;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='.55'/></svg>");
}
.vignette {
  z-index: 39;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(0,0,0,.72) 100%);
}
.snow {
  z-index: 42;
  opacity: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='1.2' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='.9'/></svg>");
  mix-blend-mode: overlay;
  animation: snow-shift 0.14s steps(2) infinite;
  transition: opacity 0.9s ease;
}
@keyframes snow-shift {
  from { transform: translate(0, 0); }
  to { transform: translate(-12px, 8px); }
}
body.near-molt .scan {
  background: repeating-linear-gradient(
    to bottom,
    transparent 0 1px,
    rgba(0, 0, 0, 0.34) 1px 3px
  );
}
body.near-molt .grain { opacity: 0.2; }
body.near-molt #rain { opacity: 0.48; }
body.near-molt .snow { opacity: 0.32; }
body.omega .snow { opacity: 0.16; }
body.omega .scan {
  background: repeating-linear-gradient(
    to bottom,
    transparent 0 1px,
    rgba(0, 0, 0, 0.26) 1px 3px
  );
}
body.breach::after {
  content: "";
  position: fixed; inset: 0; z-index: 80;
  background: rgba(255, 28, 28, 0.14);
  pointer-events: none;
  animation: breach-flash 0.42s ease-out;
}
@keyframes breach-flash {
  0% { opacity: 1; }
  100% { opacity: 0; }
}
@keyframes scan-drift {
  from { background-position: 0 0; }
  to { background-position: 0 120px; }
}

/* boot */
.boot {
  position: fixed; inset: 0; z-index: 60;
  background: #020304;
  display: grid; place-items: center;
  transition: opacity .7s ease, visibility .7s;
}
.boot.off { opacity: 0; visibility: hidden; pointer-events: none; }
.boot.skip { display: none; }
.boot-inner { width: min(560px, 92vw); }
.boot-mark {
  color: var(--ph);
  letter-spacing: 0.6em;
  font-weight: 600;
  margin-bottom: 18px;
  text-shadow: 0 0 18px rgba(61,255,176,.45);
}
.boot-log {
  min-height: 140px;
  color: var(--ph);
  font-size: 12px;
  line-height: 1.7;
  white-space: pre-wrap;
  text-shadow: 0 0 8px rgba(61,255,176,.25);
}
.boot-bar {
  margin-top: 18px;
  height: 4px;
  background: var(--ph-dkr);
  overflow: hidden;
}
.boot-bar i {
  display: block; height: 100%; width: 0;
  background: var(--ph);
  box-shadow: 0 0 12px var(--ph);
  transition: width .2s linear;
}
.boot-skip {
  margin-top: 16px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.18em;
  animation: blink 1.4s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* nav */
.nav {
  position: sticky; top: 0; z-index: 30;
  height: var(--nav);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 22px; gap: 16px;
  background: rgba(5,7,10,.78);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
  width: 100%;
  max-width: 100%;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  color: var(--text); text-decoration: none;
}
.brand-led {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--ph);
  box-shadow: 0 0 10px var(--ph);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: .35; } }
.brand-id { color: var(--ph); font-weight: 600; letter-spacing: 0.2em; }
.brand-name { letter-spacing: 0.28em; font-weight: 500; }
.nav-links { display: flex; gap: 22px; }
.nav-links a {
  color: var(--muted); text-decoration: none;
  letter-spacing: 0.16em; font-size: 11px;
}
.nav-links a:hover { color: var(--ph); }
.nav-end { display: flex; align-items: center; gap: 8px; }
.sys-chip {
  display: flex; align-items: center; gap: 7px;
  border: 1px solid var(--line);
  padding: 4px 8px;
  font-size: 10px; letter-spacing: 0.14em; color: var(--muted);
}
.sys-chip i {
  width: 6px; height: 6px; border-radius: 50%; background: var(--red);
  box-shadow: 0 0 8px var(--red);
}
.sys-chip.live i { background: var(--ph); box-shadow: 0 0 8px var(--ph); }
.sys-chip.sim i { background: var(--amber); box-shadow: 0 0 8px var(--amber); }
.icon-btn {
  background: transparent; color: var(--text);
  border: 1px solid var(--line);
  width: 32px; height: 32px;
  cursor: pointer;
}
.icon-btn:hover { border-color: var(--ph); color: var(--ph); }
.icon-btn[aria-pressed="false"] .waves { opacity: .25; }
.nav-toggle {
  display: none; background: none; border: 0; width: 32px; height: 32px;
  cursor: pointer; position: relative;
}
.nav-toggle span {
  position: absolute; left: 7px; right: 7px; height: 1px; background: var(--text);
}
.nav-toggle span:first-child { top: 12px; }
.nav-toggle span:last-child { top: 18px; }

/* hero */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex; flex-direction: column;
  z-index: 1;
}
.hero-media { position: absolute; inset: 0; overflow: hidden; }
.hero-vid, .hero-poster {
  width: 100%; height: 100%; object-fit: cover;
  filter: saturate(0.85) brightness(0.55);
}
.hero-poster { position: absolute; inset: 0; z-index: -1; }
.hero-veil {
  position: absolute; inset: 0;
  background:
    linear-gradient(to bottom, rgba(5,7,10,.35), rgba(5,7,10,.82)),
    radial-gradient(ellipse at 50% 45%, transparent 20%, rgba(5,7,10,.7) 80%);
}

.hud {
  position: relative;
  z-index: 2;
  flex: 1;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr) 240px;
  gap: 18px;
  padding: 22px 22px 12px;
  align-items: stretch;
}
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 16px 16px 14px;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  backdrop-filter: blur(8px);
  align-self: center;
}
.panel-h {
  color: var(--muted);
  letter-spacing: 0.22em;
  font-size: 10px;
  margin-bottom: 14px;
}
.panel dl > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px solid rgba(22,53,44,.7);
}
.panel dt { color: var(--muted); letter-spacing: 0.08em; font-size: 10px; flex: 1; }
.panel dd {
  color: var(--ph);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  flex: 0 0 auto;
}
.tele-foot, .next-note {
  margin-top: 14px;
  color: var(--amber);
  font-family: var(--zh);
  font-size: 11px;
  letter-spacing: 0.02em;
  line-height: 1.55;
}
.ecg, .spark {
  display: block;
  width: 100%;
  height: 44px;
  margin-top: 12px;
  background: #040807;
  border: 1px solid var(--ph-dkr);
}
.spark { margin-top: 8px; }
.esc-h {
  margin-top: 16px;
  color: var(--muted);
  letter-spacing: 0.22em;
  font-size: 10px;
}
.esc-bar i { background: linear-gradient(90deg, var(--ph-dim), var(--amber)); }
.op-list { display: grid; gap: 8px; }
.op {
  width: 100%;
  background: #070b0c;
  border: 1px solid var(--line);
  color: inherit;
  text-align: left;
  font-family: inherit;
  padding: 12px 16px;
  cursor: pointer;
}
.op:hover { border-color: var(--line-2); }
.op-top {
  display: flex; gap: 14px; align-items: baseline; flex-wrap: wrap;
}
.op-id { color: var(--ph); letter-spacing: 0.16em; font-size: 11px; }
.op-addr { color: var(--muted); letter-spacing: 0.08em; }
.op-state { margin-left: auto; color: var(--red); font-size: 10px; letter-spacing: 0.16em; }
.op-body { display: none; margin-top: 8px; color: var(--amber); font-size: 12px; }
.op.open .op-body { display: block; }
.op.empty { color: var(--muted); cursor: default; }
.hull-warn { color: var(--amber) !important; }
.hull-fail { color: var(--red) !important; }

.vessel-wrap {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 0;
}
.vessel {
  position: relative;
  width: min(52vmin, 440px);
  aspect-ratio: 1;
  scroll-margin-top: calc(var(--nav) + 12px);
  scroll-margin-bottom: 24px;
}
.ring { position: absolute; inset: 0; transform: rotate(-90deg); }
.ring-track, .ring-fill {
  fill: none; stroke-width: 0.7;
}
.ring-track { stroke: var(--line-2); }
.ring-fill {
  stroke: var(--ph);
  stroke-dasharray: 289;
  stroke-dashoffset: 289;
  filter: drop-shadow(0 0 4px var(--ph));
  transition: stroke-dashoffset 0.8s ease;
}
.reticle i {
  position: absolute; width: 18px; height: 18px; border-color: var(--ph); border-style: solid; opacity: .7;
}
.reticle i:nth-child(1) { top: 6%; left: 6%; border-width: 1px 0 0 1px; }
.reticle i:nth-child(2) { top: 6%; right: 6%; border-width: 1px 1px 0 0; }
.reticle i:nth-child(3) { bottom: 6%; left: 6%; border-width: 0 0 1px 1px; }
.reticle i:nth-child(4) { bottom: 6%; right: 6%; border-width: 0 1px 1px 0; }
.reticle {
  position: absolute; inset: 0;
  pointer-events: none;
  z-index: 3;
  transition: transform 0.16s linear;
}
.vessel-core {
  position: absolute; inset: 9%;
  border-radius: 50%;
  overflow: hidden;
  background: #000;
  box-shadow: 0 0 40px rgba(61,255,176,.12), inset 0 0 40px rgba(0,0,0,.6);
  transition: transform 0.16s linear;
}
.vessel-core video, .vessel-core img {
  width: 100%; height: 100%; object-fit: cover;
}
.vessel-core img { position: absolute; inset: 0; opacity: 0; transition: opacity .6s; }
.vessel-core.show-img img { opacity: 1; }
.vessel-core.show-img video { opacity: 0; }
.iris {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  pointer-events: none;
  z-index: 2;
  transition: transform 0.12s linear;
}
.iris span {
  width: 3px; height: 18%;
  background: var(--ph);
  box-shadow: 0 0 14px var(--ph), 0 0 3px #fff;
  opacity: 0;
  transition: opacity 0.6s ease;
}
.vessel.watching .iris span { opacity: 0.85; }
.vessel.watching .vessel-tag {
  color: var(--red);
  border-color: var(--red);
  animation: blink 1.4s step-end infinite;
}
.vessel.unbound .vessel-tag { color: var(--amber); border-color: var(--amber); }
.vessel.glitch .vessel-core {
  animation: rgb-split 0.45s steps(2);
}
@keyframes rgb-split {
  0%, 100% { filter: none; transform: none; }
  25% { filter: hue-rotate(20deg); transform: translate(-3px, 1px); }
  50% { filter: contrast(1.4); transform: translate(3px, -2px); }
  75% { filter: saturate(1.6); transform: translate(-1px, 2px); }
}
.vessel-tag {
  position: absolute; left: 50%; bottom: -6px;
  transform: translateX(-50%);
  font-size: 10px; letter-spacing: 0.28em;
  color: var(--ph);
  background: var(--bg);
  padding: 2px 8px;
  border: 1px solid var(--line);
}
.vessel.unstable .vessel-tag { color: var(--amber); border-color: var(--amber); }
.vessel-meta {
  text-align: center;
  margin-top: 22px;
  width: min(560px, 100%);
}
.stage-code {
  color: var(--ph); letter-spacing: 0.32em; font-size: 11px;
}
.vessel-meta h1 {
  font-size: clamp(28px, 5vw, 52px);
  font-weight: 600;
  letter-spacing: 0.22em;
  margin: 4px 0 0;
  text-shadow: 0 0 24px rgba(61,255,176,.25);
}
.stage-zh { font-family: var(--zh); color: var(--muted); margin-top: 4px; letter-spacing: 0.16em; }
.manifest {
  font-family: var(--zh);
  margin: 12px auto 0;
  color: var(--text);
  opacity: .85;
  padding: 0 8px;
  line-height: 1.7;
}
.need {
  margin-top: 14px;
  color: var(--ph);
  letter-spacing: 0.06em;
  font-size: 13px;
  text-shadow: 0 0 14px rgba(61,255,176,.35);
}
.need.warn { color: var(--amber); text-shadow: 0 0 14px rgba(224,184,74,.35); }
.need.done { color: var(--muted); text-shadow: none; }
.delta-row dt { color: var(--amber); }
.delta-row dd { color: var(--amber) !important; font-size: 14px; }

.next-code {
  color: var(--ph-2);
  font-size: 18px; font-weight: 600; letter-spacing: 0.12em;
}
.next-zh { font-family: var(--zh); color: var(--muted); margin: 2px 0 12px; }
.bar {
  margin-top: 12px; height: 6px; background: var(--ph-dkr); overflow: hidden;
}
.bar i {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--ph-dim), var(--ph));
  box-shadow: 0 0 8px var(--ph);
  transition: width .6s ease;
}

.dock {
  position: relative; z-index: 2;
  display: flex; gap: 10px; flex-wrap: wrap;
  padding: 0 22px 18px;
}
.cmd {
  display: flex; align-items: center; gap: 10px;
  flex: 1 1 320px;
  min-width: 0;
  min-height: 44px;
  padding: 0 12px;
  background: rgba(4,8,8,.72);
  border: 1px solid var(--line);
  color: var(--text);
  text-decoration: none;
}
.cmd-exec { flex: 0 0 auto; color: #04110c; background: var(--ph); border-color: var(--ph); font-weight: 600; letter-spacing: 0.08em; }
.cmd-exec:hover { filter: brightness(1.08); }
.cmd-export {
  flex: 0 0 auto;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: 0.08em;
}
.cmd-export:hover { border-color: var(--ph); color: var(--ph); }
.cmd-x {
  flex: 0 0 auto;
  letter-spacing: 0.08em;
}
.cmd-x:hover { border-color: var(--ph); color: var(--ph); }
.prompt { color: var(--ph); }
.cmd-exec .prompt { color: #04110c; }
.cmd-k { color: var(--muted); font-size: 11px; letter-spacing: 0.08em; }
#caText {
  flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--ph-2); font-size: 12px;
}
.cmd-btn {
  background: transparent; color: var(--ph);
  border: 1px solid var(--line-2);
  padding: 4px 8px; cursor: pointer; letter-spacing: 0.12em; font-size: 10px;
  flex-shrink: 0;
}
.cmd-btn:hover { background: var(--ph); color: #04110c; }

.intercept {
  position: relative;
  z-index: 2;
  margin: 0 22px 16px;
  padding: 8px 12px;
  border: 1px solid #5a2020;
  background: rgba(18, 4, 4, 0.78);
  min-height: 40px;
  color: var(--red);
  letter-spacing: 0.1em;
  font-size: 11px;
}
.intercept[hidden] { display: none; }
.intercept-k {
  display: block;
  color: #8a3030;
  font-size: 9px;
  letter-spacing: 0.22em;
  margin-bottom: 4px;
}
#interceptMsg {
  min-height: 1.4em;
  text-shadow: 0 0 10px rgba(255,90,90,.35);
}
.intercept.burn { opacity: 0; transition: opacity 0.7s ease; }

/* tape */
.tape {
  border-block: 1px solid var(--line);
  background: #070b0c;
  overflow: hidden;
  z-index: 1; position: relative;
}
.tape-track {
  display: flex; gap: 0;
  width: max-content;
  animation: marquee 48s linear infinite;
  color: var(--ph-dim);
  font-size: 11px; letter-spacing: 0.12em;
  padding: 8px 0;
  white-space: nowrap;
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* blocks */
.block {
  position: relative; z-index: 1;
  padding: 72px 22px;
  max-width: 1120px; margin: 0 auto;
  scroll-margin-top: calc(var(--nav) + 12px);
}
.block-h {
  display: flex; gap: 18px; align-items: flex-start;
  margin-bottom: 18px;
}
.idx { color: var(--ph); letter-spacing: 0.2em; font-size: 12px; padding-top: 6px; }
.eyebrow {
  color: var(--muted); letter-spacing: 0.28em; font-size: 11px;
}
.block-h h2 {
  font-family: var(--zh);
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-top: 6px;
}
.block-lead {
  font-family: var(--zh);
  max-width: 62ch;
  color: var(--muted);
  margin: 0 0 28px 48px;
}

.stages {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.card {
  position: relative;
  background: #070b0c;
  border: 1px solid var(--line);
  cursor: pointer;
  overflow: hidden;
  text-align: left;
  color: inherit;
  width: 100%;
  font-family: inherit;
}
.card:hover { border-color: var(--line-2); }
.card.active { border-color: var(--ph); box-shadow: 0 0 0 1px var(--ph) inset; }
.card .thumb {
  aspect-ratio: 1; overflow: hidden; background: #000;
}
.card img {
  width: 100%; height: 100%; object-fit: cover;
  transition: filter .4s, transform .6s;
}
.card.locked img { filter: grayscale(1) contrast(1.3) brightness(0.18) blur(7px); }
.card:not(.locked):hover img { transform: scale(1.04); }
.card .stamp {
  position: absolute; top: 10px; right: 10px;
  font-size: 9px; letter-spacing: 0.16em;
  padding: 2px 6px;
  border: 1px solid var(--line);
  background: rgba(0,0,0,.55);
  color: var(--muted);
}
.card.active .stamp { color: var(--ph); border-color: var(--ph); }
.card.locked .stamp { color: var(--red); border-color: #5a2020; }
.card .body { padding: 10px 12px 12px; }
.card .code { color: var(--ph); font-size: 10px; letter-spacing: 0.18em; }
.card h3 { font-size: 13px; letter-spacing: 0.14em; margin: 4px 0 2px; }
.card .zh { font-family: var(--zh); color: var(--muted); font-size: 12px; }
.card .cap { margin-top: 8px; color: var(--ph-2); font-size: 11px; }

.log-list { display: grid; gap: 8px; }
.log {
  width: 100%;
  background: #070b0c;
  border: 1px solid var(--line);
  color: inherit;
  text-align: left;
  font-family: inherit;
  padding: 14px 16px;
  cursor: pointer;
}
.log:hover, .log.open { border-color: var(--line-2); }
.log-top {
  display: flex; gap: 16px; align-items: baseline; flex-wrap: wrap;
}
.log-id { color: var(--ph); letter-spacing: 0.16em; font-size: 11px; }
.log-name { letter-spacing: 0.1em; }
.log-state { margin-left: auto; color: var(--muted); font-size: 10px; letter-spacing: 0.16em; }
.log.open .log-state { color: var(--ph); }
.log-body {
  display: none;
  font-family: var(--zh);
  margin-top: 10px;
  color: var(--text);
  max-width: 72ch;
}
.log.open .log-body { display: block; }
.log.locked { opacity: .78; }
.log.locked .log-state { color: var(--red); }
.log.locked .log-name { color: #2a2a2a; }
.log-main { display: block; }
.log-add, .viewer-note {
  display: block;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed #5a2020;
  color: var(--amber);
  font-size: 12.5px;
  line-height: 1.65;
}
.log-add b, .viewer-note b {
  display: block;
  color: var(--red);
  letter-spacing: 0.18em;
  font-size: 10px;
  font-weight: 600;
  margin-bottom: 6px;
}
.deny {
  display: block;
  color: var(--red);
  letter-spacing: 0.14em;
  font-size: 11px;
  margin-bottom: 8px;
}
.blk, .blk-line {
  display: inline-block;
  background: #111;
  color: #111;
  box-shadow: 0 0 0 3px #111;
  border-radius: 1px;
  user-select: none;
  pointer-events: none;
  line-height: 1.1;
  margin: 0 2px 3px 0;
}
.blk-line { display: block; width: fit-content; max-width: 100%; margin-top: 6px; }
.log.decrypt .log-body { animation: decrypt 0.7s steps(6); }
.log.file13 { border-color: #5a2020; }
.log.file13 .log-id { color: var(--red); }
.log.file13 .log-state { color: var(--red); }
@keyframes decrypt {
  0% { filter: blur(8px); opacity: .2; }
  100% { filter: none; opacity: 1; }
}
.viewer.redacted img {
  filter: grayscale(1) contrast(1.6) brightness(0.12) blur(6px);
}
.viewer-note { margin-top: 12px; }

.spec-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.spec-row {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  background: #070b0c;
}
.spec-row span { color: var(--muted); letter-spacing: 0.08em; font-size: 11px; }
.spec-row b { color: var(--ph); font-weight: 600; letter-spacing: 0.08em; }
.spec-row i { font-style: normal; font-family: var(--zh); color: var(--muted); font-size: 12px; }

.steps { list-style: none; display: grid; gap: 10px; }
.steps li {
  display: grid; grid-template-columns: 48px 1fr; gap: 14px;
  align-items: start;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.steps code { color: var(--ph); letter-spacing: 0.12em; padding-top: 2px; }
.steps b { display: block; font-family: var(--zh); font-size: 15px; }
.steps span { color: var(--muted); font-family: var(--zh); }
.access-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 18px;
  background: var(--ph); color: #04110c;
  text-decoration: none; font-weight: 600; letter-spacing: 0.12em;
  border: 1px solid var(--ph);
  cursor: pointer;
  font-family: inherit;
}
.btn:hover { filter: brightness(1.08); }
.btn-ghost { background: transparent; color: var(--ph); }
.hidden { display: none !important; }

.foot {
  position: relative; z-index: 1;
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 22px;
  border-top: 1px solid var(--line);
  color: var(--muted); font-size: 11px; letter-spacing: 0.08em;
}
.foot a { color: var(--ph); text-decoration: none; }
.foot a:hover { text-decoration: underline; }
kbd {
  border: 1px solid var(--line-2);
  padding: 0 5px; color: var(--ph);
  font-family: inherit;
}

/* term */
.term {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 55;
  height: min(42vh, 340px);
  background: rgba(2,4,4,.94);
  border-top: 1px solid var(--ph-dim);
  display: flex; flex-direction: column;
  font-size: 12px;
}
.term-bar {
  display: flex; justify-content: space-between;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--muted); letter-spacing: 0.12em;
}
.term-bar button {
  background: none; border: 0; color: var(--ph); cursor: pointer; letter-spacing: 0.12em;
}
.term-out {
  flex: 1; overflow: auto; padding: 10px 12px;
  color: var(--ph); white-space: pre-wrap; line-height: 1.6;
}
.term-in {
  display: flex; gap: 8px; align-items: center;
  padding: 8px 12px; border-top: 1px solid var(--line);
}
.term-in label { color: var(--ph); white-space: nowrap; }
.term-in input {
  flex: 1; background: transparent; border: 0; color: var(--text);
  font-family: inherit; font-size: 12px; outline: none;
}

.viewer {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(2,4,4,.86);
  display: grid; place-items: center;
  padding: 24px;
}
.viewer[hidden], .term[hidden] { display: none; }
.viewer figure {
  width: min(720px, 96vw);
  background: #070b0c;
  border: 1px solid var(--line-2);
}
.viewer img { width: 100%; max-height: 70vh; object-fit: contain; background: #000; }
.viewer figcaption { padding: 16px 18px 20px; }
.viewer-x {
  position: absolute; top: 16px; right: 18px;
  background: none; border: 0; color: var(--ph);
  font-size: 28px; cursor: pointer;
}
#viewerCode { color: var(--ph); letter-spacing: 0.2em; font-size: 11px; }
#viewerTitle { letter-spacing: 0.16em; margin: 4px 0 8px; }
#viewerBody { font-family: var(--zh); color: var(--muted); }

.molt {
  position: fixed; inset: 0; z-index: 62;
  display: grid; place-items: center;
  background: rgba(1, 3, 3, .88);
  pointer-events: none;
}
.molt[hidden] { display: none; }
.molt-scan {
  position: absolute; inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0 2px,
    rgba(61,255,176,.08) 2px 3px
  );
  mix-blend-mode: screen;
  animation: scan-drift 0.35s linear infinite;
}
.molt-inner { position: relative; text-align: center; padding: 24px; }
.molt-k {
  color: var(--amber);
  letter-spacing: 0.32em;
  font-size: 11px;
  margin-bottom: 14px;
}
.molt-line {
  font-size: clamp(28px, 6vw, 58px);
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--ph);
  text-shadow: 0 0 28px rgba(61,255,176,.55), 3px 0 #f3f, -3px 0 #0ff;
  animation: rgb-split 0.28s steps(2) infinite;
}
.molt-stage {
  margin-top: 16px;
  font-size: clamp(16px, 3vw, 22px);
  letter-spacing: 0.22em;
  color: var(--ph-2);
}
.molt-tag {
  margin-top: 8px;
  color: var(--muted);
  letter-spacing: 0.2em;
}
.molt.on .molt-inner { animation: molt-pop 1.4s ease-out; }
@keyframes molt-pop {
  0% { opacity: 0; transform: scale(1.08) translateY(8px); }
  12% { opacity: 1; transform: none; }
  80% { opacity: 1; }
  100% { opacity: 0; }
}

.toast {
  position: fixed; bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--ph); color: #04110c;
  padding: 8px 14px; letter-spacing: 0.12em; font-size: 11px;
  opacity: 0; pointer-events: none; z-index: 70;
  transition: .25s ease;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 980px) {
  .hud {
    grid-template-columns: 1fr;
    grid-template-areas: "vessel" "next" "tele";
    padding-top: 16px;
  }
  .vessel-wrap { grid-area: vessel; }
  .next { grid-area: next; }
  .tele { grid-area: tele; }
  .panel { align-self: stretch; }
  .vessel { width: min(72vw, 340px); }
  .stages { grid-template-columns: 1fr 1fr; }
  .spec-grid { grid-template-columns: 1fr; }
  .nav-links {
    display: none; position: absolute; top: var(--nav); left: 0; right: 0;
    background: rgba(5,7,10,.96); border-bottom: 1px solid var(--line);
    flex-direction: column; padding: 12px 22px 16px; gap: 12px;
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  .block-lead { margin-left: 0; }
  .sys-chip { display: none; }
  .dock { flex-direction: column; }
  .cmd { flex: 1 1 auto; }
  .cmd-k { display: none; }
  .cmd-exec { flex: 1 1 auto; justify-content: center; }
  .panel { clip-path: none; }
  .panel dl > div { display: block; }
  .panel dd { display: block; margin-top: 3px; font-size: 14px; }
  .intercept { margin-left: 14px; margin-right: 14px; }
}
@media (max-width: 560px) {
  .nav { padding: 0 12px; }
  .hud, .dock, .block, .foot { padding-left: 14px; padding-right: 14px; }
  .brand-name { display: none; }
  .spec-row { grid-template-columns: 1fr; gap: 4px; }
  .foot { flex-direction: column; }
  .vessel-meta h1 { font-size: 32px; letter-spacing: 0.14em; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .tape-track { animation: none; }
  .scan { animation: none; }
  .snow { animation: none; }
  .reticle, .vessel-core, .iris { transition: none; }
}
