/* reset.css — the smallest reset that removes browser inconsistency without
   removing browser behaviour. Nothing here is decorative. */

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

/* Margin is applied deliberately in base.css, never inherited from the UA. */
html, body, h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd, ol, ul, fieldset {
  margin: 0;
  padding: 0;
}

/* Only a classed list loses its markers; a bare <ul> in prose keeps them. */
ul[class], ol[class] { list-style: none; }

html {
  -webkit-text-size-adjust: 100%;  /* stop iOS inflating text in landscape */
  -moz-text-size-adjust: 100%;
       text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  min-height: 100svh;
  text-rendering: optimizeSpeed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Replaced elements behave like blocks and never overflow their column. */
img, picture, video, canvas, svg, iframe {
  display: block;
  max-width: 100%;
}
img, video { height: auto; }

/* Form controls do not inherit type by default; make them. */
input, button, textarea, select {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
}
button { background: none; border: 0; }
textarea { resize: vertical; }

/* Long unbreakable strings must not blow out the layout. */
p, li, h1, h2, h3, h4, dd, dt, figcaption, blockquote { overflow-wrap: break-word; }

/* Anchors are styled per context; only underline offset is normalised. */
a { color: inherit; text-underline-offset: 0.16em; }

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

/* Honour the OS setting. Animation is enhancement, never information. */
@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;
  }
}

/* Visually hidden but available to assistive technology. */
.visually-hidden:not(:focus):not(:active) {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

[hidden] { display: none !important; }
