/* Keep the Chinese site's original dimensions, image scale and layout.
   Mask only the Chinese lettering on the original brand image (x >= 472/842).
   The cut at 55% lies in the blank gap after LoLR.AI; source size is unchanged. */
html[data-site-locale]:not([data-site-locale="zh-CN"], [data-site-locale="zh-Hant"]) #site-header .brand-wordmark-v44 img,
html[data-site-locale]:not([data-site-locale="zh-CN"], [data-site-locale="zh-Hant"]) .footer-brand-wordmark-v51 img {
  clip-path: inset(0 45% 0 0);
}
/* Removing the news column leaves four real links, each using an equal share. */
html[data-site-locale]:not([data-site-locale="zh-CN"], [data-site-locale="zh-Hant"]) #site-header .mega-about .mega-columns-four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
/* Longer translations of lab names can use the full source column width. */
html:is([data-site-locale="en"], [data-site-locale="es"], [data-site-locale="pt"], [data-site-locale="fr"], [data-site-locale="de"], [data-site-locale="th"]) #site-header .dropdown.mega-lab .mega-column .mega-section-link strong {
  white-space: normal;
  text-wrap: wrap;
  overflow-wrap: anywhere;
  max-width: 100%;
}
/* Keep long localized headings and menu items within their existing containers. */
html:is([data-site-locale="es"], [data-site-locale="pt"], [data-site-locale="fr"], [data-site-locale="de"], [data-site-locale="th"]) :is(
  .hero-copy .personal-title > span,
  .story-card.is-active .story-slogan,
  .trust-title,
  .about-hero .h-display,
  .inline-solution-head .v136-banner-copy h1,
  .cloud-experience-page.r10-page .r10-agent-card h3,
  #site-header .dropdown.mega-hpc .mega-links a
) {
  white-space: normal;
  word-break: normal;
  overflow-wrap: anywhere;
  hyphens: auto;
}
html:is([data-site-locale="es"], [data-site-locale="pt"], [data-site-locale="fr"], [data-site-locale="de"]) .trust-title > span + span::before {
  content: " ";
}
html[data-site-locale="ja"] :is(
  #product-reveal-title,
  #contact-title,
  .stories-title > span,
  .about-hero .h-display,
  #page-lab h2.h2,
  #page-lab .lab-hero .h1,
  #page-hpc .hpc-hero-grid .h1,
  #page-hpc .sec-head .h2
) {
  white-space: normal;
  word-break: normal;
  overflow-wrap: anywhere;
}
#page-butterfly .r8-core-cycle {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
:is(
  #page-butterfly .r8-core-cycle li,
  #page-butterfly .bf-points b,
  #page-butterfly .bf-compare li > b,
  .enterprise-solution-card > strong,
  .enterprise-solution-card > p,
  #spSheet .hd h3,
  #spSheet .bd .h2
) {
  white-space: normal;
  word-break: normal;
  overflow-wrap: anywhere;
  hyphens: auto;
}
html[data-site-locale="de"] :is(
  .footer-navigation a,
  .s7-data-explorer dt,
  .wb9-capture-bay dt,
  .pd-list li > b,
  .r8-data-domains small,
  .bf-eff .row > span
) {
  white-space: normal;
  overflow-wrap: anywhere;
  hyphens: auto;
}
@media (min-width: 481px) and (max-width: 760px) {
  #page-butterfly .r8-core-cycle {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (max-width: 500px) {
  .cloud-experience-page.r10-page .r10-work-topbar {
    flex-wrap: wrap;
    align-content: center;
    row-gap: 4px;
  }
  #spSheet .hd {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 16px;
  }
  #spSheet .hd .lv {
    grid-row: 2;
    justify-self: start;
  }
  #spSheet .hd .x2 {
    grid-column: 2;
    grid-row: 1;
  }
}
@media (max-width: 700px) {
  html[data-site-locale]:not([data-site-locale="zh-CN"], [data-site-locale="zh-Hant"]) #enterprise-tax-cloud .inline-phrases {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  html[data-site-locale]:not([data-site-locale="zh-CN"], [data-site-locale="zh-Hant"]) #enterprise-tax-cloud .inline-phrases > span {
    white-space: normal;
    overflow-wrap: anywhere;
  }
}
@media (max-width: 760px) {
  /* Hidden Chinese line breaks would concatenate words in the translated title. */
  html:is([data-site-locale="es"], [data-site-locale="pt"], [data-site-locale="fr"], [data-site-locale="de"], [data-site-locale="th"]) .about-hero .h-display br {
    display: initial;
  }
}
@media (max-width: 620px) {
  /* Reserve space for the two controls after masking the Chinese wordmark.
     Only the empty right edge of the wrapper changes; the image stays in place. */
  html[data-site-locale]:not([data-site-locale="zh-CN"], [data-site-locale="zh-Hant"]) #site-header .nav {
    gap: 12px;
  }
  html[data-site-locale]:not([data-site-locale="zh-CN"], [data-site-locale="zh-Hant"]) #site-header .brand-wordmark-v44 {
    width: 110px;
  }
}

/* Longer Russian copy and joined Arabic words can wrap within their source
   menu, hero, and card widths without changing the grids or type scale. */
html:is([data-site-locale="ru"], [data-site-locale="ar"]) :is(
  .hero-copy .personal-title > span,
  .story-card.is-active .story-slogan,
  .trust-title,
  .about-hero .h-display,
  .inline-solution-head .v136-banner-copy h1,
  .cloud-experience-page.r10-page .r10-agent-card h3,
  #site-header .dropdown.mega-lab .mega-column .mega-section-link strong,
  #site-header .dropdown .mega-links a,
  .footer-navigation a,
  .s7-data-explorer dt,
  .wb9-capture-bay dt,
  .pd-list li > b,
  .r8-data-domains small,
  .bf-eff .row > span
) {
  white-space: normal;
  text-wrap: wrap;
  word-break: normal;
  overflow-wrap: anywhere;
  hyphens: auto;
}
html:is([data-site-locale="ru"], [data-site-locale="ar"]) .trust-title > span + span::before {
  content: " ";
}
@media (max-width: 760px) {
  html:is([data-site-locale="ru"], [data-site-locale="ar"]) .about-hero .h-display br {
    display: initial;
  }
}
