/* ============================================================
   文澜智库 官网 · 共享样式
   轻量简洁 · 无外部依赖 · 系统字体栈 · CSS 变量便于改色
   配色：深墨蓝（品牌/文字） + 印章红（主行动/强调）
   ============================================================ */

:root {
  /* 颜色 */
  --bg: #ffffff;
  --bg-soft: #f6f7f9;
  --bg-tint: #f3f5f9;
  --ink: #1d3a63;          /* 深墨蓝：标题、Logo */
  --ink-2: #3c4a60;        /* 正文 */
  --muted: #6b7689;        /* 次要文字 */
  --line: #e7e9ee;         /* 分割线 */
  --accent: #c8443b;       /* 印章红：主 CTA / 强调 */
  --accent-weak: #fbecea;  /* 印章红浅底 */
  --accent-ink: #a8362f;   /* 印章红深 */
  --ok: #1f8a70;           /* 成功/可用 */

  /* 排版 */
  --font: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Hiragino Sans GB",
          system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* 间距 */
  --maxw: 1140px;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(20, 33, 59, .04), 0 8px 24px rgba(20, 33, 59, .06);
  --shadow-lg: 0 12px 40px rgba(20, 33, 59, .12);
  --nav-h: 64px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink-2);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.25; margin: 0; font-weight: 700; }
p { margin: 0; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- 顶部导航 ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 28px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--ink);
  font-size: 18px;
  letter-spacing: .5px;
}
.brand .brand-mark {
  width: 34px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 9px; flex: 0 0 auto;
}
.brand .brand-mark img { width: 100%; height: 100%; object-fit: contain; }
.brand .brand-sub {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  border-left: 1px solid var(--line);
  padding-left: 10px;
  margin-left: 2px;
  letter-spacing: 1px;
}
.nav-links {
  display: flex;
  gap: 26px;
  margin-left: auto;
  align-items: center;
}
.nav-links a {
  color: var(--ink-2);
  font-size: 15px;
  font-weight: 500;
  transition: color .15s ease;
}
.nav-links a:hover { color: var(--accent); }
.nav-cta { margin-left: 4px; }
.nav-links .nav-cta { color: #fff; }
.nav-toggle {
  display: none;
  margin-left: auto;
  background: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  width: 40px; height: 38px;
  cursor: pointer;
  align-items: center; justify-content: center;
}
.nav-toggle span { display:block; width:18px; height:2px; background:var(--ink); position:relative; }
.nav-toggle span::before, .nav-toggle span::after {
  content:""; position:absolute; left:0; width:18px; height:2px; background:var(--ink);
}
.nav-toggle span::before { top:-6px; } .nav-toggle span::after { top:6px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform .12s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 6px 16px rgba(200, 68, 59, .28);
}
.btn-primary:hover { background: var(--accent-ink); }
.btn-ghost {
  background: #fff;
  color: var(--ink);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--ink); }
.btn-lg { padding: 14px 26px; font-size: 16px; }

/* ---------- 通用区块 ---------- */
section { padding: 84px 0; }
.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 14px;
}
.section-head { max-width: 680px; margin-bottom: 44px; }
.section-head h2 { font-size: 30px; letter-spacing: .5px; }
.section-head p { margin-top: 14px; color: var(--muted); font-size: 16px; }
.center { text-align: center; margin-left: auto; margin-right: auto; }

/* ---------- Hero ---------- */
.hero { padding: 72px 0 64px; background:
  radial-gradient(1200px 480px at 80% -10%, rgba(200,68,59,.06), transparent 60%),
  radial-gradient(900px 420px at 0% 0%, rgba(29,58,99,.07), transparent 55%); }
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 48px;
  align-items: center;
}
.hero h1 { font-size: 44px; letter-spacing: .5px; }
.hero .lead { margin-top: 20px; font-size: 18px; color: var(--ink-2); }
/* 产品 slogan：藏读一生 */
.hero .slogan {
  margin-top: 16px;
  display: inline-flex; align-items: center; gap: 14px;
  font-size: 22px; font-weight: 600; letter-spacing: 10px; text-indent: 10px;
  color: var(--accent);
}
.hero .slogan::before {
  content: ""; width: 26px; height: 2px; background: var(--accent); border-radius: 2px;
}
.footer .slogan { font-size: 13.5px; letter-spacing: 5px; color: #8b97ab; }
.hero-actions { margin-top: 30px; display: flex; gap: 14px; flex-wrap: wrap; }
.hero-note {
  margin-top: 22px; display: flex; gap: 18px; flex-wrap: wrap;
  color: var(--muted); font-size: 14px;
}
.hero-note span { display: inline-flex; align-items: center; gap: 7px; }
.hero-note .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.hero-visual {
  background: linear-gradient(160deg, #fff, var(--bg-soft));
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  padding: 22px;
}

/* ---------- 信任条 ---------- */
.trust {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bg-soft);
}
.trust-inner {
  display: flex; flex-wrap: wrap; gap: 14px 40px;
  justify-content: center; align-items: center;
  padding: 22px 0; color: var(--muted); font-size: 14px;
}
.trust-inner b { color: var(--ink); font-weight: 700; }

/* ---------- 功能卡片 ---------- */
.grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(3, 1fr);
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
  transition: transform .15s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: #d8dce4; }
.card .ico {
  width: 44px; height: 44px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-weak); color: var(--accent);
  margin-bottom: 16px;
}
.card .ico svg { width: 24px; height: 24px; }
.card h3 { font-size: 18px; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 14.5px; }
.card { position: relative; }
.card .badge {
  position: absolute; top: 16px; right: 16px;
  background: var(--accent-weak); color: var(--accent-ink);
  font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px;
  white-space: nowrap;
}

/* ---------- 使用三步 ---------- */
.steps {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px;
  counter-reset: step;
}
.step {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 24px;
  position: relative;
}
.step .num {
  counter-increment: step;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--ink); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 15px; margin-bottom: 16px;
}
.step .num::before { content: counter(step); }
.step h3 { font-size: 17px; margin-bottom: 8px; }
.step p { color: var(--muted); font-size: 14.5px; }

/* ---------- 下载区 ---------- */
.download { background: var(--bg-soft); }
.dl-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px;
  max-width: 820px; margin: 0 auto;
}
.dl-card {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px 24px;
  display: flex; flex-direction: column; gap: 12px;
}
.dl-card.feature { border-color: var(--accent); box-shadow: 0 10px 30px rgba(200,68,59,.12); }
.dl-card .plat { display: flex; align-items: center; gap: 12px; }
.dl-card .plat .pico {
  width: 42px; height: 42px; border-radius: 10px;
  background: var(--ink); color: #fff; display:flex; align-items:center; justify-content:center;
}
.dl-card h3 { font-size: 18px; }
.dl-card .meta { color: var(--muted); font-size: 13.5px; }
.dl-card .btn { margin-top: 6px; }
.req-note {
  text-align: center; color: var(--muted); font-size: 13.5px; margin-top: 26px;
}

/* ---------- FAQ ---------- */
.faq { max-width: 820px; margin: 0 auto; }
.faq details {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0 20px;
  margin-bottom: 12px;
  background: #fff;
}
.faq details[open] { border-color: #d8dce4; }
.faq summary {
  cursor: pointer; padding: 18px 0; font-weight: 600; color: var(--ink);
  font-size: 16px; list-style: none; display: flex; align-items: center; justify-content: space-between;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 22px; font-weight: 400; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details p { padding: 0 0 18px; color: var(--muted); font-size: 15px; }

/* ---------- 页脚 ---------- */
.footer {
  background: #0f1d33;
  color: #aeb8c8;
  padding: 54px 0 30px;
}
.footer a { color: #cdd6e4; }
.footer a:hover { color: #fff; }
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 30px;
  padding-bottom: 36px; border-bottom: 1px solid rgba(255,255,255,.08);
}
.footer .brand { color: #fff; }
.footer .brand .brand-mark { background: #fff; padding: 3px; }
.footer .brand .brand-sub { color: #8b97ab; border-color: rgba(255,255,255,.14); }
.footer h4 { color: #fff; font-size: 14px; margin-bottom: 14px; letter-spacing: 1px; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer ul a { font-size: 14px; }
.footer .f-about { font-size: 14px; line-height: 1.8; max-width: 320px; }
.footer-bottom {
  padding-top: 22px; display: flex; justify-content: space-between; gap: 16px;
  flex-wrap: wrap; font-size: 13px; color: #8b97ab;
}

/* ---------- 定价 ---------- */
.pricing { background: var(--bg); }
.pricing .section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.price-wrap { max-width: 1160px; margin: 0 auto; }
.price-trigger { text-align: center; padding: 18px 0 8px; }
.price-trigger .price-hint { margin-top: 12px; color: var(--muted); font-size: 14px; }
.price-grid {
  display: grid; gap: 18px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: stretch;
}
/* 窄屏兜底：避免小尺寸设备溢出 */
@media (max-width: 980px) {
  .price-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .price-grid { grid-template-columns: 1fr; }
}
.price-card {
  position: relative;
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px 20px;
  display: flex; flex-direction: column; gap: 6px;
  transition: transform .15s ease, box-shadow .2s ease, border-color .2s ease;
}
.price-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: #d8dce4; }
.price-card.recommended { border-color: var(--accent); box-shadow: 0 10px 30px rgba(200,68,59,.14); }
.price-card .pc-tag {
  position: absolute; top: -11px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: #fff; font-size: 12px; font-weight: 700;
  padding: 4px 12px; border-radius: 999px; white-space: nowrap;
}
.price-card .pc-name { font-size: 17px; font-weight: 700; color: var(--ink); }
.price-card .pc-price { margin-top: 6px; display: flex; align-items: baseline; gap: 3px; }
.price-card .pc-price .cur { font-size: 18px; font-weight: 700; color: var(--ink); }
.price-card .pc-price .amt { font-size: 38px; font-weight: 800; color: var(--ink); line-height: 1; }
.price-card .pc-price .per { font-size: 14px; color: var(--muted); }
.price-card .pc-desc { font-size: 13px; color: var(--muted); min-height: 20px; }
.price-card .pc-cta { margin-top: 14px; }
.price-card .pc-cta .btn { width: 100%; }
.price-meta {
  grid-column: 1 / -1; text-align: center; color: var(--muted);
  font-size: 13px; margin-top: 4px;
}
.price-loading, .price-error { grid-column: 1 / -1; text-align: center; color: var(--muted); padding: 30px 0; font-size: 15px; }
.price-error .btn { margin-top: 14px; }

/* ---------- 滚动显现 ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- 响应式 ---------- */
@media (max-width: 960px) {
  .grid, .steps { grid-template-columns: repeat(2, 1fr); }
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .hero h1 { font-size: 36px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  section { padding: 60px 0; }
  .grid, .steps, .dl-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .nav.open .nav-links {
    display: flex; flex-direction: column; gap: 4px;
    position: absolute; top: var(--nav-h); left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--line);
    padding: 12px 24px 18px; margin: 0;
  }
  .nav.open .nav-links a { padding: 10px 0; }
  .hero h1 { font-size: 30px; }
  .section-head h2 { font-size: 25px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 460px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ---------- 账户入口 / 登录注册 / 支付 弹窗 ---------- */
.account-box { display: inline-flex; align-items: center; gap: 10px; }
.acc-link {
  font-size: 14px; color: var(--ink); background: none;
  border: 1px solid var(--line); padding: 7px 14px; border-radius: 999px; cursor: pointer;
  white-space: nowrap; transition: border-color .15s, color .15s;
}
.acc-link:hover { border-color: var(--accent); color: var(--accent); }
.acc-user { font-size: 14px; color: var(--ink); font-weight: 600; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-logout { font-size: 13px; color: #94a3b8; background: none; border: none; cursor: pointer; padding: 0; }
.acc-logout:hover { color: var(--accent); }

.modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal-mask { position: absolute; inset: 0; background: rgba(15, 23, 42, .5); backdrop-filter: blur(2px); }
.modal-card {
  position: relative; z-index: 1; background: #fff; border-radius: 16px;
  width: min(420px, 94vw); max-height: 90vh; overflow: auto; padding: 28px 26px;
  box-shadow: 0 24px 64px rgba(15, 23, 42, .28);
}
.modal-close {
  position: absolute; top: 12px; right: 14px; border: none; background: none;
  font-size: 26px; line-height: 1; color: #94a3b8; cursor: pointer; z-index: 2;
}
.modal-close:hover { color: #475569; }
body.modal-open { overflow: hidden; }

.auth-tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.auth-tab {
  flex: 1; padding: 10px; border: 1px solid var(--line); background: #f8fafc;
  border-radius: 10px; cursor: pointer; font-size: 15px; color: #64748b; transition: all .15s;
}
.auth-tab.active { background: var(--accent); color: #fff; border-color: var(--accent); }

.auth-form { display: flex; flex-direction: column; gap: 6px; }
.auth-form[hidden] { display: none; }
.auth-form label { font-size: 13px; color: #475569; margin-top: 8px; display: flex; justify-content: space-between; align-items: center; }
.auth-form input { padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 14px; width: 100%; box-sizing: border-box; }
.auth-form input:focus { outline: none; border-color: var(--accent); }
.code-btn {
  font-size: 12px; padding: 4px 10px; border: 1px solid var(--accent); color: var(--accent);
  background: #fff; border-radius: 8px; cursor: pointer; white-space: nowrap;
}
.code-btn:disabled { color: #94a3b8; border-color: #cbd5e1; cursor: default; background: #f8fafc; }
.auth-err { color: #dc2626; font-size: 13px; min-height: 18px; margin: 8px 0 0; text-align: left; }
.btn-block { width: 100%; margin-top: 16px; justify-content: center; }

.pay-card { width: min(440px, 94vw); text-align: center; }
.pay-title { font-size: 20px; margin: 0 0 16px; }
.pay-info { background: #f8fafc; border-radius: 12px; padding: 14px; margin-bottom: 12px; font-size: 15px; color: #334155; line-height: 1.7; }
.pay-info .amt { font-size: 26px; font-weight: 800; color: var(--accent); }
.pay-qr { display: flex; justify-content: center; padding: 8px 0; }
.pay-qr img { width: 200px; height: 200px; }
.pay-hint { color: #64748b; font-size: 13px; margin: 10px 0; line-height: 1.6; }
.pay-status { font-size: 14px; color: #64748b; margin-top: 12px; min-height: 20px; }
.pay-done { padding: 24px 0 8px; font-size: 20px; font-weight: 700; color: #16a34a; line-height: 1.6; }
.pay-err, .pay-loading { color: #64748b; padding: 24px 0; font-size: 14px; }

/* ---------- 技术客服：侧边悬浮入口 ---------- */
.support-float {
  position: fixed; right: 0; top: 50%; transform: translateY(-50%);
  z-index: 900;
}
.sf-btn {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 13px 9px; margin: 0; cursor: pointer;
  border: 1px solid var(--line); border-right: none;
  border-radius: 12px 0 0 12px;
  background: rgba(255, 255, 255, .97); color: var(--accent);
  font-family: inherit;
  box-shadow: -5px 8px 22px rgba(15, 23, 42, .13);
  transition: background .18s ease, color .18s ease, padding .18s ease, box-shadow .18s ease;
}
.sf-btn svg { width: 21px; height: 21px; display: block; }
.sf-btn .sf-text {
  writing-mode: vertical-rl; letter-spacing: 3px;
  font-size: 13px; font-weight: 600; line-height: 1;
}
.sf-btn:hover {
  background: var(--accent); color: #fff; padding-right: 13px;
  box-shadow: -6px 10px 26px rgba(200, 68, 59, .32);
}
.sf-btn:active { transform: translateY(1px); }

/* 悬停展开二维码面板（无弹窗） */
.sf-panel {
  position: absolute;
  right: calc(100% + 14px);
  top: 50%;
  width: 208px;
  padding: 18px 16px 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: -8px 12px 34px rgba(15, 23, 42, .18);
  text-align: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-50%) translateX(10px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
}
.support-float:hover .sf-panel,
.support-float.sf-open .sf-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(-50%) translateX(0);
}
.sf-panel-title { font-size: 16px; font-weight: 700; color: var(--ink); }
.sf-panel-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.sf-qr {
  width: 150px; height: 150px; object-fit: contain;
  margin: 12px auto 0;
  padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: 10px;
}
.sf-panel-tip { font-size: 12.5px; color: var(--muted); line-height: 1.7; margin: 10px 0 0; }

/* 页脚二维码（深色底） */
.footer-qr { display: flex; align-items: center; gap: 12px; margin-top: 18px; }
.footer-qr img {
  width: 92px; height: 92px; flex: 0 0 auto; object-fit: contain;
  padding: 4px; background: #fff; border-radius: 8px;
}
.footer-qr .fq-text { font-size: 12.5px; line-height: 1.75; color: #8b97ab; }
.footer-qr .fq-text b { display: block; color: #cdd6e4; font-size: 13px; font-weight: 600; margin-bottom: 2px; }

/* 帮助页联系区二维码 */
.contact-qr { display: inline-flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 26px; }
.contact-qr img {
  width: 168px; height: 168px; object-fit: contain;
  padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow-lg);
}
.contact-qr span { font-size: 13.5px; color: var(--muted); }

@media (max-width: 680px) {
  .support-float { top: auto; bottom: 92px; transform: none; }
  .sf-btn { padding: 11px 10px; border-radius: 12px 0 0 12px; }
  .sf-btn .sf-text { display: none; }
  .sf-btn:hover { padding-right: 10px; }
  .footer-qr img { width: 84px; height: 84px; }
}
