/*
 * ==========================================
 * 模块定位：全局 - 文章正文页 (Single Article & Typography) [全量终极矩阵版]
 * 代码类型：CSS
 * ==========================================
 * 1. 业务功能：全权接管 GP 正文排版、移动端表格防溢出保护。
 * 2. 修复与 SEO 优化：剔除 CSS 伪元素文本障碍；H2 首节点留白自动切除；表格 x 轴独立内滑强制隔离。
 * 3. 针对页面：全局 Single Post 及核心文章归档。
 * 4. 性能开销：0 ms 查库，纯静态分发，边缘节点强缓存友好。
 * 最后修改：2026-05-04 09:25 (UTC+8) - 已彻底剥离导航样式
 */

/* ==========================================
 * 一、 架构级预留：多语言与广告 Zero CLS 占位防御
 * ========================================== */
.mx-ad-placeholder:empty,
.mx-placeholder:empty {
    display: none;
}
.mx-ad-placeholder {
    width: 100%;
    min-height: 250px;
    margin: 1.5rem auto;
    background: transparent;
    aspect-ratio: 4 / 3;
}

/* ==========================================
 * 二、 文章头部与 Meta 基础样式 (PC端优先)
 * ========================================== */
.single .entry-header {
    background-color: #ffffff;
    padding: 0 0 15px 0;
    margin-bottom: 25px;
    border-bottom: 1px solid #eeeeee;
}

.single .entry-header .entry-title {
    font-size: 32px; 
    font-weight: 700;
    color: #222222; 
    line-height: 1.3;
    margin-bottom: 15px;
}

.single .entry-header .entry-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
    font-size: 14px;
    color: #666666;
}

/* 【清理点1】：去掉了原版逗号后面的 .single .post-navigation .gp-icon */
.single .entry-header .entry-meta .gp-icon,
.single .entry-meta .tags-links .gp-icon {
    display: none;
}

.single .entry-header .entry-meta a {
    color: #666666;
    text-decoration: none;
    transition: color 0.2s ease;
}

/* 【清理点2】：去掉了原版逗号后面的 .single .post-navigation a:hover */
.single .entry-header .entry-meta a:hover {
    color: #0056b3;
}

.single .entry-header .posted-on::before,
.single .entry-header .cat-links::before {
    content: "";
    display: inline-block;
    width: 1em;
    height: 1em;
    margin-right: 0.4em;
    background-size: contain;
    background-repeat: no-repeat;
    vertical-align: -0.125em; 
}
.single .entry-header .posted-on::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath fill='%23a0a0a0' d='M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm0 448c-110.5 0-200-89.5-200-200S145.5 56 256 56s200 89.5 200 200-89.5 200-200 200zm61.8-104.4l-84.9-61.7c-3.1-2.3-4.9-5.9-4.9-9.7V116c0-6.6 5.4-12 12-12h32c6.6 0 12 5.4 12 12v141.7l66.8 48.6c5.4 3.9 6.5 11.4 2.6 16.8L334.6 349c-3.9 5.3-11.4 6.5-16.8 2.6z'/%3E%3C/svg%3E");
}
.single .entry-header .cat-links::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath fill='%23a0a0a0' d='M464 128H272l-64-64H48C21.49 64 0 85.49 0 112v288c0 26.51 21.49 48 48 48h416c26.51 0 48-21.49 48-48V176c0-26.51-21.49-48-48-48z'/%3E%3C/svg%3E");
}

/* ==========================================
 * 三、 文章尾部组件 (Tags) - UI 视觉重载
 * ========================================== */
.single .entry-meta .tags-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px; 
    margin: 30px 0 20px 0;
    font-size: 0 !important; /* 抹除匿名逗号节点 */
}
.single .entry-meta .tags-links .screen-reader-text {
    display: none; 
}
.single .entry-meta .tags-links a {
    font-size: 14px !important; 
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #f5f5f5;
    color: #222222;
    padding: 6px 14px;
    border-radius: 0; /* 修改：将 4px 改为 0 (直角) */
    text-decoration: none;
    line-height: 1; 
    min-height: 32px; 
    transition: all 0.2s ease;
}
.single .entry-meta .tags-links a:hover {
    background-color: #0056b3;
    color: #ffffff;
}

/* 【清理点3】：这里原本有长达 30 行的 “.single .post-navigation” 相关代码，已整块物理删除 */

/* ==========================================
 * 四、 正文标题流体排版 (Typography H2/H3/H4)
 * ========================================== */
.entry-content h2 {
    position: relative;
    padding-bottom: 0.75em;
    margin-top: 2em;
    margin-bottom: 1em;
    border-bottom: 1px solid #e2e8f0; 
    color: #222222; 
    font-weight: 700;
    font-size: 20px;
}
.entry-content h2::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -1px; 
    width: 3.75rem; 
    height: 3px;  
    background-color: #0056b3; 
    transform: translateZ(0); 
}

.entry-content h3 {
    padding-left: 0.75em;
    border-left: 3px solid #0056b3; 
    color: #222222;
    margin-top: 1.8em;
    margin-bottom: 0.8em;
    font-weight: 600;
    font-size: 18px;
    line-height: 1.5;
}

.entry-content h4 {
    color: #475569;
    font-weight: 600;
    margin-top: 1.5em;
    margin-bottom: 0.8em;
    line-height: 1.6;
    font-size: 14px;
}

/* 强制防御：切除首个子节点标题的冗余顶部间距 */
.entry-content > h1:first-child,
.entry-content > h2:first-child,
.entry-content > h3:first-child {
    margin-top: 0 !important;
}

/* ==========================================
 * 五、 经典编辑器原生表格防溢出保护罩 (Data Table Protection)
 * ========================================== */
.entry-content table {
    display: block !important;
    width: 100% !important;
    max-width: 100%;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch; 
    border-collapse: collapse;
    margin-bottom: 1.5em;
}

.entry-content table th,
.entry-content table td {
    min-width: 120px; 
    word-break: normal; 
}

.entry-content table th:first-child,
.entry-content table td:first-child {
    min-width: 150px;
}

/* ==========================================
 * 六、 正文段落与列表排版 (Paragraphs & Lists)
 * ========================================== */
.entry-content p,
.entry-content li {
    font-size: 14px;      
    line-height: 1.6;     
    color: #222222;       
    margin-bottom: 1.5em; 
}

/* ==========================================
 * 优化：正文引用块 (Blockquote) 样式重构
 * ========================================== */
.entry-content blockquote {
    font-style: normal !important; 
    font-size: 14px;               
    line-height: 1.6;              
    color: #475569;                
    background-color: #f8fafc;     
    margin: 1.5em 0;               
    padding: 18px 24px;            
    border-left: 4px solid #0056b3;
    border-radius: 0; /* 修改：将 0 4px 4px 0 改为 0 (直角) */
}

/* 消除引用块内部段落产生的多余底部留白 */
.entry-content blockquote p:last-child {
    margin-bottom: 0 !important;
}

/* ==========================================
 * 七、 移动端专属响应式重载 (唯一媒体查询块)
 * ========================================== */
@media (max-width: 768px) {
    h1.entry-title {
        font-size: 24px !important;
        line-height: 1.3 !important;
        margin-bottom: 10px !important;
    }
    .entry-header {
        margin-bottom: 15px !important; 
        padding-bottom: 12px !important; 
    }
    .entry-header .entry-meta {
        gap: 8px 15px !important; 
        font-size: 13px !important;
    }
    .entry-content,
    .entry-content p,
    .entry-content li {
        font-size: 15px !important; 
        line-height: 1.6 !important; 
        color: #222222 !important;   
        margin-top: 0 !important; 
    }
    .entry-content p { margin-bottom: 15px !important; }
    .entry-content li { margin-bottom: 10px !important; }
    .entry-content img { margin-bottom: 1em !important; }
    .entry-content ul,
    .entry-content ol {
        margin-left: 0 !important; 
        padding-left: 18px !important; 
        margin-top: 10px !important;   
        margin-bottom: 20px !important; 
    }
    .entry-content h3 { margin-bottom: 0.5em !important; }
    .entry-content h4 { margin-bottom: 0.4em !important; }
}
/* ----------逻辑结束---------- */