.miso-markdown {
  > * {
    margin-top: 0;
    margin-bottom: 1rem;
  }

  // p //
  p {
    line-height: 2;
    color: var(--miso-text-color);
  }

  // hr //
  hr {
    height: 1px;
    margin: 1rem 0;
    color: inherit;
    background-color: currentColor;
    border: 0;
    opacity: .25;
  }

  // heading //
  h1, h2, h3, h4, h5, h6 {
    margin: 1rem 0 0.5rem;
    line-height: 1.2;
    font-weight: 500;
  }
  h1, h2, h3 {
    font-weight: 700;
  }
  h1 {
    font-size: 1.75rem;
  }
  h2 {
    font-size: 1.5rem;
  }
  h3 {
    font-size: 1.375rem;
  }
  h4 {
    font-size: 1.25rem;
  }
  h5 {
    font-size: 1.1rem;
  }
  h6 {
    font-size: 1.05rem;
  }

  // table //
  table {
    width: 100%;
    vertical-align: top;
    border-color: #ccc;
    caption-side: bottom;
    border-collapse: collapse;

    th {
      text-align: inherit;
      text-align: -webkit-match-parent;
    }
    tbody, td, tfoot, th, thead, tr {
      border-color: inherit;
      border-style: solid;
      border-width: 0;
    }
    > thead {
      vertical-align: bottom;
    }
    > tbody {
      vertical-align: inherit;
    }
    > :not(:first-child) {
      border-top: 2px solid currentColor;
    }
    > :not(caption) > * > * {
      padding: 0.5rem;
      border-bottom-width: 1px;
    }
  }

  // code //
  pre,
  code {
    font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
    font-size: .875em;
    direction: ltr;
    unicode-bidi: bidi-override;
  }
  code {
    background-color: rgba(0, 0, 0, 0.075);
    color: #d63384;
    word-wrap: break-word;
    border-radius: 0.1rem;
    padding: 0.2em 0.4em;
  }
  pre {
    display: block;
    overflow: auto;
    background-color: #f0f0f0;
    padding: 1em;
    border-radius: 0.25rem;

    code {
      font-size: inherit;
      background-color: transparent;
      color: inherit;
      word-break: normal;
      padding: 0;
    }
  }
  pre[class*=language-] {
    padding: 1em;
    border: 1px solid var(--miso-border-color-light);
    overflow: auto;
  }
  code[class*=language-],
  pre[class*=language-] {
    color: #000;
    background: none;
    text-shadow: 0 1px #fff;
    font-family: Consolas,Monaco,"Andale Mono","Ubuntu Mono",monospace;
    //font-size: 1em;
    text-align: left;
    white-space: pre;
    word-spacing: normal;
    word-break: normal;
    word-wrap: normal;
    line-height: 1.5;
    -moz-tab-size: 4;
    -o-tab-size: 4;
    tab-size: 4;
    hyphens: none;
  }
  :not(pre) > code[class*=language-],
  pre[class*=language-] {
    background: #f5f2f0;
  }

  // list //
  ul, ol {
    margin-top: 0;
    margin-bottom: 1rem;
    padding-left: 2rem;

    ul, ol {
      margin-bottom: 0;
    }
  }
  li.task-list-item {
    list-style-type: none;

    > input[type="checkbox"]:first-child {
      font-family: inherit;
      font-size: inherit;
      line-height: inherit;
      margin: 0 0.2em 0 -1.3em;
    }
  }

  // image //
  p > img {
    display: block;
    margin: 0 auto;
  }

  // mark //
  mark {
    background-color: var(--miso-mark-background);
  }

  // slot //
  &.miso-markdown-with-slot {
    .miso-markdown-upper,
    .miso-markdown-slot,
    .miso-markdown-lower {
      margin-top: 0;
      margin-bottom: 0;
    }
    .miso-markdown-slot {
      margin-bottom: 1rem;
      display: none;
    }
    &[data-slot-status="ready"],
    &.done {
      > .miso-markdown-slot {
        display: block;
      }
    }
  }

}
