/**
 * Weight-loss category page — layout rhythm + zh typography (scoped).
 */
html[data-ro-wl-page="1"] {
  --ro-wl-section-y: clamp(2.5rem, 4vw, 5rem);
  --ro-wl-content-max: 75rem;
}

html[data-ro-wl-page="1"] #main {
  overflow-x: clip;
}

html[data-ro-wl-page="1"] #main [class*="SectionWrapper-sc-"],
html[data-ro-wl-page="1"] #main [class*="LayoutSection-sc-"] {
  scroll-margin-top: calc(var(--top-navigation-desktop-height, 4rem) + 3.25rem);
}

html[data-ro-wl-page="1"] #TopPromoBar {
  display: block !important;
  text-align: center;
}

html[data-ro-wl-page="1"] #TopPromoBar [class*="Text-sc-bc8e86ef"] {
  font-size: 0.875rem !important;
  line-height: 1.4 !important;
  padding: 0.5rem 1rem !important;
}

/* Sticky in-page nav */
html[data-ro-wl-page="1"] [class*="StickyContainer-sc-cb5ae65b"] {
  z-index: 40 !important;
  background: var(--rds-primitive-color-beige-neutral, #f5f0eb) !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
}

html[data-ro-wl-page="1"] [class*="StickyContainer-sc-cb5ae65b"] nav,
html[data-ro-wl-page="1"] [class*="StickyContainer-sc-cb5ae65b"] [class*="List-sc-"] {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  gap: 0.25rem 1.5rem !important;
  padding: 0.75rem 1rem !important;
  max-width: var(--ro-wl-content-max) !important;
  margin: 0 auto !important;
}

html[data-ro-wl-page="1"] [class*="StickyContainer-sc-cb5ae65b"] a {
  white-space: nowrap !important;
  font-weight: 500 !important;
  text-decoration: none !important;
  padding: 0.25rem 0 !important;
}

/* Hero */
html[data-ro-wl-page="1"] [class*="ContentGrid-sc-e6b451b4-5"] {
  align-items: start !important;
  gap: clamp(1.5rem, 3vw, 2.5rem) !important;
  max-width: var(--ro-wl-content-max) !important;
  margin-inline: auto !important;
}

html[data-ro-wl-page="1"] [class*="ContentGrid-sc-e6b451b4-5"] h1 {
  font-size: clamp(1.75rem, 4vw, 2.75rem) !important;
  line-height: 1.15 !important;
  letter-spacing: -0.02em !important;
  max-width: 18ch !important;
}

html[data-ro-wl-page="1"] [class*="RightColumn-sc-e6b451b4-6"] [class*="List-sc-a9b00ddd-0"] {
  display: flex !important;
  flex-direction: column !important;
  gap: 1rem !important;
  margin-top: 1.5rem !important;
}

html[data-ro-wl-page="1"] [class*="ButtonsInnerWrapper-sc-e6b451b4-3"] {
  margin-top: 1.25rem !important;
}

html[data-ro-wl-page="1"] [class*="MediaBackground-sc-e6b451b4-7"],
html[data-ro-wl-page="1"] [class*="MediaWrapper-sc-e6b451b4-8"] {
  border-radius: 0.25rem !important;
  overflow: hidden !important;
}

/* Bottom value props overlay */
html[data-ro-wl-page="1"] [class*="BottomWrapper-sc-e6b451b4-9"] {
  position: relative !important;
  margin-top: -2rem !important;
  z-index: 2 !important;
  padding-inline: clamp(1rem, 3vw, 2rem) !important;
}

html[data-ro-wl-page="1"] [class*="BottomWrapper-sc-e6b451b4-9"] [class*="List-sc-a9b00ddd-0"] {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 1rem !important;
  background: rgba(255, 255, 255, 0.92) !important;
  backdrop-filter: blur(8px) !important;
  border-radius: 0.5rem !important;
  padding: 1.25rem 1.5rem !important;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06) !important;
}

@media (max-width: 959px) {
  html[data-ro-wl-page="1"] [class*="BottomWrapper-sc-e6b451b4-9"] [class*="List-sc-a9b00ddd-0"] {
    grid-template-columns: 1fr !important;
  }

  html[data-ro-wl-page="1"] [class*="BottomWrapper-sc-e6b451b4-9"] {
    margin-top: 0 !important;
  }
}

/* Section headers */
html[data-ro-wl-page="1"] #main [class*="Wrapper-sc-952e6fd8-0"] h2,
html[data-ro-wl-page="1"] #main [class*="HeadlinesWrapper-sc-cf926a80-19"] h2 {
  line-height: 1.2 !important;
}

html[data-ro-wl-page="1"] #main [class*="Wrapper-sc-952e6fd8-0"] [class*="StyledParagraph-sc-"]:not(h2 *) {
  line-height: 1.55 !important;
  color: var(--color-text-secondary, #555) !important;
}

/* HIW timeline */
html[data-ro-wl-page="1"] [class*="Wrapper-sc-cf926a80-18"] {
  gap: clamp(1.5rem, 3vw, 2.5rem) !important;
  padding-block: var(--ro-wl-section-y) !important;
}

html[data-ro-wl-page="1"] [class*="HeadlinesWrapper-sc-cf926a80-19"] [class*="Headline-sc-cf926a80-20"] {
  font-size: 1.125rem !important;
  font-weight: 600 !important;
  margin-bottom: 0.5rem !important;
}

/* Carousels — consistent card rhythm */
html[data-ro-wl-page="1"] [class*="CarouselWrapper-sc-8e39e1bf-6"] {
  padding-block: 0.5rem 1.5rem !important;
}

html[data-ro-wl-page="1"] [class*="CarouselWrapper-sc-8e39e1bf-6"] [class*="ControlsWrapper-sc-c23519fd"],
html[data-ro-wl-page="1"] [class*="CarouselWrapper-sc-8e39e1bf-6"] [class*="ProgressBarContainer-sc-c23519fd"] {
  margin-top: 1rem !important;
}

/* FAQ block */
html[data-ro-wl-page="1"] [class*="ShowButton-sc-3dadce8d"] {
  display: flex !important;
  justify-content: center !important;
  margin: 1.5rem auto 0 !important;
}

html[data-ro-wl-page="1"] .Collapsible__trigger {
  text-align: left !important;
  width: 100% !important;
  padding: 1rem 0 !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
}

html[data-ro-wl-page="1"] .Collapsible__contentInner {
  padding-bottom: 1rem !important;
  line-height: 1.65 !important;
}

/* Chinese typography */
html[data-ro-wl-page="1"][lang="zh-Hans"] #main {
  letter-spacing: 0.02em;
}

html[data-ro-wl-page="1"][lang="zh-Hans"] #main h1,
html[data-ro-wl-page="1"][lang="zh-Hans"] #main h2,
html[data-ro-wl-page="1"][lang="zh-Hans"] #main h3 {
  letter-spacing: 0.04em;
  line-height: 1.35 !important;
}

html[data-ro-wl-page="1"][lang="zh-Hans"] #main p[class*="StyledParagraph-sc-"] {
  line-height: 1.75 !important;
}
