/* V107: prevent oversized featured previews above the directory. */
.featured-card-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,250px),1fr));gap:1rem;margin:1rem 0 1.6rem}
.featured-card-grid>article.category-card{min-width:0;padding:0;display:flex;flex-direction:column;overflow:hidden}
.featured-card-grid>article.category-card>a.category-thumb{display:block;aspect-ratio:16/9;overflow:hidden;width:100%;background:#132e40}
.featured-card-grid>article.category-card>a.category-thumb>img{display:block;width:100%!important;height:100%!important;max-height:none!important;aspect-ratio:16/9!important;object-fit:cover!important;object-position:center center!important;border:0;margin:0}
.featured-card-grid>article.category-card>a.card-body{display:block;padding:.85rem 1rem;flex:1;color:inherit;text-decoration:none}
/* Respect photos throughout categories, even where older HTML omits category-grid. */
article.category-card>a.category-thumb>img{max-width:100%;width:100%;aspect-ratio:16/9;object-fit:cover}
/* Keep the logo separate from editorial images. */
header.navbar a.israel-re-brand-v102{max-width:min(88vw,360px)!important;flex-basis:360px!important}
header.navbar a.israel-re-brand-v102>img.israel-re-logo-v102{width:100%!important;height:auto!important;max-height:120px!important;object-fit:contain!important}
/* Preserve original article image ratios; never stretch thumbnails or historical faces. */
main figure.editorial-figure img, main figure.article-inline-image img{max-width:100%;height:auto;object-fit:contain}
@media(max-width:580px){.featured-card-grid{grid-template-columns:1fr 1fr;gap:.7rem}.featured-card-grid>article.category-card h2{font-size:1rem}header.navbar a.israel-re-brand-v102{max-width:min(88vw,300px)!important;flex-basis:300px!important}}
@media(max-width:390px){.featured-card-grid{grid-template-columns:1fr}}

/* V129: Preview layout and brightness correction for light and dark themes. */
:is(.home-card,.category-card,.article-card){position:relative;isolation:isolate;overflow:hidden}
:is(.home-card,.category-card,.article-card)>a.category-thumb{position:relative;display:block;aspect-ratio:16/9;overflow:hidden;background:#e4e9ee}
:is(.home-card,.category-card,.article-card)>a.category-thumb>img{display:block;width:100%!important;height:100%!important;aspect-ratio:16/9!important;object-fit:cover!important;filter:none!important;opacity:1!important;mix-blend-mode:normal!important;transform:none!important}
:is(.home-card,.category-card,.article-card)>a.category-thumb::before,
:is(.home-card,.category-card,.article-card)>a.category-thumb::after{content:none!important;display:none!important}
:is(.home-card,.category-card,.article-card)>a.card-body{position:relative;z-index:1;background:transparent!important;text-shadow:none!important;filter:none!important;opacity:1!important}
html[data-theme="light"] :is(.home-card,.category-card,.article-card){background:#fff!important;color:#172b3b!important;border-color:#b8c9d5!important}
html[data-theme="light"] :is(.home-card,.category-card,.article-card) :is(h2,h3,p){color:#172b3b!important}
html[data-theme="dark"] :is(.home-card,.category-card,.article-card){background:#142b3a!important;color:#f3f8fd!important;border-color:#52758a!important}
html[data-theme="dark"] :is(.home-card,.category-card,.article-card) :is(h2,h3,p){color:#f3f8fd!important}
@media (prefers-color-scheme:dark){html:not([data-theme]) :is(.home-card,.category-card,.article-card){background:#142b3a;color:#f3f8fd}}
