.learning-phase-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 0 auto 36px;
}

.learning-phase-nav a {
  padding: 8px 13px;
  border: 1px solid #dbe5f4;
  border-radius: 999px;
  background: #fff;
  color: #1e40af;
  font: 700 14px/1.4 "Manrope", sans-serif;
  text-decoration: none;
}

.learning-phase-nav a:hover,
.learning-phase-nav a[aria-current="page"] {
  border-color: #2563eb;
  background: #eff6ff;
}

.learning-phase-nav a:focus-visible,
.learning-stage button.yt-playlist-item:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.learning-phase {
  margin-block: 32px 56px;
}

.learning-phase h2 {
  margin: 0 0 20px;
  scroll-margin-top: 100px;
}

.learning-stage .learning-stage-title {
  margin: 8px 0 18px;
  color: #0f172a;
  font: 500 clamp(32px, 5vw, 52px)/1.12 "Inter Tight", sans-serif;
}

.learning-stage .learning-stage-nav {
  justify-content: flex-start;
  margin-bottom: 28px;
}

.learning-stage button.yt-playlist-item {
  width: 100%;
  text-align: left;
}

.learning-stage .yt-item-duration-badge:empty {
  display: none;
}

.learning-episode-kind {
  color: #1e40af;
  font: 700 11px/1.4 "Manrope", sans-serif;
}

.learning-youtube-playlist {
  color: #1e40af;
  text-decoration: underline;
  font: 700 12px/1.4 "Manrope", sans-serif;
}

.learning-stage .yt-description-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

@media (max-width: 680px) {
  .learning-stage .learning-stage-nav {
    padding-inline: 16px;
    justify-content: center;
    margin-bottom: 20px;
  }
}

/* Match the catalogue's pill navigation and title treatment on the learning path. */
.learning-path-nav .dex-pill-nav-track {
  flex-wrap: wrap;
  justify-content: center;
}

.learning-path-nav .dex-pill-nav-btn {
  text-decoration: none;
}

.learning-path-nav .dex-pill-nav-btn:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.learning-phase-header {
  margin-bottom: 24px;
  text-align: center;
}

.learning-phase-header .modules-title-row {
  justify-content: center;
}

.learning-phase-header .modules-section-title {
  margin: 0;
  text-align: center;
  scroll-margin-top: 110px;
}

.learning-phase-header .modules-section-title .gradient-text {
  background-image: linear-gradient(100deg, #0f172a 0%, #0f172a 26%, #2563eb 65%, #d89b00 100%);
}

.learning-phase-header .modules-section-desc {
  margin: 12px auto 0;
  text-align: center;
}

.learning-stage-gradient {
  background: linear-gradient(100deg, #1e40af, #2563eb 60%, #d89b00);
  background-clip: text;
  color: transparent;
}

@media (max-width: 768px) {
  .learning-path-nav .dex-pill-nav-track {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px !important;
    padding: 5px !important;
    border: 1px solid #dbe5f4 !important;
    border-radius: 22px !important;
    background: #fff !important;
  }

  .learning-path-nav .dex-pill-nav-btn {
    justify-content: center;
    min-width: 0;
    padding: 7px 5px;
    gap: 4px;
    font-size: 12px;
  }

  .learning-path-nav .dex-pill-nav-icon {
    flex: 0 0 13px;
    width: 13px;
    height: 13px;
  }

  .learning-path-nav .dex-pill-nav-btn:last-child {
    grid-column: 1 / -1;
  }

  .learning-path-nav .dex-pill-badge {
    font-size: 9px;
    padding: 1px 5px;
  }
}

.learning-stage-nav a[aria-current="page"] {
  background: linear-gradient(135deg, #1e40af, #2563eb);
  border-color: #2563eb;
  color: #fff;
  box-shadow: 0 6px 18px #2563eb38;
}

@media (min-width: 1025px) {
  .learning-path-panel .modules-grid-3col > :last-child:nth-child(3n + 1):not(:only-child) {
    grid-column: 1;
  }
}

.learning-path-panel > [hidden] {
  display: none !important;
}

.learning-path-panel .learning-phase {
  margin-top: 0;
}

@media (max-width: 768px) {
  .learning-path-nav .dex-pill-nav-btn {
    flex-wrap: nowrap;
    min-height: 40px;
  }

  .learning-path-nav .dex-pill-badge {
    display: none;
  }
}

.learning-path-panel .module-body {
  padding: 14px 20px 16px;
}

.learning-path-panel .module-tag,
.learning-path-panel .module-title {
  margin-bottom: 6px;
}

.learning-path-panel .module-title,
.learning-path-panel .module-desc {
  min-height: 0;
}

.learning-path-panel .module-desc {
  margin-bottom: 0;
}

.learning-path-panel .module-action {
  margin-top: 12px;
  padding-top: 0;
}

.learning-stage .learning-stage-video-description {
  flex-basis: 100%;
  margin: 0;
  text-align: left !important;
  hyphens: none;
}
