.tabs {
  display: flex;
  align-items: center;
  gap: var(--s-1);
  border-bottom: 1px solid var(--border);
}

.tabs__tab {
  position: relative;
  padding: var(--s-2) var(--s-3);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--text-muted);
  border-radius: var(--r-sm) var(--r-sm) 0 0;
  transition: color var(--dur) var(--ease);
}

.tabs__tab:hover {
  color: var(--text);
}

.tabs__tab::after {
  content: '';
  position: absolute;
  left: var(--s-3);
  right: var(--s-3);
  bottom: -1px;
  height: 2px;
  background: transparent;
  border-radius: var(--r-full);
  transition: background-color var(--dur) var(--ease);
}

.tabs__tab--active {
  color: var(--text);
}

.tabs__tab--active::after {
  background: var(--brand);
}

/* many tabs must never overflow the page: the strip scrolls sideways instead */
.tabs {
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tabs__tab {
  flex-shrink: 0;
  white-space: nowrap;
}

@media (pointer: coarse) {
  .tabs__tab {
    min-height: var(--tap);
  }
}

/* the strip scrolls, so it clips anything drawn outside it: keep the keyboard focus ring inside */
.tabs__tab:focus-visible {
  outline-offset: -2px;
  border-radius: var(--r-md);
}
