```python
def base_amount(amount: int, unit: str, defs: dict, base: str) -> int:
    """
    Convert an amount from a nested unit to the base unit.

    :param amount: Amount in the specified unit.
    :param unit: Name of the current unit.
    :param defs: Dictionary mapping unit names to pairs [factor, finer].
    :param base: Base unit name.
    :return: Amount in the base unit.
    """
    if not isinstance(amount, int) or amount < 0:
        raise ValueError("Amount must be a non-negative integer.")
    
    if unit == base:
        return amount
    
    if unit not in defs:
        raise ValueError(f"Unit '{unit}' is not defined.")
    
    factor, finer = defs[unit]
    
    if not isinstance(factor, int) or factor <= 0:
        raise ValueError("Factor must be a positive integer.")
    
    if finer == base:
        return amount * factor
    
    return base_amount(amount * factor, finer, defs, base)
```