@layer base {
  html {
    font-size: 100%;

    @media (min-width: 100ch) {
      font-size: 1.1875rem;
    }
  }

  body {
    -moz-osx-font-smoothing: grayscale;
    -webkit-font-smoothing: antialiased;
    -webkit-text-size-adjust: none;
    background: var(--color-canvas);
    color: var(--color-ink);
    font-family: var(--font-mono);
    interpolate-size: allow-keywords;
    line-height: 1.375;
    max-inline-size: 100vw;
    text-rendering: optimizeLegibility;
    text-size-adjust: none;
  }

  /* The blueprint is a seamless tile used as a mask so it takes the theme's color */
  body {
    &::before {
      background-color: var(--color-blueprint);
      content: "";
      inset: 0;
      mask: url("/assets/blueprint-480238af.svg") 0 0 / 1024px repeat;
      pointer-events: none;
      position: fixed;
      z-index: -1;
    }
  }

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

    &:not([class]) {
      color: var(--color-link);
      text-decoration: underline;
      text-decoration-skip-ink: auto;
    }
  }

  :is(a, button, input, textarea, select, .btn) {
    transition: 100ms ease-out;
    transition-property: background-color, border-color, box-shadow, outline;
    touch-action: manipulation;

    /* Keyboard navigation */
    &:where(:focus-visible) {
      outline: var(--focus-ring-size) solid var(--focus-ring-color);
      outline-offset: var(--focus-ring-offset);
    }

    /* Default disabled styles */
    &:where([disabled]) {
      cursor: not-allowed;
      opacity: 0.5;
      pointer-events: none;
    }
  }

  ::selection {
    background: var(--color-selected);

    @media (prefers-color-scheme: dark) {
      background: var(--color-selected-dark);
    }
  }

  turbo-frame {
    display: contents;
  }
}
