/* =====================================================================
   Vocabulary Assessment Beta V1.0 Web UI — FINAL POLISH
   最小 Design Tokens（§十三）: 全站统一, 不建大型 Design System。
   移动优先: 页面 max-width 480px; 微信内置浏览器优先。
   ===================================================================== */
:root {
  /* tokens */
  --page-max: 480px;
  --bg: #f3f6fb;
  --card: #ffffff;
  --primary: #2f6fed;
  --primary-deep: #245ac6;
  --primary-soft: #eaf1ff;
  --text: #20273a;
  --text-2: #5c667a;
  --muted: #97a0b3;
  --line: #e6eaf2;
  --success: #2e9e5b;
  --success-soft: #e9f7ef;
  --warn: #c07f13;
  --warn-deep: #9a6409;
  --warn-soft: #fdf4e0;
  --warn-line: #f0ddb0;
  --danger: #d5482f;
  --info: #4a7bd6;
  --radius: 14px;
  --radius-sm: 10px;
  --space: 16px;
  --fs-title: 21px;
  --fs-h2: 17px;
  --fs-body: 15px;
  --fs-small: 13px;
  --shadow: 0 1px 4px rgba(30, 45, 80, .07);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; min-height: 100%; background: var(--bg); }
body {
  font-family: -apple-system, 'PingFang SC', 'Helvetica Neue', 'Microsoft YaHei', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100%;
  overscroll-behavior-y: none;
  -webkit-font-smoothing: antialiased;
}
.page {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 20px 18px calc(40px + var(--safe-bottom));
}

/* ---------------- 通用 ---------------- */
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  margin-bottom: var(--space);
  border: 1px solid transparent;
}
.page-title { font-size: var(--fs-title); font-weight: 700; margin: 6px 0 16px; }
.center { text-align: center; }
.note { font-size: 12.5px; color: var(--muted); margin-top: 12px; }

/* 词汇量参考区间（V1.0.1）: 展示态沿用 .note; 隐藏态用定稿家长语义块 */
.vocab-hidden { margin-top: 12px; padding: 12px 14px; border-radius: 10px;
  background: var(--bg); border: 1px solid var(--line); }
.vocab-hidden-title { font-weight: 700; font-size: 14px; color: var(--text);
  margin: 0 0 6px; }
.vocab-hidden-body { font-size: 12.5px; color: var(--text-2);
  line-height: 1.6; margin: 0 0 6px; }
.vocab-hidden-body:last-child { margin-bottom: 0; }
.muted { color: var(--muted); }
.form-error { color: var(--danger); font-size: 14px; margin-bottom: 12px;
  text-align: center; font-weight: 500; }

.btn {
  display: block; width: 100%; border: none; border-radius: 12px;
  padding: 15px 18px; font-size: 17px; font-weight: 600;
  text-align: center; cursor: pointer; text-decoration: none;
  -webkit-tap-highlight-color: transparent; user-select: none;
  min-height: 50px; line-height: 1.4;
  touch-action: manipulation;
  -webkit-appearance: none;
}
.btn:active { transform: scale(.985); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 4px 12px rgba(47,111,237,.25); }
.btn-primary:active { background: var(--primary-deep); }
.btn-secondary { background: var(--primary-soft); color: var(--primary); }
.btn-secondary:active { background: #dbe7ff; }
.btn-ghost {
  background: transparent; color: var(--muted); font-size: 15px;
  font-weight: 500; min-height: 44px; padding: 10px;
}
.btn-ghost:active { color: var(--text-2); }
.btn-block { margin-top: 18px; }
.btn-col { display: flex; flex-direction: column; gap: 4px; margin-top: 16px; }

/* ---------------- Landing（§八） ---------------- */
.hero { text-align: center; padding: 26px 0 10px; }
.hero .brand-tag {
  display: inline-block; font-size: 12px; color: var(--primary);
  background: var(--primary-soft); border-radius: 999px; padding: 4px 12px;
  font-weight: 600; letter-spacing: 1px;
}
.headline { font-size: 25px; font-weight: 800; line-height: 1.45; margin-top: 14px; }
.subtitle {
  color: var(--primary); font-size: 16px; font-weight: 600; margin-top: 10px;
}
.core-points { margin-top: 18px; }
.core-point {
  display: flex; gap: 12px; align-items: flex-start; text-align: left;
  margin-bottom: 10px;
}
.core-point:last-child { margin-bottom: 0; }
.core-num {
  flex: 0 0 26px; height: 26px; border-radius: 50%;
  background: var(--primary-soft); color: var(--primary);
  font-weight: 700; font-size: 14px; text-align: center; line-height: 26px;
  margin-top: 3px;
}
.core-point .cp-title { font-weight: 600; font-size: 15.5px; }
.core-point .cp-desc { font-size: 13.5px; color: var(--text-2); margin-top: 1px; }
.landing-cta { margin-top: 22px; }

/* ---------------- Profile 整块选择卡（§九, 纯 CSS） ---------------- */
fieldset.card { border: none; }
fieldset legend {
  font-size: 16px; font-weight: 700; margin-bottom: 10px; width: 100%;
}
.opt-list { display: flex; flex-direction: column; gap: 10px; }
.opt-card {
  display: block; position: relative; cursor: pointer;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  padding: 14px 16px 14px 44px; background: #fff;
  transition: border-color .12s, background .12s;
}
.opt-card input {
  position: absolute; left: 14px; top: 50%; width: 20px; height: 20px;
  margin-top: -10px; opacity: 0; pointer-events: none;
}
.opt-card .opt-radio {
  position: absolute; left: 14px; top: 50%; width: 20px; height: 20px;
  margin-top: -10px; border: 2px solid #c3cbda; border-radius: 50%;
  background: #fff; transition: border-color .12s, background .12s;
}
.opt-card .opt-radio::after {
  content: ''; position: absolute; inset: 3px; border-radius: 50%;
  background: var(--primary); transform: scale(0); transition: transform .12s;
}
.opt-card .opt-check {
  position: absolute; right: 14px; top: 50%; margin-top: -10px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--primary); color: #fff; font-size: 13px;
  text-align: center; line-height: 20px; font-weight: 700;
  transform: scale(0); transition: transform .12s;
}
.opt-card .opt-text { font-size: 15.5px; font-weight: 500; }
.opt-card .opt-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.opt-card input:checked ~ .opt-radio { border-color: var(--primary); }
.opt-card input:checked ~ .opt-radio::after { transform: scale(1); }
.opt-card input:checked ~ .opt-check { transform: scale(1); }
.opt-card:has(input:checked) {
  border-color: var(--primary); background: var(--primary-soft);
}
.opt-card:active { background: #f2f6ff; }

/* ---------------- Assessment（§十 克制） ---------------- */
.progress-wrap { margin-bottom: 24px; }
.progress-bar {
  display: block; width: 100%; height: 8px; border: 0;
  background: #e7ebf3; border-radius: 4px; overflow: hidden;
  appearance: none; -webkit-appearance: none;
}
.progress-bar::-webkit-progress-bar { background: #e7ebf3; border-radius: 4px; }
.progress-bar::-webkit-progress-value { background: var(--primary); border-radius: 4px; }
.progress-bar::-moz-progress-bar { background: var(--primary); border-radius: 4px; }
.progress-text { font-size: 12.5px; color: var(--muted); margin-top: 8px; text-align: center; }
.q-title { font-size: 19px; font-weight: 600; text-align: center; margin-bottom: 18px; }
.word-card {
  background: var(--card); border-radius: 16px; text-align: center;
  padding: 44px 16px; margin-bottom: 16px; box-shadow: var(--shadow);
}
.word { font-size: 40px; font-weight: 700; letter-spacing: .5px; word-break: break-word; }
.hint { text-align: center; font-size: 12.5px; color: var(--muted); margin-bottom: 4px; }
.answer-group { display: flex; flex-direction: column; gap: 12px; margin-top: 18px; }
.answer-btn { font-size: 18px; padding: 17px; min-height: 56px; font-weight: 600; }
.answer-1 { background: var(--primary-soft); color: var(--primary); }
.answer-2 { background: var(--warn-soft); color: var(--warn-deep); }
.answer-3 { background: #f0f2f6; color: #5c667a; }
.answer-btn:active { filter: brightness(.96); }
.option-btn {
  text-align: left; background: var(--card); color: var(--text);
  box-shadow: var(--shadow); font-size: 15.5px; line-height: 1.5;
  min-height: 54px;
}
.option-btn:active { background: var(--primary-soft); color: var(--primary); }

/* ---------------- Result Preview（§七 结果感） ---------------- */
.done-banner {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  color: var(--success); font-weight: 700; font-size: 15px; margin-bottom: 14px;
}
.done-banner .tick {
  width: 24px; height: 24px; border-radius: 50%; background: var(--success-soft);
  color: var(--success); text-align: center; line-height: 24px; font-size: 14px;
}
.stage-card { text-align: center; padding: 24px 18px 20px; }
.label { font-size: 13px; color: var(--muted); }
.stage-name { font-size: 23px; font-weight: 800; margin-top: 6px; letter-spacing: .2px; }
.cefr-ref { color: var(--primary); font-size: 14px; font-weight: 600; margin-top: 6px; }
.conclusion { font-size: 15px; color: var(--text-2); margin-top: 10px; }
.diag-group { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.diag-card { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 0; }
.diag-mark { font-size: 17px; flex-shrink: 0; width: 20px; text-align: center; line-height: 1.5; }
.diag-text { font-size: 14px; color: var(--text-2); }
.diag-warn { border-color: var(--warn-line); background: var(--warn-soft); }
.diag-warn .diag-mark { color: var(--warn); }
.diag-ok { border-color: transparent; }
.diag-ok .diag-mark { color: var(--success); }
.diag-info .diag-mark { color: var(--info); }
.diag-attention { border: 1.5px solid var(--warn-line); background: var(--warn-soft); }
.diag-attention .diag-mark { color: var(--warn-deep); }
.unlock-card { text-align: center; }
.unlock-title { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.check-list { list-style: none; text-align: left; margin: 8px 0 2px; }
.check-list li { display: flex; gap: 8px; align-items: flex-start;
  font-size: 14.5px; color: var(--text-2); padding: 4px 0; }
.check-list .ck { color: var(--success); font-weight: 700; flex-shrink: 0; }

/* ------------- 英语词汇能力尺（§六 ability scale, 共用组件） ------------- */
/* 连续 baseline + 等距固定刻度 + 独立 marker（可落在两刻度之间）。
   marker 左侧 primary 蓝, 右侧 neutral 浅灰; 位置为固定 presentation
   mapping（SCALE_PCT）, 不代表精确能力百分位。 */
.vscale { margin: 16px 0 4px; }
.vscale-title { font-size: 11.5px; color: var(--muted); margin: 0 0 14px;
  font-weight: 600; letter-spacing: .3px; }
.vscale-track { position: relative; height: 38px; }
.vscale-line { position: absolute; left: 0; right: 0; top: 6px; height: 4px;
  border-radius: 2px; background: #e3e8f1; }
.vscale-line-done { position: absolute; left: 0; top: 6px; height: 4px;
  border-radius: 2px 0 0 2px; background: var(--primary); }
.vscale-tick { position: absolute; top: 2px; width: 2px; height: 12px;
  margin-left: -1px; background: #c7d0e2; border-radius: 1px; }
.vscale-marker { position: absolute; top: 0; width: 16px; height: 16px;
  border-radius: 50%; background: var(--primary); border: 3px solid #fff;
  box-shadow: 0 0 0 2px var(--primary), 0 1px 5px rgba(47, 111, 237, .35);
  transform: translateX(-50%); }
.vscale-marker-label { position: absolute; top: 24px; white-space: nowrap;
  transform: translateX(-50%); font-size: 10.5px; color: var(--primary);
  font-weight: 700; }
.vscale-labels { position: relative; height: 30px; margin-top: 4px; }
.vscale-labels span { position: absolute; top: 0; transform: translateX(-50%);
  font-size: 10.5px; color: var(--muted); white-space: nowrap;
  line-height: 1.25; text-align: center; }
.vscale-labels span:first-child { transform: none; text-align: left; }
.vscale-labels span:last-child { transform: translateX(-100%);
  text-align: right; max-width: 5em; white-space: normal;
  word-break: keep-all; line-height: 1.35; }
.vscale .tick-0 { left: 0; }
.vscale .tick-1 { left: 25%; }
.vscale .tick-2 { left: 50%; }
.vscale .tick-3 { left: 75%; }
.vscale .tick-4 { left: 100%; }
.vscale.marker-0 .vscale-line-done { width: 12.5%; }
.vscale.marker-0 .vscale-marker,
.vscale.marker-0 .vscale-marker-label { left: 12.5%; }
.vscale.marker-1 .vscale-line-done { width: 37.5%; }
.vscale.marker-1 .vscale-marker,
.vscale.marker-1 .vscale-marker-label { left: 37.5%; }
.vscale.marker-2 .vscale-line-done { width: 62.5%; }
.vscale.marker-2 .vscale-marker,
.vscale.marker-2 .vscale-marker-label { left: 62.5%; }
.vscale.marker-3 .vscale-line-done { width: 87.5%; }
.vscale.marker-3 .vscale-marker,
.vscale.marker-3 .vscale-marker-label { left: 87.5%; }
.vscale.marker-4 .vscale-line-done { width: 96%; }
.vscale.marker-4 .vscale-marker,
.vscale.marker-4 .vscale-marker-label { left: 96%; }
.vscale-caption { font-size: 12.5px; color: var(--text-2); text-align: center;
  margin: 2px 0 0; }

/* mini 版（Result Preview 复用同一组件, 仅尺寸收敛） */
.vscale.mini { margin: 12px auto 2px; max-width: 320px; }
.vscale.mini .vscale-title { font-size: 11px; margin-bottom: 12px; }
.vscale.mini .vscale-track { height: 36px; }
.vscale.mini .vscale-marker { width: 14px; height: 14px; top: 1px; }
.vscale.mini .vscale-marker-label { top: 22px; font-size: 10px; }
.vscale.mini .vscale-labels span { font-size: 10px; }

/* ---------------- Protection（§十二 非失败感） ---------------- */
.protection-card {
  text-align: center; padding: 30px 18px; margin-top: 10px;
  border: 1.5px solid var(--warn-line); background: var(--warn-soft);
}
.protection-icon {
  width: 52px; height: 52px; margin: 0 auto 14px; border-radius: 50%;
  background: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 26px;
}
.protection-card .page-title { color: var(--warn-deep); margin-bottom: 8px; }
.protection-card .conclusion { color: var(--text-2); }
.prot-card-copy { font-size: 14px; color: var(--text-2); margin-top: 10px; }
.protection-assistant-note { margin-top: 14px; }

/* ---------------- Lead Capture（§十一） ---------------- */
.lead-benefits { list-style: none; text-align: left; margin: 14px 0 4px; }
.lead-benefits li { display: flex; gap: 8px; align-items: flex-start;
  font-size: 14.5px; color: var(--text-2); padding: 5px 0; }
.lead-benefits .bk { color: var(--success); font-weight: 700; flex-shrink: 0; }
.lead-form { margin-top: 18px; }
.lead-label { display: block; font-size: 14px; color: var(--text-2); margin-bottom: 8px;
  text-align: center; }
.phone-input {
  width: 100%; font-size: 22px; text-align: center; letter-spacing: 2px;
  padding: 14px; border: 1.5px solid #d3dae6; border-radius: 12px;
  margin-bottom: 14px; background: var(--card); color: var(--text);
  min-height: 54px;
  -webkit-appearance: none;
}

@media (max-width: 360px) {
  .page { padding-left: 14px; padding-right: 14px; }
  .headline { font-size: 23px; }
  .word { font-size: 36px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
.phone-input:focus { outline: none; border-color: var(--primary); }
.phone-input::placeholder { color: #b6bfce; font-size: 16px; letter-spacing: 0; }
.consent-note { font-size: 12px; color: var(--muted); margin-top: 10px; text-align: center; }
.lead-skip { margin-top: 4px; }

/* ================================================================
   Full Report（§五）— 7 段移动端报告
   ================================================================ */
.report-head { text-align: center; padding: 8px 0 18px; }
.report-title { font-size: 22px; font-weight: 800; }
.report-no {
  display: inline-block; margin-top: 10px; font-size: 13px; color: var(--muted);
  background: var(--card); border: 1px dashed #cbd4e2; border-radius: 999px;
  padding: 4px 14px; letter-spacing: .5px;
}
.sec { margin-bottom: 22px; }
.sec-head {
  display: flex; align-items: center; gap: 9px; margin: 4px 0 12px;
  font-size: var(--fs-h2); font-weight: 700;
}
.sec-head::before {
  content: ''; width: 4px; height: 17px; border-radius: 2px;
  background: var(--primary); flex-shrink: 0;
}
.sec-sub { font-size: 13px; color: var(--muted); margin: -6px 0 12px; }

/* S1 阶段卡 */
.report-stage { text-align: center; padding: 22px 16px 18px; }
.report-stage .stage-name { font-size: 21px; }

/* S2 诊断 */
.report-diag-title { display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap; row-gap: 4px; font-weight: 700; font-size: 15.5px; }
/* 390px 窄屏: 标签永不逐字折行, 放不下时整枚换行到标题下方 */
.report-diag-title .ms-cond { white-space: nowrap; flex-shrink: 0; }
.report-diag .d-summary { font-size: 14px; color: var(--text-2); margin-top: 6px; }

/* S3 任务 */
.task-item {
  display: flex; gap: 12px; align-items: flex-start; padding: 13px 4px;
  border-bottom: 1px solid var(--line);
}
.task-item:last-child { border-bottom: none; }
.task-tag {
  flex: 0 0 auto; font-size: 12px; font-weight: 700; border-radius: 6px;
  padding: 3px 8px; margin-top: 2px;
}
.task-tag.t-primary { background: var(--primary); color: #fff; }
.task-tag.t-secondary { background: var(--primary-soft); color: var(--primary); }
.task-tag.t-supplement { background: var(--warn-soft); color: var(--warn-deep); }
.task-text { font-size: 14.5px; color: var(--text); }

/* S4 材料类别卡（无封面占位, 纯文字卡） */
.mat-chip {
  display: inline-block; background: #f2f5fa; border-radius: 8px;
  padding: 8px 12px; font-size: 14px; color: var(--text);
  margin: 0 8px 8px 0; line-height: 1.5;
}

/* S5 路线 flow */
.route-flow { display: flex; flex-direction: column; }
.route-node {
  position: relative; padding: 14px 16px 14px 46px; background: var(--card);
  border-radius: var(--radius-sm); box-shadow: var(--shadow);
  border: 1px solid transparent;
}
.route-node .rn-tag { font-size: 12px; color: var(--primary); font-weight: 700;
  background: var(--primary-soft); border-radius: 999px; padding: 2px 10px;
  display: inline-block; margin-bottom: 6px; }
.route-node.current { border-color: #c9dcff; background: #f4f8ff; }
.route-node .rn-text { font-size: 14.5px; color: var(--text); font-weight: 500; }
.route-node .rn-note { font-size: 12.5px; color: var(--text-2); margin-top: 4px; }
.route-arrow { align-self: center; color: #b7c2d4; font-size: 20px; line-height: 1;
  padding: 3px 0; }
.route-near { background: var(--card); border-radius: var(--radius-sm);
  padding: 12px 14px; margin-top: 12px; font-size: 13.5px; color: var(--text-2);
  border-left: 3px solid var(--success); }
.route-alt { font-size: 13px; color: var(--muted); margin-top: 12px; }

/* S6 里程碑 */
.milestone {
  padding: 14px 16px; background: var(--card); border-radius: var(--radius-sm);
  box-shadow: var(--shadow); margin-bottom: 12px; border-left: 4px solid var(--primary);
}
.milestone.conditional { border-left-color: var(--warn); background: var(--warn-soft); }
.milestone .ms-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.milestone .ms-grade { font-weight: 800; font-size: 16px; }
.milestone .ms-variant { font-size: 12px; color: var(--text-2);
  background: #eef1f6; border-radius: 999px; padding: 2px 10px; }
.milestone .ms-cond { font-size: 12px; font-weight: 700; color: var(--warn-deep);
  background: #fff; border: 1px solid var(--warn-line); border-radius: 999px;
  padding: 2px 10px; }
.milestone .ms-semantic { font-size: 14px; color: var(--text); margin-top: 8px; }
.milestone .ms-note { font-size: 12px; color: var(--muted); margin-top: 8px; }

/* S7 资料 */
.mat-list { display: flex; flex-direction: column; gap: 10px; }
.mat-item {
  display: flex; gap: 10px; align-items: flex-start; background: #f4f7fc;
  border-radius: var(--radius-sm); padding: 13px 14px;
}
.mat-item .mi-ico { flex-shrink: 0; width: 30px; height: 30px; border-radius: 8px;
  background: var(--primary-soft); color: var(--primary); font-size: 15px;
  text-align: center; line-height: 30px; font-weight: 700; }
.mat-item .mi-label { font-size: 14.5px; color: var(--text); font-weight: 500; }
.group-title { font-size: 14px; font-weight: 700; margin: 14px 0 8px; }
.group-title:first-child { margin-top: 0; }

/* CTA 底栏 */
.cta-card { text-align: center; background: var(--card); border: 1px dashed #c3cfe3;
  border-radius: var(--radius); padding: 22px 16px; margin-top: 8px; }
.cta-card .cta-q { font-size: 17px; font-weight: 700; }
.cta-card .cta-note { font-size: 13.5px; color: var(--text-2); margin: 10px 0 16px; }
.cta-card .cta-rid { font-size: 13px; color: var(--muted); margin-top: 12px; }
.qr-img { width: 140px; height: 140px; margin: 14px auto 4px; display: block;
  border-radius: 8px; border: 1px solid var(--line); }
.qr-tip { font-size: 12px; color: var(--muted); }

/* 回到顶部/无 JS 辅助 */
.center-link { display: block; text-align: center; color: var(--muted);
  font-size: 13px; margin-top: 14px; text-decoration: none; }
