/* Modern reset. Layer order is declared in _global.css (loaded first). Element
   selectors use :where() so their defaults are zero-specificity (Fizzy-style)
   and any class overrides them without a specificity fight. */

@layer reset {
  *,
  *::before,
  *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }

  :where(html) {
    -webkit-text-size-adjust: 100%;
  }

  :where(body) {
    min-block-size: 100dvh;
    line-height: var(--leading-base);
  }

  :where(img, svg) {
    display: block;
    max-inline-size: 100%;
  }

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

  :where(button) {
    background: none;
    border: none;
    cursor: pointer;
  }

  :where(a) {
    color: inherit;
    text-decoration: none;
  }

  :where(ul) {
    list-style: none;
  }

  /* Reduced-motion: collapse transitions/animations, including the View
     Transitions crossfade (the pseudo-tree isn't reached by the `*` rule). */
  @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;
    }

    ::view-transition-group(*),
    ::view-transition-old(*),
    ::view-transition-new(*) {
      animation: none !important;
    }
  }
}
