/* Markdown 正文的核心排版，只作用于文章内容区域，避免影响首页列表和侧栏。 */
.article-content {
    color: var(--text);
    font-size: 1.06rem;
    line-height: 1.92;
}

.article-content p {
    margin: 0 0 1.35rem;
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5 {
    margin: 2.2rem 0 .9rem;
    color: var(--text);
    font-weight: 780;
    line-height: 1.35;
    letter-spacing: 0;
}

.article-content h1 {
    font-size: 2rem;
}

.article-content h2 {
    padding-bottom: .45rem;
    border-bottom: 1px solid var(--line-soft);
    font-size: 1.65rem;
}

.article-content h3 {
    color: var(--brand-strong);
    font-size: 1.35rem;
}

.article-content ul,
.article-content ol {
    padding-left: 1.35rem;
    margin: 0 0 1.35rem;
}

.article-content li + li {
    margin-top: .25rem;
}

.article-content img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 1.6rem auto;
    border-radius: 5px;
}

.article-content > :first-child {
    margin-top: 0;
}

.article-content > :last-child {
    margin-bottom: 0;
}

/* 长链接允许在任意位置换行，解决窄屏文章内容横向溢出。 */
.article-content a {
    overflow-wrap: anywhere;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: .22em;
}

.article-content strong {
    color: var(--text);
    font-weight: 780;
}

/* 引用、代码块和图片保留 5px 小圆角，和独立页面内容卡片保持一致。 */
.article-content blockquote {
    margin: 1.7rem 0;
    padding: .95rem 1.1rem;
    background: var(--brand-soft);
    border-left: 4px solid var(--brand);
    border-radius: 5px;
}

.article-content pre {
    max-width: 100%;
    overflow-x: auto;
    margin: 1.7rem 0;
    padding: 1.1rem;
    line-height: 1.72;
    border-radius: 5px;
}

.article-content :not(pre) > code {
    margin: 0 .08em;
    border: 1px solid rgba(132, 94, 194, .14);
}

.article-content li::marker {
    color: var(--brand);
    font-weight: 700;
}

.article-content table {
    display: block;
    width: 100%;
    overflow-x: auto;
    margin: 1.6rem 0;
}

/* 分隔线使用更大的上下留白，让长文段落之间有清楚的停顿。 */
.article-content hr {
    margin: 2.2rem 0;
}

@media (max-width: 767px) {
    /* 手机端略微降低字号和行高，提升长文阅读密度。 */
    .article-content {
        font-size: 1rem;
        line-height: 1.86;
    }
}
