/* ── 变量 ── */
:root {
  --hero-bg:      #0B1E14;
  --hero-border:  rgba(255,255,255,0.08);
  --primary:      #3B9B6A;
  --primary-glow: rgba(59,155,106,0.30);
  --accent:       #7ECFA0;
  --bg:           #FFFFFF;        /* 纯白底，与钱迹一致 */
  --surface:      #FFFFFF;
  --surface-2:    #F5F7F5;
  --text:         #1A1A1A;        /* 接近黑，正文主色 */
  --text-2:       #444444;        /* 正文辅色 */
  --text-muted:   #888888;
  --border:       #E8E8E8;        /* 固定色，不用 rgba，表格线清晰 */
  --border-light: rgba(0,0,0,0.06);
  --radius-sm:    6px;
  --radius:       12px;
  --max:          520px;

  /* 系统字体栈——无需外部加载，国内直接可用 */
  --serif: 'STSong', 'Songti SC', 'SimSun', 'NSimSun', Georgia, serif;
  --sans:  'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'STHeiti', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 100%; }
body {
  font-family: var(--sans);
  font-size: 0.875rem; /* 14px at 1x，跟随系统字体大小缩放 */
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  line-height: 1.65;
  overflow-x: hidden;
}
a { color: var(--primary); text-decoration: none; }

/* ── 进场动画 ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 var(--primary-glow), 0 12px 36px rgba(0,0,0,0.45); }
  50%       { box-shadow: 0 0 0 14px transparent, 0 12px 36px rgba(0,0,0,0.45); }
}

/* ── 容器 ── */
.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px;
}

/* ══════════════════════════════
   导航
══════════════════════════════ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11,30,20,0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--hero-border);
}
.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  letter-spacing: 1px;
}
.nav-brand img {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}
.nav-links {
  display: flex;
  gap: 20px;
  font-size: 13px;
}
.nav-links a {
  color: rgba(255,255,255,0.5);
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--accent); }

/* ══════════════════════════════
   英雄区
══════════════════════════════ */
.hero {
  background: var(--hero-bg);
  padding: 56px 0 64px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 50% 0%, rgba(59,155,106,0.15) 0%, transparent 55%),
    radial-gradient(rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 100% 100%, 26px 26px;
  pointer-events: none;
}

.hero-icon-wrap {
  position: relative;
  display: inline-block;
  margin-bottom: 22px;
  animation: scaleIn 0.5s ease both;
}
.hero-icon {
  width: 80px;
  height: 80px;
  border-radius: 20px;
  overflow: hidden;
  animation: pulse-glow 3.5s 1s ease-in-out infinite;
  box-shadow: 0 12px 36px rgba(0,0,0,0.45);
  position: relative;
  z-index: 1;
}
.hero-icon img { width: 100%; height: 100%; display: block; }
.hero-icon-wrap::after {
  content: '';
  position: absolute;
  inset: -10px;
  border-radius: 28px;
  border: 1px solid rgba(126,207,160,0.18);
  animation: scaleIn 0.5s 0.15s ease both;
  pointer-events: none;
}

.hero h1 {
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 4px;
  line-height: 1.2;
  margin-bottom: 12px;
  animation: fadeUp 0.55s 0.1s ease both;
}
.hero .tagline {
  font-size: 14px;
  font-weight: 300;
  color: rgba(255,255,255,0.52);
  max-width: 260px;
  margin: 0 auto 36px;
  line-height: 1.9;
  animation: fadeUp 0.55s 0.2s ease both;
}

/* ── 下载按钮 ── */
.download-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  animation: fadeUp 0.55s 0.28s ease both;
}
.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 26px;
  border-radius: var(--radius);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  min-width: 210px;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.18s, box-shadow 0.18s;
  border: none;
}
.btn-download:hover:not(.disabled) {
  transform: translateY(-2px);
  text-decoration: none;
}
.btn-download.primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 5px 20px rgba(59,155,106,0.38);
}
.btn-download.primary:hover:not(.disabled) {
  box-shadow: 0 8px 28px rgba(59,155,106,0.52);
}
.btn-download.outline {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.16);
  color: rgba(255,255,255,0.7);
}
.btn-download.disabled {
  opacity: 0.38;
  cursor: not-allowed;
  pointer-events: none;
}
.btn-download svg { width: 18px; height: 18px; flex-shrink: 0; }
.btn-label { text-align: left; }
.btn-label small {
  display: block;
  font-size: 11px;
  opacity: 0.6;
  font-weight: 300;
  margin-top: 1px;
}

/* ══════════════════════════════
   功能区 — 纯文字卡片，无 emoji
══════════════════════════════ */
.features {
  padding: 52px 0 60px;
}
.features-title {
  text-align: center;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 28px;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.features-title::before,
.features-title::after {
  content: '';
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--primary);
  opacity: 0.5;
  border-radius: 2px;
}
.features-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.feature-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 14px 13px 14px 16px;
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}
.feature-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(14,31,22,0.08);
}
/* 左侧彩色细条 */
.feature-card::before {
  content: '';
  position: absolute;
  left: 0; top: 14px; bottom: 14px;
  width: 3px;
  border-radius: 0 2px 2px 0;
}
.feature-card:nth-child(1)::before { background: #3B9B6A; }
.feature-card:nth-child(2)::before { background: #4A8FCC; }
.feature-card:nth-child(3)::before { background: #D4774A; }
.feature-card:nth-child(4)::before { background: #9B6BD4; }
.feature-card:nth-child(5)::before { background: #C4993A; }
.feature-card:nth-child(6)::before { background: #4AADA6; }

.feature-card h3 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 5px;
  letter-spacing: 0.2px;
}
.feature-card p {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ══════════════════════════════
   页脚
══════════════════════════════ */
footer {
  background: var(--hero-bg);
  padding: 28px 0 24px;
  text-align: center;
}
.footer-links {
  display: flex;
  justify-content: center;
  gap: 22px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.footer-links a {
  font-size: 13px;
  color: rgba(255,255,255,0.38);
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--accent); }
footer p {
  font-size: 11px;
  color: rgba(255,255,255,0.2);
}


/* ══════════════════════════════
   政策页 — 顶栏 + 读取进度条
══════════════════════════════ */
.doc-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0%;
  background: var(--primary);
  z-index: 200;
  transition: width 0.08s linear;
}

.doc-topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.doc-topbar-inner {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 20px;
  height: 44px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.doc-topbar-inner a {
  font-size: 12px;
  color: var(--text-muted);
  transition: color 0.15s;
}
.doc-topbar-inner a:hover { color: var(--primary); }
.doc-topbar-inner .sep {
  font-size: 12px;
  color: var(--border);
  user-select: none;
}
.doc-topbar-inner .cur {
  font-size: 12px;
  color: var(--text-2);
  font-weight: 500;
}

/* ── 手机端目录抽屉触发 ── */
.toc-toggle {
  margin-left: auto;
  display: none;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  color: var(--text-muted);
  background: none;
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 3px 9px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.toc-toggle:hover { color: var(--primary); border-color: var(--primary); }
.toc-toggle svg { width: 12px; height: 12px; }

/* ══════════════════════════════
   政策页 — 两栏布局
══════════════════════════════ */
.doc-layout {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 20px 72px;
  display: grid;
  grid-template-columns: 172px 1fr;
  gap: 36px;
  align-items: start;
}

/* ── 左侧目录 ── */
.doc-toc {
  position: sticky;
  top: 68px;
  max-height: calc(100vh - 88px);
  overflow-y: auto;
  padding: 16px 0;
  border-right: 1px solid var(--border);
  scrollbar-width: none;
}
.doc-toc::-webkit-scrollbar { display: none; }

.toc-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: var(--text-muted);
  margin-bottom: 8px;
  padding: 0 12px 0 0;
  text-transform: uppercase;
}

/* details/summary TOC — replaces toc-drawer on all screens */
.toc-details { border: none; background: none; }
.toc-summary {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: var(--text-muted);
  text-transform: uppercase;
  padding: 0 12px 8px 0;
  cursor: pointer;
  user-select: none;
  list-style: none;
  display: block;
}
.toc-summary::-webkit-details-marker { display: none; }
.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.toc-list li { margin: 0; }
.toc-list a {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  padding: 4px 0 4px 10px;
  line-height: 1.5;
  transition: color 0.15s;
  border-left: 2px solid transparent;
}
.toc-list a:visited { color: #888888; }
.toc-list a:hover { color: var(--text-2); }
.toc-list a.active {
  color: var(--primary);
  border-left-color: var(--primary);
  font-weight: 500;
}

/* ── 手机端目录浮层（display 由 JS 控制，不依赖媒体查询） ── */
.toc-drawer {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 300;
}
.toc-drawer-mask {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.3);
}
.toc-drawer-panel {
  position: absolute;
  top: 0; right: 0;
  width: 68%;
  max-width: 260px;
  height: 100%;
  background: var(--surface);
  padding: 20px 16px;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.25s cubic-bezier(0.4,0,0.2,1);
}
.toc-drawer.open .toc-drawer-panel { transform: translateX(0); }
.toc-drawer-close {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 14px;
  cursor: pointer;
  color: var(--text-muted);
}
.toc-drawer-close svg { width: 16px; height: 16px; }

/* ── 右侧内容 ── */
.doc-content { min-width: 0; }

/* ══════════════════════════════
   政策页 — 文档头
══════════════════════════════ */
.doc-head {
  padding: 28px 0 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}
.doc-head-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(59,155,106,0.08);
  border: 1px solid rgba(59,155,106,0.18);
  border-radius: 16px;
  padding: 2px 9px 2px 6px;
  font-size: 10.5px;
  color: var(--primary);
  font-weight: 500;
  margin-bottom: 10px;
}
.doc-head-badge svg { width: 11px; height: 11px; }
.doc-head h1 {
  font-size: 1.25rem;       /* 20px，参照截图标题大小 */
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
  margin-bottom: 10px;
  letter-spacing: 0;
}
.doc-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.doc-meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--text-muted);
}
.doc-meta-item svg { width: 11px; height: 11px; flex-shrink: 0; }
.doc-meta-item span { color: var(--text-2); }

/* ══════════════════════════════
   政策页 — 正文排版（对标截图）
══════════════════════════════ */
.doc-body section {
  margin-bottom: 28px;      /* 与截图章节间距一致 */
  scroll-margin-top: 68px;
}

/* h2：左侧3px色条，无底线，无徽章装饰 */
.doc-body h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9375rem;     /* 15px */
  font-weight: 700;
  color: var(--text);
  margin: 0 0 12px;
  padding-left: 8px;
  border-left: 3px solid var(--primary);
  line-height: 1.3;
}
/* 隐藏 HTML 里的 .sec-num 徽章 */
.doc-body h2 .sec-num { display: none; }

.doc-body h3 {
  font-size: 0.8125rem;     /* 13px，与正文同级靠粗体区分 */
  font-weight: 600;
  color: var(--text);
  margin: 14px 0 4px;
}
.doc-body p {
  font-size: 0.8125rem;     /* 13px，对标截图密度 */
  color: var(--text-2);
  line-height: 1.75;
  margin-bottom: 8px;
}
.doc-body ul, .doc-body ol {
  font-size: 0.8125rem;
  color: var(--text-2);
  padding-left: 0;
  margin-bottom: 8px;
  list-style: none;
}
.doc-body ul li, .doc-body ol li {
  position: relative;
  padding-left: 14px;
  margin-bottom: 4px;
  line-height: 1.75;
}
.doc-body ul li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 0.6em;               /* em 单位随字号自动对齐基线 */
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--text-muted);
}
.doc-body ol { counter-reset: ol-counter; }
.doc-body ol li { counter-increment: ol-counter; }
.doc-body ol li::before {
  content: counter(ol-counter) '.';
  position: absolute;
  left: 0;
  top: 0;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  line-height: 1.75;
}

/* 表格 */
.doc-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.75rem;       /* 12px */
  margin: 6px 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.doc-body th, .doc-body td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.doc-body th {
  background: var(--surface-2);
  font-weight: 600;
  color: var(--text);
  font-size: 0.75rem;
  white-space: nowrap;
}
.doc-body td { color: var(--text-2); background: var(--surface); }
.doc-body tr:last-child td { border-bottom: none; }
.doc-body table a { font-size: 0.75rem; }

/* 高亮块 */
.doc-body .highlight {
  background: #F0F7F3;
  border-left: 3px solid var(--primary);
  padding: 10px 12px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 10px 0;
  font-size: 0.8125rem;
  color: var(--text-2);
  line-height: 1.75;
}
.doc-body .highlight-warn {
  background: #FDF3ED;
  border-left: 3px solid #C4632A;
  padding: 10px 12px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 10px 0;
  font-size: 0.8125rem;
  color: var(--text-2);
  line-height: 1.75;
}

/* ══════════════════════════════
   支持页 / 联系页（保持原样）
══════════════════════════════ */
.policy-header {
  padding: 40px 0 28px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 36px;
}
.policy-header h1 {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}
.policy-header .meta {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  border-left: 3px solid var(--border);
  padding: 6px 10px;
  background: var(--surface-2);
  border-radius: 0 6px 6px 0;
  line-height: 1.8;
}
.policy-body { padding-bottom: 64px; }
.policy-body h2 { font-size: 0.9375rem; font-weight: 700; color: var(--text); margin: 24px 0 8px; }
.policy-body h3 { font-size: 0.875rem; font-weight: 600; color: var(--text); margin: 14px 0 5px; }
.policy-body p  { font-size: 0.875rem; color: var(--text-2); margin-bottom: 8px; line-height: 1.8; }
.policy-body ul, .policy-body ol { font-size: 0.875rem; color: var(--text-2); padding-left: 18px; margin-bottom: 8px; line-height: 1.8; }
.policy-body li { margin-bottom: 2px; }
.policy-body table { width: 100%; border-collapse: collapse; font-size: 0.75rem; margin: 6px 0 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.policy-body th, .policy-body td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); }
.policy-body th { background: var(--surface-2); font-weight: 600; color: var(--text); font-size: 0.75rem; }
.policy-body td { color: var(--text-2); background: var(--surface); }
.policy-body tr:last-child td { border-bottom: none; }
.policy-body .highlight { background: var(--surface-2); border-left: 3px solid var(--primary); padding: 10px 13px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin: 12px 0; font-size: 0.8125rem; color: var(--text-2); line-height: 1.8; }
.policy-body .highlight-warn { background: rgba(212,119,74,0.08); border-left: 3px solid #C4632A; padding: 10px 13px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin: 12px 0; font-size: 0.8125rem; color: var(--text-2); line-height: 1.8; }

.support-section { padding: 32px 0; border-bottom: 1px solid var(--border); }
.support-section:last-child { border-bottom: none; }
.support-section h2 { font-family: var(--serif); font-size: 17px; font-weight: 600; color: var(--text); margin-bottom: 14px; }
.support-section h3 { font-size: 14px; font-weight: 600; color: var(--text); margin: 20px 0 6px; }
.support-section p  { font-size: 13.5px; color: var(--text-2); line-height: 1.8; margin-bottom: 5px; }
.contact-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; }
.contact-card p { font-size: 13.5px; color: var(--text-2); margin-bottom: 5px; }
.contact-card p:last-child { margin-bottom: 0; }

/* ══════════════════════════════
   响应式
══════════════════════════════ */
@media (max-width: 680px) {
  .doc-layout {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 0 16px 56px;
  }
  .doc-toc { display: none; }
  /* toc-toggle 和 toc-drawer 的显隐完全由 JS updateLayout() 控制 */
  .doc-head { padding: 20px 0 16px; margin-bottom: 20px; }
  .doc-head h1 { font-size: 1.125rem; }
  .doc-body h2 { font-size: 0.875rem; }
  .doc-body table { font-size: 0.6875rem; }
  .doc-body th, .doc-body td { padding: 6px 8px; }
}
@media (max-width: 380px) {
  .hero h1 { font-size: 28px; }
  .features-grid { gap: 8px; }
}
@media (max-width: 300px) {
  .features-grid { grid-template-columns: 1fr; }
}
