:root {
  --blue: #2f54eb;
  --blue-d: #1d39c4;
  --blue-l: #e8eeff;
  --red: #e5322d;
  --red-l: #ffecea;
  --ink: #0f172a;
  --ink2: #475569;
  --muted: #94a3b8;
  --line: #e2e8f0;
  --bg: #eef3ff;
  --card: #ffffff;
  color-scheme: light;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
#app { max-width: 520px; margin: 0 auto; min-height: 100vh; position: relative; overflow: hidden; }
.bgdeco { position: absolute; right: -90px; top: -90px; width: 260px; height: 260px; border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, #dfe7ff 0%, #c9d6ff 60%, transparent 61%); z-index: 0; }
.page { position: relative; z-index: 1; padding: 20px 16px 40px; }

/* 品牌、标题 */
.brand { display: inline-block; background: var(--ink); color: #fff; font-size: 12px; font-weight: 700;
  padding: 5px 12px; border-radius: 999px; letter-spacing: 1px; }
.hero { margin: 22px 0 6px; line-height: 1.08; }
.hero .l1 { font-size: 44px; font-weight: 900; letter-spacing: 2px; }
.hero .l2 { font-size: 44px; font-weight: 900; letter-spacing: 2px; color: var(--red); }
.bar { display: inline-block; margin-top: 12px; background: var(--blue); color: #fff; font-weight: 800;
  font-size: 18px; padding: 7px 16px; border-radius: 8px; transform: skew(-6deg); }
.bar span { display: inline-block; transform: skew(6deg); }
.sub { color: var(--blue); font-weight: 700; font-size: 14px; margin: 14px 0 0; letter-spacing: 1px; }

/* 卡片 */
.card { background: var(--card); border-radius: 18px; padding: 18px 16px; margin-top: 16px;
  box-shadow: 0 6px 20px rgba(47, 84, 235, .08); border: 1px solid #e6ecff; }
.card h3 { margin: 0 0 12px; font-size: 17px; font-weight: 800; }
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 13px; color: var(--ink2); margin-bottom: 6px; font-weight: 600; }
.field input { width: 100%; font-size: 16px; padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--line);
  outline: none; background: #f8faff; color: var(--ink); font-family: inherit; }
.field input:focus { border-color: var(--blue); background: #fff; }
.hint { font-size: 12px; color: var(--muted); margin-top: 4px; }

.quiz-card { display: flex; gap: 14px; align-items: flex-start; }
.badge { flex: none; width: 58px; border-radius: 12px; color: #fff; text-align: center; padding: 8px 0 7px; }
.badge b { display: block; font-size: 13px; font-weight: 900; letter-spacing: 1px; }
.badge i { display: block; font-style: normal; font-size: 22px; font-weight: 900; line-height: 1.1; }
.badge.blue { background: var(--blue); }
.badge.red { background: var(--red); }
.quiz-card .txt { flex: 1; min-width: 0; }
.quiz-card .t { font-size: 18px; font-weight: 800; }
.quiz-card .d { font-size: 13px; color: var(--ink2); margin-top: 4px; line-height: 1.5; }
.tag { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 6px; margin-top: 8px; }
.tag.blue { background: var(--blue-l); color: var(--blue-d); }
.tag.red { background: var(--red-l); color: var(--red); }
.tag.done { background: #e7f8ee; color: #137a3f; }

.btn { display: block; width: 100%; border: 0; border-radius: 14px; font-size: 17px; font-weight: 800; padding: 15px 0;
  font-family: inherit; cursor: pointer; margin-top: 14px; }
.btn.primary { background: var(--blue); color: #fff; box-shadow: 0 6px 16px rgba(47, 84, 235, .3); }
.btn.red { background: var(--red); color: #fff; box-shadow: 0 6px 16px rgba(229, 50, 45, .25); }
.btn.ghost { background: #fff; color: var(--blue); border: 1.5px solid var(--blue); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .45; }
.row2 { display: flex; gap: 10px; }
.row2 .btn { flex: 1; }
.foot { text-align: center; color: var(--muted); font-size: 12px; margin-top: 28px; }

/* 答题 */
.qtop { display: flex; align-items: center; gap: 10px; }
.qtop .back { width: 36px; height: 36px; border-radius: 50%; border: 0; background: #fff; font-size: 18px; color: var(--ink);
  box-shadow: 0 2px 8px rgba(15, 23, 42, .08); cursor: pointer; }
.qtop .qt { flex: 1; font-weight: 800; font-size: 15px; }
.qtop .qn { font-weight: 800; color: var(--blue); font-size: 15px; font-variant-numeric: tabular-nums; }
.prog { height: 6px; background: #dbe4ff; border-radius: 3px; margin: 14px 0 22px; overflow: hidden; }
.prog i { display: block; height: 100%; background: var(--blue); border-radius: 3px; transition: width .3s; }
.sec { display: inline-block; background: var(--blue-l); color: var(--blue-d); font-weight: 800; font-size: 13px;
  padding: 4px 10px; border-radius: 6px; }
.sec.risk { background: var(--red-l); color: var(--red); }
.qtext { font-size: 21px; font-weight: 800; line-height: 1.45; margin: 12px 0 18px; }
.opt { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: #fff; border: 1.5px solid #e3e9fb;
  border-radius: 14px; padding: 15px 14px; margin-bottom: 10px; font-size: 16px; font-family: inherit; color: var(--ink);
  line-height: 1.45; cursor: pointer; transition: border-color .15s, background .15s; }
.opt .k { flex: none; width: 26px; height: 26px; border-radius: 50%; background: #eef2ff; color: var(--blue-d); font-weight: 800;
  font-size: 13px; display: flex; align-items: center; justify-content: center; }
.opt.on { border-color: var(--blue); background: #f2f5ff; }
.opt.on .k { background: var(--blue); color: #fff; }
.qnav { display: flex; justify-content: space-between; margin-top: 10px; }
.link { background: none; border: 0; color: var(--ink2); font-size: 14px; font-family: inherit; padding: 8px 4px; cursor: pointer; }
.link.blue { color: var(--blue); font-weight: 700; }

/* 报告 */
.rhead { text-align: center; padding: 22px 16px 18px; }
.rhead .lbl { font-size: 13px; color: var(--ink2); font-weight: 600; }
.rhead .org { font-size: 15px; font-weight: 800; margin-top: 2px; }
.tname { font-size: 38px; font-weight: 900; color: var(--blue); margin-top: 14px; letter-spacing: 2px; }
.tname.red { color: var(--red); }
.slogan { display: inline-block; margin-top: 8px; background: var(--red); color: #fff; font-weight: 800; font-size: 15px;
  padding: 5px 14px; border-radius: 8px; }
.score { display: flex; justify-content: center; align-items: baseline; gap: 4px; margin-top: 16px; }
.score b { font-size: 44px; font-weight: 900; font-variant-numeric: tabular-nums; }
.score span { font-size: 14px; color: var(--ink2); font-weight: 600; }
.desc { font-size: 15px; line-height: 1.75; color: #1e293b; margin: 0; }
.radar { display: block; margin: 0 auto; width: 100%; max-width: 340px; height: auto; }
.dims { margin-top: 6px; }
.dimrow { display: flex; align-items: center; gap: 10px; margin: 9px 0; font-size: 14px; }
.dimrow .n { width: 74px; flex: none; font-weight: 700; }
.dimrow .b { flex: 1; height: 10px; background: #edf1fb; border-radius: 5px; overflow: hidden; }
.dimrow .b i { display: block; height: 100%; background: var(--blue); border-radius: 5px; }
.dimrow.weak .b i { background: var(--red); }
.dimrow .v { width: 40px; text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; }
.dimrow.weak .n { color: var(--red); }
.todo { margin: 0; padding: 0; list-style: none; counter-reset: t; }
.todo li { position: relative; padding: 0 0 0 34px; margin: 0 0 12px; font-size: 15px; line-height: 1.6; counter-increment: t; }
.todo li::before { content: counter(t); position: absolute; left: 0; top: 0; width: 24px; height: 24px; border-radius: 50%;
  background: var(--blue); color: #fff; font-weight: 800; font-size: 13px; display: flex; align-items: center; justify-content: center; }
.issue { padding: 12px 0; border-top: 1px solid #eef2fb; }
.issue:first-of-type { border-top: 0; padding-top: 0; }
.issue .p { font-size: 15px; font-weight: 700; line-height: 1.6; }
.issue .p em { font-style: normal; display: inline-block; font-size: 12px; background: var(--red-l); color: var(--red); border-radius: 5px;
  padding: 1px 6px; margin-right: 6px; vertical-align: 1px; }
.issue .f { font-size: 14px; color: var(--ink2); line-height: 1.6; margin-top: 4px; }
.issue .f::before { content: "改法："; color: var(--blue); font-weight: 800; }
.sess { display: flex; gap: 10px; align-items: center; padding: 10px 12px; background: #f4f7ff; border-radius: 12px; margin-top: 8px; }
.sess .dy { flex: none; background: var(--blue); color: #fff; font-size: 12px; font-weight: 900; padding: 4px 8px; border-radius: 6px; }
.sess .dy.pm { background: var(--red); }
.sess .st { font-size: 14px; font-weight: 700; line-height: 1.45; }
.sess .st small { display: block; font-size: 12px; font-weight: 600; color: var(--red); margin-top: 2px; }
.weakdim { font-weight: 900; font-size: 16px; margin-top: 14px; }
.weakdim:first-child { margin-top: 0; }
.weakdim small { color: var(--red); font-size: 13px; margin-left: 6px; }
.tagbox { background: #fff7e6; border: 1px solid #ffe2a8; border-radius: 14px; padding: 12px 14px; margin-top: 10px; }
.tagbox b { color: #b45309; font-size: 15px; }
.tagbox p { margin: 4px 0 0; font-size: 14px; line-height: 1.6; color: #78350f; }
.riskbox { background: var(--red-l); border: 1px solid #ffc9c5; border-radius: 14px; padding: 12px 14px; margin-top: 10px; }
.riskbox b { color: var(--red); }
.riskbox p { margin: 4px 0 0; font-size: 14px; line-height: 1.6; color: #7f1d1d; }
.formula { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.formula div { background: #f4f7ff; border-radius: 12px; padding: 10px 11px; }
.formula b { display: block; color: var(--blue-d); font-size: 14px; }
.formula span { display: block; font-size: 12.5px; color: var(--ink2); line-height: 1.5; margin-top: 3px; }
.sync { text-align: center; font-size: 12px; margin-top: 10px; color: var(--muted); }
.sync.ok { color: #137a3f; }
.sync.err { color: var(--red); }
.shot { text-align: center; font-size: 13px; color: var(--blue-d); font-weight: 700; margin-top: 18px; }
.spin { width: 42px; height: 42px; border: 4px solid #dbe4ff; border-top-color: var(--blue); border-radius: 50%;
  margin: 120px auto 16px; animation: sp 0.9s linear infinite; }
@keyframes sp { to { transform: rotate(360deg); } }
.center { text-align: center; color: var(--ink2); }
.toast { position: fixed; left: 0; right: 0; bottom: 40px; margin: 0 auto; width: max-content; max-width: 86%;
  background: rgba(15, 23, 42, .88); color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 14px; z-index: 9; }
