/* SayLingo 法律文档页（隐私协议 / 用户协议）共享样式。
   设计令牌与 index.html 一致：纸白/墨黑/系统蓝，自动深色模式。 */

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

:root {
  --bg: #FAFAF8;
  --ink: #1D1D1F;
  --secondary: #86868B;
  --tertiary: #AEAEB2;
  --hairline: rgba(0, 0, 0, 0.1);
  --accent: #007AFF;
  --cta-bg: #1D1D1F;
  --cta-ink: #FFFFFF;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111113;
    --ink: #F5F5F7;
    --secondary: #98989D;
    --tertiary: #6E6E73;
    --hairline: rgba(255, 255, 255, 0.14);
    --accent: #0A84FF;
    --cta-bg: #F5F5F7;
    --cta-ink: #111113;
  }
}

html { height: 100%; }
body {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.page { width: 100%; max-width: 760px; margin: 0 auto; padding: 0 24px; flex: 1; }

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 0 10px;
}
.back { font-size: 14px; color: var(--secondary); text-decoration: none; }
.back:hover { color: var(--accent); }

.switch {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
}
.switch button {
  appearance: none;
  border: none;
  background: transparent;
  font: inherit;
  font-size: 13px;
  line-height: 1;
  padding: 7px 14px;
  border-radius: 999px;
  color: var(--secondary);
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}
.switch button:hover { color: var(--ink); }
body[data-lang="zh"] .switch [data-set="zh"],
body[data-lang="en"] .switch [data-set="en"] { background: var(--cta-bg); color: var(--cta-ink); }
body[data-lang="zh"] .switch [data-set="zh"]:hover,
body[data-lang="en"] .switch [data-set="en"]:hover { color: var(--cta-ink); }

.doc h1 {
  margin-top: 46px;
  font-family: "Songti SC", "Noto Serif SC", "STSong", "SimSun", serif;
  font-weight: 700;
  font-size: clamp(1.9rem, 5vw, 2.6rem);
  line-height: 1.4;
  letter-spacing: 0.02em;
}
.updated { margin-top: 10px; font-size: 13px; color: var(--tertiary); }

.doc h2 { margin-top: 42px; font-size: 17px; font-weight: 600; }
.doc p { margin-top: 14px; font-size: 15px; line-height: 2; }
.doc ul { margin-top: 14px; list-style: none; }
.doc li { position: relative; padding-left: 18px; margin-top: 10px; font-size: 15px; line-height: 2; }
.doc li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.92em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--tertiary);
}
.doc a { color: var(--accent); text-decoration: none; }
.doc a:hover { text-decoration: underline; }

/* 语言切换：有 JS 时只显示当前语言；无 JS 时两种语言上下完整呈现。 */
.js .doc { display: none; }
.js body[data-lang="zh"] .doc[data-lang="zh"],
.js body[data-lang="en"] .doc[data-lang="en"] { display: block; }

footer {
  margin-top: 64px;
  border-top: 1px solid var(--hairline);
  padding: 22px 24px calc(22px + env(safe-area-inset-bottom));
  text-align: center;
  font-size: 12px;
  color: var(--tertiary);
}
footer a { color: var(--secondary); text-decoration: none; }
footer a:hover { color: var(--accent); }

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