@layer base {
  html {
    scrollbar-gutter: stable;
  }

  body {
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-sans);
    font-size: var(--step-0);
    font-optical-sizing: auto;
    font-feature-settings: "cv05", "cv08", "ss03";
    text-rendering: optimizeLegibility;
  }

  h1, h2, h3 {
    font-family: var(--font-display);
    font-weight: 480;
    line-height: 1.15;
    letter-spacing: -0.015em;
    text-wrap: balance;
  }

  h1 { font-size: var(--step-4); }
  h2 { font-size: var(--step-2); }
  h3 { font-size: var(--step-1); }

  h4, h5, h6 {
    font-size: var(--step-0);
    font-weight: 600;
    line-height: 1.3;
  }

  p, li {
    text-wrap: pretty;
    max-inline-size: var(--measure);
  }

  a {
    color: var(--color-accent);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.2em;
    text-decoration-color: color-mix(in oklab, currentColor 40%, transparent);
    transition: text-decoration-color var(--duration-fast) var(--ease-out);

    &:hover {
      text-decoration-color: currentColor;
    }
  }

  :focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
    border-radius: var(--radius-s);
  }

  ::selection {
    background-color: color-mix(in oklab, var(--color-accent) 25%, transparent);
  }

  small {
    font-size: var(--step--1);
  }

  hr {
    border: none;
    border-block-start: var(--border-width) solid var(--color-border);
  }

  input[type="checkbox"], input[type="radio"], progress {
    accent-color: var(--color-accent);
  }
}
