/**
 * ExpatChina Phase 2 Batch 02 — owner-approved Figma implementation.
 * Staging only. Presentation layer only; page-owned post_content is unchanged.
 * Authority: approved Visa Types master and normalized four-guide Figma frames.
 */

:is(.page-id-111,.page-id-112,.page-id-113,.page-id-126,.page-id-127) {
  --ec-b2-navy: #00263e;
  --ec-b2-orange: #ff8200;
  --ec-b2-lake: #5bb8b5;
  --ec-b2-jade: #379a97;
  --ec-b2-white: #fff;
  --ec-b2-neutral: #f4f6f7;
  --ec-b2-border: #d7e0e4;
  --ec-b2-secondary: #506a79;
  --ec-b2-shell: 1296px;
  --ec-b2-reading: 800px;
  --ec-b2-gutter: clamp(24px,5vw,72px);
  background: var(--ec-b2-white);
  color: var(--ec-b2-navy);
  font-family: Inter,system-ui,-apple-system,"Segoe UI",sans-serif;
}

:is(.page-id-111,.page-id-112,.page-id-113,.page-id-126,.page-id-127),
:is(.page-id-111,.page-id-112,.page-id-113,.page-id-126,.page-id-127) *,
:is(.page-id-111,.page-id-112,.page-id-113,.page-id-126,.page-id-127) *::before,
:is(.page-id-111,.page-id-112,.page-id-113,.page-id-126,.page-id-127) *::after {
  box-sizing: border-box;
}

:is(.page-id-111,.page-id-112,.page-id-113,.page-id-126,.page-id-127) :where(img,svg,video,canvas) {
  max-width: 100%;
}

:is(.page-id-111,.page-id-112,.page-id-113,.page-id-126,.page-id-127) :where(.site-content,.content-area,.site-main,.inside-article,.entry-content) {
  width: 100%;
  max-width: none;
  min-width: 0;
  margin: 0;
  padding: 0;
}

:is(.page-id-111,.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ec-v2-phase2 {
  width: 100%;
  max-width: none;
  overflow: clip;
  background: var(--ec-b2-white);
  color: var(--ec-b2-navy);
}

:is(.page-id-111,.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ec-v2-phase2 :where(p,li,td,th) {
  font-size: 17px;
  line-height: 1.588;
}

:is(.page-id-111,.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ec-v2-phase2 :where(p,ul,ol,figure,table) {
  margin-top: 0;
}

:is(.page-id-111,.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ec-v2-phase2 a {
  color: inherit;
}

:is(.page-id-111,.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ec-v2-phase2 .ecv3-shell {
  width: min(calc(100% - (2 * var(--ec-b2-gutter))),var(--ec-b2-shell));
  max-width: var(--ec-b2-shell);
  min-width: 0;
  margin-inline: auto;
}

/* Global chrome remains GeneratePress-owned; only the approved token values are synced. */
:is(.page-id-111,.page-id-112,.page-id-113,.page-id-126,.page-id-127) .site-header {
  background: #fff;
  border-bottom: 1px solid var(--ec-b2-border);
}

/* Hero: exact 1296px / 680 + 560 / 56 composition at the 1440 reference. */
:is(.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ecv5-opening {
  display: flex;
  align-items: center;
  min-height: 596px;
  padding: 68px var(--ec-b2-gutter);
  background: var(--ec-b2-white);
}

:is(.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ecv5-opening .ecv4-hero-grid {
  display: grid;
  grid-template-columns: minmax(0,680px) minmax(0,560px);
  gap: 56px;
  align-items: center;
  width: min(100%,var(--ec-b2-shell));
}

:is(.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ecv3-hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  gap: 18px;
}

:is(.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ecv3-hero-copy .ecv3-kicker,
:is(.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ec-b2-eyebrow,
:is(.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ec-b2-intro-kicker {
  margin: 0;
  color: var(--ec-b2-orange);
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
}

:is(.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ecv3-hero-copy h1 {
  max-width: 680px;
  margin: 0;
  color: var(--ec-b2-navy);
  font-size: clamp(58px,5.56vw,80px);
  font-weight: 700;
  line-height: .98;
  letter-spacing: clamp(-5.6px,-.39vw,-3px);
  text-wrap: balance;
}

:is(.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ecv3-deck {
  margin: 0;
  color: var(--ec-b2-secondary);
  font-size: 20px;
  line-height: 32px;
}

:is(.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ecv3-hero-actions {
  margin: 0;
}

:is(.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ecv3-hero-actions .expatchina-button {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 14px 24px;
  border: 0;
  border-radius: 999px;
  background: var(--ec-b2-orange);
  color: var(--ec-b2-navy);
  font-size: 15px;
  font-weight: 600;
  line-height: 18px;
  text-decoration: none;
}

.ec-b2-hero-visual {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  min-width: 0;
  padding: 34px;
  border-radius: 5px;
  background: var(--ec-b2-neutral);
}

.ec-b2-hero-visual__eyebrow {
  margin: 0;
  color: var(--ec-b2-orange);
  font-size: 12px !important;
  font-weight: 600;
  line-height: 16px !important;
  letter-spacing: 1.6px;
}

.ec-b2-hero-visual__title {
  margin: 0;
  color: var(--ec-b2-navy);
  font-size: 32px !important;
  font-weight: 600;
  line-height: 38px !important;
  letter-spacing: -1.4px;
}

.ec-b2-hero-visual__rows {
  display: grid;
  gap: 10px;
}

.ec-b2-hero-visual__row {
  display: grid;
  grid-template-columns: minmax(0,150px) minmax(0,1fr);
  gap: 16px;
  align-items: center;
  min-width: 0;
  padding: 13px 16px;
  border: 1px solid var(--ec-b2-border);
  background: #fff;
}

.ec-b2-hero-visual__row strong,
.ec-b2-hero-visual__row span {
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 1.15px;
}

.ec-b2-hero-visual__row strong { color: var(--ec-b2-navy); }
.ec-b2-hero-visual__row span { color: var(--ec-b2-orange); text-align: right; }

.ec-b2-hero-visual--documents .ec-b2-hero-visual__rows {
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 0;
  border: 1px solid var(--ec-b2-border);
}

.ec-b2-hero-visual--documents .ec-b2-hero-visual__row {
  display: block;
  padding: 18px 14px;
  border: 0;
  border-left: 1px solid var(--ec-b2-border);
}
.ec-b2-hero-visual--documents .ec-b2-hero-visual__row:first-child { border-left: 0; }
.ec-b2-hero-visual--documents .ec-b2-hero-visual__row span { display: block; margin-top: 8px; color: var(--ec-b2-secondary); text-align: left; letter-spacing: 0; }

.ec-b2-hero-visual--job .ec-b2-hero-visual__rows {
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 0;
  border: 1px solid var(--ec-b2-border);
}

.ec-b2-hero-visual--job .ec-b2-hero-visual__row {
  display: block;
  min-height: 112px;
  padding: 16px 12px;
  border: 0;
  border-left: 1px solid var(--ec-b2-border);
}
.ec-b2-hero-visual--job .ec-b2-hero-visual__row:first-child { border-left: 0; }
.ec-b2-hero-visual--job .ec-b2-hero-visual__row strong { display: block; margin-bottom: 12px; color: var(--ec-b2-orange); }
.ec-b2-hero-visual--job .ec-b2-hero-visual__row span { color: var(--ec-b2-navy); text-align: left; letter-spacing: 0; }

.ec-b2-hero-visual--contract .ec-b2-hero-visual__rows { gap: 0; border-top: 1px solid var(--ec-b2-border); }
.ec-b2-hero-visual--contract .ec-b2-hero-visual__row { grid-template-columns: 18px minmax(0,1fr); padding: 10px 0; border: 0; border-bottom: 1px solid var(--ec-b2-border); background: transparent; }
.ec-b2-hero-visual--contract .ec-b2-hero-visual__row strong { color: var(--ec-b2-orange); }
.ec-b2-hero-visual--contract .ec-b2-hero-visual__row span { color: var(--ec-b2-navy); text-align: left; letter-spacing: 0; }

/* Start Here / sticky orientation. */
:is(.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ecv4-guide-intro {
  padding: 72px var(--ec-b2-gutter);
  background: var(--ec-b2-neutral);
}

:is(.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ecv4-guide-intro .ecv3-prose-layout {
  display: grid;
  grid-template-columns: minmax(0,300px) minmax(0,800px);
  gap: 70px;
  align-items: start;
}

:is(.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ecv3-toc {
  position: sticky;
  top: 24px;
  display: flex;
  flex-direction: column;
  gap: 11px;
  min-width: 0;
  padding: 25px 24px;
  border: 0;
  border-radius: 0;
  background: var(--ec-b2-lake);
  color: var(--ec-b2-navy);
}

:is(.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ecv3-toc p {
  margin: 0 0 2px;
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
}

:is(.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ecv3-toc a {
  display: block;
  padding: 0;
  border: 0;
  color: var(--ec-b2-navy);
  font-size: 17px;
  line-height: 27px;
  text-decoration: none;
}

:is(.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ecv4-guide-intro article {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

:is(.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ecv4-guide-intro .ec-b2-intro-kicker {
  color: var(--ec-b2-jade);
}

:is(.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ecv4-guide-intro .ec-b2-intro-title {
  max-width: 800px;
  margin: 0;
  color: var(--ec-b2-navy);
  font-size: clamp(42px,4.17vw,60px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.06em;
  text-wrap: balance;
}

:is(.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ecv4-editorial-intro {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 800px;
  margin: 0;
}

body:is(.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ec-v2-phase2 .ecv4-guide-intro .ecv4-editorial-intro p:first-child {
  margin: 0;
  color: var(--ec-b2-secondary) !important;
  font-size: 18px !important;
  font-weight: 400 !important;
  line-height: 1.65 !important;
  letter-spacing: 0 !important;
}

:is(.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ecv4-editorial-intro p:last-child {
  max-width: 800px;
  margin: 0;
  color: var(--ec-b2-secondary);
}

/* Shared section grammar. */
:is(.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ecv4-section {
  padding: 72px var(--ec-b2-gutter);
  background: #fff;
}

:is(.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ecv4-section > .ecv3-shell {
  width: min(100%,var(--ec-b2-shell));
}

:is(.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ecv4-composition {
  display: grid;
  grid-template-columns: minmax(0,350px) minmax(0,1fr);
  gap: 70px;
  align-items: start;
}

:is(.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ecv4-section-heading,
:is(.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ecv4-section-body {
  min-width: 0;
}

:is(.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ecv4-section-heading .ecv3-kicker {
  margin: 0 0 14px;
  color: var(--ec-b2-orange);
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
  letter-spacing: 1.6px;
}

:is(.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ecv4-section-heading h2 {
  margin: 0;
  color: var(--ec-b2-navy);
  font-size: 42px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.05em;
  text-wrap: balance;
}

:is(.page-id-111,.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ecv4-section-heading .ec-b2-heading-continuation {
  max-width: 310px;
  margin: 18px 0 0;
  color: var(--ec-b2-secondary);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.55;
  letter-spacing: 0;
}

:is(.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ecv4-section-body {
  max-width: 800px;
  color: var(--ec-b2-navy);
}

:is(.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ecv4-section-body > * + * {
  margin-top: 18px;
}

:is(.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ecv4-section-body h3 {
  margin-bottom: 8px;
  color: var(--ec-b2-navy);
  font-size: 23px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -.02em;
}

:is(.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ecv4-section-body :where(ul,ol) {
  padding-left: 1.25em;
}

/* Alternating exact surface sequence by page. */
.page-id-112 #do-not-confuse-possession-of-one-document-with-a-broader-right,
.page-id-112 #treat-expiry-loss-and-changes-as-authority-questions,
.page-id-113 #separate-applicant-documents-from-employer-and-school-documents,
.page-id-113 #decide-on-translation-notarisation-or-authentication-only-after-you-know-the-receiver,
.page-id-126 #use-search-channels-as-leads-not-proof,
.page-id-126 #compare-the-offer-beyond-salary,
.page-id-127 #read-salary-currency-and-payment-terms-literally,
.page-id-127 #clarify-work-permit-and-relocation-support {
  background: var(--ec-b2-neutral);
}

/* One approved primary navy information anchor per guide. */
.page-id-112 #start-with-the-four-document-overview,
.page-id-113 #build-the-pack-from-real-use-cases,
.page-id-126 #check-the-lawful-route-before-investing-in-an-application,
.page-id-127 .ec-b2-contract-anchor {
  padding: 72px var(--ec-b2-gutter);
  background: var(--ec-b2-navy);
  color: #fff;
}

:is(.page-id-112 #start-with-the-four-document-overview,.page-id-113 #build-the-pack-from-real-use-cases,.page-id-126 #check-the-lawful-route-before-investing-in-an-application) .ecv4-composition {
  display: flex;
  flex-direction: column;
  gap: 26px;
}

:is(.page-id-112 #start-with-the-four-document-overview,.page-id-113 #build-the-pack-from-real-use-cases,.page-id-126 #check-the-lawful-route-before-investing-in-an-application) .ecv4-section-heading {
  width: 100%;
  max-width: 920px;
}

:is(.page-id-112 #start-with-the-four-document-overview,.page-id-113 #build-the-pack-from-real-use-cases,.page-id-126 #check-the-lawful-route-before-investing-in-an-application) .ecv4-section-heading h2 {
  color: #fff;
  font-size: clamp(46px,4.17vw,60px);
  line-height: 1;
  letter-spacing: -.06em;
}

:is(.page-id-112 #start-with-the-four-document-overview,.page-id-113 #build-the-pack-from-real-use-cases,.page-id-126 #check-the-lawful-route-before-investing-in-an-application) .ecv4-section-body {
  width: 100%;
  max-width: none;
  color: #fff;
}

:is(.page-id-112 #start-with-the-four-document-overview,.page-id-113 #build-the-pack-from-real-use-cases,.page-id-126 #check-the-lawful-route-before-investing-in-an-application) :where(p,li,strong,h3) {
  color: #fff;
}

/* Tables and matrices use the one approved family. */
:is(.page-id-111,.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ecv3-table-wrap {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--ec-b2-border);
  border-radius: 0;
  background: #fff;
}

:is(.page-id-111,.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ecv3-copy-table {
  width: 100%;
  min-width: 720px;
  margin: 0;
  border: 0;
  border-collapse: collapse;
  table-layout: fixed;
}

:is(.page-id-111,.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ecv3-copy-table th {
  padding: 14px 16px;
  border: 0;
  border-right: 1px solid rgba(255,255,255,.18);
  background: var(--ec-b2-navy);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
  letter-spacing: .9px;
  text-align: left;
  text-transform: uppercase;
  vertical-align: top;
}

:is(.page-id-111,.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ecv3-copy-table td {
  padding: 15px 16px;
  border: 0;
  border-right: 1px solid var(--ec-b2-border);
  border-bottom: 1px solid var(--ec-b2-border);
  background: #fff;
  color: var(--ec-b2-navy);
  font-size: 15px;
  line-height: 1.5;
  vertical-align: top;
}

:is(.page-id-111,.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ecv3-copy-table tbody tr:nth-child(even) td {
  background: var(--ec-b2-neutral);
}

:is(.page-id-112 #start-with-the-four-document-overview,.page-id-113 #build-the-pack-from-real-use-cases) .ecv3-table-wrap {
  border-color: rgba(255,255,255,.28);
  background: transparent;
}

:is(.page-id-112 #start-with-the-four-document-overview,.page-id-113 #build-the-pack-from-real-use-cases) .ecv3-copy-table th {
  background: var(--ec-b2-orange);
  color: var(--ec-b2-navy);
  border-color: rgba(0,38,62,.22);
}

:is(.page-id-112 #start-with-the-four-document-overview,.page-id-113 #build-the-pack-from-real-use-cases) .ecv3-copy-table td,
:is(.page-id-112 #start-with-the-four-document-overview,.page-id-113 #build-the-pack-from-real-use-cases) .ecv3-copy-table tbody tr:nth-child(even) td {
  background: rgba(255,255,255,.035);
  border-color: rgba(255,255,255,.18);
  color: #fff;
}

/* Lists become matrices only in the Figma modules that specify them. */
.page-id-113 #build-the-pack-from-real-use-cases .ecv4-key-statement + ul,
.page-id-126 #check-the-lawful-route-before-investing-in-an-application .ecv4-section-body > ul:first-of-type,
.page-id-127 #read-salary-currency-and-payment-terms-literally .ecv4-section-body > ul,
.page-id-127 #check-termination-final-records-and-the-dispute-route .ecv4-section-body > ul {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--ec-b2-border);
  border-left: 1px solid var(--ec-b2-border);
}

:is(.page-id-113 #build-the-pack-from-real-use-cases,.page-id-126 #check-the-lawful-route-before-investing-in-an-application) .ecv4-section-body > ul:first-of-type {
  border-color: rgba(255,255,255,.28);
}

.page-id-113 #build-the-pack-from-real-use-cases .ecv4-key-statement + ul > li,
.page-id-126 #check-the-lawful-route-before-investing-in-an-application .ecv4-section-body > ul:first-of-type > li,
.page-id-127 #read-salary-currency-and-payment-terms-literally .ecv4-section-body > ul > li,
.page-id-127 #check-termination-final-records-and-the-dispute-route .ecv4-section-body > ul > li {
  position: relative;
  min-width: 0;
  margin: 0;
  padding: 13px 16px 13px 32px;
  border-right: 1px solid var(--ec-b2-border);
  border-bottom: 1px solid var(--ec-b2-border);
}

.page-id-113 #build-the-pack-from-real-use-cases .ecv4-key-statement + ul > li,
.page-id-126 #check-the-lawful-route-before-investing-in-an-application .ecv4-section-body > ul:first-of-type > li {
  border-color: rgba(255,255,255,.28);
}

.page-id-113 #build-the-pack-from-real-use-cases .ecv4-key-statement + ul > li::before,
.page-id-126 #check-the-lawful-route-before-investing-in-an-application .ecv4-section-body > ul:first-of-type > li::before,
.page-id-127 #read-salary-currency-and-payment-terms-literally .ecv4-section-body > ul > li::before,
.page-id-127 #check-termination-final-records-and-the-dispute-route .ecv4-section-body > ul > li::before {
  content: "";
  position: absolute;
  left: 15px;
  top: 21px;
  width: 5px;
  height: 5px;
  background: var(--ec-b2-orange);
}

/* Approved full-width page-specific editorial images. */
.ec-b2-editorial-image {
  margin: 0;
  padding: 54px var(--ec-b2-gutter);
  background: #fff;
}

.ec-b2-editorial-image__inner {
  width: min(calc(100% - (2 * max(0px,var(--ec-b2-gutter) - 72px))),1200px);
  max-width: 1200px;
  height: 430px;
  margin-inline: auto;
  overflow: hidden;
  border-radius: 4px;
}

.ec-b2-editorial-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Retire the superseded pseudo-image implementation from the rejected pass. */
body:is(.page-id-126,.page-id-127) .ec-v2-phase2 .ecv4-hero-grid::after,
body.page-id-112 #do-not-confuse-possession-of-one-document-with-a-broader-right::after,
body.page-id-113 #separate-applicant-documents-from-employer-and-school-documents::after,
body.page-id-126 #use-search-channels-as-leads-not-proof::after,
body.page-id-127 #read-salary-currency-and-payment-terms-literally::after {
  content: none !important;
  display: none !important;
  background-image: none !important;
}

/* Employment contract has the approved stand-alone review anchor. */
.ec-b2-contract-anchor__inner {
  width: min(calc(100% - (2 * var(--ec-b2-gutter))),var(--ec-b2-shell));
  margin-inline: auto;
}

.ec-b2-contract-anchor__eyebrow {
  margin: 0 0 14px;
  color: var(--ec-b2-orange);
  font-size: 12px !important;
  font-weight: 600;
  line-height: 16px !important;
  letter-spacing: 1.6px;
}

.ec-b2-contract-anchor h2 {
  max-width: 900px;
  margin: 0;
  color: #fff;
  font-size: clamp(46px,4.17vw,60px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.06em;
}

.ec-b2-contract-anchor__intro {
  max-width: 900px;
  margin: 20px 0 26px;
  color: #fff;
}

.ec-b2-contract-anchor__matrix {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  border-top: 1px solid rgba(255,255,255,.28);
  border-left: 1px solid rgba(255,255,255,.28);
}

.ec-b2-contract-anchor__cell {
  min-width: 0;
  padding: 18px 20px;
  border-right: 1px solid rgba(255,255,255,.28);
  border-bottom: 1px solid rgba(255,255,255,.28);
}

.ec-b2-contract-anchor__cell strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ec-b2-orange);
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 1px;
}

.ec-b2-contract-anchor__cell span {
  color: #fff;
  font-size: 17px;
  line-height: 27px;
}

/* The standalone contract matrix is the only navy anchor on this page. */
body.page-id-127 #check-probation-hours-leave-and-benefits {
  background: #fff !important;
  color: var(--ec-b2-navy) !important;
}

body.page-id-127 #check-probation-hours-leave-and-benefits .ecv4-section-heading h2,
body.page-id-127 #check-probation-hours-leave-and-benefits .ecv4-section-body,
body.page-id-127 #check-probation-hours-leave-and-benefits .ecv4-section-body p,
body.page-id-127 #check-probation-hours-leave-and-benefits .ecv4-section-body li,
body.page-id-127 #check-probation-hours-leave-and-benefits .ecv4-section-body strong {
  color: var(--ec-b2-navy) !important;
}

body.page-id-127 #check-probation-hours-leave-and-benefits .ecv4-section-heading h2 {
  font-size: 42px !important;
  line-height: 1 !important;
  letter-spacing: -.05em !important;
}

body.page-id-127 #check-probation-hours-leave-and-benefits .ecv4-section-heading .ecv3-kicker {
  color: var(--ec-b2-orange) !important;
}

body.page-id-127 #check-probation-hours-leave-and-benefits .ecv4-section-body > ul {
  border-color: var(--ec-b2-border) !important;
  background: #fff !important;
}

body.page-id-127 #check-probation-hours-leave-and-benefits .ecv4-section-body > ul > li {
  border-color: var(--ec-b2-border) !important;
}

/* Keep navy matrix copy at the approved readable contrast. */
body:is(.page-id-112,.page-id-113) :is(#start-with-the-four-document-overview,#build-the-pack-from-real-use-cases) .ecv3-copy-table td,
body:is(.page-id-112,.page-id-113) :is(#start-with-the-four-document-overview,#build-the-pack-from-real-use-cases) .ecv3-copy-table td :where(strong,span) {
  color: #fff !important;
}

/* Bottom system: exact navy -> white -> orange -> global navy/lake rhythm. */
:is(.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ecv4-batch-related {
  padding: 56px var(--ec-b2-gutter);
  background: var(--ec-b2-navy);
  color: #fff;
}

:is(.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ecv4-batch-related .ecv3-kicker {
  margin: 0 0 14px;
  color: var(--ec-b2-orange);
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 1.6px;
}

:is(.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ecv4-batch-related h2 {
  margin: 0 0 22px;
  color: #fff;
  font-size: 42px;
  line-height: 1;
  letter-spacing: -.05em;
}

:is(.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ecv4-batch-related .ecv3-related {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 0 36px;
}

:is(.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ecv4-batch-related .ecv3-related a {
  min-width: 0;
  padding: 17px 0;
  border-top: 1px solid rgba(255,255,255,.25);
  color: #fff;
  text-decoration: none;
}

:is(.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ecv4-batch-related .ecv3-related span {
  color: var(--ec-b2-orange);
  font-size: 11px;
  line-height: 15px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

:is(.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ecv4-batch-related .ecv3-related h3 {
  margin: 7px 0 0;
  color: #fff;
  font-size: 17px;
  font-weight: 400;
  line-height: 27px;
}

:is(.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ec-b2-about {
  padding: 56px var(--ec-b2-gutter);
  background: #fff;
}

:is(.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ec-b2-about-inner {
  display: grid;
  grid-template-columns: minmax(0,430px) minmax(0,650px);
  gap: 80px;
  align-items: start;
}

:is(.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ec-b2-about-copy {
  display: contents;
}

:is(.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ec-b2-about .ec-b2-eyebrow {
  grid-column: 1;
  color: var(--ec-b2-jade);
}

:is(.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ec-b2-about h2 {
  grid-column: 1;
  margin: 14px 0 0;
  color: var(--ec-b2-navy);
  font-size: 32px;
  font-weight: 600;
  line-height: 38px;
  letter-spacing: -1.4px;
}

:is(.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ec-b2-about-copy > p:not(.ec-b2-eyebrow) {
  grid-column: 2;
  grid-row: 1 / span 2;
  margin: 0;
  color: var(--ec-b2-secondary);
}

:is(.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ec-b2-about-links {
  grid-column: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  margin-top: 72px;
}

:is(.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ec-b2-about-links a {
  color: var(--ec-b2-navy);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}

:is(.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ec-b2-help {
  padding: 56px var(--ec-b2-gutter);
  background: var(--ec-b2-orange);
  color: var(--ec-b2-navy);
}

:is(.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ec-b2-help-inner {
  display: grid;
  grid-template-columns: minmax(0,590px) minmax(0,1fr);
  gap: 64px;
  align-items: center;
}

:is(.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ec-b2-help .ec-b2-eyebrow {
  color: var(--ec-b2-navy);
}

:is(.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ec-b2-help h2 {
  max-width: 560px;
  margin: 14px 0 0;
  color: var(--ec-b2-navy);
  font-size: 42px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.05em;
}

:is(.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ec-b2-help-actions {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 24px;
  min-width: 0;
}

:is(.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ec-b2-help-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  min-width: 0;
  min-height: 118px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

:is(.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ec-b2-help-card h3 {
  margin: 0;
  color: var(--ec-b2-navy);
  font-size: 20px;
  line-height: 1.3;
}

:is(.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ec-b2-help-card a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  margin-top: 18px;
  padding: 12px 20px;
  border: 1px solid var(--ec-b2-navy);
  border-radius: 999px;
  background: transparent;
  color: var(--ec-b2-navy);
  font-size: 15px;
  font-weight: 600;
  line-height: 18px;
  text-decoration: none;
}

:is(.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ec-b2-help-card:first-child a {
  background: var(--ec-b2-navy);
  color: #fff;
}

/* Global footer: renderer stays in functions.php; page content contains no footer. */
:is(.page-id-111,.page-id-112,.page-id-113,.page-id-126,.page-id-127) .expatchina-footer-navigation {
  padding: 96px 16px;
  background: #00263e;
}

:is(.page-id-111,.page-id-112,.page-id-113,.page-id-126,.page-id-127) .expatchina-footer-navigation__inner {
  width: min(100%,1376px);
  max-width: 1376px;
  margin-inline: auto;
}

:is(.page-id-111,.page-id-112,.page-id-113,.page-id-126,.page-id-127) .site-footer,
:is(.page-id-111,.page-id-112,.page-id-113,.page-id-126,.page-id-127) .site-info {
  background: #5bb8b5;
}

:is(.page-id-111,.page-id-112,.page-id-113,.page-id-126,.page-id-127) .site-info {
  min-height: 62px;
  padding: 20px 24px;
  color: #fff;
}

body:is(.page-id-111,.page-id-112,.page-id-113,.page-id-126,.page-id-127) .site-footer .site-info {
  background: #5bb8b5 !important;
  color: #fff !important;
}

@media (max-width: 1180px) {
  :is(.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ecv5-opening .ecv4-hero-grid {
    grid-template-columns: minmax(0,1.05fr) minmax(380px,.95fr);
    gap: 40px;
  }
  :is(.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ecv3-hero-copy h1 { font-size: clamp(50px,5.4vw,64px); }
  :is(.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ecv4-guide-intro .ecv3-prose-layout { grid-template-columns: 280px minmax(0,1fr); gap: 48px; }
  :is(.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ecv4-composition { grid-template-columns: minmax(260px,320px) minmax(0,1fr); gap: 48px; }
  :is(.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ec-b2-help-inner { grid-template-columns: minmax(0,.9fr) minmax(0,1.1fr); gap: 42px; }
}

@media (max-width: 900px) {
  :is(.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ecv5-opening { min-height: 0; padding-block: 54px; }
  :is(.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ecv5-opening .ecv4-hero-grid { grid-template-columns: minmax(0,1fr) minmax(300px,.78fr); gap: 32px; }
  :is(.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ecv3-hero-copy h1 { font-size: 48px; line-height: .98; letter-spacing: -3.3px; }
  .ec-b2-hero-visual { padding: 24px; }
  .ec-b2-hero-visual__title { font-size: 26px !important; line-height: 32px !important; }
  :is(.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ecv4-guide-intro { padding-block: 54px; }
  :is(.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ecv4-guide-intro .ecv3-prose-layout { grid-template-columns: 240px minmax(0,1fr); gap: 34px; }
  :is(.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ecv4-guide-intro .ec-b2-intro-title { font-size: 40px; letter-spacing: -2.4px; }
  :is(.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ecv4-section { padding-block: 54px; }
  :is(.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ecv4-composition { grid-template-columns: minmax(220px,280px) minmax(0,1fr); gap: 34px; }
  :is(.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ecv4-section-heading h2 { font-size: 36px; }
  .ec-b2-editorial-image { padding-block: 42px; }
  .ec-b2-editorial-image__inner { height: 340px; }
  :is(.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ec-b2-about-inner { grid-template-columns: minmax(0,300px) minmax(0,1fr); gap: 48px; }
  :is(.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ec-b2-help-inner { gap: 32px; }
  :is(.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ec-b2-help h2 { font-size: 36px; }
}

@media (max-width: 767px) {
  :is(.page-id-111,.page-id-112,.page-id-113,.page-id-126,.page-id-127) { --ec-b2-gutter: 24px; }
  :is(.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ecv5-opening { padding: 36px 24px 42px; }
  :is(.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ecv5-opening .ecv4-hero-grid { display: flex; flex-direction: column; gap: 28px; }
  :is(.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ecv3-hero-copy h1 { max-width: 100%; font-size: 44px; line-height: .98; letter-spacing: -3px; }
  :is(.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ecv3-deck { font-size: 18px; line-height: 28px; }
  .ec-b2-hero-visual { padding: 24px; }
  .ec-b2-hero-visual__row { grid-template-columns: minmax(0,1fr); gap: 5px; }
  .ec-b2-hero-visual__row span { text-align: left; }
  .ec-b2-hero-visual--documents .ec-b2-hero-visual__rows,
  .ec-b2-hero-visual--job .ec-b2-hero-visual__rows { grid-template-columns: minmax(0,1fr); }
  .ec-b2-hero-visual--documents .ec-b2-hero-visual__row,
  .ec-b2-hero-visual--job .ec-b2-hero-visual__row { min-height: 0; border-left: 0; border-top: 1px solid var(--ec-b2-border); }
  .ec-b2-hero-visual--documents .ec-b2-hero-visual__row:first-child,
  .ec-b2-hero-visual--job .ec-b2-hero-visual__row:first-child { border-top: 0; }
  :is(.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ecv4-guide-intro { padding: 36px 24px 42px; }
  :is(.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ecv4-guide-intro .ecv3-prose-layout { display: flex; flex-direction: column; gap: 28px; }
  :is(.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ecv3-toc { position: static; width: 100%; padding: 22px 20px; }
  :is(.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ecv3-toc a { font-size: 15px; line-height: 23px; }
  :is(.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ecv4-guide-intro .ec-b2-intro-title { font-size: 38px; line-height: 1; letter-spacing: -2.2px; }
  body.page-id-111 .ec-v2-phase2 .ec-visa-exact-intro-title { font-size: 38px !important; line-height: 1 !important; letter-spacing: -2.2px !important; }
  :is(.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ecv4-section,
  .page-id-127 .ec-b2-contract-anchor { padding: 42px 24px; }
  :is(.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ecv4-composition { display: flex; flex-direction: column; gap: 24px; }
  :is(.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ecv4-section-heading h2 { font-size: 36px; letter-spacing: -2px; }
  :is(.page-id-112 #start-with-the-four-document-overview,.page-id-113 #build-the-pack-from-real-use-cases,.page-id-126 #check-the-lawful-route-before-investing-in-an-application) .ecv4-section-heading h2,
  .ec-b2-contract-anchor h2 { font-size: 42px; letter-spacing: -2.5px; }
  :is(.page-id-111,.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ecv3-copy-table { min-width: 680px; }
  .page-id-113 #build-the-pack-from-real-use-cases .ecv4-key-statement + ul,
  .page-id-126 #check-the-lawful-route-before-investing-in-an-application .ecv4-section-body > ul:first-of-type,
  .page-id-127 #read-salary-currency-and-payment-terms-literally .ecv4-section-body > ul,
  .page-id-127 #check-termination-final-records-and-the-dispute-route .ecv4-section-body > ul,
  .ec-b2-contract-anchor__matrix { grid-template-columns: minmax(0,1fr); }
  .ec-b2-editorial-image { padding: 32px 24px; }
  .ec-b2-editorial-image__inner { width: 100%; height: 250px; }
  :is(.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ecv4-batch-related,
  :is(.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ec-b2-about,
  :is(.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ec-b2-help { padding: 42px 24px; }
  :is(.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ecv4-batch-related h2,
  :is(.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ec-b2-help h2 { font-size: 36px; letter-spacing: -2px; }
  :is(.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ecv4-batch-related .ecv3-related { grid-template-columns: minmax(0,1fr); }
  :is(.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ec-b2-about-inner { display: flex; flex-direction: column; gap: 12px; }
  :is(.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ec-b2-about-copy { display: flex; flex-direction: column; gap: 14px; }
  :is(.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ec-b2-about h2 { margin: 0; font-size: 30px; line-height: 36px; }
  :is(.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ec-b2-about-copy > p:not(.ec-b2-eyebrow) { margin: 0; }
  :is(.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ec-b2-about-links { margin-top: 6px; }
  :is(.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ec-b2-help-inner { display: flex; flex-direction: column; gap: 30px; align-items: stretch; }
  :is(.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ec-b2-help-actions { grid-template-columns: minmax(0,1fr); gap: 18px; }
  :is(.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ec-b2-help-card { min-height: 0; padding-top: 17px; border-top: 1px solid rgba(0,38,62,.35); }
  :is(.page-id-111,.page-id-112,.page-id-113,.page-id-126,.page-id-127) .expatchina-footer-navigation { padding: 56px 24px; }
}

@media (max-width: 420px) {
  :is(.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ecv3-hero-copy h1 { font-size: 40px; letter-spacing: -2.6px; }
  :is(.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ecv4-guide-intro .ec-b2-intro-title { font-size: 35px; letter-spacing: -2px; }
  :is(.page-id-112,.page-id-113,.page-id-126,.page-id-127) .ecv4-section-heading h2 { font-size: 33px; }
  :is(.page-id-112 #start-with-the-four-document-overview,.page-id-113 #build-the-pack-from-real-use-cases,.page-id-126 #check-the-lawful-route-before-investing-in-an-application) .ecv4-section-heading h2,
  .ec-b2-contract-anchor h2 { font-size: 38px; }
}
