/* ============================================================
   БИО.health — 16personalities-style health typology
   ============================================================ */

:root {
  /* type-group palette, in the spirit of 16personalities */
  --sleep:   #4f5bd5;   /* indigo  */
  --gut:     #2fa56f;   /* green   */
  --energy:  #e6a32b;   /* amber   */
  --immune:  #e0607e;   /* coral   */
  --env:     #8b6fc9;   /* purple  */
  --load:    #e0743a;   /* orange  */
  --mind:    #6b7686;   /* slate (sensitive) */

  --agree:    #2faa6a;  /* green dots  */
  --disagree: #9a55c9;  /* purple dots */

  --ink:     #2a2d35;
  --ink-soft:#5a6070;
  --ink-dim: #8b91a0;
  --line:    #e7e9ef;
  --bg:      #ffffff;
  --bg-alt:  #f6f7fb;
  --card:    #ffffff;

  --zone-green:  #2fa56f;
  --zone-yellow: #e0a32b;
  --zone-red:    #e0594f;

  --radius:   18px;
  --radius-lg:26px;
  /* keep in sync with tokens.css (single source of truth) */
  --shadow-sm: 0 2px 10px rgba(40, 45, 70, .05);
  --shadow-md: 0 16px 36px -12px rgba(40, 45, 70, .18);
  --shadow-lg: 0 30px 70px rgba(40, 45, 70, .16);

  --maxw: 1140px;
  --font: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-body: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Unbounded", "Onest", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
html, body { overflow-x: clip; }            /* gate 62: no horizontal scroll context */

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.5;
}

h1, h2, h3 { margin: 0; font-weight: 800; letter-spacing: -0.01em; line-height: 1.1; overflow-wrap: break-word; min-width: 0; }
/* display face (Unbounded) on the big moments; card/step titles (h3) stay on the body face */
h1, h2, .brand__word, .rhero__name, .lead-hero h1, .section__head h2, .feature__copy h2, .cta__inner h2 {
  font-family: var(--font-display); letter-spacing: -0.02em;
}
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ───────────────────────── Buttons ───────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  font-weight: 700;
  font-size: 16px;
  border-radius: 999px;
  padding: 13px 22px;
  transition: transform .14s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn--sm { font-size: 14px; padding: 9px 16px; }
.btn--lg { font-size: 18px; padding: 16px 28px; }

.btn--primary {
  background: var(--accent, var(--sleep));
  color: #fff;
  box-shadow: 0 10px 24px color-mix(in srgb, var(--accent, var(--sleep)) 36%, transparent);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 16px 32px color-mix(in srgb, var(--accent, var(--sleep)) 42%, transparent); }

.btn--ghost {
  background: #fff;
  color: var(--ink);
  box-shadow: inset 0 0 0 1.6px var(--line);
}
.btn--ghost:hover { box-shadow: inset 0 0 0 1.6px var(--ink-dim); }

.btn--text { background: none; color: var(--ink-soft); }
.btn--text:hover { color: var(--ink); }

/* ───────────────────────── Nav ───────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, box-shadow .25s ease;
}
.nav.is-stuck { border-color: var(--line); box-shadow: var(--shadow-sm); }
.nav__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px 22px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--sleep); }
.brand__mark { display: inline-flex; }
.brand__word { font-size: 22px; font-weight: 800; color: var(--ink); letter-spacing: -.02em; }
.brand__word em { font-style: normal; font-weight: 700; color: var(--ink-dim); }

.nav__links { display: flex; gap: 26px; margin-left: 8px; }
.nav__links a { font-weight: 600; color: var(--ink-soft); font-size: 16px; position: relative; }
.nav__links a:hover { color: var(--ink); }
.nav__links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px;
  background: var(--sleep); border-radius: 2px; transform: scaleX(0);
  transition: transform .2s ease;
}
.nav__links a:hover::after { transform: scaleX(1); }

.nav__actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.lang {
  font-weight: 700; color: var(--ink-soft); font-size: 14px;
  padding: 7px 11px; border-radius: 10px;
}
.lang:hover { background: var(--bg-alt); }
.lang--icon { display: inline-flex; align-items: center; gap: 5px; color: var(--ink-soft); }
.lang--icon span { font-size: 14px; }

/* ───────────────────────── Views ───────────────────────── */
.view { display: none; }
.view.is-active { display: block; animation: viewIn .5s cubic-bezier(.2,.7,.2,1); }
@keyframes viewIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* nav login + xl button */
.nav__login { font-weight: 700; color: var(--ink-soft); font-size: 15px; padding: 8px 12px; border-radius: 10px; }
.nav__login:hover { color: var(--ink); background: var(--bg-alt); }
.btn--xl { font-size: 19px; padding: 18px 40px; --accent: var(--sleep); }

/* ───────────────────────── Lead hero (fits one viewport) ───────────────────────── */
.lead-hero {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column;
  min-height: calc(100svh - 64px);          /* one screen minus the sticky nav */
  padding-top: clamp(16px, 3.5vh, 40px);
}
.lead-hero__copy {
  position: relative; z-index: 2; flex: 0 0 auto;
  max-width: 860px; margin: 0 auto; padding: 0 22px clamp(16px, 3vh, 28px); text-align: center;
}
.lead-hero h1 { font-size: clamp(30px, 4.6vw, 52px); max-width: 15em; margin: 0 auto; }
.lead-hero__sub {
  margin: clamp(12px, 2vh, 18px) auto clamp(16px, 2.6vh, 26px); font-size: clamp(16px, 1.9vw, 20px);
  color: var(--ink-soft); max-width: 32em; line-height: 1.5;
}

/* illustrated scene — fills the remaining viewport height under the copy */
.scene { position: relative; flex: 1 1 auto; min-height: 190px; overflow: hidden; }
.scene__art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 85%; z-index: 2; }
.scene__css { position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, #eaf2fb 0%, #f3eefb 45%, #fdf3ec 100%); }
.scene__sun {
  position: absolute; top: 14%; left: 50%; transform: translateX(-50%);
  width: 120px; height: 120px; border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, #ffe7a8 0%, #ffd277 55%, rgba(255,210,119,0) 72%);
  filter: blur(2px); animation: floaty 8s ease-in-out infinite;
}
.scene__hill { position: absolute; left: -5%; right: -5%; border-radius: 50% 50% 0 0 / 100% 100% 0 0; }
.scene__hill--1 { bottom: -40%; height: 70%; background: linear-gradient(180deg, #7fc79a, #5bb583); }
.scene__hill--2 { bottom: -20%; height: 64%; left: -25%; right: 55%; background: linear-gradient(180deg, #a9d9b6, #84c89c); }
.scene__hill--3 { bottom: -16%; height: 60%; left: 50%; right: -25%; background: linear-gradient(180deg, #bfe3c7, #9bd4ab); }
.scene__cloud { position: absolute; height: 26px; width: 90px; background: rgba(255,255,255,.8); border-radius: 999px; filter: blur(2px); }
.scene__cloud.c1 { top: 22%; left: 16%; animation: drift 22s linear infinite; }
.scene__cloud.c2 { top: 32%; right: 18%; width: 64px; animation: drift 28s linear infinite reverse; }
@keyframes drift { from { transform: translateX(-20px); } to { transform: translateX(20px); } }
@keyframes floaty { 0%,100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(-10px); } }

/* floating type "mascots" — a little crowd, echoing 16P's group illustration */
.scene__crowd { position: absolute; inset: 0; }
.mascot {
  position: absolute;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  animation: bob 5s ease-in-out infinite;
}
.mascot__img {
  width: clamp(64px, 9vw, 104px); height: auto;
  filter: drop-shadow(0 12px 16px rgba(40,45,70,.18));
}
.mascot__name {
  background: #fff; border-radius: 999px; padding: 5px 12px;
  box-shadow: var(--shadow-sm); font-weight: 700; font-size: 13px; white-space: nowrap; color: var(--ink);
}
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* ───────────────────────── Value strip (slim) ───────────────────────── */
.stats {
  background: radial-gradient(140% 220% at 50% -60%, #2b3047 0%, var(--ink) 65%);
  color: #fff;
}
.stats__inner {
  max-width: var(--maxw); margin: 0 auto; padding: 18px 22px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; text-align: center;
}
.stat { padding: 4px 16px; position: relative; }
.stat + .stat::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 1px; height: 34px; background: rgba(255,255,255,.12);
}
.stat b {
  display: block; font-size: clamp(17px, 2vw, 22px); font-weight: 800;
  letter-spacing: -.01em; line-height: 1.1;
}
.stat span { display: block; margin-top: 4px; font-size: 12.5px; color: rgba(255,255,255,.6); font-weight: 600; }
.stat:nth-child(1) b { color: #9aa8ff; }
.stat:nth-child(2) b { color: #7fe0b0; }
.stat:nth-child(3) b { color: #ffcf7a; }
.stat:nth-child(4) b { color: #ff9fb4; }

/* ───────────────────────── Feature sections ───────────────────────── */
.feature {
  max-width: var(--maxw); margin: 0 auto; padding: 70px 22px;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: center;
}
.feature--reverse .feature__media { order: 2; }
.feature__eyebrow { font-weight: 800; letter-spacing: .05em; text-transform: uppercase; font-size: 13px; color: var(--sleep); margin-bottom: 10px; }
.feature--reverse .feature__eyebrow { color: var(--env); }
.feature__copy h2 { font-size: clamp(26px, 3.6vw, 38px); }
.feature__copy p { margin: 14px 0 24px; color: var(--ink-soft); font-size: 18px; line-height: 1.6; }

.feature__media {
  position: relative; min-height: 280px; border-radius: var(--radius-lg);
  background: linear-gradient(140deg, #eef1fb, #f6effb);
  overflow: hidden; box-shadow: inset 0 0 0 1px var(--line);
}
.feature__media--profile { background: linear-gradient(140deg, #f0ecfb, #fbecf2); display: grid; place-items: center; }
.float-card {
  position: absolute; display: inline-flex; align-items: center; gap: 9px;
  background: #fff; border-radius: 14px; padding: 11px 16px; box-shadow: var(--shadow-md);
  font-weight: 700; font-size: 15px; animation: bob 5s ease-in-out infinite;
}
.fc__dot { width: 12px; height: 12px; border-radius: 50%; }
.fc-a { top: 18%; left: 12%; }
.fc-b { top: 46%; right: 10%; animation-delay: .8s; }
.fc-c { bottom: 16%; left: 22%; animation-delay: 1.6s; }
.profile-code {
  font-size: clamp(48px, 8vw, 76px); font-weight: 800; letter-spacing: .12em;
  color: var(--env); text-shadow: 0 8px 24px color-mix(in srgb, var(--env) 30%, transparent);
}
.profile-cap { color: var(--ink-dim); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; font-size: 13px; }

/* ───────────────────────── Testimonials ───────────────────────── */
.quotes {
  max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px;
}
.quote {
  margin: 0; background: #fff; border-radius: var(--radius); padding: 26px 24px;
  box-shadow: var(--shadow-sm); border: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 18px;
}
.quote blockquote { margin: 0; font-size: 17px; line-height: 1.55; color: var(--ink); }
.quote blockquote::before { content: "“"; color: var(--ink-dim); font-size: 30px; line-height: 0; vertical-align: -8px; margin-right: 2px; }
.quote figcaption { display: flex; align-items: center; gap: 12px; }
.quote__who { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.quote__who strong { font-weight: 800; font-size: 15px; color: var(--ink); }
.quote__who em { font-style: normal; color: var(--ink-dim); font-weight: 600; font-size: 13.5px; }
.quote__ava { width: 44px; height: 44px; border-radius: 50%; flex: 0 0 auto; object-fit: cover; box-shadow: 0 0 0 3px #fff, 0 2px 8px rgba(40,45,70,.12); }
.quote__ava--fb { display: grid; place-items: center; color: #fff; font-weight: 800; box-shadow: none; }

/* ───────────────────────── Big CTA ───────────────────────── */
.cta {
  background: linear-gradient(135deg, var(--sleep), color-mix(in srgb, var(--env) 70%, var(--sleep)));
  color: #fff; position: relative; overflow: hidden;
}
.cta::before, .cta::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255,255,255,.1); }
.cta::before { width: 320px; height: 320px; top: -160px; left: -60px; }
.cta::after  { width: 240px; height: 240px; bottom: -150px; right: -40px; }
.cta__inner { position: relative; max-width: 760px; margin: 0 auto; padding: 72px 22px; text-align: center; }
.cta__inner h2 { font-size: clamp(28px, 4.4vw, 44px); margin-bottom: 28px; }
.cta__inner .btn--primary { background: #fff; color: var(--sleep); box-shadow: 0 14px 30px rgba(0,0,0,.18); }
.cta__inner .btn--primary:hover { background: #fff; }

/* ───────────────────────── Footer ───────────────────────── */
.footer { background: #14161f; color: #fff; }
.footer__cols {
  max-width: var(--maxw); margin: 0 auto; padding: 60px 22px 40px;
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 34px;
}
.footer__brand .brand__word { font-size: 22px; color: #fff; }
.footer__brand .brand__word em { color: #8088a0; }
.footer__brand p { margin-top: 14px; color: #9aa0b4; font-size: 14.5px; line-height: 1.55; max-width: 26em; }
.footer__col h4 { font-size: 13px; letter-spacing: .05em; text-transform: uppercase; color: #8088a0; margin-bottom: 14px; }
.footer__col a { display: block; color: #c4c8d4; font-size: 15px; padding: 5px 0; }
.footer__col a:hover { color: #fff; }
.footer__legal {
  max-width: var(--maxw); margin: 0 auto; padding: 24px 22px 50px;
  border-top: 1px solid rgba(255,255,255,.08);
}
.footer__legal p { color: #7a8094; font-size: 13px; line-height: 1.6; max-width: 60em; }
.footer__copy { margin-top: 12px; font-weight: 700; color: #9aa0b4; }

/* ───────────────────────── Floating bottom dock ───────────────────────── */
.dock {
  position: fixed; left: 50%; bottom: 18px; z-index: 45;
  transform: translateX(-50%) translateY(26px);
  display: flex; gap: 2px;
  background: rgba(255, 255, 255, .9); backdrop-filter: blur(14px) saturate(1.5);
  border: 1px solid var(--line); border-radius: 22px;
  padding: 7px 9px; box-shadow: 0 14px 38px rgba(40, 45, 70, .18);
  opacity: 0; pointer-events: none;
  transition: opacity .3s ease, transform .3s cubic-bezier(.2,.7,.2,1);
}
.dock.is-shown { opacity: 1; pointer-events: auto; transform: translateX(-50%) translateY(0); }
.dock__item {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 7px 15px; border-radius: 15px; color: var(--ink-soft);
  font-weight: 700; font-size: 11.5px; white-space: nowrap;
  transition: color .18s ease, background .18s ease, transform .12s ease;
}
.dock__item svg { width: 22px; height: 22px; }
.dock__item:hover { color: var(--sleep); background: color-mix(in srgb, var(--sleep) 9%, #fff); }
.dock__item:active { transform: translateY(1px); }
.dock__item:focus-visible { outline: 2px solid color-mix(in srgb, var(--sleep) 55%, #fff); outline-offset: 2px; }
@media (max-width: 560px) {
  .dock { left: 12px; right: 12px; transform: translateY(26px); justify-content: space-between; gap: 0; padding: 6px 4px; border-radius: 20px; }
  .dock.is-shown { transform: translateY(0); }
  .dock__item { padding: 6px 8px; font-size: 10.5px; flex: 1; gap: 3px; }
  .dock__item svg { width: 20px; height: 20px; }
}

/* ───────────────────────── feature illustrations ───────────────────────── */
.feature__art {
  position: absolute; z-index: 2; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 86%; height: 86%; object-fit: contain;
  filter: drop-shadow(0 18px 30px rgba(40,45,70,.12));
}
/* when a real illustration is present, drop the placeholder float-cards / code (they collide) */
.feature__media:has(.feature__art) .float-card,
.feature__media:has(.feature__art) .profile-code,
.feature__media:has(.feature__art) .profile-cap { display: none; }

/* ───────── 3 STEP cards (faithful to 16personalities test landing) ───────── */
.howto { max-width: var(--maxw); margin: 0 auto; padding: 24px 22px 56px; }
.step-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.step-card {
  position: relative; border-radius: 16px; padding: 168px 26px 28px;
  box-shadow: var(--shadow-md); overflow: hidden;
  background: linear-gradient(180deg, color-mix(in srgb, var(--sc) 8%, #fff), #fff 58%);
  display: flex; flex-direction: column;
}
.step-card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: var(--sc); }
.step-card--1 { --sc: #4298b4; }
.step-card--2 { --sc: #33a474; }
.step-card--3 { --sc: #88619a; }
.step-card__art {
  position: absolute; top: 16px; right: 14px; width: 150px; height: 150px; object-fit: contain;
  filter: drop-shadow(0 12px 18px rgba(40,45,70,.12));
}
.step-card__pill {
  align-self: flex-start; background: var(--sc); color: #fff;
  font-weight: 800; font-size: 12px; letter-spacing: .05em;
  padding: 5px 13px; border-radius: 999px;
}
.step-card h3 { font-size: 23px; margin-top: 14px; }
.step-card p { color: var(--ink-soft); font-size: 16px; margin-top: 10px; line-height: 1.5; }

/* inline first question that launches the test (like 16P) */
.inline-q {
  max-width: 760px; margin: 44px auto 0; padding: 0 4px;
  cursor: default;
}
.inline-q__text {
  font-size: clamp(20px, 3.2vw, 30px); font-weight: 800; text-align: left;
  margin-bottom: 26px; max-width: 22em;
}

/* ───────────────────────── Sections ───────────────────────── */
.section { max-width: var(--maxw); margin: 0 auto; padding: 64px 22px; }
.section--alt { max-width: none; background: var(--bg-alt); }
.section--alt .section__head, .section--alt .steps { max-width: var(--maxw); margin-left: auto; margin-right: auto; }
.section__head { text-align: center; margin-bottom: 40px; }
.section__head h2 { font-size: clamp(28px, 4vw, 40px); }
.section__head p { margin-top: 12px; color: var(--ink-soft); font-size: 18px; }

/* ───────────────────────── Cards (tests grid) ───────────────────────── */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(258px, 1fr));
  gap: 22px;
}
.card {
  --prox: 0;                 /* 0..1 cursor proximity, set per-frame by JS (macOS-dock magnification) */
  position: relative;
  z-index: 1;
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex; flex-direction: column;
  border: 1px solid var(--line);
  transform: translateY(calc(var(--prox) * -10px)) scale(calc(1 + var(--prox) * .055));
  box-shadow:
    0 calc(3px + var(--prox) * 20px) calc(10px + var(--prox) * 32px)
      color-mix(in srgb, var(--c) calc(7% + var(--prox) * 28%), transparent),
    var(--shadow-sm);
  transition: transform .2s cubic-bezier(.22, .61, .36, 1), box-shadow .25s ease;
  will-change: transform;
}
.card:hover { box-shadow:
    0 20px 42px color-mix(in srgb, var(--c) 32%, transparent), var(--shadow-md); }
@media (prefers-reduced-motion: reduce) {
  .card { transform: none; transition: box-shadow .25s ease; }
}
.card__banner {
  height: 150px; position: relative; overflow: hidden;
  background:
    radial-gradient(120% 90% at 50% 120%,
      color-mix(in srgb, var(--c) calc(26% + var(--prox) * 20%), #fff),
      color-mix(in srgb, var(--c) calc(10% + var(--prox) * 13%), #fff));
  transition: background .25s ease;
  display: flex; align-items: center; justify-content: center;
}
.card__icon {
  position: relative; z-index: 1;
  display: grid; place-items: center;
  filter: drop-shadow(0 10px 16px color-mix(in srgb, var(--c) 35%, transparent));
  transform: translateY(calc(var(--prox) * -5px)) scale(calc(1 + var(--prox) * .05));
  transition: transform .2s ease;
}
.card:hover .card__icon { transform: translateY(-5px) scale(1.05); }
.card__icon svg { width: 52px; height: 52px; color: var(--c); }
.card__icon-img { width: 104px; height: 104px; object-fit: contain; display: block; }
.card__code {
  position: absolute; top: 12px; left: 14px; z-index: 1;
  width: 26px; height: 26px; border-radius: 8px;
  display: grid; place-items: center;
  background: #fff; color: var(--c); font-weight: 800; font-size: 14px;
  box-shadow: var(--shadow-sm);
}
.card__body { padding: 18px 18px 20px; display: flex; flex-direction: column; flex: 1; }
.card__title { font-size: 20px; font-weight: 800; }
.card__sub { color: var(--ink-soft); font-size: 14.5px; margin-top: 5px; flex: 1; }
.card__meta { display: flex; align-items: center; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.card__time { font-size: 13px; color: var(--ink-dim); font-weight: 600; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.card__time svg { width: 15px; height: 15px; flex: 0 0 auto; }
.badge {
  font-size: 11.5px; font-weight: 700; padding: 4px 9px; border-radius: 999px; letter-spacing: .01em;
}
.badge--valid { color: #1d7a55; background: #e3f4ec; }
.badge--unvalid { color: #9a6a1c; background: #fbf0d8; }
.badge--sensitive { color: #5a6480; background: #eceef4; }
.card__cta {
  margin-top: 16px; width: 100%;
  --accent: var(--c);
}
.card__cta:disabled { opacity: .55; cursor: not-allowed; }
.card__soon {
  margin-top: 16px; text-align: center; font-size: 13.5px; font-weight: 700;
  color: var(--ink-dim); padding: 11px; border-radius: 999px; background: var(--bg-alt);
}

/* ───────────────────────── Steps ───────────────────────── */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; padding: 0 22px; }
.step { background: #fff; border-radius: var(--radius); padding: 26px 24px; box-shadow: var(--shadow-sm); }
.step__num {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px;
  background: color-mix(in srgb, var(--sleep) 12%, #fff); color: var(--sleep);
  font-weight: 800; font-size: 18px; margin-bottom: 14px;
}
.step h3 { font-size: 19px; }
.step p { margin-top: 8px; color: var(--ink-soft); font-size: 15.5px; }

/* ───────────────────────── Footer ───────────────────────── */
.foot { max-width: var(--maxw); margin: 0 auto; padding: 48px 22px 70px; text-align: center; }
.foot__note { color: var(--ink-dim); font-size: 14px; max-width: 56em; margin: 0 auto; line-height: 1.6; }
.foot__brand { margin-top: 22px; font-weight: 800; color: var(--ink-soft); letter-spacing: .04em; }

/* ════════════════════════ TEST VIEW ════════════════════════ */
.view--test { min-height: 100vh; background: var(--bg-alt); }
.test-progress { position: fixed; top: 0; left: 0; right: 0; height: 5px; background: #e4e7f0; z-index: 60; }
.test-progress span {
  display: block; height: 100%; width: 0;
  background: var(--accent, var(--sleep));
  transition: width .45s cubic-bezier(.2,.7,.2,1);
  border-radius: 0 4px 4px 0;
}
.test-top {
  max-width: 760px; margin: 0 auto; padding: 26px 22px 0;
  display: flex; align-items: center; gap: 14px;
}
.test-back {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  color: var(--ink-soft); background: #fff; box-shadow: var(--shadow-sm);
  transition: transform .15s ease, color .2s ease;
}
.test-back:hover { color: var(--ink); transform: translateX(-2px); }
.test-top__meta { display: flex; flex-direction: column; gap: 3px; }
.test-top__chip {
  align-self: flex-start; font-size: 12.5px; font-weight: 800; letter-spacing: .03em;
  color: #fff; background: var(--accent, var(--sleep)); padding: 3px 11px; border-radius: 999px;
}
.test-top__count { font-size: 14px; color: var(--ink-soft); font-weight: 600; }
.test-top__pct { margin-left: auto; font-weight: 800; font-size: 20px; color: var(--accent, var(--sleep)); }

.quiz {
  max-width: 720px; margin: 0 auto;
  padding: 36px 22px 48px;
}
.quiz__lead {
  color: var(--ink-dim); font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  font-size: 13px; text-align: center; margin-bottom: 8px;
}

/* batched question list (one page = several questions) */
.qlist { display: flex; flex-direction: column; }
.qlist.is-swapping { animation: swap .32s ease; }
@keyframes swap { 0% { opacity: 0; transform: translateY(16px); } 100% { opacity: 1; transform: none; } }

.qrow {
  padding: 30px 4px;
  border-bottom: 1px solid var(--line);
}
.qrow:last-child { border-bottom: none; }
.qrow__text {
  font-size: clamp(19px, 3vw, 26px); font-weight: 700; text-align: center;
  max-width: 22em; margin: 0 auto 22px; line-height: 1.25;
}
.qrow.is-unanswered.is-flagged { animation: nudge .4s ease; }
@keyframes nudge { 0%,100% { transform: none; } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.qrow.is-flagged .scale__dots { box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 30%, transparent); border-radius: 999px; }

/* the signature dot scale */
.scale {
  width: 100%;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px;
}
.scale__label { font-weight: 700; font-size: 15px; }
.scale__label--agree { color: var(--agree); }
.scale__label--disagree { color: var(--disagree); }
.scale__dots { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dot {
  --d: 38px;
  width: var(--d); height: var(--d); border-radius: 50%;
  border: 2.5px solid var(--dot-color);
  background: transparent;
  position: relative; flex: 0 0 auto;
  transition: transform .14s ease, background .14s ease, box-shadow .2s ease;
}
.dot::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: var(--dot-color); opacity: 0; transform: scale(.5); transition: opacity .14s ease, transform .14s ease;
}
.dot:hover { transform: scale(1.12); }
.dot:hover::after { opacity: .14; transform: scale(1); }
.dot.is-on { background: var(--dot-color); box-shadow: 0 6px 16px color-mix(in srgb, var(--dot-color) 45%, transparent); }
.dot.is-on::after { opacity: 0; }
.dot:focus-visible { outline: 3px solid color-mix(in srgb, var(--dot-color) 50%, #fff); outline-offset: 3px; }

.page-nav {
  margin-top: 32px; display: flex; align-items: center; gap: 16px; justify-content: space-between;
}
.page-nav__hint { color: var(--ink-dim); font-size: 14px; text-align: center; flex: 1; }
.page-nav__prev { min-width: 120px; }
.page-nav__next { min-width: 150px; --accent: var(--accent); }
.page-nav__next:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; transform: none; }

/* ════════════════════════ RESULT VIEW ════════════════════════ */
.view--result { min-height: 100vh; background: var(--bg-alt); }
.result { max-width: 740px; margin: 0 auto; padding: 40px 22px 80px; }

.rcard {
  background: #fff; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg);
}
.rcard__hero {
  position: relative; padding: 44px 32px 40px; text-align: center; color: #fff; overflow: hidden;
  background: linear-gradient(140deg, var(--accent) 0%, color-mix(in srgb, var(--accent) 60%, #1a1f44) 110%);
}
.rcard__hero::before, .rcard__hero::after {
  content: ""; position: absolute; border-radius: 50%; background: rgba(255,255,255,.12);
}
.rcard__hero::before { width: 220px; height: 220px; top: -110px; right: -60px; }
.rcard__hero::after  { width: 150px; height: 150px; bottom: -90px; left: -40px; }
.rcard__zonechip {
  position: relative; display: inline-flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  background: rgba(255,255,255,.2); padding: 6px 14px; border-radius: 999px; margin-bottom: 16px;
}
.rcard__zonechip .ddot { width: 9px; height: 9px; border-radius: 50%; background: #fff; }
.rcard__art { position: relative; display: block; width: 108px; height: 108px; object-fit: contain; margin: 8px auto 2px; filter: drop-shadow(0 12px 20px rgba(0,0,0,.24)); }
.rcard__name { position: relative; font-size: clamp(34px, 6vw, 50px); }
.rcard__tagline { position: relative; font-size: 19px; opacity: .92; margin-top: 8px; font-style: italic; }

/* score gauge */
.gauge { position: relative; width: 132px; height: 132px; margin: 26px auto 0; }
.gauge svg { transform: rotate(-90deg); }
.gauge__track { fill: none; stroke: rgba(255,255,255,.22); stroke-width: 11; }
.gauge__fill { fill: none; stroke: #fff; stroke-width: 11; stroke-linecap: round; transition: stroke-dashoffset 1s cubic-bezier(.2,.7,.2,1); }
.gauge__val { position: absolute; inset: 0; display: grid; place-items: center; }
.gauge__val b { font-size: 34px; font-weight: 800; line-height: 1; }
.gauge__val span { font-size: 12px; opacity: .85; display: block; margin-top: 2px; }

.rcard__body { padding: 30px 32px 34px; }
.rblock + .rblock { margin-top: 24px; }
.rblock__h {
  font-size: 13px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 8px;
}
.rblock__p { font-size: 17px; color: var(--ink); line-height: 1.6; }
.rblock__p--muted { color: var(--ink-soft); }

.actions-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.actions-list li {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--bg-alt); padding: 14px 16px; border-radius: 14px; font-size: 16px;
}
.actions-list .tick {
  flex: 0 0 auto; width: 24px; height: 24px; border-radius: 50%;
  background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 13px; font-weight: 800;
}

.rbadges { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 22px; }

.rcard__foot {
  margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line);
  display: flex; gap: 12px; flex-wrap: wrap;
}
.rcard__foot .btn { flex: 1; min-width: 180px; }
.rcard__foot .btn--primary { --accent: var(--accent); }

/* DASS-style neutral bars (for sensitive products) */
.mind-bars { display: flex; flex-direction: column; gap: 18px; margin-top: 6px; }
.mind-bar__top { display: flex; justify-content: space-between; font-weight: 700; font-size: 15px; }
.mind-bar__track { margin-top: 7px; height: 12px; border-radius: 999px; background: var(--bg-alt); overflow: hidden; }
.mind-bar__fill { height: 100%; border-radius: 999px; transition: width .9s cubic-bezier(.2,.7,.2,1); }

.support-card {
  margin-top: 24px; background: #fbf3ef; border: 1px solid #f0d9cf; border-radius: 16px; padding: 20px 22px;
}
.support-card h4 { margin: 0 0 8px; font-size: 18px; color: #a4502f; }
.support-card p { color: #7d5443; font-size: 15px; line-height: 1.6; }

.result__disclaimer { text-align: center; color: var(--ink-dim); font-size: 13.5px; margin-top: 26px; line-height: 1.6; }

.next-tests { margin-top: 34px; }
.next-tests h3 { font-size: 20px; text-align: center; margin-bottom: 18px; }
.next-tests__row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.mini-card {
  background: #fff; border-radius: 16px; box-shadow: var(--shadow-sm); border: 1px solid var(--line);
  padding: 16px; text-align: center; transition: transform .15s ease, box-shadow .2s ease;
}
.mini-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.mini-card__dot { width: 48px; height: 48px; border-radius: 14px; margin: 0 auto 10px; display: grid; place-items: center; color: #fff; }
.mini-card__dot svg { width: 24px; height: 24px; }
.mini-card__img { width: 36px; height: 36px; object-fit: contain; }
.mini-card strong { font-size: 15px; display: block; }
.mini-card span { font-size: 12.5px; color: var(--ink-dim); }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px);
  background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 999px;
  font-weight: 600; font-size: 14.5px; box-shadow: var(--shadow-md);
  opacity: 0; pointer-events: none; transition: opacity .25s ease, transform .25s ease; z-index: 80;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ───────────────────────── Responsive ───────────────────────── */
@media (max-width: 920px) {
  .nav__links { display: none; }
  .steps { grid-template-columns: 1fr; }
  .feature { grid-template-columns: 1fr; gap: 28px; padding: 48px 22px; }
  .feature--reverse .feature__media { order: 0; }
  .stats__inner { grid-template-columns: repeat(2, 1fr); gap: 32px 18px; }
  .stat + .stat::before { display: none; }
  .quotes { grid-template-columns: 1fr; }
  .footer__cols { grid-template-columns: 1fr 1fr; gap: 28px; }
}
@media (max-width: 560px) {
  .scale { grid-template-columns: 1fr; gap: 12px; justify-items: center; }
  .scale__dots { width: 100%; gap: 7px; }
  .scale__label--agree { order: -1; }
  .dot { --d: 32px; }
  .qrow__text { font-size: 19px; }
  .nav__login { display: none; }
  .lead-hero h1 { font-size: 32px; }
  .footer__cols { grid-template-columns: 1fr; }
  .next-tests__row { grid-template-columns: 1fr; }
  .rcard__foot .btn { min-width: 100%; }
  .test-top__pct { display: none; }
  .mascot__name { display: none; }
  .page-nav__prev { min-width: 96px; }
  .page-nav__next { min-width: 130px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
