/* Give comparable cards the same action baseline as their copy wraps. */
#root.mm-system #academy .home-houses .home-house-link > div > p:last-of-type {
  margin-block-end: 18px;
}

#root.mm-system #academy .home-houses .home-house-link .home-link {
  margin-block-start: auto;
}

#root.mm-system :is(.mm-grad-formats, .mm-season-routes) {
  align-items: stretch;
}

/* The base button reset sets margin with !important. Restore the flex spacer
   only for buttons that are the final action in these card grids. */
#root.mm-system :is(.mm-grad-formats, .mm-season-routes) > article > .home-button:last-child,
#root.mm-system .mm-r28-group-grid.mm-r28-choices > article > div > .home-button:last-child {
  max-width: 100%;
  margin-block-start: auto !important;
  white-space: normal;
  text-align: center;
}

#root.mm-system .p-two-worlds > article {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

#root.mm-system .p-two-worlds > article > p:last-of-type {
  margin-block-end: 16px;
}

#root.mm-system .p-two-worlds > article > .home-link:last-child {
  align-self: flex-start;
  margin-block-start: auto;
}

/* The featured tile spans two smaller tiles. Align its link with the lower
   tile while keeping that composition on wider screens. */
#root.mm-system .home-return-feature {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

#root.mm-system .home-return-feature > div {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: flex-start;
}

#root.mm-system .home-return-feature > div > p:last-of-type {
  margin-block-end: 16px;
}

#root.mm-system .home-return-feature > div > .home-link {
  margin-block-start: auto;
}

#root.mm-system [data-mm-state-grid] .mm-state-copy .home-actions > .home-link {
  margin-block: 0;
}
