:root {
  --ink: #18172b;
  --muted: #67657c;
  --primary: #6357ee;
  --primary-dark: #4d41dc;
  --primary-soft: #eeecff;
  --teal: #21b59b;
  --border: #e6e4ef;
  --surface: #fff;
  --background: #f8f8fc;
  --shadow: 0 18px 50px rgba(36, 31, 78, .09);
  --radius: 20px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 7% 13%, rgba(99, 87, 238, .08), transparent 24rem),
    radial-gradient(circle at 96% 48%, rgba(33, 181, 155, .07), transparent 28rem),
    var(--background);
  font-family: "DM Sans", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
svg { width: 1.25rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.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: fixed; left: 1rem; top: -5rem; z-index: 100; padding: .8rem 1rem; color: #fff; background: var(--ink); border-radius: 8px; }
.skip-link:focus { top: 1rem; }
.page-shell { min-height: 100vh; padding-bottom: 2rem; transition: padding-bottom .25s ease; }
.page-shell.has-sticky-bar { padding-bottom: 7rem; }

.site-header {
  width: min(1180px, calc(100% - 2.5rem));
  height: 82px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: .7rem; color: var(--ink); font-family: Manrope, sans-serif; font-size: 1.18rem; font-weight: 800; text-decoration: none; letter-spacing: -.04em; }
.brand > span:last-child span { color: var(--primary); }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; color: #fff; background: linear-gradient(145deg, #766af7, #5346dd); border-radius: 12px; box-shadow: 0 8px 18px rgba(99,87,238,.26); }
.brand-mark svg { width: 24px; stroke-width: 2.2; }
.header-actions, .secure-label { display: flex; align-items: center; gap: .7rem; }
.secure-label { color: var(--muted); font-size: .86rem; font-weight: 600; }
.secure-label svg { width: 17px; color: var(--teal); }
.icon-button { width: 36px; height: 36px; border: 1px solid var(--border); border-radius: 50%; background: rgba(255,255,255,.8); cursor: pointer; font-weight: 700; }
.icon-button:hover { border-color: var(--primary); color: var(--primary); }

main { width: min(1080px, calc(100% - 2.5rem)); margin: 0 auto; }
.progress-panel {
  position: relative;
  padding: 1.5rem 2rem 1.35rem;
  overflow: hidden;
  background: rgba(255,255,255,.84);
  border: 1px solid rgba(255,255,255,.9);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  backdrop-filter: blur(14px);
}
.progress-panel::after { content: ""; position: absolute; right: -50px; top: -70px; width: 220px; height: 160px; background: radial-gradient(circle, rgba(99,87,238,.1), transparent 68%); pointer-events: none; }
.progress-copy { display: flex; align-items: end; justify-content: space-between; margin-bottom: 1rem; }
.eyebrow { display: block; margin-bottom: .3rem; color: var(--primary); font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.progress-copy h1 { margin: 0; font-family: Manrope, sans-serif; font-size: 1.15rem; letter-spacing: -.02em; }
.progress-percent { color: var(--muted); font-size: .78rem; font-weight: 700; }
.progress-track, .mini-progress { height: 5px; overflow: hidden; background: #eae8f5; border-radius: 99px; }
.progress-track > span, .mini-progress > span { display: block; width: 33%; height: 100%; background: linear-gradient(90deg, var(--primary), #9289ff); border-radius: inherit; transition: width .45s ease; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); margin: 1.25rem 0 0; padding: 0; list-style: none; }
.steps li { position: relative; display: flex; gap: .75rem; align-items: center; color: #a2a0b0; }
.steps li:not(:last-child)::after { content: ""; position: absolute; right: 1.5rem; width: 24%; height: 1px; background: var(--border); }
.steps li > span { width: 34px; height: 34px; display: grid; flex: 0 0 auto; place-items: center; border: 1px solid var(--border); background: #fafafe; border-radius: 10px; }
.steps svg { width: 17px; }
.steps strong, .steps small { display: block; }
.steps strong { color: inherit; font-size: .82rem; }
.steps small { margin-top: .1rem; font-size: .7rem; }
.steps li.active, .steps li.done { color: var(--primary); }
.steps li.active > span { color: #fff; border-color: var(--primary); background: var(--primary); box-shadow: 0 6px 15px rgba(99,87,238,.23); }
.steps li.done > span { color: #fff; border-color: var(--teal); background: var(--teal); }

.stage { animation: stageIn .45s ease both; }
@keyframes stageIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.hero-copy { max-width: 720px; margin: 3.4rem auto 2.2rem; text-align: center; }
.pill { display: inline-flex; align-items: center; gap: .5rem; padding: .45rem .7rem; color: #4d4882; background: var(--primary-soft); border-radius: 99px; font-size: .72rem; font-weight: 700; }
.pill span { width: 7px; height: 7px; background: var(--teal); border-radius: 50%; box-shadow: 0 0 0 4px rgba(33,181,155,.12); }
.hero-copy h2, .form-card h2, .result-card h2 { margin: 1rem 0 .65rem; font: 800 clamp(2rem, 4vw, 3.15rem)/1.12 Manrope, sans-serif; letter-spacing: -.055em; }
.hero-copy h2 em { color: var(--primary); font-style: normal; }
.hero-copy > p { margin: 0 auto; max-width: 600px; color: var(--muted); font-size: 1rem; line-height: 1.7; }
.quick-stats { display: flex; justify-content: center; flex-wrap: wrap; gap: 1.4rem; margin-top: 1.5rem; }
.quick-stats span { display: flex; align-items: center; gap: .4rem; color: var(--muted); font-size: .78rem; font-weight: 600; }
.quick-stats svg { width: 16px; color: var(--primary); }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.search-field { position: relative; width: min(390px, 100%); }
.search-field svg { position: absolute; left: 1rem; top: 50%; width: 18px; color: #8a8799; transform: translateY(-50%); pointer-events: none; }
.search-field input {
  width: 100%; height: 48px; padding: 0 3.4rem 0 2.9rem; color: var(--ink);
  border: 1px solid var(--border); outline: 0; background: #fff; border-radius: 12px;
  transition: border-color .2s, box-shadow .2s;
}
.search-field input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(99,87,238,.1); }
.search-field kbd { position: absolute; right: .7rem; top: 50%; padding: .22rem .35rem; color: #8b8997; border: 1px solid var(--border); background: #fafafd; border-radius: 5px; transform: translateY(-50%); font: 500 .65rem "DM Sans"; }
.filter-chips { display: flex; gap: .35rem; padding: .3rem; background: #efeff5; border-radius: 12px; }
.filter-chips button { padding: .55rem .8rem; border: 0; color: var(--muted); background: transparent; border-radius: 9px; cursor: pointer; font-size: .72rem; font-weight: 700; white-space: nowrap; }
.filter-chips button.active { color: var(--ink); background: #fff; box-shadow: 0 2px 7px rgba(32,28,60,.08); }

.domain-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .85rem; }
.domain-card {
  position: relative; min-height: 150px; padding: 1.2rem; overflow: hidden; text-align: left;
  border: 1px solid var(--border); background: rgba(255,255,255,.84); border-radius: 16px;
  cursor: pointer; transition: transform .2s, border-color .2s, box-shadow .2s, background .2s;
}
.domain-card:hover { transform: translateY(-3px); border-color: #c9c4fb; box-shadow: 0 12px 30px rgba(49,43,103,.09); }
.domain-card:focus-visible { outline: 3px solid rgba(99,87,238,.25); outline-offset: 2px; }
.domain-card.selected { border-color: var(--primary); background: linear-gradient(145deg, #fff, #f5f3ff); box-shadow: 0 12px 35px rgba(99,87,238,.13); }
.domain-icon { width: 40px; height: 40px; display: grid; place-items: center; margin-bottom: .85rem; color: var(--card-accent); background: color-mix(in srgb, var(--card-accent) 11%, white); border-radius: 11px; font-size: 1.15rem; font-weight: 800; }
.domain-card h3 { margin: 0 2rem .35rem 0; font: 700 .92rem/1.3 Manrope, sans-serif; letter-spacing: -.02em; }
.domain-card p { margin: 0; color: var(--muted); font-size: .72rem; line-height: 1.5; }
.select-dot { position: absolute; top: 1rem; right: 1rem; width: 20px; height: 20px; display: grid; place-items: center; color: transparent; border: 1.5px solid #d6d3e2; border-radius: 50%; }
.selected .select-dot { color: #fff; border-color: var(--primary); background: var(--primary); }
.select-dot svg { width: 12px; stroke-width: 2.6; }
.popular { position: absolute; right: 0; bottom: 0; padding: .25rem .55rem; color: #5b51ca; background: #ebe8ff; border-radius: 9px 0 0; font-size: .58rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.empty-state { padding: 3rem; color: var(--muted); text-align: center; }

.sticky-selection {
  position: fixed; left: 50%; bottom: 1.25rem; z-index: 20; width: min(820px, calc(100% - 2rem));
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .75rem .85rem .75rem 1rem;
  background: rgba(24,23,43,.95); border: 1px solid rgba(255,255,255,.15); border-radius: 17px;
  box-shadow: 0 20px 50px rgba(24,23,43,.25); transform: translateX(-50%); backdrop-filter: blur(16px);
  animation: stickyIn .35s ease both;
}
.sticky-selection[hidden] { display: none !important; }
@keyframes stickyIn { from { opacity: 0; transform: translate(-50%, 15px); } }
.sticky-selection > div { display: flex; align-items: center; gap: .7rem; min-width: 0; color: #fff; }
.sticky-selection p { margin: 0; min-width: 0; }
.sticky-selection small, .sticky-selection strong { display: block; }
.sticky-selection small { margin-bottom: .12rem; color: #a9a6bc; font-size: .62rem; }
.sticky-selection strong { overflow: hidden; font-size: .82rem; text-overflow: ellipsis; white-space: nowrap; }
.mini-domain-icon { width: 36px; height: 36px; display: grid; flex: 0 0 auto; place-items: center; color: #fff; background: var(--primary); border-radius: 10px; font-weight: 800; }
.primary-button, .secondary-button, .back-button {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem; border: 0; border-radius: 11px;
  cursor: pointer; font-weight: 700; transition: transform .2s, box-shadow .2s, background .2s;
}
.primary-button { min-height: 46px; padding: .7rem 1.1rem; color: #fff; background: linear-gradient(135deg, #7468f5, #5548df); box-shadow: 0 8px 20px rgba(99,87,238,.28); }
.primary-button:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 11px 24px rgba(99,87,238,.34); }
.primary-button:disabled { opacity: .45; cursor: not-allowed; }
.primary-button svg { width: 16px; }
.secondary-button { min-height: 44px; padding: .7rem 1rem; border: 1px solid var(--border); background: #fff; }

.back-button { margin: 2rem 0 1rem; padding: .55rem 0; color: var(--muted); background: transparent; }
.back-button:hover { color: var(--primary); }
.back-button svg { width: 18px; }
.two-column-layout { display: grid; grid-template-columns: 1.4fr .8fr; gap: 1.2rem; align-items: start; }
.form-card, .selection-summary, .assessment-card, .result-card { border: 1px solid var(--border); background: rgba(255,255,255,.9); border-radius: var(--radius); box-shadow: var(--shadow); }
.form-card { padding: clamp(1.5rem, 4vw, 2.5rem); }
.form-card h2 { margin: .4rem 0 .5rem; font-size: 2rem; }
.form-card > p { margin: 0 0 1.7rem; color: var(--muted); }
.form-card form { display: grid; gap: 1rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-card label { display: grid; gap: .45rem; font-size: .76rem; font-weight: 700; }
.form-card input:not([type="checkbox"]), .form-card select {
  width: 100%; height: 48px; padding: 0 .9rem; outline: none; color: var(--ink);
  border: 1px solid var(--border); background: #fff; border-radius: 10px;
}
.form-card input:focus, .form-card select:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(99,87,238,.09); }
.form-card label small { color: var(--muted); font-size: .65rem; font-weight: 400; }
.form-card .consent { display: flex; align-items: flex-start; grid-template-columns: auto 1fr; color: var(--muted); font-size: .7rem; font-weight: 500; line-height: 1.5; }
.consent input { margin-top: .15rem; accent-color: var(--primary); }
.form-card .primary-button { width: 100%; margin-top: .35rem; }
.selection-summary { position: sticky; top: 1rem; padding: 2rem; overflow: hidden; }
.summary-icon { width: 54px; height: 54px; display: grid; place-items: center; margin-bottom: 1.4rem; color: #fff; background: linear-gradient(145deg, #766af7, #5346dd); border-radius: 15px; font-size: 1.4rem; font-weight: 800; box-shadow: 0 10px 24px rgba(99,87,238,.24); }
.selection-summary h3 { margin: .25rem 0 .5rem; font: 800 1.35rem Manrope, sans-serif; letter-spacing: -.04em; }
.selection-summary > p { margin: 0; color: var(--muted); font-size: .78rem; line-height: 1.6; }
.summary-list { display: grid; grid-template-columns: repeat(3, 1fr); margin: 1.5rem 0; padding: 1rem 0; border-block: 1px solid var(--border); }
.summary-list span { color: var(--muted); font-size: .63rem; text-align: center; }
.summary-list strong { display: block; margin-bottom: .2rem; color: var(--ink); font-size: .9rem; }
.tip { padding: .9rem; background: #f6f5ff; border-radius: 11px; }
.tip strong { color: var(--primary); font-size: .68rem; }
.tip p { margin: .25rem 0 0; color: var(--muted); font-size: .68rem; line-height: 1.5; }

.assessment-card { max-width: 760px; margin: 3rem auto 0; padding: clamp(1.5rem, 5vw, 3rem); }
.assessment-topline { display: flex; justify-content: space-between; align-items: center; margin-bottom: .8rem; color: var(--muted); font-size: .76rem; }
.timer { display: flex; align-items: center; gap: .35rem; color: var(--primary); font-weight: 700; }
.timer svg { width: 16px; }
.mini-progress > span { width: 33.333%; }
.domain-tag { display: inline-block; margin: 2rem 0 .8rem; padding: .35rem .6rem; color: var(--primary); background: var(--primary-soft); border-radius: 7px; font-size: .66rem; font-weight: 700; }
.assessment-card h2 { margin: 0 0 1.5rem; font: 700 clamp(1.3rem, 3vw, 1.75rem)/1.35 Manrope, sans-serif; letter-spacing: -.035em; }
.answers { display: grid; gap: .7rem; }
.answer {
  width: 100%; display: flex; align-items: center; gap: .8rem; padding: .9rem; text-align: left;
  border: 1px solid var(--border); background: #fff; border-radius: 11px; cursor: pointer;
}
.answer:hover { border-color: #bbb5f6; background: #faf9ff; }
.answer.selected { border-color: var(--primary); background: #f5f3ff; box-shadow: 0 0 0 2px rgba(99,87,238,.08); }
.answer-index { width: 28px; height: 28px; display: grid; flex: 0 0 auto; place-items: center; color: var(--muted); border: 1px solid var(--border); border-radius: 8px; font-size: .68rem; font-weight: 800; }
.answer.selected .answer-index { color: #fff; border-color: var(--primary); background: var(--primary); }
.answer-text { font-size: .8rem; }
.assessment-actions { display: flex; justify-content: space-between; margin-top: 1.6rem; }

.result-card { position: relative; max-width: 650px; margin: 3rem auto 0; padding: 3rem 2rem; overflow: hidden; text-align: center; }
.result-check { width: 58px; height: 58px; display: grid; place-items: center; margin: 0 auto 1.2rem; color: #fff; background: var(--teal); border-radius: 50%; box-shadow: 0 10px 24px rgba(33,181,155,.24); }
.result-check svg { width: 30px; stroke-width: 2.4; }
.result-card h2 { margin: .4rem 0 .6rem; font-size: 2.25rem; }
.result-card > p { color: var(--muted); }
.score-ring { width: 130px; height: 130px; display: grid; place-items: center; margin: 1.7rem auto; background: conic-gradient(var(--primary) 90%, #eceaf6 0); border-radius: 50%; }
.score-ring::before { content: ""; position: absolute; width: 108px; height: 108px; background: #fff; border-radius: 50%; }
.score-ring span { position: relative; }
.score-ring strong { font: 800 2rem Manrope; }
.score-ring small { color: var(--muted); }
.result-card .demo-note { max-width: 440px; margin: 0 auto 1.3rem; padding: .8rem; background: #f7f6fb; border-radius: 10px; font-size: .68rem; line-height: 1.5; }
.confetti i { position: absolute; width: 7px; height: 13px; top: -15px; background: var(--primary); animation: fall 3s ease-in infinite; transform: rotate(25deg); }
.confetti i:nth-child(1) { left: 10%; animation-delay: .2s; background: #ffb84d; }
.confetti i:nth-child(2) { left: 25%; animation-delay: 1.1s; background: var(--teal); }
.confetti i:nth-child(3) { left: 42%; animation-delay: .6s; background: #ff6692; }
.confetti i:nth-child(4) { left: 61%; animation-delay: 1.4s; background: var(--primary); }
.confetti i:nth-child(5) { left: 78%; animation-delay: .4s; background: #ffb84d; }
.confetti i:nth-child(6) { left: 91%; animation-delay: 1.8s; background: var(--teal); }
@keyframes fall { to { top: 110%; transform: rotate(320deg); } }

footer { width: min(1080px, calc(100% - 2.5rem)); display: flex; justify-content: space-between; margin: 4rem auto 0; padding-top: 1.5rem; color: #8d8a9c; border-top: 1px solid var(--border); font-size: .7rem; }
footer nav { display: flex; gap: 1.2rem; }
footer a { color: inherit; text-decoration: none; }
footer a:hover { color: var(--primary); }
.toast { position: fixed; right: 1rem; bottom: 1rem; z-index: 30; max-width: 320px; padding: .8rem 1rem; color: #fff; background: var(--ink); border-radius: 10px; opacity: 0; transform: translateY(10px); pointer-events: none; transition: .25s; font-size: .75rem; }
.toast.show { opacity: 1; transform: none; }

@media (max-width: 850px) {
  .domain-grid { grid-template-columns: repeat(2, 1fr); }
  .toolbar { align-items: stretch; flex-direction: column; }
  .search-field { width: 100%; }
  .filter-chips { align-self: flex-start; max-width: 100%; overflow-x: auto; }
  .two-column-layout { grid-template-columns: 1fr; }
  .selection-summary { position: static; display: grid; grid-template-columns: auto 1fr; column-gap: 1rem; }
  .selection-summary .eyebrow, .selection-summary h3, .selection-summary > p, .selection-summary .summary-list, .selection-summary .tip { grid-column: 2; }
  .summary-icon { grid-row: 1 / span 3; }
}

@media (max-width: 600px) {
  .page-shell { padding-bottom: 6rem; }
  .site-header { width: min(100% - 1.5rem, 1180px); height: 68px; }
  .secure-label { display: none; }
  main { width: calc(100% - 1.25rem); }
  .progress-panel { padding: 1rem; border-radius: 15px; }
  .progress-copy { margin-bottom: .7rem; }
  .steps { margin-top: .9rem; }
  .steps li { justify-content: center; }
  .steps li > div, .steps li::after { display: none; }
  .steps li > span { width: 31px; height: 31px; }
  .hero-copy { margin: 2.5rem auto 1.8rem; }
  .hero-copy h2 { font-size: 2rem; }
  .hero-copy > p { font-size: .86rem; }
  .quick-stats { gap: .7rem; margin-top: 1.1rem; }
  .quick-stats span { font-size: .66rem; }
  .domain-grid { grid-template-columns: 1fr; gap: .65rem; }
  .domain-card { min-height: 112px; padding: 1rem 1rem 1rem 4.8rem; }
  .domain-icon { position: absolute; left: 1rem; top: 1rem; }
  .domain-card h3 { margin-top: .1rem; }
  .filter-chips { width: 100%; }
  .filter-chips button { flex: 1; }
  .search-field kbd { display: none; }
  .sticky-selection { bottom: .65rem; width: calc(100% - 1.25rem); padding: .55rem; }
  .sticky-selection .mini-domain-icon { display: none; }
  .sticky-selection small { display: none; }
  .sticky-selection .primary-button { min-height: 42px; }
  .desktop-only { display: none; }
  .back-button { margin-top: 1.2rem; }
  .field-row { grid-template-columns: 1fr; }
  .form-card { padding: 1.25rem; }
  .selection-summary { padding: 1.25rem; }
  .selection-summary .summary-list, .selection-summary .tip { grid-column: 1 / -1; }
  .assessment-card { margin-top: 1.5rem; padding: 1.2rem; }
  .assessment-actions { gap: .5rem; }
  .assessment-actions button { flex: 1; }
  .result-card { margin-top: 1.5rem; padding: 2rem 1rem; }
  footer { width: calc(100% - 1.5rem); flex-direction: column; gap: .8rem; margin-top: 2.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
