/* 6.5.4 — compact mobile rhythm matching the latest-training section. */
@media(max-width:760px){
  body.home .msid-universal-search-panel{top:calc(100% + 6px);min-width:0;width:100%;max-height:58vh;border-radius:16px;}

  /* Smaller, consistent headings and vertical spacing after latest training. */
  body.home .mc-section{padding:28px 0;}
  body.home .mc-discovery{padding-top:18px;padding-bottom:26px;}
  body.home .mc-section-head{display:flex;align-items:center;justify-content:space-between;flex-direction:row;gap:10px;margin-bottom:13px;}
  body.home .mc-section-head>div{min-width:0;}
  body.home .mc-section-head h2{font-size:1.18rem;line-height:1.3;letter-spacing:-.2px;}
  body.home .mc-section-head>div>span,
body.home .mc-section-head p{display:none;}
  body.home .mc-section-head>a{font-size:.72rem;text-underline-offset:3px;}
  body.home .msid-home-section-cta{margin-top:14px;}
  body.home .msid-home-marketplace-btn{min-height:42px;font-size:.78rem;border-radius:13px;}

  /* Make the remaining homepage content use the same compact two-up rhythm. */
  body.home .mc-trainer-grid,
body.home .msid-home-school-grid,
body.home .msid-book-grid,
body.home .msid-home-articles-grid{
    display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;overflow:visible;padding:0;
  }
  body.home .mc-trainer-grid>*,
body.home .msid-home-school-grid>*,
body.home .msid-book-grid>*,
body.home .msid-home-articles-grid>*{min-width:0;width:auto;flex:none;}

  body.home .trainer-card-editorial{border-radius:15px;overflow:hidden;}
  body.home .trainer-card-media{aspect-ratio:1/1;}
  body.home .trainer-card-body{gap:6px;padding:9px;}
  body.home .trainer-card-tags span:nth-child(n+2){display:none;}
  body.home .trainer-card-tags span{min-height:20px;padding:2px 6px;font-size:.6rem;}
  body.home .trainer-card-title{font-size:.82rem;line-height:1.4;}
  body.home .trainer-card-bio,
body.home .trainer-card-institution{display:none;}
  body.home .trainer-card-footer{grid-template-columns:1fr;margin-top:auto;}
  body.home .trainer-card-profile{min-height:34px;font-size:.68rem;}

  body.home .msid-home-school-grid .sp-school-ad-card{border-radius:15px;overflow:hidden;}
  body.home .msid-home-school-grid .sp-tc-media{aspect-ratio:1/1;}
  body.home .msid-home-school-grid .sp-tc-card-body{gap:5px;padding:9px;}
  body.home .msid-home-school-grid .sp-tc-card-tags>span:nth-child(n+2){display:none;}
  body.home .msid-home-school-grid .sp-tc-card-title{min-height:3.4em;font-size:.78rem;line-height:1.4;-webkit-line-clamp:2;}
  body.home .msid-home-school-grid .sp-tc-card-role,
body.home .msid-home-school-grid .sp-tc-card-facts{display:none;}
  body.home .msid-home-school-grid .sp-tc-card-footer{border:0;padding-top:0;margin-top:auto;}
  body.home .msid-home-school-grid .sp-btn-wa{display:none;}
  body.home .msid-home-school-grid .sp-btn-view{min-height:32px;font-size:.66rem;}
  body.home .msid-school-levels{display:none;}

  body.home .msid-book-card{border-radius:15px;overflow:hidden;}
  body.home .msid-book-card-body{padding:9px;}
  body.home .msid-book-category{padding:3px 6px;font-size:.58rem;}
  body.home .msid-book-card h3{margin:7px 0 3px;font-size:.8rem;line-height:1.4;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}
  body.home .msid-book-author{font-size:.64rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
  body.home .msid-book-card-foot{margin-top:8px;gap:5px;align-items:center;flex-direction:row;}
  body.home .msid-book-add{padding:6px 7px;font-size:.62rem;width:auto;}

  body.home .msid-home-article{display:flex;flex-direction:column;border:1px solid var(--msid-line);border-radius:15px;overflow:hidden;}
  body.home .msid-home-article .msid-home-article-media{aspect-ratio:1/1;min-height:0;}
  body.home .msid-home-article-copy{padding:9px;}
  body.home .msid-home-article-meta{font-size:.58rem;margin-bottom:5px;}
  body.home .msid-home-article h3{min-height:3.2em;margin:0;font-size:.78rem;line-height:1.45;-webkit-line-clamp:2;}
  body.home .msid-home-article p{display:none;}
  body.home .msid-home-article-link{margin-top:7px;font-size:.64rem;}

  /* Keep card media fully filled even when text content makes rows equal-height. */
  body.home #front-courses-grid>.msid-home-course-card{background:#fff;}
  body.home .msid-home-course-card .sp-tc-media{align-self:stretch;background:transparent;}
  body.home .msid-home-course-card .sp-tc-media img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;}

  /* Footer stripped to definition + three links. */
  .msid-footer-minimal-inner{gap:12px;padding-bottom:12px;}
  .msid-footer-minimal .msid-learning-footer-brand{display:block;}
  .msid-footer-minimal .msid-brand-logo--footer{height:30px;margin-bottom:8px;}
  .msid-footer-minimal .msid-learning-footer-brand p{font-size:.7rem;line-height:1.6;}
  .msid-footer-minimal-links{width:100%;display:flex;gap:12px;overflow-x:auto;}
  .msid-footer-minimal-links a{font-size:.7rem;}
  .msid-footer-minimal .msid-learning-footer-bottom{padding-top:9px;font-size:.62rem;}

  /* Mixed search results. */
  .msid-search-page-head{padding:26px 0 20px;}
  .msid-search-page-head h1{font-size:1.45rem;margin:6px 0 14px;}
  .msid-search-page-form{grid-template-columns:minmax(0,1fr) 72px;}
  .msid-search-page-form>input[type=search]{min-height:46px;font-size:.82rem;}
  .msid-search-page-form>button{min-width:72px;font-size:.76rem;}
  .msid-search-result-grid{grid-template-columns:1fr;gap:8px;}
  .msid-search-result-card{grid-template-columns:62px minmax(0,1fr) 18px;min-height:78px;padding:8px;border-radius:15px;}
  .msid-search-result-card-media{width:62px;height:62px;border-radius:12px;}
}
