/* Story switcher — a segmented control (tablist), not a pair of CTA
   buttons. One pill track, a sliding thumb behind the active option.
   Sits right under the hero cover, since it's the cover it changes. */

.story-switch {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 0.2rem;
  width: 100%;
  max-width: 440px;
  padding: 4px;
  background: var(--switch-bg);
  border: 1px solid var(--switch-border);
  border-radius: 999px;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition: background 0.5s ease, border-color 0.5s ease;
}

.story-switch-thumb {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc(50% - 4px);
  background: var(--paper);
  border-radius: 999px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.story-switch.is-fluffy .story-switch-thumb {
  transform: translateX(100%);
}

.story-tab {
  position: relative;
  z-index: 1;
  flex: 1 1 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.85rem;
  line-height: 1.2;
  text-wrap: balance;
  color: var(--hero-muted);
  background: transparent;
  border: none;
  border-radius: 999px;
  padding: 0.5rem 0.9rem;
  min-height: 44px;
  cursor: pointer;
  text-align: center;
  transition: color 0.3s ease;
}

.story-tab .story-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  flex: none;
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.25);
}

.story-tab.active {
  color: var(--midnight);
}

.story-tab:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}

@media (max-width: 520px) {
  .story-tab { font-size: 0.8rem; padding: 0.5rem 0.5rem; }
  .story-tab .story-dot { width: 16px; height: 16px; }
}
