.article-page {
  max-width: 700px;
  margin: 0 auto 20px;
  background-color: var(--bg_panel);

  > .top-ref {
    padding-top: 20px;
  }

  .article-cover {
    width: 100%;
    display: block;
  }

  .article-body {
    padding: 20px;

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

    .article-title {
      display: block;
      font-size: 2rem;
      line-height: 1.3;
      margin: 0 0 10px;
      color: var(--fg_color);
    }

    .article-author {
      margin-bottom: 12px;
      padding-bottom: 10px;
      border-bottom: 1px solid var(--border_grey);
      font-size: 14px;

      .article-author-row {
        display: flex;
        align-items: center;
        gap: 8px;
      }

      .article-avatar {
        display: flex;
      }

      .avatar {
        width: 40px;
        height: 40px;
      }

      .article-author-name {
        display: flex;
        align-items: center;
        margin-bottom: 2px;

        .fullname {
          font-size: 15px;
        }

        .verified-icon {
          margin-left: 2px;
        }
      }

      .article-author-meta {
        display: flex;
        align-items: center;
      }

      .fullname {
        font-weight: 700;
        color: var(--fg_color);
        max-width: unset;
        text-overflow: unset;
        overflow: visible;
        white-space: normal;
      }

      .username,
      .article-date-sep,
      .article-date {
        color: var(--fg_dark);
      }

      .username {
        margin-left: 0;
      }

      .article-date-sep {
        margin: 0 4px;
      }

      .article-date {
        text-decoration: none;

        &:hover {
          text-decoration: underline;
        }
      }

      .tweet-stats {
        margin-top: 6px;

        .tweet-stat {
          padding-top: 0;
        }
      }
    }

    > h1 {
      display: block;
      font-size: 1.8rem;
      margin: 25px 0 15px;
    }

    > h2 {
      font-size: 1.4rem;
      font-weight: bold;
      margin: 20px 0 12px;
    }

    > h3 {
      font-size: 1.2rem;
      font-weight: bold;
      margin: 18px 0 10px;
    }

    > p {
      font-size: 16px;
      line-height: 1.7;
      margin: 16px 0;
      word-wrap: break-word;
    }

    .blockquote-attribution {
      display: block;
      margin-top: 0.5em;
    }

    > blockquote {
      border-left: 3px solid var(--accent);
      padding-left: 16px;
      margin: 16px 0;
      color: var(--fg_faded);
      font-size: 16px;
      line-height: 1.7;
    }

    > pre {
      background-color: var(--bg_elements);
      padding: 12px 16px;
      border-radius: 6px;
      overflow-x: auto;
      margin: 16px 0;

      code {
        font-family: monospace;
        font-size: 14px;
        color: var(--fg_color);
      }
    }

    code {
      background-color: var(--bg_elements);
      padding: 2px 5px;
      border-radius: 3px;
      font-family: monospace;
      font-size: 0.9em;
    }

    > ul,
    > ol {
      margin: 16px 0;
      padding-left: 2em;

      li {
        font-size: 16px;
        line-height: 1.7;
        margin: 6px 0;
      }
    }

    .article-media {
      text-align: center;
      margin: 20px 0;

      img,
      video {
        max-width: 100%;
        border-radius: 12px;
      }

      .article-media-caption {
        color: var(--fg_faded);
        font-size: 0.875rem;
        margin-top: 6px;
      }
    }

    > a,
    > p a,
    > h1 a,
    > h2 a,
    > h3 a,
    > blockquote a,
    > ul a,
    > ol a {
      color: var(--accent);
      text-decoration: none;

      &:hover {
        text-decoration: underline;
      }
    }

    .article-divider {
      border: none;
      border-top: 1px solid var(--border_grey);
      margin: 30px 0;
    }

    .timeline-item {
      margin: 20px 0;
      border: 1px solid var(--border_grey);
      border-radius: 12px;
      overflow: hidden;
    }
  }
}

.conversation .article-page {
  max-width: 100%;
  margin-bottom: 0;
}

.article-card {
  .card-image-container {
    position: relative;
  }

  .card-image img {
    height: auto;
  }

  .article-card-badge {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
  }
}

.quote .article-card {
  margin: 0;

  .card-container {
    border: none;
    border-radius: 0;
    border-top: solid 1px var(--dark_grey);
  }
}

@media (max-width: 700px) {
  .article-page {
    .article-body {
      padding: 12px 15px 25px;

      .article-title {
        font-size: 1.6rem;
      }
    }
  }
}
