:root {
  --bg: #f5f5f7;
  --bg-alt: #ffffff;
  --surface: #ffffff;
  --surface-2: #f0f2f5;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --border: #e3e4e8;
  --accent: #0c63e5;
  --accent-hover: #0a55c4;
  --accent-soft: #e6effd;
  --accent-text: #ffffff;
  --focus: rgba(12, 99, 229, 0.4);
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 8px 24px rgba(16, 24, 40, 0.06);
  --nav-bg: rgba(245, 245, 247, 0.78);
  --radius: 14px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1012;
    --bg-alt: #16171a;
    --surface: #1c1d21;
    --surface-2: #26272c;
    --text: #f2f2f4;
    --muted: #a1a1a9;
    --border: #2d2e33;
    --accent: #3d8bff;
    --accent-hover: #5c9dff;
    --accent-soft: #16294a;
    --accent-text: #ffffff;
    --focus: rgba(61, 139, 255, 0.45);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
    --nav-bg: rgba(15, 16, 18, 0.78);
    color-scheme: dark;
  }
}

/* Only the chosen language is shown. */
html[lang="en"] [data-l="zh"],
html:not([lang="en"]) [data-l="en"] {
  display: none !important;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 6px;
}

code {
  font: 0.9em/1.4 ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  background: var(--surface-2);
  border-radius: 6px;
  padding: 0.1em 0.4em;
  overflow-wrap: anywhere;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

.wrap-narrow {
  max-width: 800px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 20;
  background: var(--surface);
  padding: 8px 14px;
  border-radius: 8px;
}

.skip:focus {
  left: 8px;
}

/* ------------------------------------------------------------------ nav */

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--nav-bg);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 56px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 600;
  white-space: nowrap;
}

.brand:hover {
  text-decoration: none;
}

.brand img {
  border-radius: 7px;
}

.nav-links {
  display: flex;
  gap: 22px;
  margin-left: auto;
  font-size: 14px;
}

.nav-links a {
  color: var(--muted);
}

.nav-links a:hover {
  color: var(--text);
  text-decoration: none;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Pages without section links keep the actions on the right. */
.brand + .nav-actions {
  margin-left: auto;
}

.segmented {
  display: inline-flex;
  padding: 2px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 9px;
}

.segmented button {
  font: inherit;
  font-size: 13px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 7px;
  padding: 3px 10px;
  cursor: pointer;
}

.segmented button[aria-pressed="true"] {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}

.icon-link {
  display: inline-flex;
  color: var(--muted);
}

.icon-link:hover {
  color: var(--text);
}

/* ------------------------------------------------------------------ hero */

.hero {
  padding: 88px 0 72px;
  text-align: center;
  background: radial-gradient(1200px 420px at 50% -10%, var(--accent-soft), transparent 70%);
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-icon {
  border-radius: 22px;
  box-shadow: 0 12px 32px rgba(12, 99, 229, 0.28);
  margin-bottom: 28px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.hero h1 {
  font-size: clamp(32px, 5.4vw, 56px);
  letter-spacing: -0.025em;
  line-height: 1.1;
}

.lead {
  max-width: 680px;
  margin: 22px auto 0;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.55;
}

.cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 32px;
}

.requirements {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 13px;
}

/* ------------------------------------------------------------------ buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-text);
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-secondary {
  background: var(--surface);
  color: var(--accent);
  border-color: var(--border);
}

.btn-secondary:hover {
  border-color: var(--accent);
}

.btn-small {
  min-height: 30px;
  padding: 4px 14px;
  font-size: 13px;
  background: var(--surface);
  color: var(--accent);
  border-color: var(--border);
}

.btn-small:hover {
  border-color: var(--accent);
}

/* ------------------------------------------------------------------ sections */

.section {
  padding: 80px 0;
}

.section-alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section h2 {
  font-size: clamp(26px, 3.6vw, 36px);
  letter-spacing: -0.02em;
  margin-bottom: 28px;
}

.section-lead {
  max-width: 720px;
  margin: -12px 0 36px;
  color: var(--muted);
  font-size: 17px;
}

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

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

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.card h3 {
  font-size: 18px;
  margin: 14px 0 8px;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent);
}

.card-icon svg,
.node-sub svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ------------------------------------------------------------------ diagram */

.diagram {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 56px minmax(0, 1fr) 56px minmax(0, 1fr);
  align-items: center;
}

.node {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  text-align: center;
  box-shadow: var(--shadow);
}

.node-center {
  border-color: var(--accent);
  background: linear-gradient(var(--accent-soft), var(--surface));
}

.node-title {
  font-weight: 600;
  font-size: 17px;
}

.node p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.node-sub {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 13px;
}

.node-sub svg {
  width: 18px;
  height: 18px;
  color: var(--accent);
}

/* A two-way arrow between nodes. */
.link {
  position: relative;
  height: 2px;
  margin: 0 8px;
  background: var(--accent);
  opacity: 0.6;
}

.link::before,
.link::after {
  content: "";
  position: absolute;
  top: -4px;
  width: 8px;
  height: 8px;
  border-top: 2px solid var(--accent);
  border-right: 2px solid var(--accent);
}

.link::before {
  left: 0;
  transform: rotate(-135deg);
}

.link::after {
  right: 0;
  transform: rotate(45deg);
}

/* ------------------------------------------------------------------ steps */

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

.step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 28px;
  box-shadow: var(--shadow);
}

.step > p {
  margin: 0 0 16px;
}

.step > p:last-child {
  margin-bottom: 0;
}

.step-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.step-head h3 {
  font-size: 20px;
}

.step-num {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 700;
  font-size: 15px;
}

.substeps {
  margin: 0 0 18px;
  padding-left: 1.3em;
}

.substeps li {
  margin: 6px 0;
}

.substeps li::marker {
  color: var(--muted);
}

.address {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  margin: 0 0 18px;
  padding: 12px 14px;
  background: var(--surface-2);
  border-radius: 10px;
}

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

.address code {
  background: transparent;
  padding: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.address .btn-small {
  margin-left: auto;
}

.browsers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.browser {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px 4px;
}

.browser h4 {
  font-size: 16px;
  margin-bottom: 8px;
}

.note {
  margin: -8px 0 16px;
  color: var(--muted);
  font-size: 14px;
}

/* ------------------------------------------------------------------ faq */

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

.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0 20px;
}

.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 28px 16px 0;
  position: relative;
  font-weight: 600;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "";
  position: absolute;
  right: 4px;
  top: 50%;
  width: 8px;
  height: 8px;
  margin-top: -6px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 0.2s;
}

.faq details[open] summary::after {
  transform: rotate(-135deg);
  margin-top: -2px;
}

.faq details p,
.faq details ul {
  margin: 0 0 18px;
  color: var(--muted);
}

.faq details ul {
  padding-left: 1.2em;
}

.faq details li {
  margin: 4px 0;
}

/* ------------------------------------------------------------------ contact */

.contact {
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 48px 32px;
  box-shadow: var(--shadow);
}

.contact h2 {
  margin-bottom: 14px;
}

.contact p {
  max-width: 560px;
  margin: 0 auto;
  color: var(--muted);
}

.contact-methods {
  display: grid;
  gap: 10px;
  max-width: 440px;
  margin: 26px auto 0;
  text-align: left;
}

.contact-method {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--surface-2);
  border-radius: 10px;
}

.contact-label {
  flex: none;
  min-width: 3.5em;
  color: var(--muted);
  font-size: 14px;
}

.contact-value {
  font-weight: 600;
  color: var(--text);
  overflow-wrap: anywhere;
}

a.contact-value {
  color: var(--accent);
}

.contact-method .btn-small {
  margin-left: auto;
}

/* ------------------------------------------------------------------ policy page */

.doc-page {
  padding: 56px 0 72px;
}

.doc h1 {
  font-size: clamp(30px, 4.4vw, 40px);
  letter-spacing: -0.02em;
}

.doc-meta {
  margin: 10px 0 32px;
  color: var(--muted);
  font-size: 14px;
}

.doc h2 {
  font-size: 21px;
  margin: 36px 0 12px;
}

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

.doc p {
  margin: 0 0 14px;
}

.doc ul {
  margin: 0 0 14px;
  padding-left: 1.3em;
}

.doc li {
  margin: 8px 0;
}

.doc li::marker {
  color: var(--muted);
}

/* ------------------------------------------------------------------ footer */

.footer {
  border-top: 1px solid var(--border);
  padding: 28px 0 40px;
  color: var(--muted);
  font-size: 14px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  color: var(--muted);
}

/* ------------------------------------------------------------------ narrow screens */

@media (max-width: 900px) {
  .features {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nav-links {
    display: none;
  }

  .nav-actions {
    margin-left: auto;
  }
}

@media (max-width: 720px) {
  .wrap {
    padding: 0 16px;
  }

  .hero {
    padding: 56px 0 48px;
  }

  .hero-icon {
    width: 80px;
    height: 80px;
  }

  .hero h1 br {
    display: none;
  }

  .section {
    padding: 56px 0;
  }

  .features,
  .browsers {
    grid-template-columns: minmax(0, 1fr);
  }

  .diagram {
    grid-template-columns: minmax(0, 1fr);
    justify-items: stretch;
  }

  /* Vertical two-way arrows between stacked nodes. */
  .link {
    width: 2px;
    height: 40px;
    margin: 6px auto;
  }

  .link::before {
    top: 0;
    left: -5px;
    transform: rotate(-45deg);
  }

  .link::after {
    top: auto;
    bottom: 0;
    right: auto;
    left: -5px;
    transform: rotate(135deg);
  }

  .step {
    padding: 22px 18px;
  }

  .brand span {
    display: none;
  }

  .contact {
    padding: 36px 20px;
  }

  .btn {
    white-space: normal;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .faq summary::after {
    transition: none;
  }
}
