/* Stable homepage layout across desktop, tablet and narrow preview windows. */
.home-page .hero {
  width: 100%;
  max-width: none;
  margin-inline: auto;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
}

.home-page .hero-copy,
.home-page .route-visual {
  min-width: 0;
  align-self: start;
}

.home-page .hero-copy {
  flex: 1.05 1 0;
}

.home-page .route-visual {
  flex: .95 1 0;
  margin-top: 0;
}

.home-page .mentor-wiki-button {
  display: flex;
  width: max-content;
  margin-left: auto;
  margin-right: auto;
  min-height: 54px;
  margin: 18px 0 24px;
  padding: 0 20px;
  gap: 12px;
  border: 1px solid rgba(21, 26, 34, .35);
  background: transparent;
  color: var(--ink);
  font-size: 15px;
  box-shadow: none;
}

.home-page .wiki-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border: 2px solid #111827;
  border-radius: 50%;
  background: #fff;
  color: #111827;
  font: 800 italic 18px/1 Georgia, serif;
  letter-spacing: -.14em;
  box-shadow: inset 0 -2px 0 rgba(17,24,39,.14);
}

.home-page .wiki-mark svg {
  display: block;
  width: 30px;
  height: 30px;
  overflow: visible;
}

.home-page .wiki-mark svg circle,
.home-page .wiki-mark svg path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.35;
}

.home-page .wiki-mark svg text {
  fill: currentColor;
  stroke: none;
  font: italic 800 14px Georgia, serif;
}

.home-page .wiki-mark img {
  display: block;
  width: 30px;
  height: 30px;
  object-fit: contain;
  max-width: none;
}

.home-page .route-panel {
  overflow: hidden;
}

.home-page .route-panel ol {
  display: flex !important;
  grid-template-columns: none !important;
  width: max-content;
  gap: 18px;
  animation: none !important;
  will-change: transform;
}

.home-page .route-panel li {
  flex: 0 0 118px;
}

.home-page .principles-track {
  display: flex !important;
  width: max-content;
  flex: none;
  will-change: transform;
}

.home-page .type-ribbon-track {
  animation: ribbon-track 28s linear infinite !important;
  transform: translate3d(0, 0, 0);
  will-change: transform;
}

/* Keep mentor carousel controls compact instead of stretching across the image. */
.home-page .mentor-carousel-controls {
  left: 50%;
  right: auto;
  width: 148px;
  transform: translateX(-50%);
  justify-content: space-between;
  gap: 7px;
  padding: 7px 8px;
}

.home-page .mentor-carousel-controls .mentor-carousel-dots {
  flex: 1 1 auto;
  justify-content: center;
  gap: 5px;
}

.home-page .mentor-carousel-controls .mentor-carousel-arrow {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  min-width: 30px;
  min-height: 30px;
  padding: 0;
  line-height: 1;
}

.home-page .mentor-carousel-controls .mentor-carousel-dots button {
  width: 6px;
  height: 6px;
  min-width: 6px;
  min-height: 6px;
  flex: 0 0 6px;
  padding: 0;
}

.home-page .mentor-carousel-controls .mentor-carousel-dots button.is-active {
  width: 16px;
  min-width: 16px;
  flex-basis: 16px;
}

@media (max-width: 620px) {
  .home-page .mentor-carousel-controls {
    width: 144px;
  }
}

.home-page .principles-track > p {
  flex: 0 0 auto;
  white-space: nowrap;
}

.home-page .mentor-wiki-button:hover {
  background: var(--ink);
  color: #fff;
}

/* Desktop browsers can be opened in a narrow side panel; keep the desktop hero
   horizontal there instead of letting the global tablet rule stack it. */
@media (pointer: fine) {
  .home-page .hero {
    display: flex;
    flex-direction: row;
    align-items: start;
    gap: clamp(34px, 5vw, 70px);
    min-height: calc(100vh - 78px);
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .home-page .hero {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
    gap: 40px;
    min-height: calc(100vh - 78px);
    padding: 48px 28px 64px;
  }

  .home-page .hero-copy {
    max-width: 720px;
  }

  .home-page .route-visual {
    width: 100%;
  }
}

@media (max-width: 767px) {
  .home-page .hero {
    gap: 34px;
    padding: 34px 16px 48px;
    flex-direction: column;
  }

  .home-page .hero h1 {
    font-size: clamp(40px, 12.5vw, 52px);
    line-height: .98;
  }

  .home-page .hero-program-cta {
    width: 100%;
    min-width: 0;
  }
}
