/* HTML-first news placeholders; each pending photo keeps its own loading surface. */
#news .news-loading-grid { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;margin-block:24px;list-style:none;padding:0; }
#news .news-loading-card { min-width:0;border:1px solid var(--line,#c5d9ef);background:var(--paper,#fff); }
#news .news-loading-cover { aspect-ratio:8/5; }
#news .news-loading-cover,#news .news-card[data-news-skeleton="image"] > .news-cover { position:relative;overflow:hidden;background:#dce7f0; }
#news .news-card[data-news-skeleton="image"] > .news-cover > img { opacity:0; }
#news .news-loading-cover::after,#news .news-card[data-news-skeleton="image"] > .news-cover::after { content:'';position:absolute;inset:0;background:linear-gradient(110deg,#dce7f0 30%,#f3f7fb 48%,#dce7f0 66%);background-size:240% 100%;animation:news-skeleton-sweep 1.6s linear infinite; }
#news .news-loading-body { padding:clamp(14px,1.6vw,20px); }
#news .news-loading-body i { display:block;height:17px;margin-block:12px;background:#d7e4ee;animation:news-skeleton-breathe 1.4s ease-in-out infinite alternate; }
#news .news-loading-body i:first-child { width:44%;height:10px;margin-block:0 0 20px; }
#news .news-loading-body i:last-child { width:76%; }
/* A stalled script gets an error hint, never an embedded article snapshot. */
#news-feed[data-news-initial="pending"] > [data-news-initial-placeholder] { animation:news-initial-placeholder-release 0s 16s forwards; }
[data-news-startup-shell] { box-sizing:border-box;width:min(1200px,calc(100% - 32px));margin-inline:auto;padding:32px 0;font:16px/1.5 system-ui,sans-serif;color:#183b62; }
[data-news-startup-shell] h2 { margin-block:0 12px; }
@keyframes news-skeleton-sweep { from {background-position:100% 0} to {background-position:-100% 0} }
@keyframes news-skeleton-breathe { from {opacity:1} to {opacity:.55} }
@keyframes news-initial-placeholder-release { to {max-height:0;overflow:hidden;visibility:hidden;margin-block:0} }
@media (max-width:767px) { #news .news-loading-grid {grid-template-columns:1fr;gap:16px} }
@media (prefers-reduced-motion:reduce) {
 #news .news-loading-cover::after,#news .news-card[data-news-skeleton="image"] > .news-cover::after,#news .news-loading-body i {animation:none}
}

#news[data-news-state="loading"] .news-list {display:none!important}
#news [data-news-initial-error] {max-height:0;overflow:hidden;visibility:hidden;animation:news-initial-error-show 0s 16s forwards}
#news[data-news-state="unavailable"] [data-news-initial-error] {max-height:none;overflow:visible;visibility:visible;animation:none}
[data-news-startup-shell] > [data-news-initial-placeholder] {animation:news-initial-placeholder-release 0s 16s forwards}
@keyframes news-initial-error-show {to {max-height:none;overflow:visible;visibility:visible}}

/* Keep the loading announcement accessible without a visible loading caption. */
#news[data-news-state="loading"] > p[role="status"] {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}

/* Mirror each site's existing news grid and card spacing in its first frame. */
body[data-page="home"] #news .news-loading-grid { margin:0;gap:0 24px; }
body[data-page="home"] #news .news-loading-card { margin:12px 0;padding:0; }
body[data-page="home"] #news :is(.news-loading-body,.news-card-body) { min-height:180px; }
body[data-page="home"] #news .news-loading-body { padding:20px;box-sizing:border-box; }
body:not([data-page]) #news .news-loading-grid { margin:0;gap:28px; }
body:not([data-page]) #news :is(.news-loading-body,.news-card-body) { min-height:204px; }
body:not([data-page]) #news .news-loading-body { padding:clamp(12px,1.6vw,22px);box-sizing:border-box; }
#news[data-news-state="loading"] #news-extra { display:none!important; }
#news .news-loading-more { display:flex;justify-content:center;padding-top:24px; }
#news .news-loading-more i { display:block;box-sizing:border-box;width:160px;height:calc(1.55em + 26px);border:1px solid transparent;background:#d7e4ee; }
#news .news-loading-grid[data-news-layout-cached] { margin:0!important;gap:0!important; }
@media(max-width:767px) {
 body[data-page="home"] #news .news-loading-grid { gap:0 16px; }
 body[data-page="home"] #news .news-loading-card { margin:0;padding:16px 0;border:0;border-bottom:1px solid var(--line,#c5d9ef); }
 body[data-page="home"] #news .news-loading-cover { margin-bottom:12px; }
 body[data-page="home"] #news :is(.news-loading-body,.news-card-body) { min-height:128px; }
 body[data-page="home"] #news .news-loading-body { padding:0; }
 body:not([data-page]) #news .news-loading-grid { gap:12px; }
 body:not([data-page]) #news :is(.news-loading-body,.news-card-body) { min-height:156px; }
 body:not([data-page]) #news .news-loading-body { padding:12px; }
}
