// MIX-INS
@mixin font-smoothing($value: antialiased) {
  @if $value == antialiased {
    -moz-osx-font-smoothing: grayscale;
    -webkit-font-smoothing: antialiased;
  } @else {
    -moz-osx-font-smoothing: auto;
    -webkit-font-smoothing: subpixel-antialiased;
  }
}

@viewport {
  width: device-width;
  zoom: 1;
  min-zoom: 1;
  max-zoom: 3;
  user-zoom: fixed;
}

* {
  // @include selection($beam-gray, $white)
}

html {
  background: $blind-gray;
  font-size: $em-normalize-ratio;
}

body {
  @include font-smoothing;
  background-color: $default-background-color;
  color: $default-text-color;
  font-family: $default-font-family;
  font-size: $default-font-size;
  line-height: $default-line-height;

  a {
    text-decoration: none;
  }
}

h1 {
  font-size: $h1-font-size;
  line-height: $h1-line-height;
  margin: $h1-font-size 0;

  a {
    color: $default-text-color;

    &:hover {
      color: $link-color;
    }
  }
}

h2 {
  font-size: $h2-font-size;
  line-height: $h2-line-height;
  margin: $h2-font-size + .8rem 0;
  word-wrap: break-word;
}

h3 {
  font-size: $h3-font-size;
  font-weight: bold;
  line-height: $h3-line-height;
  margin: $h3-font-size + 1.5rem 0;
  word-wrap: break-word;
}

p {
  margin: 0 0 $default-font-size + 1.0rem 0;
  word-wrap: break-word;
}

hr {
  background: $border-gray;
  border: 0;
  height: 1px;
  margin: 24px 0;
}

ul {
  list-style: disc;
  margin-bottom: $default-font-size + 1rem;
  margin-left: 2rem;
}

ol {
  list-style-type: decimal;
  margin-bottom: $default-font-size + 1rem;
  margin-left: 2rem;
}

a {
  color: $link-color;
}

pre {
  background: $code-gray;
  border: 1px solid $whity-light-gray;
  font-family: $monospace;
  font-size: 1.3rem;
  line-height: 1.5;
  margin: 3rem auto;
  overflow: scroll;
  padding: 1.4rem;

  @include breakpoint($large-screen) {
    font-size: 1.4rem;
  }
}

code {
  font-family: $monospace;
}

strong {
  font-weight: bold;
}

em {
  font-style: italic;
}

blockquote {
  border-left: 3px solid $whity-light-gray;
  color: lighten($default-text-color, 20);
  margin: 3rem 1rem;
  padding-left: 1rem;
}

table {
  margin-bottom: $default-font-size + 1rem;
  margin-top: $default-font-size + 1rem;

  tr {
    background-color: $white;
    border-top: 1px solid $whity-gray;
    margin: 0;
    padding: 0;

    &:nth-child(2n) {
      background-color: $code-gray;
    }

    th {
      border: 1px solid $whity-gray;
      font-weight: bold;
      margin: 0;
      padding: 6px 13px;
      text-align: left;

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

      &:last-child {
        margin-bottom: 0;
      }
    }

    td {
      border: 1px solid $whity-gray;
      margin: 0;
      padding: 6px 13px;
      text-align: left;
    }

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

    &:last-child {
      margin-bottom: 0;
    }
  }
}

iframe {
  margin-bottom: 2rem;
}
