:root {
  color-scheme: light dark;
  --bg: #f6f8fb;
  --panel: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --blue: #0a84ff;
  --blue-dark: #075bb5;
  --green: #12b981;
  --red: #ff3b30;
  --shadow: 0 24px 70px rgba(15, 23, 42, 0.10);
  --soft-shadow: 0 14px 40px rgba(15, 23, 42, 0.07);
  --content: 1120px;
  --doc: 840px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  background:
    radial-gradient(circle at top left, rgba(10, 132, 255, 0.12), transparent 36rem),
    radial-gradient(circle at 90% 20%, rgba(18, 185, 129, 0.10), transparent 28rem),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  line-height: 1.62;
}

body:not([data-lang]) [lang-block],
body[data-lang="zh"] [lang-block="en"],
body[data-lang="en"] [lang-block="zh"],
body[data-lang="zh"] .en-only,
body[data-lang="en"] .zh-only {
  display: none !important;
}

a {
  color: inherit;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  width: 100%;
  max-width: 100vw;
  border-bottom: 1px solid rgba(226, 232, 240, 0.82);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(20px);
}

.nav {
  width: min(var(--content), calc(100% - 40px));
  min-height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: var(--text);
  text-decoration: none;
  font-size: 18px;
  font-weight: 850;
}

.brand picture {
  display: block;
  flex: 0 0 auto;
  line-height: 0;
}

.brand img {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(10, 132, 255, 0.22);
}

.nav-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  min-width: 0;
  max-width: 100%;
  color: var(--muted);
  font-size: 15px;
  font-weight: 750;
}

.nav-links a {
  padding: 8px 12px;
  border-radius: 999px;
  text-decoration: none;
}

.nav-links a:hover {
  background: #eef6ff;
  color: var(--blue-dark);
}

.language-switch {
  display: inline-flex;
  gap: 4px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
}

.language-switch button {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 8px 12px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
}

.language-switch button[aria-pressed="true"] {
  background: var(--blue);
  color: #fff;
}

.page {
  width: min(var(--content), calc(100% - 40px));
  margin: 0 auto;
  padding: 140px 0 88px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(380px, 480px);
  gap: clamp(36px, 5vw, 72px);
  align-items: center;
  min-height: calc(100vh - 92px);
}

.hero > * {
  min-width: 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin-bottom: 18px;
  padding: 8px 12px;
  border-radius: 999px;
  background: #e8f2ff;
  color: var(--blue-dark);
  font-size: 14px;
  font-weight: 850;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.08;
  letter-spacing: 0;
}

h1 {
  max-width: 760px;
  font-size: clamp(48px, 6.4vw, 80px);
  overflow-wrap: anywhere;
}

h2 {
  font-size: clamp(30px, 4.2vw, 48px);
}

h3 {
  font-size: 22px;
}

.lead {
  max-width: 720px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: clamp(18px, 2vw, 21px);
  line-height: 1.72;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  text-decoration: none;
  font-weight: 850;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.button.primary {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.button.disabled {
  cursor: not-allowed;
  opacity: 0.72;
}

.app-store-badge {
  display: inline-block;
  width: 190px;
  line-height: 0;
  text-decoration: none;
  filter: drop-shadow(0 10px 26px rgba(0, 0, 0, 0.18));
}

.app-store-badge img {
  display: block;
  width: 100%;
  height: auto;
}

.hero-art {
  position: relative;
  min-height: 560px;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  overflow: hidden;
}

.hero-diagram {
  display: block;
  width: min(100%, 620px);
  max-width: 100%;
  height: auto;
}

.section {
  margin-top: 84px;
}

.grid {
  display: grid;
  gap: 18px;
}

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--soft-shadow);
}

.card p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}

.card ul {
  margin: 14px 0 0;
  padding-left: 20px;
  color: var(--muted);
}

.screenshot-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin-top: 28px;
}

.screenshot-row img {
  width: 100%;
  border-radius: 22px;
  box-shadow: var(--soft-shadow);
}

.doc {
  width: min(var(--doc), calc(100% - 40px));
  max-width: var(--doc);
  padding-top: 148px;
}

.doc > .eyebrow {
  margin-bottom: 20px;
}

.doc > [lang-block] {
  padding-bottom: 4px;
}

.doc > [lang-block] .lead {
  max-width: 680px;
}

.doc section {
  margin-top: 30px;
  padding: clamp(26px, 4vw, 42px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 56px rgba(15, 23, 42, 0.08);
}

.doc h1 {
  max-width: var(--doc);
  font-size: clamp(42px, 6vw, 64px);
}

.doc h2 {
  font-size: clamp(28px, 4vw, 38px);
  margin-bottom: 18px;
}

.doc h3 {
  margin: 34px 0 12px;
  padding-top: 24px;
  border-top: 1px solid rgba(226, 232, 240, 0.9);
  font-size: clamp(22px, 3vw, 28px);
}

.doc h2 + h3 {
  margin-top: 22px;
}

.doc p {
  margin: 12px 0;
  color: #253044;
  font-size: 17px;
  line-height: 1.82;
}

.doc ul {
  margin: 14px 0 0;
  padding-left: 24px;
  color: #253044;
  font-size: 17px;
  line-height: 1.78;
}

.doc li {
  margin: 8px 0;
}

.note {
  margin-top: 24px;
  padding: 18px 20px;
  border-radius: 18px;
  background: #f2f8ff;
  color: #184d80;
  border: 1px solid #cfe6ff;
}

.footer {
  width: min(var(--content), calc(100% - 40px));
  margin: 0 auto;
  padding: 34px 0 48px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 14px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #070b14;
    --panel: #111827;
    --text: #f8fafc;
    --muted: #a8b3c7;
    --line: #263244;
    --blue: #3aa0ff;
    --blue-dark: #94caff;
    --green: #6ee7b7;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
    --soft-shadow: 0 16px 44px rgba(0, 0, 0, 0.32);
  }

  body {
    background:
      radial-gradient(circle at top left, rgba(58, 160, 255, 0.18), transparent 34rem),
      radial-gradient(circle at 88% 18%, rgba(110, 231, 183, 0.10), transparent 28rem),
      linear-gradient(180deg, #050812 0%, var(--bg) 100%);
  }

  .site-header {
    border-bottom-color: rgba(38, 50, 68, 0.82);
    background: rgba(5, 8, 18, 0.82);
  }

  .brand img {
    outline: 1px solid rgba(255, 255, 255, 0.48);
    outline-offset: 0;
    box-shadow:
      0 8px 22px rgba(0, 0, 0, 0.34),
      0 0 0 1px rgba(255, 255, 255, 0.10);
  }

  .nav-links a:hover {
    background: rgba(58, 160, 255, 0.14);
    color: var(--blue-dark);
  }

  .language-switch {
    background: rgba(15, 23, 42, 0.86);
  }

  .button {
    background: rgba(15, 23, 42, 0.92);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.26);
  }

  .button.primary {
    color: #06101f;
  }

  .eyebrow {
    background: rgba(58, 160, 255, 0.14);
  }

  .card {
    background: rgba(17, 24, 39, 0.86);
  }

  .screenshot-row img {
    border: 1px solid rgba(148, 163, 184, 0.16);
  }

  .doc section {
    background: rgba(17, 24, 39, 0.92);
    box-shadow: 0 18px 56px rgba(0, 0, 0, 0.30);
  }

  .doc h3 {
    border-top-color: rgba(38, 50, 68, 0.95);
  }

  .doc p,
  .doc ul {
    color: #d5dce9;
  }

  .note {
    background: rgba(58, 160, 255, 0.12);
    color: #c7e3ff;
    border-color: rgba(87, 167, 255, 0.34);
  }
}

@media (max-width: 860px) {
  .nav {
    align-items: flex-start;
    padding: 14px 0;
    flex-direction: column;
    gap: 12px;
  }

  .nav-links {
    width: 100%;
    overflow: visible;
    padding-bottom: 4px;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 38px;
    min-height: 0;
  }

  .page {
    padding-top: 168px;
  }

  .hero-art {
    min-height: 300px;
    max-width: 100%;
    overflow: hidden;
  }

  .grid.three,
  .grid.two {
    grid-template-columns: 1fr;
  }

  .screenshot-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-diagram {
    width: min(100%, 560px);
  }
}

@media (max-width: 520px) {
  .page {
    width: min(100% - 24px, var(--content));
    padding-top: 168px;
  }

  .brand span {
    font-size: 15px;
  }

  h1 {
    font-size: clamp(38px, 10.5vw, 48px);
  }

  .lead {
    font-size: 18px;
  }

  .actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-art {
    min-height: 230px;
  }

  .hero-diagram {
    width: min(100%, 480px);
  }

  .card,
  .doc section {
    padding: 22px;
    border-radius: 20px;
  }

  .doc {
    width: min(100% - 24px, var(--doc));
    padding-top: 168px;
  }

  .doc h1 {
    font-size: clamp(36px, 10vw, 46px);
  }

  .doc h2 {
    font-size: 28px;
  }

  .doc h3 {
    font-size: 23px;
    margin-top: 28px;
    padding-top: 20px;
  }

  .doc p,
  .doc ul {
    font-size: 16px;
  }

  .screenshot-row {
    grid-template-columns: 1fr;
  }
}
