.segmented {
  display: flex;
  gap: var(--space-1, 0.25rem);
  min-width: 0;
  padding: var(--space-1, 0.25rem);
  border: var(--border-width-strong, 1.5px) solid var(--border, currentColor);
  border-radius: var(--radius-lg, 12px);
  background: var(--surface, transparent);
}

.segmented__option {
  flex: 1 1 0;
  min-width: 0;
  min-height: var(--control-height-sm, 34px);
  padding: var(--space-2, 0.375rem) var(--space-4, 0.625rem);
  border: 0;
  border-radius: var(--radius-sm, 6px);
  background: transparent;
  color: var(--muted, currentColor);
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
}

.segmented__option:hover {
  color: var(--text, currentColor);
}

.segmented__option[aria-pressed="true"],
.segmented__option[aria-selected="true"],
.segmented__option.is-active {
  background: var(--panel, transparent);
  color: var(--accent-ink, currentColor);
  box-shadow: var(--card-shadow, none);
}

.segmented__option:focus-visible {
  outline: 2px solid var(--focus-ring-color, currentColor);
  outline-offset: 2px;
}

.segmented__option:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

@media (max-width: 640px) {
  .segmented__option {
    min-height: var(--touch-target, 44px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .segmented__option {
    transition: none !important;
  }
}
