/* ==========================================================================
   DOC2US Weight Health Check microsite
   Visual reference: Canva "NN Risk Assessment Microsite" mockups.
   ========================================================================== */

:root {
  --navy: #192a54;
  --ink: #1b2138;
  --ink-soft: #3e4561;
  --slate: #565e82;
  --lavender: #a57fc2;
  --teal: #88c2c5;
  --peri: #7686c4;
  --peach: #f5d3b6;
  --option: #ffffff;
  --option-on: #e3e5ee;
  --error: #7a1236;

  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
  --serif: 'Instrument Serif', 'Times New Roman', serif;

  --gutter: clamp(16px, 5vw, 104px);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --on-mist: #192a54;          /* all text sitting on the light mist background */
  --on-mist-soft: #2b3558;
  --lift: 0 1px 0 rgba(255, 255, 255, .45);
  --iris-text: linear-gradient(100deg, #34407a 5%, #5a4a98 50%, #7a3f9e 95%);
}

*,
*::before,
*::after { box-sizing: border-box; }

[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink);
  background: #bcc3cc;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }

a { color: inherit; }

button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 50;
  background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 10px; text-decoration: none;
}
.skip-link:focus { top: 12px; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* --------------------------------------------------------------------------
   Atmosphere: soft mist + iridescent halo arcs (the page's signature)
   -------------------------------------------------------------------------- */

.atmos {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(60% 48% at 80% 10%, rgba(140, 196, 190, .7), transparent 70%),
    radial-gradient(55% 45% at 12% 24%, rgba(234, 214, 230, .85), transparent 70%),
    radial-gradient(70% 55% at 50% 58%, rgba(236, 238, 242, .85), transparent 72%),
    radial-gradient(60% 50% at 8% 78%, rgba(160, 168, 182, .75), transparent 70%),
    linear-gradient(180deg, #bac7d4 0%, #cbd0d7 46%, #b1b4ba 100%);
}

.atmos__glow {
  position: absolute;
  left: 50%;
  top: calc(38vh - min(1150px, 125vw) / 1.45);
  width: min(1150px, 125vw);
  aspect-ratio: 1.45;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(158, 192, 232, .75), rgba(176, 214, 222, .45) 62%, rgba(176, 214, 222, 0) 100%);
}

.halo {
  --c0: #f6d4b8;
  --c1: #eec5d9;
  --c2: #a8c2ef;
  --c3: #b7e5e6;
  position: absolute;
  left: 50%;
  border-radius: 50%;
  /* 0deg = bottom of the ring: bright lower arc, sides fade out, top is invisible */
  background: conic-gradient(from 180deg, var(--c0) 0deg, var(--c1) 36deg, var(--c2) 78deg, transparent 128deg, transparent 232deg, var(--c3) 282deg, var(--c1) 324deg, var(--c0) 360deg);
  -webkit-mask: radial-gradient(closest-side, transparent 88%, #000 96%, transparent 100%);
          mask: radial-gradient(closest-side, transparent 88%, #000 96%, transparent 100%);
  transform: translateX(-50%);
  will-change: transform;
  animation: halo-drift 22s ease-in-out infinite alternate;
}

.halo--1 {
  top: calc(38vh - min(1150px, 125vw) / 1.45);
  width: min(1150px, 125vw);
  aspect-ratio: 1.45;
  filter: blur(5px);
  opacity: .95;
}

.halo--2 {
  top: calc(64vh - min(1760px, 180vw) / 1.9);
  width: min(1760px, 180vw);
  aspect-ratio: 1.9;
  filter: blur(9px);
  opacity: .6;
  animation-duration: 28s;
  animation-delay: -6s;
}

.halo--3 {
  --c0: #c4f1f6;
  --c1: #d4eef2;
  --c2: #c9d4e4;
  --c3: #dfe6ea;
  top: calc(89vh - min(2200px, 230vw) / 2.7);
  width: min(2200px, 230vw);
  aspect-ratio: 2.7;
  filter: blur(6px);
  opacity: .75;
  animation-duration: 34s;
  animation-delay: -12s;
}

@keyframes halo-drift {
  from { transform: translateX(-50%) translateY(0) scale(1); }
  to { transform: translateX(-50%) translateY(1.6vh) scale(1.02); }
}

/* Result view: settle the halo higher so the card area stays calm */
body[data-view="result"] .halo--1,
body[data-view="result"] .atmos__glow { top: calc(26vh - min(1150px, 125vw) / 1.45); }

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.topbar {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: clamp(16px, 3vw, 44px) var(--gutter) 0 clamp(16px, 3.6vw, 68px);
}

.topbar__logo img { width: clamp(120px, 11vw, 190px); height: auto; }

.topbar__nav { display: flex; align-items: center; gap: clamp(16px, 4.6vw, 92px); }

.topbar__link {
  font-size: clamp(15px, 1.1vw, 22px);
  font-weight: 500;
  color: var(--on-mist);
  text-decoration: none;
  text-shadow: var(--lift);
  padding: 6px 0;
  border-bottom: 1.5px solid transparent;
  transition: border-color .2s;
}
.topbar__link:hover { border-bottom-color: var(--on-mist); }
.topbar__lang { min-width: 2.2em; text-align: center; }

/* --------------------------------------------------------------------------
   Type
   -------------------------------------------------------------------------- */

.display {
  margin: 0;
  font-family: var(--sans);
  font-weight: 400;
  font-size: clamp(38px, 5.4vw, 96px);
  line-height: 1.04;
  letter-spacing: -.045em;
  color: var(--on-mist);
  text-shadow: var(--lift);
  text-wrap: balance;
}

.display em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -.012em;
  padding-right: .05em;
}

.display--center { text-align: center; }
.display--md { font-size: clamp(34px, 4vw, 70px); }
.display--lg { font-size: clamp(40px, 5.2vw, 96px); }
.display--xl { font-size: clamp(46px, 6.2vw, 116px); }

/* Accent words on quiz screens: slate → lavender, as in the mockups */
.iris-em em,
.hero .display em,
.screen--consent .display em,
.closing__title em {
  background: var(--iris-text);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  text-shadow: none;
}

.eyebrow {
  margin: 0 0 16px;
  font-size: clamp(13px, 1vw, 16px);
  font-weight: 500;
  letter-spacing: .02em;
  color: var(--on-mist-soft);
}

/* Chinese: no faux-italic serif; accent keeps the colour, not the face */
:lang(zh-Hans) .display { letter-spacing: 0; line-height: 1.18; }
:lang(zh-Hans) .display em,
:lang(zh-Hans) .closing__title em { font-family: var(--sans); font-style: normal; font-weight: 500; letter-spacing: 0; }
:lang(zh-Hans) .result__quote { font-family: var(--sans); font-style: normal; }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.arrow { width: 36px; height: 14px; flex: none; transition: transform .3s var(--ease); }

.btn-glass {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  min-height: clamp(58px, 4.6vw, 86px);
  padding: 0 clamp(30px, 2.8vw, 54px);
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, .9);
  background: linear-gradient(90deg, #2c7a82 0%, #4d6ea8 52%, #3b4a94 100%);
  color: #fff;
  font-size: clamp(19px, 1.45vw, 26px);
  font-weight: 500;
  text-shadow: 0 1px 2px rgba(20, 30, 60, .25);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), 0 18px 36px -18px rgba(40, 60, 120, .6);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.btn-glass:hover { transform: translateY(-2px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), 0 24px 44px -18px rgba(40, 60, 120, .7); }
.btn-glass:hover .arrow { transform: translateX(5px); }
.btn-glass--solid { background: linear-gradient(90deg, #192a54, #3d4f8c); border-color: rgba(255, 255, 255, .6); }

.btn-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 72px;
  padding: 0 clamp(28px, 2.6vw, 48px);
  border-radius: 20px;
  background: #fff;
  color: #10131f;
  font-size: clamp(18px, 1.4vw, 26px);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .9), 0 10px 36px 6px rgba(146, 104, 214, .5);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.btn-cta:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px #fff, 0 14px 44px 10px rgba(146, 104, 214, .6); }

.btn-text {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 18px;
  font-weight: 500;
  color: var(--navy);
}
.btn-text:hover .arrow--back { transform: translateX(-5px); }

/* --------------------------------------------------------------------------
   Landing
   -------------------------------------------------------------------------- */

.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(120px, 15vh, 176px) var(--gutter) 40px;
  text-align: center;
}

.hero .display {
  font-weight: 600;
  font-size: clamp(44px, 6.4vw, 116px);
  letter-spacing: -.05em;
  line-height: 1.02;
}
.hero .display em { font-weight: 400; }

.hero__sub {
  margin: clamp(22px, 3vh, 40px) 0 clamp(28px, 4vh, 48px);
  font-size: clamp(18px, 1.55vw, 28px);
  letter-spacing: .01em;
  color: var(--on-mist-soft);
}

.hero__meta { margin: 18px 0 0; font-size: 14px; font-weight: 500; color: var(--on-mist-soft); }

.stats {
  width: min(1760px, 100%);
  margin-top: auto;
  padding-top: clamp(40px, 6vh, 72px);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(12px, 1.2vw, 22px);
  text-align: left;
}

.stat {
  min-height: clamp(220px, 22vw, 380px);
  padding: clamp(28px, 3vw, 56px) clamp(24px, 2.6vw, 52px);
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  background: linear-gradient(165deg, rgba(255, 255, 255, .55), rgba(255, 255, 255, .16));
  border: 1px solid rgba(255, 255, 255, .6);
  -webkit-backdrop-filter: blur(18px);
          backdrop-filter: blur(18px);
  box-shadow: 0 30px 60px -40px rgba(30, 40, 80, .45);
}

.stat__num {
  margin: 0;
  font-size: clamp(64px, 7.6vw, 150px);
  font-weight: 400;
  line-height: .95;
  letter-spacing: -.055em;
  color: #0e1120;
}
.stat__num sup { font-size: .34em; vertical-align: top; position: relative; top: .1em; margin-left: .1em; letter-spacing: 0; }

.stat__label { margin: 0; max-width: 20ch; font-size: clamp(17px, 1.45vw, 28px); line-height: 1.25; color: #151a2c; }

.stat--iris {
  background:
    radial-gradient(55% 65% at 55% 30%, rgba(244, 238, 214, .85), rgba(244, 238, 214, 0) 70%),
    linear-gradient(130deg, #7fbfc3 0%, #9ccfcf 34%, #b8c2e0 70%, #6d7ebf 100%);
  border-color: rgba(255, 255, 255, .45);
}
.stat--iris .stat__num,
.stat--iris .stat__label { color: var(--on-mist); }

.stats__source { margin: 14px 0 0; align-self: flex-end; font-size: 13px; color: var(--on-mist-soft); }

/* FAQ */
.faq {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.25fr);
  gap: clamp(28px, 5vw, 110px);
  padding: clamp(64px, 10vw, 150px) var(--gutter);
  align-items: start;
}
.faq > .display { position: sticky; top: 60px; font-size: clamp(36px, 4.4vw, 80px); }

.faq__list { display: grid; gap: 14px; }

.faq__item {
  border-radius: 26px;
  background: #fff;
  box-shadow: 0 16px 40px -30px rgba(30, 40, 80, .5);
}

.faq__item summary {
  display: grid;
  grid-template-columns: clamp(44px, 4vw, 68px) 1fr 28px;
  align-items: center;
  gap: 16px;
  padding: clamp(18px, 1.8vw, 30px) clamp(20px, 2.2vw, 40px);
  cursor: pointer;
  list-style: none;
}
.faq__item summary::-webkit-details-marker { display: none; }

.faq__num {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(30px, 2.6vw, 48px);
  line-height: 1;
  color: #8e5b73;
}

.faq__q { font-size: clamp(17px, 1.5vw, 27px); font-weight: 600; line-height: 1.3; color: #2b3150; letter-spacing: -.01em; }

.faq__icon { position: relative; width: 22px; height: 22px; justify-self: end; }
.faq__icon::before,
.faq__icon::after {
  content: '';
  position: absolute;
  left: 0; right: 0; top: 50%;
  height: 1.6px;
  background: #1b2138;
  transition: transform .3s var(--ease);
}
.faq__icon::after { transform: rotate(90deg); }
.faq__item[open] .faq__icon::after { transform: rotate(0deg); }

.faq__a {
  margin: 0;
  padding: 0 clamp(20px, 2.2vw, 40px) clamp(22px, 2vw, 34px) calc(clamp(20px, 2.2vw, 40px) + clamp(44px, 4vw, 68px) + 16px);
  font-size: clamp(16px, 1.25vw, 22px);
  line-height: 1.6;
  color: #3a4058;
}

/* Closing band */
.closing {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 40px;
  padding: clamp(56px, 7vw, 100px) var(--gutter);
  background: linear-gradient(100deg, #a8c5df 0%, #c3d1e2 45%, #e3e2e9 100%);
}
.closing__logo { width: clamp(150px, 13vw, 230px); height: auto; margin-bottom: 24px; }
.closing__title {
  margin: 0;
  font-size: clamp(38px, 4vw, 72px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -.045em;
  color: var(--on-mist);
}
.closing__title em { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -.01em; -webkit-background-clip: text; background-clip: text; color: transparent; }
.closing__body { max-width: 62ch; margin: 18px 0 0; font-size: clamp(17px, 1.5vw, 26px); color: var(--navy); line-height: 1.45; }
.closing__actions { display: flex; flex-direction: column; align-items: center; gap: 18px; }

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 24px;
  padding: 40px var(--gutter) 96px;
  background: var(--navy);
  color: rgba(255, 255, 255, .82);
  font-size: 14px;
}
.footer p { margin: 0 0 6px; }
.footer a { color: #fff; text-underline-offset: 3px; }
.footer__company { font-weight: 600; color: #fff; }
.footer__right { text-align: right; }
.footer__social { display: flex; gap: 18px; justify-content: flex-end; }

.float-cta {
  position: fixed;
  right: clamp(16px, 5vw, 110px);
  bottom: clamp(16px, 3vw, 48px);
  z-index: 15;
  transition: opacity .3s, transform .3s var(--ease), box-shadow .25s;
}
.float-cta.is-hidden { opacity: 0; transform: translateY(16px); pointer-events: none; }

/* --------------------------------------------------------------------------
   Assessment flow
   -------------------------------------------------------------------------- */

.screen {
  min-height: 100svh;
  display: grid;
  align-content: center;
  padding: clamp(120px, 14vh, 170px) var(--gutter) clamp(140px, 16vh, 180px);
}

.screen--split {
  grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr);
  column-gap: clamp(32px, 4vw, 90px);
  row-gap: 20px;
  align-items: center;
}
.screen--split > .question { display: contents; }
.screen--split .question__head { grid-column: 1; }
.screen--split .options,
.screen--split .question > .field-error { grid-column: 2; }

.screen--stack { justify-items: center; }
.screen--stack .question { width: min(1720px, 100%); }
.screen--stack .question__head { text-align: center; margin-bottom: clamp(32px, 6vh, 90px); }

.screen--center { justify-items: center; text-align: center; }

.screen--consent {
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  column-gap: clamp(32px, 5vw, 110px);
  align-items: center;
}
.screen--consent .display { font-size: clamp(48px, 6.8vw, 124px); line-height: 1; }

.consent {
  max-width: 680px;
  padding: clamp(24px, 3vw, 48px);
  border-radius: 28px;
  background: rgba(255, 255, 255, .66);
  border: 1px solid rgba(255, 255, 255, .8);
  -webkit-backdrop-filter: blur(20px);
          backdrop-filter: blur(20px);
  box-shadow: 0 30px 70px -40px rgba(30, 40, 80, .5);
  font-size: clamp(15px, 1.1vw, 18px);
  line-height: 1.6;
  color: var(--ink);
}
.consent p { margin: 0 0 14px; }
.consent a { color: var(--navy); font-weight: 600; text-underline-offset: 3px; }
.consent .btn-glass { margin-top: 10px; width: 100%; }

.check {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 14px;
  align-items: start;
  margin: 20px 0 8px;
  padding: 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .7);
  cursor: pointer;
  font-weight: 500;
}
.check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check__box {
  width: 28px; height: 28px;
  border-radius: 8px;
  border: 2px solid var(--navy);
  background: #fff;
  display: grid;
  place-items: center;
}
.check input:checked + .check__box { background: var(--navy); }
.check input:checked + .check__box::after {
  content: '';
  width: 12px; height: 7px;
  border-left: 2.5px solid #fff;
  border-bottom: 2.5px solid #fff;
  transform: rotate(-45deg) translate(1px, -1px);
}
.check input:focus-visible + .check__box { outline: 3px solid var(--navy); outline-offset: 3px; }

/* Options */
.options { display: grid; gap: clamp(12px, 1.4vw, 22px); }
.options--2col { grid-template-columns: 1fr 1fr; column-gap: clamp(16px, 2vw, 38px); }

.option {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: clamp(60px, 5.4vw, 104px);
  padding: 10px clamp(18px, 1.8vw, 34px) 10px clamp(22px, 2.4vw, 50px);
  border-radius: 999px;
  border: 2px solid transparent;
  background: var(--option);
  color: #0f1220;
  font-size: clamp(16px, 1.45vw, 28px);
  line-height: 1.25;
  box-shadow: 0 12px 30px -20px rgba(30, 40, 80, .45);
  cursor: pointer;
  transition: background .2s, border-color .2s, transform .2s var(--ease);
}
.option:hover { transform: translateY(-1px); }
.option input { position: absolute; opacity: 0; width: 1px; height: 1px; }

.option__mark {
  flex: none;
  width: clamp(26px, 2.2vw, 42px);
  height: clamp(26px, 2.2vw, 42px);
  border-radius: 50%;
  border: 2.5px solid #0f1220;
  display: grid;
  place-items: center;
  color: #fff;
  transition: background .2s, border-color .2s;
}
.option__mark svg { width: 72%; height: 72%; opacity: 0; transform: scale(.6); transition: opacity .2s, transform .25s var(--ease); }

.option:has(input:checked) { background: var(--option-on); border-color: var(--slate); }
.option:has(input:checked) .option__mark { background: var(--slate); border-color: var(--slate); }
.option:has(input:checked) .option__mark svg { opacity: 1; transform: none; }
.option:has(input:focus-visible) { outline: 3px solid var(--navy); outline-offset: 3px; }

/* Glass panel + pill inputs */
.panel {
  padding: clamp(26px, 4vw, 80px) clamp(22px, 4vw, 76px) clamp(34px, 5vw, 110px);
  border-radius: 28px;
  background:
    radial-gradient(42% 58% at 56% 42%, rgba(247, 238, 218, .88), rgba(247, 238, 218, 0) 70%),
    linear-gradient(120deg, #7ebbbf 0%, #9ccbcb 30%, #c9d9d4 50%, #b6c0df 76%, #6f80bf 100%);
  box-shadow: 0 40px 90px -50px rgba(30, 40, 100, .6);
}

.panel__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(22px, 3vw, 52px) clamp(18px, 4vw, 80px);
}

.field { display: grid; gap: 14px; align-content: start; }
.field--wide { grid-column: 1 / -1; }
.field--solo { width: min(780px, 100%); margin-top: clamp(40px, 8vh, 110px); justify-items: center; }

.field__label {
  font-size: clamp(20px, 2vw, 40px);
  font-weight: 500;
  letter-spacing: -.035em;
  color: var(--on-mist);
}
.field__label--lg { font-size: clamp(22px, 2.3vw, 44px); }
.field__opt { font-size: .55em; letter-spacing: 0; }
.field__hint { margin: 0; font-size: 14px; font-weight: 500; color: var(--on-mist); }

.pill-input {
  width: 100%;
  height: clamp(56px, 4.8vw, 90px);
  padding: 0 28px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, .92);
  background: linear-gradient(115deg, rgba(255, 255, 255, .8) 0%, rgba(255, 255, 255, .36) 48%, rgba(255, 255, 255, .6) 100%);
  box-shadow: inset 0 2px 6px rgba(255, 255, 255, .9), inset 0 -8px 16px rgba(110, 130, 170, .16), 0 10px 26px -16px rgba(30, 40, 90, .45);
  font: 500 clamp(18px, 1.5vw, 26px) var(--sans);
  color: #121830;
  -webkit-appearance: none;
          appearance: none;
  transition: box-shadow .2s, border-color .2s;
}
.pill-input:focus { outline: none; border-color: #fff; box-shadow: inset 0 2px 6px rgba(255, 255, 255, .9), 0 0 0 4px rgba(25, 42, 84, .45); }
.pill-input[aria-invalid="true"] { border-color: #d8a9bd; }
.pill-input--xl {
  height: clamp(68px, 9vw, 170px);
  font-size: clamp(22px, 2.4vw, 42px);
  text-align: center;
}
.pill-input::-webkit-outer-spin-button,
.pill-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pill-input[type="number"] { -moz-appearance: textfield; }

.select-wrap { position: relative; }
.select-wrap::after {
  content: '';
  position: absolute;
  right: 30px; top: 50%;
  width: 14px; height: 14px;
  border-right: 2.5px solid var(--on-mist);
  border-bottom: 2.5px solid var(--on-mist);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}
.select-wrap .pill-input { padding-right: 64px; cursor: pointer; }

.unit-wrap { position: relative; }
.unit-wrap::after {
  content: attr(data-unit);
  position: absolute;
  right: 30px; top: 50%;
  transform: translateY(-50%);
  font-size: clamp(15px, 1.2vw, 22px);
  color: #3a4262;
  pointer-events: none;
}
.unit-wrap .pill-input { padding-right: 72px; }

.field-error {
  margin: 0;
  width: fit-content;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .88);
  color: var(--error);
  font-size: 15px;
  font-weight: 500;
}
.field-error:empty { display: none; }

/* Target weight slider */
.range-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.range-value {
  font-size: clamp(22px, 2.2vw, 42px);
  font-weight: 600;
  letter-spacing: -.03em;
  color: var(--on-mist);
  white-space: nowrap;
}

.range {
  --pct: 50%;
  width: 100%;
  height: 40px;
  margin: 6px 0 0;
  background: transparent;
  -webkit-appearance: none;
          appearance: none;
  cursor: pointer;
}
.range::-webkit-slider-runnable-track {
  height: 22px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 255, 255, .95) var(--pct), rgba(255, 255, 255, .62) var(--pct));
  box-shadow: inset 0 1px 3px rgba(40, 50, 90, .18);
}
.range::-moz-range-track {
  height: 22px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 255, 255, .95) var(--pct), rgba(255, 255, 255, .62) var(--pct));
}
.range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 76px; height: 40px;
  margin-top: -9px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(255, 255, 255, .9);
  box-shadow: 0 6px 16px rgba(30, 40, 90, .3), inset 0 -3px 6px rgba(120, 140, 180, .2);
}
.range::-moz-range-thumb {
  width: 76px; height: 40px;
  border-radius: 999px;
  background: #fff;
  border: 0;
  box-shadow: 0 6px 16px rgba(30, 40, 90, .3);
}
.range:focus-visible { outline: 3px solid var(--navy); outline-offset: 4px; border-radius: 999px; }

/* Step navigation */
.flow-nav {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: clamp(20px, 4vw, 70px);
  padding: 18px var(--gutter) calc(clamp(18px, 3.4vh, 40px) + env(safe-area-inset-bottom));
}

.flow-nav__btn {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  min-height: 48px;
  padding: 0 6px;
  font-size: clamp(18px, 1.5vw, 28px);
  font-weight: 500;
  color: var(--on-mist);
  text-shadow: var(--lift);
}
.flow-nav__btn[data-action="back"] { justify-self: end; }
.flow-nav__btn[data-action="next"] { justify-self: start; }
.flow-nav__btn:hover .arrow { transform: translateX(5px); }
.flow-nav__btn:hover .arrow--back { transform: translateX(-5px); }

.progress { display: grid; justify-items: center; gap: 8px; min-width: 130px; }
.progress__text { font-size: 13px; font-weight: 600; letter-spacing: .03em; color: var(--on-mist); }
.progress__track { width: 120px; height: 3px; border-radius: 3px; background: rgba(25, 42, 84, .2); overflow: hidden; }
.progress__fill { display: block; height: 100%; background: var(--on-mist); transition: width .5s var(--ease); }

#flow[data-step="consent"] [data-action="next"],
#flow[data-step="consent"] .progress { visibility: hidden; }

/* Step entrance */
@keyframes rise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes fall { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: none; } }

.is-entering :is(h2, .eyebrow, .panel, .field--solo, .consent) { animation: rise .7s var(--ease) both; }
.is-entering :is(.panel, .field--solo, .consent) { animation-delay: .12s; }
.is-entering .option { animation: rise .55s var(--ease) both; animation-delay: calc(var(--i, 0) * 50ms + 140ms); }
.is-entering-back :is(h2, .eyebrow, .panel, .field--solo, .consent, .option) { animation: fall .5s var(--ease) both; }

/* --------------------------------------------------------------------------
   Result
   -------------------------------------------------------------------------- */

.result { padding: clamp(110px, 14vh, 170px) 0 40px; }

.result__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .72fr) minmax(0, .95fr);
  gap: clamp(20px, 2.4vw, 48px);
  align-items: center;
  padding: 0 var(--gutter);
}

.result__intro .display { margin-bottom: clamp(28px, 6vh, 80px); }

.result__name {
  margin: 0;
  font-size: clamp(32px, 3.2vw, 62px);
  font-weight: 600;
  letter-spacing: -.035em;
  line-height: 1.05;
  color: var(--on-mist);
}

.result__quote {
  margin: 10px 0 clamp(24px, 5vh, 70px);
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(24px, 2.3vw, 44px);
  line-height: 1.15;
  color: #3d4468;
}

.result__desc {
  position: relative;
  margin: 0;
  max-width: 28ch;
  padding-left: clamp(52px, 4.4vw, 90px);
  font-size: clamp(18px, 1.5vw, 28px);
  line-height: 1.45;
  color: var(--ink);
}
.result__desc::before {
  content: '✻';
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  font-size: clamp(34px, 3vw, 58px);
  line-height: 1;
  color: #6a4c9c;
}

.result__figure { margin: 0; display: grid; place-items: center; }
.result__figure img {
  width: auto;
  max-height: min(64vh, 640px);
  object-fit: contain;
  filter: drop-shadow(0 26px 26px rgba(30, 40, 80, .22));
}

.bmi-card {
  padding: clamp(22px, 2.2vw, 40px);
  border-radius: 36px;
  background: linear-gradient(160deg, #d9e8f8 0%, #c9d6f4 50%, #e8eff9 100%);
  border: 1.5px solid rgba(255, 255, 255, .85);
  box-shadow: 0 40px 80px -50px rgba(30, 40, 100, .6);
}

.gauge { position: relative; max-width: 420px; margin: 0 auto; }
.gauge svg { width: 100%; height: auto; overflow: visible; }
.gauge__track { fill: none; stroke: rgba(90, 110, 170, .16); stroke-width: 32; stroke-linecap: round; }
.gauge__seg { fill: none; stroke: rgba(255, 255, 255, .78); stroke-width: 26; stroke-linecap: round; transition: stroke .4s; }
.gauge__seg.is-active { stroke: url(#g-active); }
.gauge__ticks text { font: 600 12px var(--sans); fill: #2e3656; }
.gauge__dot { fill: #fff; stroke: var(--navy); stroke-width: 3; }

.gauge__center {
  position: absolute;
  left: 0; right: 0; bottom: 14%;
  display: grid;
  justify-items: center;
  gap: 2px;
}
.gauge__label { font-size: 15px; font-weight: 500; color: #2e3656; }
.gauge__value {
  font-size: clamp(54px, 5vw, 88px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -.045em;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(100deg, #2f5fc4, #4a52b0);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
}

.bmi-list { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 4px; }
.bmi-list__item { padding: 10px 18px; border-radius: 18px; }
.bmi-list__row { display: flex; justify-content: space-between; gap: 12px; font-size: 16px; color: #252d4c; }
.bmi-list__range { font-variant-numeric: tabular-nums; }
.bmi-list__item.is-active { background: rgba(255, 255, 255, .72); padding: 14px 18px; box-shadow: 0 10px 24px -18px rgba(30, 40, 90, .5); }
.bmi-list__item.is-active .bmi-list__name { font-weight: 600; color: #1d2440; }
.bmi-list__item.is-active .bmi-list__name::before {
  content: '';
  display: inline-block;
  width: 8px; height: 8px;
  margin-right: 10px;
  border-radius: 50%;
  background: #5ab5e6;
  vertical-align: middle;
}
.bmi-list__desc { display: block; margin-top: 8px; font-size: 14.5px; line-height: 1.5; color: #2e3656; }

.bmi-card__range { margin: 14px 4px 0; font-size: 14.5px; color: #252d4c; }
.bmi-card__range strong { color: #1d2440; }

.advice {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: clamp(16px, 2vw, 36px);
  margin: clamp(28px, 4vh, 48px) var(--gutter) 0;
  padding: clamp(20px, 2vw, 30px) clamp(20px, 2vw, 30px) clamp(20px, 2vw, 30px) clamp(24px, 2.4vw, 44px);
  border-radius: 999px;
  background: linear-gradient(90deg, #8cc6c8 0%, #a8c6d6 42%, #b8bfe0 74%, #8d99cf 100%);
  box-shadow: 0 30px 60px -40px rgba(30, 40, 100, .55);
}
.advice__icon { width: 44px; height: 44px; fill: #0f1220; }
.advice__text h3 { margin: 0 0 4px; font-size: clamp(20px, 1.8vw, 32px); font-weight: 700; letter-spacing: -.035em; color: #0f1220; }
.advice__text p { margin: 0; font-size: clamp(16px, 1.45vw, 26px); line-height: 1.4; color: #111526; }
.advice__cta { display: grid; justify-items: center; gap: 10px; }
.advice__note { margin: 0; font-size: 13px; font-weight: 500; color: #151c38; text-align: center; }

.result__foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px 32px;
  padding: 26px var(--gutter) 20px;
}
.result__disclaimer { margin: 0; max-width: 70ch; font-size: 14px; color: var(--on-mist); }

/* Entrance for the result reveal */
body[data-view="result"] .result__intro,
body[data-view="result"] .result__figure,
body[data-view="result"] .bmi-card,
body[data-view="result"] .advice { animation: rise .8s var(--ease) both; }
body[data-view="result"] .result__figure { animation-delay: .15s; }
body[data-view="result"] .bmi-card { animation-delay: .3s; }
body[data-view="result"] .advice { animation-delay: .5s; }

/* --------------------------------------------------------------------------
   Privacy (dialog + standalone page)
   -------------------------------------------------------------------------- */

.privacy-dialog {
  width: min(760px, calc(100vw - 32px));
  max-height: 86vh;
  padding: 0;
  border: 0;
  border-radius: 28px;
  background: linear-gradient(160deg, #f1f4f8, #e1e7ef);
  color: var(--ink);
  box-shadow: 0 40px 100px -30px rgba(20, 30, 70, .6);
}
.privacy-dialog::backdrop { background: rgba(40, 50, 80, .35); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.privacy-dialog__head {
  position: sticky;
  top: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 26px 28px 16px 32px;
  background: linear-gradient(#f1f4f8 70%, rgba(241, 244, 248, 0));
}
.privacy-dialog .display,
.privacy-page .display { color: var(--navy); text-shadow: none; font-size: clamp(30px, 3.4vw, 48px); }
.privacy-dialog__close { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: #fff; flex: none; }
.privacy-dialog__close svg { width: 20px; height: 20px; }

.privacy-body { padding: 0 32px 32px; font-size: 16px; line-height: 1.65; }
.privacy-body :is(h2, h3) { margin: 22px 0 6px; font-size: 17px; font-weight: 600; color: var(--navy); }
.privacy-body p { margin: 0; color: #2d3452; }
.privacy-body__updated { font-size: 13px; color: #3e4561; }

.privacy-page { padding: clamp(110px, 14vh, 160px) var(--gutter) 80px; display: grid; justify-items: center; }
.privacy-page__card {
  width: min(820px, 100%);
  padding: clamp(24px, 4vw, 56px) 0 8px;
  border-radius: 28px;
  background: rgba(255, 255, 255, .72);
  border: 1px solid rgba(255, 255, 255, .85);
  -webkit-backdrop-filter: blur(20px);
          backdrop-filter: blur(20px);
  box-shadow: 0 30px 70px -40px rgba(30, 40, 80, .5);
}
.privacy-page__card .display { padding: 0 32px; }
.privacy-page__back { margin: 28px 0 0; }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1100px) {
  .result__grid { grid-template-columns: 1fr 1fr; }
  .result__intro { grid-column: 1 / -1; }
  .result__intro .display { margin-bottom: 24px; }
  .result__quote { margin-bottom: 24px; }
  .advice { border-radius: 32px; }
}

@media (max-width: 860px) {
  body { font-size: 16px; }

  .topbar__nav { gap: 18px; }

  .screen { align-content: start; padding-top: 104px; padding-bottom: 150px; }
  .screen--split,
  .screen--consent { grid-template-columns: 1fr; row-gap: 24px; }
  .screen--split .options,
  .screen--split .question > .field-error { grid-column: 1; }
  .screen--stack .question__head { margin-bottom: 24px; }
  .screen--consent .display { font-size: clamp(44px, 12vw, 64px); }
  .options--2col { grid-template-columns: 1fr; }
  .field--solo { margin-top: 32px; }

  .panel__grid { gap: 22px 14px; }
  .pill-input { padding: 0 18px; }
  .select-wrap .pill-input { padding-right: 40px; }
  .select-wrap::after { right: 18px; width: 10px; height: 10px; }
  .unit-wrap .pill-input { padding-right: 48px; }
  .unit-wrap::after { right: 18px; }
  .flow-nav__btn { font-size: 17px; white-space: nowrap; }
  .field__label { font-size: 20px; }
  .range-value { font-size: 22px; }

  .flow-nav {
    gap: 12px;
    padding-top: 28px;
    background: linear-gradient(to top, rgba(172, 177, 185, .92) 55%, rgba(172, 177, 185, 0));
  }
  .flow-nav__btn { gap: 10px; }
  .flow-nav__btn .arrow { width: 24px; }
  .progress { min-width: 0; }
  .progress__track { width: 72px; }

  .hero { padding-top: 116px; }
  .stats {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 80%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    margin: 0 calc(-1 * var(--gutter));
    padding: 36px var(--gutter) 12px;
    width: calc(100% + 2 * var(--gutter));
    scrollbar-width: none;
  }
  .stats::-webkit-scrollbar { display: none; }
  .stat { scroll-snap-align: center; min-height: 200px; }
  .stats__source { align-self: center; }

  .faq { grid-template-columns: 1fr; }
  .faq > .display { position: static; }
  .faq__item summary { grid-template-columns: 40px 1fr 20px; gap: 12px; }
  .faq__icon { width: 18px; height: 18px; }
  .faq__a { padding-left: 20px; }

  .closing { grid-template-columns: 1fr; }
  .closing__actions { align-items: stretch; }

  .footer { flex-direction: column; }
  .footer__right { text-align: left; }
  .footer__social { justify-content: flex-start; }

  .btn-cta { min-height: 60px; border-radius: 16px; }
  .float-cta { left: 16px; right: 16px; }

  .result { padding-top: 96px; }
  .result__grid { grid-template-columns: 1fr; }
  .result__figure img { max-height: 36vh; }
  .result__desc { max-width: none; }
  .advice { grid-template-columns: auto 1fr; border-radius: 28px; }
  .advice__icon { align-self: start; width: 36px; height: 36px; }
  .advice__cta { grid-column: 1 / -1; }
  .advice__cta .btn-cta { width: 100%; }
  .result__foot { flex-direction: column-reverse; align-items: flex-start; }
}

@media (max-width: 380px) {
  .panel__grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .halo { animation: none; }
}
