/* Shared styles for 技术支持 / 隐私政策 / 使用条款 pages */
:root {
  --bg: #f7f8fc;
  --ink: #0b1020;
  --ink-2: #2a2f4a;
  --muted: #6b7392;
  --muted-2: #9aa1bd;
  --line: rgba(20, 30, 80, 0.08);
  --line-2: rgba(20, 30, 80, 0.04);
  --card: #ffffff;
  --brand: #3b5bfd;
  --brand-2: #6a4cff;
  --accent-grad: linear-gradient(135deg, #3b5bfd 0%, #6a4cff 55%, #b14cff 100%);
  --soft-grad: radial-gradient(900px 500px at 85% -5%, rgba(106, 76, 255, 0.10), transparent 60%),
               radial-gradient(700px 400px at -5% 10%, rgba(30, 200, 200, 0.08), transparent 60%);
  --shadow-sm: 0 1px 2px rgba(20, 30, 80, 0.04);
  --shadow-md: 0 6px 24px -8px rgba(30, 40, 100, 0.12);
  --shadow-lg: 0 24px 60px -20px rgba(40, 50, 120, 0.25);
  --radius: 18px;
}
* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", "Noto Sans SC", -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body {
  background-image: var(--soft-grad);
  background-attachment: fixed;
  min-height: 100vh;
}
.container { max-width: 980px; margin: 0 auto; padding: 0 32px; }
a { color: inherit; text-decoration: none; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  background: rgba(247, 248, 252, 0.72);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.brand {
  display: flex; align-items: center; gap: 12px;
  font-weight: 600;
}
.brand-logo {
  width: 32px; height: 32px; border-radius: 9px;
  background: var(--accent-grad);
  display: grid; place-items: center;
  color: white;
  box-shadow: 0 6px 18px -6px rgba(106, 76, 255, 0.55);
}
.brand-name { font-size: 15px; }
.brand-name small { display: block; font-size: 11px; color: var(--muted); font-weight: 500; letter-spacing: 0.05em; }
.nav-actions { display: flex; align-items: center; gap: 6px; }
.back-link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.6);
  font-size: 12.5px; color: var(--ink-2);
  transition: background 0.15s;
}
.back-link:hover { background: white; }
.lang-toggle {
  display: inline-flex; align-items: center;
  padding: 4px; border: 1px solid var(--line);
  border-radius: 999px; background: rgba(255, 255, 255, 0.6);
  margin-left: 10px;
}
.lang-toggle button {
  border: none; background: transparent;
  padding: 4px 12px; font-size: 12px;
  font-family: inherit; cursor: pointer;
  border-radius: 999px; color: var(--muted);
  transition: all 0.18s;
}
.lang-toggle button.active { background: var(--ink); color: white; }

/* Page header */
.page-head {
  padding: 72px 0 36px;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 999px;
  font-size: 12px; font-weight: 500; letter-spacing: 0.04em;
  margin-bottom: 22px;
}
.eyebrow.privacy {
  background: rgba(59, 91, 253, 0.08);
  color: var(--brand);
}
.eyebrow.terms {
  background: rgba(106, 76, 255, 0.08);
  color: var(--brand-2);
}
.eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 4px rgba(59, 91, 253, 0.15);
}
.page-head h1 {
  font-size: 48px; line-height: 1.08; font-weight: 700;
  letter-spacing: -0.02em; margin: 0 0 14px;
}
.page-head h1 .grad {
  background: var(--accent-grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.page-head .sub {
  font-size: 15.5px; color: var(--muted); max-width: 640px;
  line-height: 1.7; margin: 0;
}
.page-head .meta-row {
  margin-top: 28px;
  display: flex; gap: 28px;
  font-size: 12.5px; color: var(--muted);
  padding: 16px 22px;
  background: rgba(255,255,255,0.5);
  border: 1px solid var(--line);
  border-radius: 12px;
  flex-wrap: wrap;
}
.page-head .meta-row span strong {
  color: var(--ink); font-weight: 600;
  margin-left: 6px;
  font-family: "JetBrains Mono", "Inter", monospace;
}

/* Document layout */
.doc-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 56px;
  padding: 16px 0 64px;
  align-items: start;
}
.toc {
  position: sticky; top: 90px;
  font-size: 13px;
}
.toc-title {
  font-size: 11px; color: var(--muted-2);
  letter-spacing: 0.08em; text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.toc ol {
  list-style: none; margin: 0; padding: 0;
  counter-reset: toc;
}
.toc li { counter-increment: toc; margin-bottom: 2px; }
.toc a {
  display: block;
  padding: 7px 12px;
  border-radius: 7px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  transition: background 0.15s, color 0.15s;
  position: relative;
}
.toc a::before {
  content: counter(toc, decimal-leading-zero);
  color: var(--muted-2);
  font-family: "JetBrains Mono", monospace;
  font-size: 10.5px;
  margin-right: 8px;
}
.toc a:hover { background: rgba(20, 30, 80, 0.04); color: var(--ink-2); }
.toc a.active { background: rgba(59, 91, 253, 0.08); color: var(--brand); font-weight: 500; }

/* Doc content */
.doc-content {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 48px 56px;
  box-shadow: var(--shadow-sm);
  font-size: 14.5px;
  line-height: 1.8;
  color: var(--ink-2);
}
.doc-content h2 {
  font-size: 22px; font-weight: 600;
  letter-spacing: -0.01em;
  margin: 48px 0 16px;
  padding-top: 12px;
  color: var(--ink);
  scroll-margin-top: 90px;
  display: flex; align-items: baseline; gap: 14px;
}
.doc-content h2:first-child { margin-top: 0; }
.doc-content h2 .num {
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  color: var(--muted-2);
  font-weight: 500;
}
.doc-content h2 .en {
  font-size: 13px;
  color: var(--muted);
  font-weight: 400;
  letter-spacing: 0.02em;
}
.doc-content h3 {
  font-size: 16px; font-weight: 600;
  margin: 28px 0 10px;
  color: var(--ink);
}
.doc-content p { margin: 0 0 14px; text-wrap: pretty; }
.doc-content ul, .doc-content ol {
  margin: 8px 0 16px; padding-left: 22px;
}
.doc-content li { margin-bottom: 6px; }
.doc-content strong { color: var(--ink); font-weight: 600; }
.doc-content code {
  background: rgba(59, 91, 253, 0.07);
  color: var(--brand);
  padding: 1px 6px; border-radius: 5px;
  font-size: 12.5px;
  font-family: "JetBrains Mono", monospace;
}
.doc-content a.link {
  color: var(--brand);
  border-bottom: 1px solid rgba(59, 91, 253, 0.3);
  transition: border-color 0.15s;
}
.doc-content a.link:hover { border-color: var(--brand); }

.callout {
  margin: 20px 0;
  padding: 16px 20px;
  background: rgba(59, 91, 253, 0.05);
  border-left: 3px solid var(--brand);
  border-radius: 8px;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--ink-2);
}
.callout.warn {
  background: rgba(255, 138, 61, 0.07);
  border-left-color: #e0682b;
}
.callout strong { color: var(--ink); }

.divider-rule {
  height: 1px; background: var(--line);
  margin: 36px 0;
}

/* Footer */
footer {
  margin-top: 40px;
  padding: 32px 0 48px;
  border-top: 1px solid var(--line);
}
.footer-inner {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12.5px; color: var(--muted);
  gap: 20px; flex-wrap: wrap;
}
.footer-links { display: flex; gap: 20px; }
.footer-links a:hover { color: var(--ink); }

/* Lang toggle */
html[data-lang="en"] .cn { display: none; }
html[data-lang="zh"] .en-only { display: none; }

@media (max-width: 860px) {
  .doc-layout { grid-template-columns: 1fr; gap: 24px; }
  .toc { position: static; }
  .doc-content { padding: 32px 24px; }
  .page-head h1 { font-size: 36px; }
}
