/* ============================================================
   main.css — scl-report 全站样式
   视觉基调：专业医疗蓝白。藏蓝主色 #1e5a8a，强调 #2f7fbf，
   底色浅灰白 #f5f8fb，卡片纯白，圆角 14px，无花哨装饰。
   ============================================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --blue: #1e5a8a;
  --blue-l: #2f7fbf;
  --ink: #24313d;
  --muted: #66788a;
  --line: #dfe8f0;
  --bg: #f5f8fb;
  --card: #ffffff;
  --ok: #2e8b57;
  --warn: #d97b29;
  --alert: #c2452d;
  --radius: 14px;
}
body {
  background: var(--bg); color: var(--ink);
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6; -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 720px; margin: 0 auto; padding: 0 18px 60px; }

/* ---------- 顶部 ---------- */
.topbar {
  background: linear-gradient(135deg, #1e5a8a, #2f7fbf);
  color: #fff; padding: 26px 18px 30px; text-align: center;
}
.topbar .org { font-size: 13px; letter-spacing: .35em; text-indent: .35em; opacity: .85; margin-bottom: 8px; }
.topbar h1 { font-size: 30px; font-weight: 800; letter-spacing: .04em; }
.topbar .en { font-size: 13px; opacity: .75; margin-top: 4px; letter-spacing: .08em; }

/* ---------- 通用卡片 ---------- */
.card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: 0 4px 18px rgba(30, 90, 138, .08);
  padding: 22px 22px; margin-top: 16px;
}
.card h2 { font-size: 18px; color: var(--blue); margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.card h2::before { content: ""; width: 4px; height: 18px; border-radius: 2px; background: var(--blue-l); }
.card p { font-size: 15px; color: var(--ink); margin-bottom: 8px; }
.muted { color: var(--muted); font-size: 13px; }

/* ---------- 三背书 ---------- */
.badges { display: flex; gap: 10px; margin-top: -22px; padding: 0 4px; }
.badges .b {
  flex: 1; background: var(--card); border-radius: 12px; text-align: center;
  padding: 12px 6px; box-shadow: 0 4px 14px rgba(30,90,138,.10);
}
.badges .b strong { display: block; font-size: 15px; color: var(--blue); }
.badges .b span { font-size: 11px; color: var(--muted); }

/* ---------- 数据条 ---------- */
.stats { display: flex; gap: 10px; margin-top: 14px; }
.stats .s { flex: 1; text-align: center; background: #eef4fa; border-radius: 12px; padding: 12px 4px; }
.stats .s strong { display: block; font-size: 22px; color: var(--blue); font-weight: 800; }
.stats .s span { font-size: 12px; color: var(--muted); }

/* ---------- 因子标签 ---------- */
.factors { display: flex; flex-wrap: wrap; gap: 8px; }
.factors span {
  background: #eef4fa; color: var(--blue); border-radius: 100px;
  padding: 5px 14px; font-size: 13px; font-weight: 600;
}

/* ---------- 列表 ---------- */
ul.dots { list-style: none; }
ul.dots li { padding-left: 20px; position: relative; font-size: 15px; margin-bottom: 8px; }
ul.dots li::before { content: ""; position: absolute; left: 2px; top: 10px; width: 7px; height: 7px; border-radius: 50%; background: var(--blue-l); }
ol.notes { counter-reset: n; list-style: none; }
ol.notes li { counter-increment: n; padding-left: 34px; position: relative; font-size: 14px; color: var(--muted); margin-bottom: 10px; }
ol.notes li::before {
  content: counter(n); position: absolute; left: 0; top: 2px;
  width: 22px; height: 22px; border-radius: 50%; background: #eef4fa;
  color: var(--blue); font-size: 12px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
ol.notes li strong { color: var(--ink); }

/* ---------- 授权码输入 ---------- */
.codebox { text-align: center; }
.codebox input {
  width: 100%; max-width: 360px; text-align: center; letter-spacing: .5em; text-indent: .5em;
  font-size: 26px; font-weight: 700; text-transform: uppercase;
  border: 2px solid var(--line); border-radius: 12px; padding: 14px 10px; outline: none;
  transition: border .2s; color: var(--ink);
}
.codebox input:focus { border-color: var(--blue-l); }
.btn {
  display: inline-block; border: 0; cursor: pointer; text-decoration: none;
  background: linear-gradient(135deg, #1e5a8a, #2f7fbf); color: #fff;
  font-size: 17px; font-weight: 700; border-radius: 100px;
  padding: 14px 46px; letter-spacing: .1em;
  box-shadow: 0 8px 20px rgba(30,90,138,.3);
  transition: transform .15s, box-shadow .15s;
}
.btn:active { transform: scale(.97); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn.ghost { background: #fff; color: var(--blue); box-shadow: inset 0 0 0 2px var(--line); }
.codebox .msg { min-height: 22px; font-size: 14px; margin-top: 10px; }
.codebox .msg.err { color: var(--alert); }
.codebox .msg.ok { color: var(--ok); }

/* ---------- 答题页 ---------- */
.qtop {
  position: sticky; top: 0; z-index: 5; background: rgba(255,255,255,.94);
  backdrop-filter: blur(6px); border-bottom: 1px solid var(--line);
  padding: 10px 18px;
}
.qtop .bar { height: 6px; background: #e4edf5; border-radius: 3px; overflow: hidden; }
.qtop .bar i { display: block; height: 100%; background: linear-gradient(90deg, #2f7fbf, #1e5a8a); border-radius: 3px; transition: width .3s; }
.qtop .meta { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-bottom: 6px; }

.qcard { margin-top: 16px; }
.qitem { background: var(--card); border-radius: var(--radius); box-shadow: 0 3px 12px rgba(30,90,138,.07); padding: 18px; margin-bottom: 12px; }
.qitem .no { font-size: 12px; color: var(--blue-l); font-weight: 800; letter-spacing: .08em; margin-bottom: 4px; }
.qitem .txt { font-size: 16.5px; font-weight: 600; margin-bottom: 12px; }
.opts { display: flex; gap: 6px; }
.opts button {
  flex: 1; border: 2px solid var(--line); background: #fff; border-radius: 10px;
  padding: 9px 2px; font-size: 13.5px; font-weight: 700; color: var(--muted);
  cursor: pointer; transition: all .12s; font-family: inherit;
}
.opts button:hover { border-color: var(--blue-l); color: var(--blue); }
.opts button.on { background: linear-gradient(135deg, #2f7fbf, #1e5a8a); border-color: transparent; color: #fff; }

.qnav { display: flex; gap: 10px; margin-top: 18px; }
.qnav .btn { flex: 1; text-align: center; padding: 14px 10px; }

/* ---------- 报告页 ---------- */
.rp-head { text-align: center; padding: 30px 16px 10px; }
.rp-head .t { font-size: 24px; font-weight: 800; color: var(--blue); }
.rp-head .m { font-size: 12.5px; color: var(--muted); margin-top: 6px; }

.kpis { display: flex; gap: 10px; margin-top: 14px; }
.kpis .k { flex: 1; background: var(--card); border-radius: 12px; text-align: center; padding: 14px 4px; box-shadow: 0 4px 14px rgba(30,90,138,.08); }
.kpis .k strong { display: block; font-size: 26px; color: var(--blue); font-weight: 800; }
.kpis .k span { font-size: 11px; color: var(--muted); white-space: nowrap; }

.screen {
  border-radius: 12px; padding: 14px 18px; margin-top: 16px; font-size: 15px; line-height: 1.7;
}
.screen.ok { background: #ecf7f0; color: #226b43; border: 1px solid #cde8d8; }
.screen.warn { background: #fdf3e7; color: #8a5416; border: 1px solid #f2dcb8; }

.frow { margin-bottom: 14px; }
.frow .fh { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 5px; }
.frow .fh b { font-size: 15px; }
.frow .fh span { font-size: 12px; color: var(--muted); }
.fbar { height: 12px; background: #e9f0f7; border-radius: 6px; overflow: hidden; position: relative; }
.fbar i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, #7fb2d9, #2f7fbf); }
.fbar i.warm { background: linear-gradient(90deg, #f0b26a, #d97b29); }
.fbar i.hot { background: linear-gradient(90deg, #e08a76, #c2452d); }
.fbar .norm { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--blue); opacity: .55; }
.fdesc { font-size: 13.5px; color: var(--muted); margin-top: 6px; line-height: 1.7; }

.suggest li { margin-bottom: 10px; }

.hello-note {
  margin-top: 14px; font-size: 12.5px; color: var(--muted); text-align: center; line-height: 1.8;
}
footer.ft { text-align: center; padding: 26px 0 10px; font-size: 12px; color: var(--muted); }

@media print {
  .topbar, .qtop, .btn, .qnav { display: none !important; }
  body { background: #fff; }
  .card { box-shadow: none; border: 1px solid #eee; }
}
