def colnum_zb_from_alphacol(alphacol: str) -> int:
    """
    Reverses :func:`column_lettering`, generating a zero-based column index
    from an alphabetical name (A to Z, AA to AZ, etc.).
    """
    base = 26
    zero_char = ord("A")
    total = 0
    reversed_chars = alphacol[::-1]
    for pos, char in enumerate(reversed_chars):
        digit_value = ord(char) - zero_char  # e.g. 0 for A, 25 for Z
        assert 0 <= digit_value < base
        if pos > 0:
            digit_value += 1
        total += digit_value * pow(base, pos)
    return total