/*
 * English typography, visually calibrated against Circle's CircularXX system.
 * DM Sans is an OFL-licensed approximation, not CircularXX or an exact match.
 * Keep component geometry and Chinese glyph sizing/weights component-owned.
 */
@font-face {
  font-family: "DM Sans";
  src: url("assets/fonts/dm-sans/DM-Sans-variable.ttf") format("truetype");
  font-style: normal;
  font-weight: 100 1000;
  font-display: swap;
}
:root {
  --font-latin: "DM Sans", -apple-system, system-ui, "Segoe UI", sans-serif;
  --font-mixed: "DM Sans", "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --font-optical-text: "opsz" 32;
  --font-optical-display: "opsz" 40;
  --font-weight-heading: 650;
}
html[lang="en"] body,
html[lang="zh-CN"] body {
  font-family: var(--font-mixed);
  font-weight: 400;
  font-optical-sizing: none;
  font-variation-settings: var(--font-optical-text);
  font-synthesis: none;
}
html[lang="en"] body { font-family: var(--font-latin); }
button, input, select, textarea { font-family: inherit; }
/* DM Sans has no Han glyphs: Chinese continues using the original fallback. */
html[lang="zh-CN"] :is(h1, h2, h3, h4) { font-family: inherit; font-weight: 600; }
.connection-desktop svg text,
.world-map-svg text { font-family: var(--font-mixed); }
/* XHTML inside foreignObject inherits the SVG group's Arial presentation attribute. */
.connection-desktop svg foreignObject .centered-foundation-row { font-family: var(--font-mixed); }
.evidence-number-grid strong,
.metric-currency { font-family: var(--font-latin); font-optical-sizing: none; }
.evidence-number-grid strong { font-weight: 300; font-variation-settings: var(--font-optical-display); }

/* Use real variable weights. CircularXX Medium is visibly heavier than DM 500. */
html[lang="en"] :is(h1, h2, h3, h4) {
  font-family: inherit;
  font-weight: var(--font-weight-heading);
  font-variation-settings: var(--font-optical-display);
  overflow-wrap: break-word;
}
html[lang="en"] h1 { line-height: 1.1; letter-spacing: -1.5px; }
html[lang="en"] h2 { line-height: 1.18; letter-spacing: -.8px; }
html[lang="en"] h3 { line-height: 1.3; letter-spacing: -.4px; }
html[lang="en"] h4 { font-weight: 600; letter-spacing: -.2px; }
html[lang="en"] .page-head h1 { font-size: clamp(48px, 5.4vw, 72px); }
html[lang="en"] .page-head p { font-size: 22px; line-height: 1.4; letter-spacing: -.35px; }
html[lang="en"] .national-content { max-width: 1160px; }
html[lang="en"] .national-content h1 {
  font-size: clamp(44px, 6.25vw, 80px);
  line-height: 1.1;
  letter-spacing: -1.5px;
  max-width: 1040px;
}
html[lang="en"] .national-content h1 span { white-space: normal; }
html[lang="en"] .national-content p {
  font-size: 24px;
  line-height: 1.3;
  letter-spacing: -.5px;
  max-width: 800px;
}
/* Split editorials retain their narrower measure rather than adopting hero 80px. */
html[lang="en"] .about-opening-copy h1 { font-size: clamp(40px, 4.1vw, 58px); line-height: 1.1; }
html[lang="en"] .about-opening-copy p { font-size: 18px; line-height: 1.45; letter-spacing: -.2px; }
html[lang="en"] .practice-opening-copy h1 { font-size: 44px; line-height: 1.16; letter-spacing: -1px; }
html[lang="en"] .lnb-opening h1 { font-size: 48px; line-height: 1.12; }
html[lang="en"] :is(.practice-opening-copy > p, .lnb-opening-copy > p) { font-size: 18px; line-height: 1.5; letter-spacing: -.2px; }
html[lang="en"] :is(.card p, .about-brand-role p, .industry-application p, .topic-grid p, .support-role p, .support-principles p) {
  font-size: 16px;
  line-height: 1.55;
  letter-spacing: -.1px;
}
html[lang="en"] :is(.btn, .nav-cta) { font-size: 16px; font-weight: 700; line-height: 1.1; letter-spacing: -.04em; }
/* Language qualifiers are one unit; narrow practice CTAs may wrap the unit, not its dot. */
html[lang="en"] .btn .detail-language { white-space: nowrap; flex-shrink: 0; }
html[lang="en"] .practice-opening-copy .btn { flex-wrap: wrap; column-gap: .5em; row-gap: .2em; max-width: 100%; }
html[lang="en"] .text-link { font-weight: 600; letter-spacing: -.2px; }
html[lang="en"] nav { font-size: 16px; line-height: 1.125; gap: 17px; }
html[lang="en"] nav a { font-weight: 500; letter-spacing: normal; }
html[lang="en"] nav .nav-cta { font-weight: 700; letter-spacing: -.04em; }
html[lang="en"] :is(.eyebrow, .footer-eyebrow) { font-weight: 600; }
html[lang="en"] .functional-footer .footer-directory h2 { font-weight: 500; line-height: 1.4; letter-spacing: .06em; }

/* Seven English labels need more room than Chinese at the same readable size. */
@media (min-width: 1101px) and (max-width: 1359px) {
  html[lang="en"] nav { font-size: 14px; gap: 13px; }
  html[lang="en"] nav .nav-cta { font-size: 14px; padding-inline: 13px !important; }
  html[lang="en"] .premium-header .nav-wrap { gap: 13px; }
}
@media (max-width: 1100px) {
  html[lang="en"] nav { font-size: 16px; line-height: 1.4; gap: 0; }
  html[lang="en"] .practice-opening-copy h1 { font-size: 38px; }
  html[lang="en"] .lnb-opening h1 { font-size: 42px; }
}
@media (min-width: 901px) and (max-width: 1100px) {
  html[lang="en"] .about-opening-copy h1 { font-size: 40px; }
  html[lang="en"] .about-opening-copy p { font-size: 16px; }
}
@media (max-width: 760px) {
  html[lang="en"] :is(h1, .page-head h1, .about-opening-copy h1) { font-size: 38px; line-height: 1.15; letter-spacing: -.8px; }
  html[lang="en"] .national-content h1 { font-size: clamp(36px, 10.25vw, 44px); line-height: 1.1; letter-spacing: -.8px; }
  html[lang="en"] .national-content p { font-size: 20px; line-height: 1.4; letter-spacing: -.25px; max-width: 480px; }
  html[lang="en"] .page-head p { font-size: 18px; line-height: 1.5; letter-spacing: -.2px; }
  html[lang="en"] :is(.practice-opening-copy h1, .lnb-opening h1) { font-size: 34px; line-height: 1.16; letter-spacing: -.8px; }
  html[lang="en"] :is(.practice-opening-copy > p, .lnb-opening-copy > p, .about-opening-copy p) { font-size: 17px; line-height: 1.5; }
  html[lang="en"] .btn { font-size: 15px; line-height: 1.2; }
  html[lang="en"] .national-content .eyebrow { max-width: 100%; line-height: 1.5; }
}
@media (max-width: 389px) {
  html[lang="en"] :is(.page-head h1, .about-opening-copy h1) { font-size: 34px; }
  html[lang="en"] :is(.practice-opening-copy h1, .lnb-opening h1) { font-size: 32px; }
}
