.btp-references-page {
    --btp-border: #dfe4e8;
    --btp-muted: #5a6570;
    --btp-ink: #111820;
    --btp-soft: #f6f8f6;
    --btp-accent: #17643a;
    --btp-accent-dark: #0e4828;
    --btp-gold: #b68a35;

    max-width: 1180px;
    margin: 0 auto;
    padding: 18px 16px 42px;
    color: var(--btp-ink);
}

.btp-reference-head {
    max-width: 880px;
    margin: 0 0 24px;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.btp-reference-intro,
.btp-reference-copy,
.btp-reference-cta,
.btp-reference-faq {
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.btp-reference-head h1 {
    margin: 0 0 12px;
    font-size: 2rem;
    line-height: 1.15;
}

.btp-reference-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 18px 0 22px;
}

.btp-filter-button {
    min-height: 36px;
    padding: 7px 12px;
    border: 1px solid var(--btp-border);
    border-radius: 999px;
    background: #fff;
    color: #24313d;
    font: inherit;
    cursor: pointer;
}

.btp-filter-button:hover,
.btp-filter-button.is-active {
    border-color: var(--btp-accent);
    background: var(--btp-accent);
    color: #fff;
}

.btp-reference-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    align-items: stretch;
    gap: 18px;
    margin: 0 0 28px;
}

.btp-reference-entry,
.btp-reference-card {
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.btp-reference-card {
    overflow: hidden;
    border: 1px solid var(--btp-border);
    border-radius: 8px;
    background: #fff;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.btp-reference-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(20, 32, 42, 0.09);
}

.btp-reference-entry[hidden],
.btp-reference-card[hidden] {
    display: none;
}

.btp-reference-toggle {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.btp-reference-image {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: #eef1f2;
    cursor: zoom-in;
    text-decoration: none;
}

.btp-reference-image img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    transition: transform 0.28s ease;
}

.btp-reference-card:hover .btp-reference-image img {
    transform: scale(1.04);
}

.btp-reference-card-body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    padding: 14px;
}

.btp-reference-kicker {
    margin: 0 0 6px;
    color: var(--btp-accent);
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
}

.btp-reference-card h2 {
    margin: 0 0 10px;
    font-size: 1.1rem;
    line-height: 1.25;
}

.btp-reference-card dl {
    display: grid;
    gap: 5px;
    margin: 0 0 10px;
}

.btp-reference-card dl div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid #eef1f2;
    padding-bottom: 5px;
}

.btp-reference-card dt {
    color: var(--btp-muted);
    font-weight: 500;
}

.btp-reference-card dd {
    margin: 0;
    text-align: right;
    font-weight: 650;
}

.btp-reference-card p {
    color: #34404a;
}

.btp-reference-link {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    margin-top: auto;
    min-height: 38px;
    padding: 8px 12px;
    border-radius: 6px;
    background: var(--btp-accent);
    color: #fff;
    font-weight: 700;
    text-decoration: none;
}

.btp-reference-link:hover {
    background: var(--btp-accent-dark);
    color: #fff;
    text-decoration: none;
}

.btp-reference-lightbox[hidden],
.btp-reference-modal {
    display: none;
}

.btp-reference-lightbox,
.btp-reference-toggle:checked ~ .btp-reference-modal {
    position: fixed;
    inset: 0;
    z-index: 1050;
    display: grid;
    place-items: center;
    padding: 18px;
}

.btp-reference-lightbox-backdrop,
.btp-reference-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(7, 12, 17, 0.72);
}

.btp-reference-dialog,
.btp-reference-modal-card {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
    gap: 0;
    width: min(1040px, 100%);
    max-height: min(760px, 92vh);
    padding: 0;
    border: 0;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.35);
}

.btp-reference-dialog img,
.btp-reference-modal-card > img {
    width: 100%;
    height: 100%;
    min-height: 360px;
    object-fit: cover;
}

.btp-reference-dialog-copy {
    display: flex;
    flex-direction: column;
    padding: 22px;
}

.btp-reference-dialog-copy h2 {
    margin: 0 0 14px;
    font-size: 1.45rem;
}

.btp-reference-dialog-details {
    display: grid;
    gap: 8px;
    margin: 0 0 14px;
    padding: 0;
}

.btp-reference-dialog-details div {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 8px 0;
    border-bottom: 1px solid #eef1f2;
}

.btp-reference-dialog-details div[hidden] {
    display: none;
}

.btp-reference-dialog-details dt {
    color: var(--btp-muted);
    font-weight: 600;
}

.btp-reference-dialog-details dd {
    margin: 0;
    text-align: right;
    font-weight: 700;
}

.btp-reference-dialog-copy p {
    margin: 0 0 16px;
    color: #34404a;
}

.btp-reference-dialog-link {
    margin-top: auto;
}

.btp-reference-close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    color: #111;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
}

@media (max-width: 760px) {
    .btp-references-page {
        padding-right: 0;
        padding-left: 0;
    }

    .btp-reference-head h1 {
        font-size: 1.55rem;
    }

    .btp-reference-grid {
        grid-template-columns: 1fr;
    }

    .btp-reference-dialog,
    .btp-reference-modal-card {
        grid-template-columns: 1fr;
        overflow: auto;
    }

    .btp-reference-dialog img,
    .btp-reference-modal-card > img {
        min-height: 240px;
        max-height: 48vh;
    }
}
