.no-apply-now .page-nav-bar .container .item:has(a[href="#apply-now"]),
.no-apply-now .page-nav-bar .container .item:has(a[href$="#apply-now"]) {
  display: none;
}

/* Apply Now stays in the DOM as :last-child, so the previous item still gets a divider. */
.no-apply-now .page-nav-bar .container .item:has(+ .item a[href="#apply-now"])::after,
.no-apply-now .page-nav-bar .container .item:has(+ .item a[href$="#apply-now"])::after,
.no-apply-now .page-nav-bar .container .item:nth-last-child(2)::after {
  content: none;
  display: none;
  border-right: none;
  width: 0;
}

.no-apply-now p:has(> a.btn-dark-yellow-green[href*="ug.hku.hk/hku-applicant"]),
.no-apply-now p:has(> a.btn-dark-yellow[href*="ug.hku.hk/hku-applicant"]),
.no-apply-now p:has(> a.btn-primary[href*="ug.hku.hk/hku-applicant"]) {
  display: none;
}
