/* ==========================================================================
   RESET — modern, opinionated, small.
   ========================================================================== */

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

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

body {
  margin: 0;
  min-height: 100%;
  overflow-x: hidden;
  background-color: var(--color-bg);
  color: var(--color-body);
  font-family: var(--font-body);
  font-size: var(--fs-lg);
  font-weight: var(--fw-normal);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Media behaves like a block and never overflows */
img, svg, video, canvas, audio, iframe, embed, object {
  display: block;
  max-width: 100%;
}
img, video { height: auto; }
svg { fill: currentColor; }

/* Inherit typography into form controls */
button, input, select, optgroup, textarea {
  font: inherit;
  color: inherit;
  margin: 0;
}
button { background: none; border: 0; padding: 0; cursor: pointer; }
button[disabled], input[disabled], select[disabled], textarea[disabled] {
  cursor: not-allowed;
}
textarea { resize: vertical; overflow: auto; }
::placeholder { color: var(--color-meta); opacity: 1; }

/* Remove list styling only where a role has been declared */
:where(ul, ol)[role="list"] { list-style: none; margin: 0; padding: 0; }

table { border-collapse: collapse; border-spacing: 0; width: 100%; }

hr {
  border: 0;
  height: 1px;
  background-color: var(--color-border);
  margin: var(--space-6) 0;
}

/* Visible focus for keyboard users only */
:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 2px;
}
:focus:not(:focus-visible) { outline: none; }

[hidden] { display: none !important; }

@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;
  }
}

/* Screen-reader-only text */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: absolute;
  inset-inline-start: -9999px;
  z-index: var(--z-toast);
  padding: var(--space-3) var(--space-5);
  background: var(--color-primary);
  color: var(--color-primary-fg);
  border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { inset-inline-start: 0; top: 0; }
