:root {
  --bg: #f6f3ee;
  --surface: #ffffff;
  --surface-2: #efeae2;
  --text: #1b1a19;
  --muted: #6b6661;
  --line: #e2dcd2;
  --red: #e5323f;
  --green: #22b35e;
  --amber: #f2a516;
  --accent: var(--red);
  --radius: 18px;
  --shadow: 0 1px 2px rgb(0 0 0 / .04), 0 8px 24px rgb(0 0 0 / .06);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111012;
    --surface: #1b1a1d;
    --surface-2: #242226;
    --text: #f3f1ee;
    --muted: #a39e98;
    --line: #2f2c31;
    --red: #ff4d58;
    --green: #35d07a;
    --amber: #ffbd3a;
    --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 8px 24px rgb(0 0 0 / .3);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

/* Language: every page carries both; html[lang] decides which shows. */
html[lang="en"] [data-l="zh"], html:not([lang="en"]) [data-l="en"] { display: none !important; }

.wrap { max-width: 920px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 720px; }

/* Header */
.top { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 16px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.nav { display: flex; gap: 18px; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { color: var(--muted); font-size: 15px; white-space: nowrap; }
.nav a.on, .nav a:hover { color: var(--text); text-decoration: none; }
.lang { border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 999px; padding: 4px 12px; font: inherit; font-size: 14px; cursor: pointer; white-space: nowrap; }

/* Hero */
.hero { padding: 64px 0 40px; text-align: center; }
.hero .icon { width: 128px; height: 128px; border-radius: 29px; margin: 0 auto 24px; box-shadow: var(--shadow); }
.hero h1 { font-size: clamp(34px, 7vw, 54px); line-height: 1.1; margin: 0 0 14px; letter-spacing: -.02em; }
.hero p.lead { font-size: clamp(17px, 2.6vw, 20px); color: var(--muted); max-width: 600px; margin: 0 auto 28px; }
.lights { display: inline-flex; gap: 10px; margin-bottom: 26px; padding: 10px 14px; background: #1b1a19; border-radius: 999px; }
.lights i { width: 18px; height: 18px; border-radius: 50%; background: #3a3633; }
.lights i.r { background: var(--red); box-shadow: 0 0 14px var(--red); animation: blink 3.2s infinite; }
.lights i.y { animation: amber 3.2s infinite; }
.lights i.g { animation: go 3.2s infinite; }
@keyframes blink { 0%, 55% { background: var(--red); box-shadow: 0 0 14px var(--red); } 60%, 100% { background: #3a3633; box-shadow: none; } }
@keyframes amber { 0%, 40% { background: #3a3633; box-shadow: none; } 45%, 58% { background: var(--amber); box-shadow: 0 0 14px var(--amber); } 60%, 100% { background: #3a3633; box-shadow: none; } }
@keyframes go { 0%, 58% { background: #3a3633; box-shadow: none; } 60%, 100% { background: var(--green); box-shadow: 0 0 14px var(--green); } }
@media (prefers-reduced-motion: reduce) { .lights i { animation: none !important; } }

.store { display: inline-flex; align-items: center; gap: 10px; background: var(--text); color: var(--bg); padding: 12px 22px; border-radius: 14px; font-weight: 600; }
.store:hover { text-decoration: none; opacity: .9; }
.store svg { width: 22px; height: 22px; fill: currentColor; }
.sub { color: var(--muted); font-size: 14px; margin-top: 12px; }

/* Sections */
section { padding: 36px 0; }
h2 { font-size: 28px; letter-spacing: -.01em; margin: 0 0 8px; }
h3 { font-size: 19px; margin: 28px 0 8px; }
.kicker { color: var(--muted); margin: 0 0 24px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.card .em { font-size: 28px; line-height: 1; margin-bottom: 10px; }
.card h4 { margin: 0 0 6px; font-size: 17px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }
.tag { display: inline-block; font-size: 12px; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); margin-left: 6px; vertical-align: 2px; }
.tag.paid { background: color-mix(in srgb, var(--amber) 20%, transparent); color: color-mix(in srgb, var(--amber) 70%, var(--text)); }

.tiers { display: flex; flex-wrap: wrap; gap: 8px; }
.tiers span { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: 15px; }

/* Documents */
.doc { padding-top: 40px; padding-bottom: 24px; }
.doc h1 { font-size: clamp(28px, 5vw, 38px); margin: 0 0 6px; letter-spacing: -.01em; }
.doc .meta { color: var(--muted); font-size: 14px; margin: 0 0 28px; }
.doc h2 { font-size: 22px; margin: 36px 0 10px; }
.doc p, .doc li { color: var(--text); }
.doc ul { padding-left: 1.3em; }
.doc li { margin: 4px 0; }
.doc table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 15px; display: block; overflow-x: auto; }
.doc th, .doc td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.doc th { color: var(--muted); font-weight: 600; white-space: nowrap; }
.doc td:first-child { white-space: nowrap; }
.note { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--green); border-radius: 12px; padding: 14px 16px; margin: 16px 0; }
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; }
.toc a { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; font-size: 14px; color: var(--text); }
details { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 0 16px; margin: 10px 0; }
details summary { cursor: pointer; padding: 14px 0; font-weight: 600; list-style: none; }
details summary::-webkit-details-marker { display: none; }
details summary::after { content: "+"; float: right; color: var(--muted); font-weight: 400; }
details[open] summary::after { content: "–"; }
details > div { padding: 0 0 14px; color: var(--text); }

/* Form */
form.support { display: grid; gap: 14px; margin-top: 12px; }
form.support label { display: grid; gap: 6px; font-weight: 600; font-size: 15px; }
form.support input, form.support select, form.support textarea { font: inherit; font-weight: 400; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 11px 13px; width: 100%; }
form.support textarea { min-height: 150px; resize: vertical; }
form.support input:focus, form.support select:focus, form.support textarea:focus { outline: 2px solid color-mix(in srgb, var(--accent) 50%, transparent); outline-offset: 1px; }
.btn { background: var(--accent); color: #fff; border: 0; border-radius: 12px; padding: 12px 22px; font: inherit; font-weight: 600; cursor: pointer; justify-self: start; }
.btn:hover { filter: brightness(1.05); }
.hint { color: var(--muted); font-size: 14px; font-weight: 400; }
.hidden { display: none; }

/* Footer */
footer { border-top: 1px solid var(--line); margin-top: 40px; padding: 28px 0 40px; color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; }
footer nav { display: flex; flex-wrap: wrap; gap: 8px 18px; }
footer a { color: var(--muted); }
footer .copy { margin-left: auto; }

@media (max-width: 640px) {
  .top .wrap { gap: 10px; }
  .brand span { display: none; }
  .nav { gap: 14px; }
  .hero { padding-top: 44px; }
  footer .copy { margin-left: 0; width: 100%; }
}
