/* CRM 健康度检查器 2.0 — styles */
:root {
  --bg: #f4f6fb;
  --card: #ffffff;
  --ink: #1c2333;
  --muted: #5a6479;
  --line: #e4e8f2;
  --brand: #4f72ff;
  --brand-d: #3a57d6;
  --bad: #e2575b;
  --warn: #e9962f;
  --ok: #2faf6a;
  --great: #1f9d8c;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(28, 42, 92, 0.08);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }
h1, h2, h3, h4 { line-height: 1.3; }

/* topbar */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 17px; }
.brand .logo { font-size: 22px; color: var(--brand); }
.brand .ver { color: var(--brand); font-weight: 700; margin-left: 4px; font-size: 13px;
  background: #eaeefc; padding: 1px 7px; border-radius: 6px; }
.topnav { display: flex; gap: 22px; }
.topnav a { color: var(--muted); text-decoration: none; font-size: 14px; }
.topnav a:hover { color: var(--brand); }

/* hero */
.hero {
  display: grid; grid-template-columns: 1.3fr 0.9fr; gap: 40px;
  padding: 56px 20px 40px; align-items: center;
}
.eyebrow {
  color: var(--brand); font-weight: 600; font-size: 13px; letter-spacing: 0.4px;
  margin: 0 0 14px; text-transform: none;
}
.hero h1 { font-size: 38px; margin: 0 0 18px; letter-spacing: -0.5px; }
.lede { color: var(--muted); font-size: 16px; margin: 0 0 24px; }
.lede strong { color: var(--ink); }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
.hero-points { list-style: none; padding: 0; margin: 0; color: var(--muted); font-size: 14px; }
.hero-points li { padding: 3px 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid transparent; border-radius: 12px;
  padding: 11px 20px; font-size: 15px; font-weight: 600; cursor: pointer;
  text-decoration: none; transition: all 0.15s ease; font-family: inherit;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-d); }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn-lg { padding: 14px 30px; font-size: 16px; }

/* hero card */
.hero-card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 24px; border: 1px solid var(--line);
}
.mini-score { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.mini-ring {
  width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--brand) calc(var(--p, 64) * 1%), #e9edf8 0);
  position: relative; font-weight: 700; color: var(--brand); font-size: 20px;
}
.mini-ring::after {
  content: ""; position: absolute; inset: 9px; background: #fff; border-radius: 50%;
}
.mini-ring span { position: relative; z-index: 1; }
.mini-label { margin: 0; font-weight: 600; }
.mini-sub { margin: 0; color: var(--muted); font-size: 13px; }
.mini-bars { display: grid; gap: 9px; }
.mini-bar { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); }
.mini-bar i {
  height: 7px; border-radius: 4px; background: var(--brand); width: var(--w); flex-shrink: 0;
  min-width: 24px; max-width: 150px; opacity: 0.85;
}

/* card sections */
.card-section {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 30px; margin: 22px auto; max-width: 1000px;
}
.step-head h2 { display: flex; align-items: center; gap: 12px; margin: 0 0 8px; font-size: 23px; }
.step-head .num {
  width: 32px; height: 32px; border-radius: 9px; background: var(--brand); color: #fff;
  display: grid; place-items: center; font-size: 16px;
}
.step-head p { color: var(--muted); margin: 0 0 6px; font-size: 14.5px; }

/* questionnaire */
.dim-block { margin-top: 26px; }
.dim-block:first-child { margin-top: 18px; }
.dim-title { font-size: 17px; margin: 0 0 14px; color: var(--ink);
  padding-bottom: 8px; border-bottom: 2px solid #eef1f8; }
.qitem { border: none; margin: 0 0 16px; padding: 0; }
.qtext { font-weight: 600; margin: 0 0 10px; font-size: 15px; }
.opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.opt {
  display: flex; align-items: flex-start; gap: 9px; padding: 11px 13px;
  border: 1px solid var(--line); border-radius: 11px; cursor: pointer;
  font-size: 13.5px; color: var(--muted); transition: all 0.12s; background: #fcfdff;
}
.opt:hover { border-color: #b9c4ec; background: #f7f9ff; }
.opt input { position: absolute; opacity: 0; }
.opt .dot {
  width: 16px; height: 16px; border-radius: 50%; border: 2px solid #c4cce0;
  flex-shrink: 0; margin-top: 2px; transition: all 0.12s; position: relative;
}
.opt input:checked + .dot { border-color: var(--brand); background: var(--brand); }
.opt input:checked + .dot::after {
  content: ""; position: absolute; inset: 3px; background: #fff; border-radius: 50%;
}
.opt input:checked ~ .opt-text { color: var(--ink); font-weight: 600; }
.opt:has(input:checked) { border-color: var(--brand); background: #f1f4ff; }

/* funnel inputs */
.funnel-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 20px; }
.fld { display: flex; flex-direction: column; gap: 6px; }
.fld span { font-weight: 600; font-size: 14px; }
.fld input {
  padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; font-size: 15px;
  font-family: inherit; color: var(--ink); background: #fcfdff;
}
.fld input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px #e6ecff; }
.fld small { color: var(--muted); font-size: 12px; }

/* action row */
.action-row { display: flex; align-items: center; gap: 14px; margin: 8px auto 30px;
  max-width: 1000px; flex-wrap: wrap; }
.progress-hint { color: var(--muted); font-size: 14px; }
.progress-hint.done { color: var(--ok); font-weight: 600; }

/* result */
.result {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 32px; margin: 0 auto 30px; max-width: 1000px;
}
.result.hidden, .hidden { display: none; }
.result-top { display: flex; gap: 36px; align-items: center; flex-wrap: wrap;
  justify-content: space-between; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.score-block { display: flex; align-items: center; gap: 22px; }
.big-ring {
  width: 132px; height: 132px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--brand) calc(var(--p, 0) * 1%), #e9edf8 0);
  position: relative;
}
.big-ring::after { content: ""; position: absolute; inset: 13px; background: #fff; border-radius: 50%; }
.big-ring span { position: relative; z-index: 1; font-size: 40px; font-weight: 800; color: var(--brand); }
.big-ring small { position: relative; z-index: 1; color: var(--muted); font-size: 14px; margin-left: 2px; }
.level-tag {
  display: inline-block; background: var(--brand); color: #fff; font-weight: 700;
  padding: 2px 12px; border-radius: 8px; margin: 0 0 6px; font-size: 14px;
}
.level-name { font-size: 22px; font-weight: 700; margin: 0 0 6px; }
.level-desc { color: var(--muted); margin: 0; max-width: 340px; font-size: 14px; }
#radar { max-width: 100%; }

/* dim bars */
.dim-bars { margin-top: 26px; }
.dim-bars h3 { font-size: 17px; margin: 0 0 14px; }
.dbar { display: grid; grid-template-columns: 130px 1fr 38px 78px; align-items: center;
  gap: 12px; margin-bottom: 10px; font-size: 14px; }
.dbar-name { color: var(--ink); font-weight: 500; }
.dbar-track { height: 10px; background: #eef1f8; border-radius: 6px; overflow: hidden; }
.dbar-track i { display: block; height: 100%; border-radius: 6px; background: var(--brand); transition: width 0.6s ease; }
.dbar-val { font-weight: 700; text-align: right; }
.dbar-tag { font-size: 12px; text-align: right; color: var(--muted); }
.dbar.band0 .dbar-track i { background: var(--bad); }
.dbar.band0 .dbar-tag { color: var(--bad); font-weight: 600; }
.dbar.band1 .dbar-track i { background: var(--warn); }
.dbar.band2 .dbar-track i { background: var(--ok); }

/* funnel result */
.funnel-result { margin-top: 30px; padding-top: 24px; border-top: 1px solid var(--line); }
.funnel-result h3 { font-size: 18px; margin: 0 0 16px; }
.funnel-viz { display: flex; flex-direction: column; gap: 14px; margin-bottom: 18px; }
.fstage { display: flex; flex-direction: column; gap: 5px; }
.fr-rate { font-size: 13px; color: var(--muted); margin-left: 4px; }
.fr-rate .bm { color: #9aa3ba; }
.fr-rate.bad b { color: var(--bad); } .fr-rate.warn b { color: var(--warn); }
.fr-rate.ok b { color: var(--ok); } .fr-rate.great b { color: var(--great); }
.fbar {
  background: linear-gradient(90deg, var(--brand), #6f8cff); color: #fff;
  border-radius: 9px; padding: 12px 16px; display: flex; justify-content: space-between;
  align-items: center; min-width: 90px; transition: width 0.6s ease;
}
.fbar span { font-weight: 600; } .fbar b { font-size: 18px; }
.leak-callout {
  background: #f6f8ff; border: 1px solid #dde4fb; border-radius: 12px; padding: 16px 18px;
}
.leak-line { margin: 0 0 8px; font-size: 14.5px; }
.leak-line .bad { color: var(--bad); font-weight: 600; }
.leak-line .warn { color: var(--warn); font-weight: 600; }
.leak-line .ok { color: var(--ok); font-weight: 600; }
.leak-line .great { color: var(--great); font-weight: 600; }
.leak-gain { margin: 8px 0 0; font-size: 15px; color: var(--ink); }
.leak-gain b { color: var(--brand-d); }
.leak-note { margin: 10px 0 0; font-size: 13px; color: var(--muted); }

/* roadmap */
.roadmap { margin-top: 30px; padding-top: 24px; border-top: 1px solid var(--line); }
.roadmap h3 { font-size: 18px; margin: 0 0 16px; }
.roadmap-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.rm-col { background: #fafbff; border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.rm-col h4 { margin: 0 0 12px; font-size: 15px; color: var(--brand-d); }
.rm-col ul { margin: 0; padding: 0; list-style: none; }
.rm-col li { font-size: 13.5px; color: var(--muted); padding: 9px 0; border-top: 1px dashed var(--line); }
.rm-col li:first-child { border-top: none; }
.rm-name { display: block; color: var(--ink); font-weight: 600; margin-bottom: 2px; }
.rm-name em { font-style: normal; color: var(--brand); font-size: 12px; }

/* result actions */
.result-actions { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
.history { margin-top: 22px; }
.history h4 { font-size: 14px; margin: 0 0 10px; color: var(--muted); }
.hrow { display: flex; gap: 16px; align-items: center; font-size: 13px; color: var(--muted);
  padding: 6px 0; border-bottom: 1px dashed var(--line); }
.hrow b { color: var(--brand); }
.consult-hook {
  margin-top: 26px; padding: 18px 20px; background: linear-gradient(120deg, #f1f4ff, #eef9f4);
  border-radius: 12px; font-size: 14.5px; color: var(--ink); border: 1px solid #e0e8fb;
}

/* how / privacy */
.how, .privacy { padding: 40px 20px; max-width: 1000px; }
.how h2, .privacy h2 { font-size: 24px; margin: 0 0 22px; }
.how-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.how-item { display: flex; gap: 14px; align-items: flex-start; background: var(--card);
  border: 1px solid var(--line); border-radius: 12px; padding: 18px; }
.how-n { width: 30px; height: 30px; border-radius: 8px; background: #eaeefc; color: var(--brand);
  font-weight: 700; display: grid; place-items: center; flex-shrink: 0; }
.how-item p { margin: 0; font-size: 14px; color: var(--muted); }
.how-item strong { color: var(--ink); }
.privacy p { color: var(--muted); max-width: 760px; }
.privacy strong { color: var(--ink); }

/* footer */
.footer { border-top: 1px solid var(--line); padding: 28px 0; margin-top: 20px; background: #fff; }
.footer p { margin: 0; color: var(--muted); font-size: 13px; }
.footer .sub { margin-top: 6px; font-size: 12px; color: #9aa3ba; }

/* responsive */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding-top: 36px; }
  .hero h1 { font-size: 29px; }
  .hero-card { order: -1; }
  .opts { grid-template-columns: 1fr; }
  .funnel-grid { grid-template-columns: 1fr; }
  .how-grid { grid-template-columns: 1fr; }
  .roadmap-cols { grid-template-columns: 1fr; }
  .result-top { flex-direction: column; align-items: flex-start; }
  .dbar { grid-template-columns: 96px 1fr 32px; }
  .dbar-tag { display: none; }
  .card-section, .result { padding: 22px; }
}

/* print */
@media print {
  .topbar, .hero, #assess, #funnel, .action-row, .how, .privacy, .footer,
  .result-actions, .history, .consult-hook { display: none !important; }
  .result { box-shadow: none; border: none; }
  body { background: #fff; }
}
