/*
 * iOS clean layer — 测评子页面（growth / self / visual 共用）
 * 这些页面以 iframe 嵌在主页面里，主页面的样式管不到，所以单独一份。
 * 做法：先把各页 :root 里的颜色变量换成 iOS 色板，再压平卡片、选项和按钮。
 */

:root {
  --ink: #1c1c1e;
  --muted: rgba(60, 60, 67, 0.6);
  --line: rgba(60, 60, 67, 0.14);
  --paper: #f2f2f7;
  --surface: #ffffff;
  --white: #ffffff;
  --navy: #1c1c1e;
  --teal: #1f7a5a;
  --teal-dark: #17654a;
  --teal-soft: rgba(31, 122, 90, 0.1);
  --mint: rgba(31, 122, 90, 0.1);
  --blue: #f2f2f7;
  --blue-soft: #f2f2f7;
  --shadow: none;

  --ios-fill: rgba(118, 118, 128, 0.12);
  --ios-sep: rgba(60, 60, 67, 0.14);
  --ios-font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
}

html,
body {
  background: #f2f2f7 !important;   /* 原页面用了渐变 background，需要整体覆盖 */
}
body,
button,
input,
select,
textarea {
  font-family: var(--ios-font);
  -webkit-font-smoothing: antialiased;
}

/* 通用：卡片去边框、去阴影 */
.surface,
.question-shell,
.summary-card,
.stage-card,
.report,
.panel {
  border: 0 !important;
  border-radius: 12px;
  box-shadow: none !important;
}

/* 英文小标签 */
.eyebrow,
.hero-label,
.brand-kicker,
.question-hero-kicker,
.report-kicker,
.dimension-code {
  display: none !important;
}

/* 进度条 */
.progress-track {
  height: 4px;
  border-radius: 2px;
  background: var(--ios-fill);
}
.progress-fill { border-radius: 2px; background: var(--teal); }

/* 题目标题 */
.dimension-head h2,
.question-title {
  font-weight: 700;
  letter-spacing: 0;
  color: var(--ink);
}

/* ---------- 实战自评：L1–L5 选项改为 iOS 单选列表 ---------- */
.anchors {
  gap: 0;
  overflow: hidden;
  border-radius: 12px;
  background: #fff;
}
.question-shell .anchors { background: #f2f2f7; }
.anchor {
  position: relative;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 12px 14px;
}
.anchor + .anchor::before {
  content: "";
  position: absolute;
  top: 0; right: 0; left: 14px;
  border-top: 0.5px solid var(--ios-sep);
}
.anchor.selected { background: var(--teal-soft) !important; }
.anchor-level {
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.anchor.selected .anchor-level { background: transparent; color: var(--teal); }
.anchor-copy strong { font-size: 15px; font-weight: 500; line-height: 1.45; }
.anchor-copy span { font-size: 12px; }
.anchor-check {
  border: 0;
  background: transparent;
  color: transparent;
}
.anchor.selected .anchor-check {
  border: 0;
  background: transparent;
  color: var(--teal);
  font-size: 16px;
}

/* 知识库依据 */
.knowledge-basis {
  border: 0;
  border-radius: 12px;
  background: #fff;
  box-shadow: none;
}
.knowledge-basis > span { font-size: 13px; font-weight: 400; color: var(--muted); letter-spacing: 0; }
.knowledge-evidence a {
  border: 0;
  border-radius: 8px;
  background: #f2f2f7;
  box-shadow: none;
}

/* ---------- 战术题：步骤选项 ---------- */
.step-option,
.choice,
.option {
  border: 0 !important;
  border-radius: 10px !important;
  background: #f2f2f7 !important;
  box-shadow: none !important;
  color: var(--ink);
}
.step-option[aria-pressed="true"],
.choice[aria-pressed="true"],
.choice[aria-checked="true"],
.choice.selected,
.option.selected {
  background: var(--teal-soft) !important;
  color: var(--teal);
  box-shadow: inset 0 0 0 1.5px var(--teal) !important;
}
.tag,
.pill {
  border: 0;
  border-radius: 6px;
  background: var(--ios-fill);
  color: var(--ink);
}

/* ---------- 按钮 ---------- */
.button,
.button-primary,
.button-secondary,
.button-quiet,
.primary {
  border: 0 !important;
  border-radius: 12px !important;
  box-shadow: none !important;
  font-weight: 600;
}
.button-primary,
button.primary {
  background: var(--teal) !important;
  color: #fff !important;
}
.button-secondary,
.button-quiet {
  background: var(--ios-fill) !important;
  color: var(--teal) !important;
}
.button:disabled,
.button-primary:disabled {
  background: var(--ios-fill) !important;
  color: rgba(60, 60, 67, 0.3) !important;
}

/* ---------- 成长测评外壳：步骤条 ---------- */
.stepper {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 0;
  padding: 2px;
  border: 0;
  border-radius: 9px;
  background: var(--ios-fill);
  box-shadow: none;
}
.stepper .step {
  border: 0 !important;
  border-radius: 7px;
  background: transparent;
  box-shadow: none !important;
}
.stepper .step.active {
  background: #fff;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12), 0 0 1px rgba(0, 0, 0, 0.04) !important;
}
.stepper .step {
  min-height: 32px;
  padding: 4px 6px !important;
  display: grid !important;
  place-items: center;
  text-align: center;
}
.stepper .step .index { display: none; }
.stepper .step > span:not(.index) span { display: none; }
.stepper .step strong { font-size: 13px; font-weight: 600; color: var(--ink); }
.stepper .step span span { font-size: 11px; color: var(--muted); }

/* 减少嵌套层级：外层只留一张白卡（题目本身） */
body.archive-embedded .app { padding: 0 0 16px !important; }
.stage-panel {
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
.frame-shell {
  border: 0 !important;
  border-radius: 12px;
  background: transparent !important;
  box-shadow: none !important;
}
body.embedded .app { padding: 0 0 16px !important; }
.stepper .step strong { white-space: nowrap; }
.stepper .step > span:not(.index) { display: block; width: 100%; text-align: center; }

/* 战术/规则题：题目头部由深色大卡改为白卡 */
.question-hero {
  padding: 18px 16px !important;
  border: 0 !important;
  border-radius: 12px !important;
  background: #fff !important;
  box-shadow: none !important;
  color: var(--ink) !important;
}
.question-hero::before,
.question-hero::after { display: none !important; }
.question-hero h2 { color: var(--ink) !important; font-weight: 700; letter-spacing: 0; }
.question-hero p { color: var(--muted) !important; }
.question-hero .hero-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.question-hero .hero-chip {
  padding: 4px 8px;
  border: 0 !important;
  border-radius: 6px;
  background: #f2f2f7 !important;
  color: var(--muted) !important;
  font-size: 12px;
  line-height: 1.4;
  min-height: 0 !important;
  height: auto !important;
  box-shadow: none;
}
details,
.term-panel {
  border: 0;
  border-radius: 12px;
  background: #fff;
  box-shadow: none;
}

/* ---------- v8 对齐修正 ---------- */
/* 步骤条：原样式是 28px 序号列 + 文字列；序号隐藏后文字被挤进 28px 列导致歪斜 */
.stepper .step { grid-template-columns: 1fr !important; }

/* 嵌入外壳时：标题与外层页面文字左缘对齐（外层文字比卡片缩进 4px） */
body.archive-embedded .stage-head { padding: 0 4px; }
body.archive-embedded .stage-head h2 { font-size: 20px; letter-spacing: 0; }
body.archive-embedded .stage-head p { font-size: 13px; line-height: 1.5; }
body.archive-embedded .stage-badge { font-size: 12px; font-weight: 600; padding: 3px 8px; }

/* 知识库依据：去掉多余内缩，改成上下两行的列表，避免人名被折成两行 */
.knowledge-basis { margin-top: 16px !important; padding: 0 !important; }
.knowledge-basis > span { margin-bottom: 8px; text-transform: none; }
.knowledge-evidence { flex-direction: column; align-items: stretch; gap: 6px; }
.knowledge-evidence a {
  display: block !important;
  padding: 8px 10px !important;
  font-size: 13px !important;
  line-height: 1.4 !important;
  color: var(--muted) !important;
}
.knowledge-evidence strong { display: block; margin-bottom: 1px; font-size: 13px !important; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dimension-head h2 { font-size: 24px !important; line-height: 1.25 !important; letter-spacing: 0 !important; }
.dimension-head p { font-size: 15px !important; line-height: 1.45 !important; }
/* 原样式 .step span { margin-top: 2px } 会让分段文字下沉 */
.stepper .step > span:not(.index) { margin: 0 !important; line-height: 1.2; }
.stepper .step strong { line-height: 1.2; }

/* 嵌在外壳里时，外壳已有分段控件，隐藏内部步骤条避免两套导航不同步 */
body.archive-embedded .stepper { display: none !important; }

/* 未解锁说明卡 */
.locked-stage {
  margin: 4px 0 0;
  padding: 28px 20px 22px;
  border-radius: 12px;
  background: #fff;
  text-align: center;
}
.locked-stage[hidden] { display: none; }
.locked-stage h2 { margin: 0; font-size: 19px; font-weight: 600; letter-spacing: 0; color: var(--ink); }
.locked-stage p { margin: 8px auto 18px; max-width: 280px; font-size: 15px; line-height: 1.5; color: var(--muted); }
.locked-stage .button { width: 100%; min-height: 46px; border-radius: 12px; font-size: 16px; }
.empty-report { font-size: 15px !important; line-height: 1.5; }
