/** Reads a required env var, throwing instead of silently falling back to a hardcoded default. */
export function requireEnv(name: string): string {
  const value = process.env[name];
  if (!value) {
    throw new Error(`Missing required environment variable: ${name}. Set it in .env.`);
  }
  return value;
}
