// ┌────────────────┐
// │ Default Styles │
// └────────────────┘

@if $include-type == true and $include-type-defaults == true {

  html {
    font-size: 16px;
  }

  body {
    @include avenir-regular();
    @include tracking($avenir-tracking);
    font-family: $avenir-family;
    line-height: $baseline-ratio;
    color: $type-color;
    background-color: $white;

    -webkit-font-smoothing: subpixel-antialiased;

    -webkit-font-feature-settings: "kern";
    -moz-font-feature-settings: "kern";
    font-feature-settings: "kern";

    font-kerning: normal;

    text-rendering: optimizeLegibility;

    -moz-font-feature-settings : 'liga= 1','calt=0';
    -moz-font-feature-settings : "liga" 1,"calt" 0;
    -webkit-font-feature-settings : "liga" 1,"calt" 0;
    -ms-font-feature-settings : 'liga= 1','calt=0';
    -o-font-feature-settings : "liga" 1,"calt" 0;
    font-feature-settings : "liga" 1,"calt" 0;
 }

  form,
  select,
  button,
  input {
    @include tracking($avenir-tracking);
    font-family: inherit;
  }

  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    font-weight: 400;
    margin: 0 0 $baseline*.5 0;
  }

  h1 {@include font-size(5);}
  h2 {@include font-size(4);}
  h3 {@include font-size(3);}
  h4 {@include font-size(2);}
  h5 {@include font-size(1);}
  h6 {@include font-size(0);}

  code, kbd, pre, samp {
    font-family: $code-family;
  }

  code {
    padding: .25em;
    border-radius: 3px;
    border: 1px solid $lightest-gray;
    color: $darkest-gray;
    background-color: $off-white;
    white-space: normal;
    word-break: break-word;
    font-size: 0.875em;
  }

  pre {
    white-space: pre;
    white-space: pre-wrap;
    word-wrap: break-word;
    max-width: 100%;
    margin-bottom: $baseline;
    code {
      padding: 1.25rem 1rem 1rem 1rem;
      display: block;
      overflow: auto;
      word-wrap: normal;
      white-space: pre;
      position: relative;
    }
  }

  p,
  dl,
  blockquote {
    margin-top: 0;
    margin-bottom: $baseline;
  }

  p:empty {
    margin: 0;
  }

  blockquote {
    margin: $baseline 0;
    @include avenir-regular();
    @include gutter-left(1);
    color: $darker-gray;
    @include border-left(3px solid $lighter-gray);
  }

  blockquote,
  blockquote p {
    @include font-size(1);
  }

  a {
    color: $link-color;
    text-decoration: none;
    &:hover {
      color: $link-hover;
      text-decoration: underline;
    }
  }

  ul, ol {
    @include font-size(-1);
  }

  li {
    margin-top: .25em;
  }

  dl {
    padding: 0;
    margin-bottom: $baseline;
  }
  dt {
    @include avenir-demi();
    margin-top: $baseline/2;
    &:first-child {
      margin-top: 0;
    }
  }
  dd {
    margin-left: $baseline/2;
    @if ($include-right-to-left) {
      html[dir="rtl"] & {
        margin-right: $baseline / 2;
      }
    }
  }

  small, sup, sub {
    font-size: 1/$ratio * 1em;
  }

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

  sup {
    top: -0.5em;
  }

  sub {
    bottom: -0.25em;
  }

  mark {
    padding: 0 0.1em 0.1em;
  }

  hr {
    margin: $baseline*1.5 0;
    border: none;
    border-top: 1px solid $lighter-gray;
  }

  figure {
    margin: 0 0 $baseline 0;
    img {
      max-width: 100%;
    }
  }

  figcaption {
    margin: $baseline/4 0;
    @include font-size(-2);
    font-style: italic;
    color: $dark-gray;
  }

  table {
    margin-bottom: $baseline;
  }
}
