.page-id-3222 .bpmc-legacy-answer:not(:target) { display: none; }
.bpmc-knowledge-loop .wp-block-post-template { gap: clamp(1rem, 2vw, 1.75rem); }
.bpmc-knowledge-loop .wp-block-post-template > li {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #fff;
    border: 1px solid #d5dfee;
    border-radius: .65rem;
    padding-bottom: 1.25rem;
}
.bpmc-knowledge-loop .wp-block-post-featured-image { margin: 0; }
.bpmc-knowledge-loop .wp-block-post-featured-image img { width: 100%; height: auto; aspect-ratio: 1.91; object-fit: cover; }
.bpmc-knowledge-loop .wp-block-post-title,
.bpmc-knowledge-loop .wp-block-post-excerpt { margin: 1rem 1.25rem 0; }
.bpmc-knowledge-loop .wp-block-post-title { font-size: clamp(1.2rem, 1.6vw, 1.5rem); line-height: 1.45; }
.bpmc-knowledge-loop .wp-block-post-title a:hover { text-decoration: underline; text-underline-offset: .2em; }
.bpmc-knowledge-loop .wp-block-post-excerpt { margin-bottom: 1rem; }
.bpmc-knowledge-loop .wp-block-read-more.bpmc-card-read-more {
    display: inline-flex;
    align-self: flex-start;
    align-items: center;
    gap: .65rem;
    min-height: 44px;
    margin: auto 1.25rem 0;
    padding: .5rem 1rem;
    box-sizing: border-box;
    border: 1px solid #cad8eb;
    border-radius: .5rem;
    background: #eff4fb;
    color: #17345b;
    font-weight: 700;
    line-height: 1.4;
    text-decoration: none;
}
.bpmc-knowledge-loop .bpmc-card-read-more::after {
    content: "";
    width: 1rem;
    height: 1rem;
    background: currentColor;
    clip-path: polygon(15% 45%, 67% 45%, 46% 24%, 53% 17%, 87% 50%, 53% 83%, 46% 76%, 67% 55%, 15% 55%);
}
.bpmc-knowledge-loop .bpmc-card-read-more:is(:hover, :focus-visible) {
    background: #17345b;
    border-color: #17345b;
    color: white;
}
.bpmc-knowledge-loop .bpmc-card-read-more:focus-visible {
    outline: 2px solid #24599b;
    outline-offset: 3px;
}
.bpmc-knowledge-loop .wp-block-query-pagination { margin-block: 1.5rem; }
@media (min-width: 601px) and (max-width: 1024px) {
    .bpmc-knowledge-loop .wp-block-post-template.is-layout-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 600px) {
    .bpmc-knowledge-loop .wp-block-post-template.is-layout-grid { grid-template-columns: minmax(0,1fr); }
}

/* Knowledge library introduction, task shortcuts and category navigation. */
.page-id-3222 #main .entry-content:has(> #knowledge-shortcuts) {
    padding-block-start: clamp(1.75rem, 4vw, 3.5rem);
}
.page-id-3222 #main .entry-content > h1:first-child {
    line-height: 1.28;
    text-wrap: balance;
}
#knowledge-shortcuts {
    margin-block: clamp(1.75rem, 3vw, 2.75rem);
    scroll-margin-top: 6rem;
}
#knowledge-shortcuts > .is-layout-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: start;
    gap: .75rem;
}
#knowledge-shortcuts details {
    min-width: 0;
    margin: 0;
    border: 1px solid #bccce0;
    border-radius: .65rem;
    background: #f0f5fb;
    color: #183658;
}
#knowledge-shortcuts details[open] { background: #fff; border-color: #6483a7; }
#knowledge-shortcuts summary {
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .8rem;
    min-height: 52px;
    box-sizing: border-box;
    padding: .7rem 1rem;
    border-radius: inherit;
    font-weight: 700;
    line-height: 1.5;
    cursor: pointer;
    list-style: none;
}
#knowledge-shortcuts summary::-webkit-details-marker { display: none; }
#knowledge-shortcuts summary::after {
    content: "";
    flex: none;
    width: .55rem;
    height: .55rem;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-.15rem) rotate(45deg);
}
#knowledge-shortcuts [open] > summary::after { transform: translateY(.15rem) rotate(225deg); }
#knowledge-shortcuts details ul { list-style: none; margin: 0; padding: 0 .85rem .3rem; }
#knowledge-shortcuts details li { margin: 0; padding: 0; border-top: 1px solid #dbe3ed; }
#knowledge-shortcuts details a, #knowledge-categories a {
    display: flex;
    align-items: center;
    min-height: 44px;
    box-sizing: border-box;
    padding: .5rem .2rem;
    font-size: 1rem;
    line-height: 1.55;
    color: #174a7c;
    text-underline-offset: .2em;
}
#knowledge-shortcuts details a { text-decoration: underline; }
#knowledge-categories {
    border-top: 1px solid #ccd8e6;
    padding-block-start: 1.4rem;
}
#knowledge-categories ul {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    padding: 0;
    list-style: none;
}
#knowledge-categories li { padding: 0; margin: 0; }
#knowledge-categories a {
    padding: .5rem .9rem;
    border: 1px solid #adbed2;
    border-radius: .45rem;
    background: #fff;
    font-weight: 600;
    text-decoration: none;
}
#knowledge-categories a:hover, #knowledge-shortcuts summary:hover { background: #e5eef9; }
#knowledge-shortcuts :is(summary, a):focus-visible, #knowledge-categories a:focus-visible {
    outline: 3px solid #25639f;
    outline-offset: 2px;
}
@media (max-width: 980px) {
    #knowledge-shortcuts > .is-layout-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
    #knowledge-shortcuts > .is-layout-grid { grid-template-columns: minmax(0, 1fr); gap: .5rem; }
    #knowledge-categories ul { display: grid; grid-template-columns: minmax(0, 1fr); }
}

/* Touch pagination on the knowledge library's mobile layouts. */
@media (max-width: 425px) {
    .bpmc-knowledge-loop .wp-block-query-pagination {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px 8px;
        align-items: center;
    }
    .bpmc-knowledge-loop .wp-block-query-pagination > * { margin: 0; }
    .bpmc-knowledge-loop .wp-block-query-pagination-numbers {
        grid-column: 1 / -1;
        grid-row: 1;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: 8px;
    }
    .bpmc-knowledge-loop .wp-block-query-pagination :is(a, .current) {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        box-sizing: border-box;
        min-width: 44px;
        min-height: 44px;
        padding: 4px 8px;
        border: 1px solid #bccce0;
        border-radius: .5rem;
        background: white;
        color: #17345b;
        line-height: 1.4;
        text-decoration: none;
    }
    .bpmc-knowledge-loop .wp-block-query-pagination .current {
        background: #17345b;
        border-color: #17345b;
        color: white;
        font-weight: 700;
    }
    .bpmc-knowledge-loop .wp-block-query-pagination a:focus-visible {
        outline: 2px solid #24599b;
        outline-offset: 2px;
    }
    .bpmc-knowledge-loop .wp-block-query-pagination-previous { grid-column: 1; grid-row: 2; justify-self: start; }
    .bpmc-knowledge-loop .wp-block-query-pagination-next { grid-column: 2; grid-row: 2; justify-self: end; }
}
