.center-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
}

.categories-section {
    width: min(960px, 100%);
    margin: 32px auto;
    padding: 0 16px;
}

.categories-section h1 {
    margin: 0 0 18px;
    font-size: 28px;
}

.category-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 10px;
}

.category-link {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    background: #fff;
    text-decoration: none;
    color: #1e1e1e;
}

.category-link:hover {
    border-color: #b7b7b7;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.category-name {
    font-weight: 600;
}

.category-count {
    color: #555;
    font-size: 13px;
    white-space: nowrap;
}

.category-empty {
    color: #555;
}

.categories-page {
    position: relative;
    overflow: hidden;
    background: #fff;   /* monochrome, like the rest of the site */
}

.categories-page::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.04) 1px, transparent 1px);
    background-size: 22px 22px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0));
}

.categories-section {
    position: relative;
    z-index: 1;
    width: min(1080px, 100%);
    margin: 0 auto;
    padding: 40px 20px 56px;
    font-family: "Space Grotesk", "Avenir Next", "Trebuchet MS", sans-serif;
}

.categories-hero {
    max-width: 760px;
    margin-bottom: 22px;
}

.categories-eyebrow {
    display: inline-block;
    margin: 0 0 8px;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: #202124;
    background: #f1f3f4;
}

.categories-hero h1 {
    margin: 0;
    font-size: clamp(28px, 5vw, 48px);
    line-height: 1.08;
    letter-spacing: -0.02em;
    color: #202124;
}

.categories-subtitle {
    max-width: 66ch;
    margin: 14px 0 0;
    font-size: 16px;
    color: #5f6368;
}

.categories-meta {
    margin: 14px 0 0;
    font-size: 14px;
    font-weight: 700;
    color: #5f6368;
}

.category-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 14px;
}

.category-item {
    opacity: 0;
    transform: translateY(14px);
    animation: revealCard 440ms cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}

.category-item:nth-child(1) { animation-delay: 40ms; }
.category-item:nth-child(2) { animation-delay: 75ms; }
.category-item:nth-child(3) { animation-delay: 110ms; }
.category-item:nth-child(4) { animation-delay: 145ms; }
.category-item:nth-child(5) { animation-delay: 180ms; }
.category-item:nth-child(6) { animation-delay: 215ms; }
.category-item:nth-child(7) { animation-delay: 250ms; }
.category-item:nth-child(8) { animation-delay: 285ms; }
.category-item:nth-child(9) { animation-delay: 320ms; }
.category-item:nth-child(n+10) { animation-delay: 350ms; }

.category-link {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 8px;
    min-height: 106px;
    padding: 14px;
    border: 1px solid #e0e0e0;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    text-decoration: none;
    color: #202124;
    transition: transform 180ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.category-link::after {
    content: "\2192";
    position: absolute;
    top: 12px;
    right: 14px;
    color: #202124;
    opacity: 0;
    transform: translateX(-6px);
    transition: opacity 180ms ease, transform 180ms ease;
}

.category-link:hover,
.category-link:focus-visible {
    transform: translateY(-2px);
    border-color: #202124;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.10);
}

.category-link:hover::after,
.category-link:focus-visible::after {
    opacity: 1;
    transform: translateX(0);
}

.category-name {
    max-width: 85%;
    font-size: 18px;
    line-height: 1.25;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.category-count {
    display: inline-flex;
    align-self: flex-start;
    padding: 3px 8px;
    border-radius: 999px;
    background: #f1f3f4;
    color: #5f6368;
    font-size: 13px;
    white-space: nowrap;
}

.category-empty {
    margin-top: 24px;
    color: #5f6368;
}

@keyframes revealCard {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 680px) {
    .categories-section {
        padding: 24px 14px 36px;
    }

    .categories-subtitle {
        font-size: 15px;
    }

    .category-list {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .category-link {
        min-height: 92px;
    }
}