/* Loading silhouettes of the real screens. Empty-state ghosts stay still, so movement always means loading. */
.skeleton { display: grid; gap: 14px; justify-items: start; min-width: 0; pointer-events: none; animation: skeleton-reveal .2s ease .3s both; }
.skeleton-stack { display: grid; gap: 12px; justify-items: start; width: 100%; min-width: 0; }
.skeleton-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; min-width: 0; }
.skeleton-row.is-start { justify-content: start; }
.skeleton-wrap { display: flex; flex-wrap: wrap; gap: 10px; width: 100%; }
.skeleton-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 14px; width: 100%; }
.skeleton-card { width: 100%; padding: 22px 24px; border-radius: 24px; background: #0f0f0f; }
/* the startup screens (index.html) and the screen's own skeleton taking over from them show at once */
[data-startup] { pointer-events: none; }
[data-startup] .skeleton, .skeleton.is-instant { animation: none; }

/* one light band crosses the whole screen: the gradient is pinned to the viewport, so every bar it passes lights up in turn */
.skeleton-bar {
  display: block;
  flex: none;
  width: var(--w, 100%);
  max-width: 100%;
  height: var(--h, 14px);
  border-radius: var(--r, 999px);
  background:
    linear-gradient(105deg, transparent 44%, rgba(255, 255, 255, .17) 50%, transparent 56%) fixed,
    rgba(255, 255, 255, .07);
  background-size: 300% 100%, auto;
  animation: skeleton-wave 1.8s cubic-bezier(.45, .05, .35, 1) infinite;
}

/* fast responses replace the skeleton before it shows up */
@keyframes skeleton-reveal { from { opacity: 0; } }
@keyframes skeleton-wave {
  from { background-position: 100% 0, 0 0; }
  to { background-position: 0 0, 0 0; }
}
/* skeletonLine(): one line of the text element it sits in, drawn a little thinner than the type;
   a border, unlike margins, does not collapse between the lines of one paragraph */
.skeleton-line { --h: 1lh; border-block: calc((1lh - .6em) / 2) solid transparent; background-clip: padding-box; }
/* keeps the place of a control the silhouette leaves out */
.skeleton-ghost { visibility: hidden; }
@media (prefers-reduced-motion: reduce) { .skeleton-bar { animation: none; } }
