:root {
  --bg: #0d1424;
  --bg-soft: #131c30;
  --card: #ffffff;
  --ink: #1a2238;
  --ink-soft: #5a647e;
  --line: #e6e9f2;
  --brand: #2f6bff;
  --brand-dark: #1d4fd6;
  --good: #1aa97a;
  --warn: #e8a33d;
  --bad: #e2574c;
  --shadow: 0 10px 40px rgba(16, 28, 64, 0.12);
  --radius: 16px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: #f4f6fb;
  line-height: 1.6;
}

.wrap { width: min(900px, 92vw); margin: 0 auto; }

/* hero */
.hero {
  background: radial-gradient(1200px 500px at 20% -10%, #20407f 0%, transparent 60%),
    linear-gradient(160deg, #0d1424 0%, #16243f 100%);
  color: #fff;
  padding: 56px 0 64px;
}
.badge {
  display: inline-block;
  font-size: 13px;
  letter-spacing: .04em;
  padding: 5px 12px;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 999px;
  color: #c9d6f5;
  margin-bottom: 18px;
}
.hero h1 { font-size: clamp(28px, 5vw, 44px); margin: 0 0 14px; line-height: 1.2; }
.lead { font-size: clamp(15px, 2.4vw, 18px); color: #cdd6ee; max-width: 640px; margin: 0 0 20px; }
.lead strong { color: #fff; }
.hero-points { list-style: none; padding: 0; margin: 0 0 26px; display: grid; gap: 6px; color: #d7def2; font-size: 15px; }
.cta {
  display: inline-block;
  background: var(--brand);
  color: #fff;
  border: none;
  padding: 13px 26px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform .08s ease, background .15s ease;
}
.cta:hover { background: var(--brand-dark); }
.cta:active { transform: translateY(1px); }
.cta:disabled { background: #b7c2dd; cursor: not-allowed; }

/* cards */
.card, .report {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
  margin: -32px auto 28px;
}
.report { margin-top: 0; }

.quiz-head { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.quiz-head h2 { margin: 0; font-size: 22px; }
.progress { display: flex; align-items: center; gap: 10px; }
.progress-bar { width: 160px; height: 8px; background: var(--line); border-radius: 999px; overflow: hidden; }
.progress-bar span { display: block; height: 100%; width: 0; background: var(--brand); transition: width .25s ease; }
.progress-text { font-size: 13px; color: var(--ink-soft); white-space: nowrap; }

.dim-block { border-top: 1px solid var(--line); padding-top: 20px; margin-top: 20px; }
.dim-block:first-of-type { border-top: none; padding-top: 6px; margin-top: 6px; }
.dim-title { display: flex; align-items: baseline; gap: 10px; margin: 0 0 4px; }
.dim-title h3 { margin: 0; font-size: 17px; }
.dim-stage { font-size: 12px; color: var(--ink-soft); background: #eef2fb; padding: 2px 9px; border-radius: 999px; }

.q { margin: 16px 0; }
.q-text { font-weight: 600; margin: 0 0 10px; font-size: 15px; }
.options { display: grid; gap: 8px; }
.opt {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 13px;
  cursor: pointer;
  font-size: 14px;
  transition: border-color .12s ease, background .12s ease;
}
.opt:hover { border-color: #b9c8f0; background: #f7f9ff; }
.opt input { accent-color: var(--brand); width: 16px; height: 16px; flex: none; }
.opt.checked { border-color: var(--brand); background: #eef3ff; }

.quiz-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  padding: 13px 20px;
  border-radius: 12px;
  font-size: 15px;
  cursor: pointer;
}
.ghost:hover { border-color: #b9c8f0; color: var(--ink); }
.hint { font-size: 13px; color: var(--ink-soft); margin: 12px 0 0; }

/* report */
.score-head { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; }
.gauge {
  --pct: 0;
  width: 132px; height: 132px; flex: none; border-radius: 50%;
  background: conic-gradient(var(--gc, var(--brand)) calc(var(--pct) * 1%), #eaeefb 0);
  display: grid; place-items: center;
  position: relative;
}
.gauge::before { content: ""; position: absolute; inset: 12px; border-radius: 50%; background: #fff; }
.gauge .num { position: relative; font-size: 34px; font-weight: 700; }
.gauge .num small { font-size: 14px; color: var(--ink-soft); font-weight: 500; }
.score-meta h2 { margin: 0 0 4px; font-size: 24px; }
.level-pill { display: inline-block; padding: 3px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; color: #fff; margin-bottom: 8px; }
.score-meta p { margin: 0; color: var(--ink-soft); max-width: 520px; }

.section-title { font-size: 17px; margin: 28px 0 12px; padding-top: 22px; border-top: 1px solid var(--line); }

.dims-grid { display: grid; gap: 12px; }
.dim-row { display: grid; grid-template-columns: 116px 1fr 52px; align-items: center; gap: 12px; }
.dim-row .name { font-size: 14px; font-weight: 600; }
.dim-row .name small { display: block; font-weight: 400; color: var(--ink-soft); font-size: 11px; }
.bar { height: 12px; background: var(--line); border-radius: 999px; overflow: hidden; }
.bar span { display: block; height: 100%; border-radius: 999px; }
.dim-row .pct { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }

.issue, .action-item, .strength {
  border: 1px solid var(--line);
  border-left-width: 4px;
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 10px;
}
.issue { border-left-color: var(--bad); background: #fdf4f3; }
.issue.mild { border-left-color: var(--warn); background: #fdf8ef; }
.issue .tag, .action-item .tag { font-size: 12px; font-weight: 700; }
.issue .tag { color: var(--bad); }
.issue.mild .tag { color: var(--warn); }
.issue h4 { margin: 4px 0 4px; font-size: 15px; }
.issue p { margin: 0; font-size: 14px; color: var(--ink-soft); }

.action-item { border-left-color: var(--brand); }
.action-item.hi { border-left-color: var(--bad); background: #fdf5f4; }
.action-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.action-head .tag { padding: 1px 8px; border-radius: 999px; color: #fff; font-size: 11px; }
.action-head .tag.hi { background: var(--bad); }
.action-head .tag.lo { background: var(--brand); }
.action-head .dim { font-size: 12px; color: var(--ink-soft); }
.action-item .q { margin: 0 0 4px; font-weight: 600; font-size: 14px; }
.action-item p { margin: 0; font-size: 14px; color: var(--ink-soft); }

.strength { border-left-color: var(--good); background: #f1faf6; font-size: 14px; }
.strength b { color: var(--good); }

.report-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.empty { color: var(--ink-soft); font-size: 14px; }

/* footer */
.footer { padding: 30px 0 50px; color: #7a849c; font-size: 13px; }
.footer .muted { color: #9aa3b8; }

@media (max-width: 560px) {
  .dim-row { grid-template-columns: 92px 1fr 42px; }
  .gauge { width: 110px; height: 110px; }
  .card, .report { padding: 20px; }
}
