/* ===========================================================
   人格类型探索测试 — 视觉样式
   风格：MBTI 人格测试站（16personalities 体系）
        — 圆角卡片、柔和阴影、四大族群配色、渐变主色
        — 成套入场动画与交互动效
   =========================================================== */

:root {
  /* ---- 主色（品牌紫 → 蓝渐变） ---- */
  --brand:      #7b5cf0;
  --brand-2:    #5b8def;
  --brand-deep: #6244d6;
  --brand-soft: #f4f1fe;
  --brand-line: #e3dcfc;

  /* ---- 文字层级 ---- */
  --ink:   #1f2430;
  --ink-2: #4a5265;
  --ink-3: #7b8496;
  --ink-4: #a8b0c0;

  /* ---- 背景与分隔 ---- */
  --bg:      #ffffff;
  --bg-soft: #f8f9fd;
  --bg-mute: #f1f3f9;
  --line:    #e8eaf0;

  /* ---- 四大族群色 ---- */
  --g-nt: #8b5cf6;  /* 分析家 */
  --g-nf: #10b981;  /* 外交家 */
  --g-sj: #3b82f6;  /* 守护者 */
  --g-sp: #f59e0b;  /* 探索者 */

  /* ---- 四维度色 ---- */
  --d-ei: #7b5cf0;
  --d-sn: #10b981;
  --d-tf: #f59e0b;
  --d-jp: #ec4899;

  /* ---- 圆角 ---- */
  --r-sm: 10px;
  --r:    16px;
  --r-lg: 24px;
  --r-xl: 32px;
  --r-pill: 999px;

  /* ---- 阴影 ---- */
  --sh-sm: 0 2px 8px rgba(31,36,48,.05);
  --sh:    0 6px 20px rgba(31,36,48,.07);
  --sh-lg: 0 18px 44px rgba(31,36,48,.13);
  --sh-brand: 0 12px 28px rgba(123,92,240,.32);

  --max-w: 1140px;

  /* 页面级强调色，结果页会按族群覆盖 */
  --accent: var(--brand);
  --accent-soft: var(--brand-soft);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: "HarmonyOS Sans SC", "PingFang SC", "Microsoft YaHei",
               -apple-system, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.75;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.wrap { width: 100%; max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }

/* ===========================================================
   1. 顶部导航
   =========================================================== */
.nav {
  height: 68px;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.82);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  position: sticky; top: 0; z-index: 50;
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }

.brand {
  display: flex; align-items: center; gap: 11px;
  font-size: 17px; font-weight: 700; letter-spacing: .01em;
  cursor: pointer; user-select: none;
}
.brand-mark {
  width: 26px; height: 26px; border-radius: 8px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 4px 10px rgba(123,92,240,.35);
  position: relative;
  transition: transform .35s cubic-bezier(.34,1.56,.64,1);
}
.brand-mark::after {
  content: ''; position: absolute; inset: 7px;
  background: #fff; border-radius: 3px;
}
.brand:hover .brand-mark { transform: rotate(-8deg) scale(1.08); }

.brand-en {
  font-size: 11px; color: var(--ink-4); letter-spacing: .16em;
  text-transform: uppercase; font-weight: 500; margin-left: 2px;
  align-self: center; padding-top: 2px;
}

.nav-links { display: flex; gap: 6px; font-size: 14px; }
.nav-links span {
  cursor: pointer; padding: 8px 16px; border-radius: var(--r-pill);
  color: var(--ink-2); font-weight: 500;
  transition: background .22s, color .22s, transform .22s;
}
.nav-links span:hover {
  color: var(--brand); background: var(--brand-soft);
  transform: translateY(-1px);
}

/* ===========================================================
   2. 通用区块
   =========================================================== */
.section { padding: 92px 0; }
.section-soft { background: var(--bg-soft); }

.eyebrow {
  font-size: 12px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--brand); margin-bottom: 16px; font-weight: 700;
  display: inline-flex; align-items: center; gap: 8px;
}
.eyebrow::before {
  content: ''; width: 20px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
}

h1 { font-size: 48px; line-height: 1.2; font-weight: 800; letter-spacing: -.022em; }
h2 { font-size: 31px; line-height: 1.3; font-weight: 800; letter-spacing: -.018em; }
h3 { font-size: 18px; font-weight: 700; line-height: 1.45; }
p.lead { font-size: 17px; color: var(--ink-2); line-height: 1.85; }

/* 结果页 / 首页网格内的强调色跟随族群 */
[data-g="nt"] { --accent: var(--g-nt); --accent-soft: #f4f0ff; }
[data-g="nf"] { --accent: var(--g-nf); --accent-soft: #eafaf3; }
[data-g="sj"] { --accent: var(--g-sj); --accent-soft: #ecf3ff; }
[data-g="sp"] { --accent: var(--g-sp); --accent-soft: #fff6e8; }

/* ===========================================================
   3. 按钮
   =========================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 50px; padding: 0 36px; font-size: 15px; font-weight: 600;
  border: none; cursor: pointer; font-family: inherit;
  border-radius: var(--r-pill); letter-spacing: .01em;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff; box-shadow: var(--sh-brand);
  position: relative; overflow: hidden;
  transition: transform .28s cubic-bezier(.34,1.56,.64,1), box-shadow .28s, filter .28s;
}
.btn::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--brand-2), var(--brand));
  opacity: 0; transition: opacity .3s; z-index: -1;
}
.btn:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 18px 36px rgba(123,92,240,.42); }
.btn:active { transform: translateY(-1px) scale(.99); }

.btn-ghost {
  background: #fff; color: var(--ink); border: 1.5px solid var(--line);
  box-shadow: var(--sh-sm);
}
.btn-ghost:hover {
  border-color: var(--brand-line); color: var(--brand);
  box-shadow: 0 10px 24px rgba(31,36,48,.1);
}
.btn-lg { height: 56px; padding: 0 46px; font-size: 16px; }
.btn[disabled] { opacity: .35; cursor: not-allowed; transform: none; }

/* ===========================================================
   4. 首屏
   =========================================================== */
.hero { padding: 104px 0 100px; position: relative; overflow: hidden; }

/* 背景光斑装饰 */
.hero-deco { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.hero-deco .blob {
  position: absolute; border-radius: 50%; filter: blur(64px); opacity: .5;
}
.hero-deco .b1 {
  width: 420px; height: 420px; top: -140px; right: -80px;
  background: radial-gradient(circle, #c9b8ff, #e8e2ff 70%);
  animation: drift1 18s ease-in-out infinite;
}
.hero-deco .b2 {
  width: 340px; height: 340px; bottom: -120px; left: -100px;
  background: radial-gradient(circle, #bcd6ff, #e4eeff 70%);
  animation: drift2 22s ease-in-out infinite;
}
.hero-deco .b3 {
  width: 220px; height: 220px; top: 40%; left: 46%;
  background: radial-gradient(circle, #ffd9ec, #fdeaf4 70%);
  animation: drift3 26s ease-in-out infinite;
}
@keyframes drift1 {
  0%,100% { transform: translate(0,0) scale(1); }
  50%     { transform: translate(-42px, 32px) scale(1.1); }
}
@keyframes drift2 {
  0%,100% { transform: translate(0,0) scale(1); }
  50%     { transform: translate(36px, -30px) scale(1.12); }
}
@keyframes drift3 {
  0%,100% { transform: translate(0,0) scale(1); opacity: .35; }
  50%     { transform: translate(-28px, -34px) scale(1.15); opacity: .6; }
}

.hero .wrap { position: relative; z-index: 1; }

/* 首屏内容错峰入场 */
.hero .wrap > * { animation: fadeUp .8s cubic-bezier(.16,1,.3,1) both; }
.hero .wrap > *:nth-child(1) { animation-delay: .05s; }
.hero .wrap > *:nth-child(2) { animation-delay: .13s; }
.hero .wrap > *:nth-child(3) { animation-delay: .21s; }
.hero .wrap > *:nth-child(4) { animation-delay: .30s; }
.hero .wrap > *:nth-child(5) { animation-delay: .39s; }

.hero h1 { max-width: 780px; }
.hero h1 .hl {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: var(--brand);
}
.hero .lead { max-width: 640px; margin-top: 26px; }
.hero-actions { margin-top: 46px; display: flex; gap: 16px; flex-wrap: wrap; }

.hero-meta { margin-top: 60px; display: flex; gap: 16px; flex-wrap: wrap; }
.hero-meta-item {
  background: rgba(255,255,255,.75);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 18px 26px; min-width: 132px;
  backdrop-filter: blur(8px);
  transition: transform .3s, box-shadow .3s, border-color .3s;
}
.hero-meta-item:hover {
  transform: translateY(-4px); box-shadow: var(--sh);
  border-color: var(--brand-line);
}
.hero-meta-item strong {
  display: block; font-size: 30px; font-weight: 800; letter-spacing: -.02em;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: var(--brand);
  line-height: 1.25;
}
.hero-meta-item span { font-size: 13px; color: var(--ink-3); }

/* ===========================================================
   5. 四维度网格
   =========================================================== */
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.grid-4 .cell {
  background: #fff; padding: 32px 26px;
  border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--sh-sm);
  position: relative; overflow: hidden;
  transition: transform .34s cubic-bezier(.34,1.56,.64,1), box-shadow .34s, border-color .34s;
}
.grid-4 .cell::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: var(--c, var(--brand));
  transform: scaleX(0); transform-origin: left;
  transition: transform .42s cubic-bezier(.16,1,.3,1);
}
.grid-4 .cell:hover::before { transform: scaleX(1); }
.grid-4 .cell:hover {
  transform: translateY(-8px);
  box-shadow: var(--sh-lg);
  border-color: transparent;
}
.grid-4 .cell:nth-child(1) { --c: var(--d-ei); }
.grid-4 .cell:nth-child(2) { --c: var(--d-sn); }
.grid-4 .cell:nth-child(3) { --c: var(--d-tf); }
.grid-4 .cell:nth-child(4) { --c: var(--d-jp); }

.grid-4 .cell .k {
  font-size: 23px; font-weight: 800; letter-spacing: .04em;
  color: var(--c, var(--brand)); line-height: 1.2;
}
.grid-4 .cell .n {
  font-size: 13px; color: var(--ink-3); margin-top: 4px; font-weight: 600;
}
.grid-4 .cell .d { font-size: 14px; color: var(--ink-2); margin-top: 16px; line-height: 1.8; }

/* ===========================================================
   6. 三步说明
   =========================================================== */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.steps .step {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 34px 30px; box-shadow: var(--sh-sm);
  transition: transform .34s cubic-bezier(.34,1.56,.64,1), box-shadow .34s, border-color .34s;
}
.steps .step:hover {
  transform: translateY(-8px); box-shadow: var(--sh-lg); border-color: var(--brand-line);
}
.step-num {
  width: 44px; height: 44px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 800; color: #fff; letter-spacing: .04em;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 8px 18px rgba(123,92,240,.28);
  margin-bottom: 18px;
  transition: transform .4s cubic-bezier(.34,1.56,.64,1);
}
.steps .step:hover .step-num { transform: rotate(-6deg) scale(1.08); }
.steps .step h3 { margin: 0 0 8px; }
.steps .step p { font-size: 14px; color: var(--ink-2); }

/* ===========================================================
   7. 十六型网格
   =========================================================== */
.grid-types { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }

.type-card {
  background: #fff; padding: 26px 22px; cursor: pointer;
  border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--sh-sm);
  position: relative; overflow: hidden;
  animation: fadeUp .6s cubic-bezier(.16,1,.3,1) both;
  transition: transform .34s cubic-bezier(.34,1.56,.64,1),
              box-shadow .34s, border-color .34s;
}
.type-card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: var(--g, var(--brand));
  transform: scaleY(0); transform-origin: top;
  transition: transform .42s cubic-bezier(.16,1,.3,1);
}
.type-card::after {
  content: ''; position: absolute; right: -40px; top: -40px;
  width: 110px; height: 110px; border-radius: 50%;
  background: var(--g, var(--brand)); opacity: .06;
  transition: transform .45s cubic-bezier(.34,1.56,.64,1), opacity .35s;
}
.type-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--sh-lg); border-color: transparent;
}
.type-card:hover::before { transform: scaleY(1); }
.type-card:hover::after { transform: scale(1.5); opacity: .11; }

.type-card.g-nt { --g: var(--g-nt); }
.type-card.g-nf { --g: var(--g-nf); }
.type-card.g-sj { --g: var(--g-sj); }
.type-card.g-sp { --g: var(--g-sp); }

.type-card .code {
  font-size: 21px; font-weight: 800; letter-spacing: .05em;
  color: var(--g, var(--brand)); line-height: 1.2;
}
.type-card .nm { font-size: 14px; color: var(--ink); margin-top: 6px; font-weight: 600; }
.type-card .tg { font-size: 12px; color: var(--ink-3); margin-top: 12px; line-height: 1.7; }

/* ===========================================================
   8. 测试页
   =========================================================== */
.quiz-head { padding: 48px 0 0; }
.progress-track {
  height: 10px; background: var(--bg-mute);
  border-radius: var(--r-pill); margin-top: 26px; overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(31,36,48,.06);
}
.progress-fill {
  height: 100%; width: 0%; border-radius: var(--r-pill);
  background: linear-gradient(90deg, var(--brand), var(--brand-2), #8b7cf6);
  background-size: 200% 100%;
  box-shadow: 0 0 14px rgba(123,92,240,.45);
  transition: width .5s cubic-bezier(.16,1,.3,1);
  animation: flow 3s linear infinite;
}
@keyframes flow {
  0%   { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}
.progress-text {
  display: flex; justify-content: space-between;
  font-size: 13px; color: var(--ink-3); margin-top: 12px; font-weight: 600;
}
#progressPct { color: var(--brand); font-variant-numeric: tabular-nums; }

.quiz-body { padding: 56px 0 120px; max-width: 780px; margin: 0 auto; }
.q-index {
  font-size: 12px; color: var(--brand); letter-spacing: .16em; font-weight: 700;
  text-transform: uppercase;
}
.q-text {
  font-size: 27px; font-weight: 800; line-height: 1.5;
  margin: 16px 0 42px; letter-spacing: -.012em;
  animation: fadeUp .5s cubic-bezier(.16,1,.3,1) both;
}
.options { display: flex; flex-direction: column; gap: 14px; }

.opt {
  display: flex; align-items: flex-start; gap: 16px; padding: 22px 24px;
  border: 2px solid var(--line); background: #fff; cursor: pointer;
  font-size: 16px; font-family: inherit; text-align: left; color: var(--ink);
  border-radius: var(--r); line-height: 1.65;
  box-shadow: var(--sh-sm);
  animation: fadeUp .5s cubic-bezier(.16,1,.3,1) both;
  transition: transform .28s cubic-bezier(.34,1.56,.64,1),
              border-color .24s, box-shadow .28s, background .24s;
}
.options .opt:nth-child(1) { animation-delay: .06s; }
.options .opt:nth-child(2) { animation-delay: .13s; }

.opt:hover {
  border-color: var(--brand-line); background: var(--brand-soft);
  transform: translateY(-3px); box-shadow: var(--sh);
}
.opt.sel {
  border-color: var(--brand); background: var(--brand-soft);
  box-shadow: 0 10px 26px rgba(123,92,240,.22);
  animation: popSel .42s cubic-bezier(.34,1.56,.64,1) both;
}
@keyframes popSel {
  0%   { transform: scale(1); }
  45%  { transform: scale(1.025); }
  100% { transform: scale(1); }
}

.opt-key {
  flex: none; width: 28px; height: 28px; border-radius: 9px;
  border: 2px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: var(--ink-3); margin-top: 1px;
  transition: all .26s cubic-bezier(.34,1.56,.64,1);
}
.opt:hover .opt-key { border-color: var(--brand); color: var(--brand); }
.opt.sel .opt-key {
  border-color: transparent; color: #fff; transform: rotate(-6deg) scale(1.06);
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 4px 10px rgba(123,92,240,.35);
}

.quiz-foot { margin-top: 40px; display: flex; justify-content: space-between; align-items: center; }
.link-back {
  font-size: 14px; color: var(--ink-2); cursor: pointer;
  background: none; border: none; font-family: inherit; font-weight: 600;
  padding: 8px 16px; border-radius: var(--r-pill);
  transition: background .22s, color .22s, transform .22s;
}
.link-back:hover { color: var(--brand); background: var(--brand-soft); transform: translateX(-3px); }

/* ===========================================================
   9. 结果页
   =========================================================== */
.result-hero {
  padding: 76px 0 64px; position: relative; overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, var(--accent-soft) 0%, #fff 100%);
}
.result-hero::before {
  content: ''; position: absolute; top: -180px; right: -100px;
  width: 460px; height: 460px; border-radius: 50%;
  background: radial-gradient(circle, var(--accent) 0%, transparent 68%);
  opacity: .16; animation: drift1 20s ease-in-out infinite;
}
.result-hero .wrap { position: relative; z-index: 1; }
.result-hero .eyebrow { color: var(--accent); }
.result-hero .eyebrow::before { background: var(--accent); }

.result-code {
  font-size: 92px; font-weight: 900; letter-spacing: .04em; line-height: 1;
  color: var(--accent);
  animation: popIn .7s cubic-bezier(.34,1.56,.64,1) both;
  text-shadow: 0 10px 32px rgba(31,36,48,.08);
}
@keyframes popIn {
  0%   { opacity: 0; transform: scale(.82) translateY(14px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}
.result-name {
  font-size: 29px; font-weight: 800; margin-top: 18px;
  animation: fadeUp .6s cubic-bezier(.16,1,.3,1) .1s both;
}
.result-tag {
  font-size: 17px; color: var(--ink-2); margin-top: 12px; max-width: 580px;
  animation: fadeUp .6s cubic-bezier(.16,1,.3,1) .18s both;
}
.result-desc { padding: 56px 0; max-width: 720px; font-size: 16px; color: var(--ink-2); line-height: 1.9; }

/* 维度条形图 */
.bars { display: flex; flex-direction: column; gap: 18px; margin-top: 8px; }
.bar-row {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r);
  padding: 20px 24px; box-shadow: var(--sh-sm);
  transition: transform .3s, box-shadow .3s, border-color .3s;
}
.bar-row:hover { transform: translateY(-4px); box-shadow: var(--sh); border-color: var(--brand-line); }
.bar-row .bar-top { display: flex; justify-content: space-between; align-items: center; font-size: 14px; margin-bottom: 9px; }
.bar-row .bar-top .lbl { font-weight: 700; color: var(--ink); }
.bar-row .bar-top .lbl.dim-off { color: var(--ink-4); font-weight: 500; }
.bar-row .bar-top .pct { color: var(--ink-3); font-variant-numeric: tabular-nums; font-weight: 700; font-size: 13px; }
.bar-track {
  height: 9px; background: var(--bg-mute); border-radius: var(--r-pill);
  position: relative; overflow: hidden;
}
.bar-fill {
  height: 100%; width: 0; border-radius: var(--r-pill);
  background: linear-gradient(90deg, var(--accent), var(--brand-2));
  box-shadow: 0 0 12px color-mix(in srgb, var(--accent) 40%, transparent);
  transition: width 1s cubic-bezier(.16,1,.3,1);
}
.bar-fill.muted { background: var(--ink-4); box-shadow: none; }

/* 两栏内容 */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.list-plain { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.list-plain li {
  padding: 15px 20px; font-size: 15px; color: var(--ink-2);
  display: flex; gap: 12px; align-items: flex-start;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: var(--sh-sm);
  transition: transform .28s cubic-bezier(.34,1.56,.64,1), box-shadow .28s, border-color .28s;
}
.list-plain li:hover {
  transform: translateX(5px); box-shadow: var(--sh); border-color: var(--brand-line);
}
.list-plain li::before {
  content: ''; flex: none; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); margin-top: 9px;
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.block-title {
  font-size: 12px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: 18px; font-weight: 700;
  display: flex; align-items: center; gap: 9px;
}
.block-title::before {
  content: ''; width: 16px; height: 2px; border-radius: 2px; background: var(--accent);
}
.prose p { font-size: 15px; color: var(--ink-2); line-height: 1.95; }
.prose p + p { margin-top: 14px; }

.result-actions { padding: 60px 0 100px; display: flex; gap: 16px; flex-wrap: wrap; }

/* ===========================================================
   10. 页脚
   =========================================================== */
.footer { border-top: 1px solid var(--line); padding: 42px 0; background: var(--bg-soft); }
.footer-inner {
  display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  font-size: 13px; color: var(--ink-3);
}
.footer a { color: var(--ink-3); text-decoration: none; transition: color .22s; }
.footer a:hover { color: var(--brand); }

/* ===========================================================
   11. 页面切换
   =========================================================== */
.page { display: none; }
.page.active { display: block; }

/* ===========================================================
   12. 动画
   =========================================================== */
.fade-in { animation: pageIn .5s cubic-bezier(.16,1,.3,1) both; }
@keyframes pageIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: none; }
}

/* 滚动入场：.reveal 由 JS 添加，脚本不执行时内容默认可见 */
.reveal { opacity: 0; transform: translateY(26px); }
.reveal.in { animation: fadeUp .75s cubic-bezier(.16,1,.3,1) both; }

/* ===========================================================
   13. 响应式
   =========================================================== */
@media (max-width: 1000px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-types { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: 1fr; gap: 20px; }
}

@media (max-width: 900px) {
  h1 { font-size: 34px; }
  h2 { font-size: 25px; }
  .hero { padding: 64px 0 56px; }
  .section { padding: 64px 0; }
  .result-code { font-size: 66px; }
  .q-text { font-size: 21px; }
  .nav-links { display: none; }
  .hero-meta { gap: 12px; }
  .hero-meta-item { padding: 14px 18px; min-width: 0; flex: 1 1 calc(50% - 6px); }
  .two-col { grid-template-columns: 1fr; gap: 36px; }
  .quiz-body { padding: 40px 0 90px; }
  .opt { padding: 18px 18px; font-size: 15px; }
}

@media (max-width: 640px) {
  .grid-4, .grid-types { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .grid-4 .cell { padding: 24px 18px; border-radius: var(--r); }
  .grid-4 .cell .k { font-size: 19px; }
  .grid-4 .cell .d { font-size: 13px; margin-top: 12px; }
  .type-card { padding: 20px 16px; border-radius: var(--r); }
  .type-card .code { font-size: 18px; }
  .type-card .tg { display: none; }
  .hero-deco .blob { filter: blur(48px); }
  .result-code { font-size: 52px; }
  .result-name { font-size: 23px; }
  .btn-lg { height: 52px; padding: 0 34px; }
  .wrap { padding: 0 18px; }
}

/* ===========================================================
   14. 无障碍：尊重「减少动效」偏好
   =========================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
