html {
  font-size: 112.5%;
}

body {
  background: $gray-100;
  color: $gray-600;
  line-height: 1.66667;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

@each $font, $stack in $theme-fonts {
  $font-suffix: "#{$font}";

  .font-#{$font-suffix} {
    font-family: $stack;
  }
}

a {
  color: $color-primary;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.125em;
  -webkit-transition: color .15s ease;
  transition: color .15s ease;

  &:hover {
    color: $gray-600;
  }
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: $gray-700;
  font-weight: bold;
  line-height: 1.16667;
  margin: 1.25em 0 0.5em;
  text-rendering: optimizeLegibility;

  &:first-child {
    margin-top: 0;
  }

  .font-fira-sans & {
    font-weight: 600;
  }
}

h1 {
  font-size: 2em;
}

h2 {
  font-size: 1.77778em;
}

h3 {
  font-size: 1.55556em;
}

h4 {
  font-size: 1.33333em;
}

h5 {
  font-size: 1.11111em;
}

h6 {
  font-size: 1em;
}

@media only screen and (min-width: 601px) {
  h1 {
    font-size: 2.44444em;
  }

  h2 {
    font-size: 2em;
  }

  h3 {
    font-size: 1.66667em;
  }
}

p {
  margin: 0 0 1em;
}

mark,
ins {
  background: $yellow-pale;
  color: $gray-700;
  padding: 0 3px;
  text-decoration: none;
}

pre {
  background: $gray-700;
  border-radius: $border-radius;
  color: $gray-200;
  font-size: 0.83333em;
  margin: 0 0 2em;
  overflow: auto;
  padding: 1.5em;
  white-space: pre;
}

blockquote {
  border-left: 3px solid $color-primary;
  color: $gray-700;
  font-size: 1.33333em;
  line-height: 1.3;
  margin: 1.25em 0;
  padding: 0 0 0 1.25em;

  &:first-child {
    margin-top: 0;
  }

  p {
    margin-bottom: 0.5em;
  }

  small,
  cite {
    color: $gray-500;
    display: block;
    font-size: 0.83333em;
    font-style: normal;
    font-weight: normal;
    margin-top: 0.6em;
  }
}

dl {
  margin: 0;
}

dt {
  font-weight: bold;

  .font-fira-sans & {
    font-weight: 600;
  }
}

ul,
ol,
dd {
  margin: 0 0 1em;
}

ul {
  list-style: disc;
  padding: 0 0 0 1.125em;
}

ol {
  list-style: decimal;
  padding: 0 0 0 1.5em;
}

li > ul,
li > ol {
  margin-bottom: 0;
}

hr {
  background-color: $gray-200;
  border: 0;
  height: 1px;
  margin: 1.66667em 0;

  &:first-child {
    margin-top: 0;
  }
}

embed,
iframe,
object,
video {
  max-width: 100%;
}

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