/* Reset + base typography */

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

html,
body,
div,
span,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
figure,
figcaption,
ul,
ol,
li,
a,
img,
video,
button,
input,
textarea {
  margin: 0;
  padding: 0;
  border: 0;
  font: inherit;
  vertical-align: baseline;
}

ul,
ol {
  list-style: none;
}

img,
video {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
  background: none;
  color: inherit;
}

html {
  scroll-behavior: smooth;
}

section[id] {
  scroll-margin-top: 88px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: var(--space-2) var(--space-3);
  background: var(--color-deep-blue);
  color: var(--color-white);
}

.skip-link:focus {
  left: var(--space-3);
}

body {
  font-family: var(--ff-body);
  font-size: var(--fs-base);
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
  font-family: var(--ff-heading);
  font-weight: 500;
  line-height: 1.15;
  color: var(--color-text);
}

h1 {
  font-size: var(--fs-4xl);
}

h2 {
  font-size: var(--fs-3xl);
}

h3 {
  font-size: var(--fs-2xl);
}

h4 {
  font-size: var(--fs-xl);
}

p {
  max-width: 60ch;
}

@media (max-width: 640px) {
  h1 {
    font-size: var(--fs-3xl);
  }
  h2 {
    font-size: var(--fs-2xl);
  }
}

/* Subscript that does not disturb line-height */
sub { font-size: .62em; line-height: 0; vertical-align: baseline; position: relative; bottom: -.14em; letter-spacing: 0; }
