/*
 * ShuiYiYuan main-site M1 EN/ZH homepage layout sample.
 *
 * This stylesheet is intentionally isolated from the P1 candidate and is
 * loaded only by the two sample homepages. It adapts the existing visual
 * system to independently authored English and Chinese copy while preserving
 * the approved production layout and factual boundaries.
 */

html:has(> body.m1-home-sample) >
  body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"] {
  --m1-card-gap: clamp(14px, 1.4vw, 24px);
  --m1-card-pad: clamp(18px, 1.8vw, 28px);
  --m1-section-gap: clamp(24px, 2.5vw, 42px);
}

html:has(> body.m1-home-sample) >
  body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"] *,
html:has(> body.m1-home-sample) >
  body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"] *::before,
html:has(> body.m1-home-sample) >
  body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"] *::after {
  box-sizing: border-box;
}

html:has(> body.m1-home-sample) >
  body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
  :is(
    .site-header,
    .site-nav,
    .header-tools,
    main,
    main > section,
    .hero-content,
    .hero-proof,
    .process-ribbon-copy,
    .process-flow,
    .section-head,
    .tech-summary-panel,
    .tech-copy,
    .tech-checks,
    .buyer-grid,
    .service-grid-six,
    .service-card,
    .capability-strip,
    .capability-grid,
    .specs-layout,
    .spec-table,
    .application-topic-grid,
    .project-grid,
    .project-feature,
    .project-feature-copy,
    .project-mini-grid,
    .faq-grid,
    .contact-copy,
    .quote-form,
    .site-footer,
    .footer-legal
  ),
html:has(> body.m1-home-sample) >
  body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
  :is(
    .hero-proof,
    .process-flow,
    .tech-summary-panel,
    .tech-checks,
    .buyer-grid,
    .service-grid-six,
    .capability-strip,
    .capability-grid,
    .spec-table,
    .application-topic-grid,
    .project-grid,
    .project-mini-grid,
    .faq-grid,
    .quote-form
  ) > * {
  min-width: 0 !important;
  max-width: 100% !important;
}

html:has(> body.m1-home-sample) >
  body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
  :is(
    h1,
    h2,
    h3,
    p,
    address,
    dt,
    dd,
    summary,
    .button,
    .site-nav a,
    .site-nav button,
    .hero-proof strong,
    .hero-proof small,
    .capability-strip strong,
    .capability-strip span,
    .spec-table span,
    .spec-table strong,
    .file-status,
    .form-note,
    .footer-legal
  ) {
  min-width: 0 !important;
  max-width: 100% !important;
  overflow-wrap: anywhere !important;
  word-break: normal !important;
}

html:has(> body.m1-home-sample) >
  body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
  :is(.button, button, .nav-cta, .file-picker-button, .form-fallback-actions a) {
  height: auto !important;
  min-height: 44px !important;
  max-height: none !important;
  white-space: normal !important;
}

html:has(> body.m1-home-sample) >
  body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
  .hero-actions .button {
  padding-block: 10px !important;
  overflow: visible !important;
}

/* Content-bearing cards must grow with the P1 factual copy. */
html:has(> body.m1-home-sample) >
  body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
  :is(
    .hero-content,
    .hero-proof > span,
    .process-ribbon,
    .process-flow > li,
    .tech-advantage,
    .tech-summary-panel > article,
    .tech-copy,
    .tech-checks,
    .tech-checks > article,
    .buyer-grid > article,
    .service-card,
    .service-card > div,
    .capability-strip,
    .capability-strip > div,
    .capability-grid > div,
    .specs-layout,
    .spec-table > div,
    .application-topic-grid > article,
    .application-topic-grid > article > div,
    .project-grid,
    .project-feature,
    .project-feature-copy,
    .project-mini-grid,
    .project-card,
    .faq-grid,
    .faq-grid > details,
    .contact,
    .contact-copy,
    .quote-form,
    .site-footer
  ) {
  height: auto !important;
  max-height: none !important;
}

html:has(> body.m1-home-sample) >
  body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
  :is(
    .hero-content,
    .hero-proof > span,
    .process-flow > li,
    .tech-advantage,
    .tech-summary-panel > article,
    .tech-copy,
    .tech-checks,
    .tech-checks > article,
    .buyer-grid > article,
    .service-card,
    .service-card > div,
    .capability-strip,
    .capability-strip > div,
    .capability-grid > div,
    .specs-layout,
    .spec-table > div,
    .application-topic-grid > article,
    .application-topic-grid > article > div,
    .project-grid,
    .project-feature-copy,
    .project-mini-grid,
    .project-card,
    .faq-grid,
    .faq-grid > details,
    .contact,
    .contact-copy,
    .quote-form,
    .site-footer
  ) {
  overflow: visible !important;
}

/* Hero: keep the established split composition, but let copy set the height. */
html:has(> body.m1-home-sample) >
  body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
  .hero {
  height: auto !important;
  min-height: clamp(650px, 43vw, 760px) !important;
  align-items: center !important;
}

html:has(> body.m1-home-sample) >
  body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
  .hero-content {
  align-self: center !important;
  padding-block: 10px !important;
}

html:has(> body.m1-home-sample) >
  body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
  .hero h1,
html:has(> body.m1-home-sample) >
  body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
  .hero h1 span {
  max-width: 100% !important;
  white-space: normal !important;
}

html:has(> body.m1-home-sample) >
  body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
  .hero h1 span {
  display: block !important;
}

html:has(> body.m1-home-sample) >
  body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
  .hero-proof {
  align-items: stretch !important;
  grid-auto-rows: auto !important;
}

html:has(> body.m1-home-sample) >
  body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
  .hero-proof > span {
  align-content: start !important;
  min-height: 108px !important;
  padding: 16px !important;
}

/* Technology review: reading summary, complete artwork and criteria stay distinct. */
html:has(> body.m1-home-sample) >
  body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
  #technology .tech-summary-panel {
  grid-auto-rows: auto !important;
  gap: 12px !important;
}

html:has(> body.m1-home-sample) >
  body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
  #technology .tech-summary-panel > article,
html:has(> body.m1-home-sample) >
  body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
  #technology .tech-checks > article {
  min-height: 0 !important;
  padding: clamp(16px, 1.45vw, 22px) !important;
}

html:has(> body.m1-home-sample) >
  body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
  #technology .tech-copy {
  grid-template-columns: minmax(0, 1.08fr) minmax(280px, .92fr) !important;
  grid-template-rows: auto auto !important;
  align-content: start !important;
  align-items: stretch !important;
  gap: 18px !important;
}

html:has(> body.m1-home-sample) >
  body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
  #technology .tech-copy > p {
  grid-column: 1 / -1 !important;
  margin-bottom: 4px !important;
}

html:has(> body.m1-home-sample) >
  body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
  #technology .tech-visual {
  grid-column: 1 !important;
  align-self: stretch !important;
  min-height: 0 !important;
  margin: 0 !important;
}

html:has(> body.m1-home-sample) >
  body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
  #technology .tech-visual img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  object-fit: contain !important;
  object-position: center !important;
}

html:has(> body.m1-home-sample) >
  body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
  #technology .tech-checks {
  grid-column: 2 !important;
  grid-auto-rows: auto !important;
  align-self: stretch !important;
  gap: 0 !important;
}

/* Services and application cards use content-led rows, never fixed copy boxes. */
html:has(> body.m1-home-sample) >
  body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
  #services .service-grid-six {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  align-items: stretch !important;
  gap: var(--m1-card-gap) !important;
}

html:has(> body.m1-home-sample) >
  body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
  #services .service-card {
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-rows: auto 1fr !important;
  align-content: start !important;
  min-height: 0 !important;
}

html:has(> body.m1-home-sample) >
  body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
  #services .service-card > .asset-picture,
html:has(> body.m1-home-sample) >
  body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
  #services .service-card > .asset-picture > img {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  aspect-ratio: 16 / 9 !important;
}

html:has(> body.m1-home-sample) >
  body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
  #services .service-card > .asset-picture {
  overflow: hidden !important;
}

html:has(> body.m1-home-sample) >
  body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
  #services .service-card > .asset-picture > img {
  object-fit: cover !important;
  object-position: center !important;
}

html:has(> body.m1-home-sample) >
  body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
  #services .service-card > div {
  align-content: start !important;
  min-height: 0 !important;
  padding: var(--m1-card-pad) !important;
}

/* Six headline values: the supporting condition must remain visible. */
html:has(> body.m1-home-sample) >
  body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
  main > section.metrics.capability-strip {
  align-items: stretch !important;
  gap: 12px !important;
  min-height: 0 !important;
  padding-block: 30px !important;
  overflow: visible !important;
}

html:has(> body.m1-home-sample) >
  body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
  main > section.metrics.capability-strip > div,
html:has(> body.m1-home-sample) >
  body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
  main > section.metrics.capability-strip > div:nth-of-type(n + 4) {
  align-content: start !important;
  min-height: 144px !important;
  padding: 22px !important;
  overflow: visible !important;
}

html:has(> body.m1-home-sample) >
  body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
  main > section.metrics.capability-strip strong {
  white-space: normal !important;
  line-height: 1.05 !important;
}

html:has(> body.m1-home-sample) >
  body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
  main > section.metrics.capability-strip span {
  display: block !important;
  line-height: 1.45 !important;
}

/* Trust and capability statements use an intentional, copy-safe grid. */
html:has(> body.m1-home-sample) >
  body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
  .capabilities .capability-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  align-items: stretch !important;
  gap: var(--m1-card-gap) !important;
}

html:has(> body.m1-home-sample) >
  body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
  .capabilities .capability-grid > div {
  align-content: start !important;
  min-height: 0 !important;
  padding: var(--m1-card-pad) !important;
}

/* Equipment facts: label and value tracks flex around long cycle conditions. */
html:has(> body.m1-home-sample) >
  body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
  #specs .specs-layout {
  grid-template-columns: minmax(300px, .36fr) minmax(0, 1fr) !important;
  grid-template-rows: auto 1fr !important;
  align-items: start !important;
  gap: 28px var(--home-master-column-gap, 54px) !important;
}

html:has(> body.m1-home-sample) >
  body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
  #specs .section-head {
  grid-column: 1 !important;
  grid-row: 1 !important;
}

html:has(> body.m1-home-sample) >
  body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
  #specs .specs-copy {
  grid-column: 1 !important;
  grid-row: 2 !important;
  align-self: start !important;
}

html:has(> body.m1-home-sample) >
  body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
  #specs .spec-table {
  grid-column: 2 !important;
  grid-row: 1 / span 2 !important;
  align-self: start !important;
}

html:has(> body.m1-home-sample) >
  body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
  #specs .spec-table > div {
  grid-template-columns: minmax(150px, .34fr) minmax(0, 1fr) !important;
  grid-template-rows: auto !important;
  align-items: center !important;
  gap: 18px !important;
  min-height: 72px !important;
  padding: 16px 20px !important;
}

/* Applications and public projects keep complete, readable card bodies. */
html:has(> body.m1-home-sample) >
  body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
  #applications .application-topic-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  grid-auto-rows: auto !important;
  align-items: stretch !important;
  gap: var(--m1-card-gap) !important;
}

html:has(> body.m1-home-sample) >
  body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
  #applications .application-topic-grid > article {
  grid-template-rows: auto 1fr !important;
  min-height: 0 !important;
}

html:has(> body.m1-home-sample) >
  body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
  #applications .application-topic-grid > article > :is(.asset-picture, .asset-picture > img) {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  aspect-ratio: 16 / 9 !important;
}

html:has(> body.m1-home-sample) >
  body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
  #applications .application-topic-grid > article > .asset-picture {
  overflow: hidden !important;
}

html:has(> body.m1-home-sample) >
  body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
  #applications .application-topic-grid > article > .asset-picture > img {
  object-fit: contain !important;
  object-position: center !important;
}

html:has(> body.m1-home-sample) >
  body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
  #applications .application-topic-grid > article > div {
  align-content: start !important;
  min-height: 0 !important;
  padding: clamp(17px, 1.45vw, 22px) !important;
}

html:has(> body.m1-home-sample) >
  body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
  #projects .project-feature {
  grid-template-columns: minmax(0, 1.06fr) minmax(340px, .94fr) !important;
  align-items: stretch !important;
  min-height: 0 !important;
}

html:has(> body.m1-home-sample) >
  body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
  #projects .project-feature figure {
  min-height: 0 !important;
}

html:has(> body.m1-home-sample) >
  body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
  #projects .project-feature figure img {
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  object-fit: contain !important;
  object-position: center !important;
}

html:has(> body.m1-home-sample) >
  body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
  #projects .project-feature-copy {
  align-content: center !important;
  min-height: 0 !important;
  padding: clamp(26px, 3vw, 48px) !important;
}

html:has(> body.m1-home-sample) >
  body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
  #projects .project-feature dl {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  height: auto !important;
  min-height: 0 !important;
  overflow: visible !important;
}

html:has(> body.m1-home-sample) >
  body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
  #projects .project-feature dl > div {
  min-width: 0 !important;
  height: auto !important;
  min-height: 0 !important;
  overflow: visible !important;
}

html:has(> body.m1-home-sample) >
  body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
  #projects .project-mini-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  align-items: stretch !important;
  gap: var(--m1-card-gap) !important;
}

/* RFQ: legal entity, address, file state and response terms must wrap cleanly. */
html:has(> body.m1-home-sample) >
  body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
  #contact .quote-form {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  grid-auto-rows: auto !important;
  align-content: start !important;
  align-items: start !important;
  gap: 18px !important;
  min-height: 0 !important;
}

html:has(> body.m1-home-sample) >
  body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
  #contact .quote-form :is(label, .wide, input, select, textarea, button) {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
}

html:has(> body.m1-home-sample) >
  body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
  #contact .quote-form .wide {
  grid-column: 1 / -1 !important;
}

html:has(> body.m1-home-sample) >
  body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
  #contact .file-picker-control,
html:has(> body.m1-home-sample) >
  body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
  #contact .form-fallback-actions {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 10px 14px !important;
  min-width: 0 !important;
}

html:has(> body.m1-home-sample) >
  body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
  #contact .file-status {
  flex: 1 1 220px !important;
}

/* Footer columns wrap instead of colliding around long legal names. */
html:has(> body.m1-home-sample) >
  body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
  .site-footer {
  grid-template-columns: minmax(220px, .85fr) auto minmax(390px, 1.35fr) !important;
  align-items: center !important;
  gap: 18px 30px !important;
}

html:has(> body.m1-home-sample) >
  body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
  .site-footer .footer-legal {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: flex-end !important;
  align-items: center !important;
  gap: 8px 16px !important;
  text-align: right !important;
}

/* Medium desktop/tablet: two-column cards and one-column reading modules. */
@media (min-width: 768px) and (max-width: 1439px) {
  html:has(> body.m1-home-sample) >
    body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
    .capabilities .capability-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  html:has(> body.m1-home-sample) >
    body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
    #applications .application-topic-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (min-width: 768px) and (max-width: 1180px) {
  html:has(> body.m1-home-sample) >
    body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
    .hero {
    grid-template-columns: minmax(0, 1fr) !important;
    min-height: 0 !important;
    gap: 36px !important;
  }

  html:has(> body.m1-home-sample) >
    body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
    .hero-content {
    order: 1 !important;
  }

  html:has(> body.m1-home-sample) >
    body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
    .hero-media {
    order: 2 !important;
    position: relative !important;
    inset: auto !important;
  }

  html:has(> body.m1-home-sample) >
    body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
    #technology .tech-copy {
    grid-template-columns: minmax(0, 1.05fr) minmax(260px, .95fr) !important;
  }

  html:has(> body.m1-home-sample) >
    body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
    #services .service-grid-six {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  html:has(> body.m1-home-sample) >
    body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
    #specs .specs-layout {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: auto !important;
  }

  html:has(> body.m1-home-sample) >
    body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
    #specs :is(.section-head, .specs-copy, .spec-table) {
    grid-column: 1 !important;
    grid-row: auto !important;
  }

  html:has(> body.m1-home-sample) >
    body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
    #projects .project-feature {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  html:has(> body.m1-home-sample) >
    body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
    .contact {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  html:has(> body.m1-home-sample) >
    body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
    .site-footer {
    grid-template-columns: minmax(220px, 1fr) auto !important;
  }

  html:has(> body.m1-home-sample) >
    body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
    .site-footer .footer-legal {
    grid-column: 1 / -1 !important;
    justify-content: flex-start !important;
    text-align: left !important;
  }
}

/* Mobile navigation is viewport-bound, scrollable and copy-safe. */
@media (max-width: 1180px) {
  html:has(> body.m1-home-sample) >
    body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
    .site-header.is-open .site-nav {
    position: absolute !important;
    top: calc(100% + 1px) !important;
    right: 12px !important;
    left: 12px !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    height: auto !important;
    max-height: calc(100dvh - 86px) !important;
    padding: 10px !important;
    overflow: auto !important;
  }

  html:has(> body.m1-home-sample) >
    body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
    .site-nav :is(a, button, strong, span) {
    min-width: 0 !important;
    max-width: 100% !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
  }

  html:has(> body.m1-home-sample) >
    body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
    .site-nav .site-nav-dropdown-menu {
    position: static !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: none !important;
  }
}

/* Phone: one readable content track, except compact proof and metric pairs. */
@media (max-width: 767.98px) {
  html:has(> body.m1-home-sample) >
    body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]:lang(en)
    .hero-proof {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  html:has(> body.m1-home-sample) >
    body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]:lang(en)
    .hero-proof > span {
    display: grid !important;
    grid-template-columns: 34px minmax(0, 1fr) !important;
    grid-template-rows: auto auto !important;
    align-items: center !important;
    gap: 3px 12px !important;
    min-height: 0 !important;
    padding: 14px 16px !important;
    hyphens: none !important;
  }

  html:has(> body.m1-home-sample) >
    body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]:lang(en)
    .hero-proof > span > svg {
    grid-column: 1 !important;
    grid-row: 1 / span 2 !important;
  }

  html:has(> body.m1-home-sample) >
    body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]:lang(en)
    .hero-proof > span > :is(strong, small) {
    grid-column: 2 !important;
    width: 100% !important;
    text-align: left !important;
    hyphens: none !important;
    overflow-wrap: normal !important;
  }

  html:has(> body.m1-home-sample) >
    body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]:lang(zh-CN)
    .hero h1,
  html:has(> body.m1-home-sample) >
    body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]:lang(zh-CN)
    .hero h1 span {
    font-size: clamp(27px, 7.4vw, 32px) !important;
    white-space: nowrap !important;
  }

  html:has(> body.m1-home-sample) >
    body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
    .hero {
    grid-template-columns: minmax(0, 1fr) !important;
    min-height: 0 !important;
    gap: 30px !important;
    overflow: visible !important;
  }

  html:has(> body.m1-home-sample) >
    body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
    .hero-content {
    order: 1 !important;
    padding-block: 0 !important;
    overflow: visible !important;
  }

  html:has(> body.m1-home-sample) >
    body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
    .hero-media {
    order: 2 !important;
    position: relative !important;
    inset: auto !important;
    overflow: visible !important;
  }

  html:has(> body.m1-home-sample) >
    body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
    .hero h1,
  html:has(> body.m1-home-sample) >
    body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
    .hero h1 span {
    font-size: clamp(30px, 8.2vw, 35px) !important;
    line-height: 1.16 !important;
  }

  html:has(> body.m1-home-sample) >
    body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
    .hero-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
    width: 100% !important;
  }

  html:has(> body.m1-home-sample) >
    body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
    .hero-actions .button {
    width: 100% !important;
    padding-inline: 12px !important;
  }

  html:has(> body.m1-home-sample) >
    body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
    .hero-proof {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  html:has(> body.m1-home-sample) >
    body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
    .hero-proof > span {
    min-height: 118px !important;
    padding: 14px 12px !important;
  }

  html:has(> body.m1-home-sample) >
    body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
    #technology .tech-copy {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: auto !important;
  }

  html:has(> body.m1-home-sample) >
    body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
    #technology .tech-copy > :is(p, .tech-visual, .tech-checks) {
    grid-column: 1 !important;
  }

  html:has(> body.m1-home-sample) >
    body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
    #technology .tech-visual img {
    height: auto !important;
  }

  html:has(> body.m1-home-sample) >
    body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
    :is(
      .buyer-grid,
      #services .service-grid-six,
      .capabilities .capability-grid,
      #applications .application-topic-grid,
      #projects .project-mini-grid,
      .faq-grid
    ) {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  html:has(> body.m1-home-sample) >
    body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
    main > section.metrics.capability-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    padding-block: 22px !important;
  }

  html:has(> body.m1-home-sample) >
    body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
    main > section.metrics.capability-strip > div,
  html:has(> body.m1-home-sample) >
    body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
    main > section.metrics.capability-strip > div:nth-of-type(n + 4) {
    min-height: 146px !important;
    padding: 18px 15px !important;
  }

  html:has(> body.m1-home-sample) >
    body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
    main > section.metrics.capability-strip strong {
    font-size: clamp(23px, 6.8vw, 28px) !important;
  }

  html:has(> body.m1-home-sample) >
    body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
    #specs .specs-layout {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: auto !important;
  }

  html:has(> body.m1-home-sample) >
    body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
    #specs :is(.section-head, .specs-copy, .spec-table) {
    grid-column: 1 !important;
    grid-row: auto !important;
  }

  html:has(> body.m1-home-sample) >
    body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
    #specs .spec-table > div {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 7px !important;
    min-height: 0 !important;
    padding: 15px 16px !important;
  }

  html:has(> body.m1-home-sample) >
    body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
    #projects .project-feature {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  html:has(> body.m1-home-sample) >
    body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
    #projects .project-feature figure img {
    height: auto !important;
  }

  html:has(> body.m1-home-sample) >
    body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
    #projects .project-feature-copy {
    align-content: start !important;
    padding: 24px 20px !important;
  }

  html:has(> body.m1-home-sample) >
    body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
    #projects .project-feature dl {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 8px !important;
  }

  html:has(> body.m1-home-sample) >
    body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
    #projects .project-feature dl > div {
    grid-template-columns: minmax(90px, .38fr) minmax(0, 1fr) !important;
    gap: 12px !important;
    padding: 12px 14px !important;
  }

  html:has(> body.m1-home-sample) >
    body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
    #contact .quote-form {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 16px !important;
  }

  html:has(> body.m1-home-sample) >
    body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
    #contact .quote-form .wide {
    grid-column: 1 !important;
  }

  html:has(> body.m1-home-sample) >
    body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
    .site-footer {
    grid-template-columns: minmax(0, 1fr) !important;
    align-items: start !important;
    gap: 16px !important;
    padding: 28px 18px !important;
  }

  html:has(> body.m1-home-sample) >
    body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
    .site-footer .footer-legal {
    justify-content: flex-start !important;
    text-align: left !important;
  }
}

/* A 360px screen cannot safely hold the longest metric values in two tracks. */
@media (max-width: 379.98px) {
  html:has(> body.m1-home-sample) >
    body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
    main > section.metrics.capability-strip {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  html:has(> body.m1-home-sample) >
    body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
    main > section.metrics.capability-strip > div,
  html:has(> body.m1-home-sample) >
    body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
    main > section.metrics.capability-strip > div:nth-of-type(n + 4) {
    min-height: 0 !important;
  }

  html:has(> body.m1-home-sample) >
    body.global-tech-page.m1-home-sample.m1-home-sample.m1-home-sample[data-page="home"]
    .hero-actions {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

/* Language-specific phone composition: English needs a full-width proof row,
 * while the shorter Chinese labels remain a compact two-column grid. */
@media (max-width: 767.98px) {
  html:has(> body.m1-home-sample[data-page="home"]) >
    body.global-tech-page.global-tech-page.global-tech-page.global-tech-page.global-tech-page.global-tech-page.m1-home-sample[data-page="home"]:lang(en)
    .hero-proof {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  html:has(> body.m1-home-sample[data-page="home"]) >
    body.global-tech-page.global-tech-page.global-tech-page.global-tech-page.global-tech-page.global-tech-page.m1-home-sample[data-page="home"]:lang(en)
    .hero-proof > span {
    display: grid !important;
    grid-template-columns: 34px minmax(0, 1fr) !important;
    grid-template-rows: auto auto !important;
    align-items: center !important;
    gap: 3px 12px !important;
    min-height: 0 !important;
    padding: 14px 16px !important;
    hyphens: none !important;
  }

  html:has(> body.m1-home-sample[data-page="home"]) >
    body.global-tech-page.global-tech-page.global-tech-page.global-tech-page.global-tech-page.global-tech-page.m1-home-sample[data-page="home"]:lang(en)
    .hero-proof > span > svg {
    grid-column: 1 !important;
    grid-row: 1 / span 2 !important;
  }

  html:has(> body.m1-home-sample[data-page="home"]) >
    body.global-tech-page.global-tech-page.global-tech-page.global-tech-page.global-tech-page.global-tech-page.m1-home-sample[data-page="home"]:lang(en)
    .hero-proof > span > :is(strong, small) {
    grid-column: 2 !important;
    width: 100% !important;
    text-align: left !important;
    hyphens: none !important;
    overflow-wrap: normal !important;
  }
}

/*
 * Final M1 hard gate. The production bundle contains late, repeated-class
 * selectors; mirror that weight here so the sample rules cannot be reversed
 * by the historic fixed-card patches loaded earlier.
 */
html:has(> body.m1-home-sample[data-page="home"]) >
  body.global-tech-page.global-tech-page.global-tech-page.global-tech-page.global-tech-page.global-tech-page.m1-home-sample[data-page="home"]
  .hero h1,
html:has(> body.m1-home-sample[data-page="home"]) >
  body.global-tech-page.global-tech-page.global-tech-page.global-tech-page.global-tech-page.global-tech-page.m1-home-sample[data-page="home"]
  .hero h1 span {
  display: block !important;
  height: auto !important;
  max-height: none !important;
  white-space: normal !important;
  overflow: visible !important;
}

html:has(> body.m1-home-sample[data-page="home"]) >
  body.global-tech-page.global-tech-page.global-tech-page.global-tech-page.global-tech-page.global-tech-page.m1-home-sample[data-page="home"]
  .hero .hero-content,
html:has(> body.m1-home-sample[data-page="home"]) >
  body.global-tech-page.global-tech-page.global-tech-page.global-tech-page.global-tech-page.global-tech-page.m1-home-sample[data-page="home"]
  .hero .hero-content > :is(.eyebrow, h1, .hero-copy, .hero-actions, .hero-proof) {
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
  animation: none !important;
  clip-path: none !important;
}

html:has(> body.m1-home-sample[data-page="home"]) >
  body.global-tech-page.global-tech-page.global-tech-page.global-tech-page.global-tech-page.global-tech-page.m1-home-sample[data-page="home"]
  main > section.metrics.capability-strip {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
}

html:has(> body.m1-home-sample[data-page="home"]) >
  body.global-tech-page.global-tech-page.global-tech-page.global-tech-page.global-tech-page.global-tech-page.m1-home-sample[data-page="home"]
  main > section.metrics.capability-strip > div,
html:has(> body.m1-home-sample[data-page="home"]) >
  body.global-tech-page.global-tech-page.global-tech-page.global-tech-page.global-tech-page.global-tech-page.m1-home-sample[data-page="home"]
  main > section.metrics.capability-strip > div:nth-of-type(n + 4) {
  height: auto !important;
  min-height: 144px !important;
  max-height: none !important;
  padding: 22px !important;
  overflow: visible !important;
}

html:has(> body.m1-home-sample[data-page="home"]) >
  body.global-tech-page.global-tech-page.global-tech-page.global-tech-page.global-tech-page.global-tech-page.m1-home-sample[data-page="home"]
  main > section.metrics.capability-strip :is(strong, span) {
  min-width: 0 !important;
  max-width: 100% !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  word-break: normal !important;
}

html:has(> body.m1-home-sample[data-page="home"]) >
  body.global-tech-page.global-tech-page.global-tech-page.global-tech-page.global-tech-page.global-tech-page.m1-home-sample[data-page="home"]
  main > section.metrics.capability-strip > div::before {
  top: 8px !important;
  right: 8px !important;
  bottom: auto !important;
  left: auto !important;
  width: 100px !important;
  height: 100px !important;
}

@media (max-width: 767.98px) {
  html:has(> body.m1-home-sample[data-page="home"]) >
    body.global-tech-page.global-tech-page.global-tech-page.global-tech-page.global-tech-page.global-tech-page.m1-home-sample[data-page="home"]
    .cookie-consent {
    right: 12px !important;
    bottom: 12px !important;
    left: 12px !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: calc(100% - 24px) !important;
    height: auto !important;
    max-height: calc(100dvh - 24px) !important;
    overflow: auto !important;
  }

  html:has(> body.m1-home-sample[data-page="home"]) >
    body.global-tech-page.global-tech-page.global-tech-page.global-tech-page.global-tech-page.global-tech-page.m1-home-sample[data-page="home"]
    .cookie-consent :is(.cookie-consent-copy, .cookie-consent-actions) {
    min-width: 0 !important;
    max-width: 100% !important;
  }

  html:has(> body.m1-home-sample[data-page="home"]) >
    body.global-tech-page.global-tech-page.global-tech-page.global-tech-page.global-tech-page.global-tech-page.m1-home-sample[data-page="home"]
    .cookie-consent-actions {
    display: flex !important;
    flex-wrap: wrap !important;
  }

  html:has(> body.m1-home-sample[data-page="home"]) >
    body.global-tech-page.global-tech-page.global-tech-page.global-tech-page.global-tech-page.global-tech-page.m1-home-sample[data-page="home"]
    main > section.metrics.capability-strip > div,
  html:has(> body.m1-home-sample[data-page="home"]) >
    body.global-tech-page.global-tech-page.global-tech-page.global-tech-page.global-tech-page.global-tech-page.m1-home-sample[data-page="home"]
    main > section.metrics.capability-strip > div:nth-of-type(n + 4) {
    min-height: 168px !important;
    padding: 18px 15px !important;
  }

  html:has(> body.m1-home-sample[data-page="home"]) >
    body.global-tech-page.global-tech-page.global-tech-page.global-tech-page.global-tech-page.global-tech-page.m1-home-sample[data-page="home"]
    main > section.metrics.capability-strip strong {
    font-size: clamp(21px, 6vw, 25px) !important;
    line-height: 1.12 !important;
  }
}

@media (max-width: 379.98px) {
  html:has(> body.m1-home-sample[data-page="home"]) >
    body.global-tech-page.global-tech-page.global-tech-page.global-tech-page.global-tech-page.global-tech-page.m1-home-sample[data-page="home"]
    main > section.metrics.capability-strip > div,
  html:has(> body.m1-home-sample[data-page="home"]) >
    body.global-tech-page.global-tech-page.global-tech-page.global-tech-page.global-tech-page.global-tech-page.m1-home-sample[data-page="home"]
    main > section.metrics.capability-strip > div:nth-of-type(n + 4) {
    min-height: 0 !important;
  }
}
