/*
** =====================================================
**  IT之家风格皮肤（ithome.css）
**  加载顺序：必须位于 aio.global.css 之后
**  主题色：#D32F2F（红）/ 辅助深红：#B71C1C
**  设计基准：www.ithome.com 桌面版
**  回滚：删除本文件 + 移除 header.php 中的引用即可
** =====================================================
*/

/* ---------- 1. 全局令牌重映射：蓝 → 红 ---------- */
:root,
[data-bs-theme=light] {
    --ith-red: #D32F2F;
    --ith-red-dark: #B71C1C;
    --ith-red-rgb: 211, 47, 47;

    /* 原主题所有蓝色组件（导航悬停/分页/搜索按钮/时间轴/标签等）整体转红 */
    --bs-blue: var(--ith-red);
    --bs-blue-rgb: var(--ith-red-rgb);
    --bs-primary: var(--ith-red);
    --bs-link-hover-color-rgb: var(--ith-red-rgb);

    /* IT之家为直角扁平设计 */
    --bs-border-radius: 0;
    --bs-border-color: #e5e5e5;
    --bs-border-color-rgb: 229, 229, 229;

    --ith-bg-page: #f4f5f7;
    --ith-bg-box: #ffffff;
    --ith-text-title: #222222;
    --ith-text-body: #333333;
    --ith-text-desc: #808080;
    --ith-text-meta: #999999;
    --ith-line: #eeeeee;

    --aio-spacing: 20px;
}

/* ---------- 2. 基础排版：IT之家字体层级 ---------- */
body {
    font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    color: var(--ith-text-body);
    background-color: var(--ith-bg-page);
    line-height: 1.6;
}

a:hover,
a:hover span {
    color: var(--ith-red) !important;
}

/* 去圆角、去位移动画、去标题下划线动效（扁平化） */
.rounded,
.rounded-pill,
.card,
.btn,
.ticket {
    border-radius: 0 !important;
}

.up-hover:hover,
.down-hover:hover,
.left-hover:hover,
.right-hover:hover {
    transform: none;
}

.title-hover .title {
    background: none !important;
}

.btn-primary {
    --bs-btn-bg: var(--ith-red);
    --bs-btn-border-color: var(--ith-red);
    --bs-btn-hover-bg: var(--ith-red-dark);
    --bs-btn-hover-border-color: var(--ith-red-dark);
    --bs-btn-active-bg: var(--ith-red-dark);
    --bs-btn-active-border-color: var(--ith-red-dark);
}

.btn-outline-primary {
    --bs-btn-color: var(--ith-red);
    --bs-btn-border-color: var(--ith-red);
    --bs-btn-hover-bg: var(--ith-red);
    --bs-btn-hover-border-color: var(--ith-red);
    --bs-btn-active-bg: var(--ith-red-dark);
    --bs-btn-active-border-color: var(--ith-red-dark);
}

/* ---------- 3. 顶部：白色 LOGO/搜索行 + 红色通栏导航 ---------- */
.aio-header {
    background-color: transparent;
    box-shadow: none;
}

.ith-topbar {
    background-color: var(--ith-bg-box);
    border-bottom: 1px solid var(--ith-line);
}

.ith-topbar-inner {
    padding-top: 14px;
    padding-bottom: 14px;
}

.logo-text {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--ith-red) !important;
    background: none !important;
    -webkit-text-fill-color: var(--ith-red) !important;
}

.logo-image img {
    max-height: 44px;
}


/* 顶部右侧账号操作 */
.ith-top-actions {
    align-items: center;
}

.ith-top-actions a {
    font-size: 13px;
    color: var(--ith-text-meta);
    margin-left: 16px;
}

/* 红色通栏导航条（仅桌面端着色，移动端由抽屉承载） */
@media (min-width: 992px) {
    .ith-navbar {
        background-color: var(--ith-red);
    }

    .ith-navbar .offcanvas-body {
        padding: 0;
    }

    .ith-navbar .navbar {
        padding: 0;
        margin: 0 !important;
    }

    .nav-list {
        font-size: 16px;
    }

    .nav-list > li {
        height: 44px;
    }

    .nav-list > li:not(:first-child) {
        margin-left: 0;
    }

    .nav-list > li > a {
        height: 44px;
        line-height: 44px;
        padding: 0 22px;
        color: #ffffff;
        font-weight: 400;
    }

    .nav-list > li:hover > a,
    .nav-list > li > a:hover {
        color: #ffffff !important;
        background-color: var(--ith-red-dark);
    }

    .nav-list > li > a:hover span,
    .nav-list > li:hover > a span {
        color: #ffffff !important;
    }

    /* 下拉菜单：白底、红顶边、直角、悬停红 */
    .nav-child-box {
        top: 44px;
        left: 0;
        width: 100%;
        min-width: 9em;
    }

    .nav-child-items {
        margin-top: 0;
        padding: 6px 0;
        border-top: 2px solid var(--ith-red);
        border-radius: 0 !important;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
    }

    .nav-child-box .nav-child-items::before {
        display: none;
    }

    .nav-child-items > li:not(:first-child) {
        margin-top: 0;
    }

    .nav-child-items > li a {
        padding: 8px 16px;
        font-size: 14px;
        color: var(--ith-text-body);
    }

    .nav-child-items > li a:hover {
        background-color: #f5f5f5;
        color: var(--ith-red) !important;
    }
}

/* ---------- 4. 首页焦点图区（推荐位） ---------- */
.aio-curated {
    background: transparent;
    box-shadow: none;
    padding-top: var(--aio-spacing);
    padding-bottom: 0;
}

.aio-curated .percent-image {
    box-shadow: none;
}

/* ---------- 5. 信息流文章列表（IT之家核心样式） ---------- */
.aio-list {
    background-color: var(--ith-bg-box);
    border: 1px solid var(--ith-line);
    padding: 0 20px;
}

.aio-list > .item {
    border: 0 !important;
    border-bottom: 1px solid var(--ith-line) !important;
    border-radius: 0 !important;
    padding: 18px 0 !important;
    margin-top: 0 !important;
}

.aio-list > .item:last-child {
    border-bottom: 0 !important;
}

.aio-list > .item:hover {
    background-color: #fafafa;
}

/* 缩略图：左侧固定小图 */
.aio-list > .item .thumbnail {
    width: 200px;
    min-width: 200px;
    margin-right: 16px !important;
}

.aio-list > .item .thumbnail .percent-image .figure {
    padding-bottom: 62.5%;
}

.aio-list > .item .thumbnail .percent-image .figure > img {
    transform: none;
}

.aio-list > .item .thumbnail .percent-image:hover .figure > img {
    transform: scale(1.03);
}

/* 信息区排序：标题 → 摘要 → 元信息（时间戳/分类/阅读/评论沉底） */
.aio-list > .item .information > .box-title {
    order: 1;
    margin-top: 0 !important;
    margin-bottom: 8px !important;
    font-size: 17px;
    line-height: 1.5;
    font-weight: 700;
}

.aio-list > .item .information > .box-title a {
    color: var(--ith-text-title);
}

.aio-list > .item .information > .box-title a:hover,
.aio-list > .item .information > .box-title a:hover .title {
    color: var(--ith-red) !important;
}

.aio-list > .item .information > .box-description {
    order: 2;
    font-size: 13px;
    color: var(--ith-text-desc);
    line-height: 1.7;
}

.aio-list > .item .information > .box-media {
    order: 2;
}

.aio-list > .item .information > ul:first-of-type {
    order: 3;
    margin-top: auto;
    padding-top: 8px;
}

.aio-list > .item .information > ul:last-of-type {
    order: 4;
    margin-top: 4px !important;
}

.aio-list > .item .information > ul {
    font-size: 12px;
    color: var(--ith-text-meta);
    opacity: 1;
}

.aio-list > .item .information > ul a {
    color: var(--ith-text-meta);
}

@media (max-width: 768px) {
    .aio-list {
        padding: 0 12px;
    }

    .aio-list > .item {
        padding: 12px 0 !important;
    }

    .aio-list > .item .thumbnail {
        width: 132px;
        min-width: 132px;
        margin-right: 10px !important;
    }

    .aio-list > .item .information > .box-title {
        font-size: 15px;
    }
}

@media (max-width: 576px) {
    .aio-list > .item .thumbnail {
        width: 110px;
        min-width: 110px;
    }
}

/* 置顶/分类角标 */
.ticket {
    background-color: var(--ith-red) !important;
    border-radius: 2px !important;
}

.ticket-rainbow {
    background: var(--ith-red) !important;
}

/* ---------- 6. 右侧侧边栏模块 ---------- */
.aside-box {
    background-color: var(--ith-bg-box);
    border: 1px solid var(--ith-line) !important;
    border-radius: 0 !important;
    padding: 16px 18px !important;
}

.aside-box:not(:first-child) {
    margin-top: var(--aio-spacing);
}

/* 模块标题：红色左竖条 + 底边线（IT之家栏目标题式） */
.aside-head {
    position: relative;
    padding-left: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--ith-line);
    font-size: 16px;
    font-weight: 700;
    color: var(--ith-text-title);
}

.aside-head::before {
    content: "";
    position: absolute;
    left: 0;
    top: 2px;
    width: 4px;
    height: 16px;
    background-color: var(--ith-red);
}

.aside-head .bi {
    color: var(--ith-red);
}

.aside-head-dots {
    display: none;
}

.aside-body {
    margin-top: 12px !important;
}

/* 热门排行：数字榜单（前三名红色序号） */
.aside-list-rank > li {
    display: flex;
    align-items: flex-start;
    padding: 9px 0;
    border-bottom: 1px dotted var(--ith-line);
}

.aside-list-rank > li:last-child {
    border-bottom: 0;
}

.aside-list-rank .rank-num {
    flex: none;
    width: 18px;
    height: 18px;
    line-height: 18px;
    margin-top: 2px;
    margin-right: 10px;
    text-align: center;
    font-size: 12px;
    color: #ffffff;
    background-color: #c2c6cc;
}

.aside-list-rank .rank-num-1,
.aside-list-rank .rank-num-2,
.aside-list-rank .rank-num-3 {
    background-color: var(--ith-red);
}

.aside-list-rank .rank-main {
    flex: 1;
    min-width: 0;
}

.aside-list-rank .rank-title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    font-size: 14px;
    line-height: 1.5;
    color: var(--ith-text-body);
}

.aside-list-rank .rank-meta {
    margin-top: 3px;
    font-size: 12px;
    color: var(--ith-text-meta);
}

/* 最新评论：扁平化 */
.aside-list-comment > li .box-content {
    background-color: #f7f8f9;
    border-radius: 0;
}

.aside-list-comment > li .box-content::before {
    border-bottom-color: #f7f8f9;
}

.aside-list-comment > li:not(:first-child) {
    border-top: 1px dotted var(--ith-line);
}

.avatar {
    border-radius: 100%;
    border-color: var(--ith-line);
}

/* 标签云：直角灰底，悬停红 */
.aside-list-tag > li > a {
    border-radius: 0;
    background-color: #f5f6f7;
    border-color: transparent;
    font-size: 13px;
    color: var(--ith-text-body);
}

.aside-list-tag > li > a:hover {
    background-color: var(--ith-red);
    color: #fff !important;
    border-color: var(--ith-red) !important;
}

.aside-list-tag > li > a:hover span {
    color: #fff !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
}

/* 最新文章：去“时间轴”化，改为 IT之家扁平密集列表（与红色热榜块视觉统一） */
.aside-list-timeline {
    position: static;
}
.aside-list-timeline::before {
    display: none;
}
.aside-list-timeline > li {
    padding-left: 0;
    padding-top: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--ith-line);
}
.aside-list-timeline > li:last-child {
    border-bottom: 0;
}
.aside-list-timeline > li:first-child {
    margin-top: 0 !important;
}
.aside-list-timeline > li .information {
    position: static;
    margin-bottom: 4px;
}
.aside-list-timeline > li .time::before {
    display: none;
}
.aside-list-timeline > li .time {
    font-size: 12px;
    color: var(--ith-text-meta);
}
.aside-list-timeline > li .category {
    color: var(--ith-red);
    font-size: 12px;
}
.aside-list-timeline > li .box-title a {
    display: block;
    color: var(--ith-text-title);
    font-size: 14px;
    line-height: 1.5;
    font-weight: 500;
    transition: color .15s;
}
.aside-list-timeline > li .box-title a:hover {
    color: var(--ith-red);
}

/* 最新文章：左缩略图 + 右标题/元信息 —— 横向卡片（IT之家风） */
.aside-list-timeline > li.d-flex {
    align-items: flex-start;
    margin-top: 0;            /* 抵消 PHP 中的 mt-3，统一用 padding 控制间距 */
    padding-top: 12px;
    padding-bottom: 12px;
}
.ith-newlog-thumb {
    flex: 0 0 84px;
    width: 84px;
    height: 60px;
    display: block;
    overflow: hidden;
    border-radius: 4px;
    background-color: var(--ith-bg-page);
}
.ith-newlog-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .25s ease;
}
.ith-newlog-thumb:hover img {
    transform: scale(1.05);
}
.ith-newlog-main {
    flex: 1 1 auto;
    min-width: 0;            /* 让内部 text-truncate / 多行省略正常生效 */
}

/* ---------- 7. 面包屑 / 搜索区 ---------- */
.aio-breadcrumb {
    background-color: var(--ith-bg-box);
    border-bottom: 1px solid var(--ith-line);
    box-shadow: none;
    padding-top: 12px;
    padding-bottom: 12px;
}

/* ---------- 8. 分页 ---------- */
.pagination {
    background-color: var(--ith-bg-box);
    border-color: var(--ith-line) !important;
    border-radius: 0 !important;
}

.pagination > a,
.pagination > span {
    border-radius: 0;
    color: var(--ith-text-body);
}

.pagination > span {
    background-color: var(--ith-red);
    border-color: var(--ith-red) !important;
    color: #fff;
}

.pagination > a:hover {
    border-color: var(--ith-red) !important;
    color: var(--ith-red);
}

/* ---------- 9. 文章页 ---------- */
.aio-mainer article,
.article-comment {
    background-color: var(--ith-bg-box);
    border-color: var(--ith-line) !important;
    border-radius: 0 !important;
}

.article-title {
    font-size: 26px;
    font-weight: 700;
    color: var(--ith-text-title);
    line-height: 1.4;
}

@media (max-width: 768px) {
    .article-title {
        font-size: 20px;
    }
}

.article-description {
    border-left: 4px solid var(--ith-red);
    background-color: #faf3f3;
    border-radius: 0;
    opacity: 1;
    color: var(--ith-text-desc);
}

.article-content a {
    color: var(--ith-red);
}

.article-content blockquote {
    border-radius: 0;
    background-color: #f7f8f9;
}

.article-neighbor > .btn {
    background-color: var(--ith-bg-box);
    border-radius: 0;
}

.comment-post {
    background-color: #f7f8f9;
    border-radius: 0;
}

.comment-item-content {
    background-color: #f7f8f9;
    border-radius: 0 !important;
}

.comment-item-content::before {
    border-bottom-color: #f7f8f9;
}

/* ---------- 10. 底部页脚（IT之家式深色页脚） ---------- */
.aio-footer {
    margin-top: calc(var(--aio-spacing) + 10px);
}

.ith-footer {
    background-color: #2f3237;
}

.ith-footer > .container,
.aio-footer > .container {
    border-top: 0;
}

.ith-footer-main {
    padding: 26px 0 22px;
}

.ith-footer-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding-bottom: 14px;
    margin-bottom: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.ith-footer-nav a {
    font-size: 13px;
    color: #9aa0a6;
    padding: 2px 14px;
    position: relative;
}

.ith-footer-nav a:not(:first-child)::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 12px;
    background-color: rgba(255, 255, 255, 0.12);
}

.ith-footer-nav a:hover {
    color: #ffffff !important;
}

.ith-footer-copy {
    text-align: center;
    font-size: 12px;
    color: #777c82;
    line-height: 2;
}

.ith-footer-copy a {
    color: #9aa0a6;
}

.ith-footer-copy a:hover {
    color: #ffffff !important;
}

/* ---------- 11. 快捷按钮 / 滚动条 / 其他 ---------- */
.sidebar-button {
    border-radius: 2px;
}

::-webkit-scrollbar-thumb {
    background-color: #b9bec4;
}

/* ---------- 12. 深色模式适配（保持红主题） ---------- */
[data-bs-theme=dark] {
    --ith-bg-page: #141516;
    --ith-bg-box: #1e2124;
    --ith-text-title: #e8e8e8;
    --ith-text-body: #c9cdd1;
    --ith-text-desc: #8f959b;
    --ith-text-meta: #7c8288;
    --ith-line: #2e3235;
    --bs-border-color: #2e3235;
}

[data-bs-theme=dark] body {
    background-color: var(--ith-bg-page);
    color: var(--ith-text-body);
}

[data-bs-theme=dark] .aio-list > .item:hover {
    background-color: #24282b;
}

[data-bs-theme=dark] .aside-list-tag > li > a,
[data-bs-theme=dark] .aside-list-comment > li .box-content,
[data-bs-theme=dark] .comment-post,
[data-bs-theme=dark] .comment-item-content,
[data-bs-theme=dark] .article-content blockquote {
    background-color: #26292d;
}

[data-bs-theme=dark] .aside-list-comment > li .box-content::before,
[data-bs-theme=dark] .comment-item-content::before {
    border-bottom-color: #26292d;
}


[data-bs-theme=dark] .article-description {
    background-color: rgba(211, 47, 47, 0.08);
}

/* =====================================================
**  门户式首页（焦点区 + 频道区块网格 + 右栏）
** ===================================================== */

/* 焦点区：左侧大图 + 右侧头条列表 */
.ith-hero {
    display: flex;
    gap: 18px;
    background-color: var(--ith-bg-box);
    border: 1px solid var(--ith-line);
    padding: 16px;
    margin-bottom: var(--aio-spacing);
}

.ith-hero-main {
    flex: 1 1 60%;
    min-width: 0;
}

.ith-hero-main .ith-hero-thumb {
    display: block;
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    overflow: hidden;
    background-color: #eee;
}

.ith-hero-main .ith-hero-thumb > img,
.ith-hero-main .ith-hero-thumb > .ph {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ith-hero-main .ith-hero-title {
    margin-top: 12px;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.4;
    color: var(--ith-text-title);
}

.ith-hero-main .ith-hero-title:hover {
    color: var(--ith-red) !important;
}

.ith-hero-main .ith-hero-sub {
    margin-top: 8px;
    font-size: 13px;
    color: var(--ith-text-desc);
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.ith-hero-side {
    flex: 1 1 40%;
    min-width: 0;
    border-left: 1px solid var(--ith-line);
    padding-left: 18px;
    display: flex;
    flex-direction: column;
}

.ith-hero-side li {
    padding: 11px 0;
    border-bottom: 1px dashed var(--ith-line);
}

.ith-hero-side li:first-child {
    padding-top: 0;
}

.ith-hero-side li:last-child {
    border-bottom: 0;
}

.ith-hero-side a {
    font-size: 15px;
    line-height: 1.5;
    color: var(--ith-text-body);
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.ith-hero-side a::before {
    content: "·";
    color: var(--ith-red);
    font-weight: 700;
    margin-right: 6px;
}

.ith-hero-side a:hover {
    color: var(--ith-red) !important;
}

/* 频道区块网格 */
.ith-channels {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--aio-spacing);
    margin-bottom: var(--aio-spacing);
}

.ith-channel {
    background-color: var(--ith-bg-box);
    border: 1px solid var(--ith-line);
    padding: 14px 16px 16px;
}

.ith-channel-head {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-left: 12px;
    padding-bottom: 10px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--ith-line);
}

.ith-channel-head::before {
    content: "";
    position: absolute;
    left: 0;
    top: 1px;
    width: 4px;
    height: 18px;
    background-color: var(--ith-red);
}

.ith-channel-head .name {
    font-size: 17px;
    font-weight: 700;
    color: var(--ith-text-title);
}

.ith-channel-head .more {
    font-size: 13px;
    color: var(--ith-text-meta);
}

.ith-lead {
    display: flex;
    gap: 12px;
    padding-bottom: 12px;
    margin-bottom: 8px;
    border-bottom: 1px dashed var(--ith-line);
}

.ith-lead-thumb {
    flex: none;
    width: 120px;
    height: 75px;
    overflow: hidden;
    background-color: #eee;
}

.ith-lead-thumb img,
.ith-lead-thumb .ph {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ith-lead-title {
    flex: 1;
    min-width: 0;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.5;
    color: var(--ith-text-title);
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
}

.ith-lead-title:hover {
    color: var(--ith-red) !important;
}

/* 头条列表（密集文字流：标题 + 右侧时间） */
.ith-headlines {
    list-style: none;
}

.ith-headlines li {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    padding: 7px 0;
    border-bottom: 1px dotted var(--ith-line);
}

.ith-headlines li:last-child {
    border-bottom: 0;
}

.ith-headlines a {
    flex: 1;
    min-width: 0;
    font-size: 14px;
    line-height: 1.5;
    color: var(--ith-text-body);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ith-headlines a:hover {
    color: var(--ith-red) !important;
}

.ith-headlines .time {
    flex: none;
    font-size: 12px;
    color: var(--ith-text-meta);
}

/* 区块标题（通用，用于「最新文章」等） */
.ith-section-title {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-left: 12px;
    margin: var(--aio-spacing) 0 12px;
    font-size: 18px;
    font-weight: 700;
    color: var(--ith-text-title);
}

.ith-section-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 2px;
    width: 4px;
    height: 18px;
    background-color: var(--ith-red);
}

@media (max-width: 768px) {
    .ith-hero {
        flex-direction: column;
        gap: 12px;
    }

    .ith-hero-side {
        border-left: 0;
        padding-left: 0;
        border-top: 1px solid var(--ith-line);
        padding-top: 12px;
    }

    .ith-hero-main .ith-hero-title {
        font-size: 18px;
    }

    .ith-channels {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* 「最新文章」保留原有信息流卡片样式（位于门户下方） */
.ith-latest .aio-list {
    border-top: 0;
}

/* ============================================================
   B 方案首页：左分类导航 + 中信息河 + 右栏（flex 三栏）
   ============================================================ */
.ith-b-home .aio-mainstay {
    align-items: flex-start;
    flex-wrap: wrap;
}

/* 左：常驻分类导航（sticky） */
.ith-cat-rail {
    flex: 0 0 170px;
    width: 170px;
    position: sticky;
    top: 84px;
    align-self: flex-start;
    background: var(--ith-bg-box);
    border: 1px solid var(--ith-line);
    border-radius: 6px;
    padding: 6px 0;
    max-height: calc(100vh - 104px);
    overflow-y: auto;
}
.ith-cat-rail .rail-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--ith-text-meta);
    letter-spacing: 1px;
    padding: 8px 16px 6px;
}
.ith-cat-rail a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 16px;
    font-size: 14px;
    color: var(--ith-text-body);
    text-decoration: none;
    border-left: 3px solid transparent;
}
.ith-cat-rail a:hover {
    background: var(--ith-bg-page);
    color: var(--ith-red);
}
.ith-cat-rail a.active {
    color: var(--ith-red);
    font-weight: 600;
    border-left-color: var(--ith-red);
    background: #fdecea;
}
.ith-cat-rail a .cnt {
    font-size: 12px;
    color: var(--ith-text-meta);
}

/* 中：信息河 */
.ith-feed {
    flex: 1 1 auto;
    min-width: 0;
    margin-left: 20px;
}
.ith-feed-hero {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 16px;
    margin-bottom: 18px;
}
.ith-feed-hero .fh-main {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: 6px;
    overflow: hidden;
    background: var(--ith-bg-page);
    display: block;
}
.ith-feed-hero .fh-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.ith-feed-hero .fh-main .fh-cap {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 28px 14px 12px;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    background: linear-gradient(to top, rgba(0, 0, 0, .72), rgba(0, 0, 0, 0));
}
.ith-feed-hero .fh-list {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.ith-feed-hero .fh-list a {
    display: block;
    padding: 7px 0;
    font-size: 14px;
    color: var(--ith-text-title);
    border-bottom: 1px dashed var(--ith-line);
    line-height: 1.5;
}
.ith-feed-hero .fh-list a:last-child {
    border-bottom: 0;
}
.ith-feed-hero .fh-list a:hover {
    color: var(--ith-red);
}
.ith-feed-hero .fh-list a::before {
    content: "▍";
    color: var(--ith-red);
    margin-right: 6px;
}

.ith-feed-section {
    font-size: 15px;
    font-weight: 700;
    color: var(--ith-text-title);
    margin: 6px 0 2px;
}
.ith-feed-section::before {
    content: "";
    display: inline-block;
    width: 4px;
    height: 15px;
    background: var(--ith-red);
    border-radius: 2px;
    margin-right: 8px;
    vertical-align: -2px;
}

.ith-feed-item {
    display: flex;
    gap: 14px;
    padding: 16px 0;
    border-bottom: 1px solid var(--ith-line);
}
.ith-feed-item .fi-thumb {
    flex: 0 0 170px;
    width: 170px;
    height: 114px;
    border-radius: 4px;
    overflow: hidden;
    background: var(--ith-bg-page);
    display: block;
}
.ith-feed-item .fi-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .25s ease;
}
.ith-feed-item:hover .fi-thumb img {
    transform: scale(1.05);
}
.ith-feed-item .fi-body {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.ith-feed-item .fi-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--ith-text-title);
    line-height: 1.4;
    text-decoration: none;
}
.ith-feed-item .fi-title:hover {
    color: var(--ith-red);
}
.ith-feed-item .fi-excerpt {
    margin-top: 8px;
    font-size: 13px;
    color: var(--ith-text-desc);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.ith-feed-item .fi-meta {
    margin-top: auto;
    padding-top: 10px;
    font-size: 12px;
    color: var(--ith-text-meta);
    display: flex;
    gap: 14px;
    align-items: center;
    flex-wrap: wrap;
}
.ith-feed-item .fi-meta .cat {
    color: var(--ith-red);
}
.ith-feed-item .fi-meta .dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--ith-text-meta);
}

/* 响应式：左栏在窄屏转为顶部横向滑动 */
@media (max-width: 992px) {
    .ith-cat-rail {
        flex: 0 0 100%;
        width: 100%;
        position: static;
        max-height: none;
        display: flex;
        align-items: center;
        overflow-x: auto;
        padding: 4px 0;
    }
    .ith-cat-rail .rail-title {
        display: none;
    }
    .ith-cat-rail a {
        border-left: 0;
        border-bottom: 2px solid transparent;
        white-space: nowrap;
        padding: 8px 14px;
    }
    .ith-cat-rail a.active {
        border-left: 0;
        border-bottom-color: var(--ith-red);
        background: transparent;
    }
    .ith-feed {
        margin-left: 0;
        flex: 0 0 100%;
    }
}
@media (max-width: 768px) {
    .ith-feed-hero {
        grid-template-columns: 1fr;
    }
    .ith-feed-item .fi-thumb {
        flex-basis: 120px;
        width: 120px;
        height: 80px;
    }
    .ith-feed-item .fi-title {
        font-size: 15px;
    }
}

/* =====================================================
**  内容页：原创「沉浸专栏」风（加载于 aio.global.css 之后）
**  设计要点：顶部阅读进度条 · 栏目 kicker · 居中阅读专栏 ·
**  本文要点卡 · 首字下沉 · 签名卡
** ===================================================== */

/* 顶部阅读进度条 */
.art-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0;
    background: var(--ith-red);
    z-index: 1090;
    transition: width .08s linear;
}

/* 文章容器：居中专栏（内容页专属加宽，仅作用于 .art-log-page） */
.art-post {
    max-width: 1080px;
    margin: 0 auto;
    overflow-wrap: break-word;
    word-break: break-word;
}
/* 内容页：加宽整体容器、收窄右侧栏，让正文框更舒展（不影响首页） */
.art-log-page .container {
    max-width: 1520px;
}
.art-log-page .aio-aside {
    width: 240px;
    max-width: 240px;
    min-width: 240px;
}
/* 超大屏（≥1600px）：进一步放宽，正文框更宽更大气，字保持舒适 */
@media (min-width: 1600px) {
    .art-log-page .container {
        max-width: 1720px;
    }
    .art-log-page .aio-aside {
        width: 260px;
        max-width: 260px;
        min-width: 260px;
    }
    .art-post {
        max-width: 1200px;
    }
    .art-body {
        font-size: var(--art-fs, 18px);
    }
}

/* 防溢出：flex 子项默认 min-width:auto，会被内部长串(URL/代码)撑破布局，
   导致文字溢出卡片边框；置 0 允许收缩，并让长串自动换行 */
.art-log-page .aio-main {
    min-width: 0;
    overflow-wrap: break-word;
}

/* 头部 */
.art-head {
    margin-bottom: 28px;
}
.art-kicker {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .08em;
    color: var(--ith-red);
    border: 1px solid var(--ith-red);
    padding: 2px 10px;
    margin-bottom: 14px;
}
.art-title {
    font-size: 34px;
    line-height: 1.3;
    font-weight: 800;
    color: var(--ith-text-title);
    margin: 0 0 18px;
    letter-spacing: -0.01em;
}
.art-byline {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 13px;
    color: var(--ith-text-meta);
}
.art-byline .ava {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--ith-red);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}
.art-byline a {
    color: var(--ith-text-title);
    font-weight: 600;
}
.art-byline .sep {
    width: 1px;
    height: 12px;
    background: var(--ith-line);
    display: inline-block;
}

/* 本文要点 */
.art-keypoints {
    background: var(--ith-bg-box);
    border-left: 3px solid var(--ith-red);
    padding: 16px 20px;
    margin: 0 0 28px;
}
.art-keypoints .kp-h {
    font-size: 14px;
    font-weight: 700;
    color: var(--ith-red);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.art-keypoints .kp-body {
    font-size: 15px;
    color: var(--ith-text-desc);
    line-height: 1.7;
}

/* 正文 */
.art-body {
    font-size: var(--art-fs, 17px);
    line-height: 2.0;
    color: var(--ith-text-body);
}
.art-body > p {
    margin: 0 0 1.5em;
}
.art-body > p:first-of-type::first-letter {
    float: left;
    font-size: 3.4em;
    line-height: .9;
    font-weight: 800;
    color: var(--ith-red);
    margin: 6px 12px 0 0;
}
.art-body h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--ith-text-title);
    margin: 1.8em 0 .8em;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--ith-red);
}
.art-body h3 {
    font-size: 19px;
    font-weight: 700;
    color: var(--ith-text-title);
    margin: 1.6em 0 .7em;
}
.art-body img {
    max-width: 100%;
    height: auto;
}
.art-body table {
    max-width: 100%;
    width: auto;
}
.art-body a {
    color: var(--ith-red);
    text-decoration: underline;
    text-underline-offset: 3px;
}
.art-body blockquote {
    margin: 1.4em 0;
    padding: 14px 20px 14px 44px;
    background: rgba(211, 47, 47, .06);
    border-left: 4px solid var(--ith-red);
    color: var(--ith-text-desc);
    font-size: 16px;
    position: relative;
}
.art-body blockquote::before {
    content: "\201C";
    font-size: 40px;
    line-height: 1;
    color: var(--ith-red);
    opacity: .35;
    position: absolute;
    left: 12px;
    top: 4px;
}
.art-body code {
    background: rgba(211, 47, 47, .08);
    color: var(--ith-red-dark);
    padding: 2px 6px;
    font-size: .9em;
}
.art-body pre {
    background: #2b2b2b;
    color: #f5f5f5;
    padding: 16px 18px;
    overflow: auto;
    font-size: 14px;
    line-height: 1.6;
}
.art-body pre code {
    background: none;
    color: inherit;
    padding: 0;
}
.art-body ul,
.art-body ol {
    padding-left: 1.4em;
    margin: 0 0 1.2em;
}
.art-body li {
    margin: .4em 0;
}
.art-body hr {
    border: none;
    border-top: 1px solid var(--ith-line);
    margin: 2em 0;
}

/* 底部：标签 + 操作 */
.art-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid var(--ith-line);
}
.art-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.art-actions {
    display: flex;
    gap: 10px;
}
.art-act {
    border: 1px solid var(--ith-line);
    background: var(--ith-bg-box);
    color: var(--ith-text-desc);
    padding: 7px 16px;
    font-size: 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all .15s;
}
.art-act:hover {
    border-color: var(--ith-red);
    color: var(--ith-red);
}
.art-act.active {
    background: var(--ith-red);
    border-color: var(--ith-red);
    color: #fff;
}
.art-act i {
    font-size: 16px;
}

/* 作者签名卡 */
.art-signature {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--ith-bg-box);
    border: 1px solid var(--ith-line);
    padding: 18px 20px;
    margin-top: 28px;
}
.art-signature .ava {
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    border-radius: 50%;
    background: var(--ith-red);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 22px;
}
.art-signature .s-name {
    font-weight: 700;
    color: var(--ith-text-title);
    font-size: 15px;
}
.art-signature .s-bio {
    color: var(--ith-text-desc);
    font-size: 13px;
    margin-top: 2px;
}
.art-signature .s-link {
    margin-left: auto;
    color: var(--ith-red);
    font-size: 13px;
    white-space: nowrap;
}

/* 相关文章（插件挂载点：emlog 的 doAction('log_related') 钩子输出区） */
.art-related {
    margin-top: 36px;
}

/* 上一篇 / 下一篇（卡片式） */
.art-neighbor {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-top: 30px;
}
.art-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px 18px;
    background: var(--ith-bg-box);
    border: 1px solid var(--ith-line);
    border-radius: 12px;
    text-decoration: none;
    transition: all .18s;
    min-width: 0;
}
.art-nav:hover { border-color: var(--ith-red); transform: translateY(-2px); box-shadow: 0 8px 22px rgba(0,0,0,.08); }
.art-nav.disabled { opacity: .55; pointer-events: none; }
.art-nav .nav-dir {
    font-size: 12px;
    color: var(--ith-text-meta);
    display: flex;
    align-items: center;
    gap: 4px;
}
.art-nav .nav-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--ith-text-title);
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.art-next { text-align: right; align-items: flex-end; }

/* 评论区（沿用主题内置 .comment-* 样式，仅作容器） */
.art-comments {
    margin-top: 36px;
}

/* 响应式 */
@media (max-width: 768px) {
    .art-title {
        font-size: 26px;
    }
    .art-body {
        font-size: var(--art-fs, 17px);
        line-height: 1.9;
    }
    .art-signature {
        flex-wrap: wrap;
    }
    .art-signature .s-link {
        margin-left: 0;
        width: 100%;
    }
}

/* =====================================================
**  内容页 v2 增强：目录抽屉 · 阅读控件 · 返回顶部 ·
**  代码复制 · 图片灯箱 · 排版精修
** ===================================================== */

/* 阅读进度百分比（进度条右上角） */
.art-progress-pct {
    position: fixed;
    top: 9px;
    right: 14px;
    z-index: 1091;
    font-size: 12px;
    font-weight: 700;
    color: var(--ith-red);
    background: var(--ith-bg-box);
    border: 1px solid var(--ith-line);
    padding: 1px 8px;
    border-radius: 999px;
    pointer-events: none;
    font-variant-numeric: tabular-nums;
}

/* 悬浮控件簇（右下角） */
.art-fabs {
    position: fixed;
    right: 20px;
    bottom: 24px;
    z-index: 1080;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}
.art-fab {
    border: 1px solid var(--ith-line);
    background: var(--ith-bg-box);
    color: var(--ith-text-title);
    height: 44px;
    padding: 0 16px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(0,0,0,.12);
    transition: all .18s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.art-fab:hover {
    border-color: var(--ith-red);
    color: var(--ith-red);
    transform: translateY(-2px);
}
.art-fab-top[hidden] { display: none; }

/* 字号调节 */
.art-readctl {
    display: flex;
    align-items: center;
    gap: 4px;
    background: var(--ith-bg-box);
    border: 1px solid var(--ith-line);
    border-radius: 999px;
    padding: 4px 8px;
    box-shadow: 0 6px 20px rgba(0,0,0,.12);
}
.art-readctl button {
    border: none;
    background: transparent;
    color: var(--ith-text-title);
    cursor: pointer;
    font-weight: 700;
    font-size: 14px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    transition: all .15s;
}
.art-readctl button:hover { background: var(--ith-red); color: #fff; }
.art-readctl span {
    min-width: 22px;
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    color: var(--ith-text-meta);
    font-variant-numeric: tabular-nums;
}

/* 目录抽屉（左侧滑出） */
.art-toc {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 280px;
    max-width: 80vw;
    background: var(--ith-bg-box);
    border-right: 1px solid var(--ith-line);
    z-index: 1095;
    transform: translateX(-100%);
    transition: transform .25s ease;
    padding: 72px 18px 24px;
    overflow-y: auto;
    box-shadow: 4px 0 24px rgba(0,0,0,.10);
}
.art-toc.open { transform: translateX(0); }
.art-toc-h {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .1em;
    color: var(--ith-text-meta);
    margin-bottom: 12px;
    padding-left: 4px;
}
.art-toc-list { display: flex; flex-direction: column; gap: 2px; }
.art-toc-item a {
    display: block;
    padding: 7px 10px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--ith-text-desc);
    text-decoration: none;
    border-left: 2px solid transparent;
    border-radius: 0 6px 6px 0;
    transition: all .15s;
}
.art-toc-item.lvl-h3 a { padding-left: 24px; font-size: 13px; }
.art-toc-item a:hover { color: var(--ith-red); background: rgba(211,47,47,.06); }
.art-toc-item a.active {
    color: var(--ith-red);
    border-left-color: var(--ith-red);
    background: rgba(211,47,47,.08);
    font-weight: 600;
}

/* 代码复制按钮 */
.art-body pre { margin: 1.5em 0; border-radius: 10px; }
.art-copy {
    position: absolute;
    top: 10px;
    right: 10px;
    border: 1px solid rgba(255,255,255,.25);
    background: rgba(255,255,255,.08);
    color: #ddd;
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: all .15s;
}
.art-copy:hover { background: rgba(255,255,255,.18); color: #fff; }

/* 图片灯箱 */
.art-lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0,0,0,.86);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 40px;
    cursor: zoom-out;
}
.art-lightbox.show { display: flex; }
.art-lightbox img {
    max-width: 92vw;
    max-height: 92vh;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.art-lightbox-close {
    position: absolute;
    top: 22px;
    right: 28px;
    font-size: 30px;
    color: #fff;
    opacity: .8;
}

/* 排版精修：选中色 / 链接悬停 / 焦点态 / 首字下沉 / 引用 */
.art-body ::selection,
.art-post ::selection { background: rgba(211,47,47,.18); color: inherit; }
.art-body a { transition: color .15s; }
.art-body a:hover { color: var(--ith-red-dark, #b71c1c); }
.art-body :focus-visible { outline: 2px solid var(--ith-red); outline-offset: 2px; }
.art-body > p:first-of-type::first-letter {
    font-family: Georgia, "Songti SC", "STSong", serif;
}
.art-body blockquote { border-radius: 0 10px 10px 0; }

/* v2 响应式收尾 */
@media (max-width: 1024px) {
    .art-toc { display: none; }
    .art-fab-toc { display: none; }
}
@media (max-width: 768px) {
    .art-neighbor { grid-template-columns: 1fr; }
    .art-fabs { right: 14px; bottom: 16px; }
}
