Weighted Traffic Shard Router
A gateway shard router splits incoming traffic proportionally to shard weights. Each shard `i` advertises `weights[i]` (positive). The router builds prefix sums `pref[i] = weights[0] + ... + weights[i]` with total `T = pref[n-1]`. Every ticket is an integer `t` with `1 <= t <= T`. The router must return the smallest shard index `i` with `pref[i] >= t` using binary search.