.bchd-documents-section .bchd-document-grid,
.bchd-documents-archive .bchd-document-grid {
    display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:24px; padding:0; margin:0; list-style:none;
}
.bchd-documents-section .bchd-document-grid > li,
.bchd-documents-archive .bchd-document-grid > li {
    min-width:0; display:flex; flex-direction:column; background:#fff; border:1px solid #dce5ec; overflow:hidden;
}
.bchd-document-grid .wp-block-post-featured-image { margin:0; }
.bchd-document-grid .wp-block-post-featured-image img { width:100%; aspect-ratio:16/9; height:auto; object-fit:cover; }
.bchd-document-grid .bchd-document-date { margin:16px 20px 8px; font-size:.85em; color:#526473; }
.bchd-document-grid .wp-block-post-title { margin:0 20px 12px; font-size:1.15em; line-height:1.4; overflow-wrap:anywhere; }
.bchd-document-grid .wp-block-post-title a { color:#164260; text-decoration:none; }
.bchd-document-grid .wp-block-post-excerpt { flex:1; display:flex; flex-direction:column; margin:0 20px 20px; }
.bchd-document-grid .wp-block-post-excerpt__excerpt { margin:0 0 16px; display:-webkit-box; -webkit-line-clamp:4; -webkit-box-orient:vertical; overflow:hidden; }
.bchd-document-grid .wp-block-post-excerpt__more-text { margin-top:auto; padding-top:8px; }
.bchd-document-grid .wp-block-post-excerpt__more-link { color:#2877a3; }
.bchd-all-documents { margin-top:24px; text-align:right; }
.bchd-documents-archive .wp-block-query-pagination { margin-top:32px; }
body.bchd-ui .bchd-documents-archive .wp-block-query-pagination:not(:has(a)) { display:none !important; }
/* Same 1480px frame and 32/18px gutters as the existing header and catalogues. */
body.page main:has(.bchd-documents-archive),
body.single-bchd_document main.bchd-document-single {
    container-type:inline-size;
    --bchdpd-content-width:calc(min(calc(100cqw + 2 * var(--wp--custom--spacing--outer)),1480px) - 64px);
}
body.bchd-ui.page:not(.home) main:has(.bchd-documents-archive) > .entry-content {
    box-sizing:border-box;
    width:var(--bchdpd-content-width) !important;
    max-width:none !important;
    margin-inline:calc((100% - var(--bchdpd-content-width))/2) !important;
    padding-inline:0 !important;
}
body.bchd-ui.page .entry-content > .bchd-documents-archive { width:100%; max-width:none !important; margin-inline:0 !important; }
body.page:has(.bchd-documents-archive) .wp-block-group:has(> .wp-block-post-title) {
    width:100%; max-width:1480px; padding-inline:32px; box-sizing:border-box; margin-inline:auto;
}
body.bchd-ui .bchd-documents-archive ul.bchd-document-grid { padding:0 !important; margin-inline:0 !important; }
body.bchd-ui .bchd-document-grid > li { margin:0 !important; }
body.bchd-ui .bchd-documents-archive .bchd-document-grid .wp-block-post-title { margin:0 20px 12px; font-size:1.15em; line-height:1.4; }
body.bchd-ui .bchd-documents-archive .bchd-document-grid .wp-block-post-title a { color:var(--bchd-navy); text-decoration:none !important; }
.bchd-document-single { box-sizing:border-box; max-width:none; margin-inline:0; padding-inline:0; }
.bchd-document-single > .bchd-document-paper,
.bchd-document-single > .bchd-document-photo {
    box-sizing:border-box;
    width:var(--bchdpd-content-width);
    margin-inline:calc((100% - var(--bchdpd-content-width))/2);
}
.bchd-document-single .bchd-document-photo { margin-block:24px; max-height:440px; overflow:hidden; }
.bchd-document-single .bchd-document-photo img { width:100%; height:auto; max-height:440px; object-fit:cover; }
.bchd-document-paper { background:#fff; padding:clamp(20px,4vw,48px); border:1px solid #dce5ec; }
.bchd-document-paper .wp-block-post-content { padding:0; max-width:none; }
.bchd-document-paper .wp-block-post-content > * { overflow-wrap:break-word; }
.bchd-document-paper h1 { color:#164260; font-size:clamp(1.5rem,3vw,2.2rem); line-height:1.3; }
.bchd-document-paper p { line-height:1.75; }
.bchd-document-paper .bchd-document-date { color:#526473; font-size:.9em; }
@media(max-width:1023px) {
    .bchd-documents-section .bchd-document-grid,.bchd-documents-archive .bchd-document-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(max-width:599px) {
    .bchd-documents-section .bchd-document-grid,.bchd-documents-archive .bchd-document-grid { grid-template-columns:minmax(0,1fr); gap:20px; }
    .bchd-all-documents { text-align:left; }
}
@media(max-width:640px) {
    body.page main:has(.bchd-documents-archive),body.single-bchd_document main.bchd-document-single {
        --bchdpd-content-width:calc(min(calc(100cqw + 2 * var(--wp--custom--spacing--outer)),1480px) - 36px);
    }
    body.page:has(.bchd-documents-archive) .wp-block-group:has(> .wp-block-post-title) { padding-inline:18px; }
}
