:root {
  --primary: #5b8cff;
  --primary-dark: #3f6fe0;
  --bg: #f4f7fb;
  --card: #ffffff;
  --text: #2c3340;
  --muted: #8a93a3;
  --danger: #e23b3b;
  --border: #e6eaf0;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
}

.page { max-width: 640px; margin: 0 auto; padding: 16px 16px 60px; }

.hero { text-align: center; padding: 24px 0 8px; }
.hero.small { padding: 16px 0 4px; }
.title { font-size: 22px; margin: 0 0 6px; font-weight: 700; color: var(--text); }
.subtitle { color: var(--muted); font-size: 14px; margin: 0; }

.card {
  background: var(--card);
  border-radius: 14px;
  padding: 18px;
  margin: 14px 0;
  box-shadow: 0 2px 10px rgba(40, 60, 90, 0.05);
}
.card-title { font-size: 17px; margin: 0 0 12px; font-weight: 600; }

.desc-list { list-style: none; margin: 0; padding: 0; }
.desc-list li { padding: 6px 0; border-bottom: 1px dashed var(--border); }
.desc-list li:last-child { border-bottom: none; }
.desc-label { display: inline-block; width: 72px; color: var(--muted); font-size: 14px; }

/* 免责声明 */
.disclaimer { border: 1px solid #f3c2c2; background: #fff6f6; }
.disclaimer-title { color: var(--danger); font-size: 16px; margin: 0 0 8px; font-weight: 700; }
.disclaimer-text { margin: 0; color: #b23b3b; font-size: 14.5px; }
.disclaimer-text strong { color: var(--danger); }

/* 折叠面板 */
.collapse { background: none; }
.collapse-summary { cursor: pointer; font-weight: 600; color: var(--text); padding: 4px 0; }
.collapse-body { padding-top: 12px; }
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 14px; color: var(--muted); margin-bottom: 4px; }
.field input, .field select {
  width: 100%; padding: 10px; border: 1px solid var(--border);
  border-radius: 10px; font-size: 15px; background: #fbfcfe;
}

/* 知情同意 */
.consent { display: flex; flex-direction: column; gap: 14px; }
.consent-label { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; cursor: pointer; }
.consent-label input { margin-top: 4px; width: 18px; height: 18px; flex: 0 0 auto; }

/* 按钮 */
.btn {
  display: block; width: 100%; padding: 13px; border: none; border-radius: 12px;
  font-size: 16px; font-weight: 600; cursor: pointer; transition: background .15s;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:active { background: var(--primary-dark); }
.btn-primary:disabled { background: #c5d2ee; cursor: not-allowed; }
.btn-ghost { background: #eef2fb; color: var(--primary); }
.nav-bar { display: flex; gap: 12px; margin-top: 18px; }
.nav-bar .btn { margin: 0; }
.foot { text-align: center; color: var(--muted); font-size: 12.5px; margin-top: 24px; }

/* 进度条 */
.progress-wrap { margin: 12px 0; }
.progress-bar { height: 10px; background: #e6ebf5; border-radius: 6px; overflow: hidden; }
.progress-fill { height: 100%; width: 0; background: var(--primary); border-radius: 6px; transition: width .25s; }
.progress-text { font-size: 13px; color: var(--muted); margin-top: 6px; text-align: right; }

/* 吸顶作答规则 */
.rules.sticky {
  position: sticky; top: 0; background: #fffbe9; border: 1px solid #ffe7a3;
  border-radius: 10px; padding: 10px 12px; font-size: 13.5px; color: #8a6d1f; z-index: 5; margin: 10px 0;
}
.rules.sticky em { color: #b8860b; font-style: normal; }

/* 题目 */
.question { border: 1px solid var(--border); border-radius: 12px; padding: 14px; margin: 12px 0; background: var(--card); }
.q-head { display: flex; gap: 10px; align-items: baseline; margin-bottom: 10px; }
.q-no {
  background: var(--primary); color: #fff; width: 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 14px; flex: 0 0 auto;
}
.q-title { font-size: 16px; font-weight: 600; }
.q-options { display: flex; flex-direction: column; gap: 8px; }
.opt {
  display: flex; align-items: center; gap: 8px; padding: 9px 12px;
  border: 1px solid var(--border); border-radius: 10px; cursor: pointer; font-size: 15px; background: #fbfcfe;
}
.opt input { width: 18px; height: 18px; }
.opt.checked { border-color: var(--primary); background: #eef3ff; }

/* 指标卡 */
.metrics { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 14px 0; }
.metric { background: var(--card); border-radius: 14px; padding: 16px; text-align: center; box-shadow: 0 2px 10px rgba(40, 60, 90, 0.05); }
.metric-value { font-size: 26px; font-weight: 700; color: var(--primary); }
.metric-label { font-size: 13px; color: var(--muted); margin-top: 4px; }

/* 雷达图 */
.radar { width: 100%; height: 340px; }

/* 因子表 */
.factor-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.factor-table th, .factor-table td { padding: 10px 8px; text-align: left; border-bottom: 1px solid var(--border); }
.factor-table th { color: var(--muted); font-weight: 600; background: #fafbfe; }

/* 附加项 */
.other-item { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px dashed var(--border); font-size: 15px; }
.other-item:last-child { border-bottom: none; }
.other-score { color: var(--primary); font-weight: 600; }

/* 综合评估 */
.overall { margin: 0; font-size: 15px; line-height: 1.8; }

/* 自助建议 */
.tips { margin: 0; padding-left: 20px; }
.tips li { margin: 6px 0; }

/* 求助提示 */
.help { border: 1px solid #cfe3ff; background: #f4f9ff; }
.help-text { margin: 0; font-size: 14.5px; line-height: 1.8; }

/* 打印 */
@media print {
  body { background: #fff; }
  .no-print { display: none; }
  .card { box-shadow: none; border: 1px solid #ddd; }
  .rules.sticky { position: static; }
}

@media (min-width: 481px) {
  .metrics { grid-template-columns: repeat(4, 1fr); }
}
