@media (max-width: 1023px) {
  #root:has(.legacy-header) {
    --mobile-page-gutter: 1.25rem;
    --public-section-gutter: var(--mobile-page-gutter);
    --octa-header-gutter: var(--mobile-page-gutter);
    --octa-footer-gutter: var(--mobile-page-gutter);
    --octa-footer-legal-gutter: var(--mobile-page-gutter);
  }

  #root:has(.legacy-header) #main-content > .container-custom,
  #root:has(.legacy-header) #main-content > section > .container-custom {
    padding-inline: var(--mobile-page-gutter);
  }

  #root:has(.legacy-header) #main-content .octa-home-inner {
    width: calc(100% - 2 * var(--mobile-page-gutter));
  }

  #root:has(.legacy-header) #main-content :is(.octa-home-core-card, .possibility-copy, .service-process-grid li, .service-consultation-card, .service-enquiry-card) {
    min-width: 0;
    overflow-wrap: break-word;
  }

  #root:has(.legacy-header) #main-content .octa-home-core-card h3 {
    align-self: start;
  }

  #root:has(.legacy-header) #main-content :is(.octa-home-cta, .service-orange-button) {
    max-width: 100%;
    justify-content: center;
    text-align: center;
  }

  #root:has(.legacy-header) #main-content :is(.octa-home-cta, .service-orange-button) > svg {
    flex-shrink: 0;
  }

  #root:has(.legacy-header) .legacy-header #mobile-navigation {
    max-height: calc(100dvh - var(--octa-header-height));
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  #root:has(.legacy-header) .legacy-header #mobile-navigation a,
  #root:has(.legacy-header) .legacy-header #mobile-navigation button {
    display: flex;
    align-items: center;
    min-height: 44px;
    white-space: normal;
  }

  #root:has(.legacy-header) .legacy-header #mobile-navigation .mobile-services-list {
    margin-left: 0;
  }

  #root:has(.legacy-header) #main-content .service-consultation-card {
    gap: 1.5rem;
  }

  #root:has(.legacy-header) #main-content :is(.service-enquiry-card, .people-form) :is(input, select, textarea) {
    min-width: 0;
    width: 100%;
    font-size: 16px;
  }

  #root:has(.legacy-header) #main-content :is(.service-enquiry-card, .people-form) input {
    min-height: 44px;
  }

  #root:has(.legacy-header) .cloud-footer > .container-custom {
    padding-inline: var(--mobile-page-gutter);
  }

  #root:has(.legacy-header) .cloud-footer .cloud-footer-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.75rem 1rem;
  }

  #root:has(.legacy-header) .cloud-footer .cloud-footer-columns h2 {
    font-size: 1rem;
    line-height: 1.4;
  }

  #root:has(.legacy-header) .cloud-footer .cloud-footer-columns ul {
    row-gap: 0;
  }

  #root:has(.legacy-header) .cloud-footer .cloud-footer-columns a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding-block: .35rem;
    font-size: .875rem;
    line-height: 1.5;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  #root:has(.legacy-header) {
    --mobile-page-gutter: 1.5rem;
  }

  #root:has(.legacy-header) #main-content.service-product-page--enterprise .service-product-intro {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
  }

  #root:has(.legacy-header) #main-content.service-product-page--enterprise .unique-service-art {
    justify-self: start;
    max-width: 28rem;
    aspect-ratio: 3 / 1;
  }
}

@media (max-width: 767px) {
  #root:has(.legacy-header) #main-content > :is(.showcase-section, .home-feedback-section) {
    padding-inline: var(--mobile-page-gutter);
  }

  #root:has(.legacy-header) #main-content .section-heading h2 {
    text-wrap: balance;
  }

  #root:has(.legacy-header) #main-content.service-product-page--enterprise .service-section-nav > div {
    justify-content: flex-start;
    gap: 1rem;
    padding: 0 var(--mobile-page-gutter);
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: #77633b #171717;
    overscroll-behavior-x: contain;
  }

  #root:has(.legacy-header) #main-content.service-product-page--enterprise .service-section-nav a {
    min-height: 46px;
    font-size: .875rem;
    padding-block: .65rem;
  }

  #root:has(.legacy-header) #main-content.service-product-page--enterprise > section[id] {
    scroll-margin-top: calc(var(--octa-header-height) + 4.5rem);
  }

  #root:has(.legacy-header) #main-content #technology {
    padding-inline: 0;
  }

  #root:has(.legacy-header) #main-content.service-product-page--enterprise #benefits > :is(.service-kicker, h2) {
    text-align: left;
  }

  #root:has(.legacy-header) #main-content.service-product-page--enterprise .service-benefit-grid {
    gap: .75rem;
    margin-top: 1.25rem;
  }

  #root:has(.legacy-header) #main-content.service-product-page--enterprise .service-benefit-grid article {
    padding: 1.1rem;
    border-radius: .85rem;
    text-align: left;
  }

  #root:has(.legacy-header) #main-content.service-product-page--enterprise .service-benefit-grid svg {
    width: 26px;
    height: 26px;
    margin: 0 0 .75rem;
  }

  #root:has(.legacy-header) #main-content.service-product-page--enterprise .service-benefit-grid h3 {
    font-size: 1.05rem;
    line-height: 1.35;
    margin: 0 0 .45rem;
  }

  #root:has(.legacy-header) #main-content.service-product-page--enterprise .service-benefit-grid p {
    font-size: .92rem;
    line-height: 1.55;
    margin: 0;
  }

  #root:has(.legacy-header) #main-content .service-consultation-card {
    padding: 1.25rem;
  }

  #root:has(.legacy-header) #main-content .service-enquiry-card {
    padding-inline: 0;
  }
}

@media (max-width: 479px) {
  #root:has(.legacy-header) #main-content.service-product-page--enterprise .service-benefit-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  #root:has(.legacy-header) #main-content .home-feedback-actions {
    grid-template-columns: minmax(0, 1fr);
  }
}
