/*
 * Shared typography roles for the local reference redesign.
 * This stylesheet changes presentation only: it does not alter content,
 * product fields, URLs, metadata, structured data, or language settings.
 */

:root {
  --pb-font-display: Italiana, Georgia, serif;
  --pb-font-ui: Manrope, Arial, sans-serif;
  --pb-font-body: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --pb-display-tracking: -.03em;
  --pb-body-leading: 1.6;
}

html,
body {
  font-family: var(--pb-font-body);
  font-kerning: normal;
  text-rendering: optimizeLegibility;
}

body :where(button, input, select, textarea),
.site-header,
.site-footer,
.site-notice,
.main-nav,
.quote-link,
.language-switcher,
.button,
.button-primary,
.button-secondary {
  font-family: var(--pb-font-ui);
}

main :where(h1, .page-title, .page-hero h1, .page-hero-detail h1, .product_title),
main :where(h2, .section-title, .section-head h2, .catalog-head h2, .content-narrow > h2) {
  font-family: var(--pb-font-display);
  font-weight: 400;
  letter-spacing: var(--pb-display-tracking);
  text-wrap: balance;
}

main :where(h3, h4, h5, h6, .product-title, .product-overview h2, .product-data-sheet h2),
main :where(.eyebrow, .section-kicker, .product-category, .product-meta strong),
.site-footer :where(h3, strong),
.site-notice {
  font-family: var(--pb-font-ui);
}

main :where(p, li, td, th, dt, dd, figcaption, .entry-content) {
  line-height: var(--pb-body-leading);
}

/* Older research templates carried a second Georgia-based editorial system.
 * Keep their hierarchy but bring its visible display role into the approved
 * Italiana/Manrope/Inter family used by the reference pages. */
body.research-library-page :is(.guide-dossier-heading h1, .research-library-stamp b, .research-index-heading h2, .research-library-item .research-card-copy h3, .guide-dossier-meta strong, .research-guide-page .research-guide-content h2),
body.post-type-archive-pl_guide :is(.guide-dossier-heading h1, .research-library-stamp b, .research-index-heading h2, .research-library-item .research-card-copy h3),
body.single-pl_guide :is(.guide-dossier-heading h1, .guide-dossier-meta strong, .research-guide-content h2) {
  font-family: var(--pb-font-display) !important;
  font-weight: 400 !important;
  letter-spacing: var(--pb-display-tracking) !important;
}

html:lang(zh) body,
html:lang(zh) body :where(button, input, select, textarea, .site-header, .site-footer, .site-notice) {
  font-family: "Noto Serif SC", "Songti SC", STSong, serif;
}

html:lang(zh) main :where(h1, h2, .page-title, .page-hero h1, .page-hero-detail h1, .product_title) {
  font-family: "Noto Sans SC", "Noto Sans TC", "PingFang SC", "Microsoft YaHei", var(--pb-font-ui);
  letter-spacing: 0;
}

@media (max-width: 600px) {
  main :where(h1, .page-title, .page-hero h1, .page-hero-detail h1, .product_title) {
    letter-spacing: -.022em;
  }
}

/* Keep the reference master’s display role ahead of older, component-level
 * Manrope rules.  Interface labels and body copy remain sans-serif. */
html body :where(
  .about-lab-v2 .about-v2-hero h1,
  .about-lab-v2 .about-v2-section-head h2,
  .about-lab-v2 .about-v2-mission h2,
  .about-lab .about-lab-hero h1,
  .about-lab .about-section-heading h2,
  .about-lab .about-quality-copy h2,
  .about-lab .about-serve h2,
  .about-lab .about-compliance h2,
  .about-lab .about-final-cta h2,
  .about-media-showcase-heading h2
) {
  font-family: var(--pb-font-display) !important;
  font-weight: 400 !important;
  letter-spacing: var(--pb-display-tracking) !important;
}

html:lang(zh) body :where(
  .about-lab-v2 .about-v2-hero h1,
  .about-lab-v2 .about-v2-section-head h2,
  .about-lab-v2 .about-v2-mission h2,
  .about-lab .about-lab-hero h1,
  .about-lab .about-section-heading h2,
  .about-lab .about-quality-copy h2,
  .about-lab .about-serve h2,
  .about-lab .about-compliance h2,
  .about-lab .about-final-cta h2,
  .about-media-showcase-heading h2
) {
  font-family: "Noto Serif SC", "Songti SC", STSong, serif !important;
  letter-spacing: 0 !important;
}
