/* Shared type system, based on the approved homepage. */
:root {
  --sans: HouseSans, Arial, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --mono: HouseMono, 'Courier New', 'PingFang SC', 'Microsoft YaHei', monospace;
  --type-title-size: clamp(48px, 5.35vw, 78px);
  --type-title-leading: 1.03;
  --type-title-tracking: -.06em;
  --type-section-size: clamp(44px, 4.8vw, 69px);
  --type-section-leading: 1.03;
  --type-section-tracking: -.055em;
  --type-lead-size: 24px;
  --type-lead-leading: 1.4;
  --type-copy-size: 13px;
  --type-copy-leading: 1.9;
  --type-card-size: 30px;
  --type-card-leading: 1.15;
  --type-card-tracking: -.035em;
}

[lang=zh-CN] {
  --type-title-size: clamp(44px, 4.8vw, 69px);
  --type-title-leading: 1.22;
  --type-section-size: clamp(42px, 4.4vw, 64px);
  --type-section-leading: 1.2;
  --type-card-size: 27px;
  --type-card-leading: 1.35;
}

body,
body :is(h1, h2, h3, h4, input, select, textarea, .dialog-close) {
  font-family: var(--sans);
}

/* Compact labels retain the homepage's monospaced face; Chinese uses the
   same sans-serif fallback as the headings and copy on every route. */
body :is(.eyebrow, .breadcrumbs, .brand-name small, .header-cta,
  .text-link, .plan-term, .home-plan-term, .insight-read, .back-top) {
  font-family: var(--mono);
}

body:not([data-page=home]) .page-section h1,
[lang=zh-CN] body:not([data-page=home]) .page-section h1 {
  font-size: var(--type-title-size);
  font-weight: 600;
  line-height: var(--type-title-leading);
  letter-spacing: var(--type-title-tracking);
}

body:not([data-page=home]) :is(.section-heading h2, .faq h2, .page-cta h2) {
  font-size: var(--type-section-size);
  font-weight: 600;
  line-height: var(--type-section-leading);
  letter-spacing: var(--type-section-tracking);
}

body:not([data-page=home]) :is(.intro-copy .lead, .talent-lead) {
  font-size: var(--type-lead-size);
  font-weight: 600;
  line-height: var(--type-lead-leading);
  letter-spacing: -.03em;
  text-wrap: balance;
}

body:not([data-page=home]) :is(.intro-copy > p:not(.lead), .section-aside,
  .section-aside > p, .steps p, .insight-summary, .contact-intro > p:not(.eyebrow)) {
  font-size: var(--type-copy-size);
  line-height: var(--type-copy-leading);
}

body:not([data-page=home]) :is(.service h3, .price-card h3,
  .signature-row h3, .steps h3, .talent-tab > strong, .insight-title) {
  font-size: var(--type-card-size);
  font-weight: 600;
  line-height: var(--type-card-leading);
  letter-spacing: var(--type-card-tracking);
}

.membership .plan-desc {
  font-size: 12px;
  line-height: 1.8;
}

body:not([data-page=home]) :is(.plan-select, .button) {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: .04em;
}

/* Reading text and form labels keep their existing accessible sizes. */
body:not([data-page=home]) :is(.article-reading h2, .contact-form-body h2) {
  font-weight: 600;
  letter-spacing: var(--type-card-tracking);
}

@media (max-width: 900px) {
  :root { --type-lead-size: 21px; --type-card-size: 27px; }
  [lang=zh-CN] { --type-card-size: 25px; }
}

@media (max-width: 700px) {
  :root { --type-title-size: 52px; }
  [lang=zh-CN] { --type-title-size: 43px; }
}

@media (max-width: 600px) {
  :root {
    --type-title-size: 44px;
    --type-section-size: 43px;
    --type-lead-size: 22px;
    --type-card-size: 30px;
  }
  [lang=zh-CN] {
    --type-title-size: 39px;
    --type-section-size: 37px;
    --type-section-leading: 1.25;
    --type-card-size: 27px;
  }
}
