.exam-catalog {
  color: var(--navy);
  background: #f4f7f5;
  min-height: 60vh;
  border-bottom: 1px solid #d7e2de;
}
.course-catalog-page .mast-inner {
  min-height: 4rem;
  width: min(100% - 3rem, 82.5rem);
}
.course-catalog-page .brand img { width: 9.15rem; }
.catalog-layout {
  display: grid;
  grid-template-columns: clamp(13rem,17vw,15.3rem) minmax(0,1fr);
  gap: clamp(1.2rem,2.1vw,2rem);
  width: min(100% - 3rem, 82.5rem);
  margin-inline: auto;
  padding: 1.5rem 0 2.5rem;
  align-items: start;
}
.catalog-sidebar { min-width: 0; }
.catalog-sidebar h1 {
  margin-bottom: 1rem;
  font-size: clamp(1.7rem,2.1vw,2rem);
}
.exam-choice:hover { text-decoration: underline; }
.exam-list { padding-top: 1.4rem; }
.exam-list h2 {
  display: flex;
  gap: .65rem;
  align-items: center;
  margin: 0 0 .55rem;
  font: 700 1rem/1.4 "DM Sans", sans-serif;
  letter-spacing: 0;
}
.exam-list h2::before {
  content: "";
  width: .48rem;
  height: .48rem;
  background: var(--orange);
  border-radius: 50%;
}
.course-choices { display: grid; gap: .25rem; }
.work-life-list h2::before { background: #cf9009; }
.steam-list h2::before, .steam-list .exam-choice[aria-current] { background: #31405a; }
.exam-choice {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .42rem .65rem;
  color: var(--navy);
  text-decoration: none;
  font-weight: 700;
  line-height: 1.4;
  border-radius: .3rem;
}
.exam-choice[aria-current] { background: var(--orange); color: white; }
.work-life-list .exam-choice[aria-current] { background: #cf9009; color: #172938; }
.tutoring-list h2::before { display: none; }
.tutoring-list .tutoring-choice { width: 100%; }
.tutoring-choice small { display: block; font-size: .8rem; font-weight: 500; }
.tutoring-list .exam-choice[aria-current] { background: #b9dcd5; color: #093b49; }
.exam-list[hidden], .exam-choice[hidden] { display: none; }
.exam-choice img { width: 2.15rem; height: 2.15rem; }
.flagship-choice-label { display: grid; justify-items: start; gap: .15rem; }
.course-distinction {
  padding: .14rem .45rem;
  border-radius: .22rem;
  background: #ffe4ab;
  color: #4a3515;
  font-size: .72rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: .035em;
}
.catalog-panel { min-width: 0; }
.catalog-notice {
  border: 1px solid #cedbd7;
  border-radius: .7rem;
  background: white;
  padding: clamp(1.4rem,4vw,3.5rem);
}
.catalog-notice h2 { font-size: clamp(1.65rem,3.1vw,2.6rem); }
.catalog-notice p { margin-top: .9rem; max-width: 40rem; }
.catalog-notice .actions { margin-top: 1.3rem; }
.catalog-next { display: none; }
.mobile-course-nav { display: none; }
.catalog-picker-open { overflow: hidden; }
#mobile-catalog-dialog {
  position: fixed;
  inset: auto 0 0;
  margin: 0 auto;
  padding: 0;
  width: min(100%, 42rem);
  max-width: 100%;
  max-height: 88vh;
  max-height: 88dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 0;
  border-radius: 1.3rem 1.3rem 0 0;
  background: white;
  color: var(--navy);
  box-shadow: 0 -.4rem 2rem #17293826;
}
#mobile-catalog-dialog::backdrop { background: rgb(12 30 43 / 47%); }
.mobile-sheet-inner {
  padding: .65rem clamp(1rem, 4vw, 1.5rem) max(1.4rem, env(safe-area-inset-bottom));
}
.mobile-sheet-inner::before {
  content: "";
  display: block;
  width: 2.6rem;
  height: .27rem;
  margin: 0 auto .65rem;
  border-radius: 1rem;
  background: #aab9b8;
}
.mobile-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.mobile-sheet-head h2 { font-size: 1.5rem; line-height: 1.2; letter-spacing: -.04em; }
.mobile-sheet-close { display: grid; place-items: center; min-width: 2.75rem; min-height: 2.75rem; padding: .5rem; background: none; color: var(--navy); border: 0; cursor: pointer; }
.mobile-sheet-close svg, #mobile-browse-toggle svg { width: 1.25rem; height: 1.25rem; }
.picker-area { --area-color: var(--orange); --selection: #fff0e8; border-top: 1px solid #d7e2df; }
.picker-area:last-child { border-bottom: 1px solid #d7e2df; }
.picker-area[data-area="work-life"] { --area-color: #b57b02; --selection: #fff1c8; }
.picker-area[data-area="math-english"] { --area-color: #006272; }
.picker-area[data-area="tutoring"] { --area-color: #39796f; --selection: #dcefe9; }
.picker-area[data-area="steam"] { --area-color: #31405a; --selection: #e7edf3; }
.picker-area-heading, .picker-course {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .55rem .35rem;
  min-height: 3rem;
  color: var(--navy);
  font: 700 1rem/1.35 "DM Sans", sans-serif;
  text-decoration: none;
  cursor: pointer;
}
.picker-area-heading::before { content: ""; width: .65rem; height: .65rem; border-radius: 50%; flex: none; background: var(--area-color); }
.picker-area-heading::after, .picker-area[open] > .picker-area-heading::after {
  content: "";
  flex: none;
  margin-left: auto;
  margin-right: .3rem;
  width: .5rem;
  height: .5rem;
  border: solid currentColor;
  border-width: 0 2px 2px 0;
  transform: rotate(-45deg);
}
.picker-area[open] > .picker-area-heading::after { transform: rotate(45deg); }
.picker-courses { padding-bottom: .45rem; }
.picker-course { margin-left: 1.15rem; padding-inline: .7rem; min-height: 2.75rem; border-radius: .4rem; font-size: .96rem; }
.picker-course img { width: 1.6rem; height: 1.6rem; }
.picker-course[aria-current] { background: var(--selection); }
.picker-check { margin-left: auto; }
@media (max-width: 800px) {
  .catalog-layout {
    grid-template-columns: minmax(0,1fr);
    width: min(100% - 1.2rem, 42rem);
    gap: .7rem;
    padding: .75rem 0 1.2rem;
  }
  .catalog-sidebar { display: none; }
  .mobile-course-nav { display: block; }
  /* Keep the footer below the viewport until the selected card arrives. */
  #catalog-status { min-height: 100vh; min-height: 100svh; }
  .mobile-catalog-heading { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  #mobile-browse-toggle {
    display: flex; align-items: center; gap: .65rem;
    width: 100%; min-height: 2.9rem; padding: .45rem .8rem;
    border: 1px solid #c4d3cf; border-radius: .4rem;
    background: white; color: var(--navy); font: 700 1rem/1.35 "DM Sans", sans-serif;
    cursor: pointer;
  }
  #mobile-browse-toggle .browse-chevron { width: 1.1rem; margin-left: auto; }
  #mobile-browse-toggle:disabled { color: var(--muted); cursor: default; }
  .catalog-sidebar h1 { font-size: 1.2rem; margin: 0; }
  .exam-list { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem .65rem; grid-column: 1/-1; padding-top: 0; }
  .exam-list h2 { font-size: .88rem; margin: 0; gap: .4rem; }
  .catalog-course-groups { grid-column: 1/-1; display: grid; gap: .3rem; }
  .course-choices { display: flex; flex-wrap: wrap; gap: .33rem; }
  .exam-choice { font-size: .91rem; padding: .24rem .6rem; gap: .3rem; min-height: 2.5rem; }
  .exam-choice img { width: 1.5rem; height: 1.5rem; }
  .catalog-next { display: flex; width: max-content; max-width: 100%; align-items: center; gap: .5rem; margin: .75rem 0 0 auto; padding: .35rem; font-weight: 700; }
  .catalog-next img { width: 1.65rem; }
}
@media (max-width: 800px) and (scripting: none) {
  .mobile-course-nav, #catalog-status { display: none; }
  .catalog-sidebar { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: .55rem; }
}
@media (max-width: 720px) {
  .course-catalog-page .mast-inner { width: calc(100% - 2rem); min-height: 3.4rem; }
  .course-catalog-page .brand img { width: clamp(6.55rem,28vw,9rem); }
}
@media (max-width: 370px) {
  .catalog-sidebar h1 { font-size: 1.05rem; }
}
