@layer reset {
  html {
    box-sizing: border-box;
    text-size-adjust: 100%;
  }

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

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

  button, input, select, textarea {
    box-sizing: border-box;
    font: inherit;
    color: inherit;
    letter-spacing: inherit;
  }

  img, svg, canvas {
    display: block;
    max-inline-size: 100%;
  }

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

@layer base {
  html, body {
    block-size: 100%;
  }

  body {
    font-family: var(--font-sans);
    font-size: 0.9375rem;
    line-height: 1.5;
    background-color: var(--bg-canvas);
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    min-block-size: 100dvb;
  }

  :where(a:any-link, button, input, select, textarea, summary, [tabindex]):focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
  }

  code, pre {
    font-family: var(--font-mono);
  }

  .scroller {
    scrollbar-width: thin;
    scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
    overscroll-behavior: contain;
  }

  @supports not (scrollbar-color: auto) {
    .scroller {
      scrollbar-width: auto;
    }
    .scroller::-webkit-scrollbar {
      width: 10px;
      height: 10px;
    }
    .scroller::-webkit-scrollbar-thumb {
      background: var(--scrollbar-thumb);
      border-radius: 999px;
    }
    .scroller::-webkit-scrollbar-track {
      background: var(--scrollbar-track);
    }
  }
}

@layer utilities {
  .visually-hidden:where(:not(:focus-within, :active)) {
    position: absolute !important;
    clip-path: inset(50%) !important;
    overflow: hidden !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    border: 0 !important;
    white-space: nowrap !important;
  }

  .skip-link:focus-within {
    position: fixed;
    inset-block-start: 0.75rem;
    inset-inline-start: 0.75rem;
    z-index: 1000;
    padding: 0.5rem 0.875rem;
    border-radius: var(--radius-sm);
    background: var(--accent);
    color: var(--accent-fg);
    text-decoration: none;
    font-weight: 600;
  }

  .muted-text {
    color: var(--text-muted);
  }

  .break-all {
    word-break: break-all;
  }
}
