/* Alternate repeated layouts are opt-in; original collection sizes keep their layout. */
.cycle-board.cms-cycle-flow {
  min-height: 0;
  height: auto;
  margin-top: 32px;
  padding-bottom: 24px;
  overflow: visible;
}
.cycle-board.cms-cycle-flow .cycle-frame {
  position: relative;
  inset: auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px 24px;
  width: 100%;
  min-height: 0;
  height: auto;
  padding: 0;
}
.cycle-board.cms-cycle-flow .cycle-track,
.cycle-board.cms-cycle-flow .cycle-arrow {
  display: none;
}
.cycle-board.cms-cycle-flow .cycle-core {
  position: relative;
  inset: auto;
  transform: none;
  grid-column: 1 / -1;
  width: 100%;
  max-width: 100%;
  margin: 0;
  justify-content: center;
  text-align: center;
}
.cycle-board.cms-cycle-flow .cycle-core__sub {
  white-space: normal;
  flex-wrap: wrap;
}
.cycle-board.cms-cycle-flow .cycle-sides {
  position: relative;
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}
.cycle-board.cms-cycle-flow .cycle-side {
  position: relative;
  inset: auto;
  transform: none;
  writing-mode: horizontal-tb;
  width: auto;
  height: auto;
  max-width: 100%;
  padding: 8px 18px;
  margin: 0;
  font-size: 1rem;
  white-space: normal;
}
.cycle-board.cms-cycle-flow .cycle-step {
  position: relative;
  inset: auto;
  transform: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: auto;
  margin: 0;
  padding: 16px 8px;
}
.cycle-board.cms-cycle-flow .cycle-step::after {
  display: none;
}
.cycle-board.cms-cycle-flow .cycle-step__copy {
  order: 0;
  width: 100%;
  margin: 0 0 12px;
}
.cycle-board.cms-cycle-flow .cycle-step__copy h3 {
  order: 0;
  margin-top: 0;
}
.cycle-board.cms-cycle-flow .cycle-step__copy p {
  overflow-wrap: anywhere;
}
.cycle-board.cms-cycle-flow .cycle-step__icon {
  order: 1;
  flex-shrink: 0;
}

.beauty-fit__scaler.cms-fit-scaler {
  height: auto;
  overflow: visible;
}
.beauty-fit__board.cms-fit-flow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 310px) minmax(0, 1fr);
  align-items: start;
  gap: 24px;
  width: 100%;
  max-width: 100%;
  height: auto;
  transform: none;
  padding: 16px 0;
}
.beauty-fit__board.cms-fit-flow .beauty-fit__side {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 24px;
  width: 100%;
  padding: 0;
  margin: 0;
}
.beauty-fit__board.cms-fit-flow .beauty-fit__item,
.beauty-fit__board.cms-fit-flow .beauty-fit__item .beauty-fit__icon,
.beauty-fit__board.cms-fit-flow .beauty-fit__item p {
  position: relative;
  inset: auto;
  transform: none;
}
.beauty-fit__board.cms-fit-flow .beauty-fit__arrow {
  display: none;
}
.beauty-fit__board.cms-fit-flow .beauty-fit__item {
  order: 0;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.beauty-fit__board.cms-fit-flow .beauty-fit__phone-wrap {
  position: relative;
  inset: auto;
  width: 100%;
  height: auto;
  margin: 0;
  transform: none;
}
.beauty-fit__board.cms-fit-flow .beauty-fit__phone {
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 0;
  transform: none;
  aspect-ratio: auto;
}
.beauty-fit__board.cms-fit-flow .beauty-fit__phone img {
  width: 100%;
  max-width: none;
  height: auto;
  margin: 0;
  object-fit: contain;
  object-position: center bottom;
}
/* Wide mockups contain transparent margins; portrait uploads stay uncropped. */
.beauty-fit__board.cms-fit-flow .beauty-fit__phone.cms-fit-phone-canvas {
  overflow: hidden;
  aspect-ratio: 978 / 1768;
}
.beauty-fit__board.cms-fit-flow .beauty-fit__phone.cms-fit-phone-canvas img {
  width: 298%;
  max-width: none;
  height: auto;
  margin-left: -98%;
  margin-top: -26%;
  object-fit: fill;
  object-position: center bottom;
}

@media (max-width: 900px) {
  .cycle-board.cms-cycle-flow .cycle-frame {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 16px;
  }
  .beauty-fit__board.cms-fit-flow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 16px;
  }
  .beauty-fit__board.cms-fit-flow .beauty-fit__side {
    display: contents;
  }
  .beauty-fit__board.cms-fit-flow .beauty-fit__phone-wrap {
    order: 1;
    grid-row: auto;
    grid-column: 1 / -1;
    width: min(280px, 100%);
    justify-self: center;
  }
}
@media (max-width: 520px) {
  .cycle-board.cms-cycle-flow .cycle-frame {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* The original desktop mockup's transparent right edge must not widen the page. */
.design {
  overflow-x: clip;
}

/* Original narrow-phone defects: keep the text inside its existing container. */
@media (max-width: 420px) {
  .sh-quote__tip p {
    min-width: 0;
  }
  .sh-quote__tip p,
  .sh-quote__tip span {
    white-space: normal;
  }
  .vc-intro__inner {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* At 320px, shrink the original auto-minimum tracks and allow existing text to wrap. */
@media (max-width: 359px) {
  .cd__grid,
  .bk-more__body,
  .bk-more__body.is-flip,
  .gm-row__inner,
  .ly-row__inner,
  .vc-row__inner,
  .cn-cmp__body,
  .food-care__body {
    grid-template-columns: minmax(0, 1fr);
  }
  .gm-compare__cols,
  .st-why__stage,
  #vc-redeem .vc-checks.is-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .bk-reserve__card {
    max-width: 100vw;
  }
  .ly-intro__sub span {
    white-space: normal;
  }
  .st-gift__flags {
    flex-wrap: wrap;
  }
  .bk-more__list span,
  .ly-pills li span,
  .vc-checks li span {
    min-width: 0;
  }
}

/* Keep the existing layout inside 360–374px phone viewports. */
@media (min-width: 360px) and (max-width: 374px) {
  .gm-row__inner,
  .ly-row__inner {
    grid-template-columns: minmax(0, 1fr);
  }
  .ly-intro__sub span {
    white-space: normal;
  }
  .st-gift__flags {
    flex-wrap: wrap;
  }
}

/* Keep both booking actions above the pager within the original mobile banner. */
@media (max-width: 413px) {
  .hero--booking .bk-hero__copy {
    margin-top: min(56px, calc(clamp(280px, 88vw, 380px) - 306px));
  }
}

/* At the desktop breakpoint, retain a gap without moving the banner or its content. */
@media (min-width: 901px) {
  .hero--booking .bk-hero__pager {
    bottom: min(28px, calc(14vw - 106px));
  }
}

/* Keep case categories and search separate at intermediate tablet widths. */
@media (min-width: 561px) and (max-width: 900px) {
  .cases-filters {
    flex-wrap: wrap;
  }
}

/* Keep the compact mobile navigation inside short or landscape screens. */
@media (max-width: 900px) {
  .site-nav {
    max-height: calc(100vh - var(--header-h) - 24px);
    max-height: calc(100dvh - var(--header-h) - 24px);
    overflow: hidden;
  }
  .site-nav .nav-list {
    max-height: calc(100vh - var(--header-h) - 96px);
    max-height: calc(100dvh - var(--header-h) - 96px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
}
.article-main__title{overflow-wrap:anywhere}

/* Keep mobile game rows within the original padded container. */
@media (max-width: 980px) {
  .gm-row__inner,
  .gm-row.is-flip .gm-row__inner {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Preserve each original desktop banner frame when replacing its background. */
@media (min-width: 901px) {
  .hero .hero-slide__bg.img-ph img,
  .hero .hero-slide__bg img,
  .hero.hero--features .hero-slide__bg.img-ph img,
  .hero.hero--features .hero-slide__bg img {
    aspect-ratio: 1920 / 700;
    object-fit: cover !important;
  }
  .hero.hero--consultant .hero-slide__bg.img-ph img,
  .hero.hero--consultant .hero-slide__bg img {
    aspect-ratio: 1919 / 700;
  }
}

/* Fit the course copy above its pager on narrow desktops without moving the frame. */
@media (min-width: 901px) and (max-width: 1048px) {
  .hero--courses .cs-hero__sub {
    margin-top: clamp(4px, calc(4px + (100vw - 901px) * 0.0810810811), 16px);
  }
  .hero--courses .cs-hero__checks {
    margin-top: clamp(4px, calc(4px + (100vw - 901px) * 0.1216216216), 22px);
  }
  .hero--courses .cs-hero__btns {
    margin-top: clamp(4px, calc(4px + (100vw - 901px) * 0.1621621622), 28px);
  }
}

/* Keep share carousel controls separate from its actions and inside the page. */
.hero--share .sh-hero__pager {
  width: max-content;
  max-width: calc(100% - 32px);
  flex-wrap: wrap;
  justify-content: center;
}

/* Show the active FAQ question during keyboard navigation without changing layout. */
.qa-item__q:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: -2px;
}

/* Wrap editable labels and FAQ copy only when a word exceeds its existing frame. */
.qa-cat__title,
.qa-item__text,
.article-card__tag {
  overflow-wrap: anywhere;
}
.articles-filters {
  min-width: 0;
  max-width: 100%;
}
.articles-filter {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}
@media (min-width: 901px) {
  .hero--share .sh-hero__pager {
    left: 453px;
    right: 453px;
    max-width: calc(100% - 469px);
    margin-inline: auto;
    transform: none;
  }
}
/* Let loaded industry images set the frame height without exposing its background. */
.industries .module-card__img:not(.is-empty) {
  min-height: 0;
}
@media (max-width: 360px) {
  .industries .module-features {
    column-gap: 16px;
  }
}
