/*
 * Base layer — reset + element defaults. Sits between tokens.css and
 * components.css. Only element selectors here; component classes live in
 * components.css.
 */
*,
*::before,
*::after { box-sizing: border-box; }

html, body { margin: 0; }

body {
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-ui);
  /* Story 126: the product default is the BODY role (16px, rem-based) — text
     that inherits is body copy by definition. Compact chrome opts down via the
     ui-compact/meta roles in components.css, never the other way around. */
  font-size: var(--type-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

button {
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
}

/* Every form control uses the UI font (native widgets default to system/Arial —
   the 12px-Arial admin search was the audit's canonical example) and inherits
   an accessible role size instead of the browser's own. */
input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

/* Keyboard focus rings (only for keyboard nav, not mouse) — accessibility. */
:focus-visible {
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
  border-radius: var(--radius);
}
:focus:not(:focus-visible) { outline: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* Visually-hidden but available to assistive tech (issue-149 live regions / labels). */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
