/* ============================================================
   Base — reset and html/body defaults
   ============================================================ */

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

html {
  font-size: var(--root-size);
  scroll-padding-top: var(--scroll-offset);
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-body);
  line-height: var(--leading-body);
  color: var(--color-ink);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

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

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

ul[class],
ol[class] {
  list-style: none;
  padding: 0;
}

::selection {
  background-color: var(--color-cobalt);
  color: var(--color-on-cobalt);
}

:focus-visible {
  outline: var(--border-w2) solid var(--color-cobalt);
  outline-offset: var(--outline-offset);
  border-radius: var(--radius-sm);
}
