/* Companion stage path: strong, consistent guidance through all three levels. */
.tracker-app-section .tracker-stage-strip {
  position: relative;
  isolation: isolate;
  gap: 16px;
  padding: 8px 2px 14px;
}

.tracker-app-section .tracker-stage-strip::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 48px;
  left: 13%;
  right: 13%;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    rgba(202, 231, 138, 0.5),
    rgba(110, 202, 121, 0.72),
    rgba(202, 231, 138, 0.5)
  );
  box-shadow: 0 0 18px rgba(172, 232, 118, 0.22);
}

.tracker-app-section .tracker-stage-strip article {
  min-height: 154px;
  border: 1px solid rgba(177, 224, 151, 0.34);
  border-radius: 14px;
  background:
    linear-gradient(145deg, rgba(26, 104, 66, 0.94), rgba(7, 61, 39, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 12px 28px rgba(2, 34, 20, 0.2);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    background-color 180ms ease;
}

.tracker-app-section .tracker-stage-strip article:hover {
  transform: translateY(-3px);
  border-color: rgba(213, 241, 154, 0.75);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 17px 34px rgba(2, 34, 20, 0.28);
}

.tracker-app-section .tracker-stage-strip button {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  column-gap: 13px;
  align-items: center;
  min-height: 154px;
  padding: 17px 16px 18px;
}

.tracker-app-section .tracker-stage-strip span {
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 2px solid rgba(221, 246, 168, 0.72);
  border-radius: 50%;
  background: linear-gradient(145deg, #dff6a8, #85c95d);
  color: #073d27;
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
  box-shadow:
    inset 0 2px 3px rgba(255, 255, 255, 0.65),
    0 7px 17px rgba(4, 31, 19, 0.3);
}

.tracker-app-section .tracker-stage-strip b {
  align-self: end;
  color: #ffffff;
  font-size: clamp(17px, 1.55vw, 21px);
  font-weight: 800;
  line-height: 1.08;
}

.tracker-app-section .tracker-stage-strip small {
  align-self: start;
  margin-top: 8px;
  color: #d8e8dc;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.tracker-app-section .tracker-stage-strip article.is-current {
  transform: translateY(-5px);
  border-color: #dff6a8;
  background:
    radial-gradient(circle at 18% 12%, rgba(207, 248, 144, 0.22), transparent 32%),
    linear-gradient(145deg, #238454, #075033);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 20px 42px rgba(2, 38, 22, 0.34),
    0 0 0 3px rgba(213, 241, 154, 0.24),
    0 0 25px rgba(184, 239, 107, 0.2);
}

.tracker-app-section .tracker-stage-strip article.is-current span {
  border-color: #ffffff;
  background: linear-gradient(145deg, #f1ffc8, #a7e768);
  box-shadow:
    inset 0 2px 3px rgba(255, 255, 255, 0.75),
    0 0 0 5px rgba(211, 244, 151, 0.15),
    0 8px 20px rgba(2, 31, 18, 0.36);
  animation: companion-stage-pulse 2.6s ease-in-out infinite;
}

.tracker-app-section .tracker-stage-strip article.is-current::before {
  content: "CURRENT STAGE";
  position: absolute;
  top: 10px;
  right: 11px;
  padding: 4px 7px;
  border: 1px solid rgba(230, 250, 184, 0.62);
  border-radius: 4px;
  background: rgba(5, 57, 35, 0.82);
  color: #efffc9;
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
}

.tracker-app-section .tracker-stage-strip article.is-current::after {
  height: 5px;
  background: linear-gradient(90deg, #8ed965, #edffad, #8ed965);
  box-shadow: 0 0 14px rgba(211, 246, 139, 0.56);
}

@keyframes companion-stage-pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.055);
  }
}

/* The Companion's stage strip sits inside a two-column app shell. Switch to
   the horizontal card path before its three labels lose readable width. */
@media (max-width: 900px) {
  .tracker-app-section .tracker-stage-strip {
    grid-template-columns: repeat(3, minmax(212px, 76vw)) !important;
    gap: 12px;
    padding: 9px 4px 15px;
    scroll-padding-inline: 4px;
  }

  .tracker-app-section .tracker-stage-strip::before {
    display: none;
  }

  .tracker-app-section .tracker-stage-strip article,
  .tracker-app-section .tracker-stage-strip button {
    min-width: 212px !important;
    min-height: 138px !important;
  }

  .tracker-app-section .tracker-stage-strip button {
    grid-template-columns: 44px minmax(0, 1fr);
    padding: 15px;
  }

  .tracker-app-section .tracker-stage-strip span {
    width: 44px;
    height: 44px;
    font-size: 20px;
  }

  .tracker-app-section .tracker-stage-strip b {
    font-size: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tracker-app-section .tracker-stage-strip article,
  .tracker-app-section .tracker-stage-strip article.is-current span {
    transition: none;
    animation: none;
  }
}
