/* W4: podiums that build up (public/w4.js sets the classes; lib/podium.ts writes the markup).
   w4-bida = hidden by the script, waiting to be seen; w4-bygg = building now (about 1.5 s); w4-telur = a score
   counting: its real text transparent under the aria-hidden count layer .w4-tala, whose number is generated content
   (::before from data-n), so it is never part of the text, the selection, a copy or the accessibility tree.
   Only on screen and only without reduced motion: print, reduced motion and no-JS are the plain podium.
   Only transform and opacity move (on the compositor; colour changes in two steps); every tile keeps its final box.
   The count layer is contain:strict, so a new number never lays out more than itself. */
.texti .pallur>li>em>.w4-tala{display:none}
@media screen and (prefers-reduced-motion:no-preference){
  /* waiting: octagons and the first rows not yet there (the tiles: below, per layout) */
  .w4-bida .pallur .saeti,.w4-bida .adrir{opacity:0}

  /* the tiles rise, third, second, first (w4.js gives each tile its step: w4-r0 first, tied places together, a
     class with two places or one starts at once); heavy and settling, no overshoot */
  .w4-bygg .pallur>li{animation:w4-ris .56s cubic-bezier(.2,.72,.22,1) backwards}
  .w4-bygg .pallur>li.w4-r1{animation-delay:.13s}
  .w4-bygg .pallur>li.w4-r2{animation-delay:.26s}
  /* the rank octagons come down into place as their tile lands */
  .w4-bygg .pallur .saeti{animation:w4-sest .34s cubic-bezier(.25,.8,.3,1) .42s backwards}
  .w4-bygg .w4-r1 .saeti{animation-delay:.55s}
  .w4-bygg .w4-r2 .saeti{animation-delay:.68s}
  /* the scores: hidden until their count starts (w4.js, .64 s to .9 s); this ends by itself, so a stalled script still shows them */
  .w4-bygg .pallur>li>em:not(.w4-buin){animation:w4-fela 1.7s step-end}
  .w4-bygg .pallur>li>em.w4-telur{position:relative;animation:w4-fela2 .72s step-end}
  .texti .pallur>li>em.w4-telur>.w4-tala{display:block;position:absolute;inset:0;margin:0;font:inherit;line-height:inherit;
    text-align:right;white-space:nowrap;color:var(--djupblar);-webkit-user-select:none;user-select:none;pointer-events:none;
    animation:w4-ut .72s step-end forwards;contain:strict}
  /* never read out: the layer is aria-hidden, and the number has empty alternative text as well */
  .w4-tala::before{content:attr(data-n);content:attr(data-n) / ""}
  /* the rest of the class follows the podium in, as one block (one moving layer, not one per row) */
  .w4-bygg .adrir{animation:w4-fram .4s cubic-bezier(.2,.72,.22,1) .62s backwards}
}
/* the podium side by side (style.css: three columns from 561 px, tiles standing on one floor, the ol's bottom):
   each tile rises out of that floor, clipped by the podium while it builds */
@media screen and (prefers-reduced-motion:no-preference) and (min-width:561px){
  .w4-bida .pallur,.w4-bygg .pallur{clip-path:inset(0)} /* paint only: no layout change when it comes and goes */
  .w4-bida .pallur>li{transform:translateY(calc(100% + 6px))}
}
/* phones (style.css: one tile per row, gold on top): each row comes up a little into its place */
@media screen and (prefers-reduced-motion:no-preference) and (max-width:560px){
  .w4-bida .pallur>li{opacity:0}
  .w4-bygg .pallur>li{animation-name:w4-ris-simi}
}
@keyframes w4-ris{from{transform:translateY(calc(100% + 6px))}to{transform:none}} /* a little past the floor: no hairline of the tile at the clip edge */
@keyframes w4-ris-simi{from{opacity:0;transform:translateY(22px)}to{opacity:1;transform:none}}
@keyframes w4-sest{from{opacity:0;transform:translateY(-12px) scale(1.16)}to{opacity:1;transform:none}}
@keyframes w4-fela{from,to{color:transparent}}
@keyframes w4-fela2{from,to{color:transparent}}
@keyframes w4-ut{from{opacity:1}to{opacity:0}}
@keyframes w4-fram{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}
