@import url("./tokens.css");

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Accessible label that stays out of the visual layout. */
.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;
}

html {
  min-width: 320px;
  background: var(--color-page);
  color: var(--color-text);
  font-family: var(--font-body);
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--color-page);
}

body.has-drawer {
  overflow: hidden;
}

main {
  padding-bottom: calc(92px + env(safe-area-inset-bottom));
}

html {
  scroll-padding-bottom: calc(92px + env(safe-area-inset-bottom));
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

img {
  display: block;
  max-width: 100%;
}

:focus-visible {
  outline: var(--border-emphasis) solid var(--color-focus);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media (min-width: 768px) {
  main {
    padding-bottom: var(--space-10);
  }

  html {
    scroll-padding-bottom: 0;
  }
}
