/* Approved website refinements, 2026-10-20. */
body #masthead.site-header {
  width: 100% !important;
  max-width: none !important;
  margin-inline: 0 !important;
}

body.sf-ui.sf-ui--home .sf-ui__hero {
  /* Keep the full 22px slide transition inside the text gutter as well. */
  --sf-site-copy-inset: max(0px, calc(88px - (var(--sf-site-viewport, 100vw) - 100%) / 2));
  grid-template-areas: "copy" "stats";
}

body.sf-ui.sf-ui--home .sf-ui__hero-copy {
  width: auto;
  max-width: 760px;
  margin-inline: var(--sf-site-copy-inset);
}

body.sf-ui.sf-ui--home .sf-ui__home-carousel-stories {
  position: relative;
  inset: auto;
  grid-area: copy;
  display: grid;
  align-self: start;
  margin-inline: var(--sf-site-copy-inset);
}

body.sf-ui.sf-ui--home .sf-ui__home-story {
  position: relative;
  inset: auto;
  grid-area: 1 / 1;
  width: min(720px, 100%);
}

body.sf-ui.sf-ui--home .sf-ui__home-carousel-controls {
  position: absolute;
  top: 50%;
  right: calc((100% - var(--sf-site-viewport, 100vw)) / 2 + 16px);
  bottom: auto;
  left: calc((100% - var(--sf-site-viewport, 100vw)) / 2 + 16px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0;
  padding: 0;
  transform: translateY(-50%);
}

body.sf-ui.sf-ui--home .sf-ui__home-carousel-controls[hidden] {
  display: none;
}

body.sf-ui.sf-ui--home .sf-ui__task-card::before {
  left: 0;
}

/* Company and address share the first contact column, above the old blank row. */
body.sf-ui.sf-ui--contact .sf-ui__contact-identity {
  min-width: 0;
  padding: 18px 20px;
}

body.sf-ui.sf-ui--contact .sf-ui__contact-identity > p {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 15px;
  line-height: 1.65;
}

body.sf-ui.sf-ui--contact .sf-ui__contact-identity > p + p {
  margin-top: 12px;
}

body.sf-ui.sf-ui--contact .sf-ui__contact-identity + p {
  border-left: 1px solid rgba(189, 221, 241, .2);
}

@media (max-width: 760px) {
  body.sf-ui.sf-ui--home .sf-ui__hero {
    --sf-site-copy-inset: max(0px, calc(56px - (var(--sf-site-viewport, 100vw) - 100%) / 2));
  }
  body.sf-ui.sf-ui--contact .sf-ui__contact-identity {
    padding: 14px 0;
  }
  body.sf-ui.sf-ui--contact .sf-ui__contact-identity + p {
    border-top: 1px solid rgba(189, 221, 241, .2);
    border-left: 0;
  }
}

/* Same header geometry on modern, product and legacy article pages. */
body.sf-approved-header #masthead { position: relative !important; z-index: 120 !important; background: #082843 !important; border-bottom: 1px solid rgba(139,184,218,.24) !important; }
body.sf-approved-header #masthead .inside-header { width: min(100% - clamp(40px,6vw,80px),1200px) !important; max-width: 1200px !important; min-height: 76px !important; margin-inline: auto !important; padding: 11px 0 !important; }
body.sf-approved-header .site-logo, body.sf-approved-header .sfchem-v6-logo-link { display: flex !important; align-items: center !important; position: relative !important; }
body.sf-approved-header .site-logo { z-index: 140 !important; }
body.sf-approved-header .sfchem-v6-logo-link { width: max-content !important; max-width: 100% !important; }
body.sf-approved-header #masthead .sfchem-v6-logo { display: block !important; height: 54px !important; width: auto !important; max-width: none !important; }
body.sf-approved-header .sfchem-v6-logo > g[fill="#FFFFFF"] { transform: translateY(6px) !important; }
body.sf-approved-header #masthead .sfchem-v6-brand-mark { position: absolute !important; top: 44px !important; left: 8.1952% !important; width: max-content !important; transform: translateX(-50%) !important; color: #D8E8F4 !important; font-size: 9px !important; font-weight: 600 !important; line-height: 1 !important; letter-spacing: .06em !important; white-space: nowrap !important; }
body.sf-approved-header #masthead .sfchem-v6-brand-mark sup { position: absolute !important; top: 0 !important; left: 100% !important; margin-left: 1px !important; font-size: 6px !important; line-height: 1 !important; }
body.sf-approved-header #site-navigation { position: relative !important; z-index: 130 !important; pointer-events: none !important; min-height: 76px !important; margin-top: -76px !important; border: 0 !important; background: transparent !important; }
body.sf-approved-header #site-navigation :is(a,button,.dropdown-menu-toggle,.sub-menu) { pointer-events: auto !important; }
body.sf-approved-header #site-navigation .inside-navigation { width: min(100% - clamp(40px,6vw,80px),1200px) !important; max-width: 1200px !important; min-height: 76px !important; margin-inline: auto !important; padding-left: clamp(260px,27vw,360px) !important; justify-content: flex-end !important; }
/* Legacy links add 20px above and below the 76px line, creating a white band. */
body.sf-approved-header #site-navigation .main-nav > ul > li > a { min-height: 76px !important; padding: 0 clamp(11px,1.15vw,17px) !important; color: #D8E8F4 !important; font-size: 16px !important; font-weight: 600 !important; line-height: 76px !important; }
body.sf-approved-header #site-navigation .sfchem-lang-switch { display: none !important; }
body.sf-approved-header #site-navigation .menu-toggle { color: #fff !important; }

/* An explicit pause control keeps automatic playback easy to discover. */
body.sf-ui.sf-ui--home .sf-ui__home-carousel-controls { inset-block: 0; transform: none; display: block; }
body.sf-ui.sf-ui--home .sf-ui__carousel-button { position: absolute; top: 50%; transform: translateY(-50%); }
body.sf-ui.sf-ui--home [data-sf-carousel-action="previous"] { left: 0; }
body.sf-ui.sf-ui--home [data-sf-carousel-action="next"] { right: 0; }
body.sf-ui.sf-ui--home .sf-ui__carousel-toggle { display: block; position: absolute; top: 8px; right: 0; pointer-events: auto; border: 1px solid rgba(225,241,250,.5); background: rgba(4,29,50,.72); }

body #know-sifang > h3:nth-of-type(2) { margin-top: 28px; }
body #sfchem-ai-panel { max-height: calc(100vh - 106px); max-height: calc(100dvh - 106px); }
body #sfchem-ai-panel .sfchem-ai-header { flex-shrink: 0; }
body #sfchem-ai-panel .sfchem-ai-body { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
body .generate-back-to-top { bottom: 96px !important; }

@font-face { font-family: "SF Local Digits"; src: local("Arial"); unicode-range: U+0030-0039; font-display: swap; }

@media (min-width: 1025px) {
  body.sf-approved-header #site-navigation .menu-toggle { display: none !important; }
}
@media (max-width: 1024px) {
  body.sf-approved-header #masthead .inside-header { width: calc(100% - 32px) !important; min-height: 68px !important; }
  body.sf-approved-header #site-navigation { min-height: 68px !important; margin-top: -68px !important; }
  body.sf-approved-header #site-navigation .inside-navigation { display: block !important; width: calc(100% - 32px) !important; min-height: 68px !important; padding-left: 0 !important; }
  body.sf-approved-header #site-navigation .menu-toggle { display: flex !important; box-sizing: border-box !important; align-items: center !important; justify-content: center !important; width: 72px !important; height: 48px !important; min-height: 48px !important; margin: 10px 0 10px auto !important; padding: 0 !important; border: 1px solid #B9CEE0 !important; border-radius: 10px !important; background: rgba(8,40,67,.92) !important; font-size: 14px !important; line-height: 1 !important; }
  body.sf-approved-header #site-navigation .main-nav, body.sf-approved-header #site-navigation .main-nav > ul { display: none !important; }
  body.sf-approved-header #site-navigation.toggled .main-nav, body.sf-approved-header #site-navigation.toggled .main-nav > ul { display: block !important; }
  body.sf-approved-header #site-navigation.toggled .main-nav > ul > li { display: block !important; float: none !important; width: 100% !important; }
  body.sf-approved-header #site-navigation .main-nav > ul > li > a { min-height: 44px !important; padding: 0 18px !important; border-top: 1px solid rgba(139,184,218,.2) !important; background: #0B304F !important; color: #E5F0F8 !important; line-height: 44px !important; }
}
@media (max-width: 760px) {
  body.sf-approved-header #masthead .inside-header, body.sf-approved-header #site-navigation .inside-navigation { width: calc(100% - 24px) !important; }
  body.sf-approved-header #masthead .sfchem-v6-logo { height: 43px !important; }
  body.sf-approved-header #masthead .sfchem-v6-brand-mark { top: 35px !important; font-size: 7.5px !important; }
  body.sf-approved-header #masthead .sfchem-v6-brand-mark sup { font-size: 5px !important; }
  body.sf-ui.sf-ui--home .sf-ui__carousel-button { width: 36px; height: 44px; font-size: 26px; }
  body.sf-ui.sf-ui--home .sf-ui__home-story { transform: none; transition: opacity 420ms ease; }
  body.sf-ui.sf-ui--home .sf-ui__home-carousel > .sf-ui__hero-copy { transform: none; transition: opacity 420ms ease; }
  body #sfchem-ai-panel { max-height: calc(100vh - 96px); max-height: calc(100dvh - 96px); }
}

body.sf-approved-header #masthead { border-top: 0 !important; }
body.sf-approved-header #masthead .inside-header { box-sizing: border-box !important; display: flex !important; align-items: center !important; flex-wrap: nowrap !important; justify-content: flex-start !important; }
body.sf-approved-header #masthead .inside-header::before, body.sf-approved-header #masthead .inside-header::after { display: none !important; content: none !important; }
body.sf-approved-header #site-navigation .main-nav > ul::after { display: none !important; content: none !important; }
