*,
*::before,
*::after {
  box-sizing: inherit;
}

html {
  box-sizing: border-box;
  font-size: var(--body-font-size);
  height: 100%;
  scroll-behavior: smooth;
}

@media screen and (min-width: 1024px) {
  html {
    font-size: var(--body-font-size--desktop);
  }
}

body {
  background: var(--body-background);
  color: var(--body-font-color);
  font-family: var(--body-font-family);
  line-height: var(--body-line-height);
  margin: 0;
  tab-size: 4;
  word-wrap: anywhere; /* aka overflow-wrap; used when hyphens are disabled or aren't sufficient */
}

a {
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

a:active {
  background-color: none;
}

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

b,
dt,
strong,
th {
  font-weight: var(--body-font-weight-bold);
}

sub,
sup {
  font-size: 75%;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}

sub {
  bottom: -0.25em;
}

sup {
  top: -0.5em;
}

em em { /* stylelint-disable-line */
  font-style: normal;
}

strong strong { /* stylelint-disable-line */
  font-weight: normal;
}

button {
  cursor: pointer;
  font-family: inherit;
  font-size: 1em;
  line-height: var(--body-line-height);
  margin: 0;
}

button::-moz-focus-inner {
  border: none;
  padding: 0;
}

summary {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  outline: none;
}

table {
  border-collapse: collapse;
  word-wrap: normal; /* table widths aren't computed as expected when word-wrap is enabled */
}

object[type="image/svg+xml"]:not([width]) {
  width: fit-content;
}

::placeholder {
  opacity: 0.5;
}

@media (pointer: fine) {
  @supports (scrollbar-width: thin) {
    html {
      scrollbar-color: var(--scrollbar-thumb-color) var(--scrollbar-track-color);
    }

    body * {
      scrollbar-width: thin;
      scrollbar-color: var(--scrollbar-thumb-color) transparent;
    }
  }

  html::-webkit-scrollbar {
    background-color: var(--scrollbar-track-color);
    height: 12px;
    width: 12px;
  }

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

  ::-webkit-scrollbar-thumb {
    background-clip: padding-box;
    background-color: var(--scrollbar-thumb-color);
    border: 3px solid transparent;
    border-radius: 12px;
  }

  body ::-webkit-scrollbar-thumb {
    border-width: 1.75px;
    border-radius: 6px;
  }

  ::-webkit-scrollbar-thumb:hover {
    background-color: var(--scrollbar_hover-thumb-color);
  }
}