.wysiwyg {
  overflow-wrap: break-word;
  margin-bottom: -1em;

  h1 {
    margin-top: var(--common-elementGap-vertical);
    margin-bottom: var(--common-indent-base);

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

  h2 {
    margin-top: var(--common-elementGap-vertical);
    margin-bottom: var(--common-indent-base);

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

  h3 {
    margin-top: var(--common-indent-large);
    margin-bottom: var(--common-indent-base);

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

  h1 + h3,
  h2 + h3 {
    margin-top: var(--common-indent-base);
  }

  hr {
    margin-top: 2em;
    margin-bottom: 2em;

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

    &:last-child {
      margin-bottom: 1em;
    }
  }

  ul,
  ol {
    margin-bottom: 1em;
    margin-left: 1.5em;

    ul,
    ol {
      margin-top: 0.5em;
    }

    & > li {
      margin-bottom: 0.5em;

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

      &::before {
        content: "\2014";
        position: absolute;
        margin-left: -1.5em;
        color: var(--common-baseColor-divider);
      }
    }

    ol {
      margin-left: 2.3em;

      & > li {
        &::before {
          margin-left: -2.3em;
        }
      }

      ol {
        margin-left: 3.1em;

        & > li {
          &::before {
            margin-left: -3.1em;
          }
        }
      }
    }
  }

  ol {
    counter-reset: code;

    & > li::before {
      content: counters(code, ".") ". ";
      color: var(--common-baseColor-hint);
      counter-increment: code;
    }
  }

  p {
    margin-bottom: 1em;
  }

  p + ul,
  p + ol {
    margin-top: -0.5em;
  }

  img,
  video {
    border-radius: var(--common-borderRadius-primary);
  }

  figure {
    margin: 2em auto;

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

    &:last-child {
      margin-bottom: 1em;
    }
  }

  figcaption {
    #common.text-small();
    color: var(--common-baseColor-secondary);
    margin-top: 0.5em;
  }

  table {
    word-break: normal;
  }

  sup,
  sub {
    line-height: 1em;
    font-size: 0.75em;
  }
}
