How the needs of monks and empire builders helped mold the modern-day office