/* ==========================================================================
   Reset — minimal, opinionated only where the design system already decided.
   ========================================================================== */

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

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

body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
figure,
blockquote,
dl,
dd,
ol,
ul {
  margin: 0;
}

ul[class],
ol[class] {
  padding: 0;
  list-style: none;
}

h1,
h2,
h3,
h4 {
  font-weight: inherit;
  text-wrap: balance;
}

p,
li {
  text-wrap: pretty;
}

img,
picture,
svg,
video {
  display: block;
  max-width: 100%;
}

img,
video {
  height: auto;
}

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

button {
  background: none;
  border: 0;
  cursor: pointer;
}

table {
  border-collapse: collapse;
}

/* `hidden` must always win. Any author rule that sets `display` — a flex nav
   panel, an inline-flex footer button — otherwise beats the user-agent
   [hidden] rule and leaves the element on screen while it is still absent
   from the accessibility tree. That mismatch is the worst of both worlds.
   !important is a documented accessibility exception (08 §8.8). */
[hidden] {
  display: none !important;
}

/* Reduced motion — 03 §17.5. !important is permitted here (08 §8.8:
   accessibility utilities and reduced motion are documented exceptions). */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto !important;
  }

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

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