.apb {
    --apb-ink: #151515;
    --apb-muted: #6c6c6c;
    --apb-soft: #f4f3f0;
    --apb-border: #deddd9;
    --apb-white: #fff;
    width: 100%;
    padding-bottom: 30px;
    color: var(--apb-ink);
}

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

/* EXACTLY 30px from search to post grid */
.apb-search-wrap {
    margin: 0 0 30px !important;
}

.apb-search {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    align-items: center;
    min-height: 64px;
    padding: 7px 8px 7px 18px;
    border: 1px solid var(--apb-border);
    border-radius: 0 !important;
    background: var(--apb-white);
    box-shadow: none;
}

.apb-search:focus-within {
    border-color: #8a8a8a;
}

.apb-search__icon {
    display: grid;
    place-items: center;
    margin-right: 12px;
    color: #737373;
}

.apb-search__input {
    min-width: 0;
    width: 100%;
    height: 48px;
    padding: 0;
    border: 0 !important;
    outline: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--apb-ink);
    font: inherit;
    font-size: 16px;
}

.apb-search__input::placeholder { color: #929292; opacity: 1; }

.apb-search__clear {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 0 !important;
    background: transparent;
    color: #777;
    font-size: 25px;
    line-height: 1;
    cursor: pointer;
}

.apb-search__button {
    min-height: 48px;
    padding: 0 24px;
    border: 0;
    border-radius: 0 !important;
    background: var(--apb-ink);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    cursor: pointer;
}

.apb-search__button:disabled {
    opacity: .6;
    cursor: wait;
}

.apb-search__status {
    min-height: 0;
    margin-top: 6px;
    padding-left: 0;
    color: var(--apb-muted);
    font-size: 13px;
}

/* TWO CARDS PER ROW */
.apb-grid {
    display: grid !important;
    grid-template-columns: repeat(var(--apb-columns, 2), minmax(0, 1fr)) !important;
    gap: 10px !important;
}

.apb-card {
    display: flex !important;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--apb-border);
    border-radius: 0 !important;
    background: var(--apb-white);
    box-shadow: none;
}

.apb-card__media {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #171717;
}

.apb-card__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.apb-card__media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 60%, rgba(0,0,0,.22));
    pointer-events: none;
}

.apb-card__play {
    position: absolute;
    z-index: 2;
    left: 18px;
    bottom: 18px;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255,255,255,.95);
    color: #111;
    transition: background-color .2s ease, color .2s ease;
}

.apb-card:hover .apb-card__play,
.apb-card__media:focus-visible .apb-card__play {
    background: #ff2800;
    color: #fff;
}

.apb-card__fallback {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, #262626, #0a0a0a);
}

.apb-card__fallback-mark {
    color: rgba(255,255,255,.92);
    font-size: 28px;
    font-weight: 900;
    letter-spacing: .22em;
}

.apb-card__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    padding: 24px;
}

.apb-card__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    color: var(--apb-muted);
    font-size: 12px;
    font-weight: 600;
}

.apb-card__category {
    color: var(--apb-ink);
    font-weight: 850;
    letter-spacing: .11em;
    text-transform: uppercase;
    text-decoration: none;
}

.apb-card__dot { color: #b4b4b4; }

.apb-card__title {
    margin: 0 0 10px;
    font-size: 18px;
    font-weight: 650;
    line-height: 1.08;
    letter-spacing: -.03em;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.apb-card__title a {
    color: inherit;
    text-decoration: none;
}

.apb-card__excerpt {
    margin: 0 0 10px;
    color: var(--apb-muted);
    font-size: 15px;
    line-height: 1.65;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.apb-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: auto;
    padding-top: 10px;
}

.apb-card__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 42px;
    padding: 0 18px;
    border: 1px solid #151515;
    border-radius: 0;
    background: #151515;
    color: #fff;
    font-size: 12px;
    font-weight: 850;
    letter-spacing: .10em;
    text-transform: uppercase;
    text-decoration: none;
    transition: background-color .2s ease, border-color .2s ease;
}

.apb-card__link:hover,
.apb-card__link:focus-visible {
    background: #ff2800;
    border-color: #ff2800;
    color: #fff;
}

.apb-card__brand {
    color: #9a9a9a;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .20em;
}

.apb-empty {
    padding: 44px 24px;
    border: 1px dashed var(--apb-border);
    border-radius: 0 !important;
    text-align: center;
    background: var(--apb-soft);
}

.apb.is-loading .apb-results {
    opacity: .5;
}

.screen-reader-text {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0,0,0,0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* One card per row on tablet/mobile */
@media (max-width: 1024px) {
    .apb-grid {
        grid-template-columns: repeat(min(var(--apb-columns, 2), 2), minmax(0, 1fr)) !important;
    }
}

@media (max-width: 700px) {
    .apb-grid {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 560px) {
    .apb-search {
        grid-template-columns: auto minmax(0,1fr) auto;
    }

    .apb-search__button {
        grid-column: 1 / -1;
        width: 100%;
        margin-top: 7px;
    }

    .apb-card__body {
        padding: 20px;
    }

    .apb-card__title {
        font-size: 18px;
    }
}


.apb-load-more-wrap {
    display: flex;
    justify-content: center;
    padding-top: 30px;
}

.apb-load-more {
    min-width: 180px;
    min-height: 48px;
    padding: 0 24px;
    border: 0;
    border-radius: 0;
    background: #151515;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    cursor: pointer;
}

.apb-load-more:hover,
.apb-load-more:focus-visible {
    background: #ff2800;
}

.apb-load-more:disabled {
    opacity: .6;
    cursor: wait;
}
