/* ==========================================================================
   WhatsApp网页版 官网样式表
   纯本地资源，无第三方依赖；字体走系统字体栈，图标为内联 SVG
   ========================================================================== */

/* ---------- 1. 设计变量 ---------- */
:root {
  --brand: #25d366;
  --brand-600: #1fbf5b;
  --brand-700: #128c7e;
  --brand-soft: #e7f8ee;
  --ink: #0b141a;
  --ink-2: #2c3d45;
  --muted: #64787f;
  --bg: #ffffff;
  --surface: #f4f9f6;
  --surface-2: #e9f4ee;
  --line: #e2ebe7;
  --ring: rgba(37, 211, 102, 0.28);

  --hero-from: #eefaf2;
  --hero-via: #f7fdfa;
  --hero-to: #ffffff;
  --hero-ink: #0b141a;
  --hero-muted: #4e6469;
  --hero-chip: rgba(255, 255, 255, 0.75);
  --hero-line: rgba(11, 20, 26, 0.08);

  --header-bg: rgba(255, 255, 255, 0.84);
  --card: #ffffff;
  --footer-bg: #0b141a;
  --footer-ink: #cfdde2;
  --footer-head: #ffffff;

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 1px 2px rgba(11, 20, 26, 0.05), 0 10px 26px -16px rgba(11, 20, 26, 0.16);
  --shadow-md: 0 1px 2px rgba(11, 20, 26, 0.05), 0 26px 60px -32px rgba(11, 20, 26, 0.28);
  --maxw: 1160px;
}

/* 主题 B：深邃墨绿（官方稳重） */
body[data-theme="forest"] {
  --brand: #2ee06f;
  --brand-600: #25d366;
  --brand-700: #075e54;
  --brand-soft: rgba(46, 224, 111, 0.14);
  --hero-from: #04352f;
  --hero-via: #075e54;
  --hero-to: #0a4a43;
  --hero-ink: #ffffff;
  --hero-muted: #a9d4c9;
  --hero-chip: rgba(255, 255, 255, 0.12);
  --hero-line: rgba(255, 255, 255, 0.16);
  --surface: #f2f7f5;
  --surface-2: #e4f0eb;
}

/* 主题 C：夜间深色 */
body[data-theme="night"] {
  --brand: #25d366;
  --brand-600: #22c55e;
  --brand-700: #34d399;
  --brand-soft: rgba(37, 211, 102, 0.14);
  --ink: #eef4f6;
  --ink-2: #cfdde2;
  --muted: #90a4ab;
  --bg: #0a1114;
  --surface: #101b20;
  --surface-2: #14242a;
  --line: #1d2e35;
  --hero-from: #0d1b20;
  --hero-via: #0a1114;
  --hero-to: #0a1114;
  --hero-ink: #f2f8fa;
  --hero-muted: #93a8af;
  --hero-chip: rgba(255, 255, 255, 0.06);
  --hero-line: rgba(255, 255, 255, 0.1);
  --header-bg: rgba(10, 17, 20, 0.86);
  --card: #101b20;
  --footer-bg: #060d10;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 26px -16px rgba(0, 0, 0, 0.6);
  --shadow-md: 0 26px 60px -32px rgba(0, 0, 0, 0.8);
}

/* ---------- 2. 基础重置 ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; vertical-align: middle; }
a { color: var(--brand-700); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0 0 0.6em; line-height: 1.28; font-weight: 700; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.72rem, 3.4vw, 2.55rem); }
h2 { font-size: clamp(1.45rem, 2.6vw, 2.05rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.25em; }
li { margin-bottom: 0.4em; }
strong { color: var(--ink); font-weight: 700; }
code {
  font-family: ui-monospace, SFMono-Regular, Consolas, "Courier New", monospace;
  font-size: 0.92em;
  background: var(--surface-2);
  padding: 0.15em 0.42em;
  border-radius: 6px;
}
:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; border-radius: 6px; }

/* 键盘可达性：跳转链接 */
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--brand); color: #06251a; font-weight: 700;
  padding: 10px 18px; border-radius: 0 0 10px 10px;
  transition: top 0.18s ease;
}
.skip:focus { top: 0; text-decoration: none; }

/* ---------- 3. 布局工具 ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
.section { padding: 76px 0; }
.section--tight { padding: 52px 0; }
.section--surface { background: var(--surface); }
.section--line { border-top: 1px solid var(--line); }
.center { text-align: center; }
.lead { font-size: 1.06rem; color: var(--muted); max-width: 820px; }
.center .lead { margin-left: auto; margin-right: auto; }
/* 让居中标题与副标题的换行更均衡，避免末行只剩一两个字 */
h1, h2, .center .lead { text-wrap: balance; }
.card p, .prose p { text-wrap: pretty; }
.grid { display: grid; gap: 20px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--brand-700);
  background: var(--brand-soft);
  padding: 6px 14px; border-radius: 999px; margin-bottom: 18px;
}

/* ---------- 4. 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 24px; border-radius: 999px; border: 1px solid transparent;
  font-size: 0.98rem; font-weight: 700; line-height: 1;
  cursor: pointer; transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-primary { background: var(--brand); color: #06251a; box-shadow: 0 10px 24px -12px rgba(37, 211, 102, 0.9); }
.btn-primary:hover { background: var(--brand-600); box-shadow: 0 16px 30px -14px rgba(37, 211, 102, 0.95); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface); border-color: var(--brand); }
body[data-theme="forest"] .hero .btn-ghost,
body[data-theme="night"] .hero .btn-ghost { color: var(--hero-ink); border-color: var(--hero-line); }
body[data-theme="forest"] .hero .btn-ghost:hover,
body[data-theme="night"] .hero .btn-ghost:hover { background: rgba(255, 255, 255, 0.1); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

/* ---------- 5. 顶部导航 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: var(--header-bg);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 66px; gap: 18px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.04rem; color: var(--ink); letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 34px; height: 34px; flex: 0 0 34px; }
.brand small { display: block; font-size: 0.68rem; font-weight: 600; color: var(--muted); letter-spacing: 0.06em; }

.nav-links { display: flex; align-items: center; gap: 4px; margin: 0; padding: 0; list-style: none; }
.nav-links li { margin: 0; }
.nav-links a {
  display: block; padding: 8px 13px; border-radius: 9px;
  color: var(--ink-2); font-size: 0.93rem; font-weight: 600;
}
.nav-links a:hover { background: var(--surface); color: var(--ink); text-decoration: none; }
.nav-links a[aria-current="page"] { color: var(--brand-700); background: var(--brand-soft); }
.nav-cta { display: flex; align-items: center; gap: 10px; }

.theme-switch { display: flex; gap: 6px; padding: 4px; border: 1px solid var(--line); border-radius: 999px; }
.theme-switch button {
  width: 22px; height: 22px; border-radius: 50%; border: 1px solid rgba(11, 20, 26, 0.12);
  cursor: pointer; padding: 0; background: #fff;
}
.theme-switch button[data-set="fresh"] { background: linear-gradient(135deg, #25d366, #eefaf2); }
.theme-switch button[data-set="forest"] { background: linear-gradient(135deg, #075e54, #2ee06f); }
.theme-switch button[data-set="night"] { background: linear-gradient(135deg, #0a1114, #25d366); }
.theme-switch button[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--brand); }

.nav-toggle {
  display: none; width: 40px; height: 40px; align-items: center; justify-content: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; cursor: pointer;
}

/* ---------- 6. Hero ---------- */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  background: linear-gradient(160deg, var(--hero-from) 0%, var(--hero-via) 45%, var(--hero-to) 100%);
  color: var(--hero-ink);
  padding: 74px 0 84px;
  border-bottom: 1px solid var(--hero-line);
}
.hero::after {
  content: ""; position: absolute; z-index: 0; inset: auto -10% -40% 45%;
  width: 620px; height: 620px; border-radius: 50%;
  background: radial-gradient(circle, rgba(37, 211, 102, 0.22), transparent 62%);
  pointer-events: none;
}
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.12fr 0.88fr; gap: 54px; align-items: center; }
.hero h1 { color: var(--hero-ink); margin-bottom: 18px; }
.hero p { color: var(--hero-muted); font-size: 1.07rem; max-width: 560px; }
.hero .eyebrow { background: var(--hero-chip); color: var(--brand-700); }
body[data-theme="forest"] .hero .eyebrow,
body[data-theme="night"] .hero .eyebrow { color: #c9f5dd; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 26px; margin-top: 34px; padding-top: 26px; border-top: 1px solid var(--hero-line); }
.hero-facts div { min-width: 96px; }
.hero-facts b { display: block; font-size: 1.42rem; color: var(--hero-ink); line-height: 1.2; }
.hero-facts span { font-size: 0.82rem; color: var(--hero-muted); }

/* 浏览器窗口模拟 */
.mock {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transform: perspective(1200px) rotateY(-4deg) rotateX(1.5deg);
  transition: transform 0.5s ease;
}
.mock:hover { transform: perspective(1200px) rotateY(0) rotateX(0); }
.mock-bar { display: flex; align-items: center; gap: 7px; padding: 11px 14px; border-bottom: 1px solid var(--line); background: var(--surface); }
.mock-bar i { width: 10px; height: 10px; border-radius: 50%; background: #d5dedb; display: block; }
.mock-bar i:nth-child(1) { background: #ff5f57; }
.mock-bar i:nth-child(2) { background: #febc2e; }
.mock-bar i:nth-child(3) { background: #28c840; }
.mock-url {
  flex: 1; margin-left: 8px; font-size: 0.74rem; color: var(--muted);
  background: var(--bg); border: 1px solid var(--line); border-radius: 999px;
  padding: 3px 12px; text-align: center; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.mock-body { display: grid; grid-template-columns: 82px 1fr; min-height: 300px; }
.mock-side { background: var(--surface); border-right: 1px solid var(--line); padding: 12px 10px; display: flex; flex-direction: column; gap: 10px; }
.mock-avatar { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, var(--brand), var(--brand-700)); opacity: 0.85; }
.mock-search { height: 8px; border-radius: 4px; background: var(--line); }
.mock-chat { padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.mock-name { font-size: 0.78rem; font-weight: 700; color: var(--ink); padding-bottom: 9px; border-bottom: 1px solid var(--line); }
.bubble { max-width: 82%; padding: 8px 12px; border-radius: 12px; font-size: 0.8rem; line-height: 1.5; box-shadow: 0 1px 1px rgba(11, 20, 26, 0.06); }
.bubble.in { background: var(--surface); color: var(--ink-2); border-top-left-radius: 4px; }
.bubble.out { align-self: flex-end; background: var(--brand-soft); color: var(--ink); border-top-right-radius: 4px; }
body[data-theme="night"] .bubble.out { background: #1d3b2c; color: #dcf8e6; }

/* ---------- 7. 卡片 ---------- */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--brand); }
.card h3 { margin-bottom: 0.5em; }
.card p:last-child { margin-bottom: 0; }
.card p { color: var(--muted); font-size: 0.95rem; }
.icon-box {
  width: 46px; height: 46px; border-radius: 13px; margin-bottom: 16px;
  display: flex; align-items: center; justify-content: center;
  background: var(--brand-soft); color: var(--brand-700);
}
.icon-box svg { width: 23px; height: 23px; }

.card-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 0.9rem; margin-top: 14px; color: var(--brand-700); }
.card-link:hover { text-decoration: none; gap: 10px; }

/* ---------- 8. 步骤 ---------- */
.steps { counter-reset: step; display: grid; gap: 18px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.step { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 24px; }
.step::before {
  counter-increment: step; content: "0" counter(step);
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 11px; margin-bottom: 14px;
  background: var(--brand); color: #06251a; font-weight: 800; font-size: 0.9rem;
}
.step h3 { font-size: 1.02rem; }
.step p { margin: 0; color: var(--muted); font-size: 0.93rem; }

/* ---------- 9. 正文排版 ---------- */
.prose { max-width: 820px; }
.prose h2 { margin-top: 2em; padding-top: 0.3em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.6em; }
.prose p, .prose li { color: var(--ink-2); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose > p:last-child { margin-bottom: 0; }

.with-aside { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; align-items: start; }
.aside-card {
  position: sticky; top: 88px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px;
}
.aside-card h3 { font-size: 0.98rem; }
.aside-card ul { list-style: none; padding: 0; margin: 0; }
.aside-card li { margin: 0; border-bottom: 1px dashed var(--line); }
.aside-card li:last-child { border-bottom: 0; }
.aside-card li a { display: block; padding: 9px 0; font-size: 0.92rem; color: var(--ink-2); font-weight: 600; }
.aside-card li a:hover { color: var(--brand-700); text-decoration: none; }

/* ---------- 10. 面包屑 ---------- */
.crumb { padding: 16px 0; font-size: 0.85rem; color: var(--muted); border-bottom: 1px solid var(--line); }
.crumb ol { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.crumb li { margin: 0; display: flex; align-items: center; gap: 8px; }
.crumb li + li::before { content: "/"; color: var(--line); }
.crumb a { color: var(--muted); }
.crumb a:hover { color: var(--brand-700); }
.crumb [aria-current="page"] { color: var(--ink-2); font-weight: 600; }

/* ---------- 11. 表格 ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
table { width: 100%; border-collapse: collapse; font-size: 0.93rem; min-width: 560px; }
th, td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--line); }
th { background: var(--surface); font-weight: 700; color: var(--ink); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td { color: var(--ink-2); }

/* ---------- 12. FAQ 手风琴 ---------- */
.faq { display: grid; gap: 12px; }
.faq details {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 2px 4px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.faq details[open] { border-color: var(--brand); box-shadow: var(--shadow-sm); }
.faq summary {
  cursor: pointer; list-style: none; padding: 16px 18px;
  font-weight: 700; font-size: 1rem; color: var(--ink);
  display: flex; justify-content: space-between; align-items: center; gap: 14px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: 0 0 10px; width: 10px; height: 10px;
  border-right: 2px solid var(--brand-700); border-bottom: 2px solid var(--brand-700);
  transform: rotate(45deg); transition: transform 0.2s ease; margin-top: -5px;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: 4px; }
.faq .faq-body { padding: 0 18px 16px; color: var(--muted); font-size: 0.95rem; }
.faq .faq-body p:last-child { margin-bottom: 0; }

/* ---------- 13. 提示块 ---------- */
.note {
  border-left: 4px solid var(--brand);
  background: var(--brand-soft);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 16px 20px; margin: 22px 0; font-size: 0.95rem; color: var(--ink-2);
}
.note b { display: block; margin-bottom: 4px; color: var(--ink); }

/* ---------- 14. CTA 区块 ---------- */
.cta-band {
  background: linear-gradient(135deg, #0e3b33 0%, #128c7e 55%, #25d366 130%);
  border-radius: var(--radius-lg); padding: 54px 44px; color: #fff;
  display: flex; align-items: center; justify-content: space-between; gap: 34px; flex-wrap: wrap;
  box-shadow: var(--shadow-md);
}
.cta-band h2 { color: #fff; margin-bottom: 0.35em; }
.cta-band p { color: rgba(255, 255, 255, 0.82); margin: 0; max-width: 560px; }
.cta-band .btn-primary { background: #fff; color: #0b3d33; box-shadow: 0 12px 26px -14px rgba(0, 0, 0, 0.5); }
.cta-band .btn-primary:hover { background: #eafff4; }
.cta-band .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, 0.42); }
.cta-band .btn-ghost:hover { background: rgba(255, 255, 255, 0.12); }

/* ---------- 15. 页脚 ---------- */
.site-footer { background: var(--footer-bg); color: var(--footer-ink); padding: 60px 0 30px; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
.site-footer h4 { color: var(--footer-head); font-size: 0.92rem; letter-spacing: 0.04em; margin-bottom: 16px; text-transform: uppercase; }
.site-footer p { color: #93a7ae; font-size: 0.9rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 10px; }
.site-footer a { color: var(--footer-ink); font-size: 0.9rem; }
.site-footer a:hover { color: var(--brand); text-decoration: none; }
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; color: #fff; font-weight: 800; }
.footer-bottom {
  margin-top: 44px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: 0.82rem; color: #7d9096;
}
.footer-bottom a { color: #7d9096; font-size: 0.82rem; }

/* ---------- 16. 404 ---------- */
.err-code { font-size: clamp(4rem, 14vw, 9rem); font-weight: 800; line-height: 1; color: var(--brand); opacity: 0.9; letter-spacing: -0.04em; }

/* ---------- 17. 响应式 ---------- */
@media (max-width: 1024px) {
  .with-aside { grid-template-columns: 1fr; gap: 32px; }
  .aside-card { position: static; }
  .hero-grid { grid-template-columns: 1fr; gap: 42px; }
  .mock { transform: none; }
  .mock-body { min-height: 0; }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .nav-links {
    position: absolute; top: 66px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 12px 18px 18px; margin: 0;
    box-shadow: var(--shadow-sm);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 11px 12px; font-size: 0.98rem; }
  .nav-toggle { display: inline-flex; }
  .nav-cta .btn { display: none; }
  .g2, .g3, .g4, .steps { grid-template-columns: 1fr; }
  .section { padding: 54px 0; }
  .hero { padding: 46px 0 60px; }
  .cta-band { padding: 38px 26px; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .table-wrap { border-radius: var(--radius-sm); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .card:hover, .btn:hover, .mock { transform: none; }
}
