/* ---------------------------------------------------------------------------
   Reset — replaces Bootstrap 3's reboot (122 KB) with ~2 KB.
   Normalises only what the design actually depends on.
   --------------------------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Headings and paragraphs inherit their scale from base.css; strip UA margins
   so spacing is always an explicit decision. */
h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd { margin: 0; }

/* :where() zeroes this rule's specificity.
   Written plainly, `ul[class], ol[class]` is (0,1,1) — an attribute selector
   plus an element — which BEATS any single-class component rule (0,1,0). Five
   rules in this theme were silently losing their padding to it, including the
   procedure carousel's 50px side padding and the footer's spacing; the symptom
   is a declaration that is present, served, last in the cascade, and still
   computes to 0.

   Inside :where() the same selector matches identically at specificity 0, so a
   component rule always wins. It still beats the browser default, because an
   author rule outranks the user-agent sheet whatever its specificity. */
:where(ul[class], ol[class]) { list-style: none; margin: 0; padding: 0; }

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

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

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

a { text-decoration: none; }

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

/* Visible keyboard focus. The original site suppresses outlines entirely,
   which is an accessibility defect — not reproduced. */
:focus-visible {
  outline: 2px solid var(--color-1);
  outline-offset: 2px;
}

/* Screen-reader-only helper, used by skip links and icon-only controls. */
.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.screen-reader-text:focus {
  position: static !important;
  width: auto; height: auto;
  margin: 0; clip: auto;
  white-space: normal;
}
