/* ============ tokens ============ */
:root {
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --wrap: 1160px;
}
html[data-theme="dark"] {
  --bg: #0B0C08;
  --panel: rgba(240, 243, 230, .028);
  --panel-solid: #12140D;
  --text: #E9ECDF;
  --muted: rgba(233, 236, 223, .52);
  --faint: rgba(233, 236, 223, .30);
  --line: rgba(233, 236, 223, .105);
  --accent: #A8CC45;
  --accent-ink: #0B0C08;
  --glow: rgba(168, 204, 69, .14);
  color-scheme: dark;
}
html[data-theme="light"] {
  --bg: #F4F4EC;
  --panel: rgba(25, 27, 20, .028);
  --panel-solid: #FCFCF7;
  --text: #1B1D14;
  --muted: rgba(27, 29, 20, .56);
  --faint: rgba(27, 29, 20, .34);
  --line: rgba(27, 29, 20, .12);
  --accent: #66821B;
  --accent-ink: #F7F8F0;
  --glow: rgba(111, 140, 25, .10);
  color-scheme: light;
}
/* ============ base ============ */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: auto; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  font-size: 14.5px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background .5s ease, color .5s ease;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--accent); color: var(--accent-ink); }
[data-zh], [data-en] { display: none; }
html[lang="en"] [data-en], html[lang="zh-CN"] [data-zh] { display: contents; }

/* custom cursor */
@media (pointer: fine) {
  .cur-dot, .cur-ring { position: fixed; z-index: 9999; pointer-events: none; border-radius: 50%; top: 0; left: 0; }
  .cur-dot { width: 5px; height: 5px; background: var(--accent); transform: translate(-50%, -50%); }
  .cur-ring {
    width: 30px; height: 30px;
    border: 1px solid color-mix(in srgb, var(--text) 30%, transparent);
    transform: translate(-50%, -50%);
    transition: width .25s var(--ease), height .25s var(--ease), border-color .25s ease, opacity .25s ease;
  }
  body.cur-on-link .cur-ring { width: 46px; height: 46px; border-color: color-mix(in srgb, var(--accent) 65%, transparent); }
}
/* background layers */
#fluid { position: fixed; inset: 0; z-index: 0; width: 100%; height: 100%; pointer-events: none; }
#trail { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.grain {
  position: fixed; inset: -50%; z-index: 1; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  opacity: .05;
  animation: grain 9s steps(6) infinite;
}
@keyframes grain {
  0%,100% { transform: translate(0,0); } 20% { transform: translate(-3%,2%); }
  40% { transform: translate(2%,-3%); } 60% { transform: translate(-2%,-2%); } 80% { transform: translate(3%,3%); }
}
.page { position: relative; z-index: 2; }
.wrap { width: min(calc(100% - 48px), var(--wrap)); margin: 0 auto; }

/* mono microlabel */
.tag {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--faint);
}
.tag b { color: var(--accent); font-weight: 500; margin-right: 10px; }

/* reveal */
.rv { opacity: 0; transform: translateY(14px); transition: opacity .55s var(--ease), transform .55s var(--ease); transition-delay: 0s; }
.rv.in { opacity: 1; transform: none; transition-duration: .7s, .7s; transition-delay: var(--d, 0s); }
@media (prefers-reduced-motion: reduce) {
  .rv { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
  .grain { animation: none; }
}

/* ============ nav ============ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  transition: transform .45s var(--ease);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--bg) 62%, transparent);
  border-bottom: 1px solid var(--line);
}
.nav-in { display: flex; align-items: center; gap: 22px; height: 58px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 13.5px; letter-spacing: -.01em; }
.brand svg { display: block; }
.nav-links { display: flex; gap: 21px; margin-left: auto; }
.nav-links a {
  position: relative;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted);
  padding: 4px 0;
  transition: color .25s ease;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 1px; width: 100%;
  background: var(--accent);
  transform: scaleX(0); transform-origin: right;
  transition: transform .35s var(--ease);
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav-ctl { display: flex; align-items: center; gap: 6px; }
.ictl {
  display: grid; place-items: center;
  width: 32px; height: 32px;
  border: 1px solid var(--line); border-radius: 8px;
  color: var(--muted);
  font-family: var(--mono); font-size: 10.5px;
  transition: color .25s ease, border-color .25s ease, background .25s ease;
}
.ictl:hover { color: var(--text); border-color: color-mix(in srgb, var(--text) 30%, transparent); }
.nav-cta {
  font-size: 12px; font-weight: 600;
  background: var(--accent); color: var(--accent-ink);
  border-radius: 999px; padding: 8px 18px;
  transition: transform .25s var(--ease), box-shadow .25s ease;
  will-change: transform;
}
.nav-cta:hover { box-shadow: 0 6px 22px var(--glow); }
@media (max-width: 860px) { .nav-links { display: none; } }

/* ============ hero ============ */
.hero { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; position: relative; }
.hero-core { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 22px; padding-top: 40px; }
.hero-status {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line); border-radius: 999px; padding: 7px 16px;
  background: color-mix(in srgb, var(--bg) 40%, transparent);
}
.hero-status i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: pulse 2.4s ease infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 var(--glow); } 50% { box-shadow: 0 0 0 6px transparent; } }
.hero h1 {
  font-size: clamp(22px, 3vw, 34px);
  font-weight: 550;
  letter-spacing: -.015em;
  line-height: 1.28;
  max-width: 21ch;
  text-wrap: balance;
}
.hero h1 em { font-style: normal; color: var(--accent); }
.hero-sub { color: var(--muted); max-width: 52ch; font-size: 14px; }
.hero-cta { display: flex; gap: 12px; margin-top: 6px; }
.btn {
  position: relative;
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 12.5px; font-weight: 600;
  border-radius: 999px; padding: 11px 24px;
  transition: transform .3s var(--ease), box-shadow .3s ease, border-color .3s ease, color .3s ease;
  will-change: transform;
}
.btn .ar { transition: transform .3s var(--ease); font-weight: 400; }
.btn:hover .ar { transform: translateX(3px); }
.btn-solid { background: var(--accent); color: var(--accent-ink); }
.btn-solid:hover { box-shadow: 0 10px 30px var(--glow); }
.btn-ghost { border: 1px solid var(--line); color: var(--text); background: color-mix(in srgb, var(--bg) 30%, transparent); }
.btn-ghost:hover { border-color: color-mix(in srgb, var(--text) 32%, transparent); }
.hero-foot {
  position: absolute; left: 0; right: 0; bottom: 0;
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 46%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.hero-foot-in {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 13px 0;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--faint);
}
.hero-foot-in span b { color: var(--muted); font-weight: 500; }
.scroll-cue { display: inline-flex; align-items: center; gap: 8px; }
.scroll-cue i { display: inline-block; font-style: normal; color: var(--accent); animation: bob 1.8s var(--ease) infinite; }
@keyframes bob { 0%,100% { transform: translateY(-1px); } 50% { transform: translateY(3px); } }
@media (max-width: 760px) { .hero-foot-in span:nth-child(2) { display: none; } }

/* ============ sections ============ */
.sec { position: relative; padding: clamp(90px, 10vw, 150px) 0; border-top: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 55%, transparent); }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: clamp(40px, 5vw, 64px); }
.sec-head h2 { font-size: clamp(18px, 2vw, 24px); font-weight: 600; letter-spacing: -.01em; }
.sec-head p { color: var(--muted); font-size: 13.5px; max-width: 46ch; }

/* ---- loop scrub ---- */
.loop-zone { height: 340vh; position: relative; }
.loop-pin { position: sticky; top: 0; min-height: 100vh; display: flex; align-items: center; padding: 76px 0 30px; }
.loop-grid { display: grid; grid-template-columns: minmax(240px, 300px) minmax(0, 780px); justify-content: center; gap: clamp(24px, 3vw, 44px); width: 100%; align-items: center; }
.loop-rail { display: flex; flex-direction: column; gap: 4px; }
.loop-step {
  position: relative;
  display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: baseline;
  padding: 11px 12px; border-radius: 10px;
  text-align: left;
  opacity: .5;
  transition: background .3s ease, opacity .35s ease;
}
.loop-step::before {
  content: "";
  position: absolute;
  left: 0; top: 10px; bottom: 10px;
  width: 2px;
  border-radius: 2px;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform .4s var(--ease);
}
.loop-step.on { opacity: 1; background: var(--panel); }
.loop-step.on::before { transform: scaleY(1); }
.loop-step:hover { background: var(--panel); opacity: .85; }
.loop-step.on:hover { opacity: 1; }
.loop-step .n { font-family: var(--mono); font-size: 10.5px; color: var(--faint); transition: color .3s ease; }
.loop-step .t { font-size: 13.5px; font-weight: 600; color: var(--muted); transition: color .3s ease; letter-spacing: -.005em; }
.loop-step .c { grid-column: 2; font-size: 12px; line-height: 1.6; color: var(--muted); max-height: 0; overflow: hidden; opacity: 0; transition: max-height .5s var(--ease), opacity .45s ease, margin .5s var(--ease); }
.loop-step.on .n { color: var(--accent); }
.loop-step.on .t { color: var(--text); }
.loop-step.on .c { max-height: 80px; opacity: 1; margin-top: 4px; }
.loop-meter { position: relative; height: 1px; background: var(--line); margin: 18px 12px 0; }
.loop-meter i { position: absolute; inset: 0; background: var(--accent); transform-origin: left; transform: scaleX(var(--p, 0)); }
.loop-hint { margin: 16px 12px 0; font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); transition: opacity .4s ease; }
.loop-grid.done .loop-hint { opacity: 0; }

/* browser frame */
.frame {
  position: relative;
  max-width: 780px;
  margin: 0;
  width: 100%;
  border: 1px solid var(--line); border-radius: 14px;
  background: var(--panel-solid);
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,.25);
}
.frame.kick { animation: kick .55s var(--ease); }
@keyframes kick {
  0% { box-shadow: 0 0 0 0 var(--glow), 0 30px 80px rgba(0,0,0,.25); border-color: var(--accent); }
  60% { box-shadow: 0 0 0 16px transparent, 0 30px 80px rgba(0,0,0,.25); border-color: var(--accent); }
  100% { box-shadow: 0 0 0 0 transparent, 0 30px 80px rgba(0,0,0,.25); }
}
.frame-step {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .1em;
  color: var(--accent);
  white-space: nowrap;
  transition: opacity .2s ease, transform .2s ease;
}
.frame-step.swap { opacity: 0; transform: translateY(5px); }
@media (prefers-reduced-motion: reduce) { .frame.kick { animation: none; } }
.frame-bar {
  display: flex; align-items: center; gap: 14px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .04em; color: var(--muted);
}
.frame-bar .dots { display: flex; gap: 5px; }
.frame-bar .dots i { width: 7px; height: 7px; border-radius: 50%; background: color-mix(in srgb, var(--text) 14%, transparent); }
.frame-bar .url { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: color .3s ease; }
.frame[data-k="0"] .url { color: var(--accent); }
.frame-live { position: relative; height: clamp(360px, 52vh, 500px); overflow: hidden; background: #0a0a0b; }
.shot-wrap { position: absolute; top: 0; left: 0; width: 100%; aspect-ratio: 1440 / 900; }
.frame-live .shot { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; pointer-events: none; }
.shot-skel { position: absolute; inset: 0; padding: 56px 36px; display: flex; flex-direction: column; gap: 16px; }
.shot-skel i { height: 11px; border-radius: 4px; background: rgba(255,255,255,.06); }
.shot-skel .w1 { width: 42%; height: 24px; }
.shot-skel .w2 { width: 84%; }
.shot-skel .w3 { width: 66%; }
.frame-live::after { content: ""; position: absolute; inset: 0; background: transparent; transition: background .4s ease; pointer-events: none; }
.frame[data-k="2"] .frame-live::after, .frame[data-k="4"] .frame-live::after { background: color-mix(in srgb, var(--bg) 42%, transparent); }
/* extension-faithful overlays */
.sel { position: absolute; z-index: 3; left: 2.6%; top: 32.8%; width: 63%; height: 16.8%;
  border: 1.5px solid #93B23C; border-radius: 7px; background: rgba(147,178,60,.05);
  box-shadow: 0 0 0 1px rgba(0,0,0,.22), 0 0 0 5px rgba(147,178,60,.13);
  opacity: 0; transition: opacity .45s ease; pointer-events: none; }
.sel b { position: absolute; width: 7px; height: 7px; border-radius: 99px; background: #93B23C; box-shadow: 0 0 0 2px var(--panel-solid), 0 3px 9px rgba(0,0,0,.3); }
.sel .tl { left: -4px; top: -4px; } .sel .tr { right: -4px; top: -4px; }
.sel .bl { left: -4px; bottom: -4px; } .sel .br { right: -4px; bottom: -4px; }
.sel i {
  position: absolute; left: -1px; top: -25px; height: 19px;
  display: inline-flex; align-items: center;
  font-style: normal; font-size: 10.5px; font-weight: 700;
  color: rgba(255,255,250,.96); background: rgba(20,20,19,.92);
  border: 1px solid rgba(255,255,250,.1); border-radius: 6px; padding: 3px 8px;
  white-space: nowrap; box-shadow: 0 10px 22px rgba(0,0,0,.2);
}
.pin { position: absolute; z-index: 4; left: 62%; top: 32.6%; width: 13px; height: 13px;
  background: #93B23C; border: 2px solid var(--panel-solid);
  box-shadow: 0 0 0 1px rgba(147,178,60,.4), 0 8px 18px rgba(0,0,0,.3);
  opacity: 0; transition: opacity .45s ease; pointer-events: none; }
.memo {
  position: absolute; z-index: 5;
  display: grid; grid-template-columns: 1fr auto; gap: 11px; align-items: center;
  min-width: 240px; max-width: 300px;
  border: 1px solid var(--line); border-radius: 11px;
  background: var(--panel-solid);
  padding: 11px 13px;
  box-shadow: 0 14px 30px rgba(0,0,0,.3);
  opacity: 0; transform: translateY(8px);
  transition: opacity .45s ease, transform .45s ease;
  pointer-events: none;
}
.memo em { display: block; font-style: normal; font-family: var(--mono); font-size: 9.5px; letter-spacing: .2em; color: var(--accent); margin-bottom: 5px; }
.memo div > span { display: block; font-size: 12.5px; line-height: 1.45; padding-bottom: 4px; border-bottom: 1px solid var(--line); }
.memo .ok { width: 26px; height: 26px; display: grid; place-items: center; border: 1px solid var(--line); background: color-mix(in srgb, var(--accent) 15%, transparent); font-size: 12px; }
.memo-issue { left: 68.5%; top: 24%; }
/* step 3: decision card */
.decide {
  position: absolute; z-index: 5; left: 68.5%; top: 44%;
  min-width: 220px;
  border: 1px solid var(--line); border-radius: 11px;
  background: var(--panel-solid);
  padding: 12px 13px;
  box-shadow: 0 14px 30px rgba(0,0,0,.3);
  opacity: 0; transform: translateY(10px);
  transition: opacity .45s ease, transform .45s ease;
  pointer-events: none;
}
.decide em { display: block; font-style: normal; font-family: var(--mono); font-size: 9.5px; letter-spacing: .2em; color: var(--faint); margin-bottom: 9px; }
.decide-btns { display: flex; gap: 8px; }
.decide-btns span {
  flex: 1; text-align: center;
  font-size: 11.5px; font-weight: 600;
  padding: 7px 10px; border-radius: 7px;
  border: 1px solid var(--line); color: var(--muted);
  transition: background .4s ease, color .4s ease, border-color .4s ease, transform .4s var(--ease);
}
.frame[data-k="2"] .decide, .frame[data-k="3"] .decide, .frame[data-k="4"] .decide { opacity: 1; transform: none; }
.frame[data-k="2"] .d-accept, .frame[data-k="3"] .d-accept, .frame[data-k="4"] .d-accept {
  background: var(--accent);
  border-color: var(--accent);
  color: #0D0F08 !important;
  transition-delay: .5s;
}
.d-accept > span { color: inherit; }
/* accepted stamp on the selection */
.sel .stamp {
  position: absolute; right: -1px; top: -25px; height: 19px;
  display: inline-flex; align-items: center;
  font-style: normal; font-family: var(--mono); font-size: 9.5px; letter-spacing: .1em;
  color: var(--accent-ink); background: #93B23C;
  border-radius: 6px; padding: 3px 8px;
  opacity: 0; transform: scale(.8);
  transition: opacity .35s ease .7s, transform .35s var(--ease) .7s;
}
.frame[data-k="2"] .stamp, .frame[data-k="3"] .stamp, .frame[data-k="4"] .stamp { opacity: 1; transform: none; }
/* step 4: handoff card flies to the spec strip */
.ship {
  position: absolute; z-index: 6; left: 68.5%; top: 24%;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line));
  border-radius: 10px;
  background: var(--panel-solid);
  padding: 10px 13px;
  box-shadow: 0 14px 30px rgba(0,0,0,.32);
  opacity: 0;
  pointer-events: none;
}
.ship em { display: block; font-style: normal; font-family: var(--mono); font-size: 9px; letter-spacing: .2em; color: var(--accent); margin-bottom: 5px; }
.ship code { font-family: var(--mono); font-size: 11px; color: var(--text); white-space: nowrap; }
.frame[data-k="3"] .ship { animation: shipfly 1.6s var(--ease) forwards; }
.frame[data-k="4"] .ship { opacity: 1; transform: translate(34%, 340%) scale(.8); }
@keyframes shipfly {
  0% { opacity: 0; transform: translate(0, 40%) scale(.9); }
  22% { opacity: 1; transform: translate(0, 6%) scale(1); }
  55% { opacity: 1; transform: translate(8%, 140%) scale(.94); }
  100% { opacity: 1; transform: translate(34%, 340%) scale(.8); }
}
/* step 5: the fix sweeps across the target + verified badge */
.fix {
  position: absolute; z-index: 2; left: 2.6%; top: 32.8%; width: 63%; height: 16.8%;
  border-radius: 7px;
  backdrop-filter: brightness(1.22) saturate(1.18);
  -webkit-backdrop-filter: brightness(1.22) saturate(1.18);
  clip-path: inset(0 100% 0 0);
  pointer-events: none;
}
.frame[data-k="4"] .fix { animation: wipe 1s var(--ease) .15s forwards; }
@keyframes wipe { to { clip-path: inset(0 0 0 0); } }
.frame[data-k="4"] .sel { border-style: solid; border-color: #93B23C; box-shadow: 0 0 0 1px rgba(0,0,0,.22), 0 0 0 6px rgba(147,178,60,.22); }
.vbadge {
  position: absolute; z-index: 6; left: 2.6%; top: 52.5%;
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 10px; letter-spacing: .12em;
  color: var(--accent-ink); background: #93B23C;
  border-radius: 999px; padding: 5px 12px;
  box-shadow: 0 10px 24px rgba(0,0,0,.3);
  opacity: 0; transform: translateY(6px) scale(.85);
  transition: opacity .4s ease .75s, transform .4s var(--ease) .75s;
  pointer-events: none;
}
.frame[data-k="4"] .vbadge { opacity: 1; transform: none; }
.frame[data-k="4"] .memo-txt { text-decoration: line-through; opacity: .55; }
.memo-txt { transition: opacity .4s ease; }
.frame[data-k="1"] .sel, .frame[data-k="2"] .sel, .frame[data-k="3"] .sel, .frame[data-k="4"] .sel,
.frame[data-k="1"] .pin, .frame[data-k="2"] .pin, .frame[data-k="3"] .pin, .frame[data-k="4"] .pin,
.frame[data-k="1"] .memo-issue, .frame[data-k="2"] .memo-issue, .frame[data-k="3"] .memo-issue, .frame[data-k="4"] .memo-issue { opacity: 1; transform: none; }
/* spec strip inside frame */
.spec {
  display: grid; grid-template-columns: repeat(4, minmax(0,1fr));
  border-top: 1px solid var(--line);
}
.spec > div { padding: 12px 16px; border-left: 1px solid var(--line); min-width: 0; }
.spec > div:first-child { border-left: 0; }
.spec em { display: block; font-style: normal; font-family: var(--mono); font-size: 9px; letter-spacing: .22em; text-transform: uppercase; color: var(--faint); transition: color .3s ease; }
.spec code { display: block; font-family: var(--mono); font-size: 11px; margin-top: 5px; color: var(--muted); transition: color .3s ease; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.frame[data-k="1"] .sp-issue em, .frame[data-k="2"] .sp-dec em, .frame[data-k="3"] .sp-hand em, .frame[data-k="4"] .sp-ver em { color: var(--accent); }
.frame[data-k="1"] .sp-issue code, .frame[data-k="2"] .sp-dec code, .frame[data-k="3"] .sp-hand code, .frame[data-k="4"] .sp-ver code { color: var(--text); }
@media (max-width: 1000px) {
  .loop-zone { height: auto; }
  .loop-pin { position: static; min-height: 0; padding: 0; }
  .loop-grid { grid-template-columns: 1fr; }
  .spec { grid-template-columns: repeat(2, 1fr); }
  .spec > div:nth-child(3), .spec > div:nth-child(4) { border-top: 1px solid var(--line); }
  .spec > div:nth-child(3) { border-left: 0; }
  .memo-issue { display: none; }
}

/* ---- surfaces ---- */
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.panel {
  position: relative;
  border: 1px solid var(--line); border-radius: 16px;
  background: var(--panel);
  padding: clamp(24px, 3vw, 40px);
  overflow: hidden;
  transition: border-color .35s ease;
}
.panel::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), var(--glow), transparent 46%);
  opacity: 0; transition: opacity .4s ease;
  pointer-events: none;
}
.panel:hover::before { opacity: 1; }
.panel:hover { border-color: color-mix(in srgb, var(--accent) 30%, var(--line)); }
.panel h3 { font-size: 16px; font-weight: 600; margin-top: 18px; letter-spacing: -.01em; }
.panel > p { color: var(--muted); font-size: 13px; margin-top: 10px; max-width: 44ch; }
.panel ul { list-style: none; margin-top: 18px; }
.panel li {
  display: flex; gap: 10px; align-items: baseline;
  padding: 9px 0; border-top: 1px solid var(--line);
  font-size: 12.5px; color: var(--muted);
}
.panel li b { font-family: var(--mono); font-size: 10px; color: var(--accent); font-weight: 500; }
.tlink {
  display: inline-flex; align-items: center; gap: 7px;
  margin-top: 22px;
  font-size: 12.5px; font-weight: 600;
  color: var(--text);
  border-bottom: 1px solid var(--line);
  padding-bottom: 3px;
  transition: color .25s ease, border-color .25s ease;
}
.tlink .ar { transition: transform .3s var(--ease); }
.tlink:hover { color: var(--accent); border-color: var(--accent); }
.tlink:hover .ar { transform: translateX(3px); }
@media (max-width: 860px) { .duo { grid-template-columns: 1fr; } }

/* ---- handoff ---- */
.hand { display: grid; grid-template-columns: minmax(280px, 5fr) 7fr; gap: clamp(36px, 5vw, 80px); align-items: center; }
.hand-copy p { color: var(--muted); font-size: 13.5px; margin-top: 14px; max-width: 44ch; }
.hand-copy .say { margin-top: 20px; font-size: 13px; color: var(--muted); }
.hand-copy .say b { color: var(--text); font-weight: 600; }
.codebox {
  border: 1px solid var(--line); border-radius: 14px;
  background: var(--panel-solid);
  font-family: var(--mono); font-size: 12px;
  padding: 8px 22px;
  box-shadow: 0 24px 60px rgba(0,0,0,.2);
}
.codebox .row {
  display: grid; grid-template-columns: 84px 1fr; gap: 16px; align-items: baseline;
  padding: 12px 0; border-top: 1px solid var(--line);
  opacity: .25; transform: translateX(-6px);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
}
.codebox.in .row { opacity: 1; transform: none; }
.codebox .row:first-child { border-top: 0; }
.codebox em { font-style: normal; font-size: 9.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--faint); }
.codebox code { color: var(--muted); word-break: break-word; }
.codebox code s { color: var(--faint); }
.codebox code b { color: var(--accent); font-weight: 500; }
@media (max-width: 900px) { .hand { grid-template-columns: 1fr; } }

/* ---- plans ---- */
.plans { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.plan { padding: clamp(28px, 3.6vw, 48px) 0; }
.plan + .plan { border-left: 1px solid var(--line); padding-left: clamp(28px, 4.5vw, 64px); }
.plan:first-child { padding-right: clamp(28px, 4.5vw, 64px); }
.plan h3 { font-size: 15px; font-weight: 600; margin-top: 16px; }
.plan ul { list-style: none; margin-top: 16px; }
.plan li { padding: 8px 0; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.trust {
  margin-top: clamp(36px, 5vw, 56px);
  text-align: center;
  font-family: var(--mono); font-size: 11px; line-height: 2;
  color: var(--faint);
  max-width: 74ch; margin-left: auto; margin-right: auto;
}
.trust b { color: var(--muted); font-weight: 500; }
@media (max-width: 860px) {
  .plans { grid-template-columns: 1fr; }
  .plan + .plan { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; }
  .plan:first-child { padding-right: 0; }
}

/* ---- scroll progress ---- */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 60; pointer-events: none; }
.progress i { display: block; height: 100%; background: var(--accent); transform-origin: left; transform: scaleX(var(--sp, 0)); }

/* ---- stats band ---- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: clamp(22px, 3vw, 36px) clamp(18px, 2.5vw, 32px); border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; }
.stat b {
  display: block;
  font-family: var(--mono); font-weight: 500;
  font-size: clamp(20px, 2.4vw, 30px);
  letter-spacing: -.01em;
  color: var(--text);
}
.stat b i { font-style: normal; color: var(--accent); }
.stat > span { display: block; margin-top: 8px; font-size: 12px; color: var(--muted); line-height: 1.6; }
@media (max-width: 820px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(3), .stat:nth-child(4) { border-top: 1px solid var(--line); }
  .stat:nth-child(3) { border-left: 0; }
}

/* ---- marquee ---- */
.mq-sec { padding: 26px 0; overflow: hidden; }
.mq { display: flex; width: max-content; animation: mq 36s linear infinite; }
.mq:hover { animation-play-state: paused; }
.mq-set { display: flex; align-items: center; gap: 44px; padding-right: 44px; }
.mq-set span {
  font-family: var(--mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--faint); white-space: nowrap;
  transition: color .3s ease;
}
.mq-set span:hover { color: var(--accent); }
.mq-set em { font-style: normal; color: var(--accent); font-size: 8px; }
@keyframes mq { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .mq { animation: none; } }

/* ---- boundaries grid ---- */
.bounds { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(20px, 3vw, 40px); }
.bound { border-top: 1px solid var(--line); padding-top: 18px; position: relative; }
.bound::before {
  content: ""; position: absolute; top: -1px; left: 0; width: 0; height: 1px;
  background: var(--accent); transition: width .6s var(--ease);
}
.bound:hover::before { width: 100%; }
.bound i {
  font-style: normal; font-family: var(--mono); font-size: 10px; color: var(--accent); letter-spacing: .2em;
}
.bound h3 { font-size: 13.5px; font-weight: 600; margin-top: 12px; letter-spacing: -.005em; }
.bound p { font-size: 12px; line-height: 1.7; color: var(--muted); margin-top: 8px; }
@media (max-width: 820px) { .bounds { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .bounds { grid-template-columns: 1fr; } }

/* ---- manifesto ---- */
.mani { text-align: center; }
.mani blockquote {
  margin: 22px auto 0;
  max-width: 34ch;
  font-size: clamp(16px, 1.9vw, 22px);
  font-weight: 500;
  line-height: 1.55;
  letter-spacing: -.01em;
  text-wrap: balance;
}
.mani blockquote .w { display: inline-block; opacity: .18; transform: translateY(6px); transition: opacity .6s var(--ease), transform .6s var(--ease); transition-delay: var(--wd, 0s); }
.mani.in blockquote .w { opacity: 1; transform: none; }
.mani blockquote em { font-style: normal; color: var(--accent); }
.mani p { margin: 18px auto 0; font-family: var(--mono); font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--faint); }

/* ---- faq ---- */
.faq { max-width: 760px; margin: 0 auto; border-bottom: 1px solid var(--line); }
.faq details { border-top: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  padding: 18px 4px;
  font-size: 13.5px; font-weight: 550;
  transition: color .25s ease;
}
.faq summary:hover { color: var(--accent); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--mono); font-size: 15px; color: var(--faint); transition: transform .3s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > div { padding: 0 4px 20px; font-size: 12.5px; line-height: 1.75; color: var(--muted); max-width: 62ch; }

/* ---- cta ---- */
.cta-sec { text-align: center; }
.cta-sec h2 { font-size: clamp(18px, 2.2vw, 26px); font-weight: 600; letter-spacing: -.01em; max-width: 26ch; margin: 18px auto 0; text-wrap: balance; }
.cta-sec p { color: var(--muted); font-size: 13.5px; max-width: 48ch; margin: 14px auto 0; }
.cta-sec .hero-cta { justify-content: center; margin-top: 28px; }

/* ---- footer ---- */
footer { border-top: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 55%, transparent); padding: 40px 0; }
.foot-in { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.foot-links { display: flex; gap: 20px; flex-wrap: wrap; }
.foot-links a { font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); transition: color .25s ease; }
.foot-links a:hover { color: var(--text); }
.foot-c { font-family: var(--mono); font-size: 10.5px; color: var(--faint); }

/* ============ production multipage shell ============ */
a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 4px;
}

.nav-links a[aria-current="page"],
.foot-links a[aria-current="page"] { color: var(--text); }

.sub-main { position: relative; z-index: 2; min-height: 100vh; }
.sub-hero {
  min-height: 58vh;
  display: flex;
  align-items: end;
  padding: 132px 0 64px;
  border-bottom: 1px solid var(--line);
}
.sub-hero .wrap { display: grid; grid-template-columns: minmax(0, .58fr) minmax(280px, .42fr); gap: clamp(28px, 6vw, 82px); align-items: end; }
.sub-hero h1 {
  margin-top: 16px;
  max-width: 20ch;
  font-size: clamp(28px, 3.4vw, 44px);
  line-height: 1.18;
  letter-spacing: -.018em;
  font-weight: 560;
  text-wrap: balance;
}
.sub-hero h1 em { font-style: normal; color: var(--accent); font-weight: inherit; letter-spacing: inherit; }
.sub-hero p { max-width: 45ch; color: var(--muted); font-size: 14px; line-height: 1.75; }
.sub-aside { display: grid; gap: 16px; }
.sub-aside .micro-panel {
  border-top: 1px solid var(--line);
  padding-top: 14px;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.65;
  color: var(--muted);
}
.sub-aside b { display: block; color: var(--text); font-weight: 500; margin-bottom: 4px; }
.sub-section { padding: clamp(76px, 10vw, 132px) 0; border-bottom: 1px solid var(--line); }
.sub-section.compact { padding: clamp(48px, 7vw, 84px) 0; }
.sub-kicker { display: block; margin-bottom: 14px; }
.sub-heading { max-width: 22ch; font-size: clamp(20px, 2.4vw, 32px); line-height: 1.12; letter-spacing: -.015em; font-weight: 600; text-wrap: balance; }
.sub-copy { max-width: 62ch; color: var(--muted); font-size: 15px; line-height: 1.8; }
.sub-grid { display: grid; grid-template-columns: minmax(0, .42fr) minmax(0, .58fr); gap: clamp(28px, 7vw, 96px); align-items: start; }
.sub-stack { display: grid; gap: 18px; }
.sub-list { border-top: 1px solid var(--line); }
.sub-row { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 24px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.sub-row i { font-style: normal; font-family: var(--mono); font-size: 10px; letter-spacing: .18em; color: var(--accent); }
.sub-row h3 { font-size: clamp(18px, 1.7vw, 24px); line-height: 1.16; letter-spacing: -.012em; font-weight: 590; }
.sub-row p { margin-top: 8px; color: var(--muted); max-width: 56ch; }
.sub-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  background: linear-gradient(145deg, color-mix(in srgb, var(--panel-solid) 92%, transparent), color-mix(in srgb, var(--bg) 92%, transparent));
  padding: clamp(22px, 4vw, 42px);
}
.sub-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at var(--mx, 75%) var(--my, 18%), var(--glow), transparent 38%);
  opacity: .9;
}
.sub-panel > * { position: relative; }
.command-card { display: grid; gap: 20px; }
.command-line {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 16px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  overflow-x: auto;
}
.command-line code { font-family: var(--mono); color: var(--text); font-size: 12px; white-space: nowrap; }
.copy-btn {
  display: inline-flex;
  width: fit-content;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: 0 15px;
  border: 1px solid color-mix(in srgb, var(--accent) 38%, transparent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  transition: transform .25s var(--ease), background .25s ease;
}
.copy-btn:hover { background: color-mix(in srgb, var(--accent) 20%, transparent); }
.copy-btn:active { transform: translateY(1px); }
.release-list { display: grid; gap: 0; border-top: 1px solid var(--line); }
.release-item { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: clamp(20px, 5vw, 72px); padding: 34px 0; border-bottom: 1px solid var(--line); }
.release-date { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; color: var(--faint); text-transform: uppercase; }
.release-item h2 { font-size: clamp(20px, 2.3vw, 32px); line-height: 1.12; letter-spacing: -.018em; font-weight: 610; }
.release-item p { margin-top: 10px; max-width: 60ch; color: var(--muted); }
.release-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.release-tags span { border: 1px solid var(--line); padding: 5px 8px; font-family: var(--mono); font-size: 10px; color: var(--faint); }
.legal-note { max-width: 70ch; color: var(--muted); font-size: 15px; line-height: 1.85; }
.mini-faq details { border-top: 1px solid var(--line); padding: 22px 0; }
.mini-faq details:last-child { border-bottom: 1px solid var(--line); }
.mini-faq summary { cursor: pointer; list-style: none; font-size: 18px; letter-spacing: -.01em; }
.mini-faq summary::-webkit-details-marker { display: none; }
.mini-faq details div { margin-top: 12px; max-width: 64ch; color: var(--muted); }
.docs-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: clamp(44px, 7vw, 112px); align-items: start; }
.docs-index { position: sticky; top: 92px; padding: 2px 0 0; }
.docs-index p { margin: 16px 0 20px; color: var(--muted); font-size: 12.5px; line-height: 1.7; }
.docs-index nav { display: grid; border-top: 1px solid var(--line); }
.docs-index a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 42px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  transition: color .25s ease, padding-left .25s var(--ease);
}
.docs-index a::after { content: "↘"; color: var(--faint); font-size: 10px; }
.docs-index a:hover { color: var(--text); padding-left: 6px; }
.docs-content { min-width: 0; display: grid; gap: clamp(42px, 6vw, 72px); }
.docs-block {
  scroll-margin-top: 96px;
  display: grid;
  grid-template-columns: minmax(0, .34fr) minmax(0, .66fr);
  gap: clamp(28px, 5vw, 76px);
  padding-bottom: clamp(42px, 6vw, 72px);
  border-bottom: 1px solid var(--line);
}
.docs-block:last-child { border-bottom: 0; padding-bottom: 0; }
.docs-block h2 {
  margin-top: 14px;
  max-width: 17ch;
  font-size: clamp(20px, 2.25vw, 30px);
  line-height: 1.12;
  letter-spacing: -.015em;
  font-weight: 600;
  text-wrap: balance;
}
.docs-body { display: grid; gap: 22px; min-width: 0; }
.docs-body > p { color: var(--muted); max-width: 68ch; font-size: 14px; line-height: 1.85; }
.docs-steps { display: grid; border-top: 1px solid var(--line); }
.docs-step {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 24px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.docs-step i { font-style: normal; font-family: var(--mono); font-size: 10px; letter-spacing: .16em; color: var(--accent); }
.docs-step h3 { font-size: clamp(17px, 1.5vw, 21px); line-height: 1.18; letter-spacing: -.01em; font-weight: 590; }
.docs-step p { margin-top: 6px; color: var(--muted); line-height: 1.75; }
.docs-note {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 20px 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.8;
}
.docs-note b { color: var(--text); font-weight: 590; }
.docs-command {
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  padding: 18px;
  overflow-x: auto;
}
.docs-command code { font-family: var(--mono); font-size: 12px; color: var(--text); white-space: nowrap; }
.docs-matrix { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.docs-cell { min-height: 164px; padding: 20px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--panel) 62%, transparent); }
.docs-cell em { display: block; font-style: normal; font-family: var(--mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); margin-bottom: 18px; }
.docs-cell h3 { font-size: 18px; line-height: 1.2; letter-spacing: -.01em; font-weight: 590; }
.docs-cell p { margin-top: 9px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.docs-kv { display: grid; border-top: 1px solid var(--line); }
.docs-kv div { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 28px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.docs-kv dt { font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.docs-kv dd { margin: 0; color: var(--muted); line-height: 1.75; }
@media (max-width: 900px) {
  .sub-hero .wrap,
  .sub-grid,
  .release-item,
  .docs-layout,
  .docs-block,
  .docs-kv div { grid-template-columns: 1fr; }
  .sub-hero { min-height: auto; padding: 124px 0 58px; }
  .sub-hero h1 { font-size: clamp(28px, 8vw, 40px); }
  .sub-row { grid-template-columns: 1fr; gap: 8px; }
  .docs-index { position: relative; top: auto; }
  .docs-matrix { grid-template-columns: 1fr; }
  .docs-step { grid-template-columns: 42px minmax(0, 1fr); }
}
