article {
  padding: 0 12px;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;

  * {
    &::-webkit-scrollbar-track {
      background: transparent;
    }

    &::-webkit-scrollbar {
      width: 12px;
      height: 12px;
    }

    &::-webkit-scrollbar-thumb {
      background-color: var(--color-scrollbar);
      opacity: 0.2;
      border-radius: 12px;
      border: 3px solid transparent;
      background-clip: content-box;
    }

    &::-webkit-scrollbar-thumb:hover {
      background-color: var(--color-scrollbar-hover);
    }
  }

  .post-title {
    margin: 12px 0;
    line-height: 1.5;
    color: var(--color-font);
  }

  .post-title {
    line-height: 1.5;
  }

  .flag-paragraph {
    position: relative;
    background: var(--color-blue);
    border-radius: var(--radius);

    .flag {
      display: inline-flex;
      align-items: center;
      position: absolute;
      right: 100%;
      top: 50%;
      transform: translate(-10px, -50%);

      svg {
        width: 16px;
        height: 16px;
      }
    }
  }

  hr {
    border: none;
    height: 1.5px;
    width: 100%;
    background: var(--color-border-2);
  }

  a {
    transition: color 0.3s;
    text-decoration: none;
    color: var(--color-primary-1);

    &:hover {
      color: var(--color-primary);
    }
  }

  .code-wrapper {
    overflow-x: auto;
    position: relative;
    margin-bottom: 2rem;
    border-radius: var(--radius-base, 4px);
    border: 1px solid var(--color-border);

    pre {
      padding-top: 2rem;
      margin: 0;
      font-size: 12.8px;

      .line-numbers-rows {
        border-right: 0 !important;
      }
    }

    .btn-wrapper {
      position: absolute;
      display: flex;
      align-items: center;
      top: 0;
      right: 0;
      left: 0;
      height: 24px;
      background: var(--color-bg-2);
      display: flex;
      justify-content: space-between;
      padding: 0 4px 0 6px;
      border-radius: var(--radius-base, 4px) var(--radius-base, 4px) 0 0;
    }

    .copy-button {
      width: 24px;
      height: 24px;
      padding: 4px;
      display: inline-flex;
      align-items: center;
      color: var(--color-font-2);
      cursor: pointer;

      &:hover {
        color: var(--color-font-1);
      }

      svg {
        width: 100%;
        height: 100%;
      }
    }

    .lang {
      padding-right: 6px;
      font-size: 10px;
      text-transform: uppercase;
      color: var(--color-font-3);

      &::first-letter {
        text-transform: uppercase;
      }
    }
  }

  blockquote {
    position: relative;
    margin: 10px 0;
    background: var(--color-bg-2);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-base, 4px);
    font-family: var(--font-regular);
    display: block;
    padding: 0.5rem;
    color: var(--color-font-2);

    p {
      margin: 0;
      line-height: 1.5;
    }
  }

  > p {
    line-height: 2;
    padding: 1.2rem 0;
    margin: 0;
    color: var(--font-color-2);

    img {
      max-width: 100%;
    }

    code {
      padding: 3px 6px;
      font-size: 0.9rem;
      line-height: 1;
      margin: 0 2px;
      background: var(--color-bg-3);
      color: var(--color-font-1);
      border-radius: var(--radius-base, 4px);
      font-family: var(--font-regular);
    }
  }

  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    font-weight: 500;
    margin: 2.5rem 0 1rem 0;
    color: var(--color-font-1);
    padding: 0.5rem 0;
  }

  h1 {
    font-size: 20px;
  }

  h2 {
    font-size: 18px;
  }

  h3 {
    font-size: 16px;
  }

  h4 {
    font-size: 14px;
  }

  ul,
  ol {
    margin: 16px 0;
    padding-left: 1.25rem;

    li {
      line-height: 24px;
      color: var(--color-font-1);

      &::marker {
        color: var(--color-font-2);
      }
    }
  }

  table {
    margin-bottom: 2rem;
    border-collapse: collapse;
    overflow: hidden;
    border: 0;
    width: 100%;
    border: 1px solid var(--color-border-2);
    border-radius: var(--radius-base, 4px) var(--radius-base, 4px) 0 0;

    thead tr th {
      background: var(--color-bg-2);
      text-align: left;
      padding: 12px;
      font-size: calc(var(--font-size) * 0.9);

      &:nth-of-type(1) {
        border-radius: var(--radius-base, 4px) 0 0 0;
      }

      &:last-of-type {
        border-radius: 0 var(--radius-base, 4px) 0 0;
      }
    }

    tbody tr {
      &:hover {
        background: var(--color-bg-hover);
      }

      td {
        text-align: left;
        padding: 12px;
        border-bottom: 1px solid var(--color-border-2);
        line-height: 1.5;
      }
    }
  }
}
