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

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--color-surface);
  color: var(--color-text);
  font: 16px / 1.5 var(--font-ui);
}

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

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

a {
  color: var(--color-accent);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.14em;
}

img,
svg {
  max-width: 100%;
}

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

body [hidden] {
  display: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  max-width: calc(100% - 1.5rem);
  padding: 0.5rem 0.75rem;
  border: 3px double var(--color-rule);
  background: var(--color-raised);
  color: var(--color-text);
  transform: translateY(calc(-100% - 1.5rem));
}

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

@media (prefers-reduced-motion: reduce) {
  html,
  body {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none;
    transition: none;
  }
}
