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

html {
  color-scheme: light;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--text-body);
  line-height: var(--leading-body);
}

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

h1,
h2,
h3,
h4 {
  line-height: var(--leading-heading);
  overflow-wrap: anywhere;
  margin: 0 0 var(--space-3);
}

h1 { font-size: var(--text-h1); }
h2 { font-size: var(--text-h2); }
h3 { font-size: var(--text-h3); }

p {
  margin: 0 0 var(--space-4);
  overflow-wrap: anywhere;
}

a {
  color: var(--color-accent);
}

a:hover {
  color: var(--color-accent-strong);
}

:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: var(--space-2);
  transform: translateY(-150%);
  background: var(--color-surface);
  color: var(--color-text);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-1);
  z-index: 30;
}

.skip-link:focus {
  transform: none;
}

table {
  max-width: 100%;
}

pre {
  max-width: 100%;
  overflow-x: auto;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
