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

.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;
}

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-base);
  color: var(--color-foreground);
  background: var(--color-background);
}

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 var(--space-4);
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.25;
}

h1 { font-size: var(--text-3xl); line-height: var(--leading-3xl); font-weight: 700; }
h2 { font-size: var(--text-2xl); line-height: var(--leading-2xl); }
h3 { font-size: var(--text-xl); line-height: var(--leading-xl); }
h4 { font-size: var(--text-lg); line-height: var(--leading-lg); }

p, ul, ol, dl {
  margin: 0 0 var(--space-4);
  max-width: 65ch;
}

p:last-child, ul:last-child, ol:last-child, dl:last-child {
  margin-bottom: 0;
}

ul, ol {
  padding-left: var(--space-5);
}

a {
  color: var(--color-primary);
  text-decoration-thickness: 1px;
  text-underline-offset: .15em;
}

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

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

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

table {
  border-collapse: collapse;
}

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

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

:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--color-ring);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.on-dark :focus-visible {
  outline-color: var(--color-on-primary);
}

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  z-index: 1000;
  padding: var(--space-2) var(--space-4);
  background: var(--color-primary);
  color: var(--color-on-primary);
  border-radius: var(--radius-sm);
  text-decoration: none;
}

.skip-link:focus-visible {
  top: var(--space-4);
}

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

.icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
}

.icon--lg {
  width: 24px;
  height: 24px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
