.pension-cards {
  --gap: 1.5rem;
  --visible: 3;              /* number of full cards in view */
  container-type: inline-size;
}

/* The track runs past the right edge of the content area to the edge
   of the screen, so the next card peeks in from the right. */
.pension-cards__track {
  display: flex;
  gap: var(--gap);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  margin-right: calc(50% - 50vw);
  scrollbar-width: none;     /* hide scrollbar: Firefox */
}

.pension-cards__track::-webkit-scrollbar {
  display: none;             /* hide scrollbar: Chrome, Safari, Edge */
}

.pension-cards__track:focus-visible {
  outline: 3px solid #2e86de;
  outline-offset: 4px;
}

.pension-card {
  flex: 0 0 calc((100cqw - (var(--visible) - 1) * var(--gap)) / var(--visible));
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 1px 8px 0 rgba(0, 0, 0, 0.1);
  border: solid 1px #e5e5e5;
}

.pension-card__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2rem;
  padding: 2.5rem 2rem 2.5rem 2rem;
  text-align: left;
}

.pension-card__logo {
  display: block;
  max-width: 160px;
  max-height: 64px;
  width: auto;
  height: auto;
}

.pension-card__title {
  margin: 0;
  font-size: 32px;
  font-weight: 500;
  line-height: 1.25;
  color: #242935;
}

.pension-card__title a {
  color: inherit;
  text-decoration: none;
}

.pension-card__description {
  font-size: 18px;
  font-weight: 300;
  line-height: 1.56;
  color: #242935;
}

.pension-card__overview {
  font-size: 18px;
  font-weight: 500;
  line-height: 1.67;
  letter-spacing: -0.5px;
  color: #7e61de;
  border-bottom: 2px solid #a4d0c4;
}

.pension-card__overview:hover {
  text-decoration: none;
}

.pension-cards__controls {
  display: flex;
  width: fit-content;
  padding: 0.25rem 0.5rem;
  border: 1px solid #333;
  border-radius: 999px;
}

.pension-cards__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #333;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.pension-cards__btn:hover:not(:disabled) {
  color: #2e86de;
}

.pension-cards__btn:focus-visible {
  outline: 2px solid #2e86de;
  outline-offset: 1px;
}

.pension-cards__btn:disabled {
  opacity: 0.3;
  cursor: default;
}

.pension-cards__bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  margin-top: 1.5rem;
}

.pension-cards__tracker {
  grid-column: 2;
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.pension-cards__controls {
  grid-column: 3;
  justify-self: end;
}

.pension-cards__dash {
  padding: 0.75rem 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.pension-cards__dash::before {
  content: "";
  display: block;
  width: 0.75rem;
  height: 3px;
  border-radius: 2px;
  background: #9a9aa0;
  transition: width 0.25s ease, background-color 0.25s ease;
}

.pension-cards__dash.is-active::before {
  width: 1.75rem;
  background: #1f2233;
}

.pension-cards__dash:focus-visible {
  outline: 2px solid #2e86de;
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .pension-cards__dash::before {
    transition: none;
  }
}

.pension-cards__track::after {
  content: "";
  flex: 0 0 max(0px, calc(50vw - 50cqw - var(--gap)));
}

@media (max-width: 992px) {
  .pension-cards { --visible: 2; }
}

@media (max-width: 768px) {
  .pension-cards { --visible: 1; }
}

/* Footer: holds the member-services button at the bottom of the card */
.pension-card__footer {
  margin-top: auto;
  padding: 0 2rem 2rem;
}

.pension-card__footer-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.875rem 1.5rem;
  border-radius: 999px;
  background: #edf1fe;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  color: #7e61de;
  text-align: center;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.pension-card__footer-link:hover {
  background: #7e61de;
  color: #fff;
  text-decoration: none;
}

.pension-card__footer-link:focus-visible {
  outline: 2px solid #2e86de;
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .pension-card__footer-link {
    transition: none;
  }
}