:root {
  --bg: #f7f4ec;
  --bg-alt: #efeaf9;
  --surface: #fffdf9;
  --surface-solid: #ffffff;
  --ink: #1d1b2f;
  --muted: #5f5c74;
  --line: #e5dfd2;
  --brand: #4338ca;
  --brand-strong: #31289c;
  --brand-soft: #ece9ff;
  --accent: #d9482f;
  --accent-soft: #fde8e2;
  --ok: #157347;
  --ok-soft: #e3f4ea;
  --danger: #b42318;
  --danger-soft: #fdeceb;
  --warn: #8a5300;
  --warn-soft: #fdf1d8;
  --shadow-sm: 0 1px 2px rgba(29, 27, 47, 0.05), 0 4px 12px rgba(29, 27, 47, 0.04);
  --shadow-md: 0 18px 45px -22px rgba(29, 27, 47, 0.35);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", "Noto Sans TC", "Microsoft JhengHei", "PingFang TC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(1100px 600px at 88% -8%, rgba(124, 58, 237, 0.12), transparent 62%),
    radial-gradient(900px 520px at -8% 12%, rgba(217, 72, 47, 0.08), transparent 60%),
    var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

[hidden] {
  display: none !important;
}

h1, h2, h3 {
  margin: 0 0 0.45em;
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 700;
}

h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); }
h2 { font-size: clamp(1.25rem, 2.2vw, 1.55rem); }
h3 { font-size: 1rem; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: var(--brand); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: var(--brand-strong); }
button, input, select { font: inherit; color: inherit; }
svg { display: block; }

:focus-visible {
  outline: 3px solid rgba(67, 56, 202, 0.45);
  outline-offset: 3px;
  border-radius: 6px;
}

.shell {
  width: min(1120px, calc(100% - 40px));
  margin-inline: auto;
}

.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;
}

.muted { color: var(--muted); }
.small { font-size: 0.85rem; }

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(247, 244, 236, 0.86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(229, 223, 210, 0.7);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  text-decoration: none;
}

.brand:hover { color: var(--ink); }

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--brand), #7c3aed);
  color: #fff;
  font-weight: 800;
  font-size: 1.15rem;
  box-shadow: 0 6px 16px -6px rgba(67, 56, 202, 0.7);
}

.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-weight: 750; font-size: 1.02rem; letter-spacing: -0.015em; }
.brand-tagline { color: var(--muted); font-size: 0.72rem; letter-spacing: 0.02em; }

.header-actions { display: flex; align-items: center; gap: 18px; }
.site-nav { display: flex; gap: 18px; font-size: 0.9rem; }
.site-nav a { color: var(--muted); text-decoration: none; font-weight: 550; padding: 4px 0; border-bottom: 2px solid transparent; }
.site-nav a:hover,
.site-nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--brand); }

.lang-switch select {
  appearance: none;
  padding: 7px 30px 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%235f5c74' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 12px center;
  font-size: 0.82rem;
  font-weight: 550;
  cursor: pointer;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 10px 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.93rem;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms var(--ease), box-shadow 160ms var(--ease), background 160ms var(--ease), border-color 160ms var(--ease);
}

.btn svg { width: 18px; height: 18px; transition: transform 160ms var(--ease); }
.btn:hover svg { transform: translateX(3px); }

/* ---------- hero ---------- */
.hero { padding: clamp(40px, 7vw, 84px) 0 clamp(30px, 5vw, 54px); }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  align-items: center;
  gap: clamp(28px, 5vw, 64px);
}

.badge {
  display: inline-block;
  margin-bottom: 18px;
  padding: 6px 13px;
  border: 1px solid rgba(67, 56, 202, 0.2);
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.hero-title { margin-bottom: 18px; font-weight: 760; }
.hero-title > span { display: block; }
.hero-title .accent {
  background: linear-gradient(100deg, var(--brand) 10%, #7c3aed 55%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede { max-width: 34rem; margin-bottom: 26px; color: var(--muted); font-size: clamp(1.02rem, 1.5vw, 1.15rem); }

.mode-picker { min-width: 0; margin: 0 0 18px; padding: 0; border: 0; }
.mode-picker-label { margin: 0 0 8px; padding: 0; color: var(--muted); font-size: 0.74rem; font-weight: 750; letter-spacing: 0.09em; text-transform: uppercase; }
.mode-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; max-width: 32rem; }
.mode-option { position: relative; cursor: pointer; }
.mode-radio {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}
.mode-option-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  height: 100%;
  padding: 11px 13px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 253, 249, 0.72);
  transition: border-color 160ms var(--ease), background 160ms var(--ease), box-shadow 160ms var(--ease);
}
.mode-option:hover .mode-option-body { border-color: #c9c2b2; background: var(--surface); }
.mode-radio:checked + .mode-option-body {
  border-color: var(--brand);
  background: var(--brand-soft);
  box-shadow: 0 0 0 3px rgba(67, 56, 202, 0.08);
}
.mode-radio:focus-visible + .mode-option-body { outline: 3px solid rgba(67, 56, 202, 0.45); outline-offset: 2px; }
.mode-option-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.mode-option-name { color: var(--ink); font-size: 0.92rem; font-weight: 750; }
.mode-option-tag { color: var(--brand-strong); font-size: 0.66rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.mode-option-detail { color: var(--muted); font-size: 0.76rem; line-height: 1.4; }

.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; }
.resume-note { margin: 12px 0 0; color: var(--brand-strong); font-size: 0.88rem; font-weight: 550; }
.hero-meta { margin: 18px 0 6px; color: var(--ink); font-size: 0.86rem; font-weight: 600; }
.privacy-note { margin: 0; color: var(--muted); font-size: 0.8rem; }

/* orbit illustration */
.hero-art { display: grid; place-items: center; }
.orbit {
  position: relative;
  width: min(400px, 82vw);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 45%, rgba(255, 255, 255, 0.95), rgba(236, 233, 255, 0.55) 62%, transparent 70%);
}

.orbit-ring {
  position: absolute;
  inset: 6%;
  border: 1.5px dashed rgba(67, 56, 202, 0.28);
  border-radius: 50%;
  animation: spin 46s linear infinite;
}
.orbit-ring-inner { inset: 25%; border-style: solid; border-color: rgba(217, 72, 47, 0.22); animation-direction: reverse; animation-duration: 34s; }

.orbit-core {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 35%;
  aspect-ratio: 1;
  display: grid;
  place-content: center;
  text-align: center;
  border-radius: 50%;
  background: linear-gradient(150deg, var(--brand), #6d28d9);
  color: #fff;
  box-shadow: 0 22px 50px -18px rgba(67, 56, 202, 0.8);
}
.orbit-core strong { font-size: clamp(2rem, 4vw, 2.7rem); line-height: 1; font-weight: 800; }
.orbit-core span { font-size: 0.7rem; letter-spacing: 0.18em; text-transform: uppercase; opacity: 0.8; }

.type-chip {
  position: absolute;
  display: grid;
  place-items: center;
  min-width: 66px;
  padding: 9px 12px;
  border: 1px solid rgba(29, 27, 47, 0.08);
  border-radius: 12px;
  background: rgba(255, 253, 249, 0.92);
  box-shadow: var(--shadow-sm);
  font-size: 0.82rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  color: var(--brand-strong);
  animation: float 7s var(--ease) infinite;
}

.chip-1 { top: 4%; left: 30%; animation-delay: -0.4s; }
.chip-2 { top: 16%; right: 2%; color: var(--accent); animation-delay: -2.1s; }
.chip-3 { top: 53%; right: -3%; animation-delay: -3.4s; }
.chip-4 { bottom: 8%; right: 18%; color: var(--accent); animation-delay: -1.2s; }
.chip-5 { bottom: 4%; left: 16%; animation-delay: -4.6s; }
.chip-6 { top: 28%; left: -2%; animation-delay: -5.5s; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}

/* ---------- sections ---------- */
.section { padding: clamp(32px, 5vw, 60px) 0; }
.section-alt {
  background: linear-gradient(180deg, rgba(239, 234, 249, 0.55), rgba(239, 234, 249, 0.2));
  border-block: 1px solid rgba(229, 223, 210, 0.65);
}
.section-title { margin-bottom: 26px; }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.feature-card {
  padding: 24px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform 200ms var(--ease), box-shadow 200ms var(--ease);
}
.feature-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.feature-card h3 { margin: 14px 0 6px; font-size: 1.02rem; }
.feature-card p { margin: 0; color: var(--muted); font-size: 0.9rem; }

.feature-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--brand-soft);
  color: var(--brand);
}
.feature-icon svg { width: 22px; height: 22px; }
.feature-card:nth-child(2) .feature-icon { background: var(--accent-soft); color: var(--accent); }
.feature-card:nth-child(3) .feature-icon { background: var(--ok-soft); color: var(--ok); }

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.step {
  padding: 22px 22px 20px;
  border-top: 3px solid var(--brand);
  border-radius: 4px 4px var(--radius) var(--radius);
  background: rgba(255, 253, 249, 0.75);
}
.step-number { display: block; margin-bottom: 10px; color: var(--brand); font-size: 1.6rem; font-weight: 800; letter-spacing: -0.03em; }
.step h3 { font-size: 1rem; margin-bottom: 5px; }
.step p { margin: 0; color: var(--muted); font-size: 0.9rem; }

/* ---------- footer ---------- */
.site-footer {
  margin-top: auto;
  padding: 22px 0;
  border-top: 2px solid rgba(67, 56, 202, 0.24);
  background: linear-gradient(180deg, rgba(236, 233, 255, 0.5), rgba(236, 233, 255, 0.92));
}
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 28px; }
.footer-inner p { margin: 0; max-width: 46rem; color: var(--ink); font-size: 0.83rem; font-weight: 700; }
.footer-meta { white-space: nowrap; font-size: 0.78rem; font-weight: 650; color: var(--muted); }

/* ---------- forms ---------- */
.card {
  padding: clamp(20px, 3vw, 30px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.card h2 { font-size: 1.2rem; }

.field-label { display: block; margin-bottom: 7px; font-size: 0.84rem; font-weight: 650; }

.text-input {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  font-size: 0.92rem;
  transition: border-color 160ms var(--ease), box-shadow 160ms var(--ease);
}
.text-input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(67, 56, 202, 0.14); }
.text-input[readonly] { background: #faf8f2; color: var(--muted); }

.email-row { display: flex; align-items: stretch; gap: 10px; }
.email-row .text-input,
.copy-row .text-input { flex: 1 1 0%; width: auto; min-width: 0; }
.email-row .btn,
.copy-row .btn { flex: 0 0 auto; white-space: nowrap; }

.copy-row { display: flex; align-items: stretch; gap: 10px; }

.form-note { margin: 10px 0 0; color: var(--muted); font-size: 0.78rem; }
.form-error {
  margin: 16px 0 0;
  padding: 12px 16px;
  border: 1px solid rgba(180, 35, 24, 0.24);
  border-radius: var(--radius-sm);
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 0.88rem;
}
.form-status { margin: 10px 0 0; padding: 9px 12px; border-radius: var(--radius-sm); font-size: 0.85rem; }
.form-status.is-error { background: var(--danger-soft); color: var(--danger); }
.form-status.is-success { background: var(--ok-soft); color: var(--ok); }

.preview-link { display: inline-block; margin-top: 12px; font-size: 0.86rem; font-weight: 600; }

.boot-error {
  margin-top: 24px;
  padding: 12px 16px;
  border: 1px solid rgba(180, 35, 24, 0.24);
  border-radius: var(--radius-sm);
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 0.9rem;
}

/* ---------- quiz ---------- */
.quiz-main { padding: clamp(26px, 4vw, 44px) 0 58px; }
.quiz-shell { width: min(860px, calc(100% - 40px)); }

.quiz-top-row { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.quiz-title { margin-bottom: 6px; font-size: clamp(1.55rem, 3vw, 2.05rem); }
.quiz-intro { margin-bottom: 18px; color: var(--muted); font-size: 0.92rem; }

.progress { height: 8px; overflow: hidden; border-radius: 999px; background: #e7e2d6; }
.progress-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), #7c3aed 60%, var(--accent));
  transition: width 320ms var(--ease);
}

.quiz-meta-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
}

.demo-notice {
  margin: 12px 0 0;
  padding: 9px 13px;
  border: 1px solid rgba(138, 83, 0, 0.18);
  border-radius: var(--radius-sm);
  background: var(--warn-soft);
  color: var(--warn);
  font-size: 0.8rem;
}

.quiz-card { margin-top: 20px; min-height: 330px; }
.quiz-card::before {
  content: "";
  display: block;
  width: 52px;
  height: 4px;
  margin-bottom: 18px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand), var(--accent));
}

.question-counter {
  margin-bottom: 12px;
  color: var(--brand);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  font-variant-numeric: tabular-nums;
}

.question-text { margin-bottom: 28px; font-size: clamp(1.25rem, 2.6vw, 1.62rem); font-weight: 650; line-height: 1.4; }

.scale { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.scale-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  min-height: 102px;
  padding: 14px 8px 12px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  transition: transform 150ms var(--ease), border-color 150ms var(--ease), background 150ms var(--ease), box-shadow 150ms var(--ease);
}
.scale-option:hover { transform: translateY(-2px); border-color: #b9b1f0; box-shadow: var(--shadow-sm); }
.scale-option[aria-pressed="true"] {
  border-color: var(--brand);
  background: linear-gradient(160deg, var(--brand), #5f4fe0);
  color: #fff;
  box-shadow: 0 14px 28px -16px rgba(67, 56, 202, 0.9);
}

.scale-value { font-size: 1.22rem; font-weight: 750; line-height: 1.1; }
.scale-label { font-size: 0.71rem; font-weight: 550; line-height: 1.3; text-align: center; opacity: 0.82; }

.keyboard-hint { margin: 20px 0 0; color: var(--muted); font-size: 0.76rem; text-align: center; }

.review-title { margin-bottom: 4px; font-size: 1.3rem; }
.review-list { display: grid; gap: 8px; max-height: 46vh; margin-top: 16px; overflow: auto; padding-right: 4px; }
.review-item { border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.review-item.is-missing { border-color: rgba(180, 35, 24, 0.3); background: var(--danger-soft); }
.review-question {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 11px 14px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.review-question:hover { background: rgba(236, 233, 255, 0.55); }
.review-number { color: var(--muted); font-size: 0.76rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.review-text { font-size: 0.87rem; line-height: 1.4; }
.review-answer {
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-size: 0.73rem;
  font-weight: 600;
  white-space: nowrap;
}
.review-answer.is-missing { background: rgba(180, 35, 24, 0.12); color: var(--danger); }

.quiz-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 20px; }
.quiz-footer-right { display: flex; align-items: center; gap: 10px; }

/* ---------- result ---------- */
.result-main { padding: clamp(24px, 4vw, 44px) 0 60px; }
.result-shell { display: block; }

.state-page { padding: clamp(48px, 10vw, 110px) 0; }
.state-card {
  max-width: 600px;
  margin: 0 auto;
  padding: clamp(24px, 4vw, 40px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}
.state-card h1 { font-size: clamp(1.5rem, 3vw, 2rem); }
.state-card p:last-child { margin-bottom: 0; }
.state-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 22px; }

.spinner {
  display: inline-block;
  width: 22px;
  height: 22px;
  margin-bottom: 12px;
  border: 2.5px solid rgba(67, 56, 202, 0.2);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

.result-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(210px, 0.42fr);
  gap: clamp(20px, 3vw, 36px);
  align-items: center;
  background:
    radial-gradient(560px 240px at 100% 0%, rgba(124, 58, 237, 0.13), transparent 70%),
    var(--surface);
  overflow: hidden;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--brand);
  font-size: 0.74rem;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

[data-dimension="EI"] {
  --dim-color: #2563eb;
  --dim-color-dark: #1e40af;
  --dim-color-light: #93c5fd;
  --dim-color-soft: #dbeafe;
}
[data-dimension="SN"] {
  --dim-color: #0f766e;
  --dim-color-dark: #115e59;
  --dim-color-light: #5eead4;
  --dim-color-soft: #ccfbf1;
}
[data-dimension="TF"] {
  --dim-color: #b45309;
  --dim-color-dark: #92400e;
  --dim-color-light: #fcd34d;
  --dim-color-soft: #fef3c7;
}
[data-dimension="JP"] {
  --dim-color: #be123c;
  --dim-color-dark: #9f1239;
  --dim-color-light: #fda4af;
  --dim-color-soft: #ffe4e6;
}

.type-letters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.type-letter {
  display: grid;
  place-items: center;
  width: clamp(48px, 7vw, 64px);
  aspect-ratio: 1;
  border-radius: 14px;
  background: linear-gradient(150deg, var(--dim-color-dark, var(--brand-strong)), var(--dim-color, var(--brand)));
  color: #fff;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 12px 24px -14px var(--dim-color-dark, rgba(67, 56, 202, 0.85));
}

.type-name { margin-bottom: 8px; font-size: clamp(1.5rem, 3vw, 2.1rem); }
.type-summary { margin: 0; max-width: 40rem; color: var(--muted); font-size: 1rem; }

.result-hero-side { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.pill {
  margin: 0;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.4;
}
.demo-note {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid rgba(138, 83, 0, 0.18);
  border-radius: var(--radius-sm);
  background: var(--warn-soft);
  color: var(--warn);
  font-size: 0.78rem;
  line-height: 1.45;
}

.result-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr);
  gap: 18px;
  margin-top: 18px;
}
.result-grid-tools { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.dimensions { display: grid; gap: 20px; margin-top: 18px; }
.dimension {
  padding-left: 14px;
  border-left: 4px solid var(--dim-color, var(--brand));
  border-radius: 2px;
}
.dimension-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 7px; font-size: 0.84rem; }
.dimension-label { color: var(--muted); }
.dimension-label.is-decisive { color: var(--dim-color-dark, var(--ink)); font-weight: 700; }
.dimension-track { display: flex; height: 12px; overflow: hidden; border-radius: 999px; background: var(--dim-color-soft, #ece7dc); }
.dimension-side-left {
  width: var(--left, 50%);
  height: 100%;
  border-radius: 999px 0 0 999px;
  background: linear-gradient(90deg, var(--dim-color-dark, var(--brand)), var(--dim-color, var(--brand)));
  box-shadow: inset -2px 0 rgba(255, 253, 249, 0.6);
  transition: width 420ms var(--ease);
}
.dimension-side-right {
  flex: 1 1 auto;
  height: 100%;
  border-radius: 0 999px 999px 0;
  background: var(--dim-color-light, #a78bfa);
}
.dimension-ticks { display: flex; justify-content: space-between; margin-top: 6px; padding: 0 1px; }
.dimension-ticks span { width: 1px; height: 5px; background: #d7d1c3; }

.trait-description { color: var(--muted); font-size: 0.9rem; }
.trait-columns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 18px; }
.trait-column h3 {
  margin-bottom: 8px;
  color: var(--brand-strong);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.trait-list { display: grid; gap: 7px; }
.trait-list li { position: relative; padding-left: 15px; color: var(--muted); font-size: 0.84rem; line-height: 1.45; }
.trait-list li::before {
  content: "";
  position: absolute;
  top: 0.52em;
  left: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.missing-card {
  margin-top: 18px;
  border-color: rgba(138, 83, 0, 0.22);
  background: linear-gradient(135deg, #fffdf9, var(--warn-soft));
}
.missing-card p { margin: 0; color: var(--muted); font-size: 0.9rem; }

.short-test-card {
  display: grid;
  gap: 8px;
  margin-top: 18px;
  border-color: rgba(67, 56, 202, 0.22);
  background: linear-gradient(135deg, #fffdf9, var(--brand-soft));
}
.short-test-card .eyebrow { margin-bottom: 0; }
.short-test-card h2 { margin: 0; }
.short-test-card p:not(.eyebrow) { margin: 0; max-width: 48rem; color: var(--muted); font-size: 0.9rem; }
.short-test-card .btn { justify-self: start; margin-top: 4px; }

.result-actions { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 22px; }


/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { order: -1; }
  .orbit { width: min(330px, 76vw); }
  .result-grid,
  .result-grid-tools { grid-template-columns: 1fr; }
  .trait-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .feature-grid,
  .steps { grid-template-columns: 1fr; }
  .result-hero { grid-template-columns: 1fr; }
  .result-hero-side { flex-direction: row; flex-wrap: wrap; }
  .pill, .demo-note { max-width: 100%; }
}

@media (max-width: 720px) {
  .shell, .quiz-shell { width: calc(100% - 28px); }
  .site-nav { display: none; }
  .header-actions { gap: 10px; }
  .brand-tagline { display: none; }
  .footer-inner { flex-direction: column; }
  .quiz-top-row { align-items: flex-start; }
  .quiz-footer { flex-wrap: wrap; }
  .quiz-footer-right { flex: 1 1 auto; justify-content: flex-end; flex-wrap: wrap; }
  .review-list { max-height: none; }
}

@media (max-width: 620px) {
  .scale { gap: 6px; }
  .scale-option { min-height: 92px; padding: 11px 2px 9px; gap: 6px; }
  .scale-label { font-size: 0.6rem; letter-spacing: -0.02em; }
  .scale-value { font-size: 1.05rem; }
  .question-text { margin-bottom: 22px; }
  .trait-columns { grid-template-columns: 1fr; }
  .mode-options { grid-template-columns: 1fr; }
  .email-row, .copy-row { flex-direction: column; }
  .email-row .btn, .copy-row .btn { width: 100%; }
  .result-actions .btn { flex: 1 1 100%; }
  .short-test-card .btn { width: 100%; }
  .type-letter { width: 52px; border-radius: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  .site-header, .site-footer, .result-actions, .result-grid-tools, .boot-error { display: none !important; }
  body { background: #fff; }
  .card { box-shadow: none; border-color: #ccc; }
}



.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

.btn-primary {
  background: linear-gradient(145deg, var(--brand), #5b4bdb);
  color: #fff;
  box-shadow: 0 12px 26px -14px rgba(67, 56, 202, 0.9);
}
.btn-primary:hover { color: #fff; box-shadow: 0 16px 30px -14px rgba(67, 56, 202, 0.95); }

.btn-ghost {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
}
.btn-ghost:hover { border-color: #c9c2b2; background: #fff; color: var(--ink); }

.btn-lg { min-height: 52px; padding: 12px 26px; font-size: 1rem; }

.link-button {
  padding: 6px 2px;
  border: 0;
  background: none;
  color: var(--brand);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  cursor: pointer;
}
.link-button:hover { color: var(--brand-strong); }
