/* ========== 文章详情页：面包屑 / 正文排版 / 上下篇 / 相关推荐 ========== */
:root {
    --article-wrap: min(880px, 72%);
    --article-muted: #8a8a8a;
}

/* ---------- 面包屑 ---------- */
.article-breadcrumb {
    width: var(--article-wrap);
    margin: 24px auto 0;
    font-size: 14px;
    color: var(--muted-light);
}

.article-breadcrumb a {
    color: var(--muted-light);
    text-decoration: none;
}

.article-breadcrumb a:hover {
    color: var(--brand);
}

.article-breadcrumb .sep {
    margin: 0 8px;
    color: #c9c9c9;
}

.article-breadcrumb .current {
    color: var(--muted);
}

/* ---------- 正文容器 ---------- */
.article-main {
    width: var(--article-wrap);
    margin: 0 auto 64px;
}

/* ---------- 文章头部 ---------- */
.article-header {
    padding: 32px 0 24px;
    border-bottom: 1px solid var(--line);
}

.article-tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    background: rgba(0, 173, 181, 0.12);
    color: var(--brand);
    font-size: 13px;
    letter-spacing: 1px;
}

.article-title {
    margin: 16px 0 18px;
    font-size: 34px;
    font-weight: 700;
    line-height: 1.4;
    color: var(--text-strong);
}

.article-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 24px;
    font-size: 14px;
    color: var(--article-muted);
}

.article-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* ---------- 封面图 ---------- */
.article-cover {
    margin: 28px 0 8px;
}

.article-cover img {
    width: 100%;
    max-height: 460px;
    object-fit: cover;
    display: block;
    border-radius: var(--radius);
    background: #eee;
}

.article-cover figcaption {
    margin-top: 10px;
    font-size: 13px;
    color: var(--article-muted);
    text-align: center;
}

/* ---------- 正文排版 ---------- */
.article-content {
    padding-top: 12px;
    font-size: 17px;
    line-height: 1.9;
    color: #333;
}

.article-content > * + * {
    margin-top: 22px;
}

.article-content p {
    text-align: justify;
}

.article-content .lead {
    font-size: 18px;
    color: #444;
    font-weight: 500;
}

.article-content h2 {
    margin-top: 44px;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.5;
    color: var(--text-strong);
}

.article-content h3 {
    margin-top: 32px;
    font-size: 19px;
    font-weight: 600;
    color: var(--text-strong);
}

.article-content h2::before {
    content: "";
    display: inline-block;
    width: 4px;
    height: 20px;
    margin-right: 10px;
    vertical-align: -2px;
    border-radius: 2px;
    background: var(--brand);
}

.article-content ul,
.article-content ol {
    padding-left: 24px;
}

.article-content li {
    margin-bottom: 10px;
}

.article-content li::marker {
    color: var(--brand);
}

.article-content strong {
    color: var(--text-strong);
    font-weight: 600;
}

.article-content code {
    padding: 2px 6px;
    border-radius: 4px;
    background: #f4f6f8;
    color: var(--brand-dark);
    font-size: 0.9em;
    font-family: Consolas, Monaco, monospace;
}

.article-content blockquote {
    padding: 18px 22px;
    border-left: 4px solid var(--brand);
    border-radius: 0 var(--radius) var(--radius) 0;
    background: #f7fbfa;
    color: #444;
    font-size: 16px;
}

.article-figure {
    margin: 34px 0;
}

.article-figure img {
    width: 100%;
    display: block;
    border-radius: var(--radius);
    background: #eee;
}

.article-figure figcaption {
    margin-top: 10px;
    font-size: 13px;
    color: var(--article-muted);
    text-align: center;
}

.article-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}

.article-table th,
.article-table td {
    padding: 12px 14px;
    border: 1px solid var(--line);
    text-align: left;
}

.article-table th {
    background: #f7fbfa;
    color: var(--text-strong);
    font-weight: 600;
}

.article-table tbody tr:nth-child(even) {
    background: #fafafa;
}

/* ---------- 文末标签 ---------- */
.article-footer-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 44px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
    font-size: 13px;
    color: var(--article-muted);
}

.article-footer-tags span {
    padding: 4px 12px;
    border: 1px solid var(--line);
    border-radius: 20px;
}

/* ---------- 上下篇导航 ---------- */
.article-nav {
    display: flex;
    gap: 16px;
    margin-top: 28px;
}

.article-nav a {
    flex: 1;
    padding: 18px 20px;
    border: 1px solid var(--line-light);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow-card);
    text-decoration: none;
    transition: all 0.25s ease;
}

.article-nav a:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-card-hover);
}

.article-nav .nav-label {
    font-size: 13px;
    color: var(--article-muted);
}

.article-nav .nav-title {
    margin-top: 6px;
    font-size: 16px;
    font-weight: 600;
    color: var(--brand);
    line-height: 1.5;
}

.article-nav .nav-next {
    text-align: right;
}

.article-nav .nav-disabled {
    flex: 1;
    padding: 18px 20px;
    border: 1px dashed var(--line);
    border-radius: var(--radius);
    color: #bbb;
    font-size: 14px;
    background: #fafafa;
}

/* ---------- 返回列表 ---------- */
.article-back {
    margin-top: 32px;
    text-align: center;
}

.article-back a {
    display: inline-block;
    padding: 10px 28px;
    border: 1px solid var(--brand);
    border-radius: 24px;
    color: var(--brand);
    font-size: 15px;
    text-decoration: none;
    transition: all 0.25s ease;
}

.article-back a:hover {
    background: var(--brand);
    color: #fff;
}

/* ---------- 平板适配 ---------- */
@media screen and (max-width: 1200px) {
    :root {
        --article-wrap: 80%;
    }
}

@media screen and (max-width: 992px) {
    .article-title {
        font-size: 28px;
    }
    .article-content {
        font-size: 16px;
    }
    .article-content h2 {
        font-size: 21px;
    }
}

/* ---------- 手机适配 ---------- */
@media screen and (max-width: 768px) {
    :root {
        --article-wrap: 92%;
    }
    .article-header {
        padding: 20px 0 18px;
    }
    .article-title {
        font-size: 23px;
    }
    .article-meta {
        gap: 14px;
        font-size: 13px;
    }
    .article-cover img {
        max-height: 240px;
    }
    .article-content {
        font-size: 15px;
        line-height: 1.85;
    }
    .article-content h2 {
        margin-top: 34px;
        font-size: 19px;
    }
    .article-content .lead {
        font-size: 16px;
    }
    .article-nav {
        flex-direction: column;
    }
    .article-nav .nav-next {
        text-align: left;
    }
}
