/* =========================================================
   GenePrint marketing site: styles
   Mobile-first: base styles are for phones, then
   @media (min-width: ...) adds tablet and desktop layout.
   Logical properties (inline/block) are used so the page
   can flip for Arabic (dir="rtl") without new CSS.
   ========================================================= */

/* ---------- 0. Brand font (self-hosted, no third-party requests) ----------
   Neue Montreal (Pangram Pangram, needs a web licence for this domain).
   Used for everything, including the large display text. */
@font-face { font-family: "Neue Montreal"; src: url("../assets/fonts/NeueMontreal-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Neue Montreal"; src: url("../assets/fonts/NeueMontreal-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Neue Montreal"; src: url("../assets/fonts/NeueMontreal-Bold.woff2") format("woff2"); font-weight: 600 700; font-display: swap; }

/* ---------- 1. Design tokens ---------- */
:root {
  /* Brand colours, sampled from the Geneprint identity (pitch deck cover).
     The brand gradient runs from deep sage (bottom left) to pale lime (top right). */
  --navy: #1D1D1D;         /* brand black ("Geneprint Black" in Figma) */
  --forest: #20524C;       /* deep forest: dark text and buttons */
  --sage-deep: #5C7A72;    /* darkest sage in the identity gradient */
  --sage-mid: #8DA88F;
  --sage-light: #B5C89D;
  --lime-glow: #DFE5A9;    /* palest corner of the identity gradient */
  --sage: #8DA88F;
  --mint: #74C7AF;
  --lime: #DFE5A9;
  --soft: #E7EEE4;         /* pale sage-white page background */
  --white: #FFFFFF;
  --sage-dark: #4A7566;  /* sage that passes 4.5:1 on white, for text */
  --grey-bg: #F6F7F0;
  --line: #D3DDCC;
  --error: #A3261B;
  --alert: #A8392C;     /* "needs attention" in the preview */

  /* Text */
  --text: var(--navy);
  --text-on-dark: var(--white);

  /* Brand fonts (section 0), with system fallbacks */
  --font: "Neue Montreal", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: var(--font);   /* display text: Neue Montreal too (no serif) */

  /* Fine grain laid over the brand gradients, as in the identity files */
  --grain: url("../assets/images/grain.png");

  --radius-pill: 999px;
  --gutter: 20px;        /* side padding on phones */
  --max-width: 1240px;
}

@media (min-width: 768px) {
  :root { --gutter: 40px; }
}

/* ---------- 2. Base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem; /* 17px, never below 16px */
  line-height: 1.6;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }

a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--mint);
  outline-offset: 3px;
}

/* Text for screen readers only */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  inset-inline-start: 8px;
  top: -100px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--white);
  color: var(--navy);
  border-radius: 8px;
}
.skip-link:focus { top: 8px; }

/* ---------- 3. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 48px;
  padding: 12px 28px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .2s, color .2s, transform .2s;
}

.btn--light {
  background: var(--white);
  color: var(--navy);
}
.btn--light:hover { background: var(--lime); }

.btn--small {
  min-height: 44px;
  padding: 8px 22px;
  font-size: 1rem;
}

/* Button with the round mint arrow from the logo folder */
.btn--arrow {
  padding-inline-end: 8px;
  min-height: 56px;
  font-size: 1.0625rem;
}
/* The arrow sits in a round inset circle in the button's opposite colour */
.btn__circle {
  flex: none;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--btn-circle-bg, var(--forest));
  color: var(--btn-circle-fg, var(--white));
}
.btn__circle svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- 4. Header ---------- */
/* A plain header at the top of the hero: white logo, white links and a white
   Pre-Order button, with no shapes around them. It scrolls away with the page.
   A soft dark shade at the top of the hero keeps the white text readable
   (.hero__shade, section 5). */
.site-header {
  position: absolute;
  inset-inline: 0;
  top: 0;
  z-index: 10;
  color: var(--text-on-dark);
}

.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  /* Same content width as .container: the side padding sits outside the max width */
  max-width: calc(var(--max-width) + 2 * var(--gutter));
  margin-inline: auto;
  padding: 18px var(--gutter);
}

.site-header__logo { display: block; }
.site-header__logo img { width: 132px; height: auto; }

/* Menu button (phones and tablets) */
.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 8px 18px;
  border: 1px solid currentColor;
  border-radius: var(--radius-pill);
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
}
.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}
.nav-toggle__bars { position: relative; }
.nav-toggle__bars::before,
.nav-toggle__bars::after { content: ""; position: absolute; inset-inline-start: 0; }
.nav-toggle__bars::before { top: -6px; }
.nav-toggle__bars::after { top: 6px; }

/* Phone menu: a white panel under the header bar */
.site-nav {
  display: none;
  flex-basis: 100%;
  padding: 8px 20px 20px;
  border-radius: 20px;
  background: var(--white);
  color: var(--navy);
  box-shadow: 0 16px 40px rgba(29, 29, 29, .18);
}
.site-nav.is-open { display: block; }

.site-nav__links {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
}
.site-nav__links li + li { border-top: 1px solid var(--line); }
.site-nav__links a {
  display: block;
  padding: 14px 0;
  text-decoration: none;
  font-size: 1.0625rem;
  font-weight: 500;
}

.site-nav__actions .btn { width: 100%; }

.btn--nav {
  background: var(--forest);
  color: var(--white);
}
.btn--nav:hover { background: var(--navy); }

.lang-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 6px 16px;
  border: 1px solid currentColor;
  border-radius: var(--radius-pill);
  font-size: 1rem;
}

/* Desktop header: everything in one row, no panel */
@media (min-width: 960px) {
  .nav-toggle { display: none; }

  .site-header__inner { flex-wrap: nowrap; padding-block: 26px; }
  .site-header__logo img { width: 148px; }

  /* Links and the Pre-Order button in one plain row */
  .site-nav {
    display: flex;
    flex-basis: auto;
    align-items: center;
    gap: 36px;
    padding: 0;
    border-radius: 0;
    background: none;
    color: var(--white);
    box-shadow: none;
  }
  .btn--nav { background: var(--white); color: var(--navy); }
  .btn--nav:hover { background: var(--lime-glow); }
  .site-nav__links {
    display: flex;
    gap: 32px;
    margin: 0;
  }
  .site-nav__links li + li { border: 0; }
  .site-nav__links a {
    position: relative;
    padding: 8px 0;
    font-size: 1rem;
    white-space: nowrap;
  }
  /* Thin line that grows under a link on hover */
  .site-nav__links a::after {
    content: "";
    position: absolute;
    inset-inline: 0;
    bottom: 2px;
    height: 1.5px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .25s;
  }
  [dir="rtl"] .site-nav__links a::after { transform-origin: right; }
  .site-nav__links a:hover::after,
  .site-nav__links a:focus-visible::after { transform: scaleX(1); }

  .site-nav__actions { flex-wrap: nowrap; }
  .site-nav__actions .btn { width: auto; }

}

@media (prefers-reduced-motion: reduce) {
  .site-nav__links a::after { transition: none; }
}

/* ---------- 5. Hero ---------- */
/* Dark forest-to-sage background with an animated DNA helix drawn on a
   <canvas> by js/dna-helix.js. White text passes 4.5:1 on these colours. */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  min-height: 100svh;
  padding: 120px var(--gutter) 64px;
  color: var(--text-on-dark);
  /* Identity gradient. Phones: dark at the bottom, where the text is. */
  background:
    var(--grain) 0 0 / 160px repeat,
    linear-gradient(20deg,
    #3F5F56 0%, var(--sage-deep) 38%, var(--sage-mid) 66%, var(--sage-light) 84%, var(--lime-glow) 100%);
  background-blend-mode: overlay, normal;
}

/* Bottom of the hero fades into the colour that section 2 starts with (#34524A),
   so there is no hard line between them (see .find-out below).
   It is ::after so it paints on top of the text shade (::before). */
.hero::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  z-index: -1;
  height: 220px;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(52, 82, 74, 0), #34524A);
}

/* Soft dark shade along the top of the hero, behind the plain header */
.hero__shade {
  position: absolute;
  inset-inline: 0;
  top: 0;
  z-index: -1;
  height: 180px;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(22, 48, 42, .68) 0%, rgba(22, 48, 42, .55) 45%, rgba(22, 48, 42, 0) 100%);
}

/* The helix canvas fills the hero, behind the text */
.hero__dna {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
}

/* Phones: darken the bottom, where the text sits over the helix */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(to bottom,
    rgba(32, 82, 76, 0) 40%,
    rgba(32, 82, 76, .35) 70%,
    rgba(32, 82, 76, .55) 100%);
}

.hero__content {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
}

.hero__title {
  margin: 0 0 20px;
  font-size: clamp(2.75rem, 11vw, 6.25rem);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.03em;
}

.hero__title-line { display: block; }

.hero__lead {
  max-width: 30em;
  margin: 0 0 32px;
  font-size: 1.125rem;
}

/* Desktop: text on the left, helix on the right */
@media (min-width: 900px) {
  .hero {
    align-items: center;
    padding-block: 140px 80px;
    /* Desktop: dark on the left (text), pale lime on the right (helix) */
    background:
      var(--grain) 0 0 / 160px repeat,
      linear-gradient(70deg,
      #3F5F56 0%, var(--sage-deep) 40%, var(--sage-mid) 62%, var(--sage-light) 80%, var(--lime-glow) 100%);
  }

  .hero::before {
    background: linear-gradient(to right,
      rgba(32, 82, 76, .45) 0%,
      rgba(32, 82, 76, .25) 45%,
      rgba(32, 82, 76, 0) 62%);
  }
  [dir="rtl"] .hero::before {
    background: linear-gradient(to left,
      rgba(32, 82, 76, .45) 0%,
      rgba(32, 82, 76, .25) 45%,
      rgba(32, 82, 76, 0) 62%);
  }

  .hero__content > * { max-width: 620px; }
  /* Each headline line stays on one line on desktop */
  .hero__content > .hero__title {
    max-width: none;
    width: fit-content;   /* so the empty space beside it still reaches the helix */
    font-size: clamp(3rem, 5vw, 5.25rem);
  }
  .hero__title-line { white-space: nowrap; }
}

/* ---------- 6. Shared section styles ---------- */
.section {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 72px var(--gutter);
}

@media (min-width: 900px) {
  .section { padding-block: 120px; }
}

.container {
  max-width: var(--max-width);
  margin-inline: auto;
}

/* Sage gradient background, from the "Discover" frame.
   Kept dark enough that white text passes 4.5:1 contrast. */
.section--sage {
  color: var(--text-on-dark);
  background:
    var(--grain) 0 0 / 160px repeat,
    radial-gradient(ellipse at 100% 0%, rgba(223, 229, 169, .35), transparent 45%),
    linear-gradient(30deg, #3A5A51 0%, #4D6D64 45%, var(--sage-deep) 100%);
  background-blend-mode: overlay, normal, normal;
}

.deco-circles {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.hero .deco-circles { z-index: -3; }

.deco-circles circle {
  fill: none;
  stroke: rgba(255, 255, 255, .07);
  stroke-width: 110;
}

/* ---------- 7. Shared headings and backgrounds ---------- */
.section-title {
  max-width: 22em;
  margin: 0 0 20px;
  font-size: clamp(2rem, 5.5vw, 3.25rem);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.section-lead {
  max-width: 36em;
  margin: 0 0 32px;
  font-size: 1.125rem;
}

.accent { color: var(--sage-dark); }
.accent-light { color: var(--lime); }

.section--soft { background: var(--soft); }

.btn--sage {
  background: var(--forest);
  color: var(--white);
}
.btn--sage:hover { background: var(--navy); }

/* ---------- 8b. The problem: "one of them" ---------- */
/* Deep brand sage, continuing the hero. The highlight colour (--warn) is the
   brand lime. The hero fades into --problem-top (#34524A). */
.problem {
  --problem-top: #34524A;
  --warn: var(--lime-glow);  /* brand lime: about 6:1 on this background */
  color: var(--text-on-dark);
  background:
    var(--grain) 0 0 / 160px repeat,
    radial-gradient(ellipse at 85% 100%, rgba(223, 229, 169, .10), transparent 50%),
    linear-gradient(to bottom, var(--problem-top) 0%, #26433C 55%, var(--forest) 100%);
  background-blend-mode: overlay, normal, normal;
}

.problem__danger {
  max-width: 900px;
  margin-inline: auto;
  text-align: center;
}

/* Three silhouettes: parent, partner, you */
.loved {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: clamp(20px, 6vw, 64px);
  margin: 0 0 40px;
  padding: 0;
  list-style: none;
}
.loved__person {
  --person: rgba(255, 255, 255, .22);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.loved__figure {
  width: clamp(56px, 11vw, 92px);
  height: auto;
  fill: var(--person);
  transition: fill .6s ease;
}
/* Without animation, the first person carries the warning colour */
.loved__person:first-child { --person: var(--warn); }

.problem__title {
  margin: 0 0 16px;
  font-family: var(--serif);
  font-size: clamp(2.5rem, 7vw, 4.75rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.problem__warn { color: var(--warn); }

.problem__second {
  margin: 0 0 28px;
  font-size: clamp(1.25rem, 3vw, 1.75rem);
}
.problem__action {
  margin: 0 0 24px;
  font-size: clamp(1.125rem, 2.4vw, 1.375rem);
  font-weight: 600;
}

.problem__stat {
  font-family: var(--serif);
  font-size: 1.4em;
  color: var(--warn);
}

.problem__source {
  max-width: 46em;
  margin: 0 auto;
  font-size: 1rem;
  color: rgba(255, 255, 255, .85);
}
.problem__source a {
  color: var(--white);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.problem__source a:hover { color: var(--lime-glow); }

/* ---------- 9. What you can find out (two groups) ---------- */
.find-out { background: var(--soft); }

.groups {
  display: grid;
  gap: 20px;
  margin-top: 40px;
}

/* Each group is a large rounded panel */
.group {
  position: relative;
  overflow: hidden;
  padding: 28px 24px;
  border-radius: 28px;
}
.group--risk {
  background: linear-gradient(155deg, #2C5A52 0%, var(--forest) 60%, #183F3A 100%);
  color: var(--white);
}
.group--health {
  background: linear-gradient(155deg, #EEF1C9 0%, var(--lime-glow) 55%, #CFDBA0 100%);
  color: var(--forest);
}
/* Soft arc in the corner, like the brand identity */
.group::after {
  content: "";
  position: absolute;
  top: -120px;
  inset-inline-end: -120px;
  width: 280px;
  height: 280px;
  border: 46px solid currentColor;
  border-radius: 50%;
  opacity: .06;
  pointer-events: none;
}

.group__name {
  margin: 0 0 20px;
  font-family: var(--serif);
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 400;
  line-height: 1.1;
}

/* One row per area: icon, name, short hint */
.areas {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}
.area {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid currentColor;
  border-top-color: rgba(127, 127, 127, .3);
}
.group--risk .area { border-top-color: rgba(255, 255, 255, .16); }
.group--health .area { border-top-color: rgba(32, 82, 76, .16); }

.area__icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
}
.group--risk .area__icon { background: var(--lime-glow); color: var(--forest); }
.group--health .area__icon { background: var(--forest); color: var(--lime-glow); }
.area__icon svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.area__text { display: flex; flex-direction: column; }
.area__name {
  font-size: 1.375rem;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -.01em;
}

@media (min-width: 900px) {
  .groups { grid-template-columns: 1fr 1fr; gap: 24px; }
  .group { padding: 40px; }
}

/* ---------- 10. Preview your results (tabs + example portal) ---------- */
/* Risk colours used only in the example reports:
   1 = average (sage), 2 = moderately increased (amber), 3 = significantly increased (deep amber) */
.preview {
  --r1: #7E9F87;
  --r2: #D2B44F;
  --r3: #B07C2A;
  --mist: #F4F6EE;
  background: var(--white);
}

.preview__layout {
  display: grid;
  gap: 20px;
  margin-top: 8px;
}

/* Tabs: a scrolling row of chips on phones, a vertical list on desktop */
.ptabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: thin;
}
.ptabs__group { display: none; }

.ptab {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 8px 16px 8px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--soft);
  color: var(--forest);
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s, translate .2s;
}
.ptab:hover { border-color: var(--forest); }
.ptab__icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--white);
}
.ptab__icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ptab.is-active {
  border-color: var(--forest);
  background: var(--forest);
  color: var(--white);
}
.ptab.is-active .ptab__icon { background: var(--lime-glow); color: var(--forest); }

/* The example portal window */
.portal {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--mist);
  box-shadow: 0 24px 60px rgba(32, 82, 76, .14);
}
.portal__bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--white);
  font-size: 1rem;
  color: var(--forest);
}
.portal__dots { display: inline-flex; gap: 6px; }
.portal__dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.portal__title { font-weight: 600; }
.portal__example {
  margin-inline-start: auto;
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  background: var(--soft);
  font-size: 1rem;
  font-weight: 600;
}

.ppanel {
  position: relative;
  padding: 28px 22px 26px;
  color: var(--navy);
}
.ppanel:focus-visible { outline-offset: -4px; }
.js .ppanel:not(.is-active) { display: none; }
.ppanel.is-active { animation: panel-in .35s ease; }
@keyframes panel-in { from { opacity: 0; transform: translateY(8px); } }

.example-badge {
  display: inline-block;
  margin: 0 0 14px;
  padding: 3px 10px;
  border-radius: 6px;
  background: var(--forest);
  color: var(--lime-glow);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.ppanel__title {
  margin: 0 0 4px;
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 400;
  line-height: 1.15;
  color: var(--forest);
}
.ppanel__sub { margin: 0 0 18px; font-size: 1rem; }
.ppanel__warn {
  margin: 18px 0 0;
  padding: 12px 16px;
  border-radius: 12px;
  background: #FBF1DA;
  color: #6B4A12;
  font-size: 1rem;
  font-weight: 600;
}

/* One row per condition with a three-zone gauge */
.risk-list, .trait-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.risk-row {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "name pill" "gauge gauge";
  gap: 8px 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--white);
}
.risk-row__name { grid-area: name; font-weight: 700; }
.risk-row .gauge { grid-area: gauge; }
.risk-row .risk-pill { grid-area: pill; }

.gauge {
  position: relative;
  display: block;
  height: 8px;
  border-radius: 8px;
  background: linear-gradient(to right, #DCE6DA 0 33.3%, #F1E6BE 33.3% 66.6%, #EBD3AE 66.6% 100%);
}
.gauge__dot {
  position: absolute;
  top: 50%;
  left: var(--at);
  width: 16px;
  height: 16px;
  border: 3px solid var(--white);
  border-radius: 50%;
  translate: -50% -50%;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .25);
}
.gauge--1 .gauge__dot { --at: 16%; background: var(--r1); }
.gauge--2 .gauge__dot { --at: 50%; background: var(--r2); }
.gauge--3 .gauge__dot { --at: 84%; background: var(--r3); }
.gauge-legend {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  padding-inline: 14px;
  font-size: 1rem;
  color: #4B5B57;
}

.risk-pill {
  display: inline-block;
  justify-self: end;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 1rem;
  font-weight: 700;
  white-space: nowrap;
}
.risk-pill--1 { background: #DCE6DA; color: var(--forest); }
.risk-pill--2 { background: #F4E7B8; color: #5E4A0E; }
.risk-pill--3 { background: #EBD3AE; color: #5A3A0C; }

.risk-row__name small { display: block; font-size: 1rem; font-weight: 400; color: #4B5B57; }

/* Lifestyle: trait sliders */
.trait {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--white);
}
.trait__name { font-weight: 700; }
.trait__ends { display: flex; justify-content: space-between; font-size: 1rem; color: #4B5B57; }
.trait__track { position: relative; display: block; height: 6px; margin-top: 8px; border-radius: 6px; background: #DCE3D8; }
.trait__knob {
  position: absolute;
  top: 50%;
  left: var(--pos);
  width: 20px;
  height: 20px;
  border: 2px solid var(--forest);
  border-radius: 50%;
  background: var(--lime-glow);
  translate: -50% -50%;
}
.trait__tip {
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--mist);
  font-size: 1rem;
}

/* Ancestry: dotted map and a key */
.ancestry-list {
  display: grid;
  gap: 10px;
  max-width: 520px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.ancestry-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
}

.ancestry-list b { margin-inline-start: auto; }

@media (min-width: 700px) {
  .risk-row { grid-template-columns: 210px 1fr auto; grid-template-areas: "name gauge pill"; }
  .gauge-legend { margin-inline-start: 222px; margin-inline-end: 180px; }
  .trait { grid-template-columns: 120px 1fr 1fr; align-items: center; gap: 20px; }
  .ppanel { padding: 32px 36px 32px; }
}

@media (min-width: 1000px) {
  .preview__layout { grid-template-columns: 240px 1fr; gap: 32px; align-items: start; }
  .ptabs { flex-direction: column; overflow: visible; padding: 0; }
  .ptabs__group {
    display: block;
    margin: 12px 0 2px;
    font-size: 1rem;
    font-weight: 700;
    color: var(--forest);
  }
  .ptabs__group:first-child { margin-top: 0; }
  .ptab { width: 100%; }
  .ptab:hover { translate: 4px 0; }
  .ptab.is-active { translate: 4px 0; }
  .ppanel { min-height: 560px; }
}

@media (prefers-reduced-motion: reduce) {
  .ptab { transition: none; }
  .ppanel.is-active { animation: none; }
}

/* ---------- 11. How it works (timeline) ---------- */
/* Phones: steps stacked, the line runs down the left of the icons.
   Desktop: three columns, the line runs across behind the icons.
   The line is .timeline::before (track) and ::after (the part that fills in). */
.timeline {
  --icon: 88px;
  position: relative;
  display: grid;
  gap: 36px;
  margin: 48px 0 0;
  padding: 0;
  list-style: none;
}
.timeline::before,
.timeline::after {
  content: "";
  position: absolute;
  z-index: 0;
  inset-inline-start: calc(var(--icon) / 2 - 1px);
  top: calc(var(--icon) / 2);
  bottom: calc(var(--icon) / 2);
  width: 2px;
  border-radius: 2px;
}
.timeline::before { background: var(--line); }
.timeline::after {
  background: var(--forest);
  transform-origin: top;
}

.tstep {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: var(--icon) 1fr;
  column-gap: 20px;
  align-items: center;
}

.tstep__icon {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: var(--icon);
  height: var(--icon);
  border-radius: 50%;
  background: var(--forest);
  color: var(--lime-glow);
  box-shadow: 0 0 0 8px var(--soft), 0 12px 28px rgba(32, 82, 76, .25);
}
.tstep:nth-child(2) .tstep__icon { background: #2C6A60; }
.tstep:nth-child(3) .tstep__icon { background: var(--lime-glow); color: var(--forest); }
.tstep__icon svg {
  width: 44%;
  height: 44%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tstep__num {
  align-self: end;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--forest);
}
.tstep__title {
  align-self: start;
  margin: 2px 0 0;
  font-size: clamp(1.25rem, 3vw, 1.5rem);
  line-height: 1.3;
}
.tstep__note {
  grid-column: 2;
  margin: 2px 0 0;
  font-size: 1rem;
  color: #3D4F4A;
}
@media (min-width: 900px) {
  .tstep__note { grid-column: auto; margin-top: -4px; }
}

@media (min-width: 900px) {
  .timeline {
    --icon: 120px;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
  }
  /* Horizontal line from the centre of the first icon to the centre of the last */
  .timeline::before,
  .timeline::after {
    top: calc(var(--icon) / 2 - 1px);
    bottom: auto;
    inset-inline-start: calc(100% / 6);
    width: calc(100% * 2 / 3);
    height: 2px;
  }
  .timeline::after { transform-origin: left; }
  [dir="rtl"] .timeline::after { transform-origin: right; }

  .tstep {
    grid-template-columns: 1fr;
    align-content: start;   /* all three steps line up at the top */
    align-items: start;
    justify-items: center;
    text-align: center;
    row-gap: 8px;
  }
  .tstep__icon { grid-row: auto; margin-bottom: 16px; }
  .tstep__title { max-width: 14em; }
}

/* ---------- 11b. How it works: hover / focus ----------
   Hovering a step (or tabbing to it, or tapping it on a phone):
   - the step's icon grows and gets a lime ring, the other steps fade back,
   - the line fills up to that step (rules in section 16, after the scroll animation). */
.tstep {
  cursor: default;
  border-radius: 20px;
}
.tstep:focus-visible { outline-offset: 8px; }

.tstep__icon svg { transition: transform .35s ease; }

/* Other steps fade back: their text fades, their icon stays solid (so the
   line behind it never shows through) but loses some colour. */
.tstep > :not(.tstep__icon) { transition: opacity .3s ease; }
.tstep__icon { transition: transform .35s ease, box-shadow .35s ease, filter .3s ease; }
.timeline:is(:hover, :focus-within) .tstep:not(:hover, :focus-within) > :not(.tstep__icon) { opacity: .45; }
.timeline:is(:hover, :focus-within) .tstep:not(:hover, :focus-within) .tstep__icon { filter: saturate(.35) brightness(1.15); }

.tstep:hover .tstep__icon,
.tstep:focus-within .tstep__icon {
  transform: scale(1.04);
  box-shadow: 0 0 0 8px var(--soft), 0 0 0 14px rgba(192, 210, 119, .55), 0 18px 36px rgba(32, 82, 76, .3);
}


@media (prefers-reduced-motion: reduce) {
  .tstep > *, .tstep__icon, .tstep__icon svg { transition: none; }
}

/* ---------- 13. Interest tick-boxes in the form ---------- */
.modules {
  margin-inline: 0;
  padding: 0;
  border: 0;
}
.modules__group {
  margin: 10px 0 6px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--forest);
}
.modules__options + .modules__group { margin-top: 12px; }

.modules legend {
  margin-bottom: 4px;
  font-size: 1rem;
  padding: 0;
  font-weight: 600;
}
/* Chips sized to their text, so a group of 4 fits on one line where there is room */
.modules__options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.modules .modules__options label {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  margin: 0;
  padding: 4px 10px;
  white-space: nowrap;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 1rem;
  line-height: 1.3;
  font-weight: 400;
  cursor: pointer;
}
.modules__options input {
  flex: none;
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--forest);
}
.modules .modules__options label:has(input:checked) {
  border-color: var(--forest);
  background: var(--lime);
}


/* ---------- 14. Pre-order your test (form) ---------- */
.preorder__grid { display: grid; gap: 32px; }

.form-card {
  padding: 24px;
  border-radius: 24px;
  background: var(--white);
  color: var(--navy);
  box-shadow: 0 12px 40px rgba(29, 29, 29, .15);
}

.field { margin-bottom: 20px; }

.field label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
}

.field__optional { font-weight: 400; }

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field select {
  width: 100%;
  min-height: 52px;
  padding: 12px 16px;
  border: 1px solid #8A968F;
  border-radius: 12px;
  background: var(--white);
  color: var(--navy);
  font: inherit;
}
.field input:focus,
.field select:focus {
  outline: 3px solid var(--mint);
  outline-offset: 1px;
  border-color: var(--forest);
}
.field input[aria-invalid="true"],
.field select[aria-invalid="true"] { border: 2px solid var(--error); }

.field__error {
  margin: 6px 0 0;
  color: var(--error);
  font-size: 1rem;
}

.field--check {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
}
.field--check input {
  width: 18px;
  height: 18px;
  margin: 3px 0 0;
  accent-color: var(--forest);
}
.field--check label { margin: 0; font-size: 1rem; line-height: 1.45; font-weight: 400; }
.field--check .field__error { grid-column: 1 / -1; }

.preorder-form__submit {
  width: 100%;
  justify-content: space-between;
  background: var(--forest);
  color: var(--white);
}
.preorder-form__submit:hover { background: var(--navy); }

.form-thanks h3 { margin: 0 0 8px; font-size: 1.5rem; color: var(--forest); }
.form-thanks p { margin: 0; }
.form-thanks:focus { outline: none; }

@media (min-width: 900px) {
  .preorder__grid { grid-template-columns: 5fr 7fr; gap: 56px; align-items: center; }
  .form-card { padding: 40px 32px; }
}

/* ---------- 15. Footer ---------- */
.site-footer {
  padding: 64px var(--gutter) 32px;
  color: #E6ECE9;
  background:
    linear-gradient(rgba(14, 26, 30, .78), rgba(14, 26, 30, .9)),
    url("../assets/images/texture-dark-water.jpg") center / cover;
}

.site-footer__top {
  display: grid;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, .2);
}

.site-footer__brand img { width: 150px; height: auto; }
.site-footer__brand p { margin: 12px 0 0; }
.site-footer__tagline { font-size: 1.125rem; font-weight: 600; line-height: 1.35; }

.site-footer__heading {
  margin: 0 0 12px;
  font-size: 1rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--white);
}

.site-footer__nav ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-footer__nav a { text-decoration: none; }
.site-footer__nav a:hover { text-decoration: underline; text-underline-offset: 4px; }

.site-footer__bottom { padding-top: 24px; font-size: 1rem; }
.site-footer__bottom p { margin: 0 0 10px; }

@media (min-width: 900px) {
  .site-footer { padding-top: 96px; }
  .site-footer__top { grid-template-columns: 1fr 1fr; }
}

/* ---------- 16. Animations ----------
   Everything here is switched off for visitors who ask their device for
   reduced motion. Scroll reveals only apply when JavaScript is on (the
   "js" class on <html>), so the page is never left blank without it. */
@media (prefers-reduced-motion: no-preference) {
  /* Hero text rises in when the page loads */
  .hero__content > * {
    animation: rise-in .9s cubic-bezier(.2, .7, .2, 1) both;
  }
  .hero__content > :nth-child(2) { animation-delay: .12s; }
  .hero__content > :nth-child(3) { animation-delay: .24s; }
  .hero__content > :nth-child(4) { animation-delay: .36s; }
  .hero__content > :nth-child(5) { animation-delay: .48s; }

  @keyframes rise-in {
    from { opacity: 0; transform: translateY(24px); }
  }


  /* Scroll reveal: js/main.js adds .reveal, then .is-visible when the
     element comes into view. --reveal-delay staggers items in a row. */
  .js .reveal {
    opacity: 0;
    transform: translateY(32px);
    transition:
      opacity .8s ease var(--reveal-delay, 0s),
      transform .8s cubic-bezier(.2, .7, .2, 1) var(--reveal-delay, 0s),
      translate .25s ease,
      box-shadow .25s ease,
      border-color .2s ease;
  }
  .js .reveal.is-visible {
    opacity: 1;
    transform: none;
  }

  /* "One of them": the warning colour moves from person to person */
  .loved__person { --person: rgba(255, 255, 255, .22); }
  .loved__figure { animation: one-of-them 6s ease-in-out infinite; }
  .loved__person:nth-child(2) .loved__figure { animation-delay: 2s; }
  .loved__person:nth-child(3) .loved__figure { animation-delay: 4s; }
  @keyframes one-of-them {
    0%, 100% { fill: rgba(255, 255, 255, .22); }
    12%, 28% { fill: var(--warn); }
    40% { fill: rgba(255, 255, 255, .22); }
  }

  /* Cards lift a little on hover */
  .group:hover {
    translate: 0 -4px;
    box-shadow: 0 18px 40px rgba(29, 29, 29, .14);
  }
  /* The icons fade in one after another when a group appears */
  .js .group.reveal .area__icon { opacity: 0; transition: opacity .6s ease; }
  .js .group.reveal .area:nth-child(2) .area__icon { transition-delay: .1s; }
  .js .group.reveal .area:nth-child(3) .area__icon { transition-delay: .2s; }
  .js .group.reveal .area:nth-child(4) .area__icon { transition-delay: .3s; }
  .js .group.reveal.is-visible .area__icon { opacity: 1; }

  /* Timeline: the line fills in, then each step fades in one after another */
  .js .timeline.reveal { opacity: 1; transform: none; }
  .js .timeline.reveal::after {
    transform: scaleY(0);
    transition: transform 1.4s cubic-bezier(.4, 0, .2, 1) .2s;
  }
  .js .timeline.reveal.is-visible::after { transform: scaleY(1); }
  .js .timeline.reveal .tstep {
    opacity: 0;
    translate: 0 16px;
    transition: opacity .6s ease, translate .6s cubic-bezier(.2, .7, .2, 1);
  }
  .js .timeline.reveal.is-visible .tstep { opacity: 1; translate: 0; }
  .js .timeline.reveal .tstep:nth-child(2) { transition-delay: .55s; }
  .js .timeline.reveal .tstep:nth-child(3) { transition-delay: 1.1s; }
  @media (min-width: 900px) {
    .js .timeline.reveal::after { transform: scaleX(0); }
    .js .timeline.reveal.is-visible::after { transform: scaleX(1); }
  }

  /* Decorative circles drift slowly */
  .deco-circles circle {
    transform-box: fill-box;
    transform-origin: center;
    animation: drift 20s ease-in-out infinite alternate;
  }
  .deco-circles circle:nth-child(2) { animation-duration: 26s; animation-direction: alternate-reverse; }
  .deco-circles circle:nth-child(3) { animation-duration: 32s; }
  @keyframes drift {
    to { transform: translate(40px, -30px) scale(1.06); }
  }
}

/* ---------- 17. Founding offer ---------- */
/* Small lime pill: under the Pre-Order button in the hero */
.offer-badge {
  display: inline-block;
  margin: 0 0 20px;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  background: var(--lime);
  color: var(--forest);
  font-size: 1rem;
  font-weight: 700;
}

/* Highlighted box next to the pre-order form */
.offer-box {
  max-width: 30em;
  padding: 20px 24px;
  border: 1px solid rgba(223, 229, 169, .5);
  border-radius: 16px;
  background: rgba(223, 229, 169, .12);
}
.offer-box p { margin: 0; }
.offer-box .offer-box__title {
  margin-bottom: 6px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--lime);
}
.offer-box .offer-box__title:last-child { margin-bottom: 0; }

/* ---------- 18. How it works: the line fills up to the hovered step ---------- */
.timeline::after { transition: transform .45s cubic-bezier(.4, 0, .2, 1); }
.timeline.timeline:has(.tstep:nth-child(1):is(:hover, :focus-within))::after { transform: scaleY(0); }
.timeline.timeline:has(.tstep:nth-child(2):is(:hover, :focus-within))::after { transform: scaleY(.5); }
.timeline.timeline:has(.tstep:nth-child(3):is(:hover, :focus-within))::after { transform: scaleY(1); }
@media (min-width: 900px) {
  .timeline.timeline:has(.tstep:nth-child(1):is(:hover, :focus-within))::after { transform: scaleX(0); }
  .timeline.timeline:has(.tstep:nth-child(2):is(:hover, :focus-within))::after { transform: scaleX(.5); }
  .timeline.timeline:has(.tstep:nth-child(3):is(:hover, :focus-within))::after { transform: scaleX(1); }
}
/* While hovering, the line moves quickly (the slow timing is only for the first scroll-in) */
.js .timeline.reveal.is-visible:is(:hover, :focus-within)::after {
  transition: transform .45s cubic-bezier(.4, 0, .2, 1);
}

/* ---------- 19. Reassurance lines (No payment taken, privacy, form note) ---------- */
.no-payment {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0 0;
  font-size: 1rem;
  font-weight: 600;
}
.no-payment::before {         /* small tick */
  content: "";
  width: 14px;
  height: 8px;
  margin-top: -3px;
  border-inline-start: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
}
.no-payment--form {
  justify-content: center;
  color: var(--forest);
}

.privacy-note {
  display: flex;
  gap: 10px;
  margin: 0 0 16px;
  font-size: 1rem;
  color: #3D4F4A;
}
.privacy-note svg {           /* small padlock */
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 3px;
  fill: none;
  stroke: var(--forest);
  stroke-width: 2;
  stroke-linecap: round;
}

/* Offer pill sits on its own line under the hero's Pre-Order button */
.offer-badge.offer-badge--below { display: table; margin: 16px 0 0; }

/* ---------- 21. Footer social links ---------- */
.socials {
  display: flex;
  gap: 12px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}
.socials a {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 50%;
  color: var(--white);
  transition: background-color .2s, border-color .2s, color .2s;
}
.socials a:hover { background: var(--lime-glow); border-color: var(--lime-glow); color: var(--forest); }
.socials svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.socials .socials__dot,
.socials .socials__fill { fill: currentColor; stroke: none; }

/* ---------- 22. Preview: cancer dashboard ---------- */
/* Big headline numbers, then a glimpse of the results. Nothing is clickable. */
.dash-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0 14px;
}
.dash-stat {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--white);
  font-size: 1rem;
  line-height: 1.3;
  color: var(--forest);
}
.dash-stat__num {
  font-family: var(--serif);
  font-size: clamp(2.25rem, 6vw, 3rem);
  font-weight: 400;
  line-height: 1;
}
.dash-stat--alert { border-color: #E9B9B1; background: #FCEFEC; color: var(--alert); }
.dash-stat--alert .dash-stat__num { font-weight: 700; }

/* Gauge + pill in each cancer card: ↑ Higher, – Average, ↓ Lower */
.cancer-box__top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  align-self: stretch;
}
.cancer-box__top .cancer-box__icon { flex: none; }
.cancer-box .gauge { align-self: stretch; margin: 6px 0 4px; }
.gauge--up .gauge__dot { background: var(--alert); }
.risk-pill--up { background: #FCEFEC; color: var(--alert); }
.risk-pill--avg { background: #F4E7B8; color: #5E4A0E; }
.risk-pill--down { background: #DCE6DA; color: var(--forest); }

.cancer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.cancer-box {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--white);
  color: var(--navy);
}
.cancer-box--up { border-color: #E9B9B1; border-top: 4px solid var(--alert); }
.cancer-box__icon {
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--soft);
  color: var(--forest);
}
.cancer-box--up .cancer-box__icon { background: #FCEFEC; color: var(--alert); }
.cancer-box__name { font-size: 1.125rem; font-weight: 700; }
.cancer-box__plan {
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
  font-size: 1rem;
  line-height: 1.35;
  font-weight: 600;
  color: var(--forest);
}


@media (min-width: 700px) {
  .cancer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------- 23. Preview: Alzheimer's ---------- */
.alz-result {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--white);
}
.alz-result__icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--lime-glow);
  color: var(--forest);
}
.alz-result__icon svg { width: 34px; height: 34px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.alz-result__label { margin: 0; font-size: 1rem; color: #4B5B57; }
.alz-result__value {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.75rem;
  color: var(--forest);
}
.alz-result__text { margin: 2px 0 0; }
.alz-result__body { flex: 1 1 auto; }
.ppanel__title + .alz-result { margin-top: 14px; }
.alz-result .risk-pill { align-self: flex-start; }
/* Colour the result by level, like the cancer cards */
.alz-result--avg { border-top: 4px solid var(--r2); }
.alz-result--avg .alz-result__icon { background: #F4E7B8; color: #5E4A0E; }

/* How you compare: a bigger gauge with a "You" marker */
.compare {
  margin-bottom: 16px;
  padding: 16px 18px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--white);
}
.compare .tips__title { margin: 0 0 30px; }
.gauge--big { height: 12px; }
.gauge--big .gauge__dot { width: 22px; height: 22px; }
.compare__you {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  translate: -50% 0;
  padding: 1px 8px;
  border-radius: 6px;
  background: var(--forest);
  color: var(--white);
  font-size: 1rem;
  font-weight: 700;
  white-space: nowrap;
}
.compare__labels {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 10px 0 0;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
}
.compare__labels span:nth-child(1) { color: var(--forest); text-align: start; }
.compare__labels span:nth-child(2) { color: #5E4A0E; }
.compare__labels span:nth-child(3) { color: var(--alert); text-align: end; }
@media (max-width: 520px) {
  .alz-result { flex-wrap: wrap; }
  .alz-result__body { flex-basis: calc(100% - 82px); }
}

.tips__title { margin: 4px 0 10px; font-size: 1rem; color: var(--forest); }
/* Alzheimer's: numbered next steps */
.nsteps {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: nstep;
}
.nstep {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--white);
  counter-increment: nstep;
}
.nstep .tips__icon { position: relative; flex: none; }
.nstep .tips__icon::after {          /* step number on the icon */
  content: counter(nstep);
  position: absolute;
  top: -4px;
  inset-inline-end: -4px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--forest);
  color: var(--white);
  font-size: .8125rem;
  font-weight: 700;
}
.nstep__text { align-self: center; font-size: 1rem; line-height: 1.4; font-weight: 700; color: var(--forest); }
@media (min-width: 700px) {
  .nsteps { grid-template-columns: 1fr 1fr; }
}
.tips__icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--soft);
  color: var(--forest);
}
.tips__icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- 24. Preview: medications ---------- */
.meds-top {
  display: flex;
  align-items: center;
  gap: 22px;
  margin: 8px 0 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--white);
}
.meds-donut {
  flex: none;
  display: grid;
  place-items: center;
  width: 104px;
  height: 104px;
  border-radius: 50%;
  background:
    radial-gradient(closest-side, var(--white) 70%, transparent 71%),
    conic-gradient(var(--forest) 0 98%, var(--r2) 98% 100%);
  font-family: var(--serif);
  font-size: 1.5rem;
  color: var(--forest);
}
.meds-big {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2rem, 5vw, 2.75rem);
  line-height: 1;
  color: var(--forest);
}
.meds-big__label { margin: 4px 0 8px; }
.meds-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 0; font-size: 1rem; }
.meds-key { display: inline-block; width: 12px; height: 12px; margin-inline-end: -8px; border-radius: 50%; }
.meds-key--ok { background: var(--forest); }
.meds-key--flag { background: var(--r2); }

.med-cats {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.med-cat {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
}
.med-cat[hidden] { display: none; }
.med-cat__btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 0;
  border-radius: 12px;
  background: none;
  color: var(--navy);
  font: inherit;
  font-weight: 600;
  text-align: start;
  cursor: pointer;
}
.med-cat__detail { margin: 0; padding: 0 14px 14px 52px; font-size: 1rem; }
.med-cat__mark {
  flex: none;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--forest);
  color: var(--white);
  font-size: 1rem;
}
.med-cat__status { margin-inline-start: auto; font-size: 1rem; font-weight: 400; color: #4B5B57; }
.med-cat--flag { border-color: #E6CF7A; background: #FFFBEC; }
.med-cat--flag .med-cat__mark { background: var(--r2); color: #3C2F06; }
.med-cat--flag .med-cat__status { color: #5E4A0E; font-weight: 600; }

@media (min-width: 700px) {
  .med-cats { grid-template-columns: 1fr 1fr; }
}

/* Phones: stack the medicines summary and let each row wrap */
@media (max-width: 699px) {
  .meds-top { flex-direction: column; align-items: flex-start; text-align: start; }
  .med-cat { flex-wrap: wrap; }
  .med-cat__status { flex-basis: 100%; margin-inline-start: 38px; }
  .ppanel { padding-inline: 16px; }
}
.meds-legend i + i, .meds-legend .meds-key--flag { margin-inline-start: 10px; }

/* ---------- 25. Illustrated icons (sprite symbols, one colour = currentColor) ---------- */
svg.illus { fill: none; stroke: none; }

/* "What we test": icons stand on their own, no circle */
.area__icon { width: 64px; height: 64px; background: none !important; }
.area__icon svg.illus { width: 62px; height: 62px; }
.group--risk .area__icon { color: var(--lime-glow); }
.group--health .area__icon { color: var(--forest); }

/* Preview tabs */
.ptab__icon { width: 36px; height: 36px; }
.ptab__icon svg.illus { width: 28px; height: 28px; }
.ptab.is-active .ptab__icon { color: var(--forest); }

/* Cancer boxes and detail views */
.cancer-box__icon { width: 52px; height: 52px; }
.cancer-box__icon svg.illus { width: 40px; height: 40px; }
.alz-result__icon svg.illus { width: 46px; height: 46px; }


/* ---------- 27. Preview: medicine search and pharmacist card ---------- */
.med-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}
.med-search {
  flex: 1 1 260px;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid #8A968F;
  border-radius: var(--radius-pill);
  background: var(--white);
}
.med-search:focus-within { outline: 3px solid var(--mint); outline-offset: 1px; }
.med-search svg { flex: none; width: 20px; height: 20px; fill: none; stroke: var(--forest); stroke-width: 2; stroke-linecap: round; }
.med-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  color: var(--navy);
  font: inherit;
  outline: none;
}
.med-empty { margin: 8px 0 0; font-size: 1rem; color: #4B5B57; }

.ppanel { position: relative; }
.pharm-card {
  position: absolute;
  inset-inline: 16px;
  top: 90px;
  z-index: 3;
  max-width: 420px;
  margin-inline: auto;
  padding: 20px;
  border-radius: 20px;
  background: var(--white);
  box-shadow: 0 24px 60px rgba(29, 29, 29, .25);
}
.pharm-card[hidden] { display: none; }
.pharm-card__top { display: flex; align-items: center; justify-content: space-between; }
.pharm-close {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--white);
  color: var(--navy);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}
.pharm-card__title {
  margin: 12px 0;
  font-family: var(--serif);
  font-size: 1.5rem;
  color: var(--forest);
}
.pharm-card__body { display: flex; gap: 16px; align-items: center; }
.pharm-qr { flex: none; width: 96px; height: 96px; fill: var(--navy); shape-rendering: crispEdges; }
.pharm-card__label { margin: 0 0 6px; font-size: 1rem; color: #4B5B57; }
.pharm-card__flag {
  margin: 0 0 6px;
  padding: 6px 10px;
  border-radius: 10px;
  background: #FFFBEC;
  border: 1px solid #E6CF7A;
  font-weight: 700;
  color: #5E4A0E;
}
.pharm-card__flag span {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  margin-inline-end: 6px;
  border-radius: 50%;
  background: var(--r2);
  color: #3C2F06;
}
.pharm-card__ok { margin: 0; font-size: 1rem; }
.pharm-card__note { margin: 14px 0 0; font-size: 1rem; color: #4B5B57; }

/* ---------- 28. Preview: ancestry world map ---------- */
.map-wrap {
  position: relative;
  margin: 4px 0 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--white);
}
.world-map { display: block; width: 100%; height: auto; }
.world-map path {
  fill: #DCE4D6;
  stroke: var(--white);
  stroke-width: .6;
  transition: fill .2s, opacity .2s;
}
.world-map .wm-arabia { fill: var(--forest); }
.world-map .wm-levant { fill: #5FAF98; }
.world-map .wm-nafrica { fill: #C9B24A; }
.world-map path[data-region] { cursor: pointer; }
/* When one region is focused, the other highlighted regions fade */
.world-map[data-focus] path[data-region] { opacity: .3; }
.world-map[data-focus="arabia"] path.wm-arabia[data-region],
.world-map[data-focus="levant"] path.wm-levant[data-region],
.world-map[data-focus="nafrica"] path.wm-nafrica[data-region] { opacity: 1; stroke: var(--navy); stroke-width: 1.4; }

.map-tip {
  position: absolute;
  margin: 0;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--navy);
  color: var(--white);
  font-size: 1rem;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  translate: -50% calc(-100% - 4px);
  transition: opacity .15s;
}
.map-tip.is-visible { opacity: 1; }

.ancestry-list { grid-template-columns: 1fr 1fr; max-width: none; }
.ancestry-list li { padding: 0; border: 0; background: none; }
.anc-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  color: var(--navy);
  font: inherit;
  text-align: start;
  cursor: pointer;
}
.anc-item--static { cursor: default; }
.anc-item b { margin-inline-start: auto; }
.anc-item:hover,
.anc-item.is-active { border-color: var(--forest); box-shadow: 0 0 0 1px var(--forest); }
.m-key { width: 14px; height: 14px; border-radius: 50%; background: #DCE4D6; flex: none; }
.m-key--arabia { background: var(--forest); }
.m-key--levant { background: #5FAF98; }
.m-key--nafrica { background: #C9B24A; }

@media (max-width: 699px) {
  .ancestry-list { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .world-map path, .map-tip { transition: none; }
}


/* ---------- 29. Preview: "plan is ready" strip at the end of each tab ---------- */
.plan-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  margin: 0 16px 26px;
  padding: 16px 18px;
  border-radius: 16px;
  background: var(--forest);
  color: var(--white);
}
.plan-strip__tick {
  flex: none;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--lime-glow);
  color: var(--forest);
  font-weight: 700;
}
.plan-strip__text { flex: 1 1 220px; margin: 0; font-size: 1rem; line-height: 1.4; }
.plan-strip__text b { display: block; font-size: 1.125rem; }
/* Ancestry is not a health result: that tab shows "Your ancestry report is ready" instead */
.plan-strip__anc { display: none !important; }
.portal:has(#ppanel-anc.is-active) .plan-strip__anc { display: block !important; }
.portal:has(#ppanel-anc.is-active) .plan-strip__health { display: none !important; }
@media (min-width: 700px) {
  .plan-strip { margin: 0 36px 32px; }
}
.plan-strip__text span { color: #DCE6DA; }
.plan-strip__btn {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  background: var(--lime-glow);
  color: var(--forest);
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  transition: background .2s, translate .2s;
}
.plan-strip__btn:hover { background: var(--white); translate: 2px 0; }
.plan-strip__btn:focus-visible { outline: 3px solid var(--mint); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  .plan-strip__btn { transition: none; }
  .plan-strip__btn:hover { translate: none; }
}

/* ---------- 30. Preview: small portal note (mental health) ---------- */
.ppanel__tip {
  margin: 14px 0 0;
  padding: 12px 16px;
  border: 1px dashed var(--sage-mid);
  border-radius: 12px;
  background: var(--white);
  font-size: 1rem;
  color: var(--forest);
}

/* ---------- 31. Privacy policy page (privacy.html) ---------- */
.legal > * { max-width: 760px; }   /* reading column, aligned with the logo */
.legal-hero { padding-top: 140px; padding-bottom: 56px; }
.legal-hero .section-title { margin-bottom: 8px; }
.legal__updated { margin: 0; color: rgba(255, 255, 255, .85); }
.legal-body { padding-top: 56px; }
.legal__intro { font-size: 1.1875rem; }
.legal h2 {
  margin: 40px 0 10px;
  font-family: var(--serif);
  font-size: 1.625rem;
  font-weight: 400;
  line-height: 1.2;
  color: var(--forest);
}
.legal ul { margin: 0 0 16px; padding-inline-start: 22px; }
.legal li + li { margin-top: 4px; }
.legal a { color: var(--forest); text-underline-offset: 3px; }
/* Copyright on the left, privacy policy link on the right */
.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
}
.site-footer__bottom p { margin: 0; }
.site-footer__bottom a { text-underline-offset: 3px; }

/* ---------- 32. Preview: quieter styling (20 Oct 2026) ----------
   Medium instead of bold text, a flatter portal shadow, result cards with
   one hairline border (no coloured top stripe or tinted icon circle), and
   the "plan is ready" strip as a plain row with a text link. */
.preview :is(.ptab, .ptabs__group, .portal__title, .example-badge, .tips__title,
  .risk-row__name, .trait__name, .cancer-box__name, .cancer-box__plan, .risk-pill,
  .nstep__text, .med-cat__btn, .med-cat__status, .plan-strip__text b, .plan-strip__btn,
  .dash-stat__num, .compare__you, .compare__labels, .alz-result__value,
  .pharm-card__flag, .anc-item b, .ppanel__warn) { font-weight: 500; }

.preview .portal { box-shadow: 0 1px 2px rgba(29, 29, 29, .04), 0 16px 40px -24px rgba(32, 82, 76, .22); }

/* Flatter result cards */
.preview .cancer-box,
.preview .cancer-box--up,
.preview .alz-result,
.preview .alz-result--avg { border: 1px solid var(--line); }
.preview .cancer-box__icon,
.preview .alz-result__icon { background: none; }
.preview .cancer-box--up .cancer-box__icon { color: var(--alert); }
.preview .cancer-box__icon { width: 44px; height: 44px; justify-content: start; }

/* Plain "plan is ready" row */
.preview .plan-strip {
  margin: 0 22px 26px;
  padding: 18px 0 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: none;
  color: var(--forest);
}
.preview .plan-strip__text b { font-size: 1.0625rem; }
.preview .plan-strip__btn {
  min-height: 44px;
  padding: 0;
  border-radius: 0;
  background: none;
  color: var(--forest);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
.preview .plan-strip__btn:hover { background: none; color: var(--sage-dark); }
@media (min-width: 700px) {
  .preview .plan-strip { margin: 0 36px 32px; }
}

/* ---------- 33. Pre-order: more reasons to sign up, fits one screen ---------- */
.preorder__lead { max-width: 30em; margin: 0 0 20px; font-size: 1.125rem; }

.included__title { margin: 28px 0 10px; font-size: 1rem; font-weight: 500; color: var(--lime); }
.included { margin: 0; padding: 0; list-style: none; }
.included li {
  position: relative;
  padding: 7px 0 7px 30px;
  border-top: 1px solid rgba(255, 255, 255, .14);
}
.included li:last-child { border-bottom: 1px solid rgba(255, 255, 255, .14); }
.included li::before {      /* small tick */
  content: "";
  position: absolute;
  inset-inline-start: 2px;
  top: 14px;
  width: 12px;
  height: 7px;
  border-inline-start: 2px solid var(--lime);
  border-bottom: 2px solid var(--lime);
  transform: rotate(-45deg);
}
[dir="rtl"] .included li { padding: 7px 30px 7px 0; }

/* Two fields per row where there is room */
.field-row { display: grid; gap: 0 16px; }
@media (min-width: 560px) {
  .field-row { grid-template-columns: 1fr 1fr; }
}

/* Desktop: tighter spacing so the whole section fits in one screen */
@media (min-width: 900px) {
  .preorder { padding-block: 64px; }
  .preorder__grid { align-items: center; }
  .preorder .form-card { padding: 28px 32px 22px; }
  .preorder .field { margin-bottom: 14px; }
  .preorder .field label { margin-bottom: 4px; }
  .preorder .field input[type="text"],
  .preorder .field input[type="email"],
  .preorder .field input[type="tel"],
  .preorder .field select { min-height: 46px; padding-block: 8px; }
  .preorder .modules__group { margin: 6px 0 4px; }
  .preorder .modules .modules__options label { min-height: 34px; padding-block: 2px; }
  .preorder .privacy-note { margin-bottom: 12px; }
  .preorder .no-payment--form { margin-top: 8px; }
}
@media (min-width: 900px) and (max-height: 800px) {
  .preorder { padding-block: 32px; }
}

/* ---------- 34. Founding offer: live "places left" counter ---------- */
.offer-count::before { content: " · "; }
.offer-bar {
  height: 6px;
  margin: 12px 0 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, .18);
  overflow: hidden;
}
.offer-bar span {
  display: block;
  height: 100%;
  width: calc(var(--taken, 0) * 100%);
  min-width: 6px;
  border-radius: 6px;
  background: var(--lime);
  transition: width .8s ease;
}
.offer-box .offer-box__count { margin: 0; font-size: 1rem; color: rgba(255, 255, 255, .9); }

/* ---------- 35. Hero: second link and trust line ---------- */
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 28px;
}
.hero__secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}
.hero__secondary:hover { color: var(--lime-glow); }

.hero__trust {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  font-size: 1rem;
  color: rgba(255, 255, 255, .9);
}
.hero__trust li { position: relative; padding-inline-start: 22px; }
.hero__trust li::before {      /* small tick */
  content: "";
  position: absolute;
  inset-inline-start: 2px;
  top: 7px;
  width: 11px;
  height: 6px;
  border-inline-start: 2px solid var(--lime-glow);
  border-bottom: 2px solid var(--lime-glow);
  transform: rotate(-45deg);
}

/* ---------- 36. Sticky header after the hero ---------- */
html { scroll-padding-top: 76px; }
.site-header__cta { display: none; }
.site-header.is-stuck {
  position: fixed;
  background: rgba(32, 82, 76, .94);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 6px 24px rgba(29, 29, 29, .18);
}
.site-header.is-stuck .site-header__inner { padding-block: 10px; }
.site-header.is-stuck .site-header__cta {
  display: inline-flex;
  margin-inline-start: auto;
  min-height: 40px;
  padding: 6px 18px;
  background: var(--white);
  color: var(--navy);
}
/* Phones: icon-only menu button in the slim bar, so everything fits on one line */
.site-header.is-stuck .nav-toggle { min-height: 40px; padding: 8px 12px; }
.site-header.is-stuck .nav-toggle__label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
@media (min-width: 960px) {
  .site-header.is-stuck .site-header__inner { padding-block: 12px; }
  .site-header.is-stuck .site-header__cta { display: none; }
  .site-header.is-stuck .site-header__logo img { width: 128px; }
}
@media (prefers-reduced-motion: no-preference) {
  .site-header.is-stuck { animation: header-in .35s ease both; }
  @keyframes header-in { from { transform: translateY(-100%); } }
}

/* ---------- 37. Hero: founding offer above the headline ---------- */
.hero__offer {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  max-width: 100%;
  margin-bottom: 28px;
  padding: 5px 16px 5px 5px;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, .1);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  font-size: 1rem;
  text-decoration: none;
  transition: background-color .2s, border-color .2s;
}
.hero__offer:hover { background: rgba(255, 255, 255, .18); border-color: rgba(255, 255, 255, .5); }
.hero__offer-tag {
  flex: none;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background: var(--lime-glow);
  color: var(--forest);
  font-weight: 600;
}
[dir="rtl"] .hero__offer-arrow { display: inline-block; transform: scaleX(-1); }

/* Phones: the tag is dropped so the offer stays on one line */
@media (max-width: 479px) {
  .hero__offer { padding-inline-start: 16px; }
  .hero__offer-tag { display: none; }
}

/* ---------- 38. Text links with an arrow: underline the words only ----------
   These links are flex boxes, so an underline on the link itself was drawn under
   the text and the arrow separately (with a gap). Only .link-text is underlined. */
.hero__secondary,
.preview .plan-strip__btn { text-decoration: none; }
.hero__secondary .link-text,
.preview .plan-strip__btn .link-text {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}

/* ---------- 40. Display text in Neue Montreal (serif dropped) ----------
   These were set in a serif at weight 400; in Neue Montreal they need a little
   more weight and tighter spacing to keep their presence. */
:is(.problem__title, .problem__stat, .group__name, .ppanel__title, .dash-stat__num,
  .alz-result__value, .meds-donut, .meds-big, .pharm-card__title, .legal h2) {
  font-weight: 500;
  letter-spacing: -.02em;
}

/* ---------- 41. What we test: areas link to their example ---------- */
.find-out .section-lead { margin-bottom: 0; }
.area { display: block; padding: 0; }
.area__link {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  color: inherit;
  text-decoration: none;
}
.area__link:focus-visible { outline-offset: 2px; border-radius: 8px; }
.area__go {
  margin-inline-start: auto;
  font-size: 1.25rem;
  opacity: .45;
  transition: opacity .2s, translate .2s;
}
.area__link:hover .area__go,
.area__link:focus-visible .area__go { opacity: 1; }
.area__link:hover .area__name { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
[dir="rtl"] .area__go { transform: scaleX(-1); }

/* ---------- 42. Sleeker arrow buttons ---------- */
.btn--arrow {
  gap: 22px;
  min-height: 58px;
  padding: 6px 6px 6px 30px;
  font-size: 1.125rem;
  font-weight: 500;
  letter-spacing: -.01em;
}
[dir="rtl"] .btn--arrow { padding: 6px 30px 6px 6px; }
.btn--light { --btn-circle-bg: var(--forest); --btn-circle-fg: var(--white); }
.preorder-form__submit { --btn-circle-bg: var(--white); --btn-circle-fg: var(--forest); }

/* ---------- 43. Accessibility fixes (WCAG 2.2 AA, 20 Oct 2026) ----------
   Measured against the real rendered backgrounds, not just the CSS colours. */

/* Focus ring: mint was only about 2:1 on white. Dark green on light
   backgrounds, lime on dark ones, so it is at least 3:1 everywhere. */
:focus-visible,
.plan-strip__btn:focus-visible { outline: 3px solid var(--forest); outline-offset: 3px; }
.field input:focus,
.field select:focus,
.med-search:focus-within { outline-color: var(--forest); }
:is(.hero, .problem, .section--sage, .site-footer, .site-header, .group--risk) :focus-visible { outline-color: var(--lime-glow); }
.section--sage .form-card :focus-visible { outline-color: var(--forest); }
@media (max-width: 959px) {
  .site-header .site-nav :focus-visible { outline-color: var(--forest); }   /* white menu panel */
}

/* Hero: a little more shade behind the text column (lead text was 4.4:1) */
@media (min-width: 900px) {
  .hero::before {
    background: linear-gradient(to right,
      rgba(32, 82, 76, .6) 0%,
      rgba(32, 82, 76, .42) 50%,
      rgba(32, 82, 76, 0) 68%);
  }
  [dir="rtl"] .hero::before {
    background: linear-gradient(to left,
      rgba(32, 82, 76, .6) 0%,
      rgba(32, 82, 76, .42) 50%,
      rgba(32, 82, 76, 0) 68%);
  }
}
/* Phones: the text column runs through the lightest band of the gradient,
   so the shade starts near the top */
@media (max-width: 899px) {
  .hero::before {
    background: linear-gradient(to bottom,
      rgba(32, 82, 76, .3) 0%,
      rgba(32, 82, 76, .62) 25%,
      rgba(32, 82, 76, .55) 60%,
      rgba(32, 82, 76, .7) 100%);
  }
  .hero__offer { background: rgba(18, 40, 35, .45); }
}

/* Offer bar and offer box: a dark tint instead of a light one, so white text keeps 4.5:1 */
.hero__offer { background: rgba(18, 40, 35, .3); }
.hero__offer:hover { background: rgba(18, 40, 35, .45); }
.offer-box { background: rgba(18, 40, 35, .2); }
.offer-box .offer-box__count { color: var(--white); }
.included__title { color: #EEF3CB; }   /* paler lime: brand lime is 4.3:1 here */

/* ---------- 44. Pre-order form: reassurance line under the button ---------- */
.form-assure {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 20px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  font-size: 1rem;
  color: var(--forest);
}
.form-assure li { position: relative; padding-inline-start: 20px; }
.form-assure li::before {      /* small tick */
  content: "";
  position: absolute;
  inset-inline-start: 2px;
  top: 7px;
  width: 11px;
  height: 6px;
  border-inline-start: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
}
@media (min-width: 900px) {
  .preorder .form-assure { margin-top: 10px; }
}

/* ---------- 45. Reduced motion: still background (class set by js/main.js) ---------- */
.motion-paused .deco-circles circle,
.motion-paused .loved__figure { animation-play-state: paused !important; }

/* ---------- 46. Arrow swap on hover ----------
   Every arrow has a twin hidden to its left. On hover the visible arrow slides
   out to the right and the twin slides in, clipped to the arrow's own box. */
.arrow-swap {
  display: inline-grid;
  overflow: hidden;
  vertical-align: bottom;
  line-height: inherit;
}
.arrow-swap > * { grid-area: 1 / 1; }
.arrow-swap > :last-child { transform: translateX(-130%); }
:is(a, button):is(:hover, :focus-visible) .arrow-swap > :first-child { transform: translateX(130%); }
:is(a, button):is(:hover, :focus-visible) .arrow-swap > :last-child { transform: none; }
@media (prefers-reduced-motion: no-preference) {
  .arrow-swap > * { transition: transform .45s cubic-bezier(.65, 0, .35, 1); }
}
[dir="rtl"] .arrow-swap { transform: scaleX(-1); }
.hero__secondary:hover,
.plan-strip__btn:hover,
.preview .plan-strip__btn:hover { translate: none; }

/* ---------- 47. Header Pre-Order: same pill and circle as the other buttons ---------- */
.btn--nav-arrow {
  gap: 12px;
  padding: 4px 4px 4px 20px;
  font-weight: 500;
}
[dir="rtl"] .btn--nav-arrow { padding: 4px 20px 4px 4px; }
.btn--nav-arrow .btn__circle {
  width: 34px;
  height: 34px;
  --btn-circle-bg: var(--white);       /* phones: green button in the menu */
  --btn-circle-fg: var(--forest);
}
.btn--nav-arrow .btn__circle svg { width: 16px; height: 16px; }
.site-nav__actions .btn--nav-arrow { justify-content: space-between; }
@media (min-width: 960px) {
  .btn--nav-arrow .btn__circle { --btn-circle-bg: var(--forest); --btn-circle-fg: var(--white); }   /* white button */
}

/* ---------- 48. Phones: DNA helix in its own band below the hero text ---------- */
@media (max-width: 899px) {
  .hero { padding-bottom: 160px; }
  .hero__dna { z-index: -1; }          /* above the text shade, so the band stays bright */
  .hero::after { height: 70px; }       /* shorter fade so it does not cover the helix */
}

/* ---------- 50. Phone sticky-bar Pre-Order: same look as the header button, no arrow ---------- */
.site-header.is-stuck .site-header__cta {
  min-height: 40px;
  padding: 6px 20px;
  font-size: 1rem;
  font-weight: 500;
}
.site-header.is-stuck .site-header__cta:hover { background: var(--lime-glow); }

/* ---------- 49. Preview tabs on phones and tablets: all eight visible ----------
   A grid instead of a sideways-scrolling row, with the two group names shown. */
@media (max-width: 999px) {
  .ptabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    overflow: visible;
    padding-bottom: 0;
  }
  .ptabs__group {
    display: block;
    grid-column: 1 / -1;
    margin: 6px 0 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--forest);
  }
  .ptabs__group:first-child { margin-top: 0; }
  .ptab {
    width: 100%;
    min-height: 48px;
    padding: 4px 12px 4px 4px;
    line-height: 1.2;
    text-align: start;
  }
  .ptab__icon { flex: none; width: 34px; height: 34px; }
  .ptab__icon svg.illus { width: 24px; height: 24px; }
}
@media (min-width: 600px) and (max-width: 999px) {
  .ptabs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ---------- 51. Phone menu: opens with an animation ----------
   The panel stays in the page (hidden), floats under the bar instead of pushing
   it taller, and fades and slides down from the menu button. The three bars
   turn into a cross while it is open. */
@media (max-width: 959px) {
  .site-header__inner { position: relative; }
  .site-nav {
    display: block;
    position: absolute;
    top: calc(100% + 6px);
    inset-inline: var(--gutter);
    border-radius: 24px;
    /* Floats over the page: no bar colour behind it, a soft deep shadow instead */
    box-shadow: 0 2px 6px rgba(29, 29, 29, .08), 0 28px 60px -16px rgba(29, 29, 29, .45);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-10px) scale(.97);
    transform-origin: top right;
    pointer-events: none;
  }
  [dir="rtl"] .site-nav { transform-origin: top left; }
  .site-nav.is-open {
    visibility: visible;
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }
  .site-nav__links li,
  .site-nav__actions { opacity: 0; transform: translateY(-6px); }
  .site-nav.is-open .site-nav__links li,
  .site-nav.is-open .site-nav__actions { opacity: 1; transform: none; }

  /* Bars to cross */
  .nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { top: 0; transform: rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { top: 0; transform: rotate(-45deg); }
}
@media (max-width: 959px) and (prefers-reduced-motion: no-preference) {
  .site-nav {
    transition: opacity .25s ease, transform .35s cubic-bezier(.2, .7, .2, 1), visibility 0s linear .35s;
  }
  .site-nav.is-open {
    transition: opacity .25s ease, transform .35s cubic-bezier(.2, .7, .2, 1), visibility 0s;
  }
  .site-nav__links li,
  .site-nav__actions { transition: opacity .3s ease, transform .35s cubic-bezier(.2, .7, .2, 1); }
  .site-nav.is-open .site-nav__links li:nth-child(1) { transition-delay: .06s; }
  .site-nav.is-open .site-nav__links li:nth-child(2) { transition-delay: .1s; }
  .site-nav.is-open .site-nav__links li:nth-child(3) { transition-delay: .14s; }
  .site-nav.is-open .site-nav__actions { transition-delay: .18s; }
  .nav-toggle__bars { transition: background-color .2s; }
  .nav-toggle__bars::before,
  .nav-toggle__bars::after { transition: top .2s ease, transform .25s ease .05s; }
}

/* ---------- 52. WebP images where the browser supports them ----------
   The .jpg / .png stay as the fallback. Inside @supports so a browser without
   image-set() type() keeps the original files instead of losing the background. */
@supports (background-image: image-set(url("x.webp") type("image/webp"))) {
  :root {
    --grain: image-set(url("../assets/images/grain.webp") type("image/webp"), url("../assets/images/grain.png") type("image/png"));
  }
  .site-footer {
    background:
      linear-gradient(rgba(14, 26, 30, .78), rgba(14, 26, 30, .9)),
      image-set(url("../assets/images/texture-dark-water.webp") type("image/webp"), url("../assets/images/texture-dark-water.jpg") type("image/jpeg")) center / cover;
  }
}

/* ---------- 53. Hover underline that grows from the left (same as the header links) ----------
   Footer links and the "What we test" rows. Links inside running text (the source
   line, the privacy page) keep a normal underline so they stand out from the text. */
.site-footer__nav a,
.site-footer__bottom a,
.area__name { position: relative; text-decoration: none; }
.site-footer__nav a:hover,
.site-footer__bottom a:hover,
.area__link:hover .area__name { text-decoration: none; }
.site-footer__nav a::after,
.site-footer__bottom a::after,
.area__name::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: -2px;
  height: 1.5px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
}
[dir="rtl"] :is(.site-footer__nav a, .site-footer__bottom a, .area__name)::after { transform-origin: right; }
.site-footer__nav a:is(:hover, :focus-visible)::after,
.site-footer__bottom a:is(:hover, :focus-visible)::after,
.area__link:is(:hover, :focus-visible) .area__name::after { transform: scaleX(1); }
@media (prefers-reduced-motion: no-preference) {
  :is(.site-footer__nav a, .site-footer__bottom a, .area__name)::after { transition: transform .25s; }
}

/* ---------- 54. Smooth scrolling (Lenis) ----------
   Lenis's own required CSS, plus: native smooth scrolling off while Lenis runs
   (the two would fight). */
html.lenis,
html.lenis body { height: auto; }
html.lenis { scroll-behavior: auto; }
.lenis:not(.lenis-autoToggle).lenis-stopped { overflow: clip; }
.lenis [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-smooth iframe { pointer-events: none; }

/* ---------- 55. More room under section headings ---------- */
.section-title { margin-bottom: 36px; }
@media (min-width: 900px) {
  .section-title { margin-bottom: 56px; }
}
/* A short lead line follows these, so the heading stays close to it */
.find-out .section-title,
.preorder .section-title { margin-bottom: 16px; }
.find-out .groups { margin-top: 48px; }
/* The heading's margin now sets the gap */
.preview__layout { margin-top: 0; }
.timeline { margin-top: 52px; }   /* extra, as the circles' white rings sit above them */
@media (min-width: 900px) {
  .timeline { margin-top: 80px; }
}

/* ---------- 56. The Geneprint mark as a faint, turning watermark ----------
   On the plain light sections (What we test, How it works). Large,
   cropped by the section edge, 5-7% opacity. It turns as the section scrolls
   past (scroll-driven), slowly by itself in browsers without that, and stays
   still for visitors who ask for reduced motion. */
.mark-deco {
  position: absolute;
  z-index: -1;
  width: var(--mark-size, 420px);
  aspect-ratio: 1;
  background: var(--forest);
  -webkit-mask: url("../assets/logo/geneprint-mark-mint.svg") no-repeat center / contain;
  mask: url("../assets/logo/geneprint-mark-mint.svg") no-repeat center / contain;
  opacity: var(--mark-opacity, .06);
  pointer-events: none;
}
/* Beside the "What we test" heading, in the empty space on the right */
.mark-deco--find { --mark-size: 340px; top: -90px; inset-inline-end: -70px; }
/* Bottom left of How it works */
.mark-deco--how { --mark-size: 420px; bottom: -240px; inset-inline-start: -230px; }

@media (max-width: 699px) {
  .mark-deco--find { --mark-size: 220px; top: -60px; inset-inline-end: -80px; }
  .mark-deco--how { --mark-size: 280px; bottom: -130px; inset-inline-start: -120px; }
}

@keyframes mark-turn {
  from { rotate: -40deg; }
  to { rotate: 80deg; }
}
@keyframes mark-spin {
  to { rotate: 360deg; }
}
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .mark-deco {
      animation: mark-turn linear both;
      animation-timeline: view();
      animation-range: cover 0% cover 100%;
    }
    .mark-deco--how { animation-direction: reverse; }
  }
  @supports not (animation-timeline: view()) {
    .mark-deco { animation: mark-spin 120s linear infinite; }
    .mark-deco--how { animation-direction: reverse; }
  }
}

/* ---------- 57. 404 page ---------- */
.not-found { min-height: 100svh; display: flex; align-items: center; padding-top: 80px; }
.not-found__logo { display: inline-block; margin-bottom: 48px; }
.not-found .section-title { margin-bottom: 12px; }
.not-found__actions { margin: 32px 0 0; }
