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

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

  body {
    margin: 0;
    background: var(--color-ground);
    color: var(--color-ink);
    font-family: var(--font-body);
    font-size: var(--text-md);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
  }

  h1, h2, h3 {
    margin: 0;
    font-family: var(--font-display);
    line-height: 1.15;
  }

  h1 {
    font-size: var(--text-2xl);
    font-weight: 700;
    letter-spacing: -0.025em;
  }

  h2 {
    font-size: var(--text-lg);
    font-weight: 600;
  }

  p {
    margin: 0;
  }

  a {
    color: inherit;
  }

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

  code {
    font-size: 0.9em;
  }

  /* Money and counts line up in columns. */
  .num,
  td,
  th {
    font-variant-numeric: tabular-nums;
  }

  /* Visible focus for keyboard users everywhere; mouse clicks stay quiet. */
  :focus-visible {
    outline: 2px solid var(--color-focus);
    outline-offset: 2px;
  }

  .visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    border: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .skip-link {
    position: absolute;
    left: var(--space-4);
    top: -100px;
    z-index: 100;
    padding: var(--space-3) var(--space-4);
    background: var(--color-ink);
    color: var(--color-on-ink);
    border-radius: var(--radius-md);
  }

  .skip-link:focus {
    top: var(--space-4);
  }

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