/* ============================================================
   Base — reset + document-level defaults. Reads tokens only.
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

html, body {
  min-height: 100%;
}

body {
  font-family: var(--font);
  font-size: var(--fs-md);
  line-height: var(--lh-base);
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

button {
  cursor: pointer;
}

a {
  color: var(--color-brand);
}

/* Consistent focus ring across interactive elements */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

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

h1, h2, h3 {
  line-height: var(--lh-tight);
  font-weight: var(--fw-bold);
}

/* Respect the OS "reduce motion" setting — several screens animate. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
