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

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

  section[id],
  div[id],
  article[id] {
    scroll-margin-top: 5.5rem;
  }

  body,
  h1,
  h2,
  h3,
  p,
  figure,
  blockquote,
  dl,
  dd,
  ul,
  ol {
    margin: 0;
  }

  ul[class],
  ol[class] {
    padding: 0;
    list-style: none;
  }

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

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

  button {
    cursor: pointer;
    background: none;
    border: none;
  }

  a {
    color: inherit;
    text-decoration: none;
  }

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

  [hidden] {
    display: none !important;
  }
}

@layer base {
  html {
    color-scheme: light;
  }

  body {
    font-family: var(--needle-font-body);
    font-size: var(--needle-size-body);
    line-height: 1.6;
    color: var(--pine-text);
    background: var(--pine-paper);
  }

  h1,
  h2,
  h3 {
    font-family: var(--needle-font-heading);
    font-weight: 800;
    line-height: 1.12;
    color: var(--pine-ink);
    text-wrap: balance;
  }

  h1 {
    font-size: var(--needle-size-h1);
  }

  h2 {
    font-size: var(--needle-size-h2);
  }

  h3 {
    font-size: var(--needle-size-h3);
    font-weight: 700;
  }

  p {
    text-wrap: pretty;
  }

  a:focus-visible,
  button:focus-visible,
  input:focus-visible,
  textarea:focus-visible,
  select:focus-visible,
  summary:focus-visible,
  [tabindex]:focus-visible {
    outline: 3px solid var(--pine-acid);
    outline-offset: 3px;
    border-radius: 4px;
  }

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

  .needle-skip-link {
    position: absolute;
    top: -3rem;
    left: var(--needle-space-sm);
    z-index: 500;
    background: var(--pine-acid);
    color: var(--pine-ink);
    font-weight: 700;
    padding: var(--needle-space-2xs) var(--needle-space-md);
    border-radius: var(--needle-radius-sm);
    transition: top var(--needle-duration-fast) var(--needle-ease);
  }

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

  .needle-shell {
    width: min(100% - var(--needle-gutter) * 2, var(--needle-max-width));
    margin-inline: auto;
  }

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