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

  html {
    text-size-adjust: 100%;
    scroll-padding-top: calc(var(--header-height) + var(--space-s));
  }

  body {
    margin: 0;
    background: var(--color-paper);
    color: var(--color-ink);
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: var(--leading-body);
    font-kerning: normal;
  }

  h1,
  h2,
  h3,
  h4 {
    margin: 0;
    font-family: var(--font-display);
    font-weight: var(--weight-semibold);
    line-height: var(--leading-tight);
    text-wrap: balance;
    font-variation-settings: 'opsz' 72;
  }

  h1 {
    font-size: var(--text-2xl);
  }

  h2 {
    font-size: var(--text-xl);
  }

  h3 {
    font-size: var(--text-lg);
  }

  p,
  ul,
  ol,
  dl,
  table,
  figure,
  blockquote {
    margin: 0;
  }

  p {
    text-wrap: pretty;
  }

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

  img {
    height: auto;
  }

  a {
    color: var(--color-felt);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.2em;
  }

  a:hover {
    text-decoration-thickness: var(--border-medium);
  }

  :focus-visible {
    outline: var(--border-thick) solid var(--color-focus);
    outline-offset: var(--border-medium);
  }

  button {
    font: inherit;
    color: inherit;
  }

  table {
    border-collapse: collapse;
    width: 100%;
  }

  strong {
    font-weight: var(--weight-semibold);
  }

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

  .skip-link {
    position: absolute;
    left: var(--space-s);
    top: calc(-1 * var(--space-2xl));
    z-index: calc(var(--z-consent) + 1);
    padding: var(--space-2xs) var(--space-s);
    background: var(--color-felt-deep);
    color: var(--color-on-felt);
    border-radius: var(--radius-s);
  }

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

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

@layer layout {
  .page {
    width: min(100% - 2 * var(--page-gutter), var(--page-max));
    margin-inline: auto;
  }

  .page--narrow {
    width: min(100% - 2 * var(--page-gutter), var(--page-narrow));
  }

  .section {
    padding-block: var(--space-2xl);
  }

  .section--tight {
    padding-block: var(--space-xl);
  }

  .section--felt {
    background: var(--color-felt-deep);
    color: var(--color-on-felt);
  }

  .section--surface {
    background: var(--color-surface);
    border-block: var(--border-thin) solid var(--color-line);
  }

  .stack > * + * {
    margin-top: var(--space-s);
  }

  .stack--l > * + * {
    margin-top: var(--space-l);
  }
}
