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

  * {
    margin: 0;
  }

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

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

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

  ul[role="list"],
  ol[role="list"] {
    list-style: none;
    padding: 0;
  }
}

@layer base {
  html {
    background: var(--bg);
    scrollbar-color: var(--line) var(--bg);
    scroll-padding-top: calc(var(--header-h) + var(--s-4));
  }

  @media (prefers-reduced-motion: no-preference) {
    html {
      scroll-behavior: smooth;
    }
  }

  body {
    min-height: 100vh;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: var(--fs-base);
    font-weight: var(--wght-body);
    line-height: var(--lh-body);
    overflow-wrap: break-word;
    -webkit-font-smoothing: antialiased;
  }

  h1,
  h2,
  h3 {
    font-family: var(--font-display);
    font-weight: var(--wght-title);
    line-height: var(--lh-title);
    letter-spacing: var(--tracking-title);
    text-wrap: balance;
  }

  p {
    text-wrap: pretty;
  }

  a {
    color: inherit;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.2em;
  }

  :focus-visible {
    outline: var(--focus);
    outline-offset: var(--focus-offset);
  }

  ::selection {
    background: var(--surface-2);
    color: var(--ink);
  }

  code,
  kbd,
  samp,
  pre {
    font-family: var(--font-mono);
    font-size: 0.9em;
  }

  time {
    font-variant-numeric: tabular-nums;
  }
}
