/* Skeleton loaders for UNIVA Academy (/academy, the student library, /ai/account): soft boxes shaped like the
   content on its way, so nothing sits empty while the API or an image answers. A view's skeleton reuses that view's
   own classes (hero, module-card, repo-card…), so it takes the same room and the content swaps in without a jump.
   .skel             a box with the shimmer
   .skel-line        one line of text, inside an element with the real font (h1, p…); lines are joined by <br>
   .skel-text        real placeholder text kept for its size, drawn as a box until the value is known
   .skel-media       an <img> or <video> whose box is already reserved: a box until it loads, then it fades in
   .skel-sr          the visually hidden "Loading…" in a region marked aria-busy="true" */
.skel, .skel-text, .skel-media:not(.is-ready) {
  background: linear-gradient(100deg, rgba(255,255,255,.055) 30%, rgba(140,200,255,.13) 50%, rgba(255,255,255,.055) 70%) 0 0 / 300% 100%;
  animation: skel-shimmer 1.6s ease-in-out infinite;
}
.skel { display: block; border-radius: 10px; }
.skel-line { display: inline-block; vertical-align: middle; height: .72em; max-width: 100%; border-radius: 6px; }
.skel-text { color: transparent !important; border-radius: 8px; width: fit-content; user-select: none; }
.skel-text * { visibility: hidden; }
.skel-media:not(.is-ready) { color: transparent; }
.skel-media.is-ready { animation: skel-in .45s ease-out; }
.skel-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
@keyframes skel-shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }
@keyframes skel-in { from { opacity: 0; } }

/* Student library shapes */
.skel-view .hero h2::after { content: none; }
.skel-view .module-card, .skel-view .repo-card, .skel-view .concept { pointer-events: none; }
.skel-button { width: 13em; max-width: 100%; height: 46px; margin-top: 8px; border-radius: 999px; }
.skel-cover { position: relative; z-index: 1; width: var(--w, 200px); aspect-ratio: 3 / 4; border-radius: 6px 16px 16px 6px; }
.skel-video { aspect-ratio: 16 / 9; border-radius: 22px; }
.skel-select { flex: 1 1 auto; height: 48px; border-radius: 999px; }
.skel-row { display: block; padding: 13px 0; border-bottom: 1px solid rgba(255,255,255,.09); font-size: 13px; }
.skel-view .repo-card > .skel { flex: none; width: 100%; aspect-ratio: 2 / 1; border-radius: 0; }
.skel-view .search { display: block; }
.skel-view .daily-entry .skel-button, .skel-view .saved-note .skel-button { width: 10em; height: 40px; }
@media (max-width: 900px) { .skel-view .repo-card > .skel { width: 42%; align-self: center; } }
@media (max-width: 700px) { .skel-video { border-radius: 16px; } }
@media (max-width: 520px) { .skel-view .repo-card > .skel { width: 100%; border-radius: 8px; } }
@media (min-width: 701px) { .skel-narrow { display: none; } }
@media (min-width: 521px) and (max-width: 900px) { .skel-view .github-card > .skel { width: 100%; } }

/* Still boxes, no shimmer and no fade, for anyone who asks for less motion */
@media (prefers-reduced-motion: reduce) {
  .skel, .skel-text, .skel-media:not(.is-ready) { animation: none; background: rgba(255,255,255,.08); }
  .skel-media.is-ready { animation: none; }
}
