/* Loading skeletons: neutral shimmer blocks shown while content JSON loads. */
.skel {
  display: block;
  position: relative;
  overflow: hidden;
  background: var(--cds-layer-accent, #e0e0e0);
}

.skel::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, var(--cds-layer, rgba(255, 255, 255, 0.4)), transparent);
  animation: skel-shimmer 1.4s ease-in-out infinite;
}

@keyframes skel-shimmer {
  100% {
    transform: translateX(100%);
  }
}

.skel--line {
  height: 0.75rem;
  margin-bottom: 0.5rem;
}
.skel--title {
  height: 1.25rem;
  margin-bottom: 0.75rem;
}
.skel--heading {
  height: 2rem;
  margin: 0.5rem 0 1rem;
}
.skel--tag {
  height: 1rem;
  margin-bottom: 0.75rem;
}
.skel--thumb {
  height: 160px;
  margin-bottom: 1rem;
}
.skel--cover {
  height: clamp(180px, 40vw, 360px);
  margin: 1rem 0 1.5rem;
}
.skel--badge {
  flex: none;
  width: 2.5rem;
  height: 2.5rem;
}

.skel--w40 {
  width: 40%;
}
.skel--w60 {
  width: 60%;
}
.skel--w80 {
  width: 80%;
}
.skel--w100 {
  width: 100%;
}

.skel-card {
  padding-bottom: 1rem;
}

.skel-row {
  display: flex;
  gap: 1rem;
  padding: 1rem 0;
  border-top: 1px solid var(--cds-border-subtle, #e0e0e0);
}
.skel-row__text {
  flex: 1 1 auto;
  padding-top: 0.25rem;
}

.skel-article {
  /* Match the real .post column: same width, and centred in the wide page container. */
  max-width: 46rem;
  margin-inline: auto;
}

/* Track-card skeleton: a non-interactive .track-card. */
.skel-trackcard { pointer-events: none; }
.skel--num { width: 1.5rem; height: 1.25rem; }
.skel--bar { height: 4px; margin: 0.25rem 0; }

/* Module skeleton lesson rows (match .lesson-rows spacing). */
.skel-lessons { list-style: none; margin: 0; padding: 0; }
.skel-lessonrow {
  display: flex;
  gap: 1rem;
  padding: 1rem 0;
  border-top: 1px solid var(--cds-border-subtle, #e0e0e0);
}
.skel-lessonrow__text { flex: 1 1 auto; padding-top: 0.25rem; }
.skel--index { flex: none; width: 1.5rem; height: 1rem; margin-top: 0.25rem; }

@media (prefers-reduced-motion: reduce) {
  .skel::after {
    animation: none;
  }
}
