/* 网格容器 - 让文章和目录并排 */
.post-grid {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 30px;
    align-items: start;
    max-width: 1400px;
    margin: 0 auto;
}

/* 文章卡片 - 占满剩余宽度 */
.post-card {
    min-width: 0;
    overflow-x: hidden;
}

/* 右侧目录 - 固定宽度，sticky 跟随滚动 */
.post-toc-sidebar {
    width: 280px;
    position: sticky;
    top: 20px;
    align-self: start;
}

/* 目录卡片样式 */
.post-toc {
    background: var(--bg-white, #fff);
    border-radius: 12px;
    border: 1px solid var(--border-color, #eaeef5);
    overflow: hidden;
    max-height: 70vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.toc-header {
    padding: 12px 16px;
    font-size: 15px;
    font-weight: 600;
    border-bottom: 1px solid var(--border-color, #eaeef5);
    background: var(--bg-light, #fafbfc);
}

.toc-header i {
    margin-right: 8px;
    color: #007bff;
}

/* tocbot 样式 */
.toc-content {
    padding: 12px 0;
}

.toc-content .toc-list {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.toc-content .toc-list li {
    margin: 0;
    padding: 0;
}

.toc-content .toc-link {
    display: block;
    padding: 6px 16px;
    color: #4a5568;
    text-decoration: none;
    font-size: 13px;
    border-left: 2px solid transparent;
    transition: all 0.2s;
}

.toc-content .toc-link:hover {
    color: #007bff;
    background: #f0f7ff;
}

.toc-content .is-active-link {
    color: #007bff;
    border-left-color: #007bff;
    background: #f0f7ff;
    font-weight: 500;
}

.toc-content .toc-list .toc-list {
    padding-left: 12px;
}

/* 滚动条 */
.post-toc::-webkit-scrollbar {
    width: 3px;
}

.post-toc::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.post-toc::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 3px;
}

/* 窄屏幕时隐藏目录 */
@media (max-width: 1200px) {
    .post-toc-sidebar {
        display: none;
    }
    
    .post-grid {
        grid-template-columns: 1fr;
    }
}