/* 用户协议页(08-04 加)。
   色板全部复用 app.css 的 :root 变量,不另起一套 —— 协议页也是产品的一部分,
   看起来必须像同一个站,而不是"外挂的一页法律文本"。
   目标:长文本能读下去。所以做了三件事 ——
     · 正文宽度收到 68 字符左右(太宽眼睛找不到下一行)
     · 目录吸顶,长页面里随时能跳
     · 要紧的话用底色块拎出来(doc-warn / doc-note),不指望人逐行读 */

.doc-body {
  min-height: 100vh;
  /* 纸感底:两团极淡的光 + 细噪点。纯平底色读长文最累 */
  background:
    radial-gradient(1100px 620px at 12% -8%, #f6f5ff 0%, rgba(246,245,255,0) 62%),
    radial-gradient(900px 520px at 100% 4%, #eef0fb 0%, rgba(238,240,251,0) 58%),
    var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.85;            /* 长文行高比常规大一档,不然密得慌 */
  padding: 0 20px 80px;
}

/* 回首页:固定左上,和登录页那颗保持一致的手感 */
.doc-back {
  position: fixed; left: 22px; top: 20px; z-index: 20;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 15px 9px 12px;
  background: var(--glass-strong);
  border: 1px solid var(--glass-line);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  color: var(--text); text-decoration: none;
  font-size: 13.5px; font-weight: 600;
  backdrop-filter: blur(10px);
  transition: transform .18s, color .18s;
}
.doc-back:hover { transform: translateX(-2px); color: var(--accent-ink); }

.doc-stage { max-width: 780px; margin: 0 auto; padding-top: 76px; }

/* ---------- 头部 ---------- */
.doc-head { margin-bottom: 30px; }
.doc-logo {
  display: flex; align-items: center; gap: 9px;
  font-size: 19px; font-weight: 800; color: var(--ink); margin-bottom: 18px;
}
.doc-logo b { color: var(--accent); }
.doc-head h1 {
  font-size: 30px; font-weight: 800; color: var(--ink);
  letter-spacing: -.4px; line-height: 1.3;
}
.doc-meta { font-size: 13px; color: var(--text-dim); margin-top: 8px; }

/* 摘要块:真正会被读的就这一块,给它最强的视觉权重 */
.doc-tldr {
  margin-top: 24px; padding: 20px 22px;
  background: linear-gradient(180deg, #fff 0%, var(--accent-soft) 100%);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 4px 14px 14px 4px;
  box-shadow: var(--shadow-sm);
}
.doc-tldr > b {
  display: block; font-size: 14px; color: var(--accent-ink);
  margin-bottom: 10px; letter-spacing: .2px;
}
.doc-tldr ul { list-style: none; display: grid; gap: 9px; }
.doc-tldr li {
  position: relative; padding-left: 20px;
  font-size: 14.5px; color: var(--text); line-height: 1.7;
}
/* 自己画勾:用 emoji 当图标不清晰、跨系统还会变形 */
.doc-tldr li::before {
  content: ""; position: absolute; left: 2px; top: .62em;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); opacity: .55;
}
.doc-tldr b { color: var(--accent-ink); font-weight: 700; }

/* ---------- 目录 ---------- */
/* 吸顶。八节的长页面里,读到第六条想回头看第四条不该靠滚 */
.doc-toc {
  position: sticky; top: 0; z-index: 10;
  display: flex; flex-wrap: wrap; gap: 4px 6px;
  margin: 0 -10px 26px; padding: 12px 10px;
  background: rgba(236,238,246,.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.doc-toc a {
  font-size: 12.5px; font-weight: 600; color: var(--text-dim);
  text-decoration: none; padding: 5px 10px; border-radius: 8px;
  transition: background .16s, color .16s;
}
.doc-toc a:hover { background: #fff; color: var(--accent-ink); }

/* ---------- 正文 ---------- */
.doc-sec {
  /* 锚点跳转要避开吸顶目录,不然标题被目录盖住 */
  scroll-margin-top: 64px;
  margin-bottom: 34px;
}
.doc-sec h2 {
  font-size: 20px; font-weight: 800; color: var(--ink);
  margin-bottom: 12px; padding-bottom: 9px;
  border-bottom: 1px solid var(--line);
}
.doc-sec h3 {
  font-size: 15px; font-weight: 700; color: var(--accent-ink);
  margin: 20px 0 7px;
}
.doc-sec p { font-size: 14.5px; margin-bottom: 11px; }
.doc-sec b { color: var(--ink); font-weight: 700; }
.doc-sec a { color: var(--accent-ink); font-weight: 600; }

/* 列表:自己画点,默认圆点在中文里位置总是偏 */
.doc-list { list-style: none; display: grid; gap: 10px; margin: 0 0 12px; }
.doc-list li {
  position: relative; padding-left: 18px; font-size: 14.5px;
}
.doc-list li::before {
  content: ""; position: absolute; left: 3px; top: .68em;
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--text-faint);
}

/* 两种拎出来的块:warn=会让人吃亏的事,note=补充说明。
   只用底色和左边框区分,不用红色警告框 —— 这页不是报错页 */
.doc-warn, .doc-note {
  padding: 13px 16px; border-radius: 3px 11px 11px 3px;
  font-size: 14px; margin: 12px 0;
}
.doc-warn {
  background: #fdf4ee; border-left: 3px solid #d97742; color: #7d4423;
}
.doc-warn b { color: #8f3d15; }
.doc-note {
  background: #f4f5fb; border-left: 3px solid var(--text-faint); color: var(--text-dim);
}
.doc-note b { color: var(--text); }

/* ---------- 页脚 ---------- */
.doc-foot {
  margin-top: 44px; padding-top: 24px;
  border-top: 1px solid var(--line);
  text-align: center;
}
.doc-foot p { font-size: 13.5px; color: var(--text-dim); margin-bottom: 16px; }
.doc-cta {
  display: inline-block; padding: 13px 30px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  color: #fff; text-decoration: none;
  font-size: 15px; font-weight: 700; border-radius: 12px;
  box-shadow: 0 12px 28px -12px rgba(111,102,230,.6);
  transition: transform .18s, box-shadow .18s;
}
.doc-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px -12px rgba(111,102,230,.7);
}

/* ---------- 窄屏 ---------- */
/* 真机是 375~430px,不是 720px。中文没空格,被夹窄了会一字一行 */
@media (max-width: 560px) {
  .doc-body { padding: 0 15px 60px; line-height: 1.8; }
  .doc-stage { padding-top: 66px; }
  .doc-back { left: 14px; top: 14px; padding: 8px 13px 8px 10px; font-size: 13px; }
  .doc-head h1 { font-size: 24px; }
  .doc-tldr { padding: 16px 17px; }
  .doc-tldr li, .doc-sec p, .doc-list li { font-size: 14px; }
  .doc-sec h2 { font-size: 18px; }
  /* 目录在窄屏改横向滑动:换行成四五行会把整个首屏吃掉 */
  .doc-toc {
    margin: 0 -15px 22px; padding: 10px 15px;
    flex-wrap: nowrap; overflow-x: auto;
    scrollbar-width: none;
  }
  .doc-toc::-webkit-scrollbar { display: none; }
  .doc-toc a { flex: 0 0 auto; }
  /* 点击区够大:手指不是鼠标 */
  .doc-cta { display: block; padding: 15px 20px; }
}
