[data-site-template]:not([data-site-template="legacy"]) { background: var(--brand-canvas); color: var(--brand-ink); }
.t-story { min-width: 0; }
.t-story-media { display: block; overflow: hidden; background: var(--brand-secondary-soft); }
.t-story-media img { display: block; width: 100%; height: auto; aspect-ratio: 8/5; object-fit: cover; }
.t-story-copy { min-width: 0; }
.t-story-copy :is(h1,h2,h3,h4) { margin: .5rem 0; line-height: 1.55; overflow-wrap: anywhere; }
.t-story-copy h1 { font-size: clamp(1.8rem, 3.5vw, 3.6rem); }
.t-story-copy h2 { font-size: clamp(1.3rem, 2vw, 2.2rem); }
.t-story-copy h3 { font-size: 1.1rem; }
.t-story-category { display: inline-block; color: var(--brand-primary); font-size: .8rem; font-weight: 700; padding-block: 7px; }
.t-story-date { display: block; color: var(--brand-muted); font-size: .78rem; padding-block: 5px; }
.t-story-description { color: var(--brand-muted); line-height: 1.9; overflow-wrap: anywhere; }
.t-reading { max-width: 72ch; margin-inline: auto; min-width: 0; }
.t-prose { font-size: 1.125rem; line-height: 1.95; overflow-wrap: anywhere; }
.t-prose :is(img,video,iframe,table) { max-width: 100%; }
.t-prose img { height: auto; }
.t-share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; border-block: 1px solid var(--brand-border); margin-block: 20px 28px; }
.t-share a { display: inline-flex; min-height: 44px; align-items: center; color: var(--brand-primary); }
.t-rail { min-width: 0; }

/* Full-width fallbacks after removing the most-read rail. */
.content-columns:not(:has(> aside)),
[data-site-template="compact"] .t-compact-home-layout:not(:has(> aside)),
[data-site-template="bulletin"] .t-bulletin-home-layout:not(:has(> aside)),
[data-site-template="focus"] .t-focus-home-layout:not(:has(> aside)),
[data-site-template="magazine"] .t-magazine-home-layout:not(:has(> aside)) { grid-template-columns: minmax(0, 1fr); }
.content-columns:not(:has(> aside)) .latest-news { grid-column: auto; grid-row: auto; }
[data-site-template="frontpage"] .t-frontpage-top:not(:has(> aside)),
[data-site-template="newsroom"] .t-newsroom-desk:not(:has(> aside)) { grid-template-columns: minmax(0, 1.55fr) minmax(245px, .72fr); }
.article-layout:not(:has(> aside)),
[data-site-template="compact"] .t-compact-article-layout:not(:has(> aside)),
[data-site-template="frontpage"] .t-frontpage-article-layout:not(:has(> aside)),
[data-site-template="magazine"] .t-magazine-article-layout:not(:has(> aside)),
[data-site-template="newsroom"] .t-newsroom-article-layout:not(:has(> aside)),
[data-site-template="sections"] .t-sections-article-layout:not(:has(> aside)),
[data-site-template="visual"] .t-visual-article-layout:not(:has(> aside)) { grid-template-columns: minmax(0, 1fr); }
[data-site-template]:not([data-site-template="legacy"]) :focus-visible { outline: 3px solid var(--brand-primary); outline-offset: 4px; }
.ad-slot { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ad-slot .ad-disclosure { display: block; font-size: .7rem; color: var(--brand-muted); letter-spacing: .04em; text-align: center; }
.ad-frame { width: 100%; min-height: 76px; display: grid; place-items: center; background: var(--brand-canvas); }
.ad-slot .ad-frame a { display: grid; place-items: center; height: 100%; width: 100%; }
.ad-slot .ad-frame img { width: 100%; height: 100%; max-height: 180px; object-fit: contain; }
.ad-slot-leaderboard .ad-frame { min-height: 0; aspect-ratio: auto; max-height: none; }
.ad-slot-leaderboard .ad-frame img { height: auto; max-height: 260px; }
.ad-slot-rectangle .ad-frame { aspect-ratio: 6/5; min-height: 250px; }
.ad-slot-rectangle .ad-frame img { max-height: 300px; }
.ad-slot .ad-failed[hidden] { display: none; }
.ad-slot .ad-frame [hidden], .t-story-media img[hidden] { display: none; }
.t-image-missing { aspect-ratio: 8/5; }
.t-image-missing::after { content: 'صورة غير متاحة'; display: grid; height: 100%; place-content: center; color: var(--brand-muted); font-size: .8rem; }
.site-preview-banner { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; justify-content: center; padding: 10px 16px; background: var(--brand-navy); color: var(--brand-surface); font-size: .85rem; }
.site-preview-banner a { padding: 8px; text-decoration: underline; }
@media (max-width: 980px) {
    [data-site-template]:not([data-site-template="legacy"]) .site-header .masthead { grid-template-columns: minmax(0,1fr) auto; grid-template-areas: none; gap: 12px; min-height: 76px; }
    [data-site-template]:not([data-site-template="legacy"]) .site-header .brand { grid-area: auto; }
    [data-site-template]:not([data-site-template="legacy"]) .header-search { display: flex; grid-area: auto; grid-column: 1 / -1; grid-row: 2; margin-block-end: 12px; width: 100%; }
    [data-site-template]:not([data-site-template="legacy"]) .header-search input { display: block; width: 100%; min-width: 0; }
    .t-reading { width: 100%; }
    .ad-slot-rectangle { width: min(100%, 340px); margin-inline: auto; }
    .t-prose { font-size: 1.075rem; }
}
