/* ============================================================================
   testing/microbiome · mb.css · loaded AFTER testing/genetic/dna.css

   The page wears the genetic page's design as it is: same sheet, same script,
   same sections. This file only covers what the microbiome content asks of it
   that the genetic content never did, scoped to `.mb` on <body>:
     · a row of four standards under the hero,
     · three kits in the bento instead of four, with longer sentences,
     · a label and four figures on the off grid window,
     · the balance pair in the comparison table's place.
   COPY RULE, page wide: no dashes, no connecting hyphens, no all caps.
   ========================================================================== */

/* ---------------------------------------------------------------------------
   1b · STANDARDS · four promises, a check disc each, on the paper
   ------------------------------------------------------------------------ */
.mb .mb-trust { background: var(--d-paper); padding-block: clamp(36px, 4vw, 56px) 0; }
.mb .mb-trust-list {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 clamp(16px, 2vw, 32px);
  margin-block: 0; list-style: none;
}
.mb .mb-trust-list li {
  display: flex; align-items: center; gap: 12px; padding: 18px 0;
  border-bottom: 1px solid var(--d-line);
  font-size: 17px; line-height: 1.35; font-weight: 500; color: var(--ink-900);
}
.mb .mb-trust-list li::before {
  content: ''; flex: none; width: 26px; height: 26px; border-radius: 50%;
  background: var(--phenome-blue-100) no-repeat center / 13px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3.2 3.2L13 5' fill='none' stroke='%23203a85' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
@media (max-width: 1023px) { .mb .mb-trust-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .mb .mb-trust-list { grid-template-columns: minmax(0, 1fr); } }
/* the definition follows straight on, so it opens a shorter break */
.mb .mb-trust + .dna-gene { padding-top: clamp(70px, 8vw, 120px); }

/* ---------------------------------------------------------------------------
   3 · THREE KITS · the heading takes the section's lede under it; the three
   cards fill the row, and in the stacked grid the third runs full width
   ------------------------------------------------------------------------ */
.mb .dna-four .dna-lede { max-width: 56ch; }
@media (max-width: 1024px), (hover: none) {
  .mb .mb-bento > :nth-child(3):last-child { grid-column: 1 / -1; }
}
@media (max-width: 820px) {
  .mb .mb-bento > :nth-child(3):last-child { grid-column: auto; }
}
/* these sentences run to three times the genetic ones, so the open card
   gives them a wider measure and the copy block a taller fixed height */
@media (min-width: 1025px) and (hover: hover) {
  .mb .mb-bento .dna-bento-copy { height: 262px; }
  .mb .mb-bento .dna-bento-copy p { width: min(52ch, 36vw); max-width: none; }
}

/* ---------------------------------------------------------------------------
   4 · FOUR READINGS · four items travel a shorter list, so the head sits
   closer and the list keeps a little air at the foot
   ------------------------------------------------------------------------ */
.mb .dna-read-head { padding-bottom: clamp(10px, 2vw, 30px); }

/* ---------------------------------------------------------------------------
   5 · THE WINDOW · label, two tone heading, lede and four figures
   ------------------------------------------------------------------------ */
.mb .dna-band { height: auto; min-height: max(100vh, 760px); display: flex; }
.mb .dna-band-text { position: relative; inset: auto; flex: 1; padding-block: clamp(80px, 9vw, 130px); }
.mb .dna-band-text .dna-label { margin-bottom: 18px; }
.mb .mb-band-h { font-size: clamp(36px, 4.6vw, 70px); max-width: 20ch; }
.mb .mb-band-figs { justify-content: center; margin-top: clamp(40px, 4.4vw, 64px); }
/* dna.css hides every .dna-figs until the HERO is reached; these ride the
   window's own --tint-copy instead, so they arrive with the lede */
.dna-js .mb .dna-band .mb-band-figs,
.mb .dna-band .mb-band-figs {
  opacity: var(--tint-copy, 1); transform: translateY(calc((1 - var(--tint-copy, 1)) * 20px));
  transition: none;
}
.mb .mb-band-figs li { flex: 0 1 auto; padding: 0 clamp(18px, 2.6vw, 44px); text-align: left; }
@media (max-width: 720px) {
  .mb .mb-band-figs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 0; width: 100%; }
  .mb .mb-band-figs li { padding: 0 16px; }
  .mb .mb-band-figs li:nth-child(odd) { padding-left: 0; border-left: 0; }
  .mb .mb-band-figs b { font-size: clamp(26px, 7vw, 32px); }
}

/* ---------------------------------------------------------------------------
   6 · BALANCE · two states side by side on the tint. The balanced one is
   raised on the paper panel genetic's table lifts its own column with.
   ------------------------------------------------------------------------ */
.mb .mb-bal { text-align: center; padding-bottom: clamp(70px, 8vw, 120px); }
.mb .mb-bal .ph-display { align-items: center; }
.mb .mb-bal-pair {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(14px, 1.6vw, 24px);
  max-width: 1080px; margin: clamp(44px, 5vw, 76px) auto 0; text-align: left;
}
.mb .mb-bal-side {
  padding: clamp(28px, 3vw, 48px); border-radius: clamp(14px, 1.4vw, 20px);
  box-shadow: inset 0 0 0 1px var(--d-line);
}
.mb .mb-bal-side.is-good {
  background: var(--d-paper);
  box-shadow: 0 40px 70px -46px rgba(10, 18, 51, .4), inset 0 0 0 1px rgba(32, 58, 133, .14);
}
.mb .mb-bal-k {
  margin: clamp(22px, 2.4vw, 34px) 0 0; font-size: 17px; line-height: 1.3; font-weight: 500; color: var(--ink-400);
}
.mb .mb-bal-side.is-good .mb-bal-k { color: var(--d-accent); font-weight: 600; }
.mb .mb-bal-d {
  margin: 10px 0 0; max-width: 26ch;
  font-size: clamp(22px, 2vw, 30px); line-height: 1.3; font-weight: 600; letter-spacing: -0.015em;
  color: var(--ink-900);
}
.mb .mb-bal-side:not(.is-good) .mb-bal-d { color: var(--ph-tone-body); font-weight: 500; }
.mb .mb-bal-side:not(.is-good) .dna-ic { background: transparent; box-shadow: inset 0 0 0 1px var(--d-line); }
.mb .mb-bal-side:not(.is-good) .dna-ic svg { stroke: var(--ink-400); }
@media (max-width: 720px) { .mb .mb-bal-pair { grid-template-columns: minmax(0, 1fr); } }

/* ---------------------------------------------------------------------------
   7 · THE CLOSE · it follows the tint here, not the paper of a shop row
   ------------------------------------------------------------------------ */
.mb .dna-close { background: var(--d-tint); }

/* ---------------------------------------------------------------------------
   What the microbes do, the points under Balanced and Disrupted, and the four
   figures.
   ------------------------------------------------------------------------ */
.mb .mb-do { padding-top: 0; }
.mb .mb-do-h {
  margin: 0; font-size: clamp(22px, 2vw, 28px); line-height: 1.25; font-weight: 600;
  letter-spacing: -0.012em; color: var(--ink-900);
}
/* the heading sits on the list's own left line, and the list runs four across */
.mb .mb-do .pd-wrap { width: min(1080px, calc(100% - 48px)); }
.mb .mb-do .lab.pd-feat.is-light { padding-top: clamp(28px, 3vw, 44px); }
.mb .mb-do .lab.pd-feat .lab-featlist { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px 36px; }
@media (max-width: 1023px) { .mb .mb-do .lab.pd-feat .lab-featlist { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) {
  .mb .mb-do .pd-wrap { width: calc(100% - 32px); }
  .mb .mb-do .lab.pd-feat .lab-featlist { grid-template-columns: minmax(0, 1fr); }
}

.mb .mb-bal-list { margin: 20px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.mb .mb-bal-list li {
  display: flex; align-items: center; gap: 10px;
  font-size: 17px; line-height: 1.4; color: var(--ink-900);
}
.mb .mb-bal-list li::before { content: ''; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--d-accent); }
.mb .mb-bal-side:not(.is-good) .mb-bal-list li { color: var(--ph-tone-body); }
.mb .mb-bal-side:not(.is-good) .mb-bal-list li::before { background: var(--ink-400); }

.mb .dna-stats .mb-stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.mb .mb-stat-grid em {
  display: block; margin-top: 14px; font-style: normal;
  font-size: clamp(17px, 1.4vw, 21px); line-height: 1.3; font-weight: 600; color: #f5f5f7;
}
.mb .mb-stat-grid span { margin-top: 4px; }
.mb .dna-stats .dna-lede + .dna-lede { margin-top: 14px; }
@media (max-width: 899px) { .mb .dna-stats .mb-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------------------------------------------------------------------------
   BALANCE AS TWO CARDS · comprehensive-genomic's
   "What comes back to you" (cg.css § 7): the sunk-tint card, the photograph on
   top while the two share a row (beside the list below 1181, stacked again
   below 760), the heading, its line, and a ruled list with a line icon each.
   ------------------------------------------------------------------------ */
.mb .mb-bal.mb-bal-kits { text-align: left; background: var(--d-paper); padding-block: clamp(72px, 8vw, 128px); }
.mb .mb-bal-kits .ph-display { align-items: flex-start; margin: 0; }
.mb .mb-bal-kits .dna-lede { max-width: 62ch; }
.mb .mb-kits {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 1.4vw, 24px); margin-top: clamp(40px, 4vw, 64px);
}
.mb .mb-kit {
  display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1fr); gap: 16px;
  padding: 16px; border-radius: 28px; background: var(--gl-tint-sunk, #f4f6fb);
}
.mb .mb-kit-img { border-radius: 20px; overflow: hidden; min-height: 380px; background: var(--phenome-blue-100); }
.mb .mb-kit-img img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: scale .9s var(--d-ease);
}
.mb .mb-kit:hover .mb-kit-img img { scale: 1.04; }
.mb .mb-kit-body { align-self: center; padding: 16px 20px 16px 12px; }
@media (min-width: 1181px) {
  .mb .mb-kit { grid-template-columns: minmax(0, 1fr); align-content: start; }
  .mb .mb-kit-img { aspect-ratio: 3 / 2; min-height: 0; }
  .mb .mb-kit-body { align-self: start; padding: 12px 16px 8px; }
}
.mb .mb-kit h3 {
  margin: 0; font-size: clamp(23px, 2vw, 30px); line-height: 1.2; letter-spacing: -.015em;
  font-weight: 600; color: var(--ink-900);
}
.mb .mb-kit-sub { margin: 6px 0 0; font-size: 17px; line-height: 1.5; color: var(--ink-900); }
.mb .mb-kit ul { margin: 20px 0 0; padding: 0; }
.mb .mb-kit li { list-style: none; display: flex; align-items: center; gap: 14px; padding: 12px 0; }
.mb .mb-kit li + li { border-top: 1px solid #203a851f; }
.mb .mb-kit li > span { display: block; }
.mb .mb-kit li svg {
  flex: none; width: 24px; height: 24px; fill: none; stroke: currentColor;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; color: var(--phenome-blue-500);
}
.mb .mb-kit:not(.is-good) li svg { color: var(--ink-400); }
.mb .mb-kit li b { display: block; font-size: 17px; line-height: 1.3; font-weight: 600; color: var(--ink-900); }
@media (max-width: 1180px) { .mb .mb-kits { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) {
  .mb .mb-kit { grid-template-columns: minmax(0, 1fr); }
  .mb .mb-kit-img { aspect-ratio: 16 / 10; min-height: 0; }
  .mb .mb-kit-body { padding: 8px; }
}
@media (prefers-reduced-motion: reduce) { .mb .mb-kit-img img { transition: none; } }

/* Balance: "Balance" and "Is everything" at one size */
.mb .mb-bal-kits .ph-display .ph-display-lead { font-size: 1em; line-height: inherit; }

/* ---------------------------------------------------------------------------
   WHAT YOUR MICROBES DO, AS A FULL SCREEN FRAME ·
   comprehensive-genomic's "Clarity for life" (cg.css § 2): the photograph
   arrives inset at .86, grows to the full screen as its top meets the top of
   the window, holds pinned under a glass panel of four, then scrolls on.
   dna.js writes --ess-s and --ess-rad; the photograph is counter scaled so
   only the crop changes.
   ------------------------------------------------------------------------ */
.mb .mb-ess { position: relative; background: var(--d-paper); }
.mb .mb-ess-track { position: relative; height: calc(100svh + 70vh); }
.mb .mb-ess-stage { position: sticky; top: 0; height: 100svh; overflow: clip; }
.mb .mb-ess-hero {
  position: relative; overflow: clip; isolation: isolate; color: #fff;
  width: 100%; height: 100svh; box-sizing: border-box;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: clamp(96px, 9vw, 136px) clamp(24px, 4vw, 72px) clamp(24px, 3vw, 48px);
  border-radius: var(--ess-rad, 0px);
  transform: scale(var(--ess-s, 1)); transform-origin: 50% 50%;
}
.mb .mb-ess-bg {
  position: absolute; left: 0; top: -8%; width: 100%; height: 116%; z-index: -2;
  object-fit: cover; object-position: 50% 42%; scale: calc(1 / var(--ess-s, 1));
}
.mb .mb-ess-hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(10, 30, 87, .5) 0%, rgba(10, 30, 87, .12) 38%, rgba(10, 30, 87, .6) 100%);
}
.mb .mb-ess-h { margin: 0; max-width: 16ch; font-size: clamp(40px, 5.6vw, 84px); color: #fff; }
.mb .mb-ess-panel {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px;
  margin: 40px 0 0; padding: clamp(28px, 3vw, 44px) clamp(24px, 3vw, 48px);
  border-radius: 20px; background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .2);
  -webkit-backdrop-filter: blur(22px) saturate(140%); backdrop-filter: blur(22px) saturate(140%);
}
.mb .mb-ess-panel li { list-style: none; }
.mb .mb-ic { display: block; width: 52px; height: 52px; fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.mb .mb-ess-panel h3 { margin: 28px 0 0; font-size: clamp(19px, 1.6vw, 23px); line-height: 1.25; font-weight: 600; color: #fff; }
.mb .mb-ess-panel p { margin: 10px 0 0; font-size: 17px; line-height: 1.5; color: rgba(255, 255, 255, .86); max-width: 30ch; }
@media (max-width: 1180px) {
  .mb .mb-ess-panel { grid-template-columns: repeat(2, 1fr); gap: 28px 24px; }
  .mb .mb-ess-panel h3 { margin-top: 16px; }
}
@media (max-width: 760px) {
  .mb .mb-ess { padding-block: 24px; }
  .mb .mb-ess-track { height: auto; }
  .mb .mb-ess-stage { position: static; height: auto; overflow: visible; padding-inline: 16px; }
  .mb .mb-ess-hero { height: auto; min-height: 620px; border-radius: 28px; transform: none; padding: 40px 20px 20px; }
  .mb .mb-ess-bg { scale: none; }
}
@media (max-width: 560px) {
  .mb .mb-ess-panel { grid-template-columns: minmax(0, 1fr); padding: 24px 20px; }
  .mb .mb-ess-panel li { display: grid; grid-template-columns: 40px 1fr; column-gap: 16px; }
  .mb .mb-ic { width: 40px; height: 40px; grid-row: span 2; }
  .mb .mb-ess-panel h3 { margin-top: 0; font-size: 19px; }
  .mb .mb-ess-panel p { margin-top: 4px; font-size: 16px; }
}

/* ---------------------------------------------------------------------------
   WHY IT MATTERS AS A CAROUSEL · the science page's
   "What you can learn" (science.css § 4): the dark band lit from its edges,
   the heading beside its paragraphs, the four figures as square-photo cards
   on a draggable track, glass arrows on the photographs, and a rail cut into
   one chapter per card that fills as the cards arrive. mb.js drives it.
   ------------------------------------------------------------------------ */
.mb .mb-learn {
  --mb-edge: calc(max(0px, (100% - var(--ph-content-max) - var(--d-gut) * 2) / 2) + var(--d-gut));
  position: relative; isolation: isolate; overflow: hidden; color: #fff;
  background: linear-gradient(180deg, #03050c 0%, #03050c 84%, #0b1024 100%);
  padding: clamp(74px, 7.4vw, 124px) 0 clamp(60px, 6vw, 96px);
}
.mb .mb-learn-glow {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  box-shadow: inset 0 0 90px 24px rgba(79, 114, 217, .55), inset 0 0 220px 60px rgba(138, 174, 255, .16);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 78%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 0%, #000 78%, transparent 100%);
  animation: mb-glow 7s ease-in-out infinite alternate;
}
.mb .mb-learn-glow::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(60% 45% at 50% 38%, rgba(79, 114, 217, .22), transparent 70%);
}
@keyframes mb-glow { from { opacity: .75; } to { opacity: 1; } }
.mb .mb-learn-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 460px); gap: clamp(20px, 4vw, 60px); align-items: end; }
.mb .mb-learn-h { margin: 0; font-size: clamp(34px, 4.2vw, 62px); color: #fff; }
.mb .mb-learn-say p { margin: 0 0 8px; font-size: 19px; line-height: 1.6; color: rgba(255, 255, 255, .76); }
.mb .mb-learn-say p + p { margin-top: 14px; }

.mb .mb-car { position: relative; margin-top: clamp(34px, 3.6vw, 54px); --card: clamp(268px, 29.7vw, 427px); }
.mb .mb-car-track {
  display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 0 var(--mb-edge); scroll-padding-inline: var(--mb-edge);
  scrollbar-width: none; cursor: grab;
}
.mb .mb-car-track::-webkit-scrollbar { display: none; }
.mb .mb-car-track.is-drag { cursor: grabbing; scroll-snap-type: none; }
.mb .mb-car-track.is-drag * { pointer-events: none; }
.mb .mb-read { flex: 0 0 auto; width: var(--card); scroll-snap-align: start; }
.mb .mb-read-media {
  position: relative; aspect-ratio: 1; border-radius: 16px; overflow: hidden;
  background: linear-gradient(160deg, #0d1531 0%, #060a1a 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07);
}
.mb .mb-read-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; user-select: none; -webkit-user-drag: none; }
/* the figure is the first word of the title: same size, same line, in the blue */
.mb .mb-read-t {
  display: flex; flex-wrap: wrap; gap: 0 .5em; margin: 22px 0 0;
  font-size: clamp(21px, 1.6vw, 23px); line-height: 1.26; font-weight: 500; letter-spacing: -0.02em; color: #fff;
}
.mb .mb-read-n { flex: none; color: inherit; font-variant-numeric: tabular-nums; }
.mb .mb-read > p { margin: 12px 0 0; font-size: 17px; line-height: 1.62; color: rgba(255, 255, 255, .76); }
@media (max-width: 860px) {
  .mb .mb-learn-head { grid-template-columns: minmax(0, 1fr); }
  .mb .mb-car { --card: min(82vw, 420px); }
}

.mb .mb-car-btn {
  position: absolute; top: calc(var(--card) / 2); z-index: 2; margin-top: -22px;
  display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .12); color: #fff; cursor: pointer;
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  transition: background .2s ease, opacity .2s ease;
}
.mb .mb-car-btn:hover { background: rgba(255, 255, 255, .26); }
.mb .mb-car-btn[disabled] { opacity: .25; cursor: default; }
.mb .mb-car-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mb .mb-car-btn.is-prev { left: 12px; }
.mb .mb-car-btn.is-next { right: 12px; }
@media (max-width: 860px) { .mb .mb-car-btn { display: none; } }

.mb .mb-car-foot { display: flex; align-items: center; gap: clamp(18px, 2.6vw, 36px); margin-top: clamp(28px, 3vw, 44px); }
.mb .mb-car-count { margin: 0; display: flex; align-items: baseline; gap: 6px; font-variant-numeric: tabular-nums; }
.mb .mb-car-count b { font-size: 24px; font-weight: 500; letter-spacing: -0.01em; }
.mb .mb-car-count span { font-size: 17px; color: rgba(255, 255, 255, .58); }
.mb .mb-car-rail { flex: 1; display: flex; gap: clamp(5px, .6vw, 9px); }
.mb .mb-car-seg {
  flex: 1; position: relative; height: 24px; padding: 0; border: 0; background: none;
  cursor: pointer; -webkit-appearance: none; appearance: none; --t: .6;
}
.mb .mb-car-seg::before,
.mb .mb-car-seg i {
  content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 5px; margin-top: -2.5px; border-radius: 99px;
}
.mb .mb-car-seg::before {
  background: rgba(255, 255, 255, .18);
  transform: scaleY(var(--t)); transform-origin: center;
  transition: background .25s ease, transform .35s var(--d-ease);
}
.mb .mb-car-seg i {
  background: #fff; transform: scaleX(var(--f, 0)) scaleY(var(--t)); transform-origin: left center;
  transition: transform .5s var(--d-ease);
}
.mb .mb-car-seg:hover::before { background: rgba(255, 255, 255, .4); }
.mb .mb-car-seg.is-on { --t: 1; }
.mb .mb-car-seg:focus-visible { outline: 2px solid var(--phenome-blue-300); outline-offset: 3px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) {
  .mb .mb-learn-glow { animation: none; }
  .mb .mb-car-seg i { transition: none; }
}
