/* IA V1 global shell. Every selector is bounded to the header or footer. */
#header,
#header *,
#header *::before,
#header *::after,
[data-ec-component="GLOBAL_FOOTER"],
[data-ec-component="GLOBAL_FOOTER"] *,
[data-ec-component="GLOBAL_FOOTER"] *::before,
[data-ec-component="GLOBAL_FOOTER"] *::after {
  box-sizing: border-box;
}

#header,
[data-ec-component="GLOBAL_FOOTER"] {
  --ec-color-navy: #00263E;
  --ec-color-orange: #FF8200;
  --ec-color-lake-green: #5BB8B5;
  --ec-color-jade-dark: #379A97;
  --ec-surface-white: #FFFFFF;
  --ec-surface-footer-main: var(--ec-color-navy);
  --ec-surface-footer-strip: var(--ec-color-lake-green);
  --ec-text-secondary: #506A79;
  --ec-border-default: #D7E0E4;
  --ec-container-inner-max: 1296px;
  --ec-container-mobile-gutter: 24px;
  font: 17px/1.62 Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

#header a,
[data-ec-component="GLOBAL_FOOTER"] a {
  overflow-wrap: anywhere;
}

#header button,
#header input {
  font: inherit;
}

#header :focus-visible {
  outline: 2px solid var(--ec-color-jade-dark);
  outline-offset: 3px;
  border-radius: 2px;
}

#header[data-input-modality="pointer"] :focus {
  outline: none;
}

[data-ec-component="GLOBAL_FOOTER"] :focus-visible {
  outline: 3px solid var(--ec-color-orange);
  outline-offset: 3px;
}

#header .c,
[data-ec-component="GLOBAL_FOOTER"] .c {
  width: min(1296px, calc(100% - 48px));
  margin-inline: auto;
}

#header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--ec-surface-white);
  border-bottom: 1px solid var(--ec-border-default);
}

#header .head-inner {
  width: min(1376px, 100%);
  height: 116px;
  margin: auto;
  padding: 20px 40px 7px;
  display: flex;
  align-items: center;
}

#header .logo,
[data-ec-component="GLOBAL_FOOTER"] .logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ec-color-navy);
  font-size: 22px;
  font-weight: 800;
  text-decoration: none;
  letter-spacing: -.02em;
}

#header .logo {
  flex: 0 0 210px;
  min-width: max-content;
  white-space: nowrap;
  overflow-wrap: normal;
}

#header .logo > span:last-child {
  flex: 0 0 auto;
  white-space: nowrap;
  overflow-wrap: normal;
}

#header .logo-mark,
[data-ec-component="GLOBAL_FOOTER"] .logo-mark {
  width: 31px;
  height: 31px;
  flex: 0 0 31px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--ec-color-navy);
  position: relative;
}

#header .logo-mark::after,
[data-ec-component="GLOBAL_FOOTER"] .logo-mark::after {
  content: "";
  position: absolute;
  left: -3px;
  bottom: -1px;
  width: 10px;
  height: 10px;
  background: var(--ec-color-orange);
}

#header .nav {
  margin-left: auto;
  height: 89px;
  display: flex;
  align-items: center;
}

#header .nav > button,
#header .nav > a {
  height: 89px;
  padding: 0 10px;
  border: 0;
  background: none;
  color: var(--ec-color-navy);
  font-size: 14.4px;
  font-weight: 650;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
}

#header .nav > button,
#header .search-toggle,
#header .menu-toggle {
  border-radius: 0;
  transform: none;
}

#header .nav > button:hover,
#header .nav > button:focus,
#header .search-toggle:hover,
#header .search-toggle:focus,
#header .menu-toggle:hover,
#header .menu-toggle:focus {
  border-color: transparent;
  background: transparent;
  color: var(--ec-color-navy);
  transform: none;
}

#header .nav > button[aria-expanded="true"],
#header .nav .cur {
  color: var(--ec-text-jade, var(--ec-color-jade-dark));
}

#header .chev {
  font-size: 12px;
}

#header .search-toggle,
#header .menu-toggle {
  border: 0;
  background: none;
  color: var(--ec-color-navy);
  cursor: pointer;
}

#header .search-toggle {
  width: 38px;
  height: 89px;
  display: grid;
  place-items: center;
}

#header .help-pill {
  margin-left: 8px;
  padding: 13px 25px;
  border-radius: 999px;
  background: var(--ec-color-orange);
  color: var(--ec-color-navy);
  font-size: 14.4px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

#header .menu-toggle {
  display: none;
  margin-left: 10px;
  font-weight: 700;
  letter-spacing: .06em;
}

#header .dropdown {
  display: none;
  position: absolute;
  inset: 100% 0 auto;
  background: var(--ec-surface-white);
  border-top: 1px solid var(--ec-border-default);
  border-bottom: 1px solid var(--ec-border-default);
  box-shadow: 0 18px 30px rgba(0, 38, 62, .08);
}

#header .dropdown.open {
  display: block;
}

#header .dropdown-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) 288px;
  gap: 28px;
  padding: 40px 0 48px;
}

#header .dropdown-grid[hidden] {
  display: none !important;
}

#header .dropdown h4 {
  margin: 0 0 14px;
  color: var(--ec-text-secondary);
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
}

#header .dropdown ul,
[data-ec-component="GLOBAL_FOOTER"] ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

#header .dropdown li {
  margin: 0 0 10px;
}

#header .dropdown a {
  color: var(--ec-color-navy);
  font-size: 15px;
  font-weight: 650;
  line-height: 1.35;
  text-decoration: none;
}

#header .service-card {
  padding: 24px;
  background: var(--ec-color-navy);
  color: var(--ec-surface-white);
}

#header .service-card h3 {
  margin: 0 0 8px;
  color: var(--ec-surface-white);
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -.035em;
}

#header .service-card p {
  margin-top: 0;
  font-size: 15px;
  color: var(--ec-border-default);
}

#header .eyebrow {
  margin: 0 0 14px;
  color: var(--ec-text-orange, var(--ec-color-orange));
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: .14em;
  text-transform: uppercase;
}

#header .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 22px;
  border: 0;
  border-radius: 2px;
  background: var(--ec-color-navy);
  color: var(--ec-surface-white);
  font-weight: 700;
  text-decoration: none;
}

#header .btn.orange {
  background: var(--ec-color-orange);
  color: var(--ec-color-navy);
}

#header .mobile-menu,
#header .search-panel {
  display: none;
  border-top: 1px solid var(--ec-border-default);
  background: var(--ec-surface-white);
}

#header .mobile-menu.open,
#header .search-panel.open {
  display: block;
}

#header .mobile-menu {
  max-height: calc(100vh - 80px);
  overflow: auto;
}

#header .mobile-menu details {
  border-bottom: 1px solid var(--ec-border-default);
}

#header .mobile-menu summary {
  padding: 18px 0;
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  list-style: none;
  cursor: pointer;
}

#header .mobile-menu .sub {
  padding: 0 0 20px 12px;
}

#header .mobile-menu .sub a {
  display: block;
  padding: 7px 0;
  color: var(--ec-color-navy);
  font-size: 15px;
  text-decoration: none;
}

#header .mobile-menu h6 {
  margin: 14px 0 2px;
  color: var(--ec-text-secondary);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
}

#header .mobile-actions {
  display: grid;
  gap: 12px;
  padding: 24px 0;
}

#header .mobile-search {
  margin: 0;
}

#header .mobile-search input {
  box-sizing: border-box;
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--ec-border-default);
  border-radius: var(--ec-radius-control, 6px);
  background: var(--ec-surface-white);
  color: var(--ec-color-navy);
  font-size: var(--ec-type-body-small-size, 15.2px);
  line-height: var(--ec-type-body-small-line, 25.08px);
}

#header .mobile-search input::placeholder {
  color: var(--ec-text-secondary);
  opacity: 1;
}

#header .search-panel .c {
  padding-top: 20px;
  padding-bottom: 24px;
}

#header .search-panel input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--ec-border-default);
  background: var(--ec-surface-white);
  color: var(--ec-color-navy);
}

[data-ec-component="GLOBAL_FOOTER"] .footer {
  padding: 64px 0 48px;
  background: var(--ec-color-navy);
  color: var(--ec-surface-white);
}

[data-ec-component="GLOBAL_FOOTER"] .footer .c {
  display: grid;
  grid-template-columns: 1.4fr repeat(4, 1fr);
  gap: 24px;
}

[data-ec-component="GLOBAL_FOOTER"] .footer h4 {
  margin: 0 0 14px;
  color: var(--ec-surface-white);
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
}

[data-ec-component="GLOBAL_FOOTER"] .footer li {
  margin-bottom: 9px;
}

[data-ec-component="GLOBAL_FOOTER"] .footer a {
  color: var(--ec-border-default);
  font-size: 14px;
  text-decoration: none;
}

[data-ec-component="GLOBAL_FOOTER"] .footer .logo {
  color: var(--ec-surface-white);
}

[data-ec-component="GLOBAL_FOOTER"] .footer .logo-mark {
  background: var(--ec-surface-white);
}

[data-ec-component="GLOBAL_FOOTER"] .ec-major-colored-section {
  width: 100%;
  max-width: none;
  border-radius: 0;
}

[data-ec-component="GLOBAL_FOOTER"] .ec-major-colored-section__inner {
  box-sizing: border-box;
  width: 100%;
  max-width: var(--ec-container-inner-max);
  margin-inline: auto;
  padding-inline: 72px;
}

[data-ec-component="GLOBAL_FOOTER"] .ec-global-footer {
  background: var(--ec-surface-footer-main);
}

[data-ec-component="GLOBAL_FOOTER"] .strip {
  padding: 18px 0;
  background: var(--ec-color-lake-green);
  color: var(--ec-color-navy);
  font-size: 13px;
  text-align: center;
}

[data-ec-component="GLOBAL_FOOTER"] .ec-global-footer__bottom {
  background: var(--ec-surface-footer-strip);
}

@media (min-width: 1200px) {
  #header .head-inner {
    width: 1376px;
    max-width: calc(100vw - 64px);
    margin-left: 32px;
    margin-right: 0;
  }

  #header .help-pill {
    margin-right: 40px;
  }
}

@media (width < 1200px) {
  #header .head-inner {
    width: 100%;
    max-width: 1376px;
    height: 82px;
    margin-inline: auto;
    padding: 11px 24px;
  }

  #header .nav {
    display: none;
  }

  #header .menu-toggle {
    display: block;
    width: auto;
    min-width: 0;
    flex: 0 0 auto;
    padding: 0;
    line-height: 60px;
  }

  #header .search-toggle {
    flex: 0 0 38px;
    height: 60px;
  }

  #header .logo {
    flex: 1 1 auto;
    min-width: max-content;
  }

  #header .help-pill {
    margin-right: 0;
    padding: 12px 20px;
  }

  #header .dropdown {
    display: none !important;
  }

  [data-ec-component="GLOBAL_FOOTER"] .footer .c {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  [data-ec-component="GLOBAL_FOOTER"] .footer .c {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  #header .c,
  [data-ec-component="GLOBAL_FOOTER"] .c {
    width: calc(100% - 48px);
  }

  #header .logo {
    font-size: 19px;
  }

  #header .logo-mark,
  [data-ec-component="GLOBAL_FOOTER"] .logo-mark {
    width: 28px;
    height: 28px;
    flex-basis: 28px;
  }

  #header .help-pill {
    display: none;
  }

  [data-ec-component="GLOBAL_FOOTER"] .footer .c {
    grid-template-columns: 1fr 1fr;
  }

  [data-ec-component="GLOBAL_FOOTER"] .footer .brand {
    grid-column: 1 / -1;
  }

  [data-ec-component="GLOBAL_FOOTER"] .ec-major-colored-section__inner {
    width: 100%;
    padding-inline: var(--ec-container-mobile-gutter);
  }
}

/* Owner-approved D1 artwork; retain pre-swap logo and shell heights. */
#header .logo > img {
  display: block;
  flex: 0 0 auto;
  width: auto;
  height: 35.625px;
  max-width: none;
}
[data-ec-component="GLOBAL_FOOTER"] .logo > img {
  display: block;
  flex: 0 0 auto;
  width: auto;
  height: 31px;
  max-width: none;
}
@media (max-width: 600px) {
  #header .logo > img { height: 30.765625px; }
  [data-ec-component="GLOBAL_FOOTER"] .logo > img { height: 28px; }
}

/* N4X staging-only surface-scoped text proposal. Brand/graphic tokens are untouched. */
main, [role="main"], #header,
:where([data-ec-surface="WHITE"], [data-ec-surface="COOL_NEUTRAL"], [data-ec-surface="MINT"], .section.cool, .article, .ec-b01-hero, .ec-b01-orientation, .ec-b01-about, .ec-b01-chapter:not(.ec-b01-chapter--navy), .rent-about, .rent-inline-verification, .expatchina-lead-card) {
  --ec-text-orange: #A75500;
  --ec-text-darkorange: #A75500;
  --ec-text-jade: #2A7674;
}
:where([data-ec-surface="NAVY"], [data-ec-surface="ORANGE"], .navy, .ec-b01-chapter--navy, .ec-b01-next, .ec-b01-help, .rent-navy-anchor, .rent-next-decision, .rent-help, .a10-navy-anchor, .a10-next-decision, .a10-help-cta, .ec-navy-information-anchor, .ec-next-decision, .ec-core-protagonist, .ec-b2-closing-help, .ec-b2-closing-final, .ec-home-help, footer, button, .btn, .button, [role="button"], a.btn, a.ec-b3-button.ec-b3-button--primary, a.rent-help-button, div.a10-navy-anchor, div.ec-b3-hero-visual, div.footer.ec-global-footer.ec-major-colored-section, div.rent-navy-anchor, section.a10-major.a10-next-decision, section.ec-b01-chapter.ec-b01-chapter--navy, section.ec-b01-next, section.ecv2-section.ecv2-consult-band.ec-b2-closing-help, section.ecv3-section.ecv3-copy-section.ecv3-longform-section.ecv4-section.ecv4-section--first-month.ec-b3-section.ec-b3-section--navy, section.ecv3-section.ecv3-section--compact.ecv4-batch-related, section.n1b-slot.n1b-official, section.next.ec-major-colored-section.ec-next-decision.ec-guide-closing, section.rent-next-decision, section.section.at-glance, th) {
  --ec-text-orange: #FF8200;
  --ec-text-darkorange: #D96800;
  --ec-text-jade: #379A97;
}
