.pgy-ex, .pgy-ex-chat {
    --pgy-ex-navy: #071b54;
    --pgy-ex-green: #80b32b;
    --pgy-ex-lime: #c4fb16;
}
.pgy-ex {
    max-inline-size: 70rem;
    margin-inline: auto;
}
.pgy-ex--directory { padding: clamp(1rem, 4vw, 3rem) clamp(1rem, 3vw, 2.25rem); }
.pgy-ex--search { background: #f1f3f2; }
.pgy-ex h2, .pgy-ex h3 { color: var(--pgy-ex-navy); margin: 0; }
.pgy-ex h2 { font-size: clamp(1.75rem, 4vw, 3.15rem); line-height: 1.15; }
.pgy-ex--directory h2 { font-size: clamp(1.65rem, 3vw, 2.5rem); margin-block-end: 1.25rem; }
.pgy-ex-subtitle { color: var(--pgy-ex-navy); font-size: clamp(1.15rem, 2.5vw, 1.75rem); font-weight: 700; margin: .85rem 0 1.6rem; }
.pgy-ex-bar {
    display: flex;
    gap: .5rem;
    padding: .3rem;
    background: #d1d3d2;
    border-radius: .55rem;
}
.pgy-ex-bar input[type="search"] {
    min-inline-size: 0;
    flex: 1;
    border: 0;
    background: transparent;
    color: #283131;
}
.pgy-ex-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: .25rem;
    background: linear-gradient(105deg, var(--pgy-ex-green), var(--pgy-ex-lime));
    color: #182800;
    padding: .5rem 1rem;
    min-block-size: 2.25rem;
    font: inherit;
    font-weight: 650;
    text-decoration: none;
    cursor: pointer;
}
.pgy-ex-button:hover { color: #182800; filter: brightness(.94); }
.pgy-ex-filters { display: flex; flex-wrap: wrap; gap: .4rem 1.5rem; margin-block: 1rem 1.75rem; }
.pgy-ex-filters button {
    color: #454d4b;
    background: transparent;
    border: 0;
    border-block-end: 2px solid transparent;
    padding: .25rem 0;
    font: inherit;
    font-size: .875rem;
    cursor: pointer;
}
.pgy-ex-filters button[aria-pressed="true"] { color: var(--pgy-ex-navy); border-color: var(--pgy-ex-green); }
.pgy-ex-results { display: grid; gap: clamp(.9rem, 2vw, 1.5rem); }
.pgy-ex-search + .pgy-ex-results { margin-block-start: 1.5rem; }
.pgy-ex--search .pgy-ex-results {
    --pgy-ex-columns: 3;
    --pgy-ex-gap: clamp(.9rem, 2vw, 1.5rem);
    grid-auto-flow: column;
    grid-auto-columns: calc((100% + var(--pgy-ex-gap)) / var(--pgy-ex-columns) - var(--pgy-ex-gap));
    gap: var(--pgy-ex-gap);
    overflow-x: auto;
    scrollbar-width: none;
    scroll-snap-type: x mandatory;
    padding-block: .25rem;
}
.pgy-ex--search .pgy-ex-card { scroll-snap-align: start; }
.pgy-ex-dots { display: flex; flex-wrap: wrap; justify-content: center; gap: .65rem; margin-block-start: 1.35rem; }
.pgy-ex-dots:empty { display: none; }
.pgy-ex .pgy-ex-dots button {
    border: 0;
    padding: 0;
    min-width: 0;
    min-height: 0;
    inline-size: .65rem;
    block-size: .65rem;
    border-radius: 50%;
    background: #b8bfbc;
}
.pgy-ex .pgy-ex-dots button[aria-current="true"] { background: #568722; }
.pgy-ex-card { min-inline-size: 0; overflow-wrap: anywhere; }
.pgy-ex--directory .pgy-ex-card {
    display: grid;
    grid-template-columns: minmax(6rem, 18%) minmax(0, 1fr) auto;
    align-items: start;
    gap: clamp(.75rem, 3vw, 2rem);
    background: #ededed;
    padding: clamp(.75rem, 2vw, 1.15rem);
}
.pgy-ex-image {
    position: relative;
    display: grid;
    place-items: center;
    aspect-ratio: 1;
    background: #fff;
    --pgy-ex-image-inset: 0%;
    color: var(--pgy-ex-navy);
    text-align: center;
    font-weight: 700;
    overflow: hidden;
}
.pgy-ex-image img {
    position: absolute;
    inset: var(--pgy-ex-image-inset);
    inline-size: calc(100% - 2 * var(--pgy-ex-image-inset));
    block-size: calc(100% - 2 * var(--pgy-ex-image-inset));
    object-fit: contain;
    object-position: center;
}
.pgy-ex--search .pgy-ex-image { aspect-ratio: 16 / 9; box-shadow: 0 3px 10px #071b5424; margin-block-end: .85rem; }
.pgy-ex-card h3 { font-size: 1rem; line-height: 1.35; }
.pgy-ex-card h3 a { color: inherit; }
.pgy-ex-card h3 span { display: block; }
.pgy-ex-date { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .2rem .7rem; color: var(--pgy-ex-navy); margin: .65rem 0 .15rem; }
.pgy-ex-date span, .pgy-ex-more { color: #4e731b; font-size: .875rem; }
.pgy-ex-detail { font-size: .82rem; }
.pgy-ex-facts { margin: .4rem 0 0; font-size: .875rem; display: flex; flex-wrap: wrap; gap: .25rem 1rem; }
.pgy-ex-facts div { display: flex; align-items: baseline; gap: .4rem; min-inline-size: 0; }
.pgy-ex-facts div:nth-child(-n+5) { flex-basis: 100%; }
.pgy-ex-facts dt { font-weight: 600; flex: none; }
.pgy-ex-facts dd { margin: 0; white-space: pre-line; }
.pgy-ex-pages { display: flex; justify-content: center; flex-wrap: wrap; gap: .4rem; margin-block-start: 1.75rem; }
.pgy-ex-pages .page-numbers { border-radius: 50%; min-inline-size: 2rem; min-block-size: 2rem; display: grid; place-items: center; color: var(--pgy-ex-navy); }
.pgy-ex-pages .current { background: var(--pgy-ex-lime); }
.pgy-ex-chat { position: fixed; z-index: 9999; inset-inline-end: 1rem; inset-block-end: 1rem; max-inline-size: calc(100vw - 2rem); }
.pgy-ex-chat-toggle { display: flex; gap: .4rem; margin-inline-start: auto; border-radius: 999px; box-shadow: 0 2px 14px #071b5433; }
.pgy-ex-chat-panel { position: absolute; inset-inline-end: 0; inset-block-end: calc(100% + .65rem); width: min(24rem, calc(100vw - 2rem)); background: #fff; color: #24313e; border-radius: .8rem; box-shadow: 0 6px 24px #071b5433; overflow: hidden; }
.pgy-ex-chat-panel[hidden] { display: none; }
.pgy-ex-chat-panel header { display: flex; align-items: center; justify-content: space-between; background: var(--pgy-ex-navy); color: #fff; padding: .55rem 1rem; }
.pgy-ex-chat-panel h2 { font-size: 1rem; color: inherit; margin: 0; }
.pgy-ex-chat-close { background: transparent; color: inherit; border: 0; font-size: 1.5rem; padding: 0 .35rem; cursor: pointer; }
.pgy-ex-chat-log { height: min(20rem, 42vh); overflow: auto; padding: .75rem; }
.pgy-ex-chat-log p { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0 0 .45rem; padding: .45rem .65rem; background: #f0f2f5; border-radius: .45rem; }
.pgy-ex-chat-log .pgy-ex-chat-user { background: #e9f6ce; margin-inline-start: 12%; }
.pgy-ex-chat-panel form { display: flex; gap: .4rem; padding: .65rem; }
.pgy-ex-chat-panel input { min-inline-size: 0; flex: 1; }
.pgy-ex-chat-panel small { display: block; padding: 0 .65rem .65rem; line-height: 1.35; }
@media (max-width: 760px) {
    .pgy-ex--search .pgy-ex-results { --pgy-ex-columns: 2; }
    .pgy-ex--directory .pgy-ex-card { grid-template-columns: minmax(4rem, 22%) minmax(0, 1fr); }
    .pgy-ex-detail { grid-column: 2; justify-self: start; }
}
@media (max-width: 460px) {
    .pgy-ex--search .pgy-ex-results { --pgy-ex-columns: 1; }
    .pgy-ex-facts div { flex-wrap: wrap; gap: 0 .4rem; }
}
