@layer reset, tokens, base, components, utilities, overrides;

@layer reset {
  *, *::before, *::after {
    box-sizing: border-box;
  }
  html, body, h1, h2, h3, h4, p, figure, blockquote, dl, dd {
    margin: 0;
  }
  ul, ol {
    margin: 0;
    padding: 0;
    list-style: none;
  }
  a {
    text-decoration: none;
    color: inherit;
  }
  img, picture {
    max-width: 100%;
    display: block;
  }
  input, button, textarea, select {
    font: inherit;
  }
  button {
    border: none;
    background: none;
    cursor: pointer;
  }
}

@layer base {
  html {
    -webkit-text-size-adjust: 100%;
    font-size: var(--fs-base);
  }
  body {
    background: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-body);
    line-height: var(--lh-normal);
    min-height: 100dvh;
    -webkit-font-smoothing: antialiased;
  }
  h1, h2, h3, h4 {
    font-family: var(--font-display);
    line-height: var(--lh-tight);
  }
  h1 { font-size: var(--fs-3xl); }
  h2 { font-size: var(--fs-2xl); }
  h3 { font-size: var(--fs-xl); }
  p, li { max-width: 65ch; }
  a {
    color: var(--color-accent);
    text-decoration: underline;
    text-underline-offset: 0.15em;
  }
  a:hover {
    color: var(--color-text);
  }
  code, pre {
    font-family: var(--font-mono);
    font-size: var(--fs-sm);
  }
  pre {
    overflow-x: auto;
    background: var(--color-bg-inset);
    padding: var(--space-3);
    border-radius: var(--radius);
  }
}

@layer utilities {
  .bwb-container {
    width: 100%;
    max-width: var(--max-w-feed);
    margin-inline: auto;
    padding-inline: var(--gutter);
  }
  .bwb-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
}
