.mascot-journey {
  container: mascot-journey / inline-size;
  width: 100%;
  max-width: 1000px;
  margin: 34px 0;
  padding: 24px;
  border: 1px solid #d7e6e9;
  border-radius: 22px;
  background: linear-gradient(145deg, #fff 0%, #f5faf9 100%);
  box-shadow: 0 12px 34px #173c590d;
}

.mascot-journey-head {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(240px, .65fr);
  gap: 24px;
  align-items: end;
  margin-bottom: 20px;
}

.mascot-journey-head h2 {
  margin: 5px 0 0;
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  line-height: 1.15;
  color: #173c59;
}

.mascot-journey-head p {
  margin: 0;
  color: #627d88;
  font-size: .9rem;
  line-height: 1.55;
}

.mascot-journey-steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mascot-journey-steps::before {
  content: "";
  position: absolute;
  left: 12.5%;
  right: 12.5%;
  top: 70px;
  height: 1px;
  background: #c8dcdf;
}

.mascot-journey-steps li {
  position: relative;
  min-width: 0;
  display: flex;
}

.mascot-journey-steps button {
  width: 100%;
  height: 100%;
  min-height: 326px;
  border: 1px solid #dce9eb;
  border-radius: 17px;
  padding: 18px 16px 16px;
  background: #fff;
  color: #173c59;
  text-align: center;
  display: grid;
  grid-template-rows: 104px minmax(0, 1fr);
  justify-items: center;
  align-items: start;
  gap: 14px;
  box-shadow: 0 5px 16px #173c5908;
}

.mascot-journey-steps button:hover,
.mascot-journey-steps button:focus-visible {
  border-color: #79bcc0;
  box-shadow: 0 12px 26px #173c5914;
  transform: translateY(-2px);
  outline: none;
}

.mascot-journey-steps button:focus-visible {
  box-shadow: 0 0 0 3px #bfe6e4, 0 12px 26px #173c5914;
}

.mascot-journey-steps img {
  position: relative;
  z-index: 1;
  display: block;
  width: 104px;
  height: 104px;
  flex: 0 0 auto;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  border: 3px solid #fff;
  box-shadow: 0 0 0 1px #c8dcdf, 0 8px 20px #173c5920;
  background: #eaf4f3;
}

.mascot-step-copy {
  display: grid;
  grid-template-rows: auto minmax(2.5em, auto) minmax(4.35em, 1fr) auto;
  min-width: 0;
  width: 100%;
  height: 100%;
  flex: 1;
  justify-items: center;
  align-items: start;
  gap: 7px;
}

.mascot-step-copy small {
  font-size: .65rem;
  font-weight: 850;
  letter-spacing: .1em;
  color: #188d94;
  line-height: 1.25;
}

.mascot-step-copy strong {
  font: 800 .98rem/1.25 Manrope, sans-serif;
  color: #173c59;
  max-width: 17ch;
}

.mascot-step-copy > span {
  font-size: .79rem;
  line-height: 1.45;
  color: #657f8a;
  max-width: 24ch;
}

.mascot-step-copy em {
  align-self: end;
  width: 100%;
  min-height: 40px;
  padding: 10px 12px;
  border-radius: 11px;
  background: #edf7f6;
  font-size: .75rem;
  line-height: 1.25;
  font-style: normal;
  font-weight: 850;
  color: #176f80;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* The component can be narrow even on a wide viewport because of the sidebar. */
@container mascot-journey (max-width: 820px) {
  .mascot-journey-head {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .mascot-journey-head p {
    max-width: 600px;
  }

  .mascot-journey-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .mascot-journey-steps::before {
    display: none;
  }

  .mascot-journey-steps li {
    display: flex;
  }

  .mascot-journey-steps button {
    min-height: 178px;
    height: auto;
    padding: 15px;
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    grid-template-rows: 1fr;
    gap: 13px;
    align-items: start;
    text-align: left;
  }

  .mascot-journey-steps img {
    width: 64px;
    height: 64px;
  }

  .mascot-step-copy {
    height: 100%;
    justify-items: start;
  }

  .mascot-step-copy em {
    justify-content: flex-start;
    text-align: left;
  }
}

@container mascot-journey (max-width: 540px) {
  .mascot-journey-steps {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .mascot-journey-steps button {
    min-height: 0;
    grid-template-columns: 54px minmax(0, 1fr);
    padding: 13px;
  }

  .mascot-journey-steps img {
    width: 54px;
    height: 54px;
  }

  .mascot-step-copy em {
    margin-top: 4px;
    padding-top: 0;
  }
}

/* Viewport fallbacks for browsers without container-query support. */
@supports not (container-type: inline-size) {
  @media (max-width: 1180px) {
    .mascot-journey-head { grid-template-columns: 1fr; gap: 8px; }
    .mascot-journey-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .mascot-journey-steps::before { display: none; }
    .mascot-journey-steps button { min-height: 178px; height: auto; display: grid; grid-template-columns: 64px minmax(0, 1fr); grid-template-rows: 1fr; gap: 13px; align-items: start; text-align: left; }
    .mascot-journey-steps img { width: 64px; height: 64px; }
    .mascot-step-copy { justify-items: start; }
    .mascot-step-copy em { justify-content: flex-start; text-align: left; }
  }
}

@media (max-width: 850px) {
  .mascot-journey {
    padding: 20px;
  }
}

@media (max-width: 570px) {
  .mascot-journey {
    margin: 26px 0;
    padding: 16px;
    border-radius: 18px;
  }

  .mascot-journey-head {
    margin-bottom: 15px;
  }

  .mascot-journey-head p {
    font-size: .82rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mascot-journey-steps button {
    transition: none;
  }
}
