:root {
  --bg: #fbfaf8;
  --surface: #ffffff;
  --text: #1c1b1a;
  --muted: #5f5b56;
  --line: #e7e3de;
  --accent: #2f5bd3;
  --accent-soft: #e8eefc;
  --radius: 14px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121213;
    --surface: #1b1b1d;
    --text: #ecebe8;
    --muted: #a5a19b;
    --line: #2c2c2f;
    --accent: #8aa8ff;
    --accent-soft: #1f2640;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 960px; margin: 0 auto; padding: 0 24px; }

header.site { border-bottom: 1px solid var(--line); }
header.site .wrap {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 8px 16px; min-height: 64px; padding-top: 10px; padding-bottom: 10px;
}
.brand { font-weight: 700; font-size: 18px; color: var(--text); display: flex; align-items: center; gap: 10px; white-space: nowrap; }
nav.top { display: flex; flex-wrap: wrap; gap: 4px 0; }
.brand:hover { text-decoration: none; }
.mark {
  width: 28px; height: 28px; border-radius: 8px; background: var(--accent);
  display: inline-grid; place-items: center; color: #fff; font-size: 14px; font-weight: 800;
}
nav.top a { color: var(--muted); margin-left: 22px; font-size: 15px; }
nav.top a:hover { color: var(--text); text-decoration: none; }

.hero { padding-top: 88px; padding-bottom: 64px; }
.hero h1 { font-size: clamp(34px, 5vw, 52px); line-height: 1.12; margin: 0 0 18px; letter-spacing: -0.02em; }
.hero p.lead { font-size: 20px; color: var(--muted); max-width: 640px; margin: 0; }
.pill {
  display: inline-block; background: var(--accent-soft); color: var(--accent);
  padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; margin-bottom: 20px;
}

section { padding: 48px 0; border-top: 1px solid var(--line); }
section h2 { font-size: 26px; margin: 0 0 8px; letter-spacing: -0.01em; }
section p.sub { color: var(--muted); margin: 0 0 28px; max-width: 680px; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
/* 四张卡片：宽屏 2×2，窄屏单列，避免 3+1 的落单排布 */
.grid.four { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card h3 { margin: 0 0 8px; font-size: 17px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }

ol.steps { list-style: none; padding: 0; margin: 0; counter-reset: s; display: grid; gap: 14px; }
ol.steps li {
  counter-increment: s; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 20px 18px 64px; position: relative;
}
ol.steps li::before {
  content: counter(s); position: absolute; left: 20px; top: 18px; width: 28px; height: 28px;
  border-radius: 50%; background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center; font-weight: 700; font-size: 14px;
}
ol.steps strong { display: block; margin-bottom: 2px; }
ol.steps span { color: var(--muted); font-size: 15px; }

.note { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 10px; padding: 18px 20px; }
.note p { margin: 0 0 10px; }
.note p:last-child { margin-bottom: 0; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.92em; background: var(--accent-soft); padding: 1px 6px; border-radius: 6px; word-break: break-all; }

.doc { padding: 56px 0 24px; max-width: 760px; }
.doc h1 { font-size: 36px; margin: 0 0 6px; letter-spacing: -0.02em; }
.doc .updated { color: var(--muted); margin: 0 0 32px; }
.doc h2 { font-size: 21px; margin: 36px 0 10px; }
.doc p, .doc li { color: var(--text); }
.doc ul { padding-left: 22px; }
.doc li { margin-bottom: 8px; }
.doc table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 15px; }
.doc th, .doc td { text-align: left; border-bottom: 1px solid var(--line); padding: 10px 8px; vertical-align: top; }
.doc th { color: var(--muted); font-weight: 600; }
.table-wrap { overflow-x: auto; }

footer.site { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--muted); font-size: 14px; }
footer.site .wrap { display: flex; flex-wrap: wrap; gap: 8px 22px; justify-content: space-between; }
footer.site a { color: var(--muted); }

nav.top a { white-space: nowrap; }

@media (max-width: 720px) {
  nav.top { width: 100%; }
  nav.top a { margin-left: 0; margin-right: 18px; font-size: 14px; }
}

@media (max-width: 560px) {
  .hero { padding-top: 48px; padding-bottom: 36px; }
  .hero p.lead { font-size: 18px; }
}

/* 窄屏下隐私页表格改成一行一张卡片，三项上下排列，避免右侧列被截断 */
@media (max-width: 640px) {
  .doc table, .doc thead, .doc tbody, .doc tr, .doc th, .doc td { display: block; }
  .doc thead { display: none; }
  .doc tr { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; margin-bottom: 10px; background: var(--surface); }
  .doc td { border: 0; padding: 4px 0; }
  .doc td::before {
    content: attr(data-label); display: block; font-size: 12px; font-weight: 600;
    letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted);
  }
}
