.funding-flag > svg { display: block; width: 100%; height: auto; }

@media (prefers-reduced-motion: no-preference) {
  .vector-motion [data-vector-illustration="country-flag"]:not(.vector-playing, .vector-done) .flag-sketch {
    visibility: hidden;
  }
  .vector-playing .country-outline { animation: trace-country .9s ease-in-out both; }
  .vector-playing .flag-sketch :is(image, rect) { animation: colour-country .66s ease-out .78s both; }

  .vector-awaiting.funding-flag use[href="#star"],
  .vector-awaiting.funding-flag > svg > path { opacity: 0; }
  .vector-playing.funding-flag use[href="#star"] {
    transform-box: fill-box;
    transform-origin: center;
    animation: place-eu-star .31s cubic-bezier(.22,.76,.32,1) var(--star-delay,.16s) both;
  }

  .vector-playing.funding-flag use[href="#star"]:nth-child(2) { --star-delay: .23s; }
  .vector-playing.funding-flag use[href="#star"]:nth-child(3) { --star-delay: .30s; }
  .vector-playing.funding-flag use[href="#star"]:nth-child(4) { --star-delay: .37s; }
  .vector-playing.funding-flag use[href="#star"]:nth-child(5) { --star-delay: .44s; }
  .vector-playing.funding-flag use[href="#star"]:nth-child(6) { --star-delay: .51s; }
  .vector-playing.funding-flag use[href="#star"]:nth-child(7) { --star-delay: .58s; }
  .vector-playing.funding-flag use[href="#star"]:nth-child(8) { --star-delay: .65s; }
  .vector-playing.funding-flag use[href="#star"]:nth-child(9) { --star-delay: .72s; }
  .vector-playing.funding-flag use[href="#star"]:nth-child(10) { --star-delay: .79s; }
  .vector-playing.funding-flag use[href="#star"]:nth-child(11) { --star-delay: .86s; }
  .vector-playing.funding-flag use[href="#star"]:nth-child(12) { --star-delay: .93s; }

  .vector-playing.funding-flag > svg > path { animation: flag-accents .34s ease-out 1.05s both; }
  .vector-playing.funding-flag svg g:has(> use[href="#star"]) { animation: stars-in-wind 1.65s ease-in-out; }
}

@keyframes trace-country {
  from { stroke-dasharray: 1 1; stroke-dashoffset: 1; }
  to { stroke-dasharray: 1 1; stroke-dashoffset: 0; }
}

@keyframes colour-country {
  from { clip-path: inset(0 100% 0 0); }
  to { clip-path: inset(0); }
}

@keyframes place-eu-star {
  0% { opacity: 0; transform: scale(.4); }
  65% { opacity: 1; transform: scale(1.16); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes flag-accents {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes stars-in-wind {
  0%, 100% { translate: 0; }
  29%, 78% { translate: 1px -2.6px; }
  53% { translate: -1px 2.3px; }
}
