:root {
  --ink: #1c2433;
  --muted: #424c5e;
  --pale: #eaf3f6;
  --line: #d4e0e6;
  --agree: #237e50;
  --neutral: #5b6475;
  --disagree: #8b3fbf;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --pop: cubic-bezier(0.34, 1.56, 0.64, 1);
  --fam: #b65224;
  --maxw: 1120px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 8px; }
body {
  margin: 0;
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink);
  background: #fff;
  overflow-x: hidden;
}
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-weight: 800; letter-spacing: -0.02em; line-height: 1.08; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.on-color :focus-visible, .qz-top :focus-visible { outline-color: #fff; }
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.head { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-size: 24px; font-weight: 800; letter-spacing: -0.03em; min-height: 44px; }
.brand b { font-weight: 800; }
.on-color .dots i { background: #fff !important; }
.brand span { font-weight: 600; opacity: 0.9; }
.dots { display: grid; grid-template-columns: repeat(4, 7px); gap: 3px; }
.dots i { width: 7px; height: 7px; border-radius: 50%; display: block; }
.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 24px; border-radius: 999px; border: 0;
  background: var(--ink); color: #fff; font-weight: 700; text-decoration: none; font-size: 17px;
  transition: transform 150ms var(--ease);
}
.pill:active { transform: scale(0.96); }
.pill.sm { min-height: 44px; padding: 0 18px; font-size: 15px; }
.pill.ghost { background: transparent; color: inherit; box-shadow: inset 0 0 0 2px currentColor; }
.pill.light { background: #fff; color: var(--ink); }

.hero {
  background: var(--pale);
  padding-bottom: 72px;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 30px), 70% 100%, 38% calc(100% - 24px), 0 calc(100% - 4px));
}
.hero-grid { display: grid; gap: 24px; padding-top: 8px; }
.eyebrow { display: inline-block; font-size: 14px; font-weight: 700; background: #fff; padding: 6px 14px; border-radius: 999px; margin-bottom: 14px; }
.hero h1 { font-size: clamp(36px, 9.5vw, 68px); }
.hero .sub { margin-top: 14px; font-size: 18px; color: var(--muted); max-width: 36ch; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.badge { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; }
.badge .mark { width: 26px; height: 26px; }
.resume { display: inline-block; margin-top: 12px; font-weight: 700; min-height: 44px; line-height: 44px; }

.q-card {
  background: #fff; border-radius: 28px; padding: 22px 18px 18px;
  box-shadow: 0 14px 44px rgba(28, 36, 51, 0.14);
  transition: transform 240ms var(--ease), opacity 240ms var(--ease);
}
.q-card.exit { transform: translateX(-48px); opacity: 0; }
.q-card.enter { animation: enter-right 240ms var(--ease); }
.q-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 14px; font-weight: 700; color: var(--muted); }
.q-axis { background: var(--pale); border-radius: 999px; padding: 4px 12px; color: var(--ink); }
.q-text { margin: 16px 0 22px; font-size: clamp(23px, 6.2vw, 30px); font-weight: 800; letter-spacing: -0.015em; line-height: 1.2; min-height: 3.6em; }
.scale { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.opt {
  --sz: 48px; --c: var(--neutral);
  width: var(--sz); height: var(--sz); min-width: 44px; min-height: 44px; border-radius: 50%;
  border: 3px solid var(--c); background: #fff; padding: 0; position: relative;
  transition: transform 150ms var(--ease), background-color 150ms var(--ease);
}
.opt::after { content: ""; position: absolute; inset: 0; margin: auto; width: 40%; height: 40%; border-radius: 50%; background: var(--c); transform: scale(0); transition: transform 150ms var(--ease); }
.opt[data-v="5"] { --sz: 58px; --c: var(--agree); }
.opt[data-v="4"] { --sz: 48px; --c: var(--agree); }
.opt[data-v="3"] { --sz: 44px; --c: var(--neutral); }
.opt[data-v="2"] { --sz: 48px; --c: var(--disagree); }
.opt[data-v="1"] { --sz: 58px; --c: var(--disagree); }
@media (hover: hover) { .opt:hover { transform: scale(1.08); } .opt:hover::after { transform: scale(1); } }
.opt.sel, .opt:active { transform: scale(0.9); background: var(--c); }
.opt.sel::after { background: #fff; transform: scale(1); }
.scale-ends { display: flex; justify-content: space-between; margin-top: 12px; font-size: 14px; font-weight: 700; }
.scale-ends .a { color: var(--agree); }
.scale-ends .d { color: var(--disagree); }
.q-foot { margin-top: 14px; display: flex; align-items: center; justify-content: space-between; font-size: 14px; color: var(--muted); }
.q-foot b { color: var(--ink); }

html.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity 400ms var(--ease), transform 400ms var(--ease); }
html.js .reveal.in { opacity: 1; transform: none; }

.sec-title { font-size: clamp(30px, 7vw, 46px); }
.sec-lead { margin-top: 10px; color: var(--muted); max-width: 52ch; }

.fam-head { padding: 56px 0 24px; }
.fam { display: grid; grid-template-columns: 1fr; }
.fam-block {
  min-height: 220px; padding: 22px 16px; color: #fff; display: flex; align-items: center; gap: 18px;
  background: var(--fam); scroll-snap-align: start;
}
.fam-block .mark { width: 96px; height: 96px; flex: none; }
.fam-block h3 { font-size: 24px; }
.fam-block p { margin-top: 6px; font-size: 16px; max-width: 34ch; }
.fam-block .tick { display: block; font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 6px; }

.sample { background: var(--pale); padding: 64px 0 72px; scroll-snap-align: start; }
.sample-grid { display: grid; gap: 18px; margin-top: 28px; }
.result-card { border-radius: 32px; background: var(--fam); color: #fff; padding: 28px 22px; }
.result-card .mark { width: 96px; height: 96px; }
.rc-kicker { margin-top: 14px; font-weight: 700; font-size: 15px; }
.rc-name { font-size: clamp(34px, 8vw, 50px); margin-top: 4px; }
.rc-match { margin-top: 10px; font-weight: 800; font-size: 20px; }
.rc-line { margin-top: 10px; max-width: 40ch; }
.axes3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 18px; }
.axes3 div { background: rgba(0, 0, 0, 0.2); border-radius: 16px; padding: 10px 10px 12px; font-size: 13px; font-weight: 600; }
.axes3 b { display: block; font-size: 17px; line-height: 1.15; margin-top: 2px; }
.bars-card { background: #fff; border-radius: 32px; padding: 22px 20px; }
.bars-card h3 { font-size: 20px; margin-bottom: 8px; }

.bar { padding: 10px 0; }
.bar-top { display: flex; justify-content: space-between; gap: 8px; font-size: 15px; }
.bar-name { font-weight: 700; }
.bar-val { font-weight: 700; color: var(--muted); text-align: right; }
.track { position: relative; height: 12px; border-radius: 999px; background: var(--pale); margin: 8px 0 4px; container-type: inline-size; }
.track::before { content: ""; position: absolute; left: 50%; top: -2px; bottom: -2px; width: 2px; margin-left: -1px; background: #fff; z-index: 1; }
.track .fill { position: absolute; top: 0; bottom: 0; border-radius: 999px; background: var(--c, var(--fam)); }
.track .fill.r { left: 50%; transform-origin: left; }
.track .fill.l { right: 50%; transform-origin: right; }
.track .dot { position: absolute; left: 50%; top: 50%; width: 20px; height: 20px; margin-top: -10px; border-radius: 50%; background: #fff; border: 4px solid var(--c, var(--fam)); transform: translateX(calc(var(--d) * 1cqw - 50%)); z-index: 2; }
.poles { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }

.axes-sec { background: var(--ink); color: #fff; padding: 64px 0 72px; scroll-snap-align: start; overflow: hidden; }
.axes-sec .sec-lead { color: #d3dae6; }
.marquee { margin-top: 32px; display: grid; gap: 12px; }
.marq-row { display: flex; width: max-content; gap: 12px; }
.chip { display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 20px; border-radius: 999px; background: var(--c); color: #fff; font-weight: 700; white-space: nowrap; font-size: 16px; }
.chip small { font-weight: 600; opacity: 1; font-size: 14px; }
.chip i { font-style: normal; }
@media (prefers-reduced-motion: no-preference) {
  .marq-row { animation: marq 46s linear infinite; }
  .marq-row.rev { animation-direction: reverse; animation-duration: 58s; }
  .axes-sec.off .marq-row { animation-play-state: paused; }
}
@media (prefers-reduced-motion: reduce) {
  .marq-row { width: auto; flex-wrap: wrap; }
  .marq-row [aria-hidden] { display: none; }
}

.last { padding-block: 64px 72px; scroll-snap-align: start; display: grid; gap: 28px; }
.faq details { border-bottom: 2px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 12px; font-weight: 700; font-size: 18px; padding: 10px 0; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 28px; font-weight: 600; line-height: 1; transition: transform 240ms var(--ease); flex: none; width: 32px; text-align: center; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 16px; color: var(--muted); max-width: 56ch; }
.cta { background: #2457e6; color: #fff; border-radius: 32px; padding: 32px 24px; align-self: start; }
.cta h2 { font-size: clamp(28px, 6vw, 38px); }
.cta p { margin: 12px 0 22px; }

.foot { border-top: 2px solid var(--line); padding: 22px 0 30px; font-size: 14px; color: var(--muted); }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; }
.foot a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; }
.foot.on-dark { border-color: rgba(255, 255, 255, 0.35); color: #fff; }

body.quiz { min-height: 100svh; display: flex; flex-direction: column; background: var(--ink); }
.qz-top { position: relative; flex: 1; color: #fff; padding-bottom: 56px; overflow: hidden; display: flex; flex-direction: column; }
.qz-top::after { content: ""; position: absolute; right: -24vw; bottom: -40vw; width: 78vw; height: 78vw; max-width: 560px; max-height: 560px; border-radius: 50%; background: rgba(0, 0, 0, 0.1); box-shadow: -36vw 6vw 0 -8vw rgba(0, 0, 0, 0.08); z-index: 0; pointer-events: none; }
.qz-bg { position: absolute; inset: 0; opacity: 0; transition: opacity 400ms var(--ease); }
.qz-bg.front { opacity: 1; }
.qz-in { position: relative; z-index: 1; flex: 1; display: flex; flex-direction: column; }
.qz-nav { display: flex; align-items: center; justify-content: space-between; min-height: 60px; }
.qz-nav .ghost { min-height: 44px; padding: 0 14px 0 8px; display: inline-flex; align-items: center; gap: 6px; background: transparent; border: 0; font-weight: 700; font-size: 16px; }
.qz-nav .ghost[disabled] { opacity: 0.55; cursor: default; }
.qz-count { font-weight: 700; font-size: 15px; }
.segs { display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; margin-top: 4px; }
.seg { height: 8px; border-radius: 4px; background: rgba(255, 255, 255, 0.3); overflow: hidden; position: relative; }
.seg i { position: absolute; inset: 0; background: #fff; transform: scaleX(0); transform-origin: left; transition: transform 300ms var(--ease); }
.seg.cur { box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.55); }
.qz-axis { margin-top: 18px; display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; font-weight: 700; font-size: 15px; }
.qz-axis .chipw { background: #fff; color: var(--ink); border-radius: 999px; padding: 4px 14px; }
.qz-card { flex: 1; display: flex; align-items: center; padding: 18px 0; transition: transform 240ms var(--ease), opacity 240ms var(--ease); }
.qz-card.exit { transform: translateX(-48px); opacity: 0; }
.qz-card.enter { animation: enter-right 240ms var(--ease); }
.qz-text { font-size: clamp(30px, 8.4vw, 52px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.14; max-width: 24ch; }
.qz-sheet { background: #fff; border-radius: 32px 32px 0 0; padding: 26px 0 0; margin-top: -32px; position: relative; z-index: 2; }
.qz-sheet .scale { max-width: 460px; margin: 0 auto; }
.qz-sheet .scale-ends { max-width: 460px; margin: 12px auto 0; }
.qz-live { text-align: center; font-weight: 800; font-size: 18px; min-height: 28px; margin-top: 10px; }
.skip { display: block; margin: 6px auto 0; min-height: 44px; padding: 0 20px; background: none; border: 0; font-weight: 700; color: var(--muted); text-decoration: underline; text-underline-offset: 4px; }
.qz-sheet .foot { border: 0; padding-top: 4px; text-align: center; }
.qz-sheet .foot .wrap { justify-content: center; }

body.res { background: #fff; }
.panel { position: relative; color: #fff; overflow: hidden; background: var(--pale); min-height: min(100svh, 760px); display: flex; flex-direction: column; }
.panel::before { content: ""; position: absolute; inset: 0; background: var(--fam); transform: translateY(100%); }
html:not(.js) .panel::before { transform: none; }
.panel.go::before { transform: none; transition: transform 400ms var(--ease); }
.panel > * { position: relative; }
html.js .panel .p-body, html.js .panel .head { opacity: 0; }
html.js .panel.go .p-body, html.js .panel.go .head { opacity: 1; transition: opacity 300ms var(--ease) 220ms; }
.p-body { flex: 1; display: grid; align-content: center; gap: 0; padding-block: 12px 40px; }
.p-body .mark { width: 132px; height: 132px; }
html.js .panel .p-mark { transform: scale(0.3); }
html.js .panel.go .p-mark { transform: none; transition: transform 500ms var(--pop) 280ms; }
.p-kicker { margin-top: 16px; font-weight: 700; font-size: 17px; }
.p-name { font-size: clamp(40px, 11vw, 76px); margin-top: 4px; }
.p-match { display: flex; align-items: baseline; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.p-match b { font-size: clamp(44px, 12vw, 64px); font-weight: 800; line-height: 1; }
.p-match span { font-weight: 700; font-size: 17px; }
.chipfam { display: inline-block; margin-top: 14px; background: rgba(0, 0, 0, 0.2); border-radius: 999px; padding: 4px 14px; font-weight: 700; font-size: 14px; }
.p-line { margin-top: 12px; font-size: 18px; max-width: 42ch; }
.p-axes { max-width: 560px; }

.actions { display: flex; flex-wrap: wrap; gap: 10px; padding: 18px 0; }
.actions .pill { flex: 1 1 160px; }
.actions .pill.save.done { animation: pop 150ms var(--ease); background: var(--agree); }
.res-sec { padding: 36px 0 8px; }
.res-sec h2 { font-size: clamp(26px, 6vw, 34px); margin-bottom: 8px; }
.res-sec .sub2 { color: var(--muted); margin-bottom: 14px; }
.bars-grid { display: grid; gap: 0 36px; }
.matches { display: grid; gap: 28px; }
.mrow { padding: 10px 0; }
.mrow-top { display: flex; justify-content: space-between; gap: 8px; font-weight: 700; }
.mrow small { color: var(--muted); font-weight: 600; font-size: 14px; display: block; }
.mbar { height: 10px; border-radius: 999px; background: var(--pale); margin-top: 6px; overflow: hidden; }
.mbar i { display: block; height: 100%; width: 100%; background: var(--c); transform-origin: left; border-radius: 999px; }
.note { color: var(--muted); font-size: 14px; max-width: 70ch; padding: 24px 0 8px; }

@keyframes enter-right { from { transform: translateX(48px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes breathe { 0%, 100% { transform: scale(1); opacity: 0.92; } 50% { transform: scale(1.04); opacity: 1; } }
@keyframes marq { from { transform: translateX(0); } to { transform: translateX(calc(-50% - 6px)); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fillto { to { fill-opacity: var(--fo, 1); stroke-opacity: 0; } }
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes dotmove { from { transform: translateX(-50%); } to { transform: translateX(calc(var(--d) * 1cqw - 50%)); } }
@keyframes pop { 0% { transform: scale(0.94); } 100% { transform: scale(1); } }

.mark { display: block; overflow: visible; }
.mark .s { fill: #fff; fill-opacity: var(--fo, 1); }
.mark .s.k { fill: #000; }
.breathe .mark, .breathe.mark { transform-origin: center; }
@media (prefers-reduced-motion: no-preference) {
  .breathe .mark, .breathe.mark { animation: breathe 6s ease-in-out infinite; animation-delay: var(--dl, 0s); }
  .off .breathe .mark, .off .breathe.mark, .breathe.off .mark { animation-play-state: paused; }
  html.js .mark.draw .s { fill-opacity: 0; stroke: #fff; stroke-width: 2.5; stroke-dasharray: 1; stroke-dashoffset: 1; stroke-opacity: 1; }
  html.js .mark.draw.in .s { animation: draw 500ms var(--ease) forwards, fillto 300ms var(--ease) 420ms forwards; }
  .bars-on .bar .fill { animation: grow 800ms var(--ease) backwards; animation-delay: calc(var(--i, 0) * 45ms); }
  .bars-on .bar .dot { animation: dotmove 800ms var(--ease) backwards; animation-delay: calc(var(--i, 0) * 45ms); }
  .bars-on .mbar i { animation: grow 800ms var(--ease) backwards; animation-delay: calc(var(--i, 0) * 45ms); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html.js .reveal { opacity: 1; transform: none; }
  html.js .panel .p-body, html.js .panel .head { opacity: 1; }
  html.js .panel .p-mark { transform: none; }
  .panel::before { transform: none; }
}

@media (min-width: 760px) {
  body { font-size: 18px; }
  .wrap { padding: 0 32px; }
  .hero-grid { grid-template-columns: 1.05fr 0.95fr; align-items: center; gap: 56px; padding-top: 28px; }
  .badge { width: 64px; height: 64px; }
  .badge .mark { width: 42px; height: 42px; }
  .badges { gap: 10px; max-width: 320px; }
  .q-card { padding: 30px 28px 24px; }
  .fam { grid-template-columns: repeat(4, 1fr); }
  .fam-block { flex-direction: column; align-items: flex-start; justify-content: flex-end; min-height: 360px; padding: 28px 24px; gap: 20px; }
  .fam-block .mark { width: 120px; height: 120px; }
  .sample-grid { grid-template-columns: 1.05fr 1fr; align-items: stretch; gap: 24px; }
  .result-card { padding: 40px 36px; }
  .last { grid-template-columns: 1.15fr 0.85fr; gap: 56px; align-items: start; }
  .bars-grid { grid-template-columns: 1fr 1fr; }
  .matches { grid-template-columns: 1.4fr 1fr; gap: 56px; }
  .p-body { grid-template-columns: 1.1fr 0.9fr; column-gap: 48px; }
  .p-body > * { grid-column: 1; }
  .p-body > .p-mark { grid-column: 2; grid-row: 1 / span 7; align-self: center; justify-self: center; }
  .p-body .mark { width: 340px; height: 340px; }
  .p-body .chipfam { justify-self: start; }
  .actions .pill { flex: 0 1 auto; min-width: 200px; }
  .qz-in { max-width: 860px; }
}
html { scroll-snap-type: y proximity; }
@media (prefers-reduced-motion: reduce) { html { scroll-snap-type: none; } }
