:root {
  --paper: #f9f4ee;
  --paper-2: #f1eae0;
  --card: #fffdfa;
  --ink: #17241c;
  --ink-2: #48584e;
  --ink-3: #7a887e;
  --leaf: #01673d;
  --leaf-hi: #0a7d4b;
  --mint: #e6f2e8;
  --line: rgba(23, 36, 28, .11);
  --shadow: 0 1px 2px rgba(23, 36, 28, .06), 0 12px 32px -12px rgba(23, 36, 28, .18);
  --win: #ffffff;
  --win-bar: #f6f5f3;
  --win-line: rgba(0, 0, 0, .08);
  --menu: rgba(246, 245, 243, .9);
  --menu-ink: #1d1d1f;
  --menu-dim: #8a8a8e;
  --menu-line: rgba(0, 0, 0, .1);
  --sel: #1f8a4c;
  --desk: radial-gradient(120% 90% at 20% 0%, #fdf8f1 0%, #e9f3ea 55%, #d3e8d8 100%);
  --serif: "Instrument Serif", "Songti SC", "Noto Serif SC", Georgia, serif;
  --sans: "Geist", -apple-system, "PingFang SC", "Hiragino Sans GB", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --r-s: 6px;
  --r-m: 10px;
  --r-l: 16px;
  --r-xl: 24px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0e1511;
    --paper-2: #121b15;
    --card: #151f19;
    --ink: #edf2ec;
    --ink-2: #b2bfb5;
    --ink-3: #7f8d83;
    --leaf: #5cc68c;
    --leaf-hi: #79d6a3;
    --mint: #15261c;
    --line: rgba(237, 242, 236, .1);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 16px 40px -16px rgba(0, 0, 0, .6);
    --win: #1e1f1e;
    --win-bar: #262826;
    --win-line: rgba(255, 255, 255, .08);
    --menu: rgba(44, 46, 45, .88);
    --menu-ink: #f2f2f2;
    --menu-dim: #8e918f;
    --menu-line: rgba(255, 255, 255, .12);
    --sel: #2f9a5c;
    --desk: radial-gradient(120% 90% at 20% 0%, #1b2a20 0%, #122018 55%, #0b140f 100%);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video, svg { display: block; max-width: 100%; }
[hidden] { display: none !important; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 400; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--leaf); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 14px; border-radius: var(--r-s); z-index: 99; }
.skip:focus { left: 8px; }

/* nav */
.nav { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--paper) 82%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.nav.scrolled { border-bottom-color: var(--line); }
.nav-in { display: flex; align-items: center; gap: 24px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; letter-spacing: -.01em; }
.brand img { width: 28px; height: 28px; border-radius: 7px; box-shadow: 0 0 0 1px var(--line); }
.links { display: flex; gap: 22px; margin-left: 12px; }
.links a, .lang { text-decoration: none; color: var(--ink-2); font-size: 15px; transition: color .15s; }
.links a:hover, .lang:hover { color: var(--ink); }
.nav-r { margin-left: auto; display: flex; align-items: center; gap: 16px; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; height: 44px; padding: 0 20px; border-radius: 999px; font: 500 15px/1 var(--sans); text-decoration: none; border: 1px solid transparent; cursor: pointer; transition: transform .12s, background .15s, border-color .15s, box-shadow .15s; white-space: nowrap; }
.btn:active { transform: scale(.96); }
.btn-primary { background: var(--leaf); color: #fff; box-shadow: 0 1px 0 rgba(255, 255, 255, .18) inset, 0 8px 20px -8px color-mix(in srgb, var(--leaf) 70%, transparent); }
.btn-primary:hover { background: var(--leaf-hi); }
@media (prefers-color-scheme: dark) { .btn-primary { color: #06140c; } }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--card); border-color: color-mix(in srgb, var(--ink) 22%, transparent); }
.btn-sm { height: 34px; padding: 0 14px; font-size: 14px; }
.btn-lg { height: 50px; padding: 0 24px; font-size: 16px; }

/* hero */
.hero { padding: 64px 0 40px; text-align: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; letter-spacing: .02em; color: var(--ink-2); padding: 6px 12px; border-radius: 999px; background: var(--mint); }
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--leaf); }
.hero h1 { font: 400 clamp(44px, 6.6vw, 82px)/1.02 var(--serif); letter-spacing: -.02em; margin: 22px auto 0; max-width: 16ch; }
.hero h1 em { font-style: italic; color: var(--leaf); }
.lede { max-width: 600px; margin: 22px auto 0; color: var(--ink-2); font-size: 19px; }
.ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 32px; }
.meta { margin-top: 14px; font-size: 13px; color: var(--ink-3); }

/* demo stage */
.stage { position: relative; margin: 56px auto 0; max-width: 980px; border-radius: var(--r-xl); background: var(--desk); padding: clamp(18px, 5vw, 56px) clamp(10px, 5vw, 64px) clamp(28px, 6vw, 72px); box-shadow: 0 0 0 1px var(--line) inset; text-align: left; }
.hint { position: absolute; left: 50%; top: 14px; transform: translateX(-50%); font-size: 13px; color: var(--ink-2); display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.hint kbd { font: 500 11px/1 var(--mono); padding: 3px 6px; border-radius: 5px; background: var(--card); box-shadow: 0 0 0 1px var(--line); }
.win { position: relative; background: var(--win); border-radius: 14px; box-shadow: 0 0 0 1px var(--win-line), 0 30px 60px -24px rgba(20, 40, 28, .35), 0 8px 18px -10px rgba(20, 40, 28, .25); overflow: visible; user-select: none; -webkit-user-select: none; margin-top: 18px; }
.win-bar { display: flex; align-items: center; gap: 14px; height: 52px; padding: 0 16px; background: var(--win-bar); border-bottom: 1px solid var(--win-line); border-radius: 14px 14px 0 0; }
.lights { display: flex; gap: 8px; }
.lights i { width: 12px; height: 12px; border-radius: 50%; background: #ff5f57; }
.lights i:nth-child(2) { background: #febc2e; }
.lights i:nth-child(3) { background: #28c840; }
.win-title { font: 600 14px/1 var(--sans); color: var(--menu-ink); }
.win-tools { margin-left: auto; display: flex; gap: 14px; color: var(--menu-dim); }
.win-tools svg { width: 17px; height: 17px; }
.files { position: relative; display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px 6px; padding: 22px 18px; min-height: 500px; align-content: start; cursor: context-menu; outline: none; border-radius: 0 0 14px 14px; }
.file { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 6px 2px; border-radius: 8px; }
.file .ico { width: 56px; height: 56px; display: grid; place-items: center; }
.file .ico svg, .file .ico img { width: 52px; height: 52px; }
.file .ico img { border-radius: 10px; box-shadow: 0 0 0 1px var(--win-line), 0 2px 6px rgba(0, 0, 0, .12); width: 46px; height: 46px; }
.file span { font-size: 12.5px; color: var(--menu-ink); text-align: center; line-height: 1.25; padding: 1px 5px; border-radius: 4px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file.sel span { background: var(--sel); color: #fff; }
.file.sel .ico { background: rgba(0, 0, 0, .06); border-radius: 8px; }
.file.hidden-file { opacity: .5; }
.file.new { animation: bloom .55s cubic-bezier(.2, .9, .3, 1.3) both; }
@keyframes bloom { from { transform: scale(.4) translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }

/* context menu */
.ctx { position: absolute; z-index: 5; width: 236px; padding: 5px; background: var(--menu); backdrop-filter: blur(24px) saturate(1.6); -webkit-backdrop-filter: blur(24px) saturate(1.6); border-radius: var(--r-m); box-shadow: 0 0 0 .5px var(--menu-line), 0 14px 38px -8px rgba(0, 0, 0, .32), 0 2px 6px rgba(0, 0, 0, .12); font: 400 13.5px/1 var(--sans); color: var(--menu-ink); list-style: none; margin: 0; transform-origin: top left; animation: pop .16s ease-out both; }
.ctx[hidden] { display: none; }
@keyframes pop { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }
.ctx li { position: relative; }
.ctx .sep { height: 1px; margin: 5px 10px; background: var(--menu-line); }
.ctx button { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 9px; width: 100%; height: 26px; padding: 0 10px; border-radius: 5px; cursor: default; white-space: nowrap; }
.ctx button .i { width: 16px; height: 16px; flex: none; opacity: .85; }
.ctx button .i svg { width: 16px; height: 16px; }
.ctx button.native { color: var(--menu-ink); }
.ctx button.native .i { display: none; }
.ctx button .chev { margin-left: auto; width: 8px; height: 8px; border-right: 1.5px solid currentColor; border-top: 1.5px solid currentColor; transform: rotate(45deg); opacity: .6; }
.ctx li:hover > button, .ctx li:focus-within > button, .ctx li.open > button, .ctx button:focus-visible { background: var(--sel); color: #fff; outline: none; }
.ctx li:hover > button .chev, .ctx li.open > button .chev { opacity: 1; }
.ctx .sub { display: none; position: absolute; left: calc(100% + 1px); top: -5px; width: 200px; animation: none; }
.ctx li:hover > .sub, .ctx li:focus-within > .sub, .ctx li.open > .sub { display: block; }
.ctx.flip .sub { left: auto; right: calc(100% + 1px); }

.toast { position: absolute; left: 50%; bottom: 18px; transform: translate(-50%, 8px); background: var(--ink); color: var(--paper); font-size: 13.5px; padding: 9px 14px; border-radius: 999px; opacity: 0; transition: opacity .2s, transform .2s; pointer-events: none; max-width: calc(100% - 24px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; z-index: 6; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast code { font: 500 12.5px var(--mono); }

.h-touch { display: none; }
@media (hover: none) { .h-mouse { display: none; } .h-touch { display: inline; } }
.swap code { font: 500 .92em var(--mono); }

/* sections */
section.block { padding: 112px 0 0; }
.kicker { font: 500 13px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--leaf); }
.block h2 { font: 400 clamp(36px, 5vw, 56px)/1.06 var(--serif); letter-spacing: -.015em; margin-top: 14px; max-width: 18ch; }
.block h2 em { font-style: italic; color: var(--leaf); }
.block .intro { margin-top: 18px; max-width: 620px; color: var(--ink-2); font-size: 18px; }

/* why */
.why { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.swap { margin-top: 6px; border-radius: var(--r-l); background: var(--card); box-shadow: var(--shadow); overflow: hidden; }
.swap-head, .swap-row { display: grid; grid-template-columns: 1fr 1fr; }
.swap-head div { padding: 14px 20px; font-size: 12.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); border-bottom: 1px solid var(--line); }
.swap-head div + div { color: var(--leaf); }
.swap-row div { padding: 15px 20px; font-size: 15px; border-bottom: 1px solid var(--line); }
.swap-row:last-child div { border-bottom: 0; }
.swap-row div:first-child { color: var(--ink-3); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--ink-3) 50%, transparent); }
.swap-row div + div { font-weight: 500; }

/* features */
.feats { margin-top: 48px; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.feat { padding: 28px 24px 30px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); transition: background .2s; }
.feat:hover { background: var(--card); }
.feat .badge { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--mint); color: var(--leaf); }
.feat .badge svg { width: 20px; height: 20px; }
.feat h3 { margin-top: 18px; font: 600 16px/1.3 var(--sans); letter-spacing: -.005em; }
.feat p { margin-top: 8px; font-size: 14.5px; color: var(--ink-2); line-height: 1.55; }
.feat code, .rest code { font: 500 .9em var(--mono); }

/* video */
.film { margin-top: 44px; position: relative; border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--shadow), 0 0 0 1px var(--line); background: #e9f5ec; aspect-ratio: 1276 / 596; }
.film video { width: 100%; height: 100%; object-fit: cover; }
.vctl { position: absolute; right: 14px; bottom: 14px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(23, 36, 28, .72); color: #fff; display: grid; place-items: center; cursor: pointer; transition: transform .12s; }
.vctl:active { transform: scale(.92); }
.vctl svg { width: 16px; height: 16px; }
.vctl .play { display: none; }
.vctl.paused .play { display: block; }
.vctl.paused .pause { display: none; }

/* the rest */
.rest { margin-top: 40px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--line); }
.rest div { padding: 22px 24px 24px 0; border-bottom: 1px solid var(--line); }
.rest div:not(:nth-child(3n + 1)) { padding-left: 24px; border-left: 1px solid var(--line); }
.rest h3 { font: 600 15px/1.3 var(--sans); display: flex; align-items: center; gap: 9px; }
.rest h3::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--leaf); flex: none; }
.rest p { margin-top: 6px; font-size: 14.5px; color: var(--ink-2); }

/* cli */
.cli { white-space: pre; margin-top: 32px; border-radius: var(--r-l); background: #13201a; color: #d8e6dc; padding: 20px 22px; font: 400 13.5px/1.75 var(--mono); overflow-x: auto; position: relative; }
.cli .c { color: #7f9a88; }
.cli .k { color: #8fe0b0; }
.copy { position: absolute; top: 12px; right: 12px; font: 500 12px var(--sans); color: #d8e6dc; background: rgba(255, 255, 255, .08); border: 0; border-radius: 999px; padding: 6px 11px; cursor: pointer; }
.copy:hover { background: rgba(255, 255, 255, .14); }

/* final */
.final { margin: 120px auto 0; text-align: center; padding: 72px 24px; border-radius: var(--r-xl); background: var(--mint); position: relative; overflow: hidden; }
.final img { width: 88px; height: 88px; margin: 0 auto; border-radius: 20px; box-shadow: var(--shadow); }
.final h2 { font: 400 clamp(36px, 5vw, 58px)/1.05 var(--serif); margin-top: 26px; letter-spacing: -.015em; }
.final p { margin-top: 12px; color: var(--ink-2); }

footer { padding: 48px 0 56px; color: var(--ink-3); font-size: 14px; }
.foot { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 28px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 20px; }
.foot a { text-decoration: none; color: var(--ink-2); }
.foot a:hover { color: var(--ink); }

/* chinese */
.zh .hero h1 { font-size: clamp(38px, 5.8vw, 72px); line-height: 1.18; letter-spacing: .01em; max-width: 14em; }
.zh .block h2, .zh .final h2 { letter-spacing: .01em; line-height: 1.25; }
.zh .block h2 { font-size: clamp(30px, 4.2vw, 46px); max-width: 16em; }
.zh .hero h1 em, .zh .block h2 em { font-style: normal; }
.nw { white-space: nowrap; }
.zh .kicker { letter-spacing: .12em; }

/* reveal */
.rv { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.rv.in { opacity: 1; transform: none; }

@media (max-width: 960px) {
  .feats { grid-template-columns: repeat(2, 1fr); }
  .why { grid-template-columns: 1fr; gap: 36px; }
  .rest { grid-template-columns: repeat(2, 1fr); }
  .rest div:not(:nth-child(3n + 1)) { padding-left: 0; border-left: 0; }
  .rest div:nth-child(2n) { padding-left: 20px; border-left: 1px solid var(--line); }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .links, .hide-s { display: none; }
  .hero { padding-top: 48px; }
  .lede { font-size: 17px; }
  .feats { grid-template-columns: 1fr; }
  .rest { grid-template-columns: 1fr; }
  .rest div:nth-child(2n) { padding-left: 0; border-left: 0; }
  section.block { padding-top: 80px; }
  .files { grid-template-columns: repeat(3, 1fr); min-height: 610px; padding: 16px 8px; }
  .ctx { width: 214px; }
  .ctx .sub { left: 18px; top: 22px; width: 196px; box-shadow: 0 0 0 .5px var(--menu-line), 0 18px 40px -8px rgba(0, 0, 0, .4); }
  .ctx.flip .sub { right: auto; }
  .swap-row div, .swap-head div { padding: 13px 14px; font-size: 14px; }
  .hint { font-size: 12px; }
  .final { padding: 56px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .rv { opacity: 1; transform: none; }
}
