/* ==========================================================================
   reset.css - a small modern reset. Removes browser defaults that get in
   the way, keeps the ones that help (focus rings, list semantics).
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

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

body {
  min-height: 100dvh;
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-size: inherit;
  font-weight: inherit;
  overflow-wrap: break-word;
}

p,
li,
dd,
dt,
td,
th,
figcaption {
  overflow-wrap: break-word;
}

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

img,
video {
  height: auto;
}

svg {
  fill: none;
}

/* Lists keep their bullets unless role="list" says the list is structural */
ul[role="list"],
ol[role="list"] {
  padding: 0;
  list-style: none;
}

/* Form controls inherit the page font and colour */
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
}

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

button,
[role="button"],
summary {
  -webkit-tap-highlight-color: transparent;
}

summary {
  cursor: pointer;
}

textarea {
  resize: vertical;
}

fieldset {
  padding: 0;
  border: 0;
  min-inline-size: 0;
}

legend {
  padding: 0;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

address {
  font-style: normal;
}

[hidden] {
  display: none !important;
}

/* One focus style for the whole site, driven by --color-focus so dark
   surfaces can swap it (see .on-dark in global.css) */
:focus-visible {
  outline: var(--focus-ring-w) solid var(--color-focus);
  outline-offset: var(--focus-ring-offset);
  border-radius: var(--radius-sm);
}

/* Buttons and links on the green accent keep the ring visible against both
   the green and the surface behind it */
.btn--primary:focus-visible {
  outline-color: var(--color-primary-dark);
  box-shadow: 0 0 0 var(--focus-ring-offset) var(--color-surface);
}

:focus:not(:focus-visible) {
  outline: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

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