/* Independent masthead styles. Legacy logo selectors do not target these classes. */
.masthead-brand,
.masthead-brand-link,
.masthead-logo,
.masthead-copy,
.masthead-copy strong,
.masthead-copy small {
  position: static !important;
  margin-left: 0 !important;
  padding-left: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
  clip-path: none !important;
  filter: none !important;
  transform: none !important;
}

.masthead-brand {
  display: block !important;
  flex: 0 1 auto;
  min-width: 0;
  overflow: visible !important;
  background: transparent !important;
}

.masthead-brand::before,
.masthead-brand::after,
.masthead-brand-link::before,
.masthead-brand-link::after,
.masthead-logo::before,
.masthead-logo::after {
  content: none !important;
  display: none !important;
}

.masthead-brand-link {
  display: flex !important;
  align-items: center !important;
  gap: 11px !important;
  color: var(--navy) !important;
  text-decoration: none !important;
  line-height: 1 !important;
  background: transparent !important;
}

.masthead-brand-link {
  gap: 11px !important;
}

.masthead-logo {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  visibility: visible !important;
  flex: 0 0 38px !important;
  width: 38px !important;
  min-width: 38px !important;
  max-width: 38px !important;
  height: 42px !important;
  min-height: 42px !important;
  max-height: 42px !important;
  overflow: hidden !important;
  color: transparent !important;
  background-color: transparent !important;
  background-image: url("song-howard-mark.png") !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-size: contain !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  font: 700 10px/1 Arial, sans-serif !important;
  letter-spacing: 0 !important;
  contain: strict !important;
  isolation: isolate !important;
}

@media (max-width: 900px) {
  .site-header {
    background: #fff !important;
  }

  /* Cover only the unintended overflow in the page gutter; the logo begins
     at the 16px content edge and remains visible above this layer. */
  .site-header::after {
    content: "" !important;
    display: block !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 16px !important;
    height: 78px !important;
    background: #fff !important;
    border: 0 !important;
    z-index: 998 !important;
    pointer-events: none !important;
  }

  .site-header .nav-wrap,
  .site-header .mobile-directory {
    position: relative !important;
    z-index: 999 !important;
  }
}

/* Cloudflare injects a hidden 1px challenge iframe at body level. Some iOS
   Safari builds paint that hidden frame as a large black rectangle. */
body > iframe[style*="visibility: hidden"],
body > iframe[width="1"][height="1"] {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  position: fixed !important;
  left: -9999px !important;
  top: -9999px !important;
  width: 0 !important;
  min-width: 0 !important;
  max-width: 0 !important;
  height: 0 !important;
  min-height: 0 !important;
  max-height: 0 !important;
  border: 0 !important;
  background: transparent !important;
  pointer-events: none !important;
}

/* This static site intentionally contains no embedded frames. Hide any frame
   injected by the private-site gateway before iOS Safari can paint it. */
body iframe {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  width: 0 !important;
  height: 0 !important;
  border: 0 !important;
}

/* Preserve the formal SH shield without using an image asset. */
.masthead-initials {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 38px !important;
  width: 38px !important;
  min-width: 38px !important;
  max-width: 38px !important;
  height: 42px !important;
  min-height: 42px !important;
  max-height: 42px !important;
  padding: 0 !important;
  overflow: hidden !important;
  contain: paint !important;
  color: #0b1f33 !important;
  background: #fff !important;
  background-color: #fff !important;
  background-image: none !important;
  border: 2px solid #caa869 !important;
  border-radius: 3px 3px 12px 12px !important;
  box-shadow: inset 0 0 0 2px #fff, inset 0 0 0 3px #0b1f33 !important;
  font: 700 11px/1 Arial, sans-serif !important;
}

@media (max-width: 600px) {
  .masthead-initials {
    flex-basis: 32px !important;
    width: 32px !important;
    min-width: 32px !important;
    max-width: 32px !important;
    height: 36px !important;
    min-height: 36px !important;
    max-height: 36px !important;
    font-size: 10px !important;
  }
}

.masthead-copy {
  display: block !important;
  min-width: 0;
  background: transparent !important;
}

.masthead-copy strong {
  display: block !important;
  color: var(--navy) !important;
  background: transparent !important;
  font: 700 1rem/1 var(--serif) !important;
  letter-spacing: .1em !important;
  white-space: nowrap !important;
}

.masthead-copy small {
  display: block !important;
  color: var(--navy) !important;
  background: transparent !important;
  margin-top: 8px !important;
  font: 400 .64rem/1 var(--sans) !important;
  letter-spacing: .3em !important;
  white-space: nowrap !important;
}

.masthead-copy .brand-profession:empty {
  display: none !important;
}

html[lang^="zh"] .masthead-copy strong {
  font-family: "LXGW WenKai TC","STKaiti","KaiTi",serif !important;
  font-size: 1.18rem !important;
  font-weight: 700 !important;
  line-height: 1.08 !important;
  letter-spacing: .07em !important;
}

html[lang^="zh"] .masthead-copy .brand-office {
  margin-top: 5px !important;
  font: 700 .67rem/1.1 var(--serif) !important;
  letter-spacing: .055em !important;
}

html[lang^="zh"] .masthead-copy .brand-profession {
  display: block !important;
  margin-top: 3px !important;
  font: 400 italic .61rem/1.1 var(--serif) !important;
  letter-spacing: .035em !important;
}

@media (max-width: 600px) {
  .masthead-brand-link {
    gap: 8px !important;
  }

  .masthead-logo {
    flex-basis: 32px !important;
    width: 32px !important;
    min-width: 32px !important;
    max-width: 32px !important;
    height: 36px !important;
    min-height: 36px !important;
    max-height: 36px !important;
  }

  .masthead-copy strong {
    font-size: .85rem !important;
  }

  .masthead-copy small {
    font-size: .56rem !important;
  }

  html[lang^="zh"] .masthead-copy strong {
    font-size: 1.03rem !important;
    letter-spacing: .045em !important;
  }

  html[lang^="zh"] .masthead-copy .brand-office {
    font-size: .58rem !important;
  }

  html[lang^="zh"] .masthead-copy .brand-profession {
    font-size: .54rem !important;
  }
}

/* Final mobile-safe mark: ordinary inline text, with no image canvas,
   fixed box, background, clipping, containment or pseudo-element. */
.masthead-initials {
  position: static !important;
  display: inline !important;
  flex: 0 0 auto !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 0 10px 0 0 !important;
  overflow: visible !important;
  contain: none !important;
  isolation: auto !important;
  color: var(--navy) !important;
  background: transparent !important;
  background-image: none !important;
  border: 0 !important;
  border-right: 2px solid var(--gold) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  clip-path: none !important;
  filter: none !important;
  transform: none !important;
  font: 700 1rem/1 var(--serif) !important;
  letter-spacing: 0 !important;
  white-space: nowrap !important;
}

.masthead-initials::before,
.masthead-initials::after {
  content: none !important;
  display: none !important;
}

@media (max-width: 900px) {
  .site-header::after {
    content: none !important;
    display: none !important;
  }

  .masthead-brand-link {
    gap: 10px !important;
  }
}

/* The header mark uses an ordinary opaque image. This avoids an iOS Safari
   compositing fault that rendered the transparent PNG canvas as a black block. */
.site-header .masthead-logo {
  display: none !important;
}

.site-header .masthead-logo-image {
  position: static !important;
  display: block !important;
  visibility: visible !important;
  flex: 0 0 38px !important;
  width: 38px !important;
  min-width: 38px !important;
  max-width: 38px !important;
  height: 42px !important;
  min-height: 42px !important;
  max-height: 42px !important;
  margin: 0 !important;
  padding: 0 !important;
  object-fit: contain !important;
  object-position: center !important;
  overflow: hidden !important;
  background: #fff !important;
  border: 0 !important;
  box-shadow: none !important;
  clip-path: none !important;
  filter: none !important;
  transform: none !important;
}

/* Bilingual Song / 宋 emblem. The artwork has an opaque white canvas for
   dependable rendering in mobile Safari and keeps the established palette. */
.site-header .masthead-logo-image {
  flex-basis: 44px !important;
  width: 44px !important;
  min-width: 44px !important;
  max-width: 44px !important;
  height: 49px !important;
  min-height: 49px !important;
  max-height: 49px !important;
}

/* Image-free version of the established SH shield for the masthead. */
.site-header .masthead-initials {
  position: static !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 38px !important;
  width: 38px !important;
  min-width: 38px !important;
  max-width: 38px !important;
  height: 42px !important;
  min-height: 42px !important;
  max-height: 42px !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  color: #0b1f33 !important;
  background: #fff !important;
  border: 2px solid #caa869 !important;
  border-radius: 3px 3px 12px 12px !important;
  box-shadow: inset 0 0 0 2px #fff, inset 0 0 0 3px #0b1f33 !important;
  font: 700 10px/1 Arial, sans-serif !important;
  letter-spacing: -0.08em !important;
}

@media (max-width: 600px) {
  .site-header .masthead-initials {
    flex-basis: 32px !important;
    width: 32px !important;
    min-width: 32px !important;
    max-width: 32px !important;
    height: 36px !important;
    min-height: 36px !important;
    max-height: 36px !important;
    font-size: 9px !important;
  }
}

@media (max-width: 600px) {
  .site-header .masthead-logo-image {
    flex-basis: 38px !important;
    width: 38px !important;
    min-width: 38px !important;
    max-width: 38px !important;
    height: 42px !important;
    min-height: 42px !important;
    max-height: 42px !important;
  }
}

/* Private-site mobile guard: the hosting layer can leave a black surface in
   Safari's top-left page corner. Paint over that reserved corner and keep the
   complete brand mark clear of it. */
@media (max-width: 900px) {
  body::before {
    content: "" !important;
    display: block !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 44px !important;
    height: 58px !important;
    background: #fff !important;
    border: 0 !important;
    z-index: 2147483647 !important;
    pointer-events: none !important;
  }

  .site-header {
    isolation: auto !important;
  }

  .site-header .masthead-brand {
    margin-left: 44px !important;
  }
}

/* Larger masthead branding. */
.site-header .masthead-logo-image {
  flex-basis: 56px !important;
  width: 56px !important;
  min-width: 56px !important;
  max-width: 56px !important;
  height: 62px !important;
  min-height: 62px !important;
  max-height: 62px !important;
}

.masthead-copy strong {
  font-size: 1.2rem !important;
}

.masthead-copy small {
  font-size: .72rem !important;
}

html[lang^="zh"] .masthead-copy strong {
  font-size: 1.34rem !important;
}

html[lang^="zh"] .masthead-copy .brand-office {
  font-size: .75rem !important;
}

@media (max-width: 600px) {
  .site-header .masthead-logo-image {
    flex-basis: 44px !important;
    width: 44px !important;
    min-width: 44px !important;
    max-width: 44px !important;
    height: 49px !important;
    min-height: 49px !important;
    max-height: 49px !important;
  }

  .masthead-copy strong {
    font-size: 1rem !important;
  }

  .masthead-copy small {
    font-size: .62rem !important;
  }

  html[lang^="zh"] .masthead-copy strong {
    font-size: 1.12rem !important;
  }

  html[lang^="zh"] .masthead-copy .brand-office {
    font-size: .64rem !important;
  }
}
