/* ================================================
   文章详情页样式 v2026.10
   极简素雅护眼 · 无渐变无发光 · 主色 #4a7dff · 圆角 8px
   ================================================ */
body {
    background: #f7f9fc;
    color: #333;
    line-height: 1.8;
}

/* ---------- 主容器 ---------- */
.article-container {
    max-width: 780px;
    margin: 0 auto;
    padding: 36px 20px 48px;
}

/* ---------- 文章头部 ---------- */
.article-header {
    text-align: center;
    margin-bottom: 36px;
    padding-bottom: 28px;
    border-bottom: 1px solid #e5eaf2;
}

.article-category {
    display: inline-block;
    padding: 5px 14px;
    background: #eef3ff;
    color: #4a7dff;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 16px;
    letter-spacing: 1px;
}

.article-title {
    font-size: 30px;
    font-weight: 700;
    color: #222;
    line-height: 1.45;
    margin-bottom: 14px;
    text-align: left;
}

.article-meta {
    color: #8a94a6;
    font-size: 14px;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.article-publish-date {
    color: #8a94a6;
}

/* ---------- 正文排版 ---------- */
.article-content {
    font-size: 17px;
    line-height: 1.9;
    color: #333;
    word-break: break-word;
}

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

.article-content p,
.article-content .article-p {
    margin-bottom: 20px;
    text-align: justify;
}

.article-content strong {
    color: #222;
    font-weight: 700;
}

.article-content a {
    color: #4a7dff;
    text-decoration: none;
    border-bottom: 1px solid rgba(74, 125, 255, 0.3);
    transition: color 0.15s, border-color 0.15s;
}

.article-content a:hover {
    color: #3a6def;
    border-bottom-color: #3a6def;
}

/* 标题层级 */
.article-content h2,
.article-content .article-h2 {
    font-size: 22px;
    font-weight: 700;
    color: #1f2733;
    margin: 40px 0 18px;
    padding-left: 14px;
    border-left: 4px solid #4a7dff;
    line-height: 1.45;
}

.article-content h3,
.article-content .article-h3 {
    font-size: 19px;
    font-weight: 700;
    color: #2a3444;
    margin: 32px 0 14px;
    line-height: 1.5;
}

.article-content h4,
.article-content .article-h4 {
    font-size: 17px;
    font-weight: 700;
    color: #333a45;
    margin: 24px 0 12px;
    line-height: 1.5;
}

.article-content h2 + p,
.article-content h3 + p,
.article-content h4 + p,
.article-content h2 + .article-p,
.article-content h3 + .article-p,
.article-content h4 + .article-p {
    margin-top: 0;
}

/* 列表 */
.article-content ul,
.article-content ol,
.article-content .article-list {
    margin: 0 0 20px;
    padding-left: 26px;
}

.article-content li {
    margin-bottom: 10px;
    line-height: 1.85;
}

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

.article-content ul li::marker {
    color: #4a7dff;
}

.article-content ol li::marker {
    color: #4a7dff;
    font-weight: 600;
}

.article-content li > ul,
.article-content li > ol {
    margin-top: 10px;
    margin-bottom: 0;
}

/* 引用块 */
.article-content blockquote {
    background: #f5f8ff;
    border-left: 4px solid #4a7dff;
    padding: 14px 20px;
    margin: 24px 0;
    border-radius: 0 8px 8px 0;
    color: #44506b;
    font-style: normal;
}

.article-content blockquote p {
    margin-bottom: 0;
}

/* 分隔线 */
.article-content hr {
    border: none;
    border-top: 1px solid #e5eaf2;
    margin: 32px 0;
}

/* 行内代码 */
.article-content code {
    background: #f0f3f8;
    color: #c2455a;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 0.88em;
    font-family: Consolas, "Courier New", monospace;
}

/* ---------- 表格 ---------- */
.article-table-wrap {
    margin: 24px 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 8px;
    border: 1px solid #e3e9f4;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.article-table-wrap table {
    margin: 0;
}

.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    font-size: 15px;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.article-content th {
    background: #4a7dff;
    color: #fff;
    padding: 11px 14px;
    text-align: left;
    font-weight: 600;
    white-space: nowrap;
}

.article-content td {
    padding: 11px 14px;
    border-bottom: 1px solid #edf1f7;
    color: #4a5468;
    line-height: 1.7;
}

/* 表格单元格第二行域名小字（站名→域名 拆分渲染） */
.article-content td .cell-domain {
    display: block;
    color: #8a93a6;
    font-size: 0.85em;
    font-weight: 400;
    line-height: 1.5;
}

.article-content tr:last-child td {
    border-bottom: none;
}

.article-content tbody tr:nth-child(even) td {
    background: #f8faff;
}

.article-content tbody tr:hover td {
    background: #f0f5ff;
}

/* ---------- 图片与图表 ---------- */
.article-content img {
    max-width: 100%;
    border-radius: 8px;
    margin: 20px auto;
    display: block;
}

.article-figure {
    margin: 26px 0;
    background: #ffffff;
    border: 1px solid #e3e9f4;
    border-radius: 8px;
    padding: 14px;
}

.article-figure svg {
    width: 100%;
    height: auto;
    display: block;
}

.article-figure img {
    width: 100%;
    height: auto;
    display: block;
    margin: 0;
}

.article-figure figcaption {
    margin-top: 10px;
    font-size: 13px;
    color: #7a8699;
    text-align: center;
    line-height: 1.6;
}

/* ---------- 文章底部推荐 ---------- */
.article-footer-recommend {
    margin-top: 44px;
    padding: 24px 26px;
    background: #ffffff;
    border: 1px solid #e3e9f4;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.article-footer-recommend h3 {
    font-size: 17px;
    font-weight: 700;
    color: #2a3444;
    margin: 0 0 16px;
}

.article-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.article-footer-links a {
    display: inline-block;
    padding: 8px 16px;
    background: #f0f5ff;
    color: #4a7dff;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
    transition: background 0.15s, color 0.15s;
}

.article-footer-links a:hover {
    background: #4a7dff;
    color: #fff;
}

/* ---------- CTA 转化区 ---------- */
.article-cta {
    text-align: center;
    margin: 40px 0 8px;
    padding: 30px 24px;
    background: #eef3ff;
    border-radius: 8px;
}

.article-cta h3 {
    font-size: 19px;
    font-weight: 700;
    color: #1f2733;
    margin: 0 0 10px;
}

.article-cta p {
    color: #5a6b85;
    margin-bottom: 22px;
    font-size: 15px;
}

.article-cta-btn,
.cta-button {
    display: inline-block;
    padding: 12px 36px;
    background: #4a7dff;
    color: #fff;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    text-decoration: none;
    transition: background 0.2s;
}

.article-cta-btn:hover,
.cta-button:hover {
    background: #3a6def;
    color: #fff;
    text-decoration: none;
}

/* CTA按钮为<a>时需高于 .article-content a (0,1,1) 的特异性，
   否则按钮文字被覆盖为蓝色导致蓝底蓝字不可见（2026-10-22修复） */
.article-content a.article-cta-btn,
.article-content a.cta-button {
    color: #fff;
    border-bottom: none;
}

.article-content a.article-cta-btn:hover,
.article-content a.cta-button:hover {
    color: #fff;
    border-bottom: none;
}

/* ---------- 相关阅读 ---------- */
.article-related {
    margin-top: 44px;
    padding-top: 28px;
    border-top: 1px solid #e5eaf2;
}

.article-related h3 {
    font-size: 18px;
    font-weight: 700;
    color: #2a3444;
    margin-bottom: 18px;
}

.related-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.related-links a {
    display: block;
    padding: 14px 18px;
    background: #fff;
    border: 1px solid #e3e9f4;
    border-radius: 8px;
    color: #3f5a8f;
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    line-height: 1.6;
    transition: border-color 0.2s, color 0.2s;
}

.related-links a:hover {
    border-color: #b8ccff;
    color: #4a7dff;
}

/* ---------- 老年模式 ---------- */
[data-mode="elder"] .article-container {
    padding: 28px 18px 40px;
}

[data-mode="elder"] .article-title {
    font-size: 34px;
}

[data-mode="elder"] .article-content {
    font-size: 19px;
    line-height: 2;
}

[data-mode="elder"] .article-content h2 {
    font-size: 25px;
}

[data-mode="elder"] .article-content h3 {
    font-size: 22px;
}

[data-mode="elder"] .article-content h4 {
    font-size: 19px;
}

[data-mode="elder"] .article-content p {
    text-align: left;
}

[data-mode="elder"] .article-content table {
    font-size: 17px;
}

[data-mode="elder"] .article-content th,
[data-mode="elder"] .article-content td {
    padding: 13px 16px;
}

[data-mode="elder"] .article-footer-recommend h3 {
    font-size: 20px;
}

[data-mode="elder"] .article-footer-links a {
    font-size: 17px;
    padding: 10px 18px;
}

[data-mode="elder"] .article-cta h3 {
    font-size: 22px;
}

[data-mode="elder"] .article-cta p {
    font-size: 17px;
}

[data-mode="elder"] .article-cta-btn,
[data-mode="elder"] .cta-button {
    padding: 15px 44px;
    font-size: 18px;
}

[data-mode="elder"] .related-links a {
    font-size: 17px;
}

/* ---------- 打印 ---------- */
@media print {
    body {
        background: #fff;
    }

    .site-nav,
    .breadcrumb,
    .article-footer-recommend,
    .article-cta,
    .article-related,
    .site-footer,
    .modal-mask {
        display: none;
    }

    .article-container {
        max-width: 100%;
        padding: 0;
    }

    .article-content a {
        color: #333;
        border-bottom: none;
    }
}

/* ---------- 移动端响应式 ---------- */
@media (max-width: 768px) {
    .article-container {
        padding: 20px 16px 36px;
    }

    .article-header {
        margin-bottom: 26px;
        padding-bottom: 20px;
    }

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

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

    .article-content {
        font-size: 16px;
        line-height: 1.85;
    }

    .article-content h2 {
        font-size: 19px;
        margin: 30px 0 14px;
    }

    .article-content h3 {
        font-size: 17.5px;
        margin: 26px 0 12px;
    }

    .article-content h4 {
        font-size: 16px;
    }

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

    .article-content th,
    .article-content td {
        padding: 9px 11px;
    }

    .article-figure {
        padding: 8px;
        margin: 20px 0;
    }

    .article-figure figcaption {
        font-size: 12px;
    }

    .article-footer-recommend {
        margin-top: 32px;
        padding: 18px 16px;
    }

    .article-footer-links a {
        font-size: 13.5px;
        padding: 7px 13px;
    }

    .article-cta {
        margin: 30px 0 4px;
        padding: 22px 16px;
    }

    .article-cta h3 {
        font-size: 17.5px;
    }

    .article-related {
        margin-top: 32px;
        padding-top: 22px;
    }

    .related-links a {
        font-size: 14px;
        padding: 12px 14px;
    }
}

/* ---------- 模板卡片（错题本/复盘记录/板书） ---------- */
.tpl-card {
    margin: 26px 0;
    background: #ffffff;
    border: 1px solid #e3e9f4;
    border-radius: 8px;
    padding: 20px 22px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.tpl-card-title {
    font-size: 15px;
    font-weight: 700;
    color: #1f2733;
    text-align: center;
    padding-bottom: 12px;
    border-bottom: 1px dashed #d7dfec;
    margin: 0 0 6px;
}

.tpl-sec {
    padding: 10px 0;
    border-bottom: 1px dashed #e8edf5;
}

.tpl-sec:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.tpl-sec-title {
    font-weight: 700;
    color: #3f5a8f;
    font-size: 15px;
    margin-bottom: 6px;
}

.tpl-line {
    font-size: 14.5px;
    color: #4a5468;
    line-height: 2;
}

.tpl-note {
    margin-top: 12px;
    padding: 8px 12px;
    background: #f5f8ff;
    border-radius: 8px;
    font-size: 13.5px;
    color: #5a6b85;
}

/* ---------- 代码块 ---------- */
.article-pre {
    background: #f5f7fa;
    border: 1px solid #e3e9f4;
    border-radius: 8px;
    padding: 16px 18px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    font-family: Consolas, "Courier New", monospace;
    font-size: 14px;
    line-height: 1.7;
    color: #333a45;
    margin: 24px 0;
    white-space: pre;
}

[data-mode="elder"] .tpl-line { font-size: 17px; }
[data-mode="elder"] .tpl-sec-title { font-size: 18px; }
[data-mode="elder"] .article-pre { font-size: 16px; }

@media (max-width: 768px) {
    .tpl-card { padding: 14px 14px; }
    .tpl-line { font-size: 13.5px; }
}
