/* Blog / toolkit category archives — monochrome desk language. */
body.msp-library-page,
.msp-lib {
    --msp-ink: #09090b;
    --msp-mute: #52525b;
    --msp-line: #d4d4d8;
    --msp-paper: #ffffff;
    --msp-wash: #f4f4f5;
    color: var(--msp-ink);
    background: var(--msp-paper);
    font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}

.msp-lib {
    box-sizing: border-box;
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 28px 20px 64px;
}

.msp-lib *,
.msp-lib *::before,
.msp-lib *::after {
    box-sizing: border-box;
}

.msp-lib-head {
    margin: 0 0 28px;
    max-width: 40rem;
}

.msp-lib-kicker {
    margin: 0 0 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--msp-mute);
}

.msp-lib-title {
    margin: 0 0 10px;
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.15;
    color: var(--msp-ink);
}

.msp-lib-blurb {
    margin: 0;
    font-size: 15px;
    line-height: 1.5;
    color: var(--msp-mute);
}

.msp-lib-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.msp-lib-card {
    margin: 0;
    background: var(--msp-paper);
    border: 1px solid var(--msp-line);
    border-radius: 12px;
    overflow: hidden;
    min-width: 0;
}

.msp-lib-card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.msp-lib-card-link:hover .msp-lib-card-title,
.msp-lib-card-link:focus-visible .msp-lib-card-title {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.msp-lib-media {
    display: block;
    aspect-ratio: 16 / 9;
    background: var(--msp-wash);
    overflow: hidden;
}

.msp-lib-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(1) contrast(1.05);
}

.msp-lib-media-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: #a1a1aa;
    background:
        repeating-linear-gradient(
            -45deg,
            #f4f4f5,
            #f4f4f5 8px,
            #ececee 8px,
            #ececee 16px
        );
}

.msp-lib-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px 16px 18px;
    min-height: 0;
    flex: 1 1 auto;
}

.msp-lib-card-title {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.3;
    color: var(--msp-ink);
}

.msp-lib-card-desc {
    margin: 0;
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--msp-mute);
    flex: 1 1 auto;
}

.msp-lib-more {
    margin-top: 6px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--msp-ink);
}

.msp-lib-empty {
    margin: 0;
    padding: 28px 20px;
    border: 1px dashed var(--msp-line);
    border-radius: 12px;
    color: var(--msp-mute);
    font-size: 14px;
    line-height: 1.5;
}

.msp-lib-empty code {
    font-size: 12px;
}

.msp-lib-pager {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin: 32px 0 0;
    font-size: 13px;
    font-weight: 600;
}

.msp-lib-pager a,
.msp-lib-pager span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    min-height: 40px;
    padding: 0 12px;
    border: 1px solid var(--msp-line);
    border-radius: 8px;
    color: var(--msp-ink);
    text-decoration: none;
    background: var(--msp-paper);
}

.msp-lib-pager .current {
    background: var(--msp-ink);
    color: #fff;
    border-color: var(--msp-ink);
}

@media (max-width: 900px) {
    .msp-lib-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .msp-lib {
        padding: 20px 14px 48px;
    }
    .msp-lib-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
}
