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

  /* Remove default margins */
  *:not(dialog) {
    margin: 0;
  }

  /* Prevent font size change in mobile Safari landscape mode */
  html {
    -moz-text-size-adjust: none;
    -webkit-text-size-adjust: none;
    text-size-adjust: none;
  }

  /* Prevent horizontal scrolling */
  html, body {
    overflow-x: clip;
  }

  /* Set body defaults */
  body {
    min-height: 100vh;
    min-height: 100dvh;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }

  /* Set shorter line heights on headings */
  h1, h2, h3, h4, h5, h6 {
    line-height: 1.1;
  }

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

  /* Pretty text wrapping on paragraphs */
  p {
    text-wrap: pretty;
  }

  /* Balance text wrapping on headings */
  h1, h2, h3, h4, h5, h6 {
    text-wrap: balance;
  }

  /* Prevent overflow of long words, URLs,... */
  div, li, p, h1, h2, h3, h4, h5, h6 {
    overflow-wrap: break-word;
  }

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

  a {
    color: inherit;
    text-decoration: none;
  }

  /* Use cursor: pointer for active buttons */
  button,
  [type="button"],
  [type="submit"],
  [type="reset"],
  [role="button"],
  summary {
    cursor: pointer;
  }

  /* No cursor for disabled buttons */
  button:disabled,
  [type="button"]:disabled,
  [type="submit"]:disabled,
  [type="reset"]:disabled,
  [role="button"][aria-disabled="true"] {
    cursor: not-allowed;
  }

  @media (prefers-reduced-motion: no-preference) {
    html {
      interpolate-size: allow-keywords;
      scroll-behavior: smooth;
    }
  }

  /* Remove all animations and transitions for people that prefer reduced motion */
  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.01ms !important;
      scroll-behavior: auto !important;
    }
  }
}