/* Three product stages, shared by the Chinese and English tours. */
.ba-demo-controller .ba-demo-tabs {
  max-width: 48rem;
  margin: 0 auto 1.75rem;
  padding: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.ba-demo-controller .ba-demo-tabs label {
  --tour-ink: #50556b;
  --tour-badge: #f0f1f6;
  --tour-number: #72788d;
  position: relative;
  min-width: 0;
  min-height: 5.25rem;
  padding: 1rem 1.125rem;
  justify-content: flex-start;
  gap: 0.875rem;
  border: 1px solid #e7e8f0;
  border-radius: 1rem;
  background: #fff;
  color: var(--tour-ink);
  box-shadow: none;
  transition: border-color 180ms ease, background-color 180ms ease, color 180ms ease;
}

.ba-demo-tabs label:not(:last-child)::after {
  content: "";
  position: absolute;
  top: calc(50% - 0.2rem);
  right: -1.1875rem;
  width: 0.375rem;
  height: 0.375rem;
  border-top: 1.5px solid #b3b7ca;
  border-right: 1.5px solid #b3b7ca;
  transform: rotate(45deg);
  pointer-events: none;
}

.ba-demo-tabs label .ba-demo-step {
  display: grid;
  flex: 0 0 2.5rem;
  width: 2.5rem;
  height: 2.5rem;
  place-items: center;
  border-radius: 50%;
  background: var(--tour-badge);
  color: var(--tour-number);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: background-color 180ms ease, color 180ms ease;
}

.ba-demo-tabs label .ba-demo-copy {
  display: grid;
  min-width: 0;
  gap: 0.3125rem;
  color: inherit;
  letter-spacing: normal;
  text-align: left;
}

.ba-demo-copy strong {
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.3;
}

.ba-demo-copy small {
  color: #71778b;
  font-size: 0.6875rem;
  font-weight: 400;
  line-height: 1.45;
}

.ba-demo-controller .ba-demo-tabs label:hover {
  border-color: #c7c5f5;
  background: #f9f9ff;
}

.ba-demo-radio:nth-of-type(1):checked ~ .ba-demo-tabs label:nth-child(1),
.ba-demo-radio:nth-of-type(2):checked ~ .ba-demo-tabs label:nth-child(2),
.ba-demo-radio:nth-of-type(3):checked ~ .ba-demo-tabs label:nth-child(3) {
  --tour-ink: #4035c9;
  --tour-badge: #5145df;
  --tour-number: #fff;
  border-color: #d1cdfa;
  background: #f3f1ff;
  box-shadow: 0 0.375rem 1rem rgba(70, 55, 160, 0.06);
  color: var(--tour-ink);
}

.ba-demo-radio:nth-of-type(1):focus-visible ~ .ba-demo-tabs label:nth-child(1),
.ba-demo-radio:nth-of-type(2):focus-visible ~ .ba-demo-tabs label:nth-child(2),
.ba-demo-radio:nth-of-type(3):focus-visible ~ .ba-demo-tabs label:nth-child(3) {
  outline: 2px solid #5145df;
  outline-offset: 4px;
}

@media (max-width: 600px) {
  .ba-demo-controller .ba-demo-tabs {
    gap: 1rem;
    margin-bottom: 1.25rem;
  }

  .ba-demo-controller .ba-demo-tabs label {
    min-height: 7rem;
    padding: 0.875rem 0.375rem;
    flex-direction: column;
    gap: 0.625rem;
    border-radius: 0.875rem;
  }

  .ba-demo-tabs label .ba-demo-copy {
    width: 100%;
    text-align: center;
  }

  .ba-demo-copy strong { font-size: 0.8125rem; }
  .ba-demo-copy small { font-size: 0.625rem; }
  .ba-demo-tabs label:not(:last-child)::after { right: -0.6875rem; }
}

@media (prefers-reduced-motion: reduce) {
  .ba-demo-controller .ba-demo-tabs label,
  .ba-demo-tabs label .ba-demo-step { transition: none; }
}
