/* Absolute overlays do not change image geometry or existing card layout. */
.brd-media-sprite { position: absolute; width: 0; height: 0; overflow: hidden; pointer-events: none; }
.brd-media-photo { position: relative; }
.brd-media-photo > .gh-feature-image { display: block; }
.brd-media-icons { position: absolute; z-index: 3; right: 12px; bottom: 12px; display: flex; gap: 6px; pointer-events: none; }
.brd-media-icon { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 32px; width: 32px; height: 32px; color: #fff; background: #C62828; border-radius: 5px; box-shadow: 0 2px 6px rgba(0,0,0,.22); }
.brd-media-icon svg { display: block; width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.brd-media-icons > .brd-media-icon:nth-child(n+4) { display: none; }
.gh-cover > .brd-media-icons { top: 20px; right: 20px; bottom: auto; }
@media (max-width: 767px) {
    .brd-media-icons { right: 8px; bottom: 8px; gap: 4px; }
    .brd-media-icon { flex-basis: 26px; width: 26px; height: 26px; border-radius: 4px; }
    .brd-media-icon svg { width: 16px; height: 16px; }
    .gh-cover > .brd-media-icons { top: 12px; right: 12px; bottom: auto; }
}

/* Content labels form a flush strip along the card photo's lower-left edge. */
.gh-card-image > .brd-media-icons { left: 0; bottom: 0; right: auto; gap: 0; }
.gh-card-image > .brd-media-icons > .brd-media-icon { border-radius: 0; box-shadow: none; }

/* Article photos share the same edge-aligned content labels as cards. */
.brd-media-photo > .brd-media-icons,
.gh-cover > .brd-media-icons { top: auto; right: auto; bottom: 0; left: 0; gap: 0; }
.brd-media-photo > .brd-media-icons > .brd-media-icon,
.gh-cover > .brd-media-icons > .brd-media-icon { border-radius: 0; box-shadow: none; }

/* Let featured badges share the link's stacking context, above its image and shade. */
.gh-topic-grid .gh-card.featured.large .gh-card-link { isolation: isolate; }
.gh-topic-grid .gh-card.featured.large .gh-card-image { z-index: auto; }
.gh-topic-grid .gh-card.featured.large .gh-card-image img { z-index: -2; }
.gh-topic-grid .gh-card.featured.large .gh-card-image::after {
    content: ''; position: absolute; inset: 0; z-index: -1;
    background: linear-gradient(0deg, rgba(0,0,0,.8), transparent 60%);
}
#brd-issue-home .gh-card-image::after { content: none; }
.gh-card.featured.large .brd-media-icons { top: 0; left: 0; bottom: auto; right: auto; gap: 0; }
.gh-card.featured.large .brd-media-icon { border-radius: 0; box-shadow: none; }
.gh-card:not(.large) > .gh-card-link > .brd-media-icons { display: none; }
