.rs-loader {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: .9rem;
  min-block-size: 12rem;
  padding: 1.5rem;
  color: #545670;
  font: 500 .875rem/1.5 'Avenir Next', system-ui, sans-serif;
  text-align: center;
}

.rs-loader--page {
  min-block-size: 100svh;
  background: #f7f7fa;
}

.rs-loader > span {
  opacity: 0;
  animation: rs-loader-reveal 250ms step-end forwards;
}

@keyframes rs-loader-reveal {
  to { opacity: 1; }
}

.rs-loader__shield {
  position: relative;
  display: block;
  inline-size: 2.95rem;
  block-size: 3.65rem;
  background: #10123f;
  /* The first 217 of 1303 image pixels contain the shield, without the wordmark. */
  mask: url('/studio/rs-logo.png') left center / auto 100% no-repeat;
}

.rs-loader--page .rs-loader__shield {
  inline-size: 3.82rem;
  block-size: 4.75rem;
}

.rs-loader__shield::after {
  content: '';
  position: absolute;
  inset: 0;
  background: #f1e613;
  animation: rs-shield-fill 1.8s ease-in-out 250ms infinite;
  clip-path: inset(100% 0 0);
}

@keyframes rs-shield-fill {
  0%, 8% { clip-path: inset(100% 0 0); }
  62%, 77% { clip-path: inset(0); }
  100% { clip-path: inset(100% 0 0); }
}

@media (prefers-reduced-motion: reduce) {
  .rs-loader__shield::after { animation: none; clip-path: inset(62% 0 0); }
}
