:root {
  --brand: #EE8672;
  --bg: #FFFFFF;
  --card: #F7F7F8;
  --text: #1C1C1E;
  --sub: #6E6E73;
  --line: #E5E5EA;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --card: #1C1C1E;
    --text: #F2F2F7;
    --sub: #98989F;
    --line: #2C2C2E;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "PingFang TC", "Helvetica Neue", Arial, sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Language switching: only the active language block is shown */
[data-i18n] { display: none; }
html[data-lang="en"] [data-i18n="en"],
html[data-lang="zh-Hans"] [data-i18n="zh-Hans"],
html[data-lang="zh-Hant"] [data-i18n="zh-Hant"] { display: block; }
html[data-lang="en"] span[data-i18n="en"],
html[data-lang="zh-Hans"] span[data-i18n="zh-Hans"],
html[data-lang="zh-Hant"] span[data-i18n="zh-Hant"] { display: inline; }

header.nav {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: 880px; margin: 0 auto; padding: 12px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--text); }
.brand-logo {
  width: 28px; height: 28px; border-radius: 7px;
  display: block; flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}
.brand-dot {
  width: 28px; height: 28px; border-radius: 7px; background: var(--brand);
  display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 15px;
}
.nav-links { display: flex; gap: 16px; font-size: 14px; flex-wrap: wrap; }
.nav-links a { color: var(--sub); }
.nav-links a.active { color: var(--brand); }
.lang-switch { display: flex; gap: 4px; }
.lang-switch button {
  border: 1px solid var(--line); background: transparent; color: var(--sub);
  font-size: 12px; padding: 4px 8px; border-radius: 6px; cursor: pointer;
}
.lang-switch button.active { background: var(--brand); border-color: var(--brand); color: #fff; }

main { max-width: 760px; margin: 0 auto; padding: 32px 20px 64px; }
h1 { font-size: 32px; line-height: 1.25; margin: 8px 0 4px; }
h2 { font-size: 20px; margin: 36px 0 8px; }
h3 { font-size: 16px; margin: 20px 0 4px; }
p, li { font-size: 16px; }
.meta { color: var(--sub); font-size: 14px; margin-bottom: 24px; }
.card {
  background: var(--card); border-radius: 14px; padding: 18px 20px; margin: 16px 0;
}
table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 12px 0; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--sub); font-weight: 600; }
details { background: var(--card); border-radius: 12px; padding: 14px 18px; margin: 10px 0; }
details summary { cursor: pointer; font-weight: 600; }
details[open] summary { margin-bottom: 8px; }
.btn {
  display: inline-block; background: var(--brand); color: #fff !important;
  padding: 12px 22px; border-radius: 12px; font-weight: 600;
}
.btn:hover { text-decoration: none; opacity: .9; }

/* Landing page */
.hero { text-align: center; padding: 40px 0 16px; }
.hero-logo {
  width: 88px; height: 88px; border-radius: 20px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  margin-bottom: 20px; display: inline-block;
}
.hero h1 { font-size: 40px; }
.hero p.lead { color: var(--sub); font-size: 18px; max-width: 560px; margin: 8px auto 24px; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-top: 32px; }
.feature { background: var(--card); border-radius: 16px; padding: 20px; }
.feature .icon { font-size: 26px; }
.feature h3 { margin: 8px 0 4px; }
.feature p { color: var(--sub); font-size: 15px; margin: 0; }

footer {
  border-top: 1px solid var(--line); color: var(--sub); font-size: 13px;
  text-align: center; padding: 24px 20px 40px;
  display: flex; flex-direction: column; gap: 8px; align-items: center;
}
footer a { color: var(--sub); margin: 0 8px; }
.icp-link {
  color: var(--sub);
  font-size: 12px;
}
.icp-link:hover {
  color: var(--brand);
}
