:root {
  --image-loading-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cstyle%3E@media(prefers-reduced-motion:no-preference){g{transform-origin:center;animation:spin 1s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}}%3C/style%3E%3Ccircle cx='12' cy='12' r='9' fill='none' stroke='%23ccd6e4' stroke-width='2.5'/%3E%3Cg%3E%3Cpath d='M12 3a9 9 0 0 1 9 9' fill='none' stroke='%233a73d8' stroke-width='2.5' stroke-linecap='round'/%3E%3C/g%3E%3C/svg%3E");
}

@media screen {
  .image-reveal-enabled img:is([src], [srcset]):not([data-image-reveal]) {
    object-position: -100000px -100000px;
    background-image: var(--image-loading-icon);
    background-repeat: no-repeat;
    background-position: center;
    background-size: min(22px, 78%) auto;
    min-inline-size: 20px;
    min-block-size: 20px;
    color: transparent;
  }

  .image-loading-icon {
    display: inline-block;
    width: 22px;
    height: 22px;
    vertical-align: middle;
    background: var(--image-loading-icon) center / contain no-repeat;
  }
}

@media screen and (prefers-reduced-motion: no-preference) {
  img[data-image-reveal="ready"] { animation: image-reveal-in 180ms ease-out; }
  @keyframes image-reveal-in { from { opacity: 0; } }
}
