/*
  Based on Josh's Custom CSS Reset
    https://www.joshwcomeau.com/css/custom-css-reset/
  and Kevin's "least amount of CSS for a decent looking site
    https://thecascade.dev/article/least-amount-of-css/
*/
/* 1. Use a more-intuitive box-sizing model */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* 2. Remove default margin */
* {
  margin: 0;
}

/* 3. Enable keyword animations */
@media (prefers-reduced-motion: no-preference) {
  html {
    interpolate-size: allow-keywords;
  }
}

/* 4. Support light and dark color schemes */
html {
  color-scheme: light dark;
}

body {
  /* 5. Use system font stack for optimal performance */
  font-family: system-ui;
  font-size: 1.25rem;
  /* 6. Add accessible line-height */
  line-height: 1.5;
  /* 7. Improve text rendering */
  -webkit-font-smoothing: antialiased;
}

/* 8. Improve media defaults */
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

/* 9. Inherit fonts for form controls */
input,
button,
textarea,
select {
  font: inherit;
}

/* 10. Avoid text overflows */
p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

/* 11. Improve line wrapping */
p {
  text-wrap: pretty;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  text-wrap: balance;
}

/* 12. Content container with responsive width */
main {
  max-width: min(70ch, 100% - 4rem);
  margin-inline: auto;
}
