.author-archive-header.ymx-latest-posts-header,
.search-archive-header.ymx-latest-posts-header,
.category-archive-header.ymx-latest-posts-header {
    margin-left: 0;
    width: 100%;
}

/* 快讯分类模板 */
.ymx-news-archive-page {
    background: var(--ymx-bg-page);
    padding: 20px 0 0;
}

.ymx-news-archive-page .container {
    max-width: 1200px;
}

.ymx-news-main-box {
    margin: 0;
    padding: 50px 100px;
    background: var(--ymx-bg-card);
    border-radius: 8px;
}

/* 快讯分类模板手机端适配 */
@media (max-width: 768px) {
    .ymx-news-archive-page {
        padding: 0;
    }

    .site-main.ymx-news-archive-page {
        padding-bottom: 0;
    }

    .ymx-news-main-box {
        padding: 15px;
        border-radius: 0;
    }

    .ymx-news-row {
        grid-template-columns: 80px minmax(0, 1fr);
        column-gap: 12px;
    }

    .ymx-news-row-date {
        min-height: 58px;
        padding: 8px 6px;
        margin-top: 8px;
    }

    .ymx-news-day {
        font-size: 26px;
        margin-bottom: 5px;
    }

    .ymx-news-year-month {
        font-size: 11px;
    }

    .ymx-news-row-content {
        grid-template-columns: 52px minmax(0, 1fr);
        padding: 10px 0;
    }

    .ymx-news-post-meta {
        padding: 0 8px 0 12px;
    }

    .ymx-news-post-time {
        font-size: 12px;
    }

    .ymx-news-post-title {
        font-size: 15px;
    }

    .ymx-news-post-excerpt {
        font-size: 13px;
        line-height: 1.65;
    }
}

.ymx-news-timeline {
    display: flex;
    flex-direction: column;
}

.ymx-news-row {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr);
    column-gap: 22px;
    align-items: start;
    padding: 0;
}

.ymx-news-row-date {
    min-height: 72px;
    background: #1f2733;
    border-radius: 8px;
    padding: 10px 8px;
    text-align: center;
    margin-top: 10px;
}

.ymx-news-row-date.is-empty {
    background: transparent;
    padding: 0;
    margin-top: 0;
}

.ymx-news-day {
    font-size: 34px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1;
    margin-bottom: 8px;
}

.ymx-news-year-month {
    font-size: 13px;
    color: #d1d5db;
    line-height: 1;
}

/* 右侧内容区：时分列 + 文章详情列 */
.ymx-news-row-content {
    position: relative;
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    column-gap: 0;
    padding: 16px 0;
    border-left: 2px solid #e5e7eb;
}

/* 第一个文章盒子：顶部不显示竖线，仅保留圆点以下竖线 */
.ymx-news-timeline .ymx-news-row:first-child .ymx-news-row-content {
    border-left-color: #e5e7eb;
}

.ymx-news-timeline .ymx-news-row:first-child .ymx-news-row-content::after {
    content: '';
    position: absolute;
    left: -2px;
    top: 0;
    width: 4px;
    height: 21px;
    background: var(--ymx-bg-card);
    z-index: 1;
}

/* 圆点 */
.ymx-news-row-content::before {
    content: '';
    position: absolute;
    top: 21px;
    left: -1px;
    transform: translate(-50%, 0);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #6b7280;
    z-index: 2;
}

/* 时分：与圆点、标题顶部对齐 */
.ymx-news-post-meta {
    display: flex;
    align-items: flex-start;
    padding: 0 12px 0 16px;
}

.ymx-news-post-time {
    font-size: 13px;
    color: #6b7280;
    font-weight: 600;
    white-space: nowrap;
    line-height: 1.2;
    margin-top: 0;
    padding-top: 0;
}

.ymx-news-post-detail {
    padding-top: 0;
}

.ymx-news-post-title {
    font-size: 17px;
    margin: 0 0 6px;
    line-height: 1.45;
    color: #111827;
}

.ymx-news-post-title a {
    color: inherit;
    text-decoration: none;
}

.ymx-news-post-title a:hover {
    color: #2563eb;
}

.ymx-news-post-excerpt {
    font-size: 14px;
    color: #4b5563;
    line-height: 1.75;
    word-break: break-word;
}

body.ymx-dark-mode .ymx-news-archive-page {
    background: #161a22;
}

body.ymx-dark-mode .ymx-news-main-box {
    background: #1f2530;
}

body.ymx-dark-mode .ymx-news-timeline .ymx-news-row:first-child .ymx-news-row-content::after {
    background: #1f2530;
}

body.ymx-dark-mode .ymx-news-row-date {
    background: #0f1723;
}

body.ymx-dark-mode .ymx-news-row-date.is-empty {
    background: transparent;
}

body.ymx-dark-mode .ymx-news-row-content {
    border-left-color: #394355;
}

body.ymx-dark-mode .ymx-news-row-content::before {
    background: #93c5fd;
}

body.ymx-dark-mode .ymx-news-post-time {
    color: #9aa6bb;
}

body.ymx-dark-mode .ymx-news-post-title {
    color: #e6ebf5;
}

body.ymx-dark-mode .ymx-news-post-title a:hover {
    color: #93c5fd;
}

body.ymx-dark-mode .ymx-news-post-excerpt {
    color: #b4bfce;
}

/* 归档页头部：复用 .ymx-latest-posts-header，避免右移 */
.archive-archive-header.ymx-latest-posts-header {
    margin-left: 0;
    width: 100%;
}

/* 标签页头部：复用 .ymx-latest-posts-header，避免右移 */
.tag-archive-header.ymx-latest-posts-header {
    margin-left: 0;
    width: 100%;
}

.author-archive-header .author-archive-header-inner {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
}

.author-archive-header .author-archive-description {
    margin: 0;
    padding-left: 19px; /* 对齐 latest-posts-title 的文字起始位置(4px border + 15px padding) */
    color: var(--ymx-text-secondary);
    font-size: 14px;
    line-height: 1.6;
}

/* 作者页/搜索页/分类页/归档页/标签页：PC端主内容区距离header 20px */
.author-archive-page .main-layout,
.search-archive-page .main-layout,
.category-archive-page .main-layout,
.archive-archive-page .main-layout,
.tag-archive-page .main-layout {
    padding-top: 20px;
}

/* 作者页/搜索页/分类页手机端：更扁平的列表样式 */
@media (max-width: 768px) {
    /* 去掉主内容区域距离 header 的上间距 */
    .author-archive-page .main-layout,
    .search-archive-page .main-layout,
    .category-archive-page .main-layout,
    .archive-archive-page .main-layout,
    .tag-archive-page .main-layout {
        padding-top: 0;
    }

    /* 去掉作者 header 的边框/阴影 */
    .author-archive-page .author-archive-header.ymx-latest-posts-header {
        border: none;
        box-shadow: none;
    }

    /* 去掉搜索页 header 的边框/阴影 */
    .search-archive-page .search-archive-header.ymx-latest-posts-header {
        border: none;
        box-shadow: none;
    }

    /* 去掉分类页 header 的边框/阴影 */
    .category-archive-page .category-archive-header.ymx-latest-posts-header {
        border: none;
        box-shadow: none;
    }

    /* 去掉归档页 header 的边框/阴影 */
    .archive-archive-page .archive-archive-header.ymx-latest-posts-header {
        border: none;
        box-shadow: none;
    }

    /* 去掉标签页 header 的边框/阴影 */
    .tag-archive-page .tag-archive-header.ymx-latest-posts-header {
        border: none;
        box-shadow: none;
    }

    /* 去掉文章列表大容器的 gap */
    .author-archive-page .articles-container,
    .search-archive-page .articles-container,
    .category-archive-page .articles-container,
    .archive-archive-page .articles-container,
    .tag-archive-page .articles-container {
        gap: 0;
        row-gap: 0;
        column-gap: 0;
    }

    /* 去掉单篇文章的边框/阴影 */
    .author-archive-page .ymx-article-card,
    .author-archive-page .ymx-article-card:first-child,
    .author-archive-page .ymx-article-card:hover,
    .search-archive-page .ymx-article-card,
    .search-archive-page .ymx-article-card:first-child,
    .search-archive-page .ymx-article-card:hover,
    .category-archive-page .ymx-article-card,
    .category-archive-page .ymx-article-card:first-child,
    .category-archive-page .ymx-article-card:hover,
    .archive-archive-page .ymx-article-card,
    .archive-archive-page .ymx-article-card:first-child,
    .archive-archive-page .ymx-article-card:hover,
    .tag-archive-page .ymx-article-card,
    .tag-archive-page .ymx-article-card:first-child,
    .tag-archive-page .ymx-article-card:hover {
        border: none;
        box-shadow: none;
    }
}

/* 首页手机端试用：同步作者页的”扁平列表”风格（不满意可整体撤回此段） */
@media (max-width: 768px) {
    /* 列表头去阴影/边框（首页焦点区文章列表） */
    .ymx-focus-main .ymx-latest-posts-header {
        border: none;
        box-shadow: none;
    }

    /* 列表容器去 gap（首页焦点区文章列表） */
    .ymx-focus-main .articles-container {
        gap: 0;
        row-gap: 0;
        column-gap: 0;
    }

    /* 单篇文章去阴影/边框（首页焦点区文章列表） */
    .ymx-focus-main .ymx-article-card,
    .ymx-focus-main .ymx-article-card:first-child,
    .ymx-focus-main .ymx-article-card:hover {
        border: none;
        box-shadow: none;
    }
}
