/* Page basics: font, background, text, focus ring, reduce-motion. */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--text-body);
  font-weight: var(--weight-body);
  line-height: var(--line-body);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  margin: 0;
  font-weight: var(--weight-heavy);
  line-height: var(--line-heading);
}
h1 { font-size: var(--text-heading); }
h2 { font-size: var(--text-title); }
h3 { font-size: var(--text-body); }

p { margin: 0; }

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

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

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

/* Scores and tables: every digit the same width, so numbers don't jiggle. */
.num { font-variant-numeric: tabular-nums; }

/* Focus ring for keyboard users only. */
:focus-visible {
  outline: 2px solid var(--action);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
