:root {
  --indigo: #36439a;
  --indigo-deep: #1d2150;
  --sky: #2b93c2;
  --cyan: #6fd3ef;
  --pale: #f1f7fb;
  --salmon: #fca581;
  --salmon-soft: #fdd0bc;
  --blush: #fef1ea;
  --rose: #b05e58;
  --text: #1d2150;
  --muted: #565c86;
  --line: #e0e4f0;
  --bg: #fcfdfe;
  --card: #ffffff;
  --radius: 16px;
  --mental: #e6338f;
  --social: #e8be12;
  --physical: #1fb0e6;
}

* { box-sizing: border-box; }
/* anchors land below the sticky header */
html { scroll-behavior: smooth; scroll-padding-top: 78px; }
body {
  margin: 0;
  overflow-x: clip;
  font-family: 'Figtree', system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--indigo); }
h1, h2, h3 { line-height: 1.12; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }
.wrap { width: min(1120px, 100% - 2 * clamp(20px, 6vw, 72px)); margin-inline: auto; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; font-weight: 700; color: var(--rose); margin-bottom: .8em; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 38em; }

/* header */
.site-header { background: var(--indigo); color: #fff; position: sticky; top: 0; z-index: 20; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 78px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 700; letter-spacing: .01em; }
.brand-mark { width: 36px; flex: none; }
.brand span { white-space: nowrap; }
.nav { display: flex; gap: 8px; align-items: center; }
.nav a { color: #fff; text-decoration: none; padding: 8px 14px; border-radius: 999px; font-size: .95rem; font-weight: 500; white-space: nowrap; transition: background .15s; }
.nav a:hover { background: rgba(255,255,255,.14); }
.nav .nav-cta { color: var(--indigo-deep); background: var(--salmon); font-weight: 700; padding: 9px 18px; margin-left: 6px; }
.nav .nav-cta:hover { background: var(--salmon-soft); }
@media (max-width: 760px) { .nav a:not(.nav-cta) { display: none; } }
@media (max-width: 480px) { .brand span { font-size: .9rem; } .nav a, .nav .nav-cta { padding: 7px 12px; font-size: .85rem; } }
/* small phones: the name takes two lines so the header fits the screen */
@media (max-width: 400px) { .brand span:not(.brand-mark) { white-space: normal; line-height: 1.15; max-width: 8.5em; } .nav .nav-cta { margin-left: 0; } }
.nowrap { white-space: nowrap; }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; border: 0; cursor: pointer; font: inherit; font-weight: 700; padding: 13px 22px; border-radius: 999px; text-decoration: none; transition: transform .15s, background .15s; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--indigo); color: #fff; }
.btn-primary:hover { background: #252e8a; }
.btn-salmon { background: var(--salmon); color: var(--indigo-deep); }
.btn-salmon:hover { background: var(--salmon-soft); }
.btn-ghost { background: transparent; color: var(--indigo); box-shadow: inset 0 0 0 2px var(--indigo); }
.btn-ghost:hover { background: var(--pale); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn .icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* hero */
.hero { background: linear-gradient(180deg, var(--pale), var(--bg)); padding: 64px 0 40px; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 1.6em; }
.hero-art { max-width: 520px; justify-self: center; width: 100%; position: relative; }
.hero-img { width: 100%; height: auto; }
/* the live triangle sits exactly on the image's outline (outline units: the labeled view is -72..672 by 0..640) */
.hero-live { position: absolute; left: calc(94 / 744 * 100%); top: calc(62 / 640 * 100%); width: calc(556 / 744 * 100%); opacity: 0; transition: opacity .8s; }
.hero-live.ready { opacity: 1; }
@media (max-width: 860px) { .hero .wrap { grid-template-columns: 1fr; } .hero { padding-top: 36px; } }

.spectrum-triangle { width: 100%; height: auto; overflow: visible; }
.tri-label { font: 800 30px 'Figtree', sans-serif; letter-spacing: .12em; fill: var(--indigo-deep); }

/* sections */
section { padding: 72px 0; }
.section-alt { background: var(--pale); }
.section-salmon { background: var(--blush); }
.section-head { max-width: 44em; margin-bottom: 36px; }

/* line → circle → triangle */
.models { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.model { background: var(--card); border-radius: var(--radius); padding: 24px; box-shadow: 0 1px 0 var(--line), 0 10px 30px -20px rgba(27,31,75,.35); }
.model-art { height: 150px; display: grid; place-items: center; margin-bottom: 18px; }
.model-art > svg { max-height: 150px; width: auto; }
.model p { color: var(--muted); margin: 0; }
@media (max-width: 860px) { .models { grid-template-columns: 1fr; } }

/* the tool */
.tool { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 48px; align-items: start; }
/* set down so MENTAL above the triangle lines up with the Mental card's heading, then it rides along with the traits */
.tool-art { margin-top: 46px; position: sticky; top: 100px; }
.tool-art .readout { display: flex; justify-content: center; gap: 18px; margin-top: 12px; font-size: .92rem; color: var(--muted); flex-wrap: wrap; }
.readout b { color: var(--text); }
@media (max-width: 860px) {
  .tool { grid-template-columns: 1fr; }
  .tool-art { max-width: 440px; margin: 0 auto; width: 100%; position: static; }
}
.presets { display: flex; justify-content: safe center; gap: 6px; margin-top: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.presets-mine { margin-top: 18px; }
.preset { flex: none; white-space: nowrap; border: 0; font: inherit; font-size: .88rem; font-weight: 600; padding: 8px 13px; border-radius: 999px; background: #fff; color: var(--indigo); box-shadow: inset 0 0 0 1.5px var(--line); cursor: pointer; }
.preset.mine { background: var(--blush); }
.preset:hover { box-shadow: inset 0 0 0 1.5px var(--indigo); }
.preset[aria-pressed="true"] { background: var(--indigo); color: #fff; box-shadow: none; }

.side { background: var(--card); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 14px; box-shadow: 0 1px 0 var(--line), 0 10px 30px -22px rgba(27,31,75,.35); }
.side-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.side-head h3 { margin: 0; display: flex; align-items: center; gap: 10px; }
.swatch { width: 14px; height: 14px; border-radius: 50%; display: inline-block; }
.side-value { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--muted); }
.side p.hint { font-size: .9rem; color: var(--muted); margin: 0 0 10px; }

/* intensity: a line of color, thicker and glowing as it grows (sizes set in app.js) */
.meter { height: 24px; display: flex; align-items: center; }
.meter span { display: block; width: 100%; height: var(--w); border-radius: 99px; background: var(--c); box-shadow: 0 0 var(--g) color-mix(in srgb, var(--c) var(--a), transparent); transition: height .3s, box-shadow .3s; }
.meter.none span { height: 0; border-top: 2px dashed #d3d7e6; }
.side-meter { margin: 12px 0 10px; }
.cmp-name { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip { font: inherit; font-size: .85rem; padding: 6px 12px; border-radius: 999px; border: 0; cursor: pointer; background: #f2f4fa; color: var(--text); }
.chip:hover { background: #e6e9f5; }
.chip[aria-pressed="true"] { color: #fff; }
.side[data-side=mental] .chip[aria-pressed="true"] { background: var(--mental); }
.side[data-side=social] .chip[aria-pressed="true"] { background: #b88f00; }
.side[data-side=physical] .chip[aria-pressed="true"] { background: #0089c0; }
.traits-heading { font-size: 1rem; margin: 0 0 12px; }
.chip-more { font: inherit; font-size: .85rem; font-weight: 600; padding: 6px 12px; border-radius: 999px; border: 0; cursor: pointer; background: none; color: var(--indigo); text-decoration: underline; text-underline-offset: 3px; }
.chip-more:hover { background: var(--pale); }

/* self-assessment vs tests */
.compare-grid { display: grid; grid-template-columns: 1fr 1.05fr 1fr; gap: 32px; align-items: start; }
.compare-bars { padding-top: 58px; }
.share-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; margin-top: 36px; }
.share-out { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; }
.share-link { font-weight: 700; color: var(--indigo); background: var(--card); padding: 10px 16px; border-radius: 999px; box-shadow: inset 0 0 0 2px var(--line); text-decoration: none; }
.share-msg { color: var(--muted); font-size: .9rem; }
/* set down so the column headings line up with the top of the first card in the middle */
.compare-col { text-align: center; padding-top: 54px; }
.compare-col h3 { margin-bottom: 24px; }
.tri-empty { position: relative; }
.tri-empty .btn { position: absolute; left: 50%; top: 56%; transform: translate(-50%, -50%); white-space: nowrap; }
.compare-empty { padding: 40px 20px; border-radius: var(--radius); background: #fff; box-shadow: inset 0 0 0 2px var(--line); color: var(--muted); }
.compare-empty .btn { margin-top: 12px; }
.cmp { background: var(--card); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 12px; box-shadow: 0 1px 0 var(--line); }
.cmp-head { display: flex; justify-content: space-between; gap: 10px; font-weight: 700; margin-bottom: 8px; }
.cmp-head > span:last-child { font-weight: 500; color: var(--muted); font-size: .9rem; }
.cmp-row { display: grid; grid-template-columns: 52px 1fr; gap: 10px; align-items: center; font-size: .85rem; color: var(--muted); margin: 4px 0; }
@media (max-width: 960px) { .compare-grid { grid-template-columns: 1fr 1fr; } .compare-bars { grid-column: 1 / -1; order: 3; padding-top: 0; } .compare-col { padding-top: 0; } }
/* phones: the side-by-side cards come first, then the two triangles */
@media (max-width: 560px) { .compare-grid { grid-template-columns: 1fr; } .compare-bars { order: -1; } }

/* intensity row */
.levels { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.level { text-align: center; }
.level img { max-width: 240px; width: 100%; height: auto; margin: 0 auto 14px; }
.level p { color: var(--muted); font-size: .95rem; max-width: 22em; margin-inline: auto; }
@media (max-width: 900px) { .levels { grid-template-columns: 1fr 1fr; } }

/* tests */
.tests { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); gap: 18px; }
.fills { display: flex; gap: 4px; margin-bottom: 4px; }
.fill-tag { font-size: .7rem; font-weight: 700; padding: 2px 7px; border-radius: 999px; background: #f2f4fa; white-space: nowrap; }
.fill-tag .swatch { width: 7px; height: 7px; margin-right: 4px; vertical-align: 1px; }
.done-tag { font-size: .8rem; font-weight: 700; color: #2f8a5a; }
.source { font-size: .82rem; color: var(--muted); }
.test { background: var(--card); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; gap: 6px; box-shadow: 0 1px 0 var(--line), 0 10px 30px -22px rgba(27,31,75,.35); }
.test h3 { margin: 0; }
.test p { color: var(--muted); font-size: .92rem; flex: 1; margin: 0 0 28px; }
.test .meta { font-size: .8rem; font-weight: 600; color: var(--sky); text-transform: uppercase; letter-spacing: .08em; }
.test.soon { opacity: .7; }
.test.soon .btn { pointer-events: none; }

/* footer */
.site-footer { background: var(--indigo-deep); color: #c9cdea; padding: 40px 0; font-size: .9rem; }
.site-footer a { color: #fff; }
.site-footer .wrap { display: grid; gap: 10px; }
.suggest { display: grid; gap: 10px; max-width: 640px; padding-bottom: 28px; margin-bottom: 18px; border-bottom: 1px solid rgba(255,255,255,.14); }
.suggest label b { display: block; color: #fff; font-size: 1.05rem; margin-bottom: 2px; }
.suggest textarea { font: inherit; font-size: .95rem; color: var(--text); background: #fff; border: 0; border-radius: 12px; padding: 12px 14px; resize: vertical; min-height: 84px; }
.suggest textarea:focus-visible { outline: 3px solid var(--salmon); outline-offset: 2px; }
.suggest-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.suggest-msg { font-size: .85rem; }

/* assessment */
.test-hero { background: var(--indigo); color: #fff; padding: 48px 0 40px; }
.test-hero .lead { color: #d8dcf5; }
.test-hero .eyebrow { color: var(--salmon-soft); }
.test-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; align-items: start; padding: 40px 0 80px; }
.test-side { position: sticky; top: 84px; background: var(--card); border-radius: var(--radius); padding: 18px; box-shadow: 0 1px 0 var(--line), 0 10px 30px -20px rgba(27,31,75,.35); }
.test-side .small { font-size: .85rem; color: var(--muted); margin: 10px 0 0; }
.progress { height: 8px; border-radius: 99px; background: #eceef6; overflow: hidden; margin: 14px 0 6px; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--indigo), var(--sky)); width: 0; transition: width .25s; }
@media (max-width: 900px) {
  .test-layout { grid-template-columns: 1fr; }
  .test-side { order: -1; position: sticky; top: 78px; z-index: 10; display: grid; grid-template-columns: 1fr; gap: 12px; align-items: center; padding: 10px 14px; border-radius: 0 0 var(--radius) var(--radius); }
  .test-side .small { display: none; }
}

.instructions { background: var(--blush); border-radius: var(--radius); padding: 20px 22px; margin-bottom: 28px; }
.instructions ul { margin: .4em 0 0; padding-left: 1.2em; }
.q { background: var(--card); border-radius: var(--radius); padding: 20px 22px; margin-bottom: 12px; box-shadow: 0 1px 0 var(--line); scroll-margin-top: 170px; }
.q.missing { box-shadow: inset 0 0 0 2px var(--salmon); }
.q legend { font-weight: 600; padding: 0; margin-bottom: 12px; display: flex; gap: 10px; }
.q legend .n { color: var(--sky); font-variant-numeric: tabular-nums; min-width: 1.8em; }
.q fieldset { border: 0; margin: 0; padding: 0; }
.opts { display: grid; grid-template-columns: repeat(var(--n, 4), 1fr); gap: 8px; }
@media (max-width: 720px) { .opts { grid-template-columns: 1fr 1fr; } .opts.many { grid-template-columns: 1fr; } }
.manual { background: var(--card); border-radius: var(--radius); padding: 18px 22px; margin-bottom: 20px; box-shadow: 0 1px 0 var(--line); }
.manual summary { font-weight: 700; color: var(--indigo); cursor: pointer; }
.manual p { font-size: .92rem; color: var(--muted); margin: .8em 0 0; }
.manual-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-top: 14px; }
.manual-field { display: flex; flex-direction: column; justify-content: space-between; gap: 6px; font-size: .88rem; font-weight: 600; }
.manual-field input { font: inherit; font-weight: 500; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; width: 100%; }
.manual-field input:focus-visible { outline: 3px solid var(--salmon); outline-offset: 1px; }
.enter-link { display: block; margin-top: 6px; font-size: .86rem; text-align: center; }
.about { background: var(--card); border-radius: var(--radius); padding: 20px 22px; margin-bottom: 20px; box-shadow: 0 1px 0 var(--line); font-size: .92rem; color: var(--muted); }
.about h3 { color: var(--text); font-size: 1rem; margin-bottom: .4em; }
.about p:last-child { margin: 0; }
.opt { position: relative; }
.opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.opt span { display: block; height: 100%; text-align: center; font-size: .86rem; padding: 10px 8px; border-radius: 10px; background: #f2f4fa; cursor: pointer; line-height: 1.3; }
.opt input:hover + span { background: #e6e9f5; }
.opt input:checked + span { background: var(--indigo); color: #fff; }
.opt input:focus-visible + span { outline: 3px solid var(--salmon); outline-offset: 2px; }
.submit-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 24px; }

/* results */
.results { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: start; padding: 40px 0 80px; }
@media (max-width: 860px) { .results { grid-template-columns: 1fr; } }
.score-total { font-size: 3.2rem; font-weight: 800; line-height: 1; color: var(--indigo); }
.score-total small { font-size: 1.1rem; color: var(--muted); font-weight: 600; }
.verdict { display: inline-block; padding: 6px 14px; border-radius: 999px; font-weight: 700; margin: 12px 0 20px; }
.verdict.above { background: var(--salmon); color: var(--indigo-deep); }
.verdict.below { background: #e3f4fb; color: var(--sky); }
.bar { margin-bottom: 18px; }
.bar-head { display: flex; justify-content: space-between; font-size: .95rem; margin-bottom: 6px; gap: 10px; }
.bar-head b { font-variant-numeric: tabular-nums; }
.bar-track { position: relative; height: 12px; border-radius: 99px; background: #eceef6; }
.bar-fill { position: absolute; inset: 0 auto 0 0; border-radius: 99px; background: var(--indigo); }
.bar-mark { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--rose); }
.bar-note { font-size: .82rem; color: var(--muted); margin-top: 4px; }
.notice { font-size: .88rem; color: var(--muted); border-left: 3px solid var(--salmon); padding-left: 12px; margin-top: 24px; }
[hidden] { display: none !important; }
