/* ===========================================
   文章阅读页 — 东方墨韵 editorial article
   =========================================== */

/* ── Article header ── */
.article-hero {
    padding: calc(64px + var(--space-2xl)) 0 var(--space-xl);
    background:
        radial-gradient(ellipse 50% 40% at 50% 0%, rgba(196,70,58,0.05) 0%, transparent 100%),
        var(--bg-ink);
    border-bottom: 1px solid var(--border);
    position: relative;
}

.article-hero::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 2px;
    background: var(--accent);
}

.article-hero-inner {
    max-width: 780px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.article-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: var(--space-lg);
}

.article-breadcrumb a {
    color: var(--text-tertiary);
    transition: color 0.3s ease;
}

.article-breadcrumb a:hover { color: var(--accent); }
.article-breadcrumb i.fa-chevron-right { font-size: 9px; color: var(--text-muted); }

.article-title {
    font-family: var(--font-display);
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
    letter-spacing: 0.03em;
    margin-bottom: var(--space-sm);
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 13px;
    color: var(--text-muted);
    margin-top: var(--space-md);
}

.article-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.article-meta i { font-size: 12px; }

/* ── Article body ── */
.article-content-section {
    padding: var(--space-2xl) 0 var(--space-3xl);
    background: var(--bg-ink);
}

.article-body {
    max-width: 780px;
    margin: 0 auto;
    padding: 0 var(--space-md);
    font-size: 17px;
    color: var(--text-secondary);
    line-height: 1.9;
}

/* ── Typography ── */
.article-body p {
    margin-bottom: 1.5em;
}

.article-body h2 {
    font-family: var(--font-display);
    font-size: clamp(22px, 2.5vw, 28px);
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 2.5em;
    margin-bottom: 0.8em;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
    position: relative;
    line-height: 1.4;
}

.article-body h2::before {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 32px;
    height: 2px;
    background: var(--accent);
}

.article-body h3 {
    font-family: var(--font-display);
    font-size: clamp(18px, 2vw, 21px);
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 2em;
    margin-bottom: 0.6em;
    padding-left: 14px;
    border-left: 3px solid var(--accent);
    line-height: 1.4;
}

.article-body h4 {
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 1.6em;
    margin-bottom: 0.5em;
}

/* ── Strong & emphasis ── */
.article-body strong {
    color: var(--text-primary);
    font-weight: 600;
}

.article-body em {
    color: var(--gold);
    font-style: italic;
}

/* ── Links ── */
.article-body a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: rgba(196,70,58,0.35);
    transition: text-decoration-color 0.3s ease;
}

.article-body a:hover {
    text-decoration-color: var(--accent);
}

/* ── Lists ── */
.article-body ul,
.article-body ol {
    margin: 1em 0 1.5em;
    padding-left: 0;
}

.article-body ul li,
.article-body ol li {
    position: relative;
    padding-left: 22px;
    margin-bottom: 10px;
    line-height: 1.85;
}

.article-body ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.65em;
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 1px;
    opacity: 0.7;
}

.article-body ol {
    counter-reset: article-ol;
}

.article-body ol li {
    counter-increment: article-ol;
}

.article-body ol li::before {
    content: counter(article-ol);
    position: absolute;
    left: 0;
    top: 0;
    font-family: var(--font-display-en);
    font-size: 14px;
    font-weight: 600;
    color: var(--accent);
    opacity: 0.8;
}

/* ── Blockquote ── */
.article-body blockquote {
    margin: 1.5em 0;
    padding: 20px 24px;
    background: var(--bg-panel);
    border-left: 3px solid var(--accent);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    color: var(--text-secondary);
    font-size: 16px;
    line-height: 1.85;
}

.article-body blockquote p:last-child {
    margin-bottom: 0;
}

/* ── Code — inline ── */
.article-body code {
    font-family: var(--font-mono);
    font-size: 0.88em;
    padding: 2px 7px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--gold);
}

/* ── Code — block ── */
.article-body pre {
    margin: 1.5em 0;
    padding: 20px 24px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.article-body pre code {
    padding: 0;
    background: none;
    border: none;
    border-radius: 0;
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.7;
}

/* ── Tables ── */
.article-body table {
    width: 100%;
    margin: 1.5em 0;
    border-collapse: collapse;
    font-size: 15px;
}

.article-body thead {
    background: var(--bg-panel);
}

.article-body th {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    text-align: left;
    padding: 12px 16px;
    border-bottom: 2px solid var(--border-strong);
}

.article-body td {
    padding: 12px 16px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}

.article-body tbody tr:hover {
    background: var(--bg-hover);
}

/* ── Images ── */
.article-body img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    margin: 1.5em 0;
    border: 1px solid var(--border);
}

.article-body figure {
    margin: 2em 0;
}

.article-body figcaption {
    font-size: 13px;
    color: var(--text-muted);
    text-align: center;
    margin-top: 10px;
    line-height: 1.6;
}

/* ── Horizontal rule ── */
.article-body hr {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-strong) 30%, var(--border-strong) 70%, transparent);
    margin: 2.5em 0;
}

/* ── Tip / Note / Warning boxes ── */
.article-tip,
.article-note,
.article-warning {
    margin: 1.5em 0;
    padding: 16px 20px;
    border-radius: var(--radius-md);
    font-size: 15px;
    line-height: 1.8;
}

.article-tip {
    background: rgba(196,163,90,0.08);
    border-left: 3px solid var(--gold);
    color: var(--text-secondary);
}

.article-note {
    background: var(--accent-soft);
    border-left: 3px solid var(--accent);
    color: var(--text-secondary);
}

.article-warning {
    background: rgba(196,70,58,0.08);
    border-left: 3px solid var(--accent);
    color: var(--text-secondary);
}

/* ── Back link ── */
.article-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: var(--space-2xl);
    padding: 10px 20px;
    font-size: 14px;
    color: var(--text-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
}

.article-back-link:hover {
    color: var(--accent);
    border-color: var(--border-accent);
    background: var(--accent-soft);
}

.article-back-link i {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.article-back-link:hover i {
    transform: translateX(-3px);
}

/* ── Footer spacing for article pages ── */
.article-footer-spacer {
    height: var(--space-xl);
}

/* ── Responsive ── */
@media (max-width: 600px) {
    .article-hero {
        padding: calc(64px + var(--space-xl)) 0 var(--space-lg);
    }

    .article-title {
        font-size: 26px;
    }

    .article-body {
        font-size: 16px;
    }

    .article-body pre {
        padding: 16px;
        border-radius: var(--radius-md);
    }

    .article-body blockquote {
        padding: 16px 18px;
    }

    .article-meta {
        flex-wrap: wrap;
        gap: 10px;
    }

    .article-body table {
        font-size: 14px;
    }

    .article-body th,
    .article-body td {
        padding: 10px 12px;
    }
}
