/* Muted sage grade cards, retaining their five distinct landscapes. */
:root body.school-page main {
  background-color: #fbfaf5;
}
:root body.school-page .school-hero::after {
  background-color: #fbfaf5;
}
:root body.school-page .school-class {
  background: #fff;
  border-color: #889d79;
  box-shadow: 0 5px 16px #263d2412;
}
:root body.school-page .school-class::after {
  opacity: 1;
  background-image: url('/assets/images/school-landscapes-color-v277.webp');
  filter: none;
  mix-blend-mode: multiply;
}
:root body.school-page .school-class small {
  color: #304d32;
}
:root body.school-page .school-class-icon {
  color: #245c32;
}
:root body.school-page .school-class:hover {
  border-color: #536d47;
  box-shadow: 0 6px 18px #263d2424;
}
:root body.school-page .school-class.is-active::after {
  opacity: .2;
}
:root body.school-page :is(.school-benefits, .school-documents, .school-offer-v145) {
  background-color: #eef7e3;
  border-color: #acc68e;
}
:root body.school-page .school-reward-hook-icon {
  background-color: #e0efc3;
}
/* Let the body fill each card so metadata and actions share a baseline. */
:root body.school-page .school-tour-card {
  display: flex;
  flex-direction: column;
}
:root body.school-page .school-card-image {
  flex: none;
}
:root body.school-page .school-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
}
:root body.school-page .school-card-meta {
  margin-top: auto;
}
/* Share all four text rows, including variable-length CMS and future tour content. */
@supports (grid-template-rows: subgrid) {
  :root body.school-page .school-tour-card {
    display: grid;
    grid-row: span 5;
    grid-template-rows: subgrid;
    row-gap: 0;
  }
  :root body.school-page .school-card-body {
    display: grid;
    grid-row: span 4;
    grid-template-rows: subgrid;
    row-gap: 0;
  }
  :root body.school-page .school-card-meta {
    align-self: start;
    margin-top: 0;
  }
}

/* A selected grade receives a light tint while its landscape remains visible. */
:root body.school-page .school-class.is-active {
  background: #edf2e9 !important;
  border-color: #66845a !important;
  color: #172f20 !important;
  box-shadow: inset 0 0 0 1px #66845a33;
}
:root body.school-page .school-class.is-active small {
  color: #304d32 !important;
}
:root body.school-page .school-class.is-active .school-class-icon {
  color: #245c32;
}
:root body.school-page .school-class.is-active::after {
  opacity: 1;
}

/* Reserve space below mobile copy for the landscape, and beside it for the arrow. */
@media (max-width: 760px) {
  :root body.school-page .school-class {
    padding-bottom: 42px !important;
  }
  :root body.school-page .school-class::after {
    inset: auto 0 0;
    height: 76px;
  }
  :root body.school-page .school-class-groups {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) 32px;
    align-items: start;
    gap: 10px;
    padding: 15px 12px 42px !important;
  }
  :root body.school-page .school-class-groups > span:nth-child(2) {
    min-width: 0;
  }
  :root body.school-page .school-class-groups > .school-class-arrow {
    position: relative;
    inset: auto;
    align-self: center;
    width: 32px;
    height: 32px;
  }
}

/* Give the description the full card width on narrow phones. */
@media (max-width: 380px) {
  :root body.school-page .school-class:not(.school-class-groups) {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 14px 12px 42px !important;
    min-height: 164px !important;
  }
  :root body.school-page .school-class:not(.school-class-groups) > span:nth-child(2) {
    width: 100%;
    min-width: 0;
  }
  :root body.school-page .school-class-icon {
    flex-basis: auto;
    width: 29px;
  }
}


