/* The hero has two native radio groups, styled as one family of controls. */
.discovery-home .hero-segment-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.discovery-home .hero-segment-field { min-width: 0; }
.discovery-home .hero-segment-topics { flex: 1 1 390px; }
.discovery-home .hero-segment-audience { flex: 0 0 190px; }
.discovery-home .hero-segments {
  --segment-count: 2;
  --segment-index: 0;
  --segment-ink: #765e83;
  --segment-active: #563662;
  --segment-track: #e9e0eea6;
  --segment-pill: #fffdfc;
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: repeat(var(--segment-count), minmax(0, 1fr));
  height: 44px;
  padding: 4px;
  border-radius: 24px;
  background: var(--segment-track);
  box-shadow: inset 0 0 0 1px #80668e1a, 0 1px 0 #ffffff80;
}
.discovery-home .hero-segments-five { --segment-count: 5; }
.discovery-home .hero-segments label {
  position: relative;
  display: block;
  min-width: 0;
  cursor: pointer;
}
.discovery-home .hero-segments input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.discovery-home .hero-segments label > span {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 10px;
  border-radius: 20px;
  color: var(--segment-ink);
  font: 400 13px/1.2 var(--sans);
  white-space: nowrap;
  transition: color .18s ease;
  pointer-events: none;
}
.discovery-home .hero-segments input:checked + span {
  background: var(--segment-pill);
  color: var(--segment-active);
  font-weight: 600;
  box-shadow: 0 2px 7px #5c3d6e14, 0 1px 2px #5c3d6e0a;
}
.discovery-home .hero-segments input:focus-visible + span {
  outline: 2px solid #745384;
  outline-offset: 2px;
}
.discovery-home .hero-segments input:disabled { cursor: wait; }
.discovery-home .hero-segments input:disabled + span { opacity: .6; }
@media (hover: hover) {
  .discovery-home .hero-segments label:hover input:not(:disabled) + span { color: var(--segment-active); }
}
/* The checked label remains styled in browsers without :has(). */
@supports selector(:has(*)) {
  .discovery-home .hero-segments::before {
    content: '';
    position: absolute;
    z-index: -1;
    top: 4px;
    bottom: 4px;
    left: 4px;
    width: calc((100% - 8px) / var(--segment-count));
    border-radius: 20px;
    background: var(--segment-pill);
    box-shadow: 0 2px 7px #5c3d6e14, 0 1px 2px #5c3d6e0a;
    transform: translateX(calc(var(--segment-index) * 100%));
    transition: transform .22s cubic-bezier(.2, .75, .3, 1);
    pointer-events: none;
  }
  .discovery-home .hero-segments:has(label:nth-child(2) input:checked) { --segment-index: 1; }
  .discovery-home .hero-segments:has(label:nth-child(3) input:checked) { --segment-index: 2; }
  .discovery-home .hero-segments:has(label:nth-child(4) input:checked) { --segment-index: 3; }
  .discovery-home .hero-segments:has(label:nth-child(5) input:checked) { --segment-index: 4; }
  .discovery-home .hero-segments input:checked + span { background: transparent; box-shadow: none; }
}
.discovery-home .swipe-under { flex-wrap: wrap; }
.discovery-home .swipe-under .hero-undo-label { font-size: inherit; line-height: inherit; }
.discovery-home .hero-segment-mix { gap: 6px; }
.discovery-home .hero-segment-mix svg { flex: none; }
.discovery-home .hero-segment-mix .hero-segment-mix-label { font-size: inherit; line-height: inherit; }
.hero-midnight .hero-segments {
  --segment-track: #ffffff14;
  --segment-pill: #efddea;
  --segment-ink: #d1b5ca;
  --segment-active: #573749;
  box-shadow: inset 0 0 0 1px #e3c1d722;
}
.hero-midnight .hero-segments label:hover input:not(:checked):not(:disabled) + span { color: #f8e6f2; }
@media (max-width: 600px) {
  .discovery-home .hero-segment-controls { flex-direction: column; gap: 8px; }
  .discovery-home .hero-segment-topics { flex: none; width: 100%; max-width: 390px; }
  .discovery-home .hero-segment-audience { order: -1; flex: none; width: 190px; }
  .discovery-home .hero-segments label > span { padding-inline: 4px; font-size: 12px; }
  .discovery-home .swipe-under { gap: 0 12px; padding-inline: 12px; }
  .discovery-home .swipe-under .swipe-undo { gap: 5px; }
  .discovery-home .swipe-under .swipe-undo > span[aria-hidden] { font-size: 18px; }
  .discovery-home .hero-undo-detail { display: none; }
  .discovery-home .hero-segment-mix { justify-content: center; width: 44px; min-height: 44px; padding: 0; }
  .discovery-home .hero-segment-mix-label { display: none; }
}
@media (max-width: 360px) {
  .discovery-home .swipe-under { gap: 0 9px; padding-inline: 7px; }
  .discovery-home .swipe-under .swipe-undo { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .discovery-home .hero-segments::before,
  .discovery-home .hero-segments label > span { transition: none; }
}
