/* Mobile-only course carousel. Desktop course cards remain unchanged. */
.mobile-carousel-heading,.mobile-carousel-pagination,.mobile-course-benefits,.mobile-carousel-controls{display:none}

body.mobile-carousel-mode .mobile-carousel-heading{width:calc(100% - 18px);margin:19px auto 12px;display:flex;align-items:end;justify-content:space-between;gap:12px}
body.mobile-carousel-mode .mobile-carousel-heading p{margin:0 0 4px;color:var(--blue);font-size:8px;font-weight:950;letter-spacing:.13em;text-transform:uppercase}
body.mobile-carousel-mode .mobile-carousel-heading h2{margin:0;color:var(--navy);font-size:25px;line-height:1;letter-spacing:-.045em}
body.mobile-carousel-mode .mobile-carousel-controls{display:flex;gap:6px}
body.mobile-carousel-mode .mobile-carousel-controls button{width:34px;height:34px;padding:0;display:grid;place-items:center;border:1px solid #aac9e5;border-radius:50%;background:#f8fcff;color:var(--blue);font-size:17px;font-weight:900}
body.mobile-carousel-mode .mobile-carousel-controls button:disabled{opacity:.32;cursor:default}

body.mobile-carousel-mode .mobile-carousel-window{position:relative;z-index:3;width:100%;overflow:hidden;touch-action:pan-y}
body.mobile-carousel-mode .courses[data-course-carousel]{width:100%;max-width:none;margin:0;display:flex;grid-template-columns:none;gap:10px;overflow:visible;padding:4px 48px 13px 9px;transition:transform .28s ease}
body.mobile-carousel-mode .courses[data-course-carousel] :is(.course-card,.card){flex:0 0 calc(100% - 50px);min-width:0;min-height:0;padding:18px 16px 15px;align-items:center;border:1.5px solid var(--blue);border-radius:14px;background:#fff;box-shadow:0 10px 24px #173e6814;opacity:.68;transform:scale(.985);transition:opacity .18s,transform .18s,box-shadow .18s}
body.mobile-carousel-mode .courses[data-course-carousel] :is(.course-card,.card).is-mobile-active{opacity:1;transform:scale(1);box-shadow:0 13px 29px #173e6820}
body.mobile-carousel-mode .courses[data-course-carousel] :is(.icon-wrap,.icon){width:70px;height:70px;min-height:70px;margin:0 auto 5px;display:grid;place-items:center;transform:none;border-radius:50%}
body.mobile-carousel-mode .courses[data-course-carousel] .icon-wrap .course-icon{width:70px;height:70px;transform:none}
body.mobile-carousel-mode .courses[data-course-carousel] .exact-icon svg{width:53px;height:53px}
body.mobile-carousel-mode .courses[data-course-carousel] :is(.audience,.card>small){width:100%;min-height:0;margin:5px 0 7px;padding:0 0 8px;border-bottom:1px solid #b8d4ed;color:var(--accent);font-size:8px;font-weight:900;letter-spacing:.055em;text-align:center;text-transform:uppercase}
body.mobile-carousel-mode .courses[data-course-carousel] :is(.course-card h2,.card h2){min-height:0;margin:3px 0 5px;font-size:24px;line-height:1.02;letter-spacing:-.045em;text-align:center}
body.mobile-carousel-mode .courses[data-course-carousel] .description{display:none}
body.mobile-carousel-mode .courses[data-course-carousel] :is(.course-card,.card) .purchase{display:contents}
body.mobile-carousel-mode .courses[data-course-carousel] :is(.course-card,.card) .price{order:4;width:100%;margin:5px 0 13px;padding:0;border:0;color:var(--blue);font-size:26px;line-height:1;text-align:center}
body.mobile-carousel-mode .courses[data-course-carousel] :is(.course-card,.card) .price small{display:block;width:100%;min-height:0;margin:0 0 4px;padding:0;border:0;color:#63758e;font-size:7px;letter-spacing:.1em}
body.mobile-carousel-mode .mobile-course-benefits{order:5;width:100%;margin:0 0 16px;padding:14px 0 0;display:grid;gap:9px;border-top:1px solid #d7e3ed;list-style:none}
body.mobile-carousel-mode .mobile-course-benefits li{display:flex;align-items:flex-start;gap:9px;color:#33485f;font-size:11px;line-height:1.35;text-align:left}
body.mobile-carousel-mode .mobile-course-benefits b{width:19px;height:19px;flex:0 0 auto;display:grid;place-items:center;border-radius:50%;background:var(--blue);color:#fff;font-size:10px}
body.mobile-carousel-mode .courses[data-course-carousel] .card-actions{order:6;width:100%;display:grid;gap:6px}
body.mobile-carousel-mode .courses[data-course-carousel] .card-actions .register{height:43px;border:0;border-radius:7px;background:var(--orange);color:#fff;font-size:10px;box-shadow:0 8px 17px #ff4b0b2b}
body.mobile-carousel-mode .courses[data-course-carousel] .card-actions .more-info{height:31px;margin:0;border:0;background:transparent;color:var(--navy);font-size:9px;box-shadow:none}

body.mobile-carousel-mode .mobile-carousel-pagination{padding:4px 9px 2px;display:grid;place-items:center}
body.mobile-carousel-mode .mobile-carousel-dots{display:flex;gap:8px}
body.mobile-carousel-mode .mobile-carousel-dots button{width:8px;height:8px;padding:0;border:0;border-radius:50%;background:#aebed0;transition:width .18s,background .18s}
body.mobile-carousel-mode .mobile-carousel-dots button.is-active{width:23px;border-radius:99px;background:var(--orange)}
body.mobile-carousel-mode .mobile-carousel-pagination p{margin:8px 0 0;color:#60758b;font-size:10px}
body.mobile-carousel-mode .mobile-carousel-pagination p span{margin-left:4px;color:var(--blue);font-size:14px}

@media(max-width:350px){body.mobile-carousel-mode .mobile-carousel-heading{width:calc(100% - 14px)}body.mobile-carousel-mode .mobile-carousel-heading h2{font-size:22px}body.mobile-carousel-mode .courses[data-course-carousel]{padding-left:7px;padding-right:43px}body.mobile-carousel-mode .courses[data-course-carousel] :is(.course-card,.card){flex-basis:calc(100% - 44px);padding-inline:13px}body.mobile-carousel-mode .courses[data-course-carousel] :is(.course-card h2,.card h2){font-size:21px}}
@media(prefers-reduced-motion:reduce){body.mobile-carousel-mode .courses[data-course-carousel]{scroll-behavior:auto}body.mobile-carousel-mode .courses[data-course-carousel] :is(.course-card,.card),body.mobile-carousel-mode .mobile-carousel-dots button{transition:none}}

/* Current mobile direction: text-led cards without course illustrations */
body.mobile-carousel-mode .courses[data-course-carousel] :is(.icon-wrap,.icon){display:none}
body.mobile-carousel-mode .courses[data-course-carousel] :is(.audience,.card>small){margin-top:0;font-size:10px;letter-spacing:.065em}

/* Refined mobile labels, guidance and benefit copy */
body.mobile-carousel-mode .courses[data-course-carousel] :is(.audience,.card>small){display:flex;align-items:center;justify-content:center;gap:6px}
body.mobile-carousel-mode .courses[data-course-carousel] :is(.audience,.card>small):before{content:"";width:7px;height:7px;flex:0 0 7px;border-radius:50%;background:var(--accent)}
body.mobile-carousel-mode .mobile-course-benefits li{color:#172b40;font-weight:600}
body.mobile-carousel-mode .mobile-carousel-heading{position:relative;justify-content:flex-end;min-height:34px}
body.mobile-carousel-mode .mobile-carousel-heading>div:first-child{position:absolute;left:0;width:calc(100% - 89px);text-align:center}
body.mobile-carousel-mode .mobile-carousel-heading>div:first-child{top:0;height:34px;display:flex;align-items:center;justify-content:center}

/* Compact above-the-fold mobile card treatment */
body.mobile-carousel-mode .courses[data-course-carousel]{padding-top:2px;padding-bottom:5px}
body.mobile-carousel-mode .courses[data-course-carousel] :is(.course-card,.card){padding:12px 14px 6px}
body.mobile-carousel-mode .courses[data-course-carousel] :is(.audience,.card>small){margin:0 0 5px;padding-bottom:6px}
body.mobile-carousel-mode .courses[data-course-carousel] :is(.course-card h2,.card h2){margin:2px 0 4px;font-size:21px}
body.mobile-carousel-mode .course-companion{margin:0 auto 2px;padding:5px 9px;font-size:9px}
body.mobile-carousel-mode .courses[data-course-carousel] :is(.course-card,.card) .price{margin:3px 0 8px;font-size:24px}
body.mobile-carousel-mode .mobile-course-benefits{margin-bottom:8px;padding-top:9px;gap:6px}
body.mobile-carousel-mode .mobile-course-benefits li{gap:7px;font-size:10px;line-height:1.25}
body.mobile-carousel-mode .mobile-course-benefits b{width:17px;height:17px;font-size:9px}
body.mobile-carousel-mode .courses[data-course-carousel] .card-actions{gap:3px}
body.mobile-carousel-mode .courses[data-course-carousel] .card-actions .register{height:39px}
body.mobile-carousel-mode .courses[data-course-carousel] .card-actions .more-info{height:29px;color:var(--blue);font-size:12px}
body.mobile-carousel-mode .mobile-carousel-pagination{padding-top:1px;padding-bottom:0}
/* Swapped mobile course-card action sizes */
body.mobile-carousel-mode .courses[data-course-carousel] .card-actions .register{font-size:12px}
body.mobile-carousel-mode .courses[data-course-carousel] .card-actions .more-info{font-size:10px}

/* Mobile split title-and-price layout */
body.mobile-carousel-mode .courses[data-course-carousel] :is(.course-card,.card){
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
}
body.mobile-carousel-mode .courses[data-course-carousel] .course-recommendation-ribbon,
body.mobile-carousel-mode .courses[data-course-carousel] :is(.audience,.card>small),
body.mobile-carousel-mode .courses[data-course-carousel] .mobile-course-benefits,
body.mobile-carousel-mode .courses[data-course-carousel] .card-actions{grid-column:1/-1;width:100%}
body.mobile-carousel-mode .courses[data-course-carousel] :is(.course-card h2,.card h2){
  grid-column:1;
  width:100%;
  margin:6px 0 8px;
  text-align:left;
}
body.mobile-carousel-mode .courses[data-course-carousel] :is(.course-card,.card) .price{
  grid-column:2;
  width:auto;
  min-width:92px;
  margin:6px 0 8px 12px;
  text-align:right;
}
body.mobile-carousel-mode .courses[data-course-carousel] .mobile-course-benefits{
  min-height:190px;
  padding-bottom:28px;
  align-content:start;
  gap:10px;
}
body.mobile-carousel-mode .courses[data-course-carousel] .course-recommendation-ribbon{
  position:relative;
  left:-14px;
  width:calc(100% + 28px);
  max-width:none;
  justify-self:start;
  margin:-12px 0 9px;
}

/* Floating recommendation pill and descriptive summary rows */
body.mobile-carousel-mode .courses[data-course-carousel]{padding-top:21px}
body.mobile-carousel-mode .courses[data-course-carousel] :is(.permit-prep,.permit){position:relative}
body.mobile-carousel-mode .courses[data-course-carousel] .course-recommendation-ribbon{
  position:absolute;
  z-index:2;
  top:0;
  left:50%;
  width:max-content;
  max-width:calc(100% - 24px);
  margin:0;
  padding:7px 14px;
  transform:translate(-50%,-50%);
  border-radius:999px;
  background:var(--blue);
  color:#fff;
  white-space:nowrap;
}
body.mobile-carousel-mode .courses[data-course-carousel] :is(.audience,.card>small){order:1}
body.mobile-carousel-mode .courses[data-course-carousel] :is(.course-card h2,.card h2){order:2}
body.mobile-carousel-mode .courses[data-course-carousel] :is(.course-card,.card) .price{order:2}
body.mobile-carousel-mode .courses[data-course-carousel] .description{
  order:3;
  grid-column:1/-1;
  display:block;
  width:100%;
  max-width:none;
  min-height:0;
  margin:0 0 10px;
  padding:10px 2px;
  border-top:1px solid #b8d4ed;
  border-bottom:1px solid #b8d4ed;
  color:#172b40;
  font-size:11px;
  font-weight:600;
  line-height:1.4;
  text-align:left;
}
body.mobile-carousel-mode .courses[data-course-carousel] .description-highlight{
  padding:0 2px;
  background:linear-gradient(transparent 18%,color-mix(in srgb,var(--accent) 20%,#fff) 18%,color-mix(in srgb,var(--accent) 20%,#fff) 88%,transparent 88%);
  color:inherit;
  -webkit-box-decoration-break:clone;
  box-decoration-break:clone;
}
body.mobile-carousel-mode .courses[data-course-carousel] .mobile-course-benefits{
  order:4;
  padding-top:0;
  border-top:0;
}
body.mobile-carousel-mode .courses[data-course-carousel] .card-actions{order:5}

/* More polished mobile proportions and hierarchy */
body.mobile-carousel-mode .courses[data-course-carousel] :is(.course-card,.card){
  padding-left:16px;
  padding-right:16px;
  border-radius:18px;
  box-shadow:0 12px 28px #173e6817;
}
body.mobile-carousel-mode .courses[data-course-carousel] :is(.course-card,.card).is-mobile-active{box-shadow:0 15px 32px #173e6824}
body.mobile-carousel-mode .courses[data-course-carousel] .course-recommendation-ribbon{top:-6px}
body.mobile-carousel-mode .courses[data-course-carousel] :is(.course-card,.card) .price{
  min-width:92px;
  margin-left:8px;
  padding:7px 2px;
  border-radius:10px;
  background:#eef7ff;
}
body.mobile-carousel-mode .courses[data-course-carousel] .mobile-course-benefits{
  min-height:170px;
  padding-bottom:14px;
  gap:9px;
}
body.mobile-carousel-mode .mobile-course-benefits li{gap:8px;font-size:11px;line-height:1.35}
body.mobile-carousel-mode .mobile-course-benefits b{width:20px;height:20px;font-size:10px}

/* Final mobile course audience-label size */
body.mobile-carousel-mode .courses[data-course-carousel] :is(.audience,.card>small){font-size:12px}

/* Center the swipe prompt to the page and keep both controls beside it. */
body.mobile-carousel-mode .mobile-carousel-heading{
  width:100%;
  min-height:0;
  margin:2px 0 2px;
  display:grid;
  grid-template-columns:minmax(76px,1fr) auto minmax(76px,1fr);
  grid-template-rows:34px auto;
  column-gap:0;
  align-items:center;
}
body.mobile-carousel-mode .mobile-carousel-heading>div:first-child{
  position:static;
  grid-column:2;
  grid-row:1;
  width:auto;
  height:auto;
  text-align:center;
}
body.mobile-carousel-mode .mobile-carousel-heading h2:after{content:"Swipe to explore courses"}
body.mobile-carousel-mode .mobile-carousel-controls{
  grid-column:3;
  grid-row:1;
  justify-self:start;
  margin-left:8px;
}
body.mobile-carousel-mode .carousel-returning-student{
  grid-column:1/-1;
  grid-row:2;
  width:auto;
  margin:2px 0 1px;
  color:#52677a;
  font-size:11px;
  font-weight:650;
  line-height:1.3;
  letter-spacing:0;
  text-align:center;
  text-transform:none;
}
body.mobile-carousel-mode .carousel-returning-student a{color:var(--orange);font-weight:900}
@media(max-height:700px){
  body.mobile-carousel-mode .mobile-carousel-heading{margin-top:0;margin-bottom:0}
}
@media(max-width:350px){
  body.mobile-carousel-mode .mobile-carousel-heading{grid-template-columns:minmax(74px,1fr) auto minmax(74px,1fr)}
  body.mobile-carousel-mode .mobile-carousel-heading h2:after{font-size:13px}
  body.mobile-carousel-mode .mobile-carousel-controls{margin-left:4px}
}

/* Simple, high-contrast mobile carousel arrows */
body.mobile-carousel-mode .mobile-carousel-controls{gap:3px}
body.mobile-carousel-mode .mobile-carousel-controls button{
  width:27px;
  height:34px;
  border:0;
  border-radius:0;
  background:transparent;
  color:#111526;
  font-size:23px;
  font-weight:950;
  line-height:1;
}
body.mobile-carousel-mode .mobile-carousel-heading .carousel-returning-student{font-size:12px}

/* Place returning-student access below the cards and use light chevrons above. */
body.mobile-carousel-mode .mobile-carousel-heading{
  grid-template-rows:34px;
  margin-top:7px!important;
}
body.mobile-carousel-mode .mobile-carousel-controls button{
  width:23px;
  font-size:27px;
}
body.mobile-carousel-mode .mobile-carousel-pagination .carousel-returning-student{
  display:block;
  width:auto;
  margin:8px 0 1px;
  color:#111526;
  font-size:12px;
  font-weight:650;
  line-height:1.3;
  letter-spacing:0;
  text-align:center;
  text-transform:none;
}
body.mobile-carousel-mode .mobile-carousel-pagination .carousel-returning-student a{
  color:var(--orange);
  font-weight:950;
}

/* Detached rounded-square navigation tabs */
body.mobile-carousel-mode .mobile-carousel-heading{
  grid-template-columns:1fr;
  margin-top:14px!important;
}
body.mobile-carousel-mode .mobile-carousel-heading>div:first-child{
  grid-column:1;
}
body.mobile-carousel-mode .courses[data-course-carousel]{
  padding-left:48px;
  padding-right:48px;
  gap:96px;
}
body.mobile-carousel-mode .courses[data-course-carousel] :is(.course-card,.card){
  flex-basis:100%;
}
body.mobile-carousel-mode .mobile-carousel-window>.mobile-carousel-controls{
  position:absolute;
  z-index:6;
  inset:0;
  width:auto;
  display:block;
  margin:0;
  justify-self:stretch;
  pointer-events:none;
}
body.mobile-carousel-mode .mobile-carousel-window>.mobile-carousel-controls button{
  position:absolute;
  top:48%;
  width:36px;
  height:50px;
  padding:0;
  display:grid;
  place-items:center;
  transform:translateY(-50%);
  border:1px solid #bfd3e4;
  border-radius:11px;
  background:#fff;
  color:var(--navy);
  font-size:30px;
  font-weight:900;
  line-height:1;
  box-shadow:0 7px 16px #173e6824;
  pointer-events:auto;
}
body.mobile-carousel-mode .mobile-carousel-window>.mobile-carousel-controls [data-carousel-previous]{left:6px}
body.mobile-carousel-mode .mobile-carousel-window>.mobile-carousel-controls [data-carousel-next]{right:6px}
body.mobile-carousel-mode .mobile-carousel-pagination .carousel-returning-student{margin-top:18px}
@media(max-width:350px){
  body.mobile-carousel-mode .courses[data-course-carousel]{padding-left:36px;padding-right:36px;gap:72px}
  body.mobile-carousel-mode .mobile-carousel-window>.mobile-carousel-controls button{width:30px;height:46px}
  body.mobile-carousel-mode .mobile-carousel-window>.mobile-carousel-controls [data-carousel-previous]{left:1px}
  body.mobile-carousel-mode .mobile-carousel-window>.mobile-carousel-controls [data-carousel-next]{right:1px}
}

/* Restore the recommendation pill above the permit-prep card. */
body.mobile-carousel-mode .courses[data-course-carousel]{padding-top:11px}
body.mobile-carousel-mode .courses[data-course-carousel] :is(.card.permit,.course-card.permit-prep)>.course-recommendation-ribbon{
  position:absolute;
  z-index:2;
  top:5px;
  left:50%;
  width:max-content;
  max-width:calc(100% - 24px);
  margin:0;
  padding:7px 14px;
  display:block;
  transform:translate(-50%,-50%);
  border-radius:999px;
  background:var(--blue);
  color:#fff;
  font-size:9px;
  line-height:1.2;
  letter-spacing:.04em;
  text-align:center;
  text-transform:uppercase;
  white-space:nowrap;
}
/* Four pixels lower than the earlier top-pill layout. */
body.mobile-carousel-mode .mobile-carousel-heading{margin-top:18px!important}
body.mobile-carousel-mode .mobile-carousel-pagination .carousel-returning-student{font-size:13px}

/* Integrate most of the pill into the permit card while keeping its actions fixed. */
body.mobile-carousel-mode .courses[data-course-carousel] :is(.card.permit,.course-card.permit-prep)>small,
body.mobile-carousel-mode .courses[data-course-carousel] :is(.card.permit,.course-card.permit-prep) :is(.audience,h2,.price,.description,.mobile-course-benefits){
  transform:translateY(12px);
}
body.mobile-carousel-mode .courses[data-course-carousel] :is(.card.permit,.course-card.permit-prep) .mobile-course-benefits{min-height:158px}

/* Lower only the swipe prompt, using the existing space beneath it. */
body.mobile-carousel-mode .mobile-carousel-heading h2{transform:translateY(10px)}
