/* Course-category sub-links under "Courses" in the mega menu and the footer. Transform/opacity only. */
.ha-mega__col li.is-sub > a,
.ha-foot__col li.is-sub > a {
    position: relative;
    padding-inline-start: 1.1rem;
    font-size: .84rem;
    line-height: 1.45;
    opacity: .86;
}
.ha-mega__col li.is-sub > a::before,
.ha-foot__col li.is-sub > a::before {
    content: "";
    position: absolute; inset-inline-start: .3rem; top: 50%;
    width: .38rem; height: .38rem; margin-top: -.19rem;
    border-radius: 50%;
    background: var(--altus-gold-on-dark, #E58A5E);
}
.ha-mega__col li.is-sub > a:hover,
.ha-foot__col li.is-sub > a:hover,
.ha-mega__col li.is-sub > a:focus-visible,
.ha-foot__col li.is-sub > a:focus-visible { opacity: 1; }
.ha-foot__col li.is-sub > a:focus-visible { outline: 2px solid var(--altus-gold-on-dark, #E58A5E); outline-offset: 2px; }
.ha-foot__col li.is-sub > a:active { opacity: .7; }
/* Sub-links are tighter than top-level links so a long department list (SOP resources) stays compact,
   and a tall panel scrolls inside the viewport instead of running off the bottom of a laptop screen. */
.ha-mast__nav .ha-mega__col li.is-sub > a { min-height: 30px; }
/* SOP column: "SOP resources" and "Documents & resources" span the full width, the departments sit in two
   columns, then the remaining top-level links span again. Everything is visible at once, no scrolling. */
.ha-mast__nav .ha-mega__panel .ha-mega__col--sop ul { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 1rem; }
.ha-mast__nav .ha-mega__panel .ha-mega__col--sop li { grid-column: 1 / -1; }
.ha-mast__nav .ha-mega__panel .ha-mega__col--sop li.is-sub { grid-column: auto; }
.ha-mast__nav .ha-mega__panel .ha-mega__col--sop li.is-sub:first-of-type,
.ha-mast__nav .ha-mega__panel .ha-mega__col--sop li:nth-child(2).is-sub { grid-column: 1 / -1; }
@media (min-width: 1081px) {
    /* a wider Resources column; Learn keeps room for its longest label */
    .ha-mega__panel .ha-mega__inner { grid-template-columns: 1.1fr 1.3fr 2.2fr .75fr 1.55fr; padding-block: 2rem 2.1rem; }
    .ha-mega__panel .ha-mega__col { min-width: 0; }
    .ha-mast__nav .ha-mega__col li a { white-space: normal; overflow-wrap: anywhere; min-width: 0; }
}
@media (min-width: 1081px) and (max-width: 1279px) {
    .ha-mega__panel .ha-mega__inner { grid-template-columns: 1fr 1.25fr 1.8fr .75fr 1.55fr; gap: 1rem; }
    .ha-mast__nav .ha-mega__person { grid-template-columns: 48px minmax(0, 1fr); column-gap: .7rem; }
    .ha-mast__nav .ha-mega__face { width: 48px; height: 48px; min-width: 48px; }
    .ha-mast__nav .ha-mega__mail { display: block; font-size: .72rem; white-space: normal; word-break: break-all; }
    .ha-mast__nav .ha-mega__acts { display: flex; flex-wrap: wrap; gap: .35rem; }
    .ha-mast__nav .ha-mega__col--sop li.is-sub > a { font-size: .78rem; padding-inline-start: .95rem; }
    .ha-mega__text { font-size: .86rem; }
}
/* phones and tablets: the drawer keeps two columns where there is room, tap targets stay 40px+ */
@media (max-width: 1080px) {
    .ha-mast__nav .ha-mega__col li.is-sub > a { min-height: 40px; }
}
@media (max-width: 399px) {
    .ha-mast__nav .ha-mega__panel .ha-mega__col--sop ul { grid-template-columns: minmax(0, 1fr); }
}
/* safety net only for very short windows */
@media (min-width: 1081px) and (max-height: 620px) {
    .ha-mega__panel { max-height: calc(100vh - 90px); overflow-y: auto; overscroll-behavior: contain; }
}
/* Founder portraits: a fixed-size column so a global img { max-width: 100% } cannot squeeze the photo into a sliver. */
.ha-mast__nav .ha-mega__person { grid-template-columns: 56px minmax(0, 1fr); column-gap: .9rem; }
.ha-mast__nav .ha-mega__person > div { min-width: 0; }
.ha-mast__nav .ha-mega__face, .ha-mega__face { width: 56px; height: 56px; min-width: 56px; max-width: none; aspect-ratio: 1 / 1; object-fit: cover; object-position: center 18%; }
.ha-foot__face { min-width: 56px; max-width: none; aspect-ratio: 1 / 1; }
.ha-mast__nav .ha-mega__mail, .ha-mega__phone { overflow-wrap: anywhere; }
/* Course page: view-only source documents */
.ha-source-docs { list-style: none; margin: .75rem 0 0; padding: 0; display: grid; gap: .6rem; }
.ha-source-docs li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1rem; padding: .8rem 1rem; border: 1px solid rgba(30, 35, 41, .12); border-radius: 12px; background: #fff;
  box-shadow: 0 1px 2px rgba(30, 35, 41, .04), 0 10px 22px -16px rgba(196, 91, 47, .3); }
.ha-source-docs__name { font-weight: 600; }
.ha-source-docs__name small { margin-inline-start: .4rem; padding: .1rem .45rem; border-radius: 999px; background: rgba(30, 35, 41, .08); font-size: .68rem; letter-spacing: .06em; font-weight: 700; }
.ha-source-docs__note { margin: .6rem 0 0; color: #5b6470; font-size: .86rem; }
.ha-source-docs__note a { color: #23413a; }
.ha-source-docs__note a:hover { color: #c45b2f; }
.ha-source-docs__note a:focus-visible { outline: 2px solid #c45b2f; outline-offset: 2px; }
/* "Procedures for these teams" links on a course category page */
.ha-cats__sop { list-style: none; margin: .9rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .55rem; }
.ha-cats__sop a { display: inline-block; padding: .45rem .9rem; border: 1px solid rgba(30, 35, 41, .16); border-radius: 999px; color: inherit; text-decoration: none; font-size: .9rem; }
.ha-cats__sop a:hover { border-color: #c45b2f; color: #c45b2f; }
.ha-cats__sop a:focus-visible { outline: 2px solid #c45b2f; outline-offset: 2px; }
.ha-cats__sop a:active { transform: scale(.97); }
/* the category pill on a course page is now a link */
a.ha-pill { text-decoration: none; }
a.ha-pill:hover { opacity: .88; }
a.ha-pill:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
