/* ============================================================
   隐私政策 / 用户协议 - 单文件静态页面
   - 部署:上传到 jt808.yejuu.com/privacy.html
   - 内容必须与 App 端 strings.xml 的 privacy_policy_content 一字不差
   - 设计目标:移动端可读 + 打印友好 + 法律文书专业感
   ============================================================ */

* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --c-text:        #2c3e50;   /* 主文字 - 深蓝灰,法律文书专用 */
  --c-text-soft:   #5a6c7d;   /* 次要文字 */
  --c-text-mute:   #8895a4;   /* 元信息 */
  --c-primary:     #1e88e5;   /* 主题蓝(与 App 一致) */
  --c-primary-dk:  #1565c0;
  --c-bg:          #ffffff;
  --c-bg-soft:     #f7f9fc;   /* 章节底色 */
  --c-bg-card:     #eef4fa;   /* 信息卡片底 */
  --c-border:      #e1e8f0;
  --c-accent:      #c9302c;   /* 生效日期警示色 */
  --c-success:     #28a745;
  --c-warning-bg:  #fff8e1;
  --c-warning-bd:  #ffe082;
  --max-width:     760px;
  --shadow-sm:     0 1px 3px rgba(0,0,0,.06);
  --shadow-md:     0 2px 8px rgba(0,0,0,.08);
}

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑",
               "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.85;
  color: var(--c-text);
  background: var(--c-bg-soft);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  word-break: break-word;
}

/* ========== 容器 ========== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 24px 20px 80px;
  background: var(--c-bg);
  box-shadow: var(--shadow-md);
  min-height: 100vh;
}

/* ========== 头部 ========== */
header.doc-header {
  text-align: center;
  padding: 32px 16px 28px;
  margin-bottom: 28px;
  background: linear-gradient(135deg, #1e88e5 0%, #1565c0 100%);
  color: #fff;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
}

header.doc-header::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 280px;
  height: 280px;
  background: rgba(255,255,255,.08);
  border-radius: 50%;
}

header.doc-header h1 {
  font-size: 26px;
  font-weight: 600;
  margin-bottom: 12px;
  letter-spacing: 0.5px;
  position: relative;
}

header.doc-header .effective-date {
  display: inline-block;
  font-size: 13px;
  padding: 4px 14px;
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 100px;
  position: relative;
}

header.doc-header .effective-date strong {
  margin-left: 4px;
  font-weight: 600;
}

/* ========== 目录 ========== */
.toc {
  background: var(--c-bg-card);
  border: 1px solid var(--c-border);
  border-radius: 8px;
  padding: 18px 22px;
  margin-bottom: 32px;
}

.toc h2 {
  font-size: 15px;
  color: var(--c-primary-dk);
  margin-bottom: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.toc h2::before {
  content: '';
  display: inline-block;
  width: 3px;
  height: 14px;
  background: var(--c-primary);
  border-radius: 2px;
}

.toc ol {
  list-style: none;
  counter-reset: toc;
}

.toc ol li {
  counter-increment: toc;
  margin: 6px 0;
  font-size: 14px;
}

.toc ol li a {
  color: var(--c-text-soft);
  text-decoration: none;
  display: flex;
  align-items: baseline;
  transition: color .15s;
}

.toc ol li a::before {
  content: counter(toc);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  margin-right: 10px;
  font-size: 11px;
  font-weight: 600;
  color: var(--c-primary);
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: 4px;
}

.toc ol li a:hover {
  color: var(--c-primary);
}

/* ========== 章节 ========== */
section.clause {
  margin-bottom: 28px;
  padding-bottom: 8px;
}

section.clause h2 {
  font-size: 20px;
  color: var(--c-primary-dk);
  margin: 32px 0 16px;
  padding: 10px 0 10px 14px;
  border-left: 4px solid var(--c-primary);
  background: var(--c-bg-soft);
  font-weight: 600;
  border-radius: 0 4px 4px 0;
  scroll-margin-top: 12px;
}

section.clause h3 {
  font-size: 16px;
  color: var(--c-text);
  margin: 20px 0 10px;
  font-weight: 600;
  padding-left: 4px;
}

section.clause p {
  margin: 10px 0;
  text-align: justify;
  text-indent: 2em;
}

section.clause p.no-indent { text-indent: 0; }

/* 嵌套列表 */
section.clause ol.numbered {
  margin: 8px 0 8px 2em;
  padding-left: 1em;
}

section.clause ol.numbered li {
  margin: 4px 0;
}

section.clause ul.dash {
  list-style: none;
  margin: 8px 0 8px 1em;
}

section.clause ul.dash li {
  margin: 3px 0;
  padding-left: 1.2em;
  position: relative;
}

section.clause ul.dash li::before {
  content: '-';
  position: absolute;
  left: 0;
  color: var(--c-text-mute);
}

/* 强调段落 */
section.clause .highlight {
  background: var(--c-bg-card);
  border-left: 3px solid var(--c-primary);
  padding: 10px 14px;
  margin: 12px 0;
  border-radius: 0 4px 4px 0;
  text-indent: 0;
  font-size: 15px;
  color: var(--c-text-soft);
}

/* 权限/SDK 列表 */
section.clause .info-card {
  background: var(--c-bg-soft);
  border: 1px solid var(--c-border);
  border-radius: 6px;
  padding: 12px 16px;
  margin: 10px 0;
  text-indent: 0;
  font-size: 15px;
}

section.clause .info-card .info-label {
  color: var(--c-text-mute);
  font-size: 13px;
  margin-right: 4px;
}

section.clause .info-card .info-value {
  color: var(--c-text);
}

section.clause .info-card .info-row {
  margin: 4px 0;
}

/* 分隔 */
.divider {
  height: 1px;
  background: var(--c-border);
  margin: 28px 0;
}

/* ========== 底部 ========== */
footer.doc-footer {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 2px solid var(--c-border);
  text-align: center;
  color: var(--c-text-mute);
  font-size: 13px;
  line-height: 1.7;
}

footer.doc-footer p { margin: 4px 0; }

footer.doc-footer .contact {
  margin: 12px 0;
  color: var(--c-text-soft);
}

footer.doc-footer .contact a {
  color: var(--c-primary);
  text-decoration: none;
}

footer.doc-footer .copyright {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--c-border);
  font-size: 12px;
}

/* ========== 移动端适配 ========== */
@media (max-width: 600px) {
  body { font-size: 15px; line-height: 1.8; }
  .container { padding: 16px 14px 60px; }
  header.doc-header { padding: 24px 12px 20px; }
  header.doc-header h1 { font-size: 21px; }
  section.clause h2 { font-size: 18px; }
  section.clause h3 { font-size: 15px; }
  .toc { padding: 14px 16px; }
  .toc ol li { font-size: 13px; }
}

/* ========== 打印 ========== */
@media print {
  body { background: #fff; font-size: 12pt; line-height: 1.7; }
  .container { box-shadow: none; max-width: 100%; padding: 0; }
  header.doc-header {
    background: none !important;
    color: #000;
    border: 1px solid #000;
  }
  header.doc-header h1, header.doc-header .effective-date {
    color: #000;
  }
  .toc { display: none; }
  section.clause h2 {
    background: none;
    color: #000;
    border-left-color: #000;
  }
  a { color: #000; text-decoration: underline; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 10pt; }
  section.clause { page-break-inside: avoid; }
}