```python
def step_allowed(start: str, end: str, allowed: list) -> bool:
    """
    Check if moving from start to end is among the allowed moves.
    """
    if start == end:
        # If the start and end states are the same, check if the move is allowed
        return end in allowed
    else:
        # Otherwise, check if the move from start to end is in the allowed list
        return (start, end) in allowed

def step_plan(states: list, allowed: list) -> int:
    """
    Find the position of the first move in the run of states that is not allowed,
    or return -1 if every move is allowed.
    """
    if not states:
        raise ValueError("The run of states cannot be empty.")
    
    for i in range(len(states) - 1):
        if (states[i], states[i + 1]) not in allowed:
            return i + 1
    
    return -1
```