:root {
  --bg: #f6f8f7;
  --bg-alt: #edf3f0;
  --surface: #ffffff;
  --text: #13261f;
  --muted: #55665f;
  --line: #d9e3de;
  --brand: #137a63;
  --brand-ink: #ffffff;
  --brand-soft: #d7ebe4;
  --brand-text: #0e6150;
  --warn: #8a5300;
  --navy: #1f4b7a;
  --shadow: 0 1px 2px rgba(16, 40, 32, .06), 0 8px 28px rgba(16, 40, 32, .08);
  --radius: 16px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1513;
    --bg-alt: #121c19;
    --surface: #17221f;
    --text: #e3ece8;
    --muted: #97a8a1;
    --line: #26352f;
    --brand: #3fb895;
    --brand-ink: #062019;
    --brand-soft: #1b3a31;
    --brand-text: #5fd0ad;
    --warn: #f0b45a;
    --navy: #8fb5e0;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 28px rgba(0, 0, 0, .35);
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
code, pre, .mono { font-family: var(--mono); }
code { font-size: .92em; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }

/* Bilingual source page (src/index.html): every string exists twice and only
   the active language shows. Built pages are single-language and carry no data-lang. */
html[data-lang="en"] [lang="zh"],
html[data-lang="zh"] [lang="en"] { display: none !important; }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 16px; }
.wrap.narrow { max-width: 800px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-in { display: flex; align-items: center; gap: 24px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.125rem; color: var(--text); }
.brand img { border-radius: 8px; }
.brand:hover { text-decoration: none; }
.nav-links { display: none; gap: 22px; margin-left: 8px; }
.nav-links a { color: var(--muted); font-size: .95rem; }
.nav-links a:hover { color: var(--text); text-decoration: none; }
@media (min-width: 860px) { .nav-links { display: flex; } }
.nav-act { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.lang-btn {
  font: inherit; font-size: .875rem; cursor: pointer;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px;
}
.lang-btn:hover { border-color: var(--brand); }
a.lang-btn { text-decoration: none; display: inline-block; line-height: 1.6; }
.gh { color: var(--text); display: flex; padding: 4px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 600; cursor: pointer;
  padding: 11px 20px; border-radius: 12px; border: 1px solid transparent;
  transition: transform .08s ease, background .15s ease;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--brand); color: var(--brand-ink); }
.btn.primary:hover { background: color-mix(in srgb, var(--brand) 88%, #000); }
.btn.ghost { border-color: var(--line); color: var(--text); background: var(--surface); }
.btn.ghost:hover { border-color: var(--brand); }
.btn.soft { background: var(--brand-soft); color: var(--text); }

/* ---------- hero ---------- */
.hero {
  padding: 48px 0 24px;
  background:
    radial-gradient(900px 400px at 85% 10%, color-mix(in srgb, var(--brand) 14%, transparent), transparent 70%),
    radial-gradient(700px 360px at 0% 100%, color-mix(in srgb, var(--navy) 10%, transparent), transparent 70%);
}
.hero-in { display: grid; gap: 40px; align-items: center; }
@media (min-width: 960px) { .hero-in { grid-template-columns: 1fr 1.1fr; padding-top: 24px; } }
.eyebrow { color: var(--brand); font-size: .9rem; letter-spacing: .1em; margin: 0 0 12px; white-space: nowrap; overflow: hidden; }
.hero h1 { font-size: clamp(2.3rem, 6vw, 3.8rem); font-weight: 800; }
html[lang|="zh"] .hero h1 { font-size: clamp(2.1rem, 5vw, 3.2rem); word-break: keep-all; }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 36em; }
.lede em { color: var(--text); font-style: normal; font-weight: 600; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 20px; }
.pills { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pills li { font-size: .85rem; color: var(--muted); border: 1px solid var(--line); background: var(--surface); padding: 3px 12px; border-radius: 999px; }
.hero-art { position: relative; padding-right: 12%; padding-bottom: 6%; }
.shot { border-radius: 14px; box-shadow: var(--shadow); border: 1px solid var(--line); background: var(--surface); }
.hero-art .phone {
  position: absolute; right: 0; bottom: 0; width: 30%;
  border-radius: 22px; border: 6px solid #1a1f1d;
}
.status {
  margin: 40px 0 0; padding: 12px 16px; border-radius: 12px;
  background: var(--surface); border: 1px dashed var(--line); color: var(--muted); font-size: .92rem;
}
.status strong { color: var(--warn); margin-right: 6px; }

/* ---------- highlights band ---------- */
.band { padding: 40px 0; }
.grid4 { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid4 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .grid4 { grid-template-columns: repeat(4, 1fr); } }
.hl { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.hl-k { color: var(--brand); font-size: 1.1rem; letter-spacing: .15em; margin-bottom: 6px; }
.hl h3 { font-size: 1.1rem; }
.hl p { margin: 0; color: var(--muted); font-size: .95rem; }
.hl em { font-style: normal; color: var(--text); font-weight: 600; }

/* ---------- sections ---------- */
.sec { padding: 72px 0; }
.sec.alt { background: var(--bg-alt); }
.sec-h { font-size: clamp(1.7rem, 3.6vw, 2.4rem); text-align: center; font-weight: 800; }
.sec-sub { text-align: center; color: var(--muted); max-width: 44em; margin: 0 auto 40px; }

/* feature rows */
.feat { display: grid; gap: 28px; align-items: center; padding: 36px 0; }
@media (min-width: 900px) {
  .feat { grid-template-columns: 1fr 1.25fr; gap: 56px; }
  .feat.rev .feat-copy { order: 2; }
}
.tag { display: inline-block; margin: 0 0 10px; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--brand-text); background: var(--brand-soft); padding: 2px 10px; border-radius: 999px; }
.feat h3 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
.feat-copy p { color: var(--muted); }
.feat-copy b { color: var(--text); }
.ticks { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 28px; color: var(--muted); }
.ticks li::before {
  content: ""; position: absolute; left: 2px; top: .62em; width: 14px; height: 4px; border-radius: 2px; background: var(--brand);
}
.ticks li:nth-child(odd)::before { width: 5px; height: 5px; left: 6px; top: .6em; border-radius: 50%; }
.ticks em { font-style: normal; color: var(--text); }
.feat-art img { border-radius: 14px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.feat-art.phones { display: flex; gap: 16px; justify-content: center; }
.feat-art.phones img { width: min(46%, 260px); border-radius: 22px; border: 6px solid #1a1f1d; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 14px; }
.chips span { font-size: .85rem; padding: 3px 10px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); }

/* cards */
.cards { display: grid; gap: 16px; margin-top: 36px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .cards { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .cards { grid-template-columns: repeat(4, 1fr); } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card h4 { font-size: 1.05rem; margin-top: 12px; }
.card p { margin: 0; color: var(--muted); font-size: .93rem; }
.ico { width: 40px; height: 40px; border-radius: 10px; background: var(--brand-soft); display: grid; place-items: center; }
.ico svg { width: 22px; height: 22px; fill: var(--brand); }

/* flow */
.flow { list-style: none; padding: 0; margin: 32px 0 0; display: grid; gap: 16px; counter-reset: f; }
@media (min-width: 860px) { .flow { grid-template-columns: repeat(3, 1fr); } }
.flow li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; position: relative; }
.flow .n { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); font-weight: 700; margin-bottom: 12px; }
.flow p { margin: 0; color: var(--muted); }
.flow em { font-style: normal; color: var(--text); font-weight: 600; }

/* demo */
.demo { max-width: 760px; margin: 0 auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.demo-row { display: flex; gap: 10px; }
.demo-row input {
  flex: 1; min-width: 0; font: inherit; font-size: 1.05rem; text-transform: uppercase;
  padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--text);
}
.demo-row input:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
.demo .when-busy { display: none; }
.demo.busy .when-busy { display: inline; }
.demo.busy .when-idle { display: none; }
.demo-out {
  min-height: 92px; margin: 16px 0; padding: 14px; border-radius: 12px; background: var(--bg);
  font-size: 1.15rem; line-height: 1.9; word-break: break-word; letter-spacing: .06em;
}
.demo-out .ch { display: inline-block; margin: 0 .5em .4em 0; padding: 2px 4px; border-radius: 6px; font-size: 1.5rem; line-height: 1.1; letter-spacing: .04em; font-weight: 700; transition: background .1s; }
.demo-out .ch small { display: block; text-align: center; font-size: .75rem; font-weight: 600; margin-top: 4px; color: var(--muted); line-height: 1; font-family: var(--font); }
.demo-out .ch.on { background: var(--brand-soft); color: var(--brand); }
.demo-out .sp { display: inline-block; width: 1em; }
.demo-ctl { display: flex; flex-wrap: wrap; gap: 12px 32px; color: var(--muted); font-size: .9rem; }
.demo-ctl label { display: flex; align-items: center; gap: 8px; flex: 1 1 240px; }
.demo-ctl input { flex: 1; accent-color: var(--brand); }
.demo-ctl b { color: var(--text); }

/* gallery */
.tabs { display: flex; justify-content: center; gap: 6px; margin-bottom: 28px; }
.tabs button {
  font: inherit; cursor: pointer; padding: 6px 18px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--muted);
}
.tabs button.on { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.gallery { display: grid; gap: 20px; }
.gallery figure { margin: 0; }
.gallery figcaption { text-align: center; color: var(--muted); font-size: .9rem; margin-top: 10px; }
.phone-g { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 720px) { .phone-g { grid-template-columns: repeat(5, 1fr); } }
.phone-g img { aspect-ratio: 414 / 900; object-fit: cover; border-radius: 20px; border: 5px solid #1a1f1d; box-shadow: var(--shadow); }
.desk-g { grid-template-columns: 1fr; }
@media (min-width: 720px) { .desk-g { grid-template-columns: 1fr 1fr; } }
.desk-g img { aspect-ratio: 16 / 10; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); box-shadow: var(--shadow); }

/* downloads */
.dl-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .dl-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .dl-grid { grid-template-columns: repeat(3, 1fr); } }
.dl {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; display: flex; flex-direction: column; gap: 10px; position: relative;
}
.dl h3 { margin: 0; font-size: 1.25rem; }
.dl .req { margin: 0 0 4px; color: var(--muted); font-size: .9rem; }
.dl .btn { width: 100%; }
.dl .alt-link { font-size: .92rem; text-align: center; }
.dl .note { margin: auto 0 0; padding-top: 6px; font-size: .82rem; color: var(--muted); }
.dl .size { font-weight: 400; opacity: .8; font-size: .85em; }
.muted-in { font-weight: 400; opacity: .75; font-size: .85em; }
.dl.mine { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.dl.mine::after {
  content: attr(data-mine); position: absolute; top: -11px; right: 16px;
  background: var(--brand); color: var(--brand-ink); font-size: .75rem; font-weight: 700; padding: 1px 10px; border-radius: 999px;
}
.dl pre { margin: 0; padding: 12px; border-radius: 10px; background: var(--bg); font-size: .8rem; overflow-x: auto; }

/* faq */
details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 0 18px; margin-bottom: 10px; }
details[open] { padding-bottom: 14px; }
summary { cursor: pointer; padding: 14px 0; font-weight: 600; list-style: none; position: relative; padding-right: 28px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 0; top: 10px; font-size: 1.4rem; color: var(--brand); }
details[open] summary::after { content: "−"; }
details p { margin: 0; color: var(--muted); }

/* footer */
.foot { border-top: 1px solid var(--line); padding: 36px 0 48px; }
.foot-in { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; }
.foot .brand .mono { font-weight: 400; font-size: .8rem; letter-spacing: .08em; }
.foot nav { display: flex; flex-wrap: wrap; gap: 18px; }
.foot nav a { color: var(--muted); }
.foot p { flex-basis: 100%; margin: 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .demo-out .ch { transition: none; }
}
