/* Keep section navigation directly below the site's persistent header. */
:is(.section-nav, .chapter-nav)[data-mai-sticky-nav] {
  position: sticky;
  top: var(--mai-section-top, 0px) !important;
  z-index: 18;
}

[data-mai-sticky-nav] > :is(.navscroll, .ed-wrap) {
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
}

[data-mai-sticky-nav] > :is(.navscroll, .ed-wrap) a {
  flex-shrink: 0;
  white-space: nowrap;
}

@media (max-width: 780px) {
  [data-mai-sticky-nav] > :is(.navscroll, .ed-wrap) {
    justify-content: flex-start;
    scroll-padding-inline: 16px;
  }
}

[data-mai-certificate-frame],
img[data-mai-certificate-image],
dialog img[data-mai-certificate-image] {
  border: 0 !important;
  box-shadow: none !important;
}

:is(button, figure)[data-mai-certificate-frame] {
  background: transparent;
}

.program-art img[data-mai-certificate-image] {
  object-fit: contain;
}

/* The card stays the single link. Give its action a visible button surface. */
html body .program-cards > a[href],
html body .program-cards > a[href] :is(h4, p, span, i) {
  text-decoration: none !important;
}

html body .program-cards > a[href] > span:last-child {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-top: auto;
  padding: 8px 14px;
  border: 1px solid #203b46;
  border-radius: 4px;
  background: #203b46;
  color: #fffaf0;
  font-weight: 670;
  line-height: 1.35;
  text-decoration: none;
}

html body .program-cards > a[href]:first-child > span:last-child {
  border-color: #efd4a5;
  background: #efd4a5;
  color: #20343c;
}

html body .program-cards > a:is(:hover, :focus-visible) > span:last-child {
  text-decoration: none;
  box-shadow: inset 0 0 0 2px currentColor;
}

#ast-scroll-top[data-mai-buybar-clearance] {
  bottom: calc(var(--mai-buybar-clearance) + 12px) !important;
}
