/* -- --docs-tour-* are the public colors a page embedding the tour sets, the docs fall back to their theme's */
.docs-tour {
  --tour-bg: var(--docs-tour-bg, var(--summer-bg));
  --tour-bg-subtle: var(--docs-tour-bg-subtle, var(--summer-bg-subtle));
  --tour-border: var(--docs-tour-border, var(--summer-border));
  --tour-fg: var(--docs-tour-fg, var(--summer-fg));
  --tour-fg-soft: var(--docs-tour-fg-soft, var(--summer-fg-soft));
  --tour-fg-muted: var(--docs-tour-fg-muted, var(--summer-fg-muted));
  --tour-fg-faint: var(--docs-tour-fg-faint, var(--summer-fg-faint));
  --tour-accent: var(--docs-tour-accent, var(--summer-accent));
  --tour-accent-soft: var(--docs-tour-accent-soft, var(--summer-accent-soft));
  --tour-ring: var(--docs-tour-ring, var(--summer-ring));
  --tour-shadow: var(--docs-tour-shadow, var(--summer-shadow));
  --tour-radius: var(--docs-tour-radius, var(--summer-radius-lg));
  --tour-radius-sm: var(--docs-tour-radius-sm, var(--summer-radius-sm));
  --tour-color-accent: color-mix(in oklab, var(--tour-accent) 62%, var(--tour-fg-muted));
  --tour-color-purple: color-mix(in oklab, #8b5cf6 60%, var(--tour-fg-muted));
  --tour-color-red: color-mix(in oklab, #e5383b 65%, var(--tour-fg-muted));
  --tour-color-neutral: color-mix(in oklab, var(--tour-fg) 80%, var(--tour-fg-muted));
  --tour-color-green: color-mix(in oklab, #4f9d69 60%, var(--tour-fg-muted));
  --tour-color-amber: color-mix(in oklab, #d49a2a 62%, var(--tour-fg-muted));
  margin: 16px 0 24px;
  text-align: start;
}

.docs-tour__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  margin-bottom: 12px;
}

.docs-tour__chapters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.docs-tour__chapter {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font: inherit;
  font-size: 0.85rem;
  color: inherit;
  background: transparent;
  border: 1px solid var(--tour-border);
  border-radius: 999px;
  padding: 3px 12px 3px 9px;
  cursor: pointer;
}

.docs-tour__chapter::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--tour-color);
}

.docs-tour__chapter[aria-pressed='true'] {
  border-color: color-mix(in srgb, var(--tour-color) 60%, transparent);
  background: color-mix(in srgb, var(--tour-color) 8%, transparent);
}

.docs-tour__switches {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.docs-tour__switch {
  display: inline-flex;
  border: 1px solid var(--tour-border);
  border-radius: var(--tour-radius-sm);
  overflow: hidden;
}

.docs-tour__switch-button {
  font: inherit;
  color: inherit;
  background: transparent;
  border: 0;
  padding: 4px 12px;
  cursor: pointer;
}

.docs-tour__switch-button[aria-pressed='true'] {
  background: var(--tour-accent-soft);
  color: var(--tour-fg);
}

.docs-tour__stage {
  position: relative;
  height: 72vh;
  min-height: 480px;
  max-height: 760px;
  border: 1px solid var(--tour-border);
  border-radius: var(--tour-radius);
  background: var(--tour-bg);
  overflow: hidden;
  outline: none;
  user-select: none;
  -webkit-user-select: none;
}

@media (max-width: 640px) {
  .docs-tour__stage {
    height: 80vh;
    min-height: 540px;
  }
}

.docs-tour__stage:focus-visible {
  box-shadow: var(--tour-ring);
}

.docs-tour__stage:fullscreen {
  height: 100%;
  max-height: none;
  border: 0;
  border-radius: 0;
}

.docs-tour__world {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: 0 0;
  transition: opacity 0.8s;
}

.docs-tour__stage.is-credits .docs-tour__world {
  opacity: 0.14;
}

.docs-tour__stage.is-moving .docs-tour__world {
  will-change: transform;
}

/* -- the theme styles every content image (after this file loads), and its max-width would shrink the sizeless
   world's svg to nothing */
.docs-tour .docs-tour__world > svg,
.docs-tour .docs-tour__world img {
  max-width: none;
  margin: 0;
  border-radius: 0;
  box-shadow: none;
}

.docs-tour__lines {
  position: absolute;
  left: 0;
  top: 0;
  width: 1px;
  height: 1px;
  overflow: visible;
}

.docs-tour__track {
  fill: none;
  stroke: var(--tour-fg-faint);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 0.1 12;
  opacity: 0.48;
}

.docs-tour__segment {
  fill: none;
  stroke: var(--tour-color);
  stroke-width: 3.5;
  stroke-opacity: 0.64;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.docs-tour__segment--branch {
  stroke-width: 2.5;
}

.docs-tour__segment.is-empty {
  visibility: hidden;
}

.docs-tour__station {
  fill: var(--tour-bg);
  stroke: var(--tour-fg-faint);
  stroke-width: 2.5;
  opacity: 0.9;
  transition: fill 0.3s, stroke 0.3s;
}

.docs-tour__station.is-reached {
  stroke: var(--tour-color);
}

.docs-tour__station.is-current {
  fill: var(--tour-color);
}

.docs-tour__pulse {
  position: absolute;
  box-sizing: border-box;
  border: 2px solid var(--tour-color);
  border-radius: 50%;
  pointer-events: none;
  will-change: transform, opacity;
  animation: docs-tour-pulse 1.6s cubic-bezier(0.3, 0.6, 0.6, 1) infinite;
}

.docs-tour__pulse.is-hidden,
.docs-tour__stage.is-map .docs-tour__pulse {
  display: none;
}

@keyframes docs-tour-pulse {
  from {
    transform: scale(1);
    opacity: 0.7;
  }
  to {
    transform: scale(2);
    opacity: 0;
  }
}

.docs-tour__origin {
  position: absolute;
}

.docs-tour__origin img {
  display: block;
  width: 100%;
  height: 100%;
}

.docs-tour__card {
  position: absolute;
  border-radius: 12px;
  overflow: hidden;
  background: var(--tour-bg-subtle);
  box-shadow: 0 0 0 1px var(--tour-border), var(--tour-shadow);
  opacity: 0;
  transform: translateY(24px) scale(0.95);
  transform-origin: 50% 100%;
  transition: opacity 0.35s, transform 0.45s cubic-bezier(0.2, 0.9, 0.25, 1), box-shadow 0.35s;
  cursor: pointer;
}

.docs-tour__card img {
  display: block;
  width: 100%;
  height: auto;
}

.docs-tour__card.is-visited {
  opacity: 0.4;
  transform: none;
}

.docs-tour__card.is-current {
  --tour-ring-color: color-mix(in oklab, var(--tour-color) 55%, var(--tour-fg-muted));
  opacity: 1;
  transform: none;
  box-shadow: 0 0 0 2px color-mix(in oklab, var(--tour-ring-color) 45%, var(--tour-bg)), 0 22px 60px -28px color-mix(in srgb, var(--tour-ring-color) 35%, transparent);
  cursor: default;
}

.docs-tour__stage.is-map .docs-tour__card {
  opacity: 1;
  transform: none;
  cursor: pointer;
}

/* -- hangs under its branch line, so it comes in from above */
.docs-tour__card--branch {
  border-radius: 9px;
  transform: translateY(-18px) scale(0.95);
  transform-origin: 50% 0;
}

.docs-tour__tile {
  position: absolute;
  border-radius: 7px;
  overflow: hidden;
  background: var(--tour-bg);
  box-shadow: 0 0 0 1px var(--tour-border);
  transition: opacity 0.35s, box-shadow 0.35s;
  cursor: pointer;
}

.docs-tour .docs-tour__tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.docs-tour__card.is-detail .docs-tour__tile:not(.is-current) {
  opacity: 0.4;
}

.docs-tour__tile.is-current {
  box-shadow: 0 0 0 2px color-mix(in oklab, var(--tour-color) 55%, var(--tour-bg));
}

.docs-tour__pin {
  position: absolute;
  box-sizing: border-box;
  width: 24px;
  height: 24px;
  margin: -12px 0 0 -12px;
  padding: 0;
  border: 2px solid var(--tour-color);
  border-radius: 50%;
  background: color-mix(in srgb, var(--tour-color) 14%, transparent);
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.3s, transform 0.4s cubic-bezier(0.2, 0.9, 0.25, 1);
  pointer-events: none;
  cursor: pointer;
}

.docs-tour__pin.is-shown,
.docs-tour__stage.is-map .docs-tour__pin {
  opacity: 0.5;
  transform: scale(0.8);
  pointer-events: auto;
}

.docs-tour__pin.is-current {
  opacity: 1;
  transform: none;
}

.docs-tour__pin.is-current::after {
  content: '';
  position: absolute;
  inset: -2px;
  border: 2px solid var(--tour-color);
  border-radius: 50%;
  animation: docs-tour-pulse 1.6s cubic-bezier(0.3, 0.6, 0.6, 1) infinite;
}

.docs-tour__label {
  position: absolute;
  text-align: center;
  font-size: 20px;
  font-weight: 600;
  line-height: 28px;
  white-space: nowrap;
  color: var(--tour-fg-soft);
  opacity: 0;
  transition: opacity 0.4s;
}

.docs-tour__label.is-reached {
  opacity: 0.55;
}

.docs-tour__label.is-current,
.docs-tour__stage.is-map .docs-tour__label {
  opacity: 1;
}

.docs-tour__label--branch {
  font-size: 15px;
  line-height: 22px;
}

/* -- rolls over the route's part of the stage, the caption keeps its own */
.docs-tour__credits {
  position: absolute;
  left: var(--tour-side, 0px);
  right: 0;
  top: 0;
  height: var(--tour-route-height, 100%);
  overflow: hidden;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.6s, visibility 0.6s;
  -webkit-mask-image: linear-gradient(transparent, #000 14%, #000 86%, transparent);
  mask-image: linear-gradient(transparent, #000 14%, #000 86%, transparent);
}

.docs-tour__stage.is-credits .docs-tour__credits {
  visibility: visible;
  opacity: 1;
}

.docs-tour__credits.is-static {
  overflow-y: auto;
}

.docs-tour__credits-roll {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  padding: 0 16px;
  text-align: center;
  transform: translateY(100vh);
}

.docs-tour__credits.is-static .docs-tour__credits-roll {
  padding: 48px 16px;
  transform: none;
}

.docs-tour__credits-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.docs-tour__credits-title {
  margin-bottom: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--tour-fg-muted);
}

.docs-tour__credits-item {
  font-size: 1.05rem;
  line-height: 1.45;
  color: var(--tour-fg-soft);
  text-decoration: none;
}

.docs-tour__credits-item:hover {
  color: var(--tour-fg);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.docs-tour__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 56px;
  padding: 18px 16px 10px;
  font-size: 0.9rem;
  pointer-events: none;
  background: linear-gradient(to top, var(--tour-bg) 80%, transparent);
}

.docs-tour__stage--wide .docs-tour__caption {
  top: 0;
  right: auto;
  width: var(--tour-side);
  display: flex;
  align-items: center;
  box-sizing: border-box;
  padding: 28px 40px 28px 28px;
  font-size: 1rem;
  background: linear-gradient(to right, var(--tour-bg) 72%, transparent);
}

.docs-tour__stage--wide .docs-tour__title {
  margin: 4px 0 8px;
  font-size: 1.55rem;
}

.docs-tour__stage--wide .docs-tour__links {
  margin-top: 14px;
}

.docs-tour__caption-content {
  animation: docs-tour-caption-in 0.5s both;
}

.docs-tour__caption-content.is-leaving {
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.25s, transform 0.25s;
}

@keyframes docs-tour-caption-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.docs-tour__kicker {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--tour-color, var(--tour-accent));
}

.docs-tour__title {
  margin: 2px 0 4px;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--tour-fg);
}

.docs-tour__text {
  margin: 0;
  line-height: 1.45;
  color: var(--tour-fg-soft);
  white-space: pre-line;
}

.docs-tour__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.docs-tour__link {
  pointer-events: auto;
  font: inherit;
  font-size: 0.85rem;
  padding: 4px 12px;
  border: 1px solid var(--tour-border);
  border-radius: 999px;
  background: var(--tour-bg);
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

.docs-tour__link:hover {
  border-color: var(--tour-fg-faint);
}

.docs-tour__controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 56px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0 10px;
  background: var(--tour-bg);
  border-top: 1px solid var(--tour-border);
}

.docs-tour__button {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--tour-fg);
  cursor: pointer;
}

.docs-tour__button:hover,
.docs-tour__button[aria-pressed='true'] {
  background: var(--tour-bg-subtle);
}

.docs-tour__button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.docs-tour__button--play,
.docs-tour__button--play:hover {
  background: var(--tour-fg);
  color: var(--tour-bg);
}

.docs-tour__progress {
  flex: 1;
  display: flex;
  gap: 1px;
  margin: 0 10px;
}

.docs-tour__step {
  flex: 1 1 0;
  min-width: 0;
  position: relative;
  height: 20px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.docs-tour__step::before,
.docs-tour__step-fill {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 8px;
  height: 4px;
  border-radius: 2px;
}

.docs-tour__step--chapter {
  margin-left: 4px;
}

.docs-tour__step::before {
  background: var(--tour-border);
}

.docs-tour__step-fill {
  background: var(--tour-color);
  transform: scaleX(0);
  transform-origin: left;
}

@media (prefers-reduced-motion: reduce) {
  .docs-tour__card,
  .docs-tour__label,
  .docs-tour__station,
  .docs-tour__world,
  .docs-tour__tile,
  .docs-tour__pin {
    transition: none;
  }

  .docs-tour__pulse,
  .docs-tour__pin::after,
  .docs-tour__caption-content {
    animation: none;
  }
}
