:root {
  /* ---- Dark theme (site-wide) ---- */
  --bg: #070b15;
  --surface: #0e1424;
  --surface-2: #121a2e;
  --surface-3: #182238;
  --border: #1c2740;
  --border-strong: #2a3958;
  --text: #c6d2e7;
  --heading: #f2f6fd;
  --muted: #8fa0bc;
  --faint: #64748f;
  --brand: #10b981;
  --brand-dark: #34d399;   /* readable green accent on dark */
  --brand-deep: #059669;   /* gradient depth stop */
  --brand-2: #38bdf8;
  --brand-soft: rgba(16,185,129,.13);
  --high: #10b981;
  --medium: #f59e0b;
  --low: #64748b;
  /* segmented breakdown bars (snapshot gene cards) */
  --seg-off: #243049;
  --seg-good: #22c55e;
  --seg-typical: #3b82f6;
  --seg-risk: #ef4444;
  --seg-note: #a78bfa;
  --radius: 18px;
  --radius-sm: 11px;
  --shadow-sm: 0 2px 10px rgba(0,0,0,.28);
  --shadow: 0 14px 40px -18px rgba(0,0,0,.55);
  --shadow-lg: 0 30px 60px -28px rgba(0,0,0,.65);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font: 16px/1.65 "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  position: relative;
}
/* ---------- Ambient gradient backdrop (soft, drifting brand-color wash) ---------- */
body::before {
  content: ""; position: fixed; inset: -20%; z-index: -2; pointer-events: none;
  background:
    radial-gradient(closest-side, rgba(16,185,129,.14), transparent 70%) 6% 6% / 58vw 58vw no-repeat,
    radial-gradient(closest-side, rgba(56,189,248,.13), transparent 70%) 97% 4% / 62vw 62vw no-repeat,
    radial-gradient(closest-side, rgba(139,92,246,.12), transparent 70%) 48% 102% / 60vw 60vw no-repeat,
    radial-gradient(closest-side, rgba(45,212,191,.10), transparent 70%) 82% 60% / 48vw 48vw no-repeat;
  filter: blur(22px);
  animation: bg-drift 28s ease-in-out infinite alternate;
}
/* faint grain to keep the gradients smooth and premium (no banding) */
body::after {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .3;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.04'/%3E%3C/svg%3E");
}
@keyframes bg-drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(0, -2.5%, 0) scale(1.05); }
}
@media (prefers-reduced-motion: reduce) { body::before { animation: none; } }
h1, h2, h3 { color: var(--heading); letter-spacing: -.02em; font-weight: 800; }

/* ---------- Nav ---------- */
.nav { position: sticky; top: 0; z-index: 20; background: rgba(7,11,21,.78);
  backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--border); }
.nav-inner { max-width: 1080px; margin: 0 auto; padding: 10px 22px; display: flex; align-items: center; justify-content: space-between; }
.brand { font-weight: 800; font-size: 1.15rem; color: var(--heading); text-decoration: none; letter-spacing: -.02em;
  display: inline-flex; align-items: center; }
img.dna { width: 22px; height: 22px; margin-right: 6px; vertical-align: -4px; }
.foot-brand img.dna, .rv-brand img.dna { vertical-align: -5px; }
.nav-links { display: flex; align-items: center; gap: 18px; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: .92rem; font-weight: 500; white-space: nowrap; }
.nav-links a:hover { color: var(--brand-dark); }
@media (max-width: 880px) { .nav-links { gap: 13px; } .nav-links .badge { display: none; } }
@media (max-width: 640px) { .nav-links a:not(.nav-login) { display: none; } }
.badge { background: rgba(16,185,129,.08); border: 1px solid rgba(16,185,129,.45); color: #34d399;
  font-size: .74rem; font-weight: 600; padding: 5px 12px; border-radius: 999px; white-space: nowrap; }

/* ---------- Opening reveal (Cluely-style blur / rise fade-in) ---------- */
@keyframes reveal-up {
  from { opacity: 0; transform: translateY(24px); filter: blur(8px); }
  to   { opacity: 1; transform: translateY(0);    filter: blur(0); }
}
@keyframes soft-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes results-reveal {
  from { opacity: 0; transform: translateY(16px) scale(.992); filter: blur(6px); }
  to   { opacity: 1; transform: none; filter: blur(0); }
}
/* the reveal easing: a slow, premium decelerate (ease-out-expo-ish) */
.nav        { animation: soft-fade 1s ease both; }
.eyebrow    { animation: reveal-up .9s cubic-bezier(.16,1,.3,1) .05s both; }
.hero h1    { animation: reveal-up 1s  cubic-bezier(.16,1,.3,1) .15s both; }
.hero .sub  { animation: reveal-up 1s  cubic-bezier(.16,1,.3,1) .30s both; }
.hero-chips { animation: reveal-up 1s  cubic-bezier(.16,1,.3,1) .40s both; }
.hero .cta  { animation: reveal-up 1s  cubic-bezier(.16,1,.3,1) .50s both; }
.hero-note  { animation: reveal-up 1s  cubic-bezier(.16,1,.3,1) .60s both; }
.hero-cards { animation: reveal-up 1.1s cubic-bezier(.16,1,.3,1) .35s both; }
.hero-mid   { animation: soft-fade 1.4s ease .45s both; }
.hero::before { content: ""; position: absolute; inset: 0; background: var(--bg); z-index: 5;
  animation: soft-fade .8s ease reverse both; pointer-events: none; }

/* scroll-triggered reveal (only when JS is present, so no-JS users see content) */
.has-js .reveal { opacity: 0; transform: translateY(26px); filter: blur(8px);
  transition: opacity .8s cubic-bezier(.16,1,.3,1), transform .8s cubic-bezier(.16,1,.3,1), filter .8s cubic-bezier(.16,1,.3,1);
  transition-delay: var(--reveal-delay, 0s); }
.has-js .reveal.in { opacity: 1; transform: none; filter: blur(0); }
.steps .step:nth-child(2) { --reveal-delay: .1s; }
.steps .step:nth-child(3) { --reveal-delay: .2s; }

@media (prefers-reduced-motion: reduce) {
  .nav, .eyebrow, .hero h1, .hero .sub, .hero .cta, .hero-chips, .hero-note, .hero-cards, .hero-mid, .hero::before,
  body.results-mode .rv, body.results-mode .rv-sidebar, .rv-pane.active { animation: none !important; }
  /* without its fade-out animation the cover overlay would sit opaque over the hero */
  .hero::before { display: none; }
  .has-js .reveal { opacity: 1 !important; transform: none !important; filter: none !important; transition: none !important; }
}

/* ---------- Hero (three columns: copy | glowing helix | sample cards) ---------- */
.hero { position: relative; overflow: hidden; min-height: calc(100svh - 65px);
  display: flex; flex-direction: column; }
/* soft radial glow behind the center of the hero, like the reference */
.hero::after { content: ""; position: absolute; left: 50%; top: 38%; width: 780px; height: 780px;
  transform: translate(-50%, -50%); border-radius: 50%; pointer-events: none; z-index: 0;
  background: radial-gradient(closest-side, rgba(56,189,248,.10), rgba(139,92,246,.06) 55%, transparent 75%); }
.hero-grid { position: relative; z-index: 1; width: 100%; max-width: 1180px; margin: 0 auto;
  padding: 8px 24px 6px; flex: 1;
  display: grid; grid-template-columns: minmax(0, 1.05fr) 225px minmax(0, 1fr);
  gap: 24px; align-items: center; }
.hero-copy { text-align: left; }
.eyebrow { display: inline-block; text-transform: uppercase; letter-spacing: .2em; font-size: .72rem;
  font-weight: 700; color: #34d399; margin-bottom: 12px; }
.hero h1 { margin: 0; font-size: clamp(1.85rem, 2.9vw, 2.6rem); line-height: 1.07; font-weight: 900; }
.hero h1 .grad, .section-title .grad { background: linear-gradient(95deg, #60a5fa 0%, #38bdf8 30%, #34d399 75%, #a78bfa 105%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero .sub { color: var(--muted); font-size: .92rem; margin: 12px 0 0; max-width: 440px; }
.hero-chips { display: flex; flex-wrap: nowrap; gap: 8px; margin-top: 16px; }
.hchip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 999px;
  border: 1px solid var(--border-strong); background: rgba(18,26,46,.55); color: var(--text);
  font-size: .75rem; font-weight: 600; white-space: nowrap; }
.hchip .ti { width: 14px; height: 14px; }
.cta { display: inline-block; margin-top: 18px; padding: 13px 34px; border-radius: 13px; font-weight: 800;
  color: #fff; text-decoration: none; border: 0; cursor: pointer; font-size: .98rem; letter-spacing: .01em;
  background: linear-gradient(100deg, #6366f1 0%, #0ea5e9 48%, #10b981 100%);
  box-shadow: 0 16px 34px -12px rgba(14,165,233,.55); transition: transform .1s, box-shadow .2s; }
.cta:hover { transform: translateY(-2px); box-shadow: 0 22px 42px -14px rgba(16,185,129,.6); }
.hero-note { display: flex; align-items: center; gap: 7px; color: var(--faint); font-size: .78rem; margin: 11px 2px 0; }
.info-i { display: inline-grid; place-items: center; width: 17px; height: 17px; border-radius: 50%;
  border: 1.5px solid var(--faint); color: var(--faint); font-size: .64rem; font-weight: 700; font-style: normal; flex: none; }
.ti { width: 17px; height: 17px; color: var(--brand-dark); flex: none; }

/* center column: rings + DNA helix + floating icon bubbles */
.hero-mid { position: relative; align-self: stretch; min-height: 370px; }
.rings { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 470px; height: 470px;
  pointer-events: none; opacity: .8; }
.helix { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  height: 104%; width: auto; max-width: none;
  filter: drop-shadow(0 0 18px rgba(56,189,248,.35)) drop-shadow(0 0 40px rgba(139,92,246,.25));
  pointer-events: none; }
/* faint blue dot grid behind the hero visual */
.hero-mid::before { content: ""; position: absolute; inset: -6% -20%; z-index: 0; pointer-events: none;
  background: url("assets/dot-grid-bg.svg") center / 240px 240px repeat; opacity: .35;
  -webkit-mask-image: radial-gradient(closest-side, #000 40%, transparent 90%);
  mask-image: radial-gradient(closest-side, #000 40%, transparent 90%); }
.bub { position: absolute; z-index: 2; display: grid; place-items: center; width: 44px; height: 44px;
  border-radius: 50%; border: 1px solid var(--border-strong); background: rgba(18,26,46,.92);
  box-shadow: var(--shadow-sm); animation: bub-float 6s ease-in-out infinite alternate; }
.bub img { width: 27px; height: 27px; object-fit: contain; display: block; }
.bub-1 { left: -12px; top: 12%; box-shadow: 0 0 26px rgba(139,92,246,.35); }
.bub-2 { right: -14px; top: 44%; box-shadow: 0 0 26px rgba(16,185,129,.35); }
.bub-3 { left: -4px; bottom: 8%; box-shadow: 0 0 26px rgba(56,189,248,.35); }
@keyframes bub-float { from { transform: translateY(-5px); } to { transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { .bub { animation: none; } }

/* right column: stacked sample cards */
.hero-cards { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 10px; max-width: 395px; justify-self: end; width: 100%; }
.mock { background: rgba(13,19,34,.92); border: 1px solid var(--border-strong); border-radius: 15px;
  box-shadow: var(--shadow); backdrop-filter: blur(6px); padding: 10px 14px; }
.mock-head { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-size: .72rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--heading); margin-bottom: 8px; }
.snap-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  font-size: .76rem; font-weight: 600; color: var(--text); margin-top: 6px; }
.snap-row b { font-size: .75rem; font-weight: 700; }
.v-good { color: var(--seg-good); }
.v-typ { color: var(--seg-typical); }
.snap-bar { height: 5px; border-radius: 5px; background: var(--seg-off); margin-top: 5px; overflow: hidden; }
.snap-bar i { display: block; height: 100%; width: var(--w, 50%); border-radius: 5px; }
.snap-bar .f-good { background: linear-gradient(90deg, #059669, #34d399); }
.snap-bar .f-typ { background: linear-gradient(90deg, #2563eb, #38bdf8); }
.mock-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mock-btn { display: block; width: 100%; margin-top: 8px; padding: 6px 11px; border-radius: 999px;
  border: 1px solid rgba(56,189,248,.45); background: rgba(56,189,248,.08); color: #7dd3fc;
  font-size: .73rem; font-weight: 700; cursor: pointer; transition: background .15s, transform .1s; }
.mock-btn:hover { background: rgba(56,189,248,.2); transform: translateY(-1px); }
.mock-kicker { display: flex; align-items: center; gap: 5px; font-size: .66rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.kick-img { width: 14px; height: 14px; flex: none; }
.mock-big { font-weight: 800; color: var(--heading); font-size: .94rem; }
.mock-unit { font-size: .68rem; font-weight: 600; color: var(--muted); margin-left: 2px; }
.mock-dim { color: var(--faint); font-size: .73rem; margin-top: 2px; }
.spark { width: 100%; height: 26px; margin-top: 6px; }
.mock-nutri-body { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.donut { width: 48px; height: 48px; object-fit: contain; flex: none; }
@media (max-width: 1100px) {
  .hero-grid { grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr); }
  .hero-mid { display: none; }
  .hero-cards { justify-self: stretch; max-width: none; }
}
@media (max-width: 940px) {
  .hero-grid { grid-template-columns: 1fr; gap: 34px; }
  .hero-copy { text-align: center; }
  .hero .sub { margin-inline: auto; }
  .hero-chips { flex-wrap: wrap; justify-content: center; }
  .hero-note { justify-content: center; }
  .hero-cards { max-width: 430px; margin: 0 auto; }
}
@media (max-width: 430px) { .mock-duo { grid-template-columns: 1fr; } }

/* ---------- Why strip (inside the hero, below the grid) ---------- */
.why-strip { width: 100%; max-width: 1180px; margin: 0 auto; padding: 10px 22px 4px;
  border-top: 1px solid var(--border); animation: reveal-up 1s cubic-bezier(.16,1,.3,1) .55s both; }
.why-title { text-align: center; font-size: clamp(1.05rem, 1.8vw, 1.3rem); margin: 0; }
.why-sub { text-align: center; color: var(--muted); margin: 4px auto 0; max-width: 540px; font-size: .8rem; }
.why-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 10px; }
.why-item { text-align: center; padding: 4px 8px; }
.why-item + .why-item { border-left: 1px solid var(--border); }
/* icons come in mixed aspect ratios — letterbox each in a uniform box */
.why-img { display: block; width: 40px; height: 30px; object-fit: contain; margin: 0 auto 5px; }
.why-item h3 { margin: 0 0 3px; font-size: .8rem; }
.why-item p { margin: 0; color: var(--muted); font-size: .69rem; line-height: 1.4; }
@media (max-width: 940px) {
  .why-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .why-item + .why-item { border-left: 0; }
  .why-item { border: 1px solid var(--border); background: var(--surface); border-radius: 12px; padding: 14px 10px; }
  .why-item:last-child { grid-column: 1 / -1; }
}

/* ---------- Hero bottom bar (review + disclaimer) ---------- */
.hero-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 9px;
  width: 100%; margin-top: 8px; padding: 7px 22px; border-top: 1px solid var(--border);
  background: rgba(14,20,36,.5); color: var(--muted); font-size: .78rem; font-weight: 500;
  animation: soft-fade 1s ease .7s both; }
.hero-bar .stars { color: #a78bfa; letter-spacing: .12em; font-size: .8rem; }
.hero-quote { color: var(--text); }
.hero-attr { color: var(--faint); }
.hero-bar-sep { color: var(--border-strong); }
.hero-disc { color: var(--faint); }
@media (max-width: 700px) { .hero-bar-sep { display: none; } .hero-disc { width: 100%; text-align: center; } }

/* ---------- The science ---------- */
.science { position: relative; z-index: 0; max-width: 1000px; margin: 0 auto; padding: 64px 22px 10px; }
/* faint brand watermark behind the section */
.science::before { content: ""; position: absolute; z-index: -1; left: -70px; top: 20px;
  width: 220px; height: 560px; background: url("assets/deco-helix-a.png") no-repeat center / contain;
  opacity: .08; pointer-events: none; }
.sci-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 34px; }
.sci-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px 22px; box-shadow: var(--shadow-sm); }
.sci-num { font-weight: 800; font-size: .78rem; letter-spacing: .12em; color: var(--brand-2); margin-bottom: 10px; }
.sci-card h3 { margin: 0 0 8px; font-size: 1.05rem; }
.sci-card p { margin: 0; color: var(--muted); font-size: .88rem; line-height: 1.6; }
.sci-honesty { text-align: center; color: var(--faint); font-size: .86rem; max-width: 620px; margin: 26px auto 0; }
@media (max-width: 760px) { .sci-grid { grid-template-columns: 1fr; } }

/* ---------- Pricing ---------- */
.pricing { position: relative; z-index: 0; max-width: 1000px; margin: 0 auto; padding: 64px 22px 10px; }
.pricing::before { content: ""; position: absolute; z-index: -1; right: -80px; top: 40px;
  width: 230px; height: 570px; background: url("assets/deco-helix-b.png") no-repeat center / contain;
  opacity: .08; transform: scaleX(-1); pointer-events: none; }
.price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 34px; align-items: stretch; }
.price-card { position: relative; display: flex; flex-direction: column; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 26px 24px; box-shadow: var(--shadow-sm); }
.price-card.featured { border-color: rgba(56,189,248,.55); box-shadow: 0 0 0 1px rgba(56,189,248,.35), var(--shadow); }
.price-flag { position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(110deg, #2563eb, #0ea5e9); color: #fff; font-size: .66rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .07em; padding: 4px 11px; border-radius: 999px; white-space: nowrap; }
.price-name { font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--brand-dark); }
.price-amount { font-size: 2.1rem; font-weight: 800; color: var(--heading); margin: 6px 0 0; }
.price-len { font-weight: 700; color: var(--text); font-size: .95rem; margin-bottom: 8px; }
.price-card p { margin: 0 0 18px; color: var(--muted); font-size: .86rem; line-height: 1.55; flex: 1; }
.price-cta { margin-top: 0; text-align: center; }
.price-note { text-align: center; color: var(--faint); font-size: .82rem; margin: 24px 0 0; }
@media (max-width: 760px) { .price-grid { grid-template-columns: 1fr; gap: 22px; } }

/* smooth-scroll targets clear the sticky nav */
section[id] { scroll-margin-top: 76px; }

/* ---------- Section headers ---------- */
.section-title { text-align: center; font-size: clamp(1.4rem, 3vw, 1.9rem); margin: 0; }
.section-sub { text-align: center; color: var(--muted); margin: 8px auto 0; max-width: 520px; }

/* ---------- How it works ---------- */
.how { max-width: 1000px; margin: 0 auto; padding: 64px 22px 20px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 36px; }
.step { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 30px 24px 26px; box-shadow: var(--shadow-sm); text-align: center; transition: transform .15s, box-shadow .2s; }
.step:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.step-num { position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(120deg, var(--brand), var(--brand-2));
  color: #fff; font-weight: 700; display: grid; place-items: center; font-size: .9rem; box-shadow: var(--shadow-sm); }
.step-icon { width: 60px; height: 60px; margin: 4px auto 16px; display: grid; place-items: center;
  font-size: 1.7rem; border-radius: 50%;
  background: linear-gradient(140deg, rgba(16,185,129,.16) 0%, rgba(56,189,248,.14) 100%);
  box-shadow: inset 0 0 0 1px rgba(16,185,129,.28), var(--shadow-sm); }
.step h3 { margin: 0 0 8px; font-size: 1.1rem; }
.step p { margin: 0; color: var(--muted); font-size: .92rem; }

/* ---------- Form ---------- */
main { padding: 0; }
.form-head { margin-bottom: 22px; }
form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 30px; box-shadow: var(--shadow-lg); }

.drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  min-height: 158px; border: 2px dashed var(--border-strong); border-radius: var(--radius-sm);
  color: var(--muted); cursor: pointer; text-align: center; padding: 24px;
  background: var(--surface-2); transition: border-color .2s, background .2s; }
.drop:hover, .drop.hot { border-color: var(--brand); background: var(--brand-soft); }
.drop.loaded { border-color: var(--brand); border-style: solid; background: var(--brand-soft); }
.drop-icon { line-height: 0; }
.drop-icon img { width: 38px; height: 38px; }
.drop.loaded .drop-icon img { display: none; }
.drop.loaded .drop-icon::before { content: "✓"; font-size: 1.7rem; color: var(--brand); }
.drop-title { font-size: 1.08rem; font-weight: 700; color: var(--heading); }
.drop.loaded .drop-title { color: var(--brand-dark); }
.drop-hint { font-size: .84rem; color: var(--faint); }
.drop code { background: var(--surface-3); padding: 1px 6px; border-radius: 5px; color: var(--text); }

fieldset { border: 0; border-top: 1px solid var(--border); margin: 26px 0 0; padding: 24px 0 0; }
legend { padding: 0; font-size: .76rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em;
  color: var(--brand-dark); margin-bottom: 16px; }
legend .opt { color: var(--faint); font-weight: 500; text-transform: none; letter-spacing: 0; margin-left: 6px; font-size: .82rem; }

.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; }
.grid.three { grid-template-columns: repeat(3, 1fr); }
label { display: flex; flex-direction: column; gap: 7px; font-size: .84rem; font-weight: 600; color: var(--muted); }
label.full { margin-top: 4px; }

select, input[type="number"], input[type="text"], textarea {
  background: var(--surface); color: var(--text); border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); padding: 11px 12px; font-size: .98rem; font-family: inherit; font-weight: 400; width: 100%;
  transition: border-color .15s, box-shadow .15s; }
select:focus, input:focus, textarea:focus { outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(16,185,129,.16); }
input::placeholder, textarea::placeholder { color: #55627b; }
textarea { resize: vertical; line-height: 1.5; }

.inline { display: flex; gap: 8px; }
.inline input { flex: 1; }
.inline select { width: 72px; flex: none; }
.help { color: var(--faint); font-size: .8rem; margin: 8px 2px 0; font-weight: 400; }

/* multi-select goal chips */
.chips-select { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 4px; }
.chip-opt { display: inline-flex; cursor: pointer; }
.chip-opt input { position: absolute; opacity: 0; pointer-events: none; }
.chip-opt span { display: inline-block; padding: 9px 15px; border-radius: 999px; border: 1.5px solid var(--border-strong);
  background: var(--surface); color: var(--text); font-size: .9rem; font-weight: 600; transition: border-color .15s, background .15s, color .15s; }
.chip-opt span:hover { border-color: var(--brand); }
.chip-opt input:checked + span { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-dark); }
.chip-opt input:focus-visible + span { box-shadow: 0 0 0 3px rgba(16,185,129,.25); }

/* ---------- Plan tiers ---------- */
.tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.tier { cursor: pointer; }
.tier input { position: absolute; opacity: 0; pointer-events: none; }
.tier-card { position: relative; display: flex; flex-direction: column; gap: 3px; height: 100%;
  background: var(--surface); border: 2px solid var(--border); border-radius: 14px; padding: 18px 16px;
  transition: border-color .15s, box-shadow .2s, transform .1s; }
.tier:hover .tier-card { border-color: var(--border-strong); transform: translateY(-2px); }
.tier input:checked + .tier-card { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(16,185,129,.14); }
.tier input:focus-visible + .tier-card { box-shadow: 0 0 0 3px rgba(16,185,129,.3); }
.tier-name { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--brand-dark); }
.tier-len { font-weight: 700; color: var(--heading); font-size: 1.02rem; }
.tier-price { font-weight: 800; color: var(--heading); font-size: 1.35rem; margin: 4px 0 2px; }
.tier-desc { color: var(--muted); font-size: .82rem; line-height: 1.4; }
.ribbon { position: absolute; top: -11px; right: 12px; background: linear-gradient(120deg, var(--brand), var(--brand-2));
  color: #fff; font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding: 4px 9px; border-radius: 999px; box-shadow: var(--shadow-sm); }

.toggles { display: flex; flex-direction: column; gap: 4px; margin-top: 26px; padding: 8px 18px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px; }
.toggles .switch { margin: 12px 0; }

/* "what's included" note (replaces the removed toggles) */
.plan-includes { display: flex; align-items: flex-start; gap: 11px; margin-top: 26px; padding: 14px 16px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px;
  color: var(--muted); font-size: .9rem; line-height: 1.5; }
.plan-includes .pi-ic { font-size: 1.2rem; line-height: 1.2; flex: none; }
.plan-includes strong { color: var(--heading); font-weight: 700; }

/* ---------- Switch ---------- */
.switch { flex-direction: row; align-items: center; gap: 12px; cursor: pointer; margin: 26px 0 4px; font-size: .94rem; color: var(--text); font-weight: 400; }
.switch input { display: none; }
.switch .track { width: 46px; height: 27px; border-radius: 999px; background: var(--border-strong); position: relative; flex: none; transition: background .2s; }
.switch .thumb { position: absolute; top: 3px; left: 3px; width: 21px; height: 21px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: transform .2s; }
.switch input:checked + .track { background: linear-gradient(120deg, var(--brand), var(--brand-2)); }
.switch input:checked + .track .thumb { transform: translateX(19px); }
.switch-label strong { font-weight: 700; color: var(--heading); }
.switch-tag { font-style: normal; font-size: .72rem; font-weight: 700; color: var(--brand-dark);
  background: var(--brand-soft); padding: 1px 8px; border-radius: 999px; margin-left: 6px; white-space: nowrap; }

/* ---------- Buttons ---------- */
button#go { width: 100%; padding: 16px; font-size: 1.06rem; font-weight: 700; cursor: pointer; margin-top: 22px;
  border: 0; border-radius: 12px; color: #fff; letter-spacing: .01em;
  background: linear-gradient(120deg, var(--brand), var(--brand-deep));
  box-shadow: 0 14px 28px -12px rgba(16,185,129,.6); transition: transform .1s, box-shadow .2s, filter .15s; }
button#go:hover { transform: translateY(-2px); box-shadow: 0 18px 34px -12px rgba(16,185,129,.7); }
button#go:active { transform: translateY(0); }
button#go:disabled { opacity: .65; cursor: progress; filter: grayscale(.2); transform: none; }
.pay-note { display: flex; align-items: center; justify-content: center; gap: 7px; color: var(--muted);
  font-size: .82rem; font-weight: 500; text-align: center; margin: 14px 4px 0; }
.beta-pill { font-size: .66rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  color: #fff; background: linear-gradient(110deg, #6366f1, #0ea5e9 55%, #10b981); padding: 2px 8px; border-radius: 999px; }
/* free-mode: only the single Starter tier remains — let it span full width */
body.free-mode .tiers { grid-template-columns: 1fr; max-width: 340px; margin: 0 auto; }
.pay-note .ti { color: var(--brand-dark); }
.disclaimer { color: var(--faint); font-size: .78rem; text-align: center; margin: 10px 4px 0; line-height: 1.55; }
.disclaimer strong { color: var(--muted); }

/* consent gate before generating a plan */
.consent { flex-direction: row; align-items: flex-start; gap: 11px; margin: 20px 0 4px; padding: 14px 16px;
  background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: 12px;
  font-size: .86rem; font-weight: 400; color: var(--text); line-height: 1.5; cursor: pointer; }
.consent input { margin-top: 3px; width: 18px; height: 18px; flex: none; accent-color: var(--brand); cursor: pointer; }
.consent a { color: var(--brand-dark); font-weight: 700; }
.consent.needed { border-color: #f87171; box-shadow: 0 0 0 3px rgba(239,68,68,.15); }
.consent-msg { color: #f87171; font-size: .82rem; font-weight: 600; margin: 8px 2px 0; text-align: center; }
.auth-terms { text-align: center; color: var(--faint); font-size: .8rem; margin: 12px 0 0; }
.auth-terms a { color: var(--brand-dark); font-weight: 600; text-decoration: none; }
.foot-links { margin-top: 12px; }
.foot-links a { color: var(--muted); font-weight: 600; text-decoration: none; }
.foot-links a:hover { color: var(--brand-dark); }

button.ghost { padding: 9px 15px; font-size: .86rem; font-weight: 600; cursor: pointer;
  color: var(--muted); background: var(--surface); border: 1px solid var(--border-strong); border-radius: 9px; transition: .15s; }
button.ghost:hover { color: var(--brand-dark); border-color: var(--brand); background: var(--brand-soft); }

/* ---------- Status ---------- */
#status { text-align: center; padding: 44px 24px; color: var(--muted); font-weight: 500; }
.spinner { width: 24px; height: 24px; border: 3px solid var(--border-strong); border-top-color: var(--brand);
  border-radius: 50%; display: inline-block; animation: spin 1s linear infinite; vertical-align: middle; margin-right: 12px; }
@keyframes spin { to { transform: rotate(360deg); } }
.err { color: #f87171; }

/* ---------- generation progress loader ---------- */
.loader { max-width: 460px; margin: 8px auto; text-align: left; }
.loader-title { font-weight: 700; color: var(--heading); font-size: 1.1rem; margin-bottom: 14px; text-align: center; }
.loader-bar { height: 10px; border-radius: 999px; background: var(--surface-3); overflow: hidden; box-shadow: inset 0 1px 2px rgba(16,40,70,.08); }
.loader-fill { height: 100%; width: 0%; border-radius: 999px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  transition: width .18s linear; box-shadow: 0 0 12px -2px rgba(16,185,129,.5); }
.loader-meta { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 10px; font-size: .88rem; }
.loader-meta #loaderLabel { color: var(--muted); font-weight: 500; }
.loader-meta #loaderPct { color: var(--brand-dark); font-weight: 700; font-variant-numeric: tabular-nums; }
.loader-est { text-align: center; color: var(--faint); font-size: .8rem; margin-top: 14px; }

/* ---------- Results ---------- */
#results { margin-top: 34px; }
.results-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.results-head h2 { margin: 0; font-size: 1.6rem; }
.actions { display: flex; gap: 8px; }

.snapshot { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 22px; margin-bottom: 18px; box-shadow: var(--shadow-sm); }
.snapshot h3 { margin: 0 0 12px; font-size: .76rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { background: var(--surface-3); border: 1px solid var(--border); border-radius: 999px; padding: 6px 14px; font-size: .85rem; color: var(--heading); font-weight: 600; }
.chip b { color: var(--muted); font-weight: 500; margin-right: 5px; }
.chip.flag { background: rgba(245,158,11,.13); border-color: rgba(245,158,11,.4); color: #fbbf24; }

.gene-group { margin-bottom: 18px; }
.gene-group > h4 { margin: 0 0 12px; font-size: .76rem; text-transform: uppercase; letter-spacing: .1em; color: var(--brand-dark); }
.gene-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.gene-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 16px 18px; box-shadow: var(--shadow-sm); }
.gene-card .gc-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.gene-card .gc-title { font-weight: 800; color: var(--heading); font-size: .98rem; line-height: 1.25; }
.gene-card .gc-tag { font-family: ui-monospace, "SF Mono", Menlo, monospace; color: var(--brand-2); font-weight: 700;
  font-size: .72rem; white-space: nowrap; background: var(--surface-3); padding: 2px 7px; border-radius: 6px; }
.gene-card .gc-desc { color: var(--muted); font-size: .82rem; line-height: 1.45; margin: 8px 0 16px; }

/* three-segment breakdown bar */
.gene-card .segbar { margin-top: auto; }
.gene-card .segtrack { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 4px; }
.gene-card .seg { height: 7px; border-radius: 5px; background: var(--seg-off); }
.gene-card .seg.on.t-good { background: var(--seg-good); }
.gene-card .seg.on.t-typical { background: var(--seg-typical); }
.gene-card .seg.on.t-risk { background: var(--seg-risk); }
.gene-card .seg.on.t-note { background: var(--seg-note); }
.gene-card .seglabels { display: grid; grid-template-columns: 1fr 1fr 1fr; margin-top: 8px;
  font-size: .66rem; text-transform: uppercase; letter-spacing: .03em; font-weight: 600; color: var(--faint); }
.gene-card .seglabels span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gene-card .seglabels span:nth-child(1) { text-align: left; }
.gene-card .seglabels span:nth-child(2) { text-align: center; }
.gene-card .seglabels span:nth-child(3) { text-align: right; }
.gene-card .seglabels span.on { font-weight: 800; }
.gene-card .seglabels span.on.t-good { color: var(--seg-good); }
.gene-card .seglabels span.on.t-typical { color: var(--seg-typical); }
.gene-card .seglabels span.on.t-risk { color: var(--seg-risk); }
.gene-card .seglabels span.on.t-note { color: var(--seg-note); }

.gene-card .conf { display: inline-flex; align-items: center; gap: 6px; font-size: .64rem; text-transform: uppercase;
  letter-spacing: .05em; color: var(--faint); margin-top: 14px; font-weight: 600; }
.gene-card .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--low); }
.gene-card.high .dot { background: var(--high); }
.gene-card.medium .dot { background: var(--medium); }

/* Any in-app mode hides every landing-page section (hero, bands, pricing, …) */
body.results-mode > .landing,
body.loading-mode > .landing,
body.wizard-mode > .landing,
body.settings-mode > .landing,
body.auth-mode > .landing,
body.account-mode > .landing,
body.admin-mode > .landing { display: none; }
body.admin-mode > .nav, body.admin-mode > footer { display: none; }
body.admin-mode main#start { max-width: none; margin: 0; padding: 0; }

/* ---------- Results view (sidebar + panes) ---------- */
body.results-mode > .nav,
body.results-mode > .hero,
body.results-mode > .how,
body.results-mode > .offer,
body.results-mode > footer { display: none; }
body.results-mode main#start { max-width: none; margin: 0; padding: 0; }
body.results-mode .form-head,
body.results-mode form,
body.results-mode #status { display: none; }
body.results-mode #results { margin: 0; }

/* full-screen centered state while the protocol is generating */
body.loading-mode > .nav,
body.loading-mode > .hero,
body.loading-mode > .how,
body.loading-mode > .offer,
body.loading-mode > footer,
body.loading-mode .form-head,
body.loading-mode form { display: none; }
body.loading-mode main#start { max-width: none; margin: 0; padding: 0; }
body.loading-mode #status { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }

/* ---------- What you get ---------- */
.offer { max-width: 1000px; margin: 0 auto; padding: 56px 22px 8px; }
.offer-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin-top: 32px; }
.offer-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm); }
.offer-ic { font-size: 1.7rem; margin-bottom: 10px; }
.offer-card h3 { margin: 0 0 6px; font-size: 1.12rem; }
.offer-card p { margin: 0 0 14px; color: var(--muted); font-size: .93rem; }
.mini-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.mini-chips span { background: var(--brand-soft); color: var(--brand-dark); font-size: .74rem; font-weight: 600; padding: 4px 10px; border-radius: 999px; }
.mini-bars { display: flex; align-items: flex-end; gap: 8px; height: 60px; }
.mini-bars i { flex: 1; height: var(--h); border-radius: 5px 5px 0 0; background: linear-gradient(180deg, var(--brand), var(--brand-2)); opacity: .85; }
.mini-table { font-size: .78rem; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.mini-table > div { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; }
.mini-table > div:first-child { background: var(--brand-soft); }
.mini-table b, .mini-table span { padding: 6px 8px; color: var(--text); }
.mini-table b { color: var(--brand-dark); font-weight: 700; }
.mini-table > div:not(:last-child) { border-bottom: 1px solid var(--border); }
.offer-cta { text-align: center; margin: 36px 0 8px; }
.offer-cta .cta { border: 0; cursor: pointer; }

/* ---------- Guided wizard ---------- */
body.wizard-mode > .nav,
body.wizard-mode > .hero,
body.wizard-mode > .how,
body.wizard-mode > .offer,
body.wizard-mode > footer { display: none; }
body.wizard-mode main#start { max-width: none; margin: 0; padding: 0; }

.wz { max-width: 720px; margin: 0 auto; padding: 22px 22px 40px; min-height: 100vh; display: flex; flex-direction: column; }
.wz-head { display: flex; align-items: center; gap: 14px; padding: 6px 0 18px; }
.wz-exit { background: none; border: 0; color: var(--muted); font-size: .9rem; font-weight: 600; cursor: pointer; white-space: nowrap; padding: 0; }
.wz-exit:hover { color: var(--brand-dark); }
.wz-progress { flex: 1; height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.wz-progress-fill { height: 100%; width: 12%; border-radius: 999px; background: linear-gradient(90deg, var(--brand), var(--brand-2)); transition: width .35s cubic-bezier(.16,1,.3,1); }
.wz-count { font-size: .82rem; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }

.wz form { background: none; border: 0; box-shadow: none; padding: 0; flex: 1; }
.wz-step { display: none; animation: wz-in .4s cubic-bezier(.16,1,.3,1) both; }
.wz-step.active { display: block; }
@keyframes wz-in { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
.wz-title { font-size: 1.7rem; margin: 8px 0 6px; }
.wz-title .opt { font-size: .95rem; color: var(--faint); font-weight: 500; }
.wz-sub { color: var(--muted); margin: 0 0 22px; }
.wz-step fieldset { border: 0; padding: 0; margin: 0; }
.wz-step .drop { min-height: 200px; }

/* provider (DNA source) cards */
.prov { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.prov-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 20px; box-shadow: var(--shadow-sm); }
.prov-top { display: flex; align-items: center; gap: 10px; font-size: 1.05rem; margin-bottom: 12px; }
.prov-logo { font-size: 1.4rem; }
.prov-card ol { margin: 0 0 16px; padding-left: 20px; color: var(--text); font-size: .9rem; }
.prov-card li { margin: 6px 0; }
.prov-card em { font-style: normal; font-weight: 600; color: var(--heading); }
.prov-link { display: inline-block; font-weight: 700; color: var(--brand-dark); text-decoration: none; font-size: .9rem; }
.prov-link:hover { text-decoration: underline; }
.note { margin-top: 18px; background: var(--brand-soft); border: 1px solid rgba(16,185,129,.35); color: #7ee6c0; border-radius: 10px; padding: 12px 15px; font-size: .88rem; }
.note.soft { background: var(--surface-2); border-color: var(--border); color: var(--muted); }
.note code { background: rgba(255,255,255,.08); padding: 1px 5px; border-radius: 4px; }

/* wizard footer nav */
.wz-nav { display: flex; align-items: center; gap: 14px; padding-top: 22px; margin-top: 20px; border-top: 1px solid var(--border); }
.wz-label { flex: 1; color: var(--faint); font-size: .85rem; }
.wz-next { padding: 13px 26px; font-size: 1rem; font-weight: 700; cursor: pointer; border: 0; border-radius: 11px; color: #fff;
  background: linear-gradient(120deg, var(--brand), var(--brand-deep)); box-shadow: 0 10px 22px -10px rgba(16,185,129,.6); transition: transform .1s, box-shadow .2s; }
.wz-next:hover { transform: translateY(-2px); box-shadow: 0 14px 28px -12px rgba(16,185,129,.7); }
.wz-step button#go { margin-top: 20px; }

.drop.shake { animation: shake .4s; border-color: #dc2626; }
@keyframes shake { 0%,100%{transform:none} 20%,60%{transform:translateX(-6px)} 40%,80%{transform:translateX(6px)} }

@media (max-width: 620px) {
  .offer-grid { grid-template-columns: 1fr; }
  .prov { grid-template-columns: 1fr; }
}
body.results-mode .rv { animation: results-reveal .75s cubic-bezier(.16,1,.3,1) both; }
body.results-mode .rv-sidebar { animation: soft-fade .9s ease .1s both; }

.rv { display: grid; grid-template-columns: 268px 1fr; min-height: 100vh; }
.rv-sidebar { position: sticky; top: 0; align-self: start; height: 100vh; overflow-y: auto;
  background: var(--surface); border-right: 1px solid var(--border); padding: 22px 16px; display: flex; flex-direction: column; gap: 3px; }
.rv-brand { font-weight: 800; font-size: 1.15rem; color: var(--heading); padding: 4px 10px 16px; }
.rv-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.rv-item { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: none; border: 0;
  border-radius: 9px; padding: 9px 11px; font-size: .92rem; font-weight: 600; color: var(--muted); cursor: pointer; transition: background .12s, color .12s; }
.rv-item:hover { background: var(--surface-2); color: var(--heading); }
.rv-item.active { background: var(--brand-soft); color: var(--brand-dark); }
.rv-ic { font-size: 1rem; line-height: 1; width: 1.2em; text-align: center; }
.rv-item.child { padding-left: 16px; font-size: .87rem; }
.rv-group { display: flex; flex-direction: column; gap: 2px; margin: 8px 0 2px; }
.rv-grouplabel { display: flex; align-items: center; gap: 10px; padding: 6px 11px 2px; font-size: .7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em; color: var(--faint); }
.rv-actions { display: flex; flex-direction: column; gap: 8px; padding-top: 14px; margin-top: 12px; border-top: 1px solid var(--border); }
.rv-actions .ghost { width: 100%; }

.rv-content { padding: 40px clamp(20px, 5vw, 56px); min-width: 0; }
.rv-pane { display: none; max-width: 860px; }
.rv-pane.active { display: block; animation: rvfade .22s ease; }
.rv-pane:not(.plain) { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 30px clamp(20px, 4vw, 38px); box-shadow: var(--shadow-sm); }
@keyframes rvfade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.rv-h { display: flex; align-items: center; gap: 11px; font-size: 1.5rem; margin: 0 0 20px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.rv-hic { font-size: 1.3rem; }

/* prose inside panes */
.rv-pane h3 { color: var(--heading); font-size: 1.05rem; margin: 22px 0 8px; }
.rv-pane p { margin: 10px 0; }
.rv-pane ul { margin: 10px 0; padding-left: 22px; }
.rv-pane li { margin: 6px 0; }
.rv-pane strong { color: var(--heading); }
.rv-pane code { background: var(--surface-3); padding: 1px 6px; border-radius: 5px; font-size: .9em; color: var(--brand-dark); }
.rv-pane hr { border: 0; border-top: 1px solid var(--border); margin: 22px 0; }
.rv-pane .table-wrap { overflow-x: auto; margin: 14px 0; border-radius: 10px; }
.rv-pane table { border-collapse: collapse; width: 100%; font-size: .9rem; }
.rv-pane th, .rv-pane td { border: 1px solid var(--border); padding: 8px 12px; text-align: left; }
.rv-pane th { background: var(--brand-soft); color: var(--brand-dark); font-weight: 700; }
.rv-pane tr:nth-child(even) td { background: rgba(255,255,255,.03); }

@media (max-width: 760px) {
  .rv { grid-template-columns: 1fr; }
  .rv-sidebar { position: sticky; top: 0; height: auto; z-index: 10; flex-direction: row; align-items: center;
    gap: 6px; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--border); padding: 10px 12px; }
  .rv-brand { padding: 4px 8px; white-space: nowrap; }
  .rv-nav { flex-direction: row; gap: 4px; }
  .rv-item { white-space: nowrap; padding: 7px 12px; }
  .rv-item.child { padding-left: 12px; }
  .rv-group { flex-direction: row; align-items: center; margin: 0; }
  .rv-grouplabel { display: none; }
  .rv-actions { flex-direction: row; border-top: 0; padding: 0; margin: 0; }
  .rv-actions .ghost { width: auto; white-space: nowrap; }
  .rv-content { padding: 22px 16px; }
}

/* ---------- Footer ---------- */
footer { text-align: center; padding: 44px 22px; margin-top: 30px; border-top: 1px solid var(--border); background: var(--surface); }
.foot-brand { font-weight: 800; color: var(--heading); margin-bottom: 8px; }
footer p { color: var(--faint); font-size: .82rem; max-width: 480px; margin: 0 auto; }

@media (max-width: 720px) {
  .steps { grid-template-columns: 1fr; gap: 26px; }
  .grid, .grid.three { grid-template-columns: 1fr 1fr; }
  form { padding: 22px; }
  article { padding: 24px 20px; }
}
@media (max-width: 560px) { .tiers { grid-template-columns: 1fr; } }
@media (max-width: 430px) { .grid, .grid.three { grid-template-columns: 1fr; } }

/* ---------- Auth control in nav ---------- */
.nav-login { background: transparent; border: 1px solid var(--border-strong); color: var(--heading) !important;
  font-size: .84rem; font-weight: 700; padding: 7px 17px; border-radius: 999px; text-decoration: none;
  transition: background .15s, border-color .15s, transform .1s; }
.nav-login:hover { background: rgba(255,255,255,.06); border-color: var(--faint); transform: translateY(-1px); }
.nav-logout { background: none; border: 0; color: var(--muted); font-size: .9rem; font-weight: 600; cursor: pointer; padding: 0; }
.nav-logout:hover { color: var(--brand-dark); }

/* ---------- Avatar + account menu ---------- */
.nav-user { position: relative; display: inline-flex; }
.nav-user[hidden] { display: none; } /* explicit display would override the hidden attribute */
.avatar-btn { background: none; border: 0; padding: 0; cursor: pointer; border-radius: 50%; line-height: 0;
  transition: transform .1s, box-shadow .15s; }
.avatar-btn:hover { transform: translateY(-1px); }
.avatar-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--brand-soft); }
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px;
  border-radius: 50%; background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff;
  font-weight: 700; font-size: .95rem; letter-spacing: .01em; text-transform: uppercase; user-select: none; }
.avatar-lg { width: 44px; height: 44px; font-size: 1.1rem; }
.avatar-xl { width: 64px; height: 64px; font-size: 1.6rem; flex: none; }

.user-menu { position: absolute; top: calc(100% + 10px); right: 0; width: 250px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); padding: 8px;
  z-index: 40; animation: rvfade .15s ease; }
.user-menu[hidden] { display: none; }
.user-menu-head { display: flex; align-items: center; gap: 11px; padding: 8px 8px 12px; }
.user-menu-id { min-width: 0; }
.user-menu-name { font-weight: 700; color: var(--heading); font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-menu-name:empty { display: none; }
.user-menu-email { color: var(--muted); font-size: .82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-menu-sep { height: 1px; background: var(--border); margin: 6px 4px; }
.user-menu-item { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: none;
  border: 0; padding: 10px 10px; border-radius: 9px; font-size: .92rem; font-weight: 600; color: var(--text);
  cursor: pointer; transition: background .12s; }
.user-menu-item:hover { background: var(--surface-3); }
.user-menu-item.danger { color: #f87171; }
.user-menu-item.danger:hover { background: rgba(239,68,68,.13); }
.umi-ic { width: 20px; text-align: center; font-size: 1rem; }

/* ---------- Settings view ---------- */
body.settings-mode > .nav,
body.settings-mode > .hero,
body.settings-mode > .how,
body.settings-mode > .offer,
body.settings-mode > footer { display: none; }
body.settings-mode main#start { max-width: none; margin: 0; padding: 0; }

.set-wrap { min-height: 100vh; }
.set-body { max-width: 680px; margin: 0 auto; padding: 30px 22px 70px; }
.set-h1 { font-size: 1.7rem; margin: 6px 0 24px; }
.set-h3 { font-size: 1rem; margin: 0 0 14px; }
.set-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); padding: 24px 26px; margin-bottom: 20px; }
.set-card h2 { margin: 0 0 4px; font-size: 1.2rem; }
.set-cardsub { margin: 0 0 20px; color: var(--muted); font-size: .9rem; }
.set-profile { display: flex; align-items: flex-start; gap: 20px; }
.set-form { flex: 1; min-width: 0; }
.set-divider { height: 1px; background: var(--border); margin: 22px 0; }
.btn-save { display: inline-block; margin-top: 4px; padding: 11px 22px; border-radius: 10px; border: 0; cursor: pointer;
  font-weight: 700; font-size: .92rem; color: #fff; background: linear-gradient(120deg, var(--brand), var(--brand-deep));
  box-shadow: 0 10px 22px -12px rgba(16,185,129,.7); transition: transform .1s, box-shadow .2s; }
.btn-save:hover { transform: translateY(-1px); }
.btn-save:disabled { opacity: .6; cursor: default; transform: none; }
.btn-outline { display: inline-block; padding: 11px 22px; border-radius: 10px; cursor: pointer; font-weight: 700;
  font-size: .92rem; color: var(--brand-dark); background: var(--brand-soft); border: 0; transition: background .15s; text-decoration: none; }
.btn-outline:hover { background: rgba(16,185,129,.24); }
.btn-danger { padding: 11px 22px; border-radius: 10px; border: 1px solid rgba(239,68,68,.45); background: transparent; color: #f87171;
  font-weight: 700; font-size: .92rem; cursor: pointer; transition: background .15s, border-color .15s; }
.btn-danger:hover { background: rgba(239,68,68,.13); border-color: rgba(239,68,68,.7); }
.danger-card h2 { color: #f87171; }
.set-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.set-msg { font-size: .87rem; font-weight: 500; padding: 9px 12px; border-radius: 8px; margin-bottom: 14px; }
.set-msg.ok { background: var(--brand-soft); color: var(--brand-dark); }
.set-msg.err { background: rgba(239,68,68,.13); color: #fca5a5; }
.bill-line { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; font-size: .95rem; color: var(--text); }
@media (max-width: 480px) { .set-profile { flex-direction: column; align-items: center; text-align: center; } }

/* ---------- Auth view (sign up / log in) ---------- */
body.auth-mode > .nav,
body.auth-mode > .hero,
body.auth-mode > .how,
body.auth-mode > .offer,
body.auth-mode > footer { display: none; }
body.auth-mode main#start { max-width: none; margin: 0; padding: 0; }

/* split layout: branded showcase | form */
.auth-split { display: grid; grid-template-columns: 1.08fr 1fr; min-height: 100vh; }

/* --- left showcase panel --- */
.auth-brandside { position: relative; overflow: hidden; display: flex; align-items: center;
  padding: 48px clamp(32px, 5vw, 72px); border-right: 1px solid var(--border);
  background:
    radial-gradient(120% 90% at 15% 10%, rgba(99,102,241,.16), transparent 55%),
    radial-gradient(120% 90% at 85% 90%, rgba(16,185,129,.14), transparent 55%),
    var(--surface); }
.auth-helix { position: absolute; right: -60px; top: 50%; transform: translateY(-50%);
  height: 118%; width: auto; opacity: .16; pointer-events: none;
  filter: drop-shadow(0 0 30px rgba(56,189,248,.4)); }
.auth-brand-inner { position: relative; z-index: 1; max-width: 400px; }
.auth-brand-inner .eyebrow { color: #34d399; }
.auth-hero { font-size: clamp(1.8rem, 3vw, 2.5rem); line-height: 1.08; font-weight: 900; margin: 0 0 26px; }
.auth-points { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.auth-points li { display: flex; align-items: center; gap: 13px; color: var(--text); font-size: .96rem; font-weight: 500; }
.auth-points img { width: 30px; height: 26px; object-fit: contain; flex: none; }

/* --- right form panel --- */
.auth-formside { display: grid; place-items: center; padding: 40px 22px; }
.auth-col { width: 100%; max-width: 400px; }
.auth-logo { display: inline-flex; align-items: center; margin: 0 0 22px; font-size: 1.15rem; }
.auth-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 30px 28px 26px; }
.auth-tabs { display: flex; gap: 6px; background: var(--surface-3); padding: 5px; border-radius: 12px; margin-bottom: 24px; }
.auth-tab { flex: 1; border: 0; background: none; padding: 9px 0; border-radius: 8px; font-weight: 700;
  font-size: .92rem; color: var(--muted); cursor: pointer; transition: background .15s, color .15s; }
.auth-tab.active { background: var(--surface); color: var(--heading); box-shadow: var(--shadow-sm); }
.auth-title { margin: 0 0 6px; font-size: 1.5rem; }
.auth-sub { margin: 0 0 22px; color: var(--muted); font-size: .95rem; }
.auth-field { display: block; margin-bottom: 16px; }
.auth-field > span { display: block; font-size: .82rem; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.auth-field input { width: 100%; padding: 12px 14px; border: 1px solid var(--border-strong); border-radius: 10px;
  font-size: 1rem; background: var(--surface-2); color: var(--text); transition: border-color .15s, box-shadow .15s; }
.auth-field input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); background: var(--surface); }
.auth-pass { position: relative; display: flex; }
.auth-pass input { padding-right: 62px; }
.pass-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  border: 0; background: none; color: var(--brand-dark); font-size: .8rem; font-weight: 700;
  cursor: pointer; padding: 6px 8px; border-radius: 7px; }
.pass-toggle:hover { background: var(--surface-3); }
.auth-submit { display: block; width: 100%; text-align: center; margin-top: 8px; border: 0; cursor: pointer; }
.auth-error { background: rgba(239,68,68,.13); color: #fca5a5; font-size: .88rem; font-weight: 500;
  padding: 10px 13px; border-radius: 9px; margin-bottom: 16px; }
.auth-switch { text-align: center; color: var(--muted); font-size: .9rem; margin: 18px 0 0; }
.auth-switch a { color: var(--brand-dark); font-weight: 600; text-decoration: none; }
.auth-legal { text-align: center; color: var(--faint); font-size: .78rem; margin: 20px 0 0; }

@media (max-width: 860px) {
  .auth-split { grid-template-columns: 1fr; }
  .auth-brandside { display: none; }
}

/* ---------- Account dashboard ---------- */
body.account-mode > .nav,
body.account-mode > .hero,
body.account-mode > .how,
body.account-mode > .offer,
body.account-mode > footer { display: none; }
body.account-mode main#start { max-width: none; margin: 0; padding: 0; }

.acct-wrap { max-width: 1080px; margin: 0 auto; padding: 0 0 60px; min-height: 100vh; }
.acct-bar { display: flex; align-items: center; justify-content: space-between; padding: 16px 24px;
  border-bottom: 1px solid var(--border); background: var(--surface); position: sticky; top: 0; z-index: 20; }
.acct-bar-right { display: flex; align-items: center; gap: 16px; }
.acct-email { color: var(--muted); font-size: .9rem; font-weight: 500; }
.acct-status { max-width: 760px; margin: 26px auto 0; padding: 0 22px; }
.sub-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); padding: 22px 24px; display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.sub-card h3 { margin: 0 0 4px; font-size: 1.1rem; }
.sub-card p { margin: 0; color: var(--muted); font-size: .9rem; }
.sub-pill { font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  padding: 5px 11px; border-radius: 999px; }
.sub-pill.active { background: var(--brand-soft); color: var(--brand-dark); }
.sub-pill.inactive { background: rgba(239,68,68,.13); color: #fca5a5; }
.acct-plan { margin-top: 26px; }
/* the saved-plan renderer reuses .rv; keep it contained within the dashboard */
.acct-plan .rv { min-height: 0; }
.acct-empty { max-width: 760px; margin: 26px auto 0; padding: 0 22px; text-align: center; color: var(--muted); }
.acct-empty .cta { border: 0; cursor: pointer; margin-top: 18px; }

/* ---------- Landing hover interactions ---------- */
/* springy "pop" easing shared by the icons */
.why-item { transition: transform .2s ease; }
.why-item:hover { transform: translateY(-5px); }
.why-img { transition: transform .28s cubic-bezier(.34,1.56,.64,1), filter .28s ease; }
.why-item:hover .why-img { transform: scale(1.22) translateY(-2px);
  filter: drop-shadow(0 6px 15px rgba(56,189,248,.45)); }

/* hero bubbles: keep floating, pop + brighten the icon on hover */
.bub { transition: box-shadow .25s ease, border-color .25s ease; }
.bub img { transition: transform .28s cubic-bezier(.34,1.56,.64,1); }
.bub:hover { border-color: rgba(56,189,248,.7); box-shadow: 0 0 34px rgba(56,189,248,.55); }
.bub:hover img { transform: scale(1.28) rotate(-6deg); }

/* training-plan card: the line graph draws itself on hover */
.spark path { stroke-dasharray: 240; stroke-dashoffset: 0; }
.mock-plan { transition: transform .2s ease, border-color .25s ease; }
.mock-plan:hover { transform: translateY(-3px); border-color: rgba(167,139,250,.5); }
.mock-plan:hover .spark path { animation: draw-line .9s ease forwards; }
@keyframes draw-line { from { stroke-dashoffset: 240; } to { stroke-dashoffset: 0; } }

/* nutrition card: the donut spins on hover */
.mock-nutri { transition: transform .2s ease, border-color .25s ease; }
.mock-nutri:hover { transform: translateY(-3px); border-color: rgba(52,211,153,.5); }
.donut { transition: transform .3s ease; }
.mock-nutri:hover .donut { animation: spin 3.2s linear infinite; }

/* snapshot card: bars grow in when its card is hovered */
.mock-snap { transition: transform .2s ease, border-color .25s ease; }
.mock-snap:hover { transform: translateY(-3px); border-color: rgba(56,189,248,.5); }
.snap-bar i { transform-origin: left center; transition: transform .3s ease; }
.mock-snap:hover .snap-bar i { animation: bar-grow .7s cubic-bezier(.16,1,.3,1) both; }
@keyframes bar-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }

@media (prefers-reduced-motion: reduce) {
  .mock-nutri:hover .donut,
  .mock-plan:hover .spark path,
  .mock-snap:hover .snap-bar i { animation: none !important; }
  .why-item:hover .why-img, .bub:hover img { transform: none !important; }
}

/* ---------- Per-section feedback widget ---------- */
.fb { margin-top: 26px; padding-top: 18px; border-top: 1px dashed var(--border-strong); }
.fb-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.fb-q { font-weight: 700; color: var(--heading); font-size: .95rem; }
.fb-saved { font-size: .78rem; font-weight: 700; color: var(--brand-dark); }
.fb-scale { display: flex; align-items: center; gap: 12px; margin: 12px 0 10px; flex-wrap: wrap; }
.fb-scale > span { font-size: .74rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--faint); }
.fb-rate { display: flex; flex-wrap: wrap; gap: 6px; }
.fb-dot { width: 32px; height: 32px; border-radius: 9px; border: 1px solid var(--border-strong);
  background: var(--surface-2); color: var(--muted); font-weight: 700; font-size: .84rem; cursor: pointer;
  transition: border-color .12s, color .12s, transform .1s, background .12s; }
.fb-dot:hover { border-color: var(--brand-2); color: var(--heading); transform: translateY(-1px); }
.fb-dot.sel { color: #fff; border-color: transparent;
  background: linear-gradient(120deg, #6366f1, #0ea5e9 55%, #10b981); }
.fb-comment { width: 100%; margin-bottom: 10px; }
.fb-foot { display: flex; align-items: center; gap: 12px; }
.fb-save { padding: 9px 18px; border-radius: 9px; border: 0; cursor: pointer; font-weight: 700; font-size: .86rem;
  color: #fff; background: linear-gradient(120deg, var(--brand), var(--brand-deep));
  box-shadow: 0 10px 22px -12px rgba(16,185,129,.7); transition: transform .1s; }
.fb-save:hover { transform: translateY(-1px); }
.fb-save:disabled { opacity: .6; cursor: default; transform: none; }
.fb-msg { font-size: .82rem; font-weight: 500; }
.fb-msg.ok { color: var(--brand-dark); }
.fb-msg.err { color: #f87171; }

/* ---------- Admin: beta-feedback review ---------- */
.admin-body { max-width: 860px; margin: 0 auto; padding: 30px 22px 70px; }
.admin-stats { display: flex; gap: 14px; flex-wrap: wrap; margin: 18px 0 8px; }
.admin-stat { flex: 1; min-width: 120px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow-sm); text-align: center; }
.as-num { display: block; font-size: 1.8rem; font-weight: 800; color: var(--heading); }
.as-lbl { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); font-weight: 600; }
.admin-secavg { margin: 22px 0 8px; }
.admin-secavg table { border-collapse: collapse; width: 100%; font-size: .9rem; }
.admin-secavg th, .admin-secavg td { border: 1px solid var(--border); padding: 8px 12px; text-align: left; }
.admin-secavg th { background: var(--surface-3); color: var(--heading); font-weight: 700; }
.admin-item { background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 14px 16px; margin-bottom: 12px; box-shadow: var(--shadow-sm); }
.ai-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ai-section { font-weight: 700; color: var(--heading); }
.ai-rating { font-weight: 800; color: #fff; font-size: .82rem; padding: 3px 10px; border-radius: 999px;
  background: linear-gradient(120deg, #6366f1, #0ea5e9 55%, #10b981); white-space: nowrap; }
.ai-rating.none { background: var(--surface-3); color: var(--faint); font-weight: 600; }
.ai-comment { margin: 8px 0; color: var(--text); font-size: .92rem; line-height: 1.55; }
.ai-comment.muted { color: var(--faint); font-style: italic; }
.ai-meta { font-size: .78rem; color: var(--faint); }

/* ---------- Print ---------- */
@media print {
  /* the site theme is dark; printing must flip to ink-on-paper */
  :root {
    --bg: #fff; --surface: #fff; --surface-2: #f5f8fb; --surface-3: #eef3f8;
    --border: #d8dee6; --border-strong: #c3ccd8;
    --text: #22364a; --heading: #0e2033; --muted: #5a6b7d; --faint: #8a99a8;
    --brand-dark: #059669; --brand-soft: #e7f8f1; --seg-off: #e2e8f0;
    --shadow-sm: none; --shadow: none; --shadow-lg: none;
  }
  .nav, .hero, .landing, .how, .form-head, form, footer, #status, .rv-sidebar { display: none !important; }
  body { background: #fff; }
  body::before, body::after { display: none; }
  main#start { padding: 0; max-width: none; }
  .rv { display: block; }
  .rv-content { padding: 0; max-width: none; }
  .rv-pane { display: block !important; max-width: none; margin-bottom: 18px; break-inside: avoid; }
  .rv-pane:not(.plain) { box-shadow: none; border: 1px solid #ccc; }
  .snapshot, .gene-card { box-shadow: none; break-inside: avoid; }
  .fb { display: none !important; }
}

/* ---- Free-until-Oct-1 promo popup ---- */
.promo-overlay { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center;
  padding: 20px; background: rgba(3,6,14,.72); backdrop-filter: blur(6px); animation: promoFade .25s ease; }
.promo-overlay[hidden] { display: none; }
.promo-modal { position: relative; max-width: 460px; width: 100%; background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: var(--radius); padding: 36px 32px 30px; box-shadow: var(--shadow-lg); text-align: center; animation: promoPop .3s ease; }
.promo-modal h2 { margin: 10px 0 12px; color: var(--heading); font-size: 1.55rem; line-height: 1.25; }
.promo-modal p { margin: 0 0 22px; color: var(--text); }
.promo-badge { display: inline-block; padding: 4px 12px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-dark);
  font-size: .78rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.promo-close { position: absolute; top: 10px; right: 12px; background: none; border: 0; color: var(--muted); font-size: 1.6rem;
  line-height: 1; cursor: pointer; padding: 6px; }
.promo-close:hover { color: var(--heading); }
@keyframes promoFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes promoPop { from { transform: translateY(12px) scale(.97); opacity: 0; } to { transform: none; opacity: 1; } }
