:root {
  color-scheme: light;
  --bg: #f7f8fa;
  --panel: #ffffff;
  --text: #18202a;
  --muted: #667085;
  --line: #d9dee7;
  --primary: #0f6bff;
  --primary-dark: #084fcb;
  --accent: #10a37f;
  --shadow: 0 18px 55px rgba(24, 32, 42, 0.08);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  letter-spacing: 0;
}

a { color: inherit; text-decoration: none; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 0 5vw;
  background: rgba(247, 248, 250, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 210px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--text);
  color: #fff;
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
  line-height: 1.15;
}

.brand small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.nav a {
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.15;
}

.nav a:hover { background: #eef2f7; color: var(--text); }

.nav a small {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  line-height: 1.1;
}

.lang-switch {
  position: relative;
  margin-left: auto;
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.lang-toggle:hover {
  border-color: #b9c2d0;
}

.lang-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  display: none;
  min-width: 170px;
  padding: 8px;
  border: 1px solid #202733;
  border-radius: 18px;
  background: #111318;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.22);
  z-index: 30;
}

.lang-menu.open {
  display: grid;
  gap: 6px;
}

.lang-menu button {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #9aa7bd;
  font: inherit;
  cursor: pointer;
  text-align: left;
}

.lang-menu button:hover,
.lang-menu button.active {
  background: #20242c;
  color: #fff;
}

main {
  width: min(1180px, 90vw);
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  gap: 32px;
  min-height: 540px;
  align-items: center;
  padding: 72px 0 46px;
}

.hero h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 1.02;
  letter-spacing: 0;
}

.hero h1 .en,
.hero .lead .en,
.status-panel .en,
.grid-4 p .en,
.guide-steps .en,
.steps .en,
.mock-title .en,
.mock-line .en,
.mock-input .en {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.86em;
  line-height: 1.45;
}

[data-lang="en"] .hero h1 .cn,
[data-lang="en"] .hero .lead .cn,
[data-lang="en"] .status-panel .cn,
[data-lang="en"] .grid-4 p .cn,
[data-lang="en"] .guide-steps .cn,
[data-lang="en"] .steps .cn,
[data-lang="en"] .mock-title .cn,
[data-lang="en"] .mock-line .cn,
[data-lang="en"] .mock-input .cn {
  display: none;
}

[data-lang="zh-CN"] .hero h1 .en,
[data-lang="zh-CN"] .hero .lead .en,
[data-lang="zh-CN"] .status-panel .en,
[data-lang="zh-CN"] .grid-4 p .en,
[data-lang="zh-CN"] .guide-steps .en,
[data-lang="zh-CN"] .steps .en,
[data-lang="zh-CN"] .mock-title .en,
[data-lang="zh-CN"] .mock-line .en,
[data-lang="zh-CN"] .mock-input .en {
  display: none;
}

.lead {
  max-width: 760px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.8;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.button:hover { border-color: #b9c2d0; }
.button.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.button.primary:hover { background: var(--primary-dark); }
.button.small { min-height: 36px; padding: 0 12px; font-size: 13px; }

.status-panel {
  align-self: end;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.status-panel > div {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-weight: 800;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 6px rgba(16, 163, 127, 0.12);
}

.status-panel strong {
  display: block;
  margin-top: 18px;
  font-size: 24px;
  line-height: 1.25;
}

.status-panel p {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.section {
  padding: 52px 0;
  border-top: 1px solid var(--line);
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.section h2 {
  margin: 0;
  font-size: 34px;
  line-height: 1.15;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.grid-4 article,
.download-card,
.faq details {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.grid-4 article {
  padding: 20px;
}

.grid-4 h2,
.download-card h3 {
  margin: 0;
  font-size: 18px;
}

.grid-4 p,
.download-card p,
.faq p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.muted { color: var(--muted); font-size: 14px; }

.platform-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.platform-card {
  display: grid;
  gap: 18px;
  min-height: 330px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.platform-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.platform-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.platform-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 8px;
  background: #eef5ff;
  color: var(--primary);
  font-size: 15px;
  font-weight: 900;
}

.platform-card h3,
.app-card h4,
.guide-card h3 {
  margin: 0;
  font-size: 20px;
}

.platform-card p,
.app-card p,
.guide-card p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.guide-card p .en,
.guide-card p .cn,
.steps p .en,
.steps p .cn {
  display: block;
  margin-top: 4px;
}

.app-list {
  display: grid;
  gap: 12px;
}

.app-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafbfc;
}

.app-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.app-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.download-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.download-card {
  padding: 20px;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.download-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.tag {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 9px;
  border: 1px solid #cfd6e1;
  border-radius: 999px;
  color: #344054;
  background: #f8fafc;
  font-size: 12px;
  font-weight: 700;
}

.asset-list {
  display: grid;
  gap: 8px;
  margin-top: auto;
}

.asset-link {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafbfc;
  font-size: 13px;
}

.asset-link:hover { border-color: var(--primary); }
.asset-link span:first-child { overflow-wrap: anywhere; }
.asset-link span:last-child { color: var(--muted); white-space: nowrap; }

.guide-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.guide-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.guide-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.step-badge {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 10px;
  border-radius: 8px;
  background: #eef5ff;
  color: var(--primary);
  font-size: 13px;
  font-weight: 900;
}

.guide-steps {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.guide-steps li {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  align-items: start;
}

.guide-steps span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: #f0f2f6;
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

.guide-steps p { margin: 4px 0 0; }

.mock-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.mock-panel {
  min-height: 190px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(24, 32, 42, 0.05);
}

.mock-title {
  margin-bottom: 14px;
  color: var(--text);
  font-size: 18px;
  font-weight: 900;
}

.mock-line,
.mock-input {
  margin-top: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafbfc;
  color: var(--muted);
  font-weight: 700;
}

.mock-line.active {
  border-color: #adc9ff;
  background: #eef5ff;
  color: var(--primary);
}

.mock-input {
  min-height: 48px;
  color: #98a2b3;
}

.mock-actions {
  display: flex;
  justify-content: flex-end;
  gap: 14px;
  margin-top: 18px;
  color: var(--muted);
}

.mock-actions strong {
  color: var(--primary);
}

code {
  display: block;
  margin: 14px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f9fc;
  color: #101828;
  overflow-wrap: anywhere;
  font-size: 13px;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: 34px;
}

.split p {
  color: var(--muted);
  line-height: 1.8;
}

.steps {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.steps li {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 12px;
  align-items: start;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.steps span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #eef5ff;
  color: var(--primary);
  font-weight: 800;
}

.steps p { margin: 5px 0 0; }

.faq {
  display: grid;
  gap: 12px;
}

.faq details {
  padding: 18px 20px;
}

.faq summary {
  cursor: pointer;
  font-weight: 800;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  width: min(1180px, 90vw);
  margin: 0 auto;
  padding: 28px 0 44px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 14px;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  min-width: 180px;
  max-width: min(420px, calc(100vw - 40px));
  padding: 12px 14px;
  border-radius: 8px;
  background: #101828;
  color: #fff;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: 180ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  .hero,
  .split {
    grid-template-columns: 1fr;
  }
  .status-panel { align-self: auto; }
  .grid-4,
  .download-grid,
  .platform-grid,
  .guide-layout,
  .mock-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    padding-top: 14px;
    padding-bottom: 14px;
  }
  .nav {
    justify-content: flex-start;
  }
  .hero {
    min-height: auto;
    padding-top: 48px;
  }
  .section-head,
  .footer {
    align-items: flex-start;
    flex-direction: column;
  }
  .grid-4,
  .download-grid,
  .platform-grid,
  .guide-layout,
  .mock-row {
    grid-template-columns: 1fr;
  }
}
