/* ============================================================
   MODERN CSS RESET
   Adapted from Andy Bell's reset for Sorwatom.
   ============================================================ */

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

/* Remove default margin and padding from common block elements */
body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
figure,
blockquote,
dl,
dd,
ul,
ol,
fieldset,
legend,
pre {
  margin: 0;
  padding: 0;
}

/* Root height and scroll behaviour */
html {
  height: 100%;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

/* Body minimum height and font rendering */
body {
  min-height: 100%;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* Form elements inherit font */
input,
button,
textarea,
select {
  font: inherit;
}

/* Break long words */
p,
h1,
h2,
h3,
h4 {
  overflow-wrap: break-word;
}

/* Remove list styles on lists that carry role="list"
   (avoids VoiceOver quirk in Safari that strips list semantics
   when list-style is removed without this guard) */
ul[role="list"],
ol[role="list"] {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Remove default button appearance */
button {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

/* Remove default anchor colour/underline — components re-apply */
a {
  color: inherit;
  text-decoration: none;
}

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

/* Horizontal rule — reset */
hr {
  border: none;
  border-top: 1px solid currentColor;
}

/* Reduced motion — honour the system preference */
@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;
  }
}
