/* NESkills v199 — compact mobile card density.
   Mobile only: removes oversized spacer gaps and fixed card height while
   retaining the existing desktop layouts and sticky-stack interaction. */
@media (max-width: 767px) {
  /* All primary content-card stacks should size to their actual content. */
  .mobile-sticky-stack > :is(article, li, a, div),
  .mobile-sticky-stack[data-sticky-ready="true"] > :is(article, li, a, div) {
    box-sizing: border-box !important;
    min-height: 0 !important;
    height: auto !important;
    padding: 20px !important;
    border-radius: 18px !important;
  }

  /* Tighter separation between stacked cards. */
  .mobile-sticky-stack[data-sticky-ready="true"] > :is(article, li, a, div) {
    margin-bottom: 10px !important;
    box-shadow: 0 10px 26px rgba(6, 19, 38, 0.12) !important;
  }

  /* Remove the desktop spacer that pushed headings halfway down each card. */
  .mobile-sticky-stack > * > :is(h2, h3, h4, strong),
  .mobile-sticky-stack > * > div > :is(h2, h3, h4, strong):first-child {
    margin-top: 0 !important;
  }

  /* Keep a deliberate but compact gap after a number, label or eyebrow. */
  .mobile-sticky-stack > * > :is(span, small, b, i, time, [class*="number"]) + :is(h2, h3, h4, strong),
  .mobile-sticky-stack > * > :is(span, small, b, i, time, [class*="number"]) + small + :is(h2, h3, h4, strong) {
    margin-top: 14px !important;
  }

  /* Compact body copy and lists without making the cards cramped. */
  .mobile-sticky-stack > * > :is(p, ul, ol),
  .mobile-sticky-stack > * > :is(h2, h3, h4, strong) + :is(p, ul, ol) {
    margin-top: 8px !important;
  }

  .mobile-sticky-stack > * p,
  .mobile-sticky-stack > * li {
    line-height: 1.5 !important;
  }

  /* Keep in-card links visible but stop them creating another empty band. */
  .mobile-sticky-stack > * > :is(a, b):last-child:not(:first-child),
  .mobile-sticky-stack > a > :is(b, strong):last-child:not(:first-child) {
    margin-top: 12px !important;
  }

  /* Course cards had a later fixed 340px mobile height; content now decides height. */
  .courses87-page .courses87-core-card {
    min-height: 0 !important;
  }

  /* Compact utility-link stacks remain smaller than full content cards. */
  .about102-proof-links.mobile-sticky-stack > a,
  .five104-inline-links.mobile-sticky-stack > a,
  .contact103-details.mobile-sticky-stack > * {
    min-height: 44px !important;
    padding: 12px 14px !important;
    border-radius: 14px !important;
  }
}

@media (max-width: 380px) {
  .mobile-sticky-stack > :is(article, li, a, div),
  .mobile-sticky-stack[data-sticky-ready="true"] > :is(article, li, a, div) {
    padding: 18px !important;
  }
}
