/* News index, and the category, tag and date archives that share its list. */

.news {
    padding: 56px 0 72px;
}

/* Rules between rows rather than around them: 193 posts is a long page, and
   boxing each one turns it into a wall of borders. */
.news-item {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 32px;
    align-items: start;
    padding: 30px 0;
    border-bottom: 1px solid var(--sb-rule);
}

.news-item:first-child {
    padding-top: 0;
}

/* The column is declared even when the post has no image, so the ten posts
   whose featured image did not survive the old site keep the text alignment. */
.news-thumb img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.news-date {
    display: block;
    margin-bottom: 8px;
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--sb-taupe-text);
}

/* Capped rather than sized off the h2 default: 38 of these titles are a full
   sentence of announcement, and at heading size they shout. */
.news-title {
    max-width: 62ch;
    font-size: 1.25rem;
    line-height: 1.35;
    letter-spacing: 0;
}

.news-title a {
    color: var(--sb-navy-deep);
    text-decoration: none;
}

.news-title a:hover {
    color: var(--sb-navy);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.news-excerpt {
    max-width: 68ch;
    margin-top: 10px;
    font-size: .9375rem;
    line-height: 1.75;
    color: #454545;
}

.news-excerpt p {
    margin: 0;
}

.news-empty {
    color: #666;
}

/* ── Pagination ── */
.pagination {
    margin-top: 44px;
}

.pagination .nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--sb-rule);
    font-size: .875rem;
    color: var(--sb-ink);
    text-decoration: none;
}

.pagination a.page-numbers:hover {
    border-color: var(--sb-navy);
    color: var(--sb-navy);
}

.pagination .page-numbers.current {
    background: var(--sb-navy-deep);
    border-color: var(--sb-navy-deep);
    color: #fff;
}

.pagination .page-numbers.dots {
    border-color: transparent;
}

@media (max-width: 768px) {
    .news {
        padding: 40px 0 56px;
    }

    .news-item {
        grid-template-columns: 140px 1fr;
        gap: 20px;
    }

    .news-title {
        font-size: 1.125rem;
    }
}

@media (max-width: 480px) {
    /* Stacked, and the thumbnail goes with it rather than shrinking to a
       stamp that carries no information at that size. */
    .news-item {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .news-thumb:empty {
        display: none;
    }

    .news-thumb img {
        aspect-ratio: 16 / 9;
    }
}
