```python
def trim_to(line: str, limit: int) -> str:
    if limit < 4:
        raise ValueError("Limit must be at least 4")
    
    if len(line) <= limit:
        return line
    
    # Find the last space before the limit
    last_space = line.rfind(' ', limit - 3)
    
    if last_space == -1:
        # If no space is found, cut at the limit minus three dots
        return line[:limit - 3] + '...'
    else:
        # If a space is found, cut at the last space
        return line[:last_space] + '...'
```