/* =====================================================================
   天赋罗盘 Talent Compass · Design System
   Light-first, dual theme, fluid type scale, motion-safe
   ===================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  /* Brand ramp */
  --brand-50:  #f3efff;
  --brand-100: #e7ddff;
  --brand-200: #d0bcff;
  --brand-300: #b394ff;
  --brand-400: #9265ff;
  --brand-500: #7642f5;
  --brand-600: #6227e0;
  --brand-700: #4f1bb8;
  --brand-800: #3d1691;
  --brand-900: #2c0f68;

  --coral: #ff6b57;
  --amber: #ffb020;
  --mint:  #16b8a6;
  --sky:   #2b8aff;
  --rose:  #e5477a;

  --grad-brand: linear-gradient(135deg, #9265ff 0%, #6227e0 46%, #4f1bb8 100%);
  --grad-warm:  linear-gradient(135deg, #ffb020 0%, #ff6b57 100%);
  --grad-cool:  linear-gradient(135deg, #16b8a6 0%, #2b8aff 100%);
  --grad-rose:  linear-gradient(135deg, #ff7a9c 0%, #e5477a 100%);
  --grad-page:  linear-gradient(180deg, #faf8ff 0%, #f4f1ff 40%, #eef4ff 100%);

  /* Surfaces */
  --bg:            #fbfaff;
  --bg-elev:       #ffffff;
  --surface:       rgba(255,255,255,.72);
  --surface-solid: #ffffff;
  --surface-alt:   #f6f3ff;
  --hairline:      rgba(20, 12, 45, .09);
  --hairline-strong: rgba(20, 12, 45, .16);

  /* Ink */
  --ink:        #150e33;
  --ink-2:      #443a68;
  --ink-3:      #6b6191;
  --ink-4:      #948cae;
  --ink-invert: #ffffff;

  /* Elevation */
  --sh-xs: 0 1px 2px rgba(28,18,66,.06);
  --sh-sm: 0 2px 8px rgba(28,18,66,.07), 0 1px 2px rgba(28,18,66,.05);
  --sh-md: 0 8px 24px rgba(28,18,66,.09), 0 2px 6px rgba(28,18,66,.05);
  --sh-lg: 0 20px 48px rgba(28,18,66,.13), 0 6px 14px rgba(28,18,66,.06);
  --sh-xl: 0 36px 80px rgba(28,18,66,.17), 0 10px 24px rgba(28,18,66,.07);
  --ring: 0 0 0 3px rgba(118,66,245,.22);

  /* Geometry */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 30px;
  --r-full: 999px;

  /* Fluid type */
  --fs-xs:  clamp(.72rem, .1vw + .7rem, .78rem);
  --fs-sm:  clamp(.82rem, .14vw + .8rem, .9rem);
  --fs-base:clamp(.94rem, .2vw + .9rem, 1rem);
  --fs-md:  clamp(1.02rem, .3vw + .96rem, 1.14rem);
  --fs-lg:  clamp(1.18rem, .5vw + 1.06rem, 1.4rem);
  --fs-xl:  clamp(1.45rem, 1vw + 1.2rem, 1.9rem);
  --fs-2xl: clamp(1.85rem, 2vw + 1.35rem, 2.7rem);
  --fs-3xl: clamp(2.3rem, 3.4vw + 1.4rem, 3.9rem);
  --fs-4xl: clamp(2.8rem, 5vw + 1.4rem, 5.2rem);

  /* Motion */
  --ease-out:  cubic-bezier(.22,.68,.32,1);
  --ease-back: cubic-bezier(.34,1.56,.64,1);
  --ease-io:   cubic-bezier(.65,.05,.36,1);
  --t-fast: 140ms;
  --t:      240ms;
  --t-slow: 420ms;

  --shell: 1160px;
  --shell-narrow: 780px;
  --pad: clamp(16px, 4vw, 40px);
}

/* ---------- Dark theme ---------- */
[data-theme="dark"] {
  --bg:            #0b081a;
  --bg-elev:       #141033;
  --surface:       rgba(30,25,64,.66);
  --surface-solid: #181339;
  --surface-alt:   #1d1747;
  --hairline:      rgba(190,180,255,.13);
  --hairline-strong: rgba(190,180,255,.24);

  --ink:        #f4f1ff;
  --ink-2:      #cfc7f2;
  --ink-3:      #a49ccd;
  --ink-4:      #7f78a8;

  --grad-page: linear-gradient(180deg, #0c0820 0%, #110c2c 45%, #0d1030 100%);

  --sh-xs: 0 1px 2px rgba(0,0,0,.3);
  --sh-sm: 0 2px 10px rgba(0,0,0,.38);
  --sh-md: 0 10px 28px rgba(0,0,0,.46);
  --sh-lg: 0 22px 52px rgba(0,0,0,.55);
  --sh-xl: 0 38px 88px rgba(0,0,0,.62);
  --ring: 0 0 0 3px rgba(146,101,255,.34);
}

/* ---------- 2. Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

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

body {
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font-family: "PingFang SC", "Hiragino Sans GB", -apple-system, BlinkMacSystemFont,
               "Segoe UI", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  font-size: var(--fs-base);
  line-height: 1.72;
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background var(--t) var(--ease-io), color var(--t) var(--ease-io);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background: var(--grad-page);
}
body::after {
  content: "";
  position: fixed;
  inset: -20% -10% auto -10%;
  height: 90vh;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(38% 44% at 14% 12%, rgba(146,101,255,.20), transparent 62%),
    radial-gradient(34% 40% at 86% 6%,  rgba(43,138,255,.16), transparent 60%),
    radial-gradient(40% 46% at 68% 42%, rgba(255,107,87,.11), transparent 64%);
  filter: blur(12px);
  animation: auroraDrift 24s var(--ease-io) infinite alternate;
}
[data-theme="dark"] body::after { opacity: .78; }

@keyframes auroraDrift {
  0%   { transform: translate3d(0,0,0) scale(1); }
  50%  { transform: translate3d(-2%, 2%, 0) scale(1.06); }
  100% { transform: translate3d(2%, -1%, 0) scale(1.02); }
}

img, svg, canvas { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

:focus-visible {
  outline: 2px solid var(--brand-500);
  outline-offset: 3px;
  border-radius: 6px;
}

::selection { background: rgba(146,101,255,.28); color: var(--ink); }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--hairline-strong);
  border: 3px solid transparent;
  border-radius: var(--r-full);
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background: var(--ink-4); background-clip: content-box; }

/* ---------- 3. Utilities ---------- */
.shell { width: 100%; max-width: var(--shell); margin-inline: auto; padding-inline: var(--pad); }
.shell--narrow { max-width: var(--shell-narrow); }
.stack > * + * { margin-top: var(--gap, 1rem); }
.center { text-align: center; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; top: -100px; left: 16px; z-index: 200;
  background: var(--brand-600); color: #fff; padding: 10px 18px;
  border-radius: var(--r-sm); transition: top var(--t) var(--ease-out);
}
.skip-link:focus { top: 12px; }

.grad-text {
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
[data-theme="dark"] .grad-text {
  background: linear-gradient(135deg, #c4aaff 0%, #9b7bff 50%, #7fd4ff 100%);
  -webkit-background-clip: text; background-clip: text;
}

/* ---------- 4. Typography ---------- */
h1, h2, h3, h4 { line-height: 1.24; letter-spacing: -.01em; font-weight: 800; }
.h-hero { font-size: var(--fs-4xl); line-height: 1.08; letter-spacing: -.03em; }
.h-1 { font-size: var(--fs-3xl); }
.h-2 { font-size: var(--fs-2xl); }
.h-3 { font-size: var(--fs-xl); }
.h-4 { font-size: var(--fs-lg); }

.lead {
  font-size: var(--fs-md);
  color: var(--ink-2);
  line-height: 1.8;
  max-width: 62ch;
}
.lead.center { margin-inline: auto; }
.muted { color: var(--ink-3); }
.micro { font-size: var(--fs-xs); letter-spacing: .1em; text-transform: uppercase; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--brand-600);
}
[data-theme="dark"] .eyebrow { color: var(--brand-300); }
.eyebrow::before {
  content: ""; width: 22px; height: 2px; border-radius: 2px;
  background: var(--grad-brand);
}

/* ---------- 5. Surfaces ---------- */
.card {
  background: var(--surface);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-md);
  transition: transform var(--t) var(--ease-out), box-shadow var(--t) var(--ease-out), border-color var(--t);
}
.card--solid { background: var(--bg-elev); backdrop-filter: none; -webkit-backdrop-filter: none; }
.card--pad { padding: clamp(18px, 3vw, 30px); }
.card--hover:hover { transform: translateY(-4px); box-shadow: var(--sh-lg); border-color: var(--hairline-strong); }

.divider { height: 1px; background: var(--hairline); border: 0; }

/* ---------- 6. Buttons ---------- */
.btn {
  --btn-py: 15px;
  --btn-px: 30px;
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: var(--btn-py) var(--btn-px);
  border-radius: var(--r-full);
  font-size: var(--fs-md);
  font-weight: 700;
  letter-spacing: .02em;
  white-space: nowrap;
  isolation: isolate;
  overflow: hidden;
  transition: transform var(--t) var(--ease-back), box-shadow var(--t) var(--ease-out), opacity var(--t);
}
.btn:active { transform: scale(.97); }
.btn[disabled] { opacity: .45; pointer-events: none; }

.btn--primary {
  background: var(--grad-brand);
  color: #fff;
  box-shadow: 0 10px 28px rgba(98,39,224,.32), inset 0 1px 0 rgba(255,255,255,.22);
}
.btn--primary::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(135deg, #a67cff 0%, #7a3cff 60%, #ff6b57 130%);
  opacity: 0; transition: opacity var(--t) var(--ease-io);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 16px 38px rgba(98,39,224,.4); }
.btn--primary:hover::after { opacity: 1; }

.btn--ghost {
  background: var(--surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1.5px solid var(--hairline-strong);
  color: var(--ink);
}
.btn--ghost:hover { border-color: var(--brand-400); color: var(--brand-600); transform: translateY(-2px); }
[data-theme="dark"] .btn--ghost:hover { color: var(--brand-300); }

.btn--sm { --btn-py: 10px; --btn-px: 20px; font-size: var(--fs-sm); }
.btn--lg { --btn-py: 19px; --btn-px: 42px; font-size: var(--fs-lg); }
.btn--block { width: 100%; }

/* Ripple pulse on hero CTA */
.pulse::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  border: 2px solid rgba(146,101,255,.55);
  animation: pulseRing 2.6s var(--ease-out) infinite;
  pointer-events: none;
}
@keyframes pulseRing {
  0%   { transform: scale(1);    opacity: .7; }
  70%  { transform: scale(1.14); opacity: 0; }
  100% { transform: scale(1.14); opacity: 0; }
}

.icon-btn {
  display: grid; place-items: center;
  width: 42px; height: 42px;
  border-radius: var(--r-full);
  border: 1px solid var(--hairline);
  background: var(--surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--ink-2);
  font-size: 1.05rem;
  transition: transform var(--t) var(--ease-back), color var(--t), border-color var(--t);
}
.icon-btn:hover { transform: rotate(-12deg) scale(1.06); color: var(--brand-600); border-color: var(--brand-300); }

/* ---------- 7. Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t), background var(--t), box-shadow var(--t);
}
.nav.is-scrolled {
  border-bottom-color: var(--hairline);
  box-shadow: var(--sh-sm);
}
.nav__inner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  height: 68px;
}
.brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 800; letter-spacing: -.02em; }
.brand__mark {
  display: grid; place-items: center;
  width: 38px; height: 38px; border-radius: 12px;
  background: var(--grad-brand);
  color: #fff; font-size: 1.05rem;
  box-shadow: 0 6px 16px rgba(98,39,224,.34);
  transition: transform var(--t-slow) var(--ease-back);
}
.brand:hover .brand__mark { transform: rotate(-10deg) scale(1.08); }
.brand__text small {
  display: block; font-size: .62rem; letter-spacing: .22em;
  color: var(--ink-4); font-weight: 700; line-height: 1; margin-top: 2px;
}
.nav__links { display: flex; align-items: center; gap: 4px; }
.nav__link {
  padding: 8px 14px; border-radius: var(--r-full);
  font-size: var(--fs-sm); font-weight: 600; color: var(--ink-2);
  transition: background var(--t), color var(--t);
}
.nav__link:hover, .nav__link.is-active { background: var(--surface-alt); color: var(--brand-600); }
[data-theme="dark"] .nav__link:hover, [data-theme="dark"] .nav__link.is-active { color: var(--brand-300); }
.nav__tools { display: flex; align-items: center; gap: 8px; }

/* ---------- 8. Hero ---------- */
.hero { padding: clamp(48px, 8vw, 104px) 0 clamp(36px, 5vw, 64px); }
.hero__grid {
  display: grid; gap: clamp(28px, 5vw, 56px);
  align-items: center;
}
@media (min-width: 940px) { .hero__grid { grid-template-columns: 1.08fr .92fr; } }

.hero__badge {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 7px 8px 7px 12px; border-radius: var(--r-full);
  background: var(--surface); border: 1px solid var(--hairline);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  font-size: var(--fs-sm); font-weight: 600; color: var(--ink-2);
  box-shadow: var(--sh-xs);
}
.hero__badge b {
  padding: 3px 10px; border-radius: var(--r-full);
  background: var(--grad-warm); color: #fff; font-size: var(--fs-xs); letter-spacing: .04em;
}

.hero__title { margin: 22px 0 0; }
.hero__title em {
  font-style: normal;
  position: relative;
  background: linear-gradient(120deg, #9265ff, #ff6b57 55%, #ffb020);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }

.hero__meta {
  display: flex; flex-wrap: wrap; gap: 20px 26px; margin-top: 30px;
  padding-top: 24px; border-top: 1px dashed var(--hairline);
}
.hero__meta div { display: flex; align-items: center; gap: 9px; font-size: var(--fs-sm); color: var(--ink-3); }
.hero__meta svg { flex: none; color: var(--brand-500); }

/* Floating preview card */
.preview {
  position: relative;
  padding: 24px;
  border-radius: var(--r-xl);
  background: var(--surface);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid var(--hairline);
  box-shadow: var(--sh-xl);
  animation: floatY 7s var(--ease-io) infinite alternate;
}
@keyframes floatY {
  from { transform: translateY(-8px); }
  to   { transform: translateY(8px); }
}
.preview__head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px; font-size: var(--fs-sm);
}
.chip-dots { display: flex; gap: 5px; }
.chip-dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--hairline-strong); }
.chip-dots i:first-child { background: var(--coral); }
.chip-dots i:nth-child(2) { background: var(--amber); }
.chip-dots i:nth-child(3) { background: var(--mint); }

.mini-bar {
  display: grid; grid-template-columns: 1fr auto; gap: 4px 12px;
  align-items: center; padding: 8px 0;
}
.mini-bar__track {
  grid-column: 1 / -1;
  height: 7px; border-radius: var(--r-full);
  background: var(--surface-alt); overflow: hidden;
}
.mini-bar__fill {
  height: 100%; border-radius: var(--r-full);
  background: var(--grad-brand);
  width: var(--w, 0%);
  transition: width 1.1s var(--ease-out);
}
.mini-bar span { font-size: var(--fs-xs); color: var(--ink-3); }
.mini-bar b { font-size: var(--fs-xs); color: var(--ink-2); font-variant-numeric: tabular-nums; }

/* ---------- 9. Section ---------- */
.section { padding: clamp(48px, 7vw, 96px) 0; }
.section__head { max-width: 660px; margin-bottom: clamp(28px, 4vw, 46px); }
.section__head.center { margin-inline: auto; text-align: center; }
.section__head .h-2 { margin-top: 14px; }
.section__head .lead { margin-top: 16px; }

/* ---------- 10. Dimension grid ---------- */
.dim-grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
}
.dim-card {
  position: relative;
  padding: 22px 20px;
  border-radius: var(--r-lg);
  background: var(--surface-solid);
  border: 1px solid var(--hairline);
  overflow: hidden;
  transition: transform var(--t-slow) var(--ease-back), box-shadow var(--t-slow), border-color var(--t);
}
.dim-card::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(120% 100% at 0% 0%, var(--glow, rgba(146,101,255,.12)), transparent 62%);
  opacity: 0; transition: opacity var(--t-slow);
}
.dim-card:hover { transform: translateY(-6px); box-shadow: var(--sh-lg); border-color: transparent; }
.dim-card:hover::before { opacity: 1; }
.dim-card__icon {
  position: relative;
  display: grid; place-items: center;
  width: 48px; height: 48px; border-radius: 14px;
  font-size: 1.5rem; margin-bottom: 14px;
  background: color-mix(in srgb, var(--dc) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--dc) 26%, transparent);
  transition: transform var(--t-slow) var(--ease-back);
}
.dim-card:hover .dim-card__icon { transform: scale(1.1) rotate(-6deg); }
.dim-card h4 { position: relative; font-size: var(--fs-md); }
.dim-card p { position: relative; font-size: var(--fs-sm); color: var(--ink-3); margin-top: 6px; line-height: 1.65; }

/* ---------- 11. Steps ---------- */
.steps { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); counter-reset: s; }
.step {
  position: relative; padding: 22px 20px 20px;
  border-radius: var(--r-lg);
  background: var(--surface-solid);
  border: 1px solid var(--hairline);
  box-shadow: var(--sh-xs);
}
.step::before {
  counter-increment: s; content: counter(s, decimal-leading-zero);
  display: block;
  font-size: 2rem; font-weight: 800; line-height: 1;
  background: var(--grad-brand);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  opacity: .55; margin-bottom: 10px;
  font-family: "SF Mono", "Cascadia Code", Consolas, monospace;
}
.step h4 { font-size: var(--fs-md); }
.step p { font-size: var(--fs-sm); color: var(--ink-3); margin-top: 6px; }

/* ---------- 12. Test stage ---------- */
.stage {
  min-height: calc(100dvh - 68px);
  display: flex; align-items: center;
  padding: clamp(20px, 4vw, 40px) 0 clamp(40px, 6vw, 64px);
}

.progress-wrap { max-width: 660px; margin: 0 auto clamp(20px, 3vw, 30px); }
.progress__top {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  margin-bottom: 11px; font-size: var(--fs-sm);
}
.progress__count { font-weight: 800; font-size: var(--fs-md); }
.progress__count small { font-weight: 600; color: var(--ink-4); }
.progress__track {
  position: relative; height: 8px; border-radius: var(--r-full);
  background: var(--surface-alt);
  border: 1px solid var(--hairline);
  overflow: hidden;
}
.progress__fill {
  height: 100%; border-radius: var(--r-full);
  background: var(--grad-brand);
  width: 0%;
  box-shadow: 0 0 14px rgba(146,101,255,.55);
  transition: width 620ms var(--ease-out);
}
.progress__ghost {
  position: absolute; top: 0; left: 0; height: 100%; border-radius: var(--r-full);
  background: rgba(146,101,255,.22);
  transition: width 700ms var(--ease-out) 80ms;
}
.progress__ticks {
  position: absolute; inset: 0;
  display: flex; justify-content: space-between; pointer-events: none;
}
.progress__ticks i {
  width: 2px; height: 100%;
  background: color-mix(in srgb, var(--bg) 70%, transparent);
}
.progress__hint {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 10px; font-size: var(--fs-xs); color: var(--ink-4);
}

.q-card {
  position: relative;
  max-width: 660px; margin-inline: auto;
  padding: clamp(24px, 4.5vw, 44px);
  border-radius: var(--r-xl);
  background: var(--surface-solid);
  border: 1px solid var(--hairline);
  box-shadow: var(--sh-lg);
  overflow: hidden;
}
.q-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--grad-brand);
}
.q-card__dim {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: var(--r-full);
  background: color-mix(in srgb, var(--dc, var(--brand-500)) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--dc, var(--brand-500)) 24%, transparent);
  color: var(--ink-2);
  font-size: var(--fs-xs); font-weight: 700; letter-spacing: .04em;
}
.q-card__text {
  margin-top: 20px;
  font-size: clamp(1.22rem, 2.4vw, 1.72rem);
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: -.015em;
}
.q-card__sub { margin-top: 12px; font-size: var(--fs-sm); color: var(--ink-4); }

.options { margin-top: clamp(22px, 3.5vw, 34px); display: grid; gap: 10px; }
.option {
  position: relative;
  display: flex; align-items: center; gap: 14px;
  width: 100%;
  padding: 15px 18px;
  border-radius: var(--r-md);
  border: 1.5px solid var(--hairline);
  background: var(--bg);
  text-align: left;
  overflow: hidden;
  transition: transform 200ms var(--ease-back), border-color 200ms, box-shadow 200ms, background 200ms;
}
.option::before {
  content: ""; position: absolute; inset: 0;
  background: var(--grad-brand);
  opacity: 0;
  transform: scaleX(.2); transform-origin: left;
  transition: opacity 240ms var(--ease-out), transform 340ms var(--ease-out);
  z-index: 0;
}
.option:hover { transform: translateX(5px); border-color: var(--brand-300); box-shadow: var(--sh-sm); }
.option:active { transform: scale(.985); }
.option.is-picked { border-color: var(--brand-500); color: #fff; }
.option.is-picked::before { opacity: 1; transform: scaleX(1); }
.option.is-picked:hover { transform: translateX(0) scale(1.015); }

.option__key {
  position: relative; z-index: 1;
  flex: none;
  display: grid; place-items: center;
  width: 32px; height: 32px; border-radius: 10px;
  background: var(--surface-alt);
  border: 1px solid var(--hairline);
  font-size: var(--fs-sm); font-weight: 800;
  font-variant-numeric: tabular-nums;
  transition: background 200ms, color 200ms, border-color 200ms, transform 300ms var(--ease-back);
}
.option:hover .option__key { background: var(--brand-100); border-color: var(--brand-300); color: var(--brand-700); }
[data-theme="dark"] .option:hover .option__key { background: var(--brand-800); color: var(--brand-200); }
.option.is-picked .option__key { background: rgba(255,255,255,.22); border-color: rgba(255,255,255,.4); color: #fff; transform: scale(1.1) rotate(-6deg); }
.option__label { position: relative; z-index: 1; font-size: var(--fs-md); font-weight: 600; }
.option__tick {
  position: relative; z-index: 1; margin-left: auto;
  opacity: 0; transform: scale(.4) rotate(-30deg);
  transition: opacity 220ms var(--ease-out) 60ms, transform 320ms var(--ease-back) 60ms;
  color: #fff;
}
.option.is-picked .option__tick { opacity: 1; transform: scale(1) rotate(0); }

.q-nav {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  max-width: 660px; margin: 18px auto 0;
}
.kbd-hint {
  display: none; gap: 14px; font-size: var(--fs-xs); color: var(--ink-4);
}
@media (min-width: 720px) { .kbd-hint { display: flex; } }
.kbd {
  display: inline-block; padding: 1px 6px; margin-right: 4px;
  border-radius: 5px; border: 1px solid var(--hairline-strong);
  background: var(--surface-alt);
  font-family: "SF Mono", "Cascadia Code", Consolas, monospace;
  font-size: .68rem; color: var(--ink-3);
}

/* Milestone reveal */
.milestone {
  max-width: 660px; margin: 0 auto 18px;
  padding: 18px 20px;
  border-radius: var(--r-lg);
  border: 1px dashed var(--brand-300);
  background: color-mix(in srgb, var(--brand-500) 7%, var(--bg-elev));
  animation: popIn 520ms var(--ease-back) both;
}
.milestone h5 { font-size: var(--fs-sm); color: var(--brand-600); letter-spacing: .06em; }
[data-theme="dark"] .milestone h5 { color: var(--brand-300); }
.milestone p { font-size: var(--fs-sm); color: var(--ink-2); margin-top: 5px; }
@keyframes popIn {
  from { opacity: 0; transform: translateY(14px) scale(.96); }
  to   { opacity: 1; transform: none; }
}

/* Card enter animation */
.enter-next  { animation: slideInNext  420ms var(--ease-out) both; }
.enter-prev  { animation: slideInPrev  420ms var(--ease-out) both; }
@keyframes slideInNext {
  from { opacity: 0; transform: translateX(34px) scale(.985); }
  to   { opacity: 1; transform: none; }
}
@keyframes slideInPrev {
  from { opacity: 0; transform: translateX(-34px) scale(.985); }
  to   { opacity: 1; transform: none; }
}

/* ---------- 13. Loading / result ---------- */
.loading { text-align: center; padding: clamp(40px, 8vw, 90px) 0; }
.loader-ring {
  width: 74px; height: 74px; margin: 0 auto 26px;
  border-radius: 50%;
  border: 4px solid var(--surface-alt);
  border-top-color: var(--brand-500);
  border-right-color: var(--coral);
  animation: spin 900ms linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading__step {
  font-size: var(--fs-md); font-weight: 700; color: var(--ink-2);
  min-height: 1.6em;
}
.loading__bar {
  max-width: 320px; height: 6px; margin: 18px auto 0;
  border-radius: var(--r-full); background: var(--surface-alt); overflow: hidden;
}
.loading__bar i {
  display: block; height: 100%; width: 0%;
  border-radius: var(--r-full); background: var(--grad-brand);
  transition: width 380ms var(--ease-out);
}

/* Result sections */
.result-hero {
  padding: clamp(28px, 5vw, 52px) 0 0;
  text-align: center;
}
.result-type {
  display: inline-block;
  font-size: clamp(1.7rem, 4.4vw, 3rem);
  font-weight: 900; letter-spacing: -.03em;
  background: var(--grad-brand);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  margin-top: 10px;
}
.result-tagline { font-size: var(--fs-lg); color: var(--ink-2); margin-top: 8px; font-weight: 600; }

.stat-grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr));
  margin-top: clamp(24px, 4vw, 36px);
}
.stat {
  padding: 18px 16px; border-radius: var(--r-md);
  background: var(--surface-solid);
  border: 1px solid var(--hairline);
  box-shadow: var(--sh-xs);
  text-align: center;
}
.stat b {
  display: block; font-size: var(--fs-xl); font-weight: 800;
  font-variant-numeric: tabular-nums;
  background: var(--grad-brand);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat span { display: block; font-size: var(--fs-xs); color: var(--ink-3); margin-top: 2px; }

.radar-wrap {
  display: grid; gap: clamp(20px, 4vw, 34px);
  align-items: center;
}
@media (min-width: 860px) { .radar-wrap { grid-template-columns: 1fr 1fr; } }
.radar-box {
  position: relative;
  padding: 12px;
  border-radius: var(--r-xl);
  background: radial-gradient(70% 70% at 50% 40%, color-mix(in srgb, var(--brand-500) 8%, transparent), transparent 70%);
}
.radar-box svg { width: 100%; height: auto; overflow: visible; }
.radar-label { font-size: 11px; fill: var(--ink-3); font-weight: 600; }
.radar-value { font-size: 10px; fill: var(--ink-4); font-weight: 700; font-variant-numeric: tabular-nums; }
.radar-web { stroke: var(--hairline-strong); fill: none; }
.radar-spoke { stroke: var(--hairline); }
.radar-shape {
  transition: opacity var(--t-slow);
}

.legend-scale {
  display: flex; align-items: center; gap: 10px;
  margin-top: 10px; font-size: var(--fs-xs); color: var(--ink-4);
}
.legend-scale i {
  flex: 1; height: 6px; border-radius: var(--r-full);
  background: linear-gradient(90deg, var(--brand-200), var(--brand-500), var(--coral));
}

.dim-bars { display: grid; gap: 11px; }
.dim-bar { display: grid; grid-template-columns: 1fr; gap: 5px; }
.dim-bar__head {
  display: flex; align-items: center; gap: 9px;
  font-size: var(--fs-sm);
}
.dim-bar__head em {
  font-style: normal; width: 20px; text-align: center; font-size: 1rem;
}
.dim-bar__head span { font-weight: 600; }
.dim-bar__head b {
  margin-left: auto; font-variant-numeric: tabular-nums; font-size: var(--fs-sm);
  color: var(--ink-2);
}
.dim-bar__track {
  height: 8px; border-radius: var(--r-full);
  background: var(--surface-alt);
  border: 1px solid var(--hairline);
  overflow: hidden;
}
.dim-bar__fill {
  height: 100%; width: 0%; border-radius: var(--r-full);
  transition: width 1s var(--ease-out);
}
.dim-bar.is-top .dim-bar__head { font-weight: 800; }
.dim-bar.is-top .dim-bar__head span { color: var(--brand-600); }
[data-theme="dark"] .dim-bar.is-top .dim-bar__head span { color: var(--brand-300); }

.pill-row { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 13px; border-radius: var(--r-full);
  font-size: var(--fs-sm); font-weight: 600;
  background: var(--surface-alt);
  border: 1px solid var(--hairline);
  color: var(--ink-2);
}
.pill--brand { background: color-mix(in srgb, var(--brand-500) 12%, transparent); border-color: color-mix(in srgb, var(--brand-500) 26%, transparent); }
.pill--warn  { background: color-mix(in srgb, var(--amber) 14%, transparent); border-color: color-mix(in srgb, var(--amber) 30%, transparent); }

.holland-row { display: flex; flex-wrap: wrap; gap: 10px; }
.holland {
  flex: 1 1 130px;
  padding: 14px 16px; border-radius: var(--r-md);
  background: var(--surface-solid); border: 1px solid var(--hairline);
}
.holland b { display: block; font-size: var(--fs-lg); color: var(--brand-600); }
[data-theme="dark"] .holland b { color: var(--brand-300); }
.holland span { display: block; font-size: var(--fs-xs); color: var(--ink-3); line-height: 1.5; }

/* Career cards */
.career-list { display: grid; gap: 14px; }
.career {
  display: grid; gap: 14px;
  padding: 20px;
  border-radius: var(--r-lg);
  background: var(--surface-solid);
  border: 1px solid var(--hairline);
  transition: transform var(--t) var(--ease-out), box-shadow var(--t), border-color var(--t);
}
.career:hover { transform: translateY(-3px); box-shadow: var(--sh-md); border-color: var(--hairline-strong); }
@media (min-width: 700px) { .career { grid-template-columns: 74px 1fr auto; } }

.career__score {
  display: grid; place-items: center; align-content: center;
  width: 74px; height: 74px; border-radius: 18px;
  background: var(--grad-brand); color: #fff;
  box-shadow: 0 8px 20px rgba(98,39,224,.28);
  font-variant-numeric: tabular-nums;
}
.career__score b { font-size: 1.4rem; font-weight: 800; line-height: 1; }
.career__score small { font-size: .62rem; opacity: .85; letter-spacing: .08em; }
.career__body h4 { font-size: var(--fs-md); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.career__code {
  padding: 2px 9px; border-radius: var(--r-full);
  background: var(--surface-alt); border: 1px solid var(--hairline);
  font-size: var(--fs-xs); font-weight: 800; color: var(--ink-3); letter-spacing: .08em;
  font-family: "SF Mono", "Cascadia Code", Consolas, monospace;
}
.career__body p { font-size: var(--fs-sm); color: var(--ink-3); margin-top: 6px; }
.career__facts {
  display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 10px;
  font-size: var(--fs-xs); color: var(--ink-3);
}
.career__facts b { color: var(--ink-2); font-weight: 700; }
.career__meta {
  display: grid; gap: 8px; align-content: center;
  min-width: 150px;
}
@media (min-width: 700px) { .career__meta { text-align: right; justify-items: end; } }
.fact-pill {
  padding: 7px 12px; border-radius: var(--r-sm);
  background: var(--surface-alt); border: 1px solid var(--hairline);
  font-size: var(--fs-xs); color: var(--ink-2);
}
.fact-pill b { color: var(--ink); }

.career__reveal {
  grid-column: 1 / -1;
  display: none;
  padding-top: 14px; margin-top: 4px;
  border-top: 1px dashed var(--hairline);
}
.career.is-open .career__reveal { display: block; animation: popIn 320ms var(--ease-out) both; }
.career__reveal dl { display: grid; gap: 10px; }
.career__reveal dt { font-size: var(--fs-xs); font-weight: 800; color: var(--brand-600); letter-spacing: .08em; }
[data-theme="dark"] .career__reveal dt { color: var(--brand-300); }
.career__reveal dd { font-size: var(--fs-sm); color: var(--ink-2); margin-top: 2px; }
.career__toggle {
  margin-top: 12px;
  font-size: var(--fs-sm); font-weight: 700; color: var(--brand-600);
  display: inline-flex; align-items: center; gap: 6px;
}
[data-theme="dark"] .career__toggle { color: var(--brand-300); }
.career__toggle svg { transition: transform var(--t) var(--ease-out); }
.career.is-open .career__toggle svg { transform: rotate(180deg); }

/* Timeline / action plan */
.plan { display: grid; gap: 14px; }
.plan-step {
  position: relative;
  padding: 18px 20px 18px 56px;
  border-radius: var(--r-md);
  background: var(--surface-solid);
  border: 1px solid var(--hairline);
}
.plan-step > i {
  position: absolute; left: 18px; top: 18px;
  display: grid; place-items: center;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--grad-brand); color: #fff;
  font-size: .7rem; font-weight: 800; font-style: normal;
}
.plan-step h5 { font-size: var(--fs-sm); color: var(--brand-600); letter-spacing: .06em; }
[data-theme="dark"] .plan-step h5 { color: var(--brand-300); }
.plan-step p { font-size: var(--fs-sm); color: var(--ink-2); margin-top: 4px; }

.callout {
  padding: 18px 20px; border-radius: var(--r-md);
  background: color-mix(in srgb, var(--amber) 10%, var(--bg-elev));
  border: 1px solid color-mix(in srgb, var(--amber) 26%, transparent);
  font-size: var(--fs-sm); color: var(--ink-2);
}
.callout b { color: var(--ink); }

/* ---------- 14. Method page ---------- */
.method-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.ref-item {
  padding: 22px; border-radius: var(--r-lg);
  background: var(--surface-solid); border: 1px solid var(--hairline);
}
.ref-item .year {
  font-family: "SF Mono", "Cascadia Code", Consolas, monospace;
  font-size: var(--fs-xs); color: var(--brand-600); font-weight: 700;
}
[data-theme="dark"] .ref-item .year { color: var(--brand-300); }
.ref-item h4 { font-size: var(--fs-md); margin-top: 6px; }
.ref-item p { font-size: var(--fs-sm); color: var(--ink-3); margin-top: 8px; }

.formula {
  padding: 20px; border-radius: var(--r-md);
  background: var(--bg-elev);
  border: 1px solid var(--hairline);
  font-family: "SF Mono", "Cascadia Code", Consolas, monospace;
  font-size: var(--fs-sm);
  color: var(--ink-2);
  overflow-x: auto;
}
.formula kbd {
  font-family: inherit; font-weight: 700; color: var(--brand-600);
}
[data-theme="dark"] .formula kbd { color: var(--brand-300); }

/* ---------- 15. FAQ accordion ---------- */
.faq { display: grid; gap: 10px; }
.faq__item {
  border-radius: var(--r-md);
  background: var(--surface-solid);
  border: 1px solid var(--hairline);
  overflow: hidden;
}
.faq__q {
  width: 100%; display: flex; align-items: center; gap: 14px;
  padding: 17px 20px; text-align: left;
  font-size: var(--fs-md); font-weight: 700;
}
.faq__q svg { margin-left: auto; flex: none; transition: transform var(--t) var(--ease-out); color: var(--ink-4); }
.faq__item.is-open .faq__q svg { transform: rotate(180deg); }
.faq__a {
  display: grid; grid-template-rows: 0fr;
  transition: grid-template-rows var(--t-slow) var(--ease-out);
}
.faq__item.is-open .faq__a { grid-template-rows: 1fr; }
.faq__a > div { overflow: hidden; }
.faq__a p { padding: 0 20px 18px; font-size: var(--fs-sm); color: var(--ink-3); }

/* ---------- 16. CTA band ---------- */
.cta-band {
  position: relative;
  padding: clamp(32px, 5vw, 56px);
  border-radius: var(--r-xl);
  background: var(--grad-brand);
  color: #fff;
  overflow: hidden;
  text-align: center;
  box-shadow: var(--sh-lg);
}
.cta-band::before, .cta-band::after {
  content: ""; position: absolute; border-radius: 50%;
  background: rgba(255,255,255,.14);
}
.cta-band::before { width: 320px; height: 320px; top: -140px; left: -80px; }
.cta-band::after  { width: 240px; height: 240px; bottom: -130px; right: -60px; }
.cta-band > * { position: relative; }
.cta-band .lead { color: rgba(255,255,255,.86); }
.cta-band .btn--ghost {
  background: rgba(255,255,255,.14);
  border-color: rgba(255,255,255,.45);
  color: #fff;
}
.cta-band .btn--ghost:hover { background: #fff; color: var(--brand-700); border-color: #fff; }

/* ---------- 17. Footer ---------- */
.footer {
  margin-top: clamp(40px, 6vw, 80px);
  padding: 34px 0 40px;
  border-top: 1px solid var(--hairline);
  font-size: var(--fs-sm);
  color: var(--ink-3);
}
.footer__inner { display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: center; justify-content: space-between; }
.footer a:hover { color: var(--brand-600); }
[data-theme="dark"] .footer a:hover { color: var(--brand-300); }

/* ---------- 18. Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(22px); }
.reveal.is-in {
  opacity: 1; transform: none;
  transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out);
  transition-delay: var(--d, 0ms);
}

/* ---------- 19. Toast ---------- */
.toast-host {
  position: fixed; left: 50%; bottom: 26px; z-index: 300;
  transform: translateX(-50%);
  display: grid; gap: 10px; justify-items: center;
  pointer-events: none;
  width: max-content; max-width: calc(100vw - 32px);
}
.toast {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 20px; border-radius: var(--r-full);
  background: var(--ink); color: var(--bg);
  font-size: var(--fs-sm); font-weight: 600;
  box-shadow: var(--sh-lg);
  animation: toastIn 340ms var(--ease-back) both;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateY(18px) scale(.94); }
  to   { opacity: 1; transform: none; }
}
.toast.is-out { animation: toastOut 260ms var(--ease-io) both; }
@keyframes toastOut {
  to { opacity: 0; transform: translateY(10px) scale(.96); }
}

/* ---------- 20. Confetti canvas ---------- */
#confetti {
  position: fixed; inset: 0; z-index: 250;
  pointer-events: none;
}

/* ---------- 21. Share poster ---------- */
.poster-preview {
  border-radius: var(--r-lg); overflow: hidden;
  border: 1px solid var(--hairline);
  box-shadow: var(--sh-lg);
  max-width: 380px; margin-inline: auto;
}

/* ---------- 22. Responsive tweaks ---------- */
@media (max-width: 640px) { .hide-sm { display: none; } }

@media (max-width: 720px) {
  .nav__links { display: none; }
  .hero { padding-top: 36px; }
  .hero__actions .btn { flex: 1 1 auto; }
  .q-card__text { font-size: 1.22rem; }
  .option { padding: 14px 15px; gap: 12px; }
  .option__key { width: 30px; height: 30px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .career__score { width: 58px; height: 58px; border-radius: 14px; }
  .career__score b { font-size: 1.15rem; }
  .career { padding: 16px; }
  .plan-step { padding-left: 50px; }
}

@media (max-width: 400px) {
  .hero__meta { gap: 12px; }
  .stat-grid { grid-template-columns: 1fr; }
}

/* ---------- 23. Motion / print preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}

@media print {
  .nav, .footer, .toast-host, #confetti, .hero__actions, .cta-band { display: none !important; }
  body { background: #fff; }
  .card, .q-card, .career, .stat, .dim-card { box-shadow: none; border: 1px solid #ddd; break-inside: avoid; }
}
