.wysiwyg {
  --body-font-color: #{$black-800};
  --anchor-link-normal-color: #{$blue};
  --anchor-link-hover-color: #{$blue};

  strong {
    color: $black;
  }

  h2 {
    font-size: 2.8rem;
  }

  h2 + * {
    margin-top: 2.4rem;
    &.title {
      margin-top: 1.6rem;
    }
  }

  * + h2 {
    margin-top: 6rem;
    &.title {
      margin-top: 1.6rem;
    }
  }

  * + h3 {
    margin-top: 2.4rem;
  }

  h3,
  p {
    + * {
      margin-top: 2.4rem;
    }
  }

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

  a:not(.button):not(.button-link):not(.button-blue):not(.button-text):not(.button-white):not(.button-green):not(.button--secondary) {
    color: $blue;
    &:hover {
      text-decoration: underline;
    }
  }

  ol,
  ul {
    margin-left: 1.6rem;
    color: var(--body-font-color);
    li + li {
      margin-top: 2.4rem;
    }
    ul {
      margin-top: 2.4rem;
      margin-top: 2.4rem;
    }
  }

  img {
    max-width: 100%;
    height: auto;
    margin-top: 2.4rem;
    &:first-child {
      margin-top: 0;
    }
  }

  video {
    display: block;
    width: 100%;
  }

  hr {
    border: none;
    background-color: rgba(44,44,44,.15);
    height: 1px;
  }

  blockquote {
    border-left: 0.5rem solid $border-color;
    font-style: italic;
    padding: 1rem 2rem;
    margin: 4rem 0 3rem;
  }

  code {
    color: $red;
    background-color: $gray-light;
    border-radius: 0.3rem;
  }

  pre {
    word-wrap: normal;
    background-color: $gray-light;
    color: $black;
    font-size: 1.4rem;
    overflow-x: auto;
    padding: 2rem 2.4rem;
    white-space: pre;
    border-radius: 0.3rem;
    code {
     color: currentColor;
    }
  }

  .code-toolbar {
    position: relative;

    .toolbar {
      position: absolute;
      top: 1rem;
      right: 0.7rem;
      transition: opacity $transition-params;
      opacity: 0;
      pointer-events: none;

      .toolbar-item {
        display: inline-block;

        a {
          cursor: pointer;
        }

        button {
          background-color: $black-150;
          border: 0;
          border-radius: 6px;
          color: inherit;
          font: inherit;
          line-height: normal;
          overflow: visible;
          padding: 0 0.8rem;
          min-height: 0;
          -webkit-user-select: none; /* for button */
          -moz-user-select: none;
          -ms-user-select: none;
          cursor: pointer;
        }

        span {
          position: relative;
          font-size: 1.4rem;
          color: var(--color-primary);
          letter-spacing: 0.5px;
          padding-right: 1.2rem;

          &::before,
          &::after {
            content: '';
            position: absolute;
            top: 50%;
            right: 0;
            width: 6px;
            height: 2px;
            background-color: var(--button-secondary-normal-text-color);
            border-radius: 100px;
            transition: background-color $transition-params;
          }

          &::before {
            transform: translateY(1px) rotate(-45deg);
          }

          &::after {
            transform: translateY(-3px) rotate(45deg);
          }
        }
      }
    }

    &:hover .toolbar {
      opacity: 1;
      pointer-events: all;
    }

    /* Separate line b/c rules are thrown out if selector is invalid.
       IE11 and old Edge versions don't support :focus-within. */
    &:focus-within .toolbar {
      opacity: 1;
      pointer-events: all;
    }
  }
}
