#main :is(.news-cover, .member-photo--framed, .chair-frame) img:is([data-photo-state="pending"], [data-photo-state="error"], [data-photo-state="idle"]) {
  opacity: 0;
}

#main #news #news-feed .news-card > .news-cover:has(> img:is([data-photo-state="pending"], [data-photo-state="error"], [data-photo-state="idle"])),
#main :is(.member-photo--framed, .chair-frame):has(> img):not(:has(> img[data-photo-state="ready"])):has(> img[data-photo-state]),
#main :is(.commission-member-photo, .commission-chair-photo):is([data-photo-state="pending"], [data-photo-state="error"], [data-photo-state="idle"]) {
  background-image: linear-gradient(135deg, var(--pale, #e8f0fc), var(--paper, #f0f7ff));
  background-color: var(--pale, #e8f0fc);
}

#main :is(.commission-member-photo, .commission-chair-photo)[data-photo-state="error"] {
  /* Preserve the portrait element's size and background while suppressing the browser error glyph. */
  content: url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7");
}

/* Keep the info controls in their normal visual state before the handlers attach. */
#main .hero .hero-help-toggle:disabled { opacity: 1; }

@media (min-width: 768px) {
  .site-header:has(> [data-photo-reload-status]) { position: relative; }
}

[data-photo-reload-status] {
  position: absolute;
  inset-inline: 0;
  inset-block-end: 0;
  block-size: 2px;
  background: var(--paper, #f0f7ff);
  overflow: hidden;
  pointer-events: none;
}

[data-photo-reload-status] > span {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  clip-path: inset(50%);
  white-space: nowrap;
}
