/**
 * Modern CSS Reset
 * Accessibility-focused, based on Andy Bell's approach
 * https://andy-bell.co.uk/a-more-modern-css-reset/
 */

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

/* Remove default margin and padding */
* {
  margin: 0;
  padding: 0;
}

/* Prevent font size inflation */
html {
  -moz-text-size-adjust: none;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
}

/* Core body defaults */
body {
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Set shorter line heights on headings and interactive elements */
h1, h2, h3, h4,
button, input, label {
  line-height: 1.2;
}

/* Balance headings across multiple lines */
h1, h2, h3, h4 {
  text-wrap: balance;
}

/* Improve media defaults */
img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Inherit fonts for inputs and buttons */
input, button, textarea, select {
  font: inherit;
  color: inherit;
}

/* Textarea defaults */
textarea:not([rows]) {
  min-height: 10em;
}

/* Anything that has been anchored to should have scroll margin */
:target {
  scroll-margin-block: 5ex;
}

/* Remove list styles on ul, ol with a list role (nav lists, etc.) */
ul[role='list'],
ol[role='list'] {
  list-style: none;
}

/* A elements that don't have a class get default styles */
a:not([class]) {
  text-decoration-skip-ink: auto;
  color: currentColor;
}

/* Remove all animations, transitions and smooth scroll for people that prefer not to see them */
@media (prefers-reduced-motion: reduce) {
  html:focus-within {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Focus styles — visible and accessible */
:focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 3px;
}

/* Remove outline on mouse focus where :focus-visible is supported */
:focus:not(:focus-visible) {
  outline: none;
}

/* Table defaults */
table {
  border-collapse: collapse;
  border-spacing: 0;
}
