calculate instance offset
externalized css + cleanup