/* 列表页：白底报刊。文章只在主栏，侧栏只放栏目。 */

.home-template .portal-shell,
.tag-template .portal-shell,
.author-template .portal-shell,
.paged .portal-shell {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
    background: #ffffff;
}

.home-template .gh-footer,
.tag-template .gh-footer,
.author-template .gh-footer,
.paged .gh-footer {
    margin-top: 48px;
}

.home-template .portal-sider,
.tag-template .portal-sider,
.author-template .portal-sider,
.paged .portal-sider {
    display: none;
}

.home-template .portal-stage,
.tag-template .portal-stage,
.author-template .portal-stage,
.paged .portal-stage {
    width: min(1320px, calc(100% - 48px));
    margin-inline: auto;
    grid-template-columns: minmax(0, 1fr);
    gap: 48px;
    align-items: start;
    padding: 0 0 64px;
    background: #ffffff;
}

@media (min-width: 961px) {
    .home-template .portal-stage,
    .tag-template .portal-stage,
    .author-template .portal-stage,
    .paged .portal-stage {
        grid-template-columns: minmax(0, 1fr) 280px;
    }
}

.home-template .portal-main,
.tag-template .portal-main,
.author-template .portal-main,
.paged .portal-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.home-template .portal-tabs,
.tag-template .portal-tabs,
.author-template .portal-tabs,
.paged .portal-tabs {
    gap: 24px;
    height: 48px;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-bottom: 1px solid #e6e6e6;
    background: #ffffff;
}

.home-template .portal-tabs a,
.tag-template .portal-tabs a,
.author-template .portal-tabs a,
.paged .portal-tabs a {
    height: 48px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #5c5c5c;
    font-size: 16px;
    line-height: 48px;
}

.home-template .portal-tabs a:hover,
.tag-template .portal-tabs a:hover,
.author-template .portal-tabs a:hover,
.paged .portal-tabs a:hover {
    color: #111111;
}

.home-template .portal-tabs a[aria-current="page"],
.tag-template .portal-tabs a[aria-current="page"],
.author-template .portal-tabs a[aria-current="page"],
.paged .portal-tabs a[aria-current="page"] {
    background: transparent;
    box-shadow: inset 0 -2px 0 #111111;
    color: #111111;
    font-weight: 650;
}

.home-template .portal-aside,
.tag-template .portal-aside,
.author-template .portal-aside,
.paged .portal-aside {
    position: sticky;
    top: 80px;
    display: flex;
    flex-direction: column;
    gap: 32px;
    min-height: 0;
    padding: 0;
    border: 0;
    background: transparent;
}

.rail-section h2 {
    height: 48px;
    margin: 0;
    border-bottom: 1px solid #e6e6e6;
    color: #111111;
    font-size: 16px;
    font-weight: 650;
    line-height: 48px;
}

.rail-board {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 16px;
    padding: 16px 0;
    border-bottom: 1px solid #e6e6e6;
    color: inherit;
    text-decoration: none;
}

.rail-board:hover .rail-board-name {
    text-decoration: underline;
    text-underline-offset: 4px;
}

.rail-board-name {
    color: #111111;
    font-size: 16px;
    font-weight: 650;
    line-height: 24px;
}

.rail-board-count {
    color: #5c5c5c;
    font-size: 14px;
    font-variant-numeric: tabular-nums;
    line-height: 24px;
}

.rail-board-desc {
    grid-column: 1 / -1;
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    color: #5c5c5c;
    font-size: 14px;
    line-height: 20px;
}

.rail-about {
    margin: 16px 0 0;
    color: #5c5c5c;
    font-size: 14px;
    line-height: 20px;
}

.rail-about-link {
    display: inline-block;
    margin-top: 8px;
    color: #111111;
    font-size: 14px;
    font-weight: 650;
    line-height: 20px;
    text-decoration: none;
}

.rail-about-link:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
}

.paper-label {
    margin: 0;
    padding: 24px 0 0;
    color: #5c5c5c;
    font-size: 14px;
    font-weight: 650;
    line-height: 20px;
}

.forum-panel {
    background: transparent;
    border: 0;
}

.forum-panel-head {
    min-height: 0;
    padding: 24px 0 16px;
    border-bottom: 1px solid #e6e6e6;
}

.forum-panel-title {
    margin: 0;
    color: #111111;
    font-size: 32px;
    font-weight: 650;
    line-height: 40px;
}

.forum-panel-note {
    margin: 8px 0 0;
    color: #5c5c5c;
    font-size: 16px;
    line-height: 24px;
}

.forum-rows {
    display: flex;
    flex-direction: column;
}

.forum-row + .forum-row {
    border-top: 1px solid #e6e6e6;
}

.forum-row-link {
    display: block;
    padding: 24px 0;
    color: inherit;
    text-decoration: none;
}

.forum-row.is-lead .forum-row-link {
    padding-top: 16px;
    padding-bottom: 32px;
}

.forum-row-link:has(.forum-thumb) {
    display: grid;
    grid-template-columns: 160px minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.forum-row.is-lead .forum-row-link:has(.forum-thumb) {
    grid-template-columns: minmax(0, 1fr);
}

.forum-thumb {
    width: 160px;
    height: 96px;
    object-fit: cover;
    background: #f4f5f7;
}

.forum-row.is-lead .forum-thumb {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    margin-bottom: 16px;
}

.forum-thumb[src*="static.ghost.org"] {
    display: none;
}

.forum-row-link:has(.forum-thumb[src*="static.ghost.org"]) {
    display: block;
}

.forum-row-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.forum-row-title {
    color: #111111;
    font-size: 18px;
    font-weight: 650;
    line-height: 28px;
}

.forum-row.is-lead .forum-row-title {
    font-size: 32px;
    line-height: 40px;
}

.forum-row-link:hover .forum-row-title {
    text-decoration: underline;
    text-underline-offset: 4px;
}

.forum-row-excerpt {
    display: -webkit-box;
    overflow: hidden;
    margin-top: 8px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    color: #5c5c5c;
    font-size: 14px;
    line-height: 20px;
}

.forum-row.is-lead .forum-row-excerpt {
    -webkit-line-clamp: 3;
    font-size: 16px;
    line-height: 24px;
}

.forum-row-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 8px;
    color: #5c5c5c;
    font-size: 14px;
    line-height: 20px;
}

.forum-row-meta > * + *::before {
    content: "·";
    margin: 0 8px;
}

.forum-empty {
    margin: 0;
    padding: 24px 0;
    color: #5c5c5c;
    font-size: 16px;
    line-height: 24px;
}

.forum-empty a {
    color: #111111;
    font-weight: 650;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.forum-panel .pagination {
    padding: 24px 0;
    border-top: 1px solid #e6e6e6;
}

.tag-template .portal-shell .gh-archive,
.author-template .portal-shell .gh-archive {
    margin: 0;
    padding: 24px 0 16px;
    border-bottom: 1px solid #e6e6e6;
}

@media (max-width: 960px) {
    .home-template .portal-stage,
    .tag-template .portal-stage,
    .author-template .portal-stage,
    .paged .portal-stage {
        width: min(1320px, calc(100% - 32px));
        padding-bottom: 48px;
    }

    .home-template .portal-aside,
    .tag-template .portal-aside,
    .author-template .portal-aside,
    .paged .portal-aside {
        position: static;
    }

    .home-template .portal-tabs,
    .tag-template .portal-tabs,
    .author-template .portal-tabs,
    .paged .portal-tabs {
        gap: 16px;
        overflow-x: auto;
    }

    .forum-row.is-lead .forum-row-title,
    .forum-panel-title {
        font-size: 24px;
        line-height: 32px;
    }

    .forum-row-link:has(.forum-thumb),
    .forum-row.is-lead .forum-row-link:has(.forum-thumb) {
        grid-template-columns: minmax(0, 1fr);
    }

    .forum-thumb,
    .forum-row.is-lead .forum-thumb {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }
}
