/* Xi·Track support site */
:root {
  --bg: #f4f5f7;
  --card: #ffffff;
  --text: #1c1c1e;
  --text-2: #63636b;
  --text-3: #9a9aa2;
  --accent: #0a84ff;
  --accent-2: #30b0c7;
  --line: #e6e6eb;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 8px 24px rgba(16, 24, 40, 0.06);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

/* language visibility: default zh, html[lang="en"] shows en */
html:not([lang="en"]) .lang-en { display: none; }
html[lang="en"] .lang-zh { display: none; }

/* ---------- nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
  height: 58px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.brand-logo svg { width: 30px; height: 30px; display: block; border-radius: 8px; }
.brand-name { font-weight: 700; font-size: 17px; }
.brand-name em { font-style: normal; font-weight: 500; color: var(--text-2); font-size: 14px; }

.nav-links { display: flex; gap: 4px; margin-left: auto; }
.nav-links a {
  color: var(--text-2);
  font-size: 14.5px;
  padding: 6px 12px;
  border-radius: 999px;
  transition: background 0.15s, color 0.15s;
}
.nav-links a:hover { background: #eceef2; color: var(--text); }
.nav-links a.active { color: var(--accent); font-weight: 600; }

.lang-toggle {
  display: flex;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 3px;
  cursor: pointer;
  font-family: inherit;
}
.lang-toggle span {
  font-size: 12.5px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  color: var(--text-3);
  transition: all 0.15s;
}
.lang-toggle span.on { background: var(--accent); color: #fff; }

/* ---------- hero ---------- */
.hero {
  text-align: center;
  padding: 88px 20px 72px;
  background:
    radial-gradient(600px 300px at 20% 0%, rgba(10, 132, 255, 0.10), transparent 70%),
    radial-gradient(600px 300px at 80% 10%, rgba(48, 176, 199, 0.10), transparent 70%),
    var(--bg);
}

.hero-logo svg {
  width: 84px;
  height: 84px;
  border-radius: 22px;
  box-shadow: 0 12px 32px rgba(10, 132, 255, 0.28);
}

.hero-title { font-size: 44px; font-weight: 800; letter-spacing: 0.5px; margin-top: 20px; }
.hero-title em { font-style: normal; color: var(--text-2); font-weight: 600; }

.hero-tagline { font-size: 19px; color: var(--text-2); margin-top: 10px; }

.hero-sub {
  max-width: 620px;
  margin: 18px auto 0;
  color: var(--text-2);
  font-size: 15.5px;
}

.badges { margin-top: 24px; display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; }
.badge {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  background: rgba(10, 132, 255, 0.09);
  border: 1px solid rgba(10, 132, 255, 0.18);
  padding: 5px 14px;
  border-radius: 999px;
}

.hero-cta { margin-top: 34px; display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }
.btn {
  font-size: 15.5px;
  font-weight: 600;
  padding: 12px 28px;
  border-radius: 999px;
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 20px rgba(10, 132, 255, 0.32);
}
.btn-primary:hover { box-shadow: 0 10px 26px rgba(10, 132, 255, 0.42); }
.btn-ghost { background: #fff; color: var(--text); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- sections ---------- */
.section { max-width: 960px; margin: 0 auto; padding: 40px 20px 8px; }
.section-title { font-size: 24px; font-weight: 700; margin-bottom: 22px; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}
.card h3 { font-size: 16.5px; margin-bottom: 8px; }
.card p { font-size: 14px; color: var(--text-2); }

.link-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; padding-bottom: 56px; }
.link-card {
  position: relative;
  display: block;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  color: var(--text);
  box-shadow: var(--shadow);
  transition: border-color 0.15s, transform 0.15s;
}
.link-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.link-card h3 { font-size: 18px; margin-bottom: 8px; }
.link-card p { font-size: 14px; color: var(--text-2); padding-right: 30px; }
.link-arrow {
  position: absolute;
  right: 22px;
  top: 24px;
  color: var(--accent);
  font-size: 20px;
  font-weight: 700;
}

/* ---------- doc pages ---------- */
.page { max-width: 860px; margin: 0 auto; padding: 0 20px 64px; }

.page-head { padding: 56px 0 8px; }
.page-head h1 { font-size: 34px; font-weight: 800; }
.page-head p { color: var(--text-2); margin-top: 8px; font-size: 15.5px; }

.doc {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 40px 44px;
  margin-top: 24px;
  font-size: 15px;
}

.doc blockquote {
  background: rgba(10, 132, 255, 0.06);
  border: 1px solid rgba(10, 132, 255, 0.16);
  border-radius: 12px;
  padding: 14px 18px;
  color: var(--text-2);
  font-size: 13.5px;
  margin: 0 0 28px;
}
.doc blockquote p { margin: 0; }

.doc h2 {
  font-size: 20px;
  font-weight: 700;
  margin: 36px 0 14px;
  padding-left: 12px;
  border-left: 4px solid var(--accent);
  line-height: 1.4;
}
.doc h3 { font-size: 16px; font-weight: 650; margin: 24px 0 10px; }
.doc p { margin: 12px 0; color: #33333a; }
.doc ul { margin: 12px 0 12px 22px; color: #33333a; }
.doc li { margin: 5px 0; }
.doc code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 13px;
  background: #f0f1f4;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1px 6px;
}

.table-wrap { overflow-x: auto; margin: 14px 0; border: 1px solid var(--line); border-radius: 12px; }
.doc table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.doc th, .doc td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.doc th { background: #f7f8fa; font-weight: 650; white-space: nowrap; }
.doc tr:last-child td { border-bottom: none; }

/* ---------- screenshots ---------- */
.shots {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding: 10px 4px 22px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.shots figure { flex: 0 0 auto; width: 208px; scroll-snap-align: start; }
.shots img {
  width: 100%;
  display: block;
  border-radius: 26px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background: #0b0b0f;
}
.shots figcaption {
  text-align: center;
  font-size: 13px;
  color: var(--text-2);
  margin-top: 10px;
}
.shots::-webkit-scrollbar { height: 6px; }
.shots::-webkit-scrollbar-thumb { background: #d3d5db; border-radius: 3px; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); background: #fff; }
.footer-inner { max-width: 960px; margin: 0 auto; padding: 36px 20px 44px; text-align: center; }
.footer-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  font-size: 15px;
}
.footer-brand svg { width: 24px; height: 24px; border-radius: 6px; }
.footer-note { color: var(--text-2); font-size: 13.5px; margin-top: 10px; }
.footer-meta { color: var(--text-3); font-size: 12.5px; margin-top: 6px; }

/* ---------- responsive ---------- */
@media (max-width: 640px) {
  .nav-inner { gap: 12px; }
  .nav-links a { padding: 6px 8px; font-size: 13.5px; }
  .brand-name em { display: none; }
  .hero { padding: 60px 20px 52px; }
  .hero-title { font-size: 32px; }
  .doc { padding: 26px 20px; }
  .page-head h1 { font-size: 27px; }
}
