/*
 * Typography balance pass
 *
 * Keeps the existing page geometry and only normalizes type scale and rhythm.
 * This file intentionally loads after page-level styles, but must not alter
 * image/text column proportions defined by those page-level styles.
 */

:root {
  --type-body: .875rem;
  --type-lead: 1rem;
  --type-h3: 1.125rem;
  --type-nav: .9375rem;
  --type-cta: .8125rem;
  --type-eyebrow: .6875rem;
  --type-caption: .75rem;
  --type-footer: .875rem;
  --type-label: .8125rem;
  --type-input: .9375rem;
  --leading-body: 1.72;
  --leading-lead: 1.62;
}

/* Chinese display copy should fill the current line before wrapping. */
:root body main :is(h1, h2).type-flow {
  text-wrap: wrap !important;
  line-break: strict;
  word-break: normal;
  overflow-wrap: normal;
}

:root body main :is(h1, h2).type-flow > span {
  display: inline !important;
  white-space: normal !important;
}

:root body main :is(h1, h2).type-flow > br {
  display: none;
}

/* Deliberate semantic lines from the annotated review. */
:root body main :is(h1, h2).type-flow.type-lines > .type-line {
  display: block !important;
  white-space: normal !important;
}

/* Keep the product-family statement on one line at the reviewed desktop size. */
.product-range-page .pr-families .pr-heading {
  max-width: 900px;
}

body { font-size: 16px; }
.main-nav { font-size: 15px; }
.site-header .main-nav .nav-link { font-size: 15px; }
.nav-dropdown a,
.nav-flyout a { font-size: 14px; }
.footer-nav-group a,
.footer-email { font-size: 14px; }

/* Project overview and project stories */
.projects-page .pj-hero h1 { font-size: clamp(32px, 2.7vw, 43px) !important; }
.pj-hero-copy > p:not(.pj-kicker),
.pj-section-intro > p:not(.pj-kicker),
.pj-support-copy > p:not(.pj-kicker) { font-size: 14px; }
.pj-section-intro h2,
.pj-support h2 { font-size: clamp(32px, 2.7vw, 43px); }
.pj-featured-copy h3,
.pj-card h3 { font-size: 19px; }
.pj-location { font-size: 11px; }
.pj-description { font-size: 12px; line-height: 1.65; }
.pj-tags li { font-size: 8px; }
.pj-type h3 { font-size: 16px; }
.pj-card h3 { font-size: 15px; }

.case-detail h2 { font-size: clamp(28px, 2.55vw, 40px); }
.case-copy > p:not(.case-kicker),
.case-support > div > p:not(.case-kicker) { font-size: 14px; line-height: 1.8; }
.case-hero h1 { font-size: clamp(35px, 3.15vw, 50px); }
.case-hero h2 { font-size: clamp(25px, 2.05vw, 34px); }
.case-body { font-size: 13px; }

/* Technology overview */
.tech h2 { font-size: clamp(34px, 3.7vw, 54px); }
.tech-copy,
.tech-copy p { font-size: 14px; line-height: 1.75; }
.tech-hero h1 { font-size: clamp(48px, 5.4vw, 78px); }
.tech-lead { font-size: 16px; line-height: 1.7; }
.tech-definition { font-size: 18px; }
.tech-number-list strong,
.tech-trio strong,
.tech-checklist strong,
.tech-docs strong { font-size: 18px; }
.tech-number-list p,
.tech-trio p,
.tech-checklist p,
.tech-docs p { font-size: 13px; line-height: 1.65; }
.tech-terms span { font-size: 15px; }
.tech-stages strong { font-size: 18px; }
.tech-stages p { font-size: 13px; }
.tech-project-grid strong { min-height: 36px; font-size: 18px; }
.tech-project-grid p { min-height: 66px; font-size: 13px; line-height: 1.65; }

/* Product range */
.pr-heading h2,
.pr-hero h1 { font-size: clamp(32px, 2.8vw, 43px); }
.pr-heading > p:last-of-type,
.pr-hero .pr-intro { font-size: 14px; line-height: 1.75; }
.pr-text-link { font-size: 13px; }
.pr-family-card > strong { font-size: 17px; }
.pr-card-description,
.pr-capability-copy > span:not(.pr-card-meta):not(.pr-card-link) { font-size: 12px; }
.pr-capability-copy > strong { font-size: 16px; }
.pr-path h3 { font-size: 16px; }
.pr-path > p:not(.pr-path-label):not(.pr-path-note) {
  min-height: 78px;
  font-size: 12px;
  line-height: 1.72;
}
.pr-path-note { font-size: 10px; }
.pr-process li,
.pr-path-guidance { font-size: 9px; }

/* Application overview and application detail pages */
.applications-page .ap-hero h1 { font-size: clamp(34px, 2.55vw, 39px) !important; }
.ap-applications-heading h2 { font-size: clamp(34px, 2.85vw, 44px); }
.ap-hero-intro { font-size: 14px; line-height: 1.78; }
.ap-applications-heading > p:last-child { font-size: 15px; }
.ap-application h3 { font-size: clamp(19px, 1.4vw, 22px); }
.ap-application-copy p { font-size: 13px; }

.cm-hero h1 { font-size: clamp(34px, 2.55vw, 39px); }
.art-culture-page .ac-hero h1 { font-size: clamp(34px, 2.55vw, 39px); }
.cm-lead { font-size: 14px; line-height: 1.74; }
.cm-section-heading h2,
.cm-support h2 { font-size: clamp(32px, 2.85vw, 42px); }
.cm-method h3,
.cm-use h3,
.cm-technology-points h3 { font-size: 18px; }
.cm-method > p:last-child,
.cm-use > p:last-child,
.cm-technology-points li > div > p:last-child { font-size: 13px; }
.cm-projects .cm-section-heading h2 { font-size: clamp(31px, 2.45vw, 36px); }
.cm-project h3 { font-size: 17px; }
.cm-project > p:not(.cm-project-type) { min-height: 62px; font-size: 12px; }
.cm-project-information li strong { font-size: 14px; }
.cm-project-information li > span:last-child { font-size: 13px; }
.cm-info-output { font-size: 14px; }

@media (max-width: 900px) {
  .tech-copy { font-size: 14px; }
}

@media (max-width: 820px) {
  .main-nav { font-size: inherit; }
  .site-header .main-nav .nav-link { font-size: 22px; }
  .nav-dropdown a,
  .nav-flyout a { font-size: 15px; }
}

@media (max-width: 800px) {
  .ap-hero-intro { font-size: 15px; }
}

@media (max-width: 700px) {
  :root {
    --type-body: .9375rem;
    --type-lead: 1rem;
    --type-h3: 1.125rem;
  }
  body { font-size: 15px; }
  .cm-lead { font-size: 14px; }
  .applications-page .ap-hero h1,
  .cm-hero h1,
  .art-culture-page .ac-hero h1 { font-size: clamp(30px, 8vw, 34px) !important; }
  .cm-section-heading h2,
  .cm-support h2,
  .cm-technology .cm-section-heading h2,
  .cm-projects .cm-section-heading h2 { font-size: clamp(29px, 7.6vw, 33px); }
  .pr-heading > p:last-of-type,
  .pr-hero .pr-intro { font-size: 14px; }
}
