:root {
  --bg: #fbfbfa;
  --surface: #ffffff;
  --text: #1d1d1f;
  --muted: #5f6368;
  --line: #e6e6e3;
  --accent: #2f5bea;
  --accent-ink: #ffffff;
  --accent-soft: #eef2fe;
  --radius: 14px;
  --maxw: 1080px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111214;
    --surface: #1a1b1e;
    --text: #ececec;
    --muted: #a0a4ab;
    --line: #2c2e33;
    --accent: #7c9cff;
    --accent-ink: #0d1020;
    --accent-soft: #1d2440;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang HK", "Microsoft JhengHei", "Noto Sans TC", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* language toggle: show only the active language */
html[data-lang="zh"] [lang="en"]:not(html),
html[data-lang="en"] [lang="zh-Hant"]:not(html) { display: none !important; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

header.site {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
header.site .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 16px; }
.brand { font-weight: 800; letter-spacing: .14em; color: var(--text); font-size: 18px; }
.brand:hover { text-decoration: none; }
nav.main { display: flex; align-items: center; gap: 22px; font-size: 15px; }
nav.main a { color: var(--muted); }
nav.main a:hover { color: var(--text); text-decoration: none; }
.lang-btn {
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  border-radius: 999px; padding: 4px 12px; font-size: 13px; cursor: pointer;
}
.lang-group { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.lang-group .lang-btn { border: 0; border-radius: 0; padding: 4px 10px; background: var(--surface); color: var(--muted); }
.lang-group .lang-btn.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
@media (max-width: 640px) { nav.main a.hide-sm { display: none; } nav.main { gap: 14px; } }

.hero { padding: 88px 0 64px; }
.hero h1 { font-size: clamp(32px, 5vw, 52px); line-height: 1.15; margin: 0 0 18px; letter-spacing: -.01em; }
.hero p.lead { font-size: clamp(17px, 2vw, 20px); color: var(--muted); max-width: 640px; margin: 0 0 32px; }
.btns { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-block; padding: 12px 22px; border-radius: 999px; font-weight: 600; font-size: 15px;
  border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink);
}
.btn:hover { text-decoration: none; filter: brightness(1.06); }
.btn.ghost { background: transparent; color: var(--accent); }
.pay-note { margin-top: 18px; font-size: 14px; color: var(--muted); }

section.block { padding: 64px 0; border-top: 1px solid var(--line); }
section.block h2 { font-size: 28px; margin: 0 0 8px; }
section.block .sub { color: var(--muted); margin: 0 0 32px; }

.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; display: flex; flex-direction: column;
}
.card h3 { margin: 0 0 6px; font-size: 17px; }
.card p { margin: 0 0 16px; color: var(--muted); font-size: 14.5px; flex: 1; }
.price { font-size: 22px; font-weight: 700; }
.price small { font-size: 13px; font-weight: 500; color: var(--muted); }
.tag { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); margin-bottom: 10px; align-self: flex-start; }

.steps { counter-reset: s; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.steps div { padding: 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.steps div::before { counter-increment: s; content: counter(s); display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 700; margin-bottom: 10px; }
.steps h3 { margin: 0 0 4px; font-size: 16px; }
.steps p { margin: 0; color: var(--muted); font-size: 14.5px; }

.contact-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; max-width: 640px; }
.contact-box p { margin: 0 0 10px; }

footer.site { border-top: 1px solid var(--line); padding: 32px 0 48px; color: var(--muted); font-size: 14px; }
footer.site .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
footer.site nav { display: flex; flex-wrap: wrap; gap: 18px; }
footer.site a { color: var(--muted); }

/* policy pages */
article.policy { padding: 56px 0 72px; max-width: 760px; }
article.policy h1 { font-size: 32px; margin: 0 0 6px; }
article.policy .updated { color: var(--muted); margin: 0 0 32px; font-size: 14px; }
article.policy h2 { font-size: 19px; margin: 32px 0 8px; }
article.policy p, article.policy li { color: var(--text); }
article.policy ul { padding-left: 20px; }
