/* Base: resets, document defaults and utilities. Uses tokens only. */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }

body {
  background: var(--color-background);
  color: var(--color-text-primary);
  font-family: var(--font-body);
  font-size: var(--font-size-body);
  line-height: var(--line-height-body);
  font-weight: var(--font-weight-regular);
  -webkit-font-smoothing: antialiased;
}

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

:focus-visible {
  outline: var(--focus-ring-width) solid var(--color-focus);
  outline-offset: var(--focus-ring-offset);
}

::selection { background: var(--color-primary-subtle); color: var(--color-text-primary); }

/* Visually hidden, still read by screen readers (and used for copy-to-clipboard). */
.u-sr-only {
  position: absolute;
  width: var(--size-hairline);
  height: var(--size-hairline);
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Pushes following siblings to the far end of a flex row. */
.u-spacer { flex: 1; }

/* Reduced motion: replace movement with fades (Midnight). */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-property: opacity, background-color, border-color, color !important; }
}
