/* ============================================================
   MODERN CSS RESET
   Based on Andy Bell's "A (more) Modern CSS Reset"
   https://andy-bell.co.uk/a-more-modern-css-reset/
   ============================================================ */

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

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

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

/* Set core body defaults */
body {
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Remove list styles on ul, ol elements with a list role */
ul[role='list'],
ol[role='list'] {
  list-style: none;
}

/* Set shorter line heights on headings and interactive elements */
h1, h2, h3, h4, h5, h6 {
  line-height: 1.1;
  text-wrap: balance;
}

/* Paragraphs get text-wrap pretty */
p {
  text-wrap: pretty;
}

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

/* Make images easier to work with */
img,
picture,
svg,
video,
canvas {
  display: block;
  max-width: 100%;
}

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

/* Make sure textarea doesn't have a default resize behavior other than vertical */
textarea {
  resize: vertical;
}

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

/* 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;
  }
}

/* Remove default button styles */
button {
  cursor: pointer;
  background: none;
  border: none;
}

/* Remove default fieldset styles */
fieldset {
  border: none;
}

/* Remove the default table spacing */
table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* Smooth scrolling when reduced motion is not preferred */
html:focus-within {
  scroll-behavior: smooth;
}

/* Remove the outline on focused elements for mouse users,
   keep for keyboard users */
:focus:not(:focus-visible) {
  outline: none;
}

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

/* Ensure hidden elements are truly hidden */
[hidden] {
  display: none !important;
}

/* Remove default summary marker */
summary {
  cursor: pointer;
}

/* Remove default hr styling */
hr {
  border: none;
  border-top: 1px solid;
  color: inherit;
  height: 0;
  overflow: visible;
}
