/* Base: reset and typography of HTML elements. Colours, fonts and sizes come from tokens.css. */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--color-background);
  color: var(--color-text);
  font-family: var(--font-text);
  font-size: var(--size-medium);
  font-weight: var(--weight-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; height: auto; }

p, ul, ol, figure, blockquote { margin: 0 0 1rem; }

strong, b { font-weight: var(--weight-strong); }

a { color: inherit; text-decoration: none; }
a:hover { color: var(--color-accent); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }

h1, h2, h3, h4 {
  margin: 0 0 1rem;
  font-family: var(--font-heading);
  font-weight: var(--weight-heading);
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
h1 { font-size: var(--size-xx-large); line-height: 1.05; letter-spacing: -0.015em; }
h2 { font-size: var(--size-x-large); }
h3 {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

hr { border: 0; border-top: 1px solid var(--color-rule); margin: var(--space-section) 0; }

address { font-style: normal; }

figcaption, small { font-size: var(--size-small); color: var(--color-text-subtle); }

/* Links inside running text: underlined in red */
main :is(p, li) a:not(.more, .button) {
  text-decoration: underline;
  text-decoration-color: var(--color-accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
