/* 设计 token —— 全站只用这里的变量，不写裸色值 */
:root {
  --bg: #F7F5F1;
  --surface: #FFFFFF;
  --surface-2: #F1EEE8;
  --line: #E6E2DA;
  --line-2: #D5D0C6;

  --ink: #1C1E24;
  --ink-2: #565C68;
  --ink-3: #8C93A0;

  --brand: #2E5E4E;
  --brand-deep: #22463A;
  --brand-soft: #E9F1ED;
  --brand-line: #C4D8CF;

  --accent: #C97A47;
  --accent-deep: #A65F32;
  --accent-soft: #FBF1E8;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;

  --shadow: 0 1px 2px rgba(28, 30, 36, .04), 0 8px 24px rgba(28, 30, 36, .05);
  --shadow-lg: 0 2px 6px rgba(28, 30, 36, .05), 0 16px 44px rgba(28, 30, 36, .09);

  --w: 480px;
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-size-adjust: 100%;
}

.wrap { max-width: var(--w); margin: 0 auto; padding: 0 20px 56px; }
.wrap-wide { max-width: 640px; }

a { color: var(--brand); text-decoration: none; }

/* ---------- 通用组件 ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}
.card + .card { margin-top: 14px; }

.kicker {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; letter-spacing: .08em;
  color: var(--brand);
  background: var(--brand-soft);
  border: 1px solid var(--brand-line);
  border-radius: 999px;
  padding: 4px 12px;
}
.kicker::before {
  content: ''; width: 5px; height: 5px; border-radius: 50%;
  background: var(--brand);
}

h1 { font-size: 27px; line-height: 1.34; letter-spacing: -.01em; margin: 18px 0 12px; font-weight: 600; }
h2 { font-size: 19px; line-height: 1.45; margin: 0 0 10px; font-weight: 600; }
h3 { font-size: 16px; margin: 0 0 8px; font-weight: 600; }
p { margin: 0 0 12px; color: var(--ink-2); }
p.lead { font-size: 16px; color: var(--ink-2); }
.muted { color: var(--ink-3); font-size: 13px; }
.tiny { font-size: 12px; color: var(--ink-3); line-height: 1.65; }
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }

.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: 52px;
  border: 0; border-radius: var(--radius);
  background: var(--brand); color: #fff;
  font-family: var(--font); font-size: 16px; font-weight: 600;
  cursor: pointer; transition: transform .12s, background .16s, opacity .16s;
}
.btn:active { transform: scale(.985); background: var(--brand-deep); }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }
.btn-ghost {
  background: transparent; color: var(--ink-2);
  border: 1px solid var(--line-2); font-weight: 500;
}
.btn-ghost:active { background: var(--surface-2); }
.btn-accent { background: var(--accent); }
.btn-accent:active { background: var(--accent-deep); }
.btn-sm { min-height: 42px; font-size: 14px; width: auto; padding: 0 18px; }
.btn-row { display: flex; gap: 10px; }

/* ---------- 落地页 ---------- */
.hero { padding: 40px 0 8px; }
.stats { display: flex; gap: 10px; margin: 22px 0 26px; }
.stat {
  flex: 1; text-align: center; padding: 14px 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
.stat b { display: block; font-size: 19px; font-weight: 600; color: var(--ink); line-height: 1.3; }
.stat span { font-size: 12px; color: var(--ink-3); }

.steps { counter-reset: s; }
.step { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px dashed var(--line); }
.step:last-child { border-bottom: 0; padding-bottom: 0; }
.step-n {
  flex: 0 0 26px; height: 26px; margin-top: 2px;
  border-radius: 50%; background: var(--brand-soft); color: var(--brand);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600;
}
.step-b h3 { font-size: 15px; margin-bottom: 2px; }
.step-b p { font-size: 14px; margin: 0; }

.faq-item { border-bottom: 1px solid var(--line); }
.faq-item:last-child { border-bottom: 0; }
.faq-item summary {
  list-style: none; cursor: pointer; padding: 14px 0;
  font-size: 15px; font-weight: 500; color: var(--ink);
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: ''; flex: 0 0 8px; height: 8px;
  border-right: 1.5px solid var(--ink-3); border-bottom: 1.5px solid var(--ink-3);
  transform: rotate(45deg) translateY(-2px); transition: transform .2s;
}
.faq-item[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.faq-item p { font-size: 14px; margin: 0 0 16px; }

/* ---------- 同意勾选 ---------- */
.consent {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 14px; margin: 16px 0;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); font-size: 13px; line-height: 1.6; color: var(--ink-2);
}
.consent input { flex: 0 0 18px; width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--brand); }
.consent.err { border-color: var(--accent); background: var(--accent-soft); }

/* ---------- 答题页 ---------- */
.qbar {
  position: sticky; top: 0; z-index: 10;
  background: rgba(247, 245, 241, .94);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
  padding: 12px 0 10px; margin-bottom: 20px;
}
.qbar-in { max-width: var(--w); margin: 0 auto; padding: 0 20px; }
.qbar-top { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; color: var(--ink-3); margin-bottom: 8px; }
.qbar-top b { color: var(--ink); font-size: 15px; font-weight: 600; }
.track { height: 4px; background: var(--line); border-radius: 999px; overflow: hidden; }
.track i { display: block; height: 100%; width: 0; background: var(--brand); border-radius: 999px; transition: width .3s cubic-bezier(.4, 0, .2, 1); }

.qtext { font-size: 21px; line-height: 1.5; font-weight: 600; margin: 0 0 22px; letter-spacing: -.01em; }
.qdim { font-size: 12px; color: var(--ink-3); margin-bottom: 10px; }

.opt {
  display: block; width: 100%; text-align: left;
  background: var(--surface); border: 1.5px solid var(--line);
  border-radius: var(--radius); padding: 18px 18px 18px 52px;
  margin-bottom: 12px; position: relative;
  font-family: var(--font); font-size: 16px; line-height: 1.55; color: var(--ink);
  cursor: pointer; transition: border-color .16s, background .16s, transform .12s;
}
.opt:active { transform: scale(.99); }
.opt::before {
  content: attr(data-i);
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  width: 24px; height: 24px; border-radius: 50%;
  border: 1.5px solid var(--line-2); color: var(--ink-3);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600;
  transition: all .16s;
}
.opt.on { border-color: var(--brand); background: var(--brand-soft); }
.opt.on::before { border-color: var(--brand); background: var(--brand); color: #fff; }

.fade-in { animation: fade .26s ease both; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- 结果页 ---------- */
.type-hero {
  text-align: center; padding: 32px 20px 28px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow);
}
.type-code { font-size: 54px; font-weight: 700; letter-spacing: .12em; color: var(--brand-deep); line-height: 1.1; margin: 10px 0 6px; }
.type-name { font-size: 20px; font-weight: 600; }
.type-tag { font-size: 14px; color: var(--ink-2); margin-top: 4px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 16px; }
.chip {
  font-size: 12px; padding: 4px 12px; border-radius: 999px;
  background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line);
}

.dim-bar { margin-bottom: 16px; }
.dim-bar:last-child { margin-bottom: 0; }
.dim-head { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 7px; }
.dim-head .l { color: var(--ink-2); }
.dim-head .r { color: var(--ink-2); }
.dim-head .on { color: var(--ink); font-weight: 600; }
.dim-track { position: relative; height: 8px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.dim-fill { position: absolute; inset: 0 auto 0 0; background: var(--brand); border-radius: 999px; }
.dim-fill.dim-right { inset: 0 0 0 auto; }
.dim-label { font-size: 11px; color: var(--ink-3); margin-top: 5px; letter-spacing: .04em; }

/* ---------- 付费墙 ---------- */
.paywall {
  background: linear-gradient(180deg, #FFFFFF 0%, #FDFAF6 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  box-shadow: var(--shadow);
}
.paywall .badge {
  display: inline-block; font-size: 12px; font-weight: 600;
  color: var(--accent-deep); background: var(--accent-soft);
  border: 1px solid #EEDCCB; border-radius: 999px; padding: 3px 12px;
}
.price { display: flex; align-items: baseline; gap: 8px; margin: 14px 0 4px; }
.price b { font-size: 34px; font-weight: 700; color: var(--accent-deep); letter-spacing: -.02em; }
.price b i { font-size: 19px; font-style: normal; margin-right: 1px; }
.price s { font-size: 14px; color: var(--ink-3); }
.chapter-list { list-style: none; padding: 0; margin: 18px 0; }
.chapter-list li {
  display: flex; gap: 10px; align-items: flex-start;
  font-size: 14px; color: var(--ink-2); padding: 7px 0;
}
.chapter-list li::before {
  content: ''; flex: 0 0 6px; height: 6px; margin-top: 9px;
  border-radius: 50%; background: var(--brand);
}
.locked {
  position: relative; overflow: hidden;
}
.locked .peek {
  font-size: 15px; line-height: 1.9; color: var(--ink-2);
  max-height: 150px; overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, #000 30%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 30%, transparent 100%);
}

.pay-note { display: flex; gap: 8px; align-items: flex-start; font-size: 12px; color: var(--ink-3); margin-top: 12px; line-height: 1.6; }
.pay-note svg { flex: 0 0 14px; margin-top: 3px; }

/* ---------- 支付通道选择 ---------- */
.pay-chan { display: flex; gap: 10px; }
.chan {
  flex: 1; text-align: left; cursor: pointer;
  background: var(--surface); border: 1.5px solid var(--line);
  border-radius: var(--radius); padding: 11px 12px;
  font-family: var(--font); transition: border-color .16s, background .16s;
  display: flex; flex-direction: column; gap: 2px;
}
.chan:active { transform: scale(.99); }
.chan b { font-size: 14px; font-weight: 600; color: var(--ink); }
.chan span { font-size: 11px; color: var(--ink-3); line-height: 1.4; }
.chan.on { border-color: var(--accent); background: var(--accent-soft); }
.chan.on b { color: var(--accent-deep); }

/* 收银台跳转前的兜底提示（正常流程下用户看不到） */
.qr-url {
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
  font-size: 12px; line-height: 1.6; color: var(--ink-2);
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 12px;
  word-break: break-all; text-align: left;
}

/* ---------- 报告页 ---------- */
.report-head {
  background: var(--brand-deep); color: #fff;
  border-radius: var(--radius-lg); padding: 26px 22px; margin-bottom: 16px;
}
.report-head .code { font-size: 34px; font-weight: 700; letter-spacing: .1em; }
.report-head .nm { font-size: 14px; opacity: .8; margin-top: 2px; }
.report-head .meta { font-size: 12px; opacity: .62; margin-top: 12px; }
.report-head .code, .report-head .nm, .report-head .meta { color: #fff; }

.sec { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 12px; }
.sec-n { font-size: 12px; color: var(--brand); font-weight: 600; letter-spacing: .06em; margin-bottom: 6px; }
.sec h2 { font-size: 17px; margin-bottom: 10px; }
.sec p { font-size: 15px; line-height: 1.85; color: var(--ink-2); margin: 0; }
.sec p + p { margin-top: 12px; }

.actions { list-style: none; padding: 0; margin: 0; counter-reset: a; }
.actions li {
  display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px dashed var(--line);
  font-size: 15px; line-height: 1.7; color: var(--ink-2);
}
.actions li:last-child { border-bottom: 0; padding-bottom: 0; }
.actions li::before {
  counter-increment: a; content: counter(a);
  flex: 0 0 24px; height: 24px; margin-top: 3px;
  border-radius: 50%; background: var(--brand-soft); color: var(--brand);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
}

.dim-read { padding: 16px 0; border-bottom: 1px dashed var(--line); }
.dim-read:last-child { border-bottom: 0; padding-bottom: 0; }
.dim-read h3 { font-size: 15px; display: flex; justify-content: space-between; align-items: baseline; }
.dim-read h3 em { font-style: normal; font-size: 13px; color: var(--brand); font-weight: 600; }
.dim-read p { font-size: 14px; line-height: 1.8; margin: 6px 0 0; color: var(--ink-2); }

/* ---------- 合规页 ---------- */
.legal h2 { font-size: 17px; margin: 26px 0 8px; }
.legal p, .legal li { font-size: 14px; line-height: 1.85; color: var(--ink-2); }
.legal ul { padding-left: 20px; margin: 8px 0 14px; }
.legal li { margin-bottom: 6px; }
.legal .eff { font-size: 13px; color: var(--ink-3); }

/* ---------- 页脚 ---------- */
.foot { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; margin-bottom: 10px; }
.foot-links a { color: var(--ink-2); }

/* ---------- 轻提示 ---------- */
.toast {
  position: fixed; left: 50%; bottom: 34px; transform: translateX(-50%) translateY(12px);
  background: rgba(28, 30, 36, .93); color: #fff;
  font-size: 14px; padding: 11px 20px; border-radius: 999px;
  opacity: 0; pointer-events: none; transition: opacity .22s, transform .22s;
  z-index: 999; max-width: 88vw; text-align: center;
}
.toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }

.spin {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff;
  animation: sp .7s linear infinite;
}
@keyframes sp { to { transform: rotate(360deg); } }

@media (max-width: 380px) {
  h1 { font-size: 24px; }
  .type-code { font-size: 46px; }
  .wrap { padding: 0 16px 48px; }
  .qbar-in { padding: 0 16px; }
}
/* 桌面端：PC 也是有效收款场景（支付宝电脑网站支付），别让内容挤在窄栏里 */
@media (min-width: 900px) {
  :root { --w: 620px; }
  body { font-size: 16.5px; }
  h1 { font-size: 32px; }
  .hero { padding: 56px 0 10px; }
  .type-code { font-size: 64px; }
  .qtext { font-size: 23px; }
  .opt { font-size: 16.5px; padding: 20px 20px 20px 56px; }
  .wrap { padding: 0 24px 72px; }
  .qbar-in { padding: 0 24px; }
  .sec { padding: 24px; }
  .paywall { padding: 28px 26px; }
  .price b { font-size: 38px; }
}
@media print {
  .btn, .foot-links, .toast { display: none !important; }
  body { background: #fff; }
  .sec { break-inside: avoid; border-color: #ddd; }
}
