html[data-sb-language] {
  --sb-section-title: 33px;
  --sb-content-title: 22px;
  --sb-section-leading: 1.15;
  --sb-content-leading: 1.22;
  --sb-copy-leading: 1.45;
  --sb-reference-copy-size: 17px;
  --sb-reference-copy-leading: 1.38;
  --sb-heading-gap: 6px;
  --sb-button-radius: 8px;
  --sb-button-padding: 8px 14px;
}

/* Page actions share the same shape. Menus, tabs and icon controls have their own affordances. */
html[data-sb-language] body #sanbo-site[data-page] :is(
  .sb-all-products,
  .tm-button,.solid-button,.quality-button,.catalog-purchase,.catalog-button,.detail-button,
  .sx-button,.sx-batch-submit,.tp-button,.circle-cta,.hero-guide
),
html[data-sb-language] body #sanbo-header.sb-header[data-sb-chrome] .sb-contact,
html[data-sb-language] body .ab :is(.ab-pause,.ab-card-copy > a,.ab-contact article > a) {
  box-sizing: border-box;
  height: auto !important;
  min-height: 36px !important;
  padding: var(--sb-button-padding) !important;
  border-radius: var(--sb-button-radius) !important;
  line-height: 1.25 !important;
}

html[data-sb-language] body #sanbo-header.sb-header[data-sb-chrome] .sb-language summary {
  border-radius: var(--sb-button-radius);
}

html[data-sb-language] body #sanbo-site[data-page="project"] main .closing .circle-cta {
  width: fit-content;
  min-width: 0;
  align-self: start;
  gap: 8px;
  aspect-ratio: auto;
}

html[data-sb-language] body :is(#sanbo-site[data-page], .ab) h2:where(
  :not(.hero h2,.ab-eyebrow,.sb-blog-card h2,.sb-blog-body h2,.guide-section h2,.guide-sidebar h2,
    .contact-form-heading h2,.contact-guide h2,.detail-info h2,.detail-facts h2,.sb-typical h2,.policy-body h2)
) {
  /* Override the type sizes baked into the older individual templates. */
  font-size: var(--sb-section-title) !important;
  line-height: var(--sb-section-leading) !important;
  text-wrap: balance;
}

html[data-sb-language] body :is(#sanbo-site[data-page], .ab) :is(
  h3:where(:not(.catalog-card h3,.sb-featured-card h3)),
  .sb-blog-card h2,.sb-blog-body h2,.guide-section h2,.guide-sidebar h2,
  .contact-form-heading h2,.contact-guide h2,.detail-info h2,.detail-facts h2,.sb-typical h2,.policy-body h2
) {
  font-size: var(--sb-content-title) !important;
  line-height: var(--sb-content-leading) !important;
}

html[data-sb-language] body :is(#sanbo-site[data-page], .ab) :is(
  .tm-kicker,.quality-kicker,.sx-kicker,.tp-kicker,.section-label,.ab-eyebrow,
  .sb-blog-kicker,.sb-featured > header > p:first-child
):has(+ :is(h1,h2)) {
  margin-block-end: var(--sb-heading-gap) !important;
  line-height: 1.22 !important;
}

html[data-sb-language] body :is(#sanbo-site[data-page], .ab) :is(
  .tm-intro,.quality-hero,.quality-section-head,.sx-section-head,.sx-mfg-hero,.tp-hero-copy,
  .page-intro,.ab-section-head,.contact-intro,.catalog-intro,.sb-blog-intro,.sb-featured > header
) > :is(h1,h2):has(+ p) {
  margin-block-start: 0 !important;
  margin-block-end: var(--sb-heading-gap) !important;
}

html[data-sb-language] body :is(#sanbo-site[data-page], .ab) p:where(
  :not(.hero p,.sb-mobile-hero p,.tm-kicker,.quality-kicker,.sx-kicker,.tp-kicker,
    .section-label,.ab-eyebrow,.sb-blog-kicker,.detail-model,.ab-statement)
) {
  line-height: var(--sb-copy-leading) !important;
}

html[data-sb-language] body #sanbo-site[data-page] main :is(.sb-blog-body,.guide-content,.policy-body) p {
  line-height: 1.5 !important;
}

html[data-sb-language] body #sanbo-site[data-page] :is(#corp-inquiry,#sx-batch-form) :is(input,textarea)::placeholder {
  opacity: 0;
}

html[data-sb-language] body #sanbo-site[data-page="custom-manufacturing"] .sx-two:has(.sx-spec-list) .sx-kicker {
  margin-block-end: 3px !important;
}

html[data-sb-language="en"] body #sanbo-site[data-page="custom-manufacturing"] .sx-two:has(.sx-spec-list) h2::first-letter {
  text-transform: uppercase;
}

html[data-sb-language] body #sanbo-site[data-page="custom-manufacturing"] .sx-two:has(.sx-spec-list) :is(.sx-section-head + p,.sx-rows article p),
html[data-sb-language] body .ab :is(.ab-section-head p:not(.ab-eyebrow,.ab-note),.ab-card-copy p:not(.ab-eyebrow),.ab-process-copy header > p:last-child,.ab-process-steps p,.ab-contact article p),
html[data-sb-language] body .sb-about-hero-copy > p {
  font-size: var(--sb-reference-copy-size);
  line-height: var(--sb-reference-copy-leading) !important;
}

html[data-sb-language] body #sanbo-site[data-page="custom-manufacturing"] .sx-two:has(.sx-spec-list) .sx-rows h3 {
  margin-block-end: 7px;
}

html[data-sb-language] body #sanbo-site[data-page="projects"] section[aria-labelledby="projects-planning"] {
  grid-template-columns: minmax(0, .86fr) minmax(0, 1.14fr);
}

html[data-sb-language] body #sanbo-site[data-page="projects"] section[aria-labelledby="projects-planning"] .quality-rows > div {
  grid-template-columns: minmax(var(--sb-project-label-width, 10.75rem), 28%) minmax(0, 1fr);
  column-gap: 16px;
  align-items: start;
}

html[data-sb-language="es"] body #sanbo-site[data-page="projects"] section[aria-labelledby="projects-planning"] {
  --sb-project-label-width: 12.25rem;
}

html[data-sb-language] body #sanbo-site[data-page="projects"] section[aria-labelledby="projects-planning"] .quality-rows :is(dt,dd) {
  min-width: 0;
  overflow-wrap: break-word;
  line-height: var(--sb-reference-copy-leading);
}

@media (1120px < width <= 1280px) {
  html[data-sb-language] body #sanbo-site[data-page="projects"] section[aria-labelledby="projects-planning"] {
    grid-template-columns: minmax(0, .72fr) minmax(0, 1.28fr);
  }
}

@media (max-width: 1120px) {
  html[data-sb-language] body #sanbo-site[data-page="projects"] section[aria-labelledby="projects-planning"] {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }
}

html[data-sb-language] body .ab {
  --sb-copy-leading: var(--sb-reference-copy-leading);
}

html[data-sb-language] body :is(.sb-about-hero h1,.ab h2:not(.ab-eyebrow),.ab h3) {
  font-family: "Plus Jakarta Sans", system-ui, "Microsoft YaHei", sans-serif;
  font-weight: 600;
}

html[data-sb-language] body .sb-about-hero h1 {
  margin-block: 6px 12px;
  line-height: var(--sb-section-leading);
  text-wrap: balance;
}

html[data-sb-language] body .ab .ab-statement {
  margin-block-start: 8px;
  font: 400 var(--sb-section-title)/1.3 system-ui, "Microsoft YaHei", sans-serif;
  text-wrap: pretty;
}

html[data-sb-language] body .ab :is(.ab-section-head,.ab-process-copy > header) .ab-eyebrow + h2 {
  margin-block: 0 8px !important;
}

html[data-sb-language] body .ab :is(.ab-card-copy,.ab-process-steps,.ab-contact article) h3 {
  margin-block-end: 7px;
}

html[data-sb-language] body .ab :is(.ab-card-copy > a,.ab-contact article > a) {
  display: inline-flex;
  align-items: center;
  border: 1px solid #737d80;
  text-decoration: none;
}

html[data-sb-language] body .ab :is(.ab-card-copy > a,.ab-contact article > a):hover {
  background-color: #343c3e;
}

html[data-sb-language] body .ab .ab-pause {
  font-family: inherit;
}

html[data-sb-language] body .ab .ab-controls button {
  border-radius: var(--sb-button-radius);
}

html[data-sb-language] body #sanbo-site[data-page="home"] .tm-applications .tm-tabs {
  display: none;
}

html[data-sb-language] body .ab .ab-carousel {
  width: min(calc(100% - 120px), 1040px);
}

html[data-sb-language] body .ab .ab-controls {
  z-index: 1;
  inset-inline: -58px;
  top: calc(var(--ab-photo-height) / 2);
}

html[data-sb-language] body .ab .ab-controls button {
  border-color: #aebbc3;
  background: #252d33;
}

html[data-sb-language] body .ab .ab-controls button:hover {
  background: #495862;
}

html[data-sb-language] body .ab .ab-card-copy {
  text-align: center;
}

html[data-sb-language] body .ab .ab-card-copy > p {
  max-inline-size: 64ch;
  margin-inline: auto;
}

html[data-sb-language] body #sanbo-site[data-page="packaging-logistics"] .quality-panel .quality-rows > div {
  grid-template-columns: minmax(0, 43fr) minmax(0, 57fr);
  column-gap: clamp(18px, 2.1vw, 32px);
  align-items: start;
}

html[data-sb-language] body #sanbo-site[data-page="packaging-logistics"] .quality-panel .quality-rows :is(dt,dd) {
  min-width: 0;
  overflow-wrap: break-word;
  line-height: var(--sb-reference-copy-leading);
}

html[data-sb-language]:has(#sanbo-site[data-page="certifications"]) {
  scroll-behavior: auto;
}

html[data-sb-language] body #sanbo-site.corp-site.inner-site.tp-site.tc-site[data-page="certifications"] {
  --sb-document-width: min(1440px, calc(100% - clamp(48px, 10vw, 144px)));
  --sb-document-gap: clamp(16px, 1.8vw, 26px);
  --sb-document-muted: #4d5c67;
  color: #23282c;
  background: #f3f3f5;

  & main {
    padding: calc(var(--sb-language-header, 94px) + 42px) 0 52px;
  }

  & :is(.tp-hero,.tc-download,.tp-heading,.tc-doc-grid,.tc-faq,.tc-newsletter) {
    width: var(--sb-document-width);
    max-width: none;
    margin-inline: auto;
  }

  & :is(.tp-grid,.tc-paper) {
    display: none;
  }

  & :is(.tp-in,.tc-reveal) {
    opacity: 1;
    transform: none;
    transition: none;
  }

  & .tp-hero {
    display: block;
    height: auto;
    min-height: 0;
    padding: 0 0 24px;
    background: none;
    text-align: start;
  }

  & .tp-hero-copy {
    position: static;
    width: auto;
    padding: 0;
    transform: none;
    text-align: inherit;
  }

  & .tp-hero h1 {
    max-inline-size: 30ch;
    margin: 0 0 8px;
    font-size: clamp(38px, 3.5vw, 54px);
    line-height: 1.12;
    color: inherit;
  }

  & :is(h1,h2,h3) {
    font-family: system-ui, "Microsoft YaHei", sans-serif;
    font-weight: 650;
  }

  & :is(.tp-hero .tp-lead,.tc-download p,.tc-doc-grid p,.tc-faq p,.tc-newsletter p) {
    color: var(--sb-document-muted);
    font-size: 17px;
    line-height: var(--sb-copy-leading);
  }

  & .tp-hero .tp-lead {
    max-inline-size: 65ch;
    margin: 0;
  }

  & .tp-kicker {
    margin: 0 0 5px;
    color: #50616d;
    font: 650 13px/1.22 system-ui, sans-serif;
    letter-spacing: .04em;
  }

  & :is(.tc-download,.tc-doc-grid article,.tc-faq > div:last-child,.tc-newsletter) {
    border: 0;
    border-radius: 28px;
    background: #fff;
    box-shadow: 0 5px 16px #171c2510;
  }

  & :is(.tc-download,.tc-newsletter) {
    display: block;
    min-height: 0;
    padding: clamp(22px, 2.5vw, 36px);
    clip-path: none;
  }

  & .tc-download {
    margin-block: 0 44px;
  }

  & .tc-download > div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 20px;
  }

  & .tc-download > div > :not(.tp-button) {
    grid-column: 1;
  }

  & .tc-download .tp-button {
    grid-column: 2;
    grid-row: 1 / span 3;
    align-self: center;
  }

  & :is(.tc-download h3,.tc-faq h2,.tc-newsletter h2) {
    margin: 0 0 8px;
    color: inherit;
  }

  & :is(.tc-download p:not(.tp-kicker),.tc-newsletter p:not(.tp-kicker)) {
    max-inline-size: 66ch;
    margin: 0 0 12px;
  }

  & .tp-heading {
    padding: 0;
    margin-block: 0 16px;
    text-align: start;
  }

  & .tp-heading h2 {
    max-inline-size: none;
    margin: 0;
  }

  & .tc-doc-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--sb-document-gap);
    padding: 0;
  }

  & .tc-doc-grid article {
    min-height: 0;
    min-width: 0;
    padding: clamp(18px, 2vw, 28px);
  }

  & .tc-doc-grid article > span {
    margin-bottom: 10px;
    color: #546570;
    font: 650 12px/1.2 system-ui, sans-serif;
  }

  & .tc-doc-grid h3 {
    margin: 0 0 7px;
    overflow-wrap: anywhere;
  }

  & .tc-doc-grid small {
    margin: auto 0 0;
    padding-block: 12px;
    color: var(--sb-document-muted);
    font-size: 12px;
    line-height: 1.32;
  }

  & :is(.tp-button,.tc-doc-grid .tp-link) {
    display: inline-flex;
    width: fit-content;
    max-width: 100%;
    min-height: 36px;
    margin: 0;
    padding: var(--sb-button-padding);
    align-items: center;
    border: 1px solid #343c43;
    border-radius: var(--sb-button-radius);
    background: #343c43;
    color: #fff;
    font: 600 13px/1.25 system-ui, sans-serif;
    text-decoration: none;
    white-space: normal;
  }

  & .tc-doc-grid .tp-link {
    border-color: #c7cdd2;
    background: #f3f4f5;
    color: #28333b;
  }

  & :is(.tp-button,.tc-doc-grid .tp-link):hover {
    background: #222a30;
    color: #fff;
  }

  & .tc-faq {
    grid-template-columns: minmax(0, .65fr) minmax(0, 1.35fr);
    gap: var(--sb-document-gap);
    padding: 0;
    margin-block: 44px;
  }

  & .tc-faq > div:last-child {
    padding: 8px 24px;
  }

  & .tc-faq details:last-child {
    border-bottom: 0;
  }

  & .tc-faq summary {
    gap: 12px;
    padding: 12px 0;
    color: #23282c;
    font-size: 16px;
    font-weight: 650;
    line-height: 1.25;
  }

  & .tc-faq summary span {
    color: #546570;
    font-size: 21px;
  }

  & .tc-faq details p {
    padding: 0 0 12px;
  }

  & .tc-newsletter {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
  }

  & .tc-newsletter .tp-button {
    flex: 0 0 auto;
    max-width: 45%;
  }
}
