:root {
  --accent: #1fa877;
  --accent-strong: #158a61;
  --accent-soft: #e3f7ee;
  --bg: #ffffff;
  --bg-alt: #f5f7f6;
  --text: #16201c;
  --muted: #5b6863;
  --line: #e2e7e5;
  --radius: 18px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --accent: #3fd39c;
    --accent-strong: #63e6b4;
    --accent-soft: #11291f;
    --bg: #0e1311;
    --bg-alt: #161d1a;
    --text: #e9f0ed;
    --muted: #9aa8a2;
    --line: #26302c;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

/* Language switching: both languages are in the page; the script shows one. English without script. */
html[lang="zh-Hans"] [lang="en"]:not(html),
html:not([lang="zh-Hans"]) [lang="zh-Hans"]:not(html) { display: none !important; }

a { color: var(--accent-strong); }
@media (prefers-color-scheme: light) { a { color: var(--accent-strong); } }

.wrap { max-width: 760px; margin: 0 auto; padding: 0 22px; }

header.top {
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 2;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
}
header.top .wrap { display: flex; align-items: center; gap: 18px; height: 58px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--text); text-decoration: none; }
.brand img { width: 30px; height: 30px; border-radius: 7px; }
nav.links { margin-left: auto; display: flex; gap: 18px; font-size: 15px; align-items: center; }
nav.links a { color: var(--muted); text-decoration: none; }
nav.links a:hover, nav.links a[aria-current="page"] { color: var(--text); }
.lang-toggle {
  font: inherit; font-size: 14px; color: var(--muted); background: none; cursor: pointer;
  border: 1px solid var(--line); border-radius: 99px; padding: 3px 11px;
}
.lang-toggle:hover { color: var(--text); }

.hero { text-align: center; padding: 72px 0 56px; }
.hero img.icon { width: 112px; height: 112px; border-radius: 25px; box-shadow: 0 10px 30px rgba(10, 80, 55, .25); }
.hero h1 { font-size: 46px; line-height: 1.1; margin: 26px 0 6px; letter-spacing: -0.02em; }
.hero h1 .zh-name { color: var(--muted); font-weight: 600; margin-left: .3em; }
.hero .tagline { font-size: 22px; color: var(--muted); margin: 0 0 22px; }
.hero .lead { max-width: 560px; margin: 0 auto 28px; }
.pill { display: inline-block; font-size: 14px; font-weight: 600; color: var(--accent-strong);
  background: var(--accent-soft); border-radius: 99px; padding: 5px 14px; }

.button {
  display: inline-block; background: var(--accent); color: #fff !important; text-decoration: none;
  font-weight: 600; border-radius: 13px; padding: 13px 26px; border: none; font-size: 17px;
}
.button:hover { background: var(--accent-strong); }
@media (prefers-color-scheme: dark) { .button { color: #062016 !important; } }
.button.disabled { background: var(--line); color: var(--muted) !important; pointer-events: none; }

section { padding: 44px 0; border-top: 1px solid var(--line); }
section h2 { font-size: 28px; margin: 0 0 18px; letter-spacing: -0.01em; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.card { background: var(--bg-alt); border-radius: var(--radius); padding: 18px 20px; }
.card h3 { margin: 0 0 6px; font-size: 18px; }
.card p { margin: 0; color: var(--muted); font-size: 16px; }

ol.steps { padding-left: 0; list-style: none; counter-reset: step; }
ol.steps li { counter-increment: step; position: relative; padding: 0 0 16px 46px; }
ol.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent-strong); font-weight: 700; display: grid; place-items: center;
}

.note { background: var(--accent-soft); border-radius: var(--radius); padding: 14px 18px; font-size: 16px; }

/* Long-form pages */
.doc { padding: 44px 0 30px; }
.doc h1 { font-size: 36px; margin: 0 0 4px; letter-spacing: -0.02em; }
.doc .meta { color: var(--muted); margin: 0 0 28px; }
.doc h2 { font-size: 22px; margin: 34px 0 8px; }
.doc h3 { font-size: 18px; margin: 24px 0 4px; }
.doc p, .doc li { color: var(--text); }
.doc ul { padding-left: 22px; }

details { background: var(--bg-alt); border-radius: 14px; padding: 4px 18px; margin: 0 0 10px; }
details summary { cursor: pointer; font-weight: 600; padding: 10px 0; }
details p { margin: 0 0 12px; color: var(--muted); }

footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; padding: 26px 0 40px; margin-top: 30px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 20px; }
footer a { color: var(--muted); }

@media (max-width: 560px) {
  body { font-size: 16px; }
  .hero { padding: 48px 0 40px; }
  .hero h1 { font-size: 38px; }
  nav.links { gap: 12px; font-size: 14px; }
  nav.links .hide-sm { display: none; }
}
