/* Site-wide typography pass: spacing, line height and line breaks. Loaded last so it settles every page. */
body {
  font-size: clamp(15px, 0.84vw, 16px);
  line-height: 1.65;
  letter-spacing: 0;
  word-spacing: 0.02em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* headings: slightly tight tracking, compact leading, balanced line breaks */
h1,
h2,
h3,
h4,
h5,
h6 {
  word-spacing: 0;
  text-wrap: balance;
}
h1,
h2 {
  line-height: 1.15;
}
h3,
h4 {
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.ul-2-banner-title {
  letter-spacing: -0.035em;
  line-height: 1.08;
}
.ul-2-section-title,
.ul-section-title,
.as-title,
.ab-h2 {
  letter-spacing: -0.025em;
  line-height: 1.15;
}
.ul-breadcrumb-title {
  letter-spacing: -0.02em;
  line-height: 1.12;
}
.ul-history-slide-title {
  letter-spacing: -0.01em;
}

/* body copy: comfortable leading and no single word left alone on the last line */
p,
li,
.ul-2-banner-descr {
  text-wrap: pretty;
}
main p {
  line-height: 1.7;
}
.ul-2-banner-descr {
  line-height: 1.6;
}

/* small uppercase labels need open tracking to stay readable */
.as-eyebrow,
.ul-2-section-sub-title,
.ul-section-sub-title {
  letter-spacing: 0.14em;
}

/* buttons and nav: even tracking, no squeezed words */
.ul-btn,
.as-btn,
.ul-header-nav a,
button {
  letter-spacing: 0.005em;
  word-spacing: 0.03em;
}

/* numbers line up in tables, results and tickers */
table,
.hm-sip-total,
.hm-numbers b {
  font-variant-numeric: tabular-nums;
}

/* phones: large headings lose some negative tracking so letters do not touch */
@media (max-width: 575px) {
  .ul-2-banner-title {
    letter-spacing: -0.025em;
    line-height: 1.1;
  }
  .ul-2-section-title,
  .ul-section-title,
  .as-title,
  .ab-h2 {
    letter-spacing: -0.015em;
    line-height: 1.2;
  }
  main p {
    line-height: 1.65;
  }
}

/* words never split across lines; a joined word like "Long-term" stays together */
h1, h2, h3, h4, h5, h6 {
  hyphens: manual;
  -webkit-hyphens: manual;
  overflow-wrap: normal;
  word-break: normal;
}
.nowrap {
  white-space: nowrap;
}
/* highlighted words wrap cleanly: the yellow mark follows each line */
h1 em,
h2 em {
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* phones: body paragraphs justified, last line left; no hyphenation so no broken words */
@media (max-width: 767px) {
  /* only running text: short lines inside cards, tiles, steps and lists stay left so no wide word gaps */
  main p:not([class*="card"] p, [class*="item"] p, [class*="step"] p, [class*="stop"] p, [class*="tile"] p, [class*="list"] p, [class*="cta"] p, [class*="way"] p, [class*="slide"] p, details p),
  .af-brand p {
    text-align: justify;
    text-justify: inter-word;
    hyphens: none;
    -webkit-hyphens: none;
  }
  /* centred blocks, short notes, cards and buttons keep their own alignment */
  main [class*="center"] p,
  .hm-head.is-center p,
  .ab-people-head p,
  .hm-sip-note,
  .hm-ticker-note,
  .hm-numbers p,
  .ul-404-descr,
  .ul-breadcrumb p,
  .hm-cta p,
  .ac2-done p {
    text-align: inherit;
  }
}
