/**
 * Single source for platform fee percentage used in promo gates and Stripe math.
 * Read from env at call sites; never hardcode 10 outside tests.
 */
export function getPlatformFeePct(env: { PLATFORM_FEE_PCT?: string }): number {
  const raw = Number(env.PLATFORM_FEE_PCT);
  if (!Number.isFinite(raw) || raw < 0) return 10;
  return raw;
}
