/* Responsive text sizes taken from the Technology page. */
:root {
  --type-title: clamp(32px,3.92vw,76px);
  --type-heading: clamp(24px,2.92vw,54.4px);
  --type-card-title: clamp(13.6px,1.48vw,26.4px);
  --type-lead: clamp(13.6px,1.52vw,28px);
  --type-body: clamp(12.8px,1.2vw,21.6px);
  --type-list: clamp(11.2px,1.144vw,20.8px);
  --type-eyebrow: clamp(8.8px,1.04vw,18.4px);
  --type-section-label: clamp(9.6px,1.32vw,22.4px);
  --type-action: clamp(8.8px,.96vw,16px);
  --type-text-link: clamp(10.4px,1.16vw,20px);
  --type-dialog-title: 25.6px;
  --type-dialog-body: 13.6px;
  --type-nav: clamp(12px,.83vw,14px);
}

@media (max-width:1000px) {
  :root { --type-list: 12.8px; --type-heading: 2.96vw; }
}
@media (max-width:650px) {
  :root {
    --type-title: clamp(28.8px,6.96vw,44.8px);
    --type-heading: clamp(22.4px,6.24vw,36.8px);
    --type-card-title: 15.2px;
    --type-lead: 14.4px;
    --type-body: 12.8px;
    --type-list: 12px;
    --type-eyebrow: 9.6px;
    --type-section-label: 9.6px;
    --type-action: 8.8px;
    --type-text-link: 12px;
  }
}
@media (max-width:1350px) { :root { --type-nav: 12px; } }
@media (max-width:1120px) { :root { --type-nav: 15px; } }

.site-header .site-nav > :is(a,span), .site-header .site-nav .about-toggle { font-size: var(--type-nav); }
@media (min-width:1121px) and (max-width:1250px) {
  .site-header .header-inner { padding-inline: 3%; gap: 12px; }
  .site-header .brand { width: 260px; }
  .site-header .site-nav { gap: 12px; }
}

/* Technology keeps its finer distinctions between project and benefit copy. */
body:not(.technology-page) #main-content h1 { font-size: var(--type-title); }
body:not(.technology-page) #main-content h2 { font-size: var(--type-heading); }
body:not(.technology-page) :is(#main-content,dialog) :is(h3,h4) { font-size: var(--type-card-title); }
body:not(.technology-page) #main-content :is(
  .who-card,.what-panel,.approach-step,.expertise-discipline,.story-milestone
) h2 { font-size: var(--type-card-title); }

body:not(.technology-page) #main-content :is(p,li,figcaption,.contact-detail div,.contact-fields input,.contact-fields textarea) {
  font-size: var(--type-body);
}
body:not(.technology-page) #main-content :is(.story-discipline li,.expertise-services li,.eco-services li) {
  font-size: var(--type-list);
}
body:not(.technology-page) #main-content :is(
  .hero-content > p,.who-copy > p:not(.who-eyebrow),.art-hero-copy > p:last-child,
  .what-introduction,.story-hero-description,.approach-introduction,.eco-introduction,
  .expertise-introduction,.team-introduction,.collab-introduction,.design-intro,
  .heritage-intro,.consult-intro,.brands-intro,.projects-intro,.insights-intro,.contact-intro
) { font-size: var(--type-lead); }
body:not(.technology-page) #main-content .story-lead { font-size: var(--type-heading); }
body:not(.technology-page) #main-content .story-year { font-size: var(--type-heading); }

body:not(.technology-page) :is(#main-content,dialog) :is(
  [class$="-eyebrow"],[class$="-number"],.art-subeyebrow,.insight-meta,
  .insights-dialog-label,.team-role,.story-role,.scroll-cue,.contact-form-note,
  .contact-map-note,.projects-hero-caption,.approach-discipline-nav,.what-discipline-nav
) { font-size: var(--type-eyebrow); }
body:not(.technology-page) #main-content :is(
  h2[class*="eyebrow"],[class*="section-title"],.insights-heading h2,
  .projects-heading h2,#verticals-title
) { font-size: var(--type-section-label); }

body:not(.technology-page) :is(#main-content,dialog) :is(
  .action-button,.story-button,.eco-explore,.what-explore,.who-brands-link,
  .collab-button,[class$="-cta"]
) { font-size: var(--type-action); }
body:not(.technology-page) :is(#main-content,dialog) :is(
  [class$="-all"],.art-project-link,.story-text-link,.design-link,.consult-link,.client-gallery summary
) { font-size: var(--type-text-link); }
#main-content .insight-read { font-size: inherit; }
#main-content .contact-fields :is(input,textarea) { box-sizing: border-box; min-width: 0; }

body:not(.technology-page) :is(#main-content dialog,dialog) h2 { font-size: var(--type-dialog-title); }
body:not(.technology-page) :is(#main-content dialog,dialog) :is(p:not([class$="-label"]):not([class$="-role"]),li,figcaption) {
  font-size: var(--type-dialog-body);
}

/* Long headings still wrap within their existing columns. */
#main-content :is(h1,h2,h3) { overflow-wrap: break-word; }
#main-content :is(.hero h1 span,.consult-hero h1 span,.what-panel-heritage h2,.expertise-discipline#heritage h2,.who-copy h1) {
  white-space: normal;
}
