/*
 * 创业还是工作 · 样式
 * 浅色为主，跟随系统切换深色。一栏排版，手机优先。
 * 三种答案各有一个强调色：创业 = 橙红，边工作边创业 = 琥珀，工作 = 青绿。
 * 结果页按答案切换 --accent，雷达图、进度条、标签都跟着变。
 */
:root {
  --bg: #f6f3ec;
  --surface: #fffdf8;
  --line: #e4ded1;
  --line-strong: #cbc3b2;
  --fg: #1d1b18;
  --muted: #6b665c;
  --on-strong: #f6f3ec;
  --c-startup: #bd3e16;
  --c-between: #96600a;
  --c-job: #1d7062;
  --accent: var(--c-startup);
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141311;
    --surface: #1c1b18;
    --line: #2f2c27;
    --line-strong: #4a463e;
    --fg: #ece8df;
    --muted: #a39d91;
    --on-strong: #141311;
    --c-startup: #ff7d52;
    --c-between: #e5a641;
    --c-job: #4fc0a9;
    color-scheme: dark;
  }
}
.g-startup { --accent: var(--c-startup); }
.g-between { --accent: var(--c-between); }
.g-job { --accent: var(--c-job); }

/* ---------- 基础 ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
[hidden] { display: none !important; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  font-variant-numeric: tabular-nums;
  padding:
    env(safe-area-inset-top, 0px)
    max(16px, env(safe-area-inset-right, 0px))
    env(safe-area-inset-bottom, 0px)
    max(16px, env(safe-area-inset-left, 0px));
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

.page {
  max-width: 36rem;
  margin: 0 auto;
  padding: 32px 0 64px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}
.page > * { min-width: 0; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
[tabindex="-1"]:focus { outline: none; }

a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent); }

/* ---------- 文字 ---------- */
.eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}
h1 {
  margin-top: 10px;
  font-size: clamp(34px, 9.5vw, 50px);
  line-height: 1.18;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.lead { margin-top: 14px; color: var(--muted); }
.section-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.note { margin-top: 12px; font-size: 13px; color: var(--muted); }

/* ---------- 按钮 ---------- */
.actions { display: grid; gap: 10px; }
.btn {
  appearance: none;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  min-height: 54px;
  padding: 12px 18px;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--fg);
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s, transform 0.1s;
}
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--fg); border-color: var(--fg); color: var(--on-strong); }
@media (hover: hover) {
  .btn:hover { border-color: var(--fg); }
  .btn.primary:hover { background: var(--accent); border-color: var(--accent); }
}
.link-btn {
  appearance: none;
  border: 0;
  background: none;
  font: inherit;
  font-size: 15px;
  color: var(--muted);
  min-height: 44px;
  padding: 0;
  cursor: pointer;
}
.link-btn:hover { color: var(--fg); }

/* ---------- 雷达图 ---------- */
.radar-wrap { display: grid; justify-items: center; gap: 6px; }
.radar { display: block; width: 100%; max-width: 400px; height: auto; overflow: visible; }
.radar .ring { fill: none; stroke: var(--line); stroke-width: 1; }
.radar .ring.outer { stroke: var(--line-strong); }
.radar .axis { stroke: var(--line); stroke-width: 1; }
.radar .shape { fill: var(--accent); fill-opacity: 0.16; stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; }
.radar .dot { fill: var(--accent); stroke: var(--bg); stroke-width: 2; }
.radar .lbl { font-size: 15px; font-weight: 700; fill: var(--fg); }
.radar .val { font-size: 15px; font-weight: 800; fill: var(--accent); }
.radar .grow { transform-box: view-box; transform-origin: 0 0; animation: grow 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
@keyframes grow {
  from { transform: scale(0.06); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.is-sample .shape { fill-opacity: 0.08; stroke-dasharray: 6 6; stroke-width: 2; }
.is-sample .dot { display: none; }
.is-sample .lbl { fill: var(--muted); font-weight: 600; }
.radar-wrap figcaption { font-size: 14px; color: var(--muted); text-align: center; }
.radar-wrap figcaption b { font-size: 26px; font-weight: 800; color: var(--fg); margin: 0 2px; }
.radar-wrap figcaption .sub { display: block; font-size: 12px; }

/* ---------- 首页 ---------- */
.intro { gap: 32px; }
.dim-list li {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.dim-list b { flex: none; font-weight: 800; }
.dim-list span { color: var(--muted); font-size: 15px; }

/* ---------- 答题 ---------- */
.quiz { gap: 20px; padding-top: 12px; }
.quiz-top { display: flex; justify-content: space-between; align-items: center; }
.count { font-size: 14px; color: var(--muted); }
.count b { font-size: 20px; font-weight: 800; color: var(--fg); }
.progress { height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; margin-top: -8px; }
.progress span { display: block; height: 100%; background: var(--accent); border-radius: inherit; transition: width 0.3s ease; }
.question {
  margin-top: 12px;
  font-size: clamp(21px, 5.8vw, 27px);
  line-height: 1.5;
  font-weight: 800;
  letter-spacing: 0;
  min-height: 3em;
}
.opts { display: grid; gap: 10px; }
.opt {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  width: 100%;
  min-height: 58px;
  padding: 15px 16px;
  text-align: left;
  font: inherit;
  line-height: 1.55;
  color: var(--fg);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.opt .mark {
  flex: none;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  color: var(--muted);
}
@media (hover: hover) { .opt:hover { border-color: var(--fg); } }
.opt.is-picked { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.opt.is-picked .mark { background: var(--accent); border-color: var(--accent); color: var(--on-strong); }

/* ---------- 结果 ---------- */
.result { gap: 44px; }
.result-head { display: grid; }
.verdict-lead { margin-top: 18px; color: var(--muted); }
.verdict { margin-top: 2px; font-size: clamp(42px, 12.5vw, 64px); line-height: 1.15; color: var(--accent); }
.path-card {
  margin-top: 20px;
  padding: 16px 18px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
}
.path-name {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 12px;
  font-size: 21px;
  font-weight: 800;
}
.path-name .match { font-size: 14px; font-weight: 700; color: var(--accent); }
.path-tag { color: var(--muted); }

.dim-rows { display: grid; gap: 24px; margin-top: 18px; }
.dim-head { display: flex; align-items: center; gap: 10px; }
.dim-name { font-size: 17px; font-weight: 800; }
.dim-level {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--accent);
  padding: 1px 9px;
  border: 1px solid currentColor;
  border-radius: 999px;
}
.dim-score { margin-left: auto; font-size: 22px; font-weight: 800; line-height: 1; }
.bar { display: block; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.dim-rows .bar { margin: 10px 0 10px; }
.dim-rows p { font-size: 15px; color: var(--muted); }

.path-detail { display: grid; gap: 18px; }
.path-detail .section-title { color: var(--fg); font-size: 15px; letter-spacing: 0; }
.path-detail h3 { font-size: 15px; font-weight: 800; margin-bottom: 6px; }
.cols { display: grid; gap: 18px; }
@media (min-width: 560px) { .cols { grid-template-columns: 1fr 1fr; gap: 24px; } }
.dots li { position: relative; padding-left: 18px; }
.dots li + li { margin-top: 4px; }
.dots li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.72em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.steps { counter-reset: step; display: grid; gap: 8px; }
.steps li { counter-increment: step; position: relative; padding-left: 34px; }
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.15em;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  color: var(--on-strong);
  background: var(--accent);
}

.match-list { display: grid; gap: 14px; margin-top: 18px; }
.match-list li {
  display: grid;
  grid-template-columns: 7.2em 1fr 3em;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  opacity: 0.62;
}
.match-list li.is-top { opacity: 1; }
.match-list .m-name { line-height: 1.35; font-weight: 700; }
.match-list .is-top .m-name { font-weight: 800; }
.match-list .m-name small { display: block; font-size: 12px; font-weight: 400; color: var(--muted); }
.match-list .m-val { text-align: right; font-weight: 800; }

/* ---------- 兑换码 ---------- */
.gate-page { gap: 32px; }
.is-locked .radar { max-width: 320px; }
.is-locked .lbl { fill: var(--muted); font-weight: 600; }
.is-locked .shape { fill-opacity: 0.35; }
.gate { display: grid; gap: 10px; }
.gate-label { font-size: 14px; font-weight: 700; }
.code-input {
  width: 100%;
  min-height: 58px;
  padding: 12px 16px;
  font: inherit;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-align: center;
  text-transform: uppercase;
  color: var(--fg);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
}
.code-input::placeholder { font-size: 16px; font-weight: 400; letter-spacing: 0; color: var(--muted); }
.code-input:focus { outline: none; border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.code-input[aria-invalid="true"] { border-color: var(--c-startup); }
.error { font-size: 14px; font-weight: 700; color: var(--c-startup); }
.gate .note { margin-top: 2px; text-align: center; }
.btn:disabled { opacity: 0.6; cursor: progress; }

/* ---------- 测试依据 ---------- */
.about { gap: 40px; }
.topbar { margin-bottom: -24px; }
.basis { display: grid; gap: 20px; margin-top: 18px; }
.basis dt { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; margin-bottom: 4px; }
.basis dt b { font-size: 17px; font-weight: 800; }
.basis dt span { font-size: 14px; color: var(--muted); }
.basis li { font-size: 15px; }
.cite { margin-left: 2px; font-size: 11px; font-weight: 800; color: var(--accent); }
.prose { display: grid; gap: 12px; }
.prose .section-title { margin-bottom: 6px; }
.prose p { font-size: 15px; }
.table-wrap { overflow-x: auto; margin-top: 6px; }
.proto { width: 100%; border-collapse: collapse; font-size: 14px; }
.proto caption { text-align: left; font-size: 13px; font-weight: 700; color: var(--muted); padding-bottom: 6px; }
.proto th, .proto td { padding: 8px 4px; border-bottom: 1px solid var(--line); text-align: center; font-weight: 400; }
.proto thead th { font-size: 13px; color: var(--muted); font-weight: 700; }
.proto tbody th { text-align: left; font-weight: 700; white-space: nowrap; }
.refs { counter-reset: ref; display: grid; gap: 18px; margin-top: 18px; }
.refs li { counter-increment: ref; position: relative; padding-left: 34px; }
.refs li::before { content: "[" counter(ref) "]"; position: absolute; left: 0; top: 0.1em; font-size: 13px; font-weight: 800; color: var(--accent); }
.ref-cite { font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.ref-note { margin-top: 4px; font-size: 14px; color: var(--muted); }
.refs a { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.more { display: grid; gap: 12px; margin-top: 18px; }
.more li { display: grid; }
.more a { font-weight: 700; }
.more span { font-size: 14px; color: var(--muted); }

/* ---------- 页脚 ---------- */
.foot { display: grid; gap: 8px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 13px; line-height: 1.7; color: var(--muted); }
.foot a { color: var(--fg); font-weight: 700; }

/* ---------- 提示 ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  z-index: 10;
  max-width: calc(100vw - 32px);
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--fg);
  color: var(--on-strong);
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity 0.2s, transform 0.2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
