/* GutGutGoose science + care update - kept separate from the legacy cascade
   so the new editorial sections share one intentional component layer. */

#math,
#evidence {
  scroll-margin-top: 86px;
}

.gut-intro-panel h2 {
  max-width: 15ch;
  font-size: clamp(40px, 5.2vw, 86px);
}

.gut-intro-panel p {
  max-width: 43ch;
}

.gut-intro-side > .gut-intro-reveal {
  width: min(100%, 760px);
}

.gut-intro-side.right > .gut-intro-reveal {
  margin-left: auto;
}

.impact-capsule-visual {
  position: relative;
  top: auto;
  display: grid;
  min-height: clamp(420px, 36vw, 620px);
  place-items: center;
  overflow: visible;
  background: transparent;
}

.impact-visual .impact-capsule-media {
  display: block;
  width: min(100%, 480px);
  height: auto;
  max-height: 100%;
  object-fit: contain;
  background: transparent;
}

@media (max-width: 900px) {
  .impact-capsule-visual {
    position: relative;
    top: auto;
    z-index: 1;
    display: grid;
    height: clamp(260px, 76vw, 320px);
    min-height: clamp(260px, 76vw, 320px);
    margin-bottom: 22px;
    background: transparent;
  }

  .impact-copy {
    position: relative;
    z-index: 1;
  }

  .impact-visual .impact-capsule-media {
    width: min(100%, 300px);
    max-height: 100%;
  }

}

.math-section {
  min-height: 100svh;
  padding: clamp(80px, 9vw, 154px) 0;
  overflow: hidden;
  color: var(--dark, #181e25);
  background: #eef3ee;
}

.math-grid {
  display: grid;
  grid-template-columns: minmax(340px, .82fr) minmax(520px, 1.18fr);
  gap: clamp(54px, 7vw, 136px);
  align-items: center;
}

.math-visual {
  position: relative;
  display: grid;
  width: min(100%, 560px);
  aspect-ratio: 1;
  place-content: center;
  justify-items: center;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(145deg, #173124 0%, #10271c 58%, #0c2016 100%);
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 14px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .16),
    0 18px 50px rgba(25, 52, 35, .1);
  isolation: isolate;
}

.math-visual strong,
.math-visual > span:last-child {
  position: relative;
  z-index: 3;
}

.math-visual strong {
  font-size: clamp(88px, 10vw, 174px);
  font-weight: 500;
  line-height: .84;
  letter-spacing: -.07em;
  text-shadow: 0 6px 32px rgba(4, 16, 9, .7);
}

.math-visual sup {
  position: relative;
  top: -.38em;
  margin-left: .04em;
  color: var(--brand, #d6fd70);
  font-size: .34em;
  letter-spacing: 0;
}

.math-visual > span:last-child {
  max-width: 20ch;
  margin-top: 28px;
  color: rgba(255, 255, 255, .7);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: .12em;
  line-height: 1.45;
  text-align: center;
  text-transform: uppercase;
}

.math-network {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: crosshair;
  pointer-events: auto;
  touch-action: pan-y;
  will-change: opacity;
}

.math-effect-ready .math-network {
  opacity: .96;
}

.math-copy {
  display: grid;
  align-content: center;
}

.math-section .math-copy h2 {
  position: static;
  max-width: 12ch;
  min-height: 0;
  margin: 0;
  padding: 0;
  color: var(--dark, #181e25);
  background: transparent;
  font-size: clamp(48px, 5.3vw, 90px);
  font-weight: 500;
  line-height: .94;
  letter-spacing: -.035em;
}

.math-section .math-lede {
  max-width: 42ch;
  margin: clamp(30px, 4vw, 58px) 0 0;
  color: rgba(24, 30, 37, .7);
  font-size: clamp(18px, 1.45vw, 25px);
  line-height: 1.5;
}

.math-section .math-lede strong {
  color: var(--dark, #181e25);
  font-weight: 650;
}

.math-proof {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin-top: clamp(34px, 4vw, 62px);
  background: rgba(24, 30, 37, .14);
}

.math-proof p {
  margin: 0;
  padding: clamp(22px, 2.1vw, 34px);
  color: rgba(24, 30, 37, .72);
  background: #eef3ee;
  font-size: 15px;
  font-weight: 550;
  line-height: 1.58;
}

.math-proof strong {
  color: var(--dark, #181e25);
}

@media (min-width: 901px) {
  .math-section {
    display: grid;
    box-sizing: border-box;
    height: 100svh;
    min-height: 0;
    padding: clamp(92px, 13svh, 118px) 0 clamp(26px, 4svh, 42px);
    align-items: center;
  }

  .math-grid {
    grid-template-columns: minmax(300px, .82fr) minmax(0, 1.18fr);
    gap: clamp(40px, 6vw, 112px);
  }

  .math-visual {
    width: min(100%, calc(100svh - 152px), 560px);
  }

  .math-section .math-copy h2 {
    font-size: clamp(48px, min(5.3vw, 8.8svh), 90px);
  }

  .math-section .math-lede {
    margin-top: clamp(20px, 3.2svh, 34px);
    font-size: clamp(18px, min(1.45vw, 2.8svh), 25px);
  }

  .math-proof {
    margin-top: clamp(22px, 3.5svh, 34px);
  }

  .math-proof p {
    padding: clamp(16px, 2.5svh, 24px);
  }
}

.ingredient-deck {
  max-width: 650px;
  margin: 24px 0 0;
  color: rgba(24, 30, 37, .68);
  font-size: clamp(17px, 1.25vw, 22px);
  font-weight: 500;
  line-height: 1.5;
}

.evidence-section .ingredient-rail {
  grid-template-rows: auto repeat(2, minmax(176px, auto));
}

.evidence-section .ingredient-core {
  min-height: 280px;
}

.evidence-section .ingredient-rail p {
  max-width: 48ch;
}

.research-data-section {
  padding: clamp(72px, 8vw, 132px) 0;
  color: #f8faf6;
  background: #253c2f;
}

.research-data-grid {
  display: grid;
  grid-template-columns: minmax(170px, .38fr) minmax(0, 1.62fr);
  gap: clamp(36px, 7vw, 120px);
  align-items: start;
}

.research-data-kicker {
  margin: 8px 0 0;
  color: #d6fd70;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.research-data-copy h2 {
  max-width: 18ch;
  margin: 0;
  color: inherit;
  font-size: clamp(42px, 5vw, 82px);
  font-weight: 500;
  letter-spacing: -.045em;
  line-height: .96;
}

.research-data-copy p {
  max-width: 64ch;
  margin: clamp(24px, 3vw, 42px) 0 0;
  color: rgba(248, 250, 246, .72);
  font-size: clamp(16px, 1.25vw, 21px);
  font-weight: 500;
  line-height: 1.5;
}

.community-grid .community-intro {
  display: block;
}

.community-grid .community-intro p,
.community-grid .community-intro p + p {
  display: block;
  max-width: 34ch;
  margin: 0;
  padding: 0;
  border: 0;
  font-size: clamp(18px, 1.35vw, 24px);
  line-height: 1.45;
}

.community-grid .community-intro p::before {
  content: none;
}

.pricing-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 1120px;
  margin-inline: auto;
}

.pricing-card {
  min-height: 720px;
}

.pricing-card h3 {
  max-width: 34ch;
  min-height: 2.5em;
  line-height: 1.25;
}

.pricing-card-clinics {
  color: var(--white, #fff);
  background: var(--green, #253c2f);
  border-color: var(--green, #253c2f);
  box-shadow: 0 22px 60px rgba(22, 35, 27, .14);
}

.pricing-card-clinics .pricing-list li {
  border-top-color: rgba(255, 255, 255, .18);
}

.pricing-card-clinics .pricing-note {
  opacity: .74;
}

.pricing-launch-price {
  display: flex;
  align-items: baseline;
  gap: 12px;
  min-height: 58px;
}

.pricing-original-price {
  position: relative;
  display: inline-flex;
  align-items: center;
  color: rgba(255, 255, 255, .52);
  font-size: clamp(20px, 1.55vw, 26px);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.025em;
  line-height: 1;
  text-decoration: none;
}

.pricing-card-standard .pricing-original-price {
  color: rgba(22, 35, 27, .48);
}

.pricing-card-standard .pricing-original-price::after {
  background: rgba(37, 60, 47, .68);
  box-shadow: none;
}

.pricing-original-price::after {
  content: "";
  position: absolute;
  top: 48%;
  left: -4%;
  width: 108%;
  height: 1px;
  border-radius: 999px;
  background: rgba(202, 255, 90, .78);
  box-shadow: 0 0 6px rgba(202, 255, 90, .16);
  transform: rotate(-3deg);
  transform-origin: center;
}

.pricing-launch-label {
  max-width: none;
  margin: 8px 0 0;
  color: var(--accent, #c8ff5a);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.pricing-card-standard .pricing-launch-label {
  color: #365b3f;
}

.pricing-card-standard:focus-visible .pricing-original-price,
.pricing-card-standard:focus-within .pricing-original-price {
  color: rgba(255, 255, 255, .56);
}

.pricing-card-standard:focus-visible .pricing-original-price::after,
.pricing-card-standard:focus-within .pricing-original-price::after {
  background: rgba(202, 255, 90, .78);
}

.pricing-card-standard:focus-visible .pricing-launch-label,
.pricing-card-standard:focus-within .pricing-launch-label {
  color: var(--accent, #c8ff5a);
}

.pricing-card-clinics:focus-visible,
.pricing-card-clinics:focus-within {
  background: #1f3529;
}

@media (hover: hover) {
  .pricing-card-clinics:hover {
    background: #1f3529;
  }

  .pricing-card-standard:hover .pricing-original-price {
    color: rgba(255, 255, 255, .56);
  }

  .pricing-card-standard:hover .pricing-original-price::after {
    background: rgba(202, 255, 90, .78);
  }

  .pricing-card-standard:hover .pricing-launch-label {
    color: var(--accent, #c8ff5a);
  }
}

.pricing-card-clinics .pricing-start-flag {
  max-width: calc(100% - 44px);
  min-height: 30px;
  line-height: 1.2;
  white-space: normal;
}

.pricing-card .pricing-buy {
  width: fit-content;
  min-width: 220px;
  max-width: 100%;
}

.pricing-card-clinics .pricing-buy {
  min-width: 292px;
}

@media (max-width: 900px) {
  .research-data-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .math-section {
    min-height: 0;
    padding: 76px 0 86px;
  }

  .math-grid {
    grid-template-columns: 1fr;
    gap: 46px;
  }

  .math-copy {
    order: 1;
  }

  .math-visual {
    order: 2;
    width: min(100%, 520px);
    margin-inline: auto;
  }

  .math-section .math-copy h2 {
    max-width: 13ch;
    font-size: clamp(42px, 10vw, 68px);
  }

  .math-proof {
    grid-template-columns: 1fr;
  }

  .evidence-section .ingredient-core {
    min-height: 260px;
  }

  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 680px;
  }

  .pricing-card {
    min-height: 0;
  }

  .pricing-card h3 {
    min-height: 0;
  }
}

@media (max-width: 760px) {
  /* The original panels already provide the right full-screen scroll rhythm.
     Use them directly on phones so the longer evidence copy never gets
     clipped by the legacy zero-height clone lane. */
  .gut-intro-stage {
    display: none;
  }

  .gut-stage-on .gut-intro-content .gut-intro-side > .gut-intro-reveal {
    visibility: visible;
  }

  .gut-intro-content .gut-intro-side {
    justify-content: flex-end;
    padding: 0 22px 54px;
    background: transparent;
  }

  .gut-intro-content .gut-intro-side > .gut-intro-reveal {
    position: relative;
    z-index: 3;
    width: 100%;
  }

  .gut-intro-content .gut-intro-side h2 {
    max-width: 100%;
  }
}

@media (max-width: 700px) {
  .gut-intro-panel h2 {
    font-size: clamp(34px, 9.1vw, 50px);
  }

  .gut-intro-panel p {
    max-width: min(38ch, 86vw);
    font-size: 13.5px;
  }

  .math-section .math-copy h2 {
    font-size: clamp(38px, 11.5vw, 52px);
  }

  .math-section .math-lede {
    font-size: 17px;
  }

  .math-visual strong {
    font-size: clamp(82px, 27vw, 124px);
  }

  .evidence-section .ingredient-rail {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .evidence-section .ingredient-core,
  .evidence-section .ingredient-rail article:nth-of-type(n) {
    grid-column: 1;
    grid-row: auto;
  }

  .evidence-section .ingredient-rail article:nth-of-type(n) {
    min-height: 240px;
  }

  .pricing-card-clinics {
    margin-top: 10px;
  }

  .pricing-card-clinics .pricing-start-flag {
    max-width: none;
    padding-inline: 10px;
    font-size: 9px;
    letter-spacing: .055em;
    white-space: nowrap;
  }

  .pricing-launch-price {
    gap: 9px;
  }

  .pricing-launch-label {
    max-width: none;
  }

  .pricing-card .pricing-buy,
  .pricing-card-clinics .pricing-buy {
    width: 100%;
    min-width: 0;
  }

  .pricing-card .pricing-buy .button-text-small {
    font-size: 12.5px;
    letter-spacing: -.01em;
  }
}

@media (prefers-reduced-motion: reduce) {
  .math-network {
    display: none;
  }
}
