/* RESET */
/* 1. Use a more-intuitive box-sizing model */
*, *::before, *::after {
  box-sizing: border-box;
}

/* 2. Remove default margin */
*:not(dialog) {
  margin: 0;
}

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

body {
  /* 4. Increase line-height */
  line-height: 1.5;
  /* 5. Improve text rendering */
  -webkit-font-smoothing: antialiased;
}

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

/* 7. Inherit fonts for form controls */
input, button, textarea, select {
  font: inherit;
  padding: 1rem;
  border: 0;
}

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

/* 9. Improve line wrapping */
p {
  text-wrap: pretty;
}
h1, h2, h3, h4, h5, h6 {
  text-wrap: balance;
}

/*
  10. Create a root stacking context
*/
#root, #__next {
  isolation: isolate;
}
/*
END RESET
*/
html {
  box-sizing: border-box;
  scroll-behavior: smooth;
  height: 100%;
}

body {
  background-color: var(--background);
}

body::-webkit-scrollbar {
  width: 6px;
}

body {
  scrollbar-width: thin;
  scrollbar-color: var(--color-80) var(--background);
  height: 100%;
}

body::-webkit-scrollbar-track {
  background: var(--background);
}

body::-webkit-scrollbar-thumb {
  background-color: var(--color-80);
}

*,
*:before,
*:after {
  box-sizing: inherit;
  border-style: solid;
  border-width: 0;
  border-color: currentColor;
  margin: 0;
  padding: 0;
}

img,
video,
canvas,
audio,
iframe,
embed,
object {
  display: block;
}

img,
video {
  max-width: 100%;
  height: auto;
}

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

hr {
  width: 100%;
  border: none;
  background: var(--color-10);
  height: 1px;
  margin-top: 2rem;
}

a {
  text-decoration: none;
  color: inherit;
  text-decoration: inherit;
  transition: all 200ms linear;
  text-decoration: underline;
}

a:hover {
  color: var(--accent);
}

ol {
  list-style-position: inside;
}

ol ol {
  list-style-type: lower-alpha;
}

ul {
  list-style-type: square;
  list-style-position: inside;
}

b,
strong {
  font-weight: 500;
}

table {
  border-collapse: collapse;
  caption-side: bottom;
  overflow-x: auto;
  min-width: 100%;
  border: 1px solid var(--color-30);
  margin-top: 1rem;
}

table caption {
  margin-top: 1rem;
}

td,
th {
  border: 1px solid var(--color-30);
  padding: 0.5rem;
  text-align: left;
}

th {
  font-weight: 500;
}

td:only-child {
  text-align: center;
}

* + h1,
* + h2 {
  margin-top: 5rem;
}

* + h3,
* + h4,
* + h5 {
  margin-top: 3rem;
}

* + p {
  margin-top: 2rem;
}

h2 + p,
h3 + p,
h4 + p {
  margin-top: 1rem;
}

iframe,
audio,
video,
img {
  width: 100%;
  max-width: 100%;
  margin-top: 1rem;
}

blockquote {
  margin-top: 1rem;
  margin-bottom: 1rem;
  padding-left: 1rem;
  border-left: 3px solid var(--accent);
  font-style: italic;
}

pre {
  white-space: pre-wrap;
  tab-size: 2;
  font-size: 0.95rem;
  border: 1px solid var(--color-10);
  padding: 1rem;
  margin-top: 1rem;
}

code,
kbd {
  color: var(--accent);
  font-feature-settings: normal;
  background: var(--color-30);
  color: var(--accent);
  padding: 1px 6px;
  margin: 0 2px;
  font-size: 0.95rem;
}

pre {
  overflow: auto;
  max-width: 90vw;
  margin-left: auto;
  margin-right: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--color-80);
}

pre::-webkit-scrollbar {
  width: 6px;
  height: 8px;
}

pre::-webkit-scrollbar-track {
  background: var(--background);
}

pre::-webkit-scrollbar-thumb {
  background-color: var(--color-80);
}

pre,
code {
  font-family: "Inconsolata", monospace;
}

pre code {
  background: transparent;
  padding: 0;
  margin: 0;
}

mark {
  background: var(--accent);
  color: var(--background);
  padding: 1px 6px;
  margin: 0 2px;
  font-size: 0.95rem;
}

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