/* Shared Chinese site typography, matched by content role across pages. */
@font-face {
  font-family: 'HarmonyOS Sans SC';
  src: url('fonts/HarmonyOS-Sans-SC-zh.woff2?v=20261123-intro') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

html[lang='zh-CN'] {
  --zh-font: Inter, 'HarmonyOS Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --type-display: clamp(34px, calc(8px + 4.45vw), 72px);
  --type-section: clamp(30px, calc(6px + 3.2vw), 52px);
  --type-feature: clamp(21px, calc(7px + 1.6vw), 30px);
  --type-card: clamp(18px, 1.55vw, 22px);
  --type-metric: clamp(19px, calc(10px + 2.1vw), 40px);
  --type-body: 15px;
  --type-lead: 16px;
  --type-control: 13px;
  --type-label: 11px;
  --type-note: 12px;
}

html[lang='zh-CN'] body {
  font-family: var(--zh-font);
  font-size: var(--type-body);
}

/* English product names keep the shared homepage and product page styles. */
html[lang='zh-CN'] :is(h1, h2, h3, h4):not(:where(.apex-hero h1, .product-stage h3)) {
  font-family: var(--zh-font);
  font-weight: 500;
  letter-spacing: .015em;
  text-wrap: balance;
  overflow-wrap: break-word;
  line-break: strict;
}

html[lang='zh-CN'] :is(main h1, .page-hero h1, .company-statement h1, .legal-hero h1):not(:where(.apex-hero h1)) {
  font-size: var(--type-display);
  line-height: 1.2;
}

html[lang='zh-CN'] main :is(h2, .product-section-title) {
  font-family: var(--zh-font);
  font-size: var(--type-section);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: .015em;
}

html[lang='zh-CN'] main :is(h3, h4, .choice-title, .resource-quicklinks h3):not(:where(.product-stage h3)) {
  font-family: var(--zh-font);
  font-size: var(--type-card);
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: .015em;
}

html[lang='zh-CN'] main :is(
  .apex-hero h2, .validation-copy h3, .developer-copy h3,
  .demo-info h3, .application-story-copy h3, .resource-feature h3,
  .capability-heading h3
) {
  font-size: var(--type-feature);
  line-height: 1.35;
}

html[lang='zh-CN'] .hero-intro {
  font-family: var(--zh-font);
  font-size: var(--type-feature);
  letter-spacing: .015em;
  margin-bottom: 16px;
}
/* Instrument-style figures use the VI display font. */
html[lang='zh-CN'] :is(.orbitron-numerals, .metric-number, .choice-proof) {
  font-family: 'Orbitron Numerals', var(--zh-font);
}
html[lang='zh-CN'] .apex-metrics strong {
  font-size: var(--type-metric);
  font-weight: 400;
  white-space: nowrap;
}
html[lang='zh-CN'] :is(.product-specs, .apex-metrics) strong > .metric-unit {
  font-family: var(--zh-font);
  font-size: var(--type-label);
  letter-spacing: normal;
}
html[lang='zh-CN'] main :is(.product-specs > div > span, .apex-metrics p) {
  font-size: var(--type-note);
  letter-spacing: normal;
  line-height: 1.55;
}
html[lang='zh-CN'] .metric-number { white-space: nowrap; }

html[lang='zh-CN'] main :is(
  p:not(.eyebrow, .hero-intro, .product-label, .meta, .note),
  .choice-body, .legal-copy li
) {
  font-family: var(--zh-font);
  font-size: var(--type-body);
  line-height: 1.85;
  letter-spacing: normal;
}

html[lang='zh-CN'] main :is(
  .page-hero .lead, .hero-description, .apex-hero .lead,
  .legal-intro, .mission-copy > .mission-statement, .company-statement p
) {
  font-size: var(--type-lead);
  line-height: 1.85;
}

@media (min-width: 761px) {
  html[lang='zh-CN'] .apex-hero .lead { max-width: 32em; }
}

html[lang='zh-CN'] :is(
  .eyebrow, .product-label, .resource-type, .value-number, .cap-image > span,
  .news-meta, .hero-bottom, .art-caption, .workflow-number
) {
  font-size: var(--type-label);
  line-height: 1.55;
  letter-spacing: .04em;
}

html[lang='zh-CN'] :is(
  main figcaption, main .caption-line, main .contact-options,
  main .demo-tags > span, main .demo-source, main .application-demo-source,
  main .application-story-copy .application-footnote, main .cap-note,
  main .spec-note, main .resource-status, main .validation-copy .service-design,
  .global-footer-address, .footer-social-panel
) {
  font-size: var(--type-note);
  line-height: 1.65;
}
html[lang='zh-CN'] main .application-story-copy .application-footnote {
  font-size: var(--type-note) !important; /* Matches the base footnote's important override. */
}

html[lang='zh-CN'] :is(
  .navigation a, .main-nav a, .nav-contact, .header-cta, .product-nav a,
  .button, .btn, .text-link, .hero-actions .button, .product-stage .button,
  .developer-copy .text-link, .global-footer-column h3, .global-footer-column a,
  .resource-status a, .resource-quicklinks a, .resource-download-actions a,
  .resource-library-links a, .filter-btn, .demo-tab, .product-demo-tabs button,
  .form-grid label, .legal-sidebar a, .testing-playback
) {
  font-family: var(--zh-font);
  font-size: var(--type-control);
  line-height: 1.55;
}
html[lang='zh-CN'] :is(.navigation a, .main-nav a, .nav-contact, .header-cta, .button, .btn, .text-link) {
  font-weight: 500;
}
html[lang='zh-CN'] .product-nav a { white-space: nowrap; }
html[lang='zh-CN'] :is(.global-footer-bottom, .footer-fineprint, .footer-legal-links, .footer-icp) {
  font-family: var(--zh-font);
  font-size: var(--type-label);
  line-height: 1.65;
}
html[lang='zh-CN'] .global-footer-brand .footer-tagline {
  font: 400 var(--type-body)/1.85 var(--zh-font);
}
html[lang='zh-CN'] .global-footer-brand > a img { width: 160px; height: auto; }
html[lang='zh-CN'] .global-footer-address { font-family: var(--zh-font); }
html[lang='zh-CN'] .announcement a { font-size: var(--type-label); letter-spacing: .04em; }
html[lang='zh-CN'] .value-item h4 { min-height: 0; margin-block: 20px 14px; white-space: nowrap; }
html[lang='zh-CN'] .testing-tab { font-family: var(--zh-font); }
html[lang='zh-CN'] main .legal-copy h2 {
  font-family: 'Orbitron Numerals', var(--zh-font);
  font-size: var(--type-card);
  line-height: 1.45;
}

@media (max-width: 1100px) {
  html[lang='zh-CN'] .navigation { gap: 20px; }
}

@media (max-width: 760px) {
  html[lang='zh-CN'] {
    --type-lead: 15px;
  }
  html[lang='zh-CN'] .hero-actions { gap: 16px; flex-wrap: wrap; }
  html[lang='zh-CN'] .announcement a, html[lang='zh-CN'] .announce-description { font-size: 10px; }
  html[lang='zh-CN'] main :is(.product-specs > div > span, .apex-metrics p) { font-size: var(--type-label); max-width: none; }
}

@media (max-width: 380px) {
  html[lang='zh-CN'] .announce-description { display: none; }
}

html[lang='zh-CN'] :is(main p, main figcaption, .choice-title, .choice-body) {
  line-break: strict;
  text-wrap: pretty;
}
.keep-phrase { white-space: nowrap; }
html[lang='zh-CN'] .hero-art .art-caption {
  inset-inline: 0;
  left: 0;
  justify-content: center;
  text-align: center;
}
.art-caption .caption-name {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
html[lang='zh-CN'] .art-caption .live-dot { margin: 0; }
html[lang='zh-CN'] .mission-title-accent { color: var(--red); }
html[lang='zh-CN'] .developer-copy > p:not(.eyebrow) { max-width: none; }

html[lang='zh-CN'] .global-footer-brand .footer-tagline {
  margin: 16px 0 12px;
  white-space: nowrap;
}
html[lang='zh-CN'] .global-footer-address { margin-top: 26px; }
.footer-social {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 13px;
}
.footer-social :is(summary, a) {
  display: grid;
  width: 41px;
  height: 41px;
  place-items: center;
  list-style: none;
  border: 1px solid #454545;
  border-radius: 50%;
  cursor: pointer;
}
.footer-social summary::-webkit-details-marker { display: none; }
.footer-social :is(summary, a):hover,
.footer-social details[open] summary { border-color: #aaa; }
.footer-social :is(summary, a):focus-visible { outline: 2px solid #f7f7f7; outline-offset: 3px; }
.footer-social .social-icon { display: block; width: 20px; height: 20px; }
.footer-social-panel {
  position: absolute;
  z-index: 2;
  inset-inline-start: 0;
  bottom: calc(100% + 8px);
  display: grid;
  justify-items: center;
  gap: 8px;
  width: max-content;
  padding: 12px;
  border-radius: 3px;
  background: #fff;
  color: #171717;
  box-shadow: 0 6px 24px #0005;
  font-size: 11px;
}
.footer-social-panel .social-qr { display: block; width: 156px; height: auto; }
.footer-social-panel .social-qr[src$=".png"] { image-rendering: pixelated; }

/* Keep small print readable against both light and dark surfaces. */
html[lang='zh-CN'] :is(
  main .eyebrow, .hero-copy > .eyebrow, .hero-intro, .hero-description, .hero-bottom, .hero-number,
  .art-caption, .caption-line, .mission-copy > .mission-statement,
  .product-stage-copy > p, .product-specs .metric-unit, .product-specs > div > span,
  .cap-text > p, .cap-proof > span, .capability-heading > p, .spec-context,
  .validation-copy > p, .validation-copy .service-design, .validation-media > span, .validation-checks li > span,
  .developer-copy > p, .developer-workflow p, .workflow-number, .contact-copy > p, .contact-options > span,
  .news-meta, .choice-label, .choice-proof > small, .testing-counter,
  .testing-directory-label, .testing-directory-label > span,
  .testing-tab-index, .testing-tab-category, .testing-tab-state,
  .tactile-facts > div > span, .tactile-layout figcaption, .tactile-layout .product-footnote,
  .drawing-topline > span, .connection-facts > span, .route-no, .route-label,
  .integration-route p, .route-tags > span, .integration-editorial-end > p,
  .resource-editorial-heading > p, .resource-kicker, .resource-feature > p,
  .resource-library-row p, .brochure-stage-label, .brochure-stage-edition,
  .application-demo-source, .flow-step > p, .discipline > span,
  .resource-type, .resource-status, .legal-intro, .legal-version, .legal-sidebar a
) { color: var(--muted); }

html[lang='zh-CN'] :is(
  .values-heading .eyebrow, .value-item .value-number, .value-item > p,
  .company-statement .eyebrow, .application-story-copy .eyebrow,
  .apex-metrics p, .apex-metrics .metric-unit, .spec-editorial .eyebrow,
  .spec-editorial .product-footnote, .product-demos .eyebrow,
  .cases .eyebrow, .demo-info .eyebrow, .demo-source, .demo-tab, .footer-fineprint
) { color: #b3b3b3; }
html[lang='zh-CN'] .legal-sidebar a:is([aria-current='page'], :hover) { color: var(--ink); }
html[lang='zh-CN'] .demo-tab[aria-selected='true'] { color: #fff; }
html[lang='zh-CN'] .demo-tab.active .orbitron-numerals { color: #ff7a7a; }

/* Use a single anchor offset for the sticky header, plus the product navigation. */
html[lang='zh-CN'] { scroll-padding-top: 100px; }
html[lang='zh-CN']:has(body[data-page='product']) { scroll-padding-top: 165px; }
html[lang='zh-CN'] body[data-page='product'] main > section[id],
html[lang='zh-CN'] .legal-copy > section,
html[lang='zh-CN'] :is(#brochures, #user-manual, #developer-resources),
html[lang='zh-CN'] .application-field-grid article { scroll-margin-top: 0; }
@media (max-width: 760px) {
  html[lang='zh-CN'] { scroll-padding-top: 84px; }
  html[lang='zh-CN']:has(body[data-page='product']) { scroll-padding-top: 143px; }
}

html[lang='zh-CN'] :is(#enquiry-form, .contact-form) button:disabled {
  opacity: .55;
  cursor: default;
}

html[lang='zh-CN'] .form-grid :is(input, select, textarea) {
  border-radius: 2px;
  font-family: var(--zh-font);
  font-size: var(--type-body);
  line-height: 1.4;
}
html[lang='zh-CN'] .form-grid :is(input, select) {
  height: 50px;
}
html[lang='zh-CN'] .form-grid select {
  appearance: none;
  padding: 10px 32px 10px 12px;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%),
    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: right 17px center, right 12px center;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}
html[lang='zh-CN'] .form-grid :is(input, textarea)::placeholder {
  color: var(--muted);
  opacity: 1;
}
@media (max-width: 760px) {
  html[lang='zh-CN'] .form-grid :is(input, select, textarea) { font-size: 16px; }
}
@media (forced-colors: active) {
  html[lang='zh-CN'] .form-grid select {
    appearance: auto;
    padding-inline-end: 12px;
    background-image: none;
  }
}
